summaryrefslogtreecommitdiff
path: root/tests/src/CoreMangLib
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2016-11-23 19:09:09 +0900
committerJiyoung Yun <jy910.yun@samsung.com>2016-11-23 19:09:09 +0900
commit4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (patch)
tree98110734c91668dfdbb126fcc0e15ddbd93738ca /tests/src/CoreMangLib
parentfa45f57ed55137c75ac870356a1b8f76c84b229c (diff)
downloadcoreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.tar.gz
coreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.tar.bz2
coreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.zip
Imported Upstream version 1.1.0upstream/1.1.0
Diffstat (limited to 'tests/src/CoreMangLib')
-rw-r--r--tests/src/CoreMangLib/components/fileversioninfo/Assembly1.csproj44
-rw-r--r--tests/src/CoreMangLib/components/fileversioninfo/assembly1.cs23
-rw-r--r--tests/src/CoreMangLib/components/stopwatch/Co9600Ctor.csproj41
-rw-r--r--tests/src/CoreMangLib/components/stopwatch/Co9604get_IsRunning.csproj41
-rw-r--r--tests/src/CoreMangLib/components/stopwatch/co9600ctor.cs184
-rw-r--r--tests/src/CoreMangLib/components/stopwatch/co9604get_isrunning.cs209
-rw-r--r--tests/src/CoreMangLib/cti/system/action/ActionCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/action/ActionInvoke.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/action/actionctor.cs154
-rw-r--r--tests/src/CoreMangLib/cti/system/action/actioninvoke.cs203
-rw-r--r--tests/src/CoreMangLib/cti/system/activator/ActivatorCreateInstance2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/activator/activatorcreateinstance2.cs137
-rw-r--r--tests/src/CoreMangLib/cti/system/argumentexception/ArgumentExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/argumentexception/argumentexceptionctor1.cs71
-rw-r--r--tests/src/CoreMangLib/cti/system/argumentnullexception/ArgumentNullExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/argumentnullexception/argumentnullexceptionctor1.cs71
-rw-r--r--tests/src/CoreMangLib/cti/system/argumentoutofrangeexception/ArgumentOutOfRangeExceptionCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/argumentoutofrangeexception/ArgumentOutOfRangeExceptionMessage.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/argumentoutofrangeexception/argumentoutofrangeexceptionctor.cs71
-rw-r--r--tests/src/CoreMangLib/cti/system/argumentoutofrangeexception/argumentoutofrangeexceptionmessage.cs186
-rw-r--r--tests/src/CoreMangLib/cti/system/arithmeticexception/ArithmeticExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/arithmeticexception/arithmeticexceptionctor1.cs71
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch1b.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch2b.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch3b.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch4b.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch5b.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayClear.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayClone.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayCopy1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayCopy2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayCopyTo.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayCreateInstance1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayCreateInstance1b.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayCreateInstance2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayCreateInstance2b.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayGetEnumerator.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayGetLength.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayGetLowerBound.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayGetUpperBound.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayGetValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayGetValue1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayGetValue2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayGetValue2b.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayICollectionget_Count.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayIListAdd.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayIListClear.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayIListContains.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayIListIndexOF.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayIListInsert.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayIListRemove.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayIListRemoveAt.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayIListget_item.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayIListset_item.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayIndexOf1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayIndexOf1b.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayIndexOf2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayIndexOf2b.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayIndexOf3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayIndexOf3b.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayIndexOf4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayIndexOf4b.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayInitialize.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf1b.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf2b.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf3b.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayLength.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayRank.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayReserse1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayReserse2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayReverse1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArrayReverse2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArraySetValue1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArraySetValue1b.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArraySetValue2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArraySetValue2b.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArraySort1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArraySort10.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArraySort11.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArraySort12.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArraySort13.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArraySort14.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArraySort1b.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArraySort2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArraySort2b.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArraySort3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArraySort3b.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArraySort4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArraySort5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArraySort6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArraySort7.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArraySort8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/ArraySort9.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraybinarysearch1.csbin0 -> 32686 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraybinarysearch1b.cs614
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraybinarysearch2.csbin0 -> 21634 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraybinarysearch2b.cs142
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraybinarysearch3.csbin0 -> 35812 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraybinarysearch3b.cs144
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraybinarysearch4.csbin0 -> 30840 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraybinarysearch4b.cs142
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraybinarysearch5.csbin0 -> 22508 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraybinarysearch5b.cs185
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraybinarysearch6.csbin0 -> 22242 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayclear.csbin0 -> 21972 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayclone.csbin0 -> 7646 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraycopy1.cs537
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraycopy2.cs597
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraycopyto.cs534
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraycreateinstance1.cs370
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraycreateinstance1b.cs169
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraycreateinstance2.cs205
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraycreateinstance2b.cs495
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraygetenumerator.cs375
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraygetlength.cs202
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraygetlowerbound.cs208
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraygetupperbound.cs215
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraygetvalue.cs160
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraygetvalue1.cs208
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraygetvalue2.cs250
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraygetvalue2b.cs126
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayicollectionget_count.cs120
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayilistadd.cs68
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayilistclear.cs175
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayilistcontains.cs136
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayilistget_item.cs180
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayilistindexof.cs129
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayilistinsert.cs69
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayilistremove.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayilistremoveat.cs74
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayilistset_item.cs186
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayindexof1.cs394
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayindexof1b.cs635
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayindexof2.cs158
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayindexof2b.cs149
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayindexof3.cs300
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayindexof3b.cs149
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayindexof4.cs376
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayindexof4b.cs234
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayinitialize.cs216
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraylastindexof1.cs469
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraylastindexof1b.cs635
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraylastindexof2.cs239
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraylastindexof2b.cs149
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraylastindexof3.cs365
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraylastindexof3b.cs149
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraylastindexof4.cs234
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraylength.cs147
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayrank.cs208
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayreserse1.cs266
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayreserse2.cs501
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayreverse1.cs125
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arrayreverse2.cs464
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraysetvalue1.cs419
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraysetvalue1b.cs126
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraysetvalue2.cs291
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraysetvalue2b.cs208
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraysort1.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraysort10.cs497
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraysort11.cs397
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraysort12.cs511
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraysort13.cs563
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraysort14.cs528
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraysort1b.cs312
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraysort2.cs185
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraysort2b.cs427
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraysort3.cs275
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraysort3b.cs570
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraysort4.cs449
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraysort5.cs557
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraysort6.cs374
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraysort7.cs425
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraysort8.cs400
-rw-r--r--tests/src/CoreMangLib/cti/system/array/arraysort9.cs470
-rw-r--r--tests/src/CoreMangLib/cti/system/arraytypemismatchexception/ArrayTypeMismatchExceptionctor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/arraytypemismatchexception/ArrayTypeMismatchExceptionctor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/arraytypemismatchexception/ArrayTypeMismatchExceptionctor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/arraytypemismatchexception/arraytypemismatchexceptionctor1.csbin0 -> 3608 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/arraytypemismatchexception/arraytypemismatchexceptionctor2.csbin0 -> 9380 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/arraytypemismatchexception/arraytypemismatchexceptionctor3.csbin0 -> 11336 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/attribute/DDB125472_GetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/attribute/GetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/attribute/ddb125472_gethashcode.cs59
-rw-r--r--tests/src/CoreMangLib/cti/system/attribute/gethashcode.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsAll.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsAssembly.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsClass.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsConstructor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsDelegate.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsEnum.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsEvent.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsField.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsGenericParameter.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsInterface.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsMethod.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsModule.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsParameter.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsProperty.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsReturnValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsStruct.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsall.csbin0 -> 4504 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsassembly.csbin0 -> 3510 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsclass.csbin0 -> 3450 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsconstructor.csbin0 -> 3570 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsdelegate.csbin0 -> 3510 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsenum.csbin0 -> 3430 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsevent.csbin0 -> 3450 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsfield.csbin0 -> 3450 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsgenericparameter.csbin0 -> 3670 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsinterface.csbin0 -> 3530 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsmethod.csbin0 -> 3470 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsmodule.csbin0 -> 3470 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsparameter.csbin0 -> 3530 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsproperty.csbin0 -> 3510 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsreturnvalue.csbin0 -> 3570 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsstruct.csbin0 -> 3470 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/attributeusageattribute/AttributeUsageAttributeAllowMultiple.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/attributeusageattribute/AttributeUsageAttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/attributeusageattribute/attributeusageattributeallowmultiple.cs96
-rw-r--r--tests/src/CoreMangLib/cti/system/attributeusageattribute/attributeusageattributector.cs487
-rw-r--r--tests/src/CoreMangLib/cti/system/badimageformatexception/BadImageFormatExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/badimageformatexception/BadImageFormatExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/badimageformatexception/BadImageFormatExceptionCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/badimageformatexception/BadImageFormatExceptionMessage.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/badimageformatexception/BadImageFormatExceptionToString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/badimageformatexception/badimageformatexceptionctor1.cs81
-rw-r--r--tests/src/CoreMangLib/cti/system/badimageformatexception/badimageformatexceptionctor2.cs120
-rw-r--r--tests/src/CoreMangLib/cti/system/badimageformatexception/badimageformatexceptionctor3.cs133
-rw-r--r--tests/src/CoreMangLib/cti/system/badimageformatexception/badimageformatexceptionmessage.cs127
-rw-r--r--tests/src/CoreMangLib/cti/system/badimageformatexception/badimageformatexceptiontostring.cs136
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanCompareTo_Boolean.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanEquals_Boolean.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanEquals_Object.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanFalseString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToBoolean.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToChar.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToDateTime.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToDecimal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToDouble.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToSByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToSingle.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToType.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToUInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToUInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToUInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanParse.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanToString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanTrueString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/BooleanTryParse.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleancompareto_boolean.cs124
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleanequals_boolean.cs125
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleanequals_object.cs228
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleanfalsestring.cs58
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleangethashcode.cs77
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletoboolean.cs81
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletobyte.cs78
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletochar.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletodatetime.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletodecimal.cs79
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletodouble.cs79
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletoint16.cs78
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletoint32.cs78
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletoint64.cs78
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletosbyte.cs78
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletosingle.cs79
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletotype.cs478
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletouint16.cs78
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletouint32.cs78
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletouint64.cs78
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleanparse.cs188
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleantostring.cs83
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleantruestring.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/boolean/booleantryparse.cs97
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteEquals1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteEquals2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToBoolean.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToChar.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToDateTime.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToDecimal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToDouble.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToSByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToSingle.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToType.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToUInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToUInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToUInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteMaxValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteMinValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteParse1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteParse3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteToString2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteToString3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteToString4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/ByteTryParse.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/byteequals1.cs170
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/byteequals2.cs171
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/bytegethashcode.cs157
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/byteiconvertibletoboolean.cs134
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/byteiconvertibletobyte.cs196
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/byteiconvertibletochar.cs196
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/byteiconvertibletodatetime.cs197
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/byteiconvertibletodecimal.cs196
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/byteiconvertibletodouble.cs198
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/byteiconvertibletoint16.cs196
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/byteiconvertibletoint32.cs196
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/byteiconvertibletoint64.cs196
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/byteiconvertibletosbyte.cs197
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/byteiconvertibletosingle.cs196
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/byteiconvertibletotype.cs561
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/byteiconvertibletouint16.cs196
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/byteiconvertibletouint32.cs197
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/byteiconvertibletouint64.cs196
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/bytemaxvalue.cs94
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/byteminvalue.cs94
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/byteparse1.cs329
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/byteparse3.cs344
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/bytetostring2.cs135
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/bytetostring3.cs120
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/bytetostring4.cs221
-rw-r--r--tests/src/CoreMangLib/cti/system/byte/bytetryparse.cs494
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharCompateTo1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharEquals1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharEquals2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIConvertibleToBoolean.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIConvertibleToByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIConvertibleToChar.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIConvertibleToDateTime.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIConvertibleToDecimal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIConvertibleToDouble.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIConvertibleToInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIConvertibleToInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIConvertibleToInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIConvertibleToSByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIConvertibleToSingle.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIConvertibleToType.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIConvertibleToUInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIConvertibleToUInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIConvertibleToUInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsControl1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsControl2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsDigit1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsDigit2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsLetter1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsLetter2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsLetterOrDigit1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsLetterOrDigit2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsLower1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsLower2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsNumber1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsNumber2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsPunctuation2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsSeparator1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsSeparator2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsSurrogate1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsSurrogate2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsSurrogatePair1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsSurrogatePair2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsSymbol1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsUpper1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsUpper2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsWhiteSpace1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharIsWhiteSpace2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharMaxValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharMinValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharToString1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharToString2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/CharTryParse.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charcompateto1.cs174
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charequals1.cs174
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charequals2.cs216
-rw-r--r--tests/src/CoreMangLib/cti/system/char/chargethashcode.cs143
-rw-r--r--tests/src/CoreMangLib/cti/system/char/chariconvertibletoboolean.cs80
-rw-r--r--tests/src/CoreMangLib/cti/system/char/chariconvertibletobyte.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/char/chariconvertibletochar.cs151
-rw-r--r--tests/src/CoreMangLib/cti/system/char/chariconvertibletodatetime.cs119
-rw-r--r--tests/src/CoreMangLib/cti/system/char/chariconvertibletodecimal.cs116
-rw-r--r--tests/src/CoreMangLib/cti/system/char/chariconvertibletodouble.cs78
-rw-r--r--tests/src/CoreMangLib/cti/system/char/chariconvertibletoint16.cs133
-rw-r--r--tests/src/CoreMangLib/cti/system/char/chariconvertibletoint32.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/char/chariconvertibletoint64.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/char/chariconvertibletosbyte.cs136
-rw-r--r--tests/src/CoreMangLib/cti/system/char/chariconvertibletosingle.cs78
-rw-r--r--tests/src/CoreMangLib/cti/system/char/chariconvertibletotype.cs675
-rw-r--r--tests/src/CoreMangLib/cti/system/char/chariconvertibletouint16.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/char/chariconvertibletouint32.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/char/chariconvertibletouint64.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/char/chariscontrol1.cs106
-rw-r--r--tests/src/CoreMangLib/cti/system/char/chariscontrol2.cs223
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charisdigit1.cs111
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charisdigit2.cs228
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charisletter1.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charisletter2.cs219
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charisletterordigit1.cs120
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charisletterordigit2.cs236
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charislower1.cs111
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charislower2.cs228
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charisnumber1.cs109
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charisnumber2.cs227
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charispunctuation2.cs221
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charisseparator1.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charisseparator2.cs221
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charissurrogate1.cs124
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charissurrogate2.cs242
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charissurrogatepair1.cs194
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charissurrogatepair2.cs310
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charissymbol1.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charisupper1.cs111
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charisupper2.cs228
-rw-r--r--tests/src/CoreMangLib/cti/system/char/chariswhitespace1.cs117
-rw-r--r--tests/src/CoreMangLib/cti/system/char/chariswhitespace2.cs234
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charmaxvalue.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/char/charminvalue.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/char/chartostring1.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/char/chartostring2.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/char/chartryparse.cs92
-rw-r--r--tests/src/CoreMangLib/cti/system/charenumerator/CharEnumeratorCurrent.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/charenumerator/CharEnumeratorIEnumeratorCurrent.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/charenumerator/CharEnumeratorIEnumgetCurrent.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/charenumerator/CharEnumeratorMoveNext.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/charenumerator/CharEnumeratorReset.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/charenumerator/charenumeratorcurrent.cs157
-rw-r--r--tests/src/CoreMangLib/cti/system/charenumerator/charenumeratorienumeratorcurrent.cs151
-rw-r--r--tests/src/CoreMangLib/cti/system/charenumerator/charenumeratorienumgetcurrent.cs154
-rw-r--r--tests/src/CoreMangLib/cti/system/charenumerator/charenumeratormovenext.cs154
-rw-r--r--tests/src/CoreMangLib/cti/system/charenumerator/charenumeratorreset.cs195
-rw-r--r--tests/src/CoreMangLib/cti/system/clscompliantattribute/CLSCompliantAttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/clscompliantattribute/CLSCompliantAttributeIsCompliant.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/clscompliantattribute/clscompliantattributector.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/clscompliantattribute/clscompliantattributeiscompliant.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/dictionaryentry/DictionaryEntryCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/dictionaryentry/DictionaryEntryKey.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/dictionaryentry/DictionaryEntryValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/dictionaryentry/dictionaryentryctor.cs211
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/dictionaryentry/dictionaryentrykey.cs130
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/dictionaryentry/dictionaryentryvalue.cs129
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/comparer/ComparerCompare1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/comparer/ComparerCompare2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/comparer/ComparerCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/comparer/ComparerDefault.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/comparer/comparercompare1.cs285
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/comparer/comparercompare2.cs345
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/comparer/comparerctor.cs92
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/comparer/comparerdefault.cs87
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryAdd.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryClear.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryComparer.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryContainsKey.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryContainsValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCount.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryGetEnumerator.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionAdd.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionContains.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionCopyTo.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionCopyTo2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionIsReadOnly.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionIsReadOnly2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionIsSynchronized.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionIsSynchronized2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionRemove.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionSyncRoot.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionSyncRoot2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryAdd.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryContains.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryGetEnumerator.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryIsFixedSize.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryIsFixedSize2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryIsReadOnly.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryIsReadOnly2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryItem.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryItem2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryKeys.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryKeys2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryKeys3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryKeys4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryRemove.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryValue2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryValue3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryValue4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryValues.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIEnumerableGetEnumerator.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIEnumerableGetEnumerator2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryRemove.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryTryGetValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryadd.cs152
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryclear.cs112
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarycomparer.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarycontainskey.cs142
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarycontainsvalue.cs170
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarycount.cs111
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor1.cs108
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor2.cs138
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor3.cs138
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor4.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor5.cs106
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor6.cs106
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarygetenumerator.cs117
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionadd.cs151
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectioncontains.cs156
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectioncopyto.cs252
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectioncopyto2.cs253
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionisreadonly.cs111
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionisreadonly2.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionissynchronized.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionissynchronized2.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionremove.cs141
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionsyncroot.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionsyncroot2.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryadd.cs155
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarycontains.cs151
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarygetenumerator.cs116
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryisfixedsize.cs109
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryisfixedsize2.cs109
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryisreadonly.cs109
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryisreadonly2.cs109
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryitem.cs223
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryitem2.cs223
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarykeys.cs117
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarykeys2.cs116
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarykeys3.cs116
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarykeys4.cs116
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryremove.cs149
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryvalue2.cs116
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryvalue3.cs116
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryvalue4.cs116
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryvalues.cs117
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryienumerablegetenumerator.cs129
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryienumerablegetenumerator2.cs131
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryremove.cs156
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarytrygetvalue.cs119
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictEnumIDictEnumget_Entry.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictEnumIDictEnumget_Key.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictEnumIDictEnumget_Value.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictEnumIEnumReset.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictEnumIEnumget_Current.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictionaryEnumeratorCurrent.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictionaryEnumeratorDispose.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictionaryEnumeratorMoveNext.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratorcurrent.cs154
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratordispose.cs87
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratoridictionaryenumeratorget_entry.cs157
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratoridictionaryenumeratorget_key.cs157
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratoridictionaryenumeratorget_value.cs157
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratorienumeratorget_current.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratorienumeratorreset.cs124
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratormovenext.cs145
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/GenericICollectionRemove.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/ICollectionIsSynchronized.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/ICollectionSyncRoot.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/IEnumerableGetEnumerator.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/KeyCollectionCopyTo.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/KeyCollectionCount.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/KeyCollectionCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/KeyCollectionGetEnumerator.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollGenICollIsReadOnly.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollGenIEnumGetEnumerator.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollGenericICollClear.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollGenericICollContains.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollGenericICollectionAdd.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollectionsICollectionCopyTo.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/keycollectioncopyto.cs229
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/keycollectioncount.cs84
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/keycollectionctor.cs107
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/keycollectiongetenumerator.cs101
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericicollectionadd.cs58
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericicollectionclear.cs60
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericicollectioncontains.cs90
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericicollectionisreadonly.cs84
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericicollectionremove.cs59
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericienumerablegetenumerator.cs101
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsicollectioncopyto.cs276
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsicollectionissynchronized.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsicollectionsyncroot.cs87
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsienumerablegetenumerator.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/DictionaryValueCollectionCopyTo.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/DictionaryValueCollectionCount.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/DictionaryValueCollectionctor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/GenericICollectionIsReadOnly.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/GenericICollectionRemove.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/GetEnumerator.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/ICollectionIsSynchronized.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/IEnumerableGetEnumerator.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/SystemCollICollectionSyncRoot.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/SystemCollectionsICollectionCopyTo.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/ValueCollGenericICollAdd.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/ValueCollGenericICollClear.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/ValueCollGenericICollContains.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/ValueCollGenericIEnumGetEnumerator.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/dictionaryvaluecollectioncopyto.cs229
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/dictionaryvaluecollectioncount.cs84
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/dictionaryvaluecollectionctor.cs107
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/dictionaryvaluecollectiongetenumerator.cs101
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/systemcollectionsicollectioncopyto.cs276
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/systemcollectionsicollectionissynchronized.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/systemcollectionsicollectionsyncroot.cs87
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericicollectionadd.cs58
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericicollectionclear.cs60
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericicollectioncontains.cs90
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericicollectionisreadonly.cs84
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericicollectionremove.cs59
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericienumerablegetenumerator.cs101
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectionienumerablegetenumerator.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryKeyCollectionEnumeratorCurrent.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryKeyCollectionEnumeratorDispose.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryKeyCollectionEnumeratorMoveNext.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryValueCollectionEnumeratorCurrent.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryValueCollectionEnumeratorDispose.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryValueCollectionEnumeratorMoveNext.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/KeyCollectionEnumeratorIEnumeratorCurrent.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/KeyCollectionEnumeratorIEnumeratorReset.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/ValueCollectionEnumeratorIEnumeratorCurrent.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/ValueCollectionEnumeratorIEnumeratorReset.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionarykeycollectionenumeratorcurrent.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionarykeycollectionenumeratordispose.cs58
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionarykeycollectionenumeratormovenext.cs90
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionaryvaluecollectionenumeratorcurrent.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionaryvaluecollectionenumeratordispose.cs58
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionaryvaluecollectionenumeratormovenext.cs90
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/keycollectionenumeratorienumeratorcurrent.cs94
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/keycollectionenumeratorienumeratorreset.cs124
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/valuecollectionenumeratorienumeratorcurrent.cs94
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/valuecollectionenumeratorienumeratorreset.cs124
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/DictionaryValueCollectionEnumeratorCurrent.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/DictionaryValueCollectionEnumeratorDispose.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/DictionaryValueCollectionEnumeratorMoveNext.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/ValueCollectionEnumeratorIEnumeratorCurrent.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/ValueCollectionEnumeratorIEnumeratorReset.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/dictionaryvaluecollectionenumeratorcurrent.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/dictionaryvaluecollectionenumeratordispose.cs58
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/dictionaryvaluecollectionenumeratormovenext.cs90
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/valuecollectionenumeratorienumeratorcurrent.cs94
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/valuecollectionenumeratorienumeratorreset.cs124
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/EqualityComparerEquals.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/EqualityComparerGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/EqulityComparerDefault.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/equalitycomparerequals.cs233
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/equalitycomparergethashcode.cs201
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/equlitycomparerdefault.cs186
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionAdd.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionClear.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionContains.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionCopyTo.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionCount.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionIsReadOnly.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionRemove.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectionadd.cs253
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectionclear.cs318
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectioncontains.cs376
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectioncopyto.cs527
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectioncount.cs273
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectionisreadonly.cs235
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectionremove.cs351
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/idictionary/IDictionaryContainsKey.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/idictionary/IDictionaryItem.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/idictionary/IDictionaryKeys.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/idictionary/IDictionaryTryGetValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/idictionary/IDictionaryValues.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/idictionary/idictionarycontainskey.cs435
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/idictionary/idictionaryitem.cs505
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/idictionary/idictionarykeys.cs215
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/idictionary/idictionarytrygetvalue.cs530
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/idictionary/idictionaryvalues.cs214
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/ienumerable/IEnumerableGetEnumerator.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/ienumerable/ienumerablegetenumerator.cs332
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/ienumerator/IEnumeratorCurrent.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/ienumerator/ienumeratorcurrent.cs283
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/iequalitycomparer/IEqualityComparerEquals.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/iequalitycomparer/IEqualityComparerGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/iequalitycomparer/iequalitycomparerequals.cs243
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/iequalitycomparer/iequalitycomparergethashcode.cs237
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/ilist/IListIndexOf.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/ilist/IListInsert.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/ilist/IListItem.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/ilist/IListRemoveAt.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/ilist/ilistindexof.csbin0 -> 11050 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/ilist/ilistinsert.csbin0 -> 17514 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/ilist/ilistitem.csbin0 -> 19562 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/ilist/ilistremoveat.csbin0 -> 19086 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/keynotfoundexception/KeyNotFoundExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/keynotfoundexception/KeyNotFoundExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/keynotfoundexception/keynotfoundexceptionctor1.csbin0 -> 3524 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/keynotfoundexception/keynotfoundexceptionctor2.csbin0 -> 6332 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/KeyValuePairKey.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/KeyValuePairToString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/KeyValuePairValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/KeyValuePairctor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/keyvaluepairctor.csbin0 -> 11522 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/keyvaluepairkey.csbin0 -> 9450 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/keyvaluepairtostring.csbin0 -> 10214 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/keyvaluepairvalue.csbin0 -> 9508 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/BinarySearch1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/BinarySearch2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/BinarySearch3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/CopyTo1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/CopyTo2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/CopyTo3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListAdd.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListAddRange.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListCapacity.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListClear.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListContains.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListCount.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListForEach.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListGetEnumerator.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListGetRange.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListICollectionCopyTo.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListICollectionIsReadOnly.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListICollectionIsSynchronized.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListICollectionSyncRoot.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListIEnumerableGetEnumerator.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListIEnumerableGetEnumerator2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListAdd.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListContains.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListIndexOf.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListInsert.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListIsFixedSize.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListIsReadOnly.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListItem.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListRemove.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListIndexOf1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListIndexOf2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListIndexOf3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListInsertRange.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListLastIndexOf1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListLastIndexOf2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListLastIndexOf3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListRemoveAt.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListRemoveRange.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListReverse.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListReverse2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListToArray.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/ListTrimExcess.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/binarysearch1.cs256
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/binarysearch2.cs378
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/binarysearch3.cs471
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/copyto1.cs200
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/copyto2.cs335
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/copyto3.cs391
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listadd.cs170
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listaddrange.cs174
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listcapacity.csbin0 -> 9704 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listclear.cs180
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listcontains.cs204
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listcount.csbin0 -> 5714 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listctor1.cs125
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listctor2.cs205
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listctor3.cs170
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listforeach.cs195
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listgetenumerator.cs175
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listgetrange.cs290
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listicollectioncopyto.cs341
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listicollectionisreadonly.csbin0 -> 8714 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listicollectionissynchronized.csbin0 -> 4720 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listicollectionsyncroot.csbin0 -> 4656 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listienumerablegetenumerator.csbin0 -> 7456 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listienumerablegetenumerator2.csbin0 -> 7476 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listilistadd.csbin0 -> 9372 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listilistcontains.csbin0 -> 6428 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listilistindexof.csbin0 -> 9638 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listilistinsert.csbin0 -> 12346 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listilistisfixedsize.csbin0 -> 4506 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listilistisreadonly.csbin0 -> 4484 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listilistitem.csbin0 -> 10644 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listilistremove.csbin0 -> 6470 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listindexof1.cs213
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listindexof2.cs270
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listindexof3.cs298
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listinsertrange.cs.cs305
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listlastindexof1.cs240
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listlastindexof2.cs270
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listlastindexof3.cs298
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listremoveat.cs225
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listremoverange.cs226
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listreverse.cs189
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listreverse2.cs287
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listtoarray.csbin0 -> 6622 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/list/listtrimexcess.csbin0 -> 7948 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueClear.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueContains.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueCopyTo.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueCount.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueDequeue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueEnqueue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueGetEnumerator.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/QueuePeek.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueToArray.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/queueclear.cs95
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/queuecontains.cs69
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/queuecopyto.cs252
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/queuecount.cs93
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/queuector1.cs66
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/queuector2.cs161
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/queuector3.cs182
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/queuedequeue.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/queueenqueue.cs69
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/queuegetenumerator.cs125
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/queuepeek.cs98
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queue/queuetoarray.cs100
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/EnumeratorCurrent.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/EnumeratorDispose.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/EnumeratorMoveNext.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/enumeratorcurrent.cs228
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/enumeratordispose.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/enumeratormovenext.cs228
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/StackClear.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/StackContains.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/StackCopyTo.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/StackCount.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/StackCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/StackCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/StackCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/StackGetEnumerator.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/StackPeek.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/StackPop.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/StackPush.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/StackToArray.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/stackclear.cs118
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/stackcontains.cs385
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/stackcopyto.cs318
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/stackcount.cs135
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/stackctor1.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/stackctor2.cs142
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/stackctor3.cs205
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/stackgetenumerator.cs142
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/stackpeek.cs142
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/stackpop.cs141
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/stackpush.cs177
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stack/stacktoarray.cs154
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/StackEnumeratorCurrent.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/StackEnumeratorDispose.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/StackEnumeratorMoveNext.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/stackenumeratorcurrent.cs219
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/stackenumeratordispose.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/stackenumeratormovenext.cs183
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/icollection/ICollectionCopyTo.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/icollection/ICollectionCount.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/icollection/ICollectionIsSynchronized.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/icollection/ICollectionSyncRoot.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/icollection/icollectioncopyto.cs389
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/icollection/icollectioncount.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/icollection/icollectionissynchronized.cs172
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/icollection/icollectionsyncroot.cs143
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/icomparer/IComparerCompare.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/icomparer/icomparercompare.cs281
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryAdd.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryClear.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryContains.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryGetEnumerator.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryIsFixedSize.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryIsReadOnly.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryRemove.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/idictionary/idictionaryadd.cs464
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/idictionary/idictionaryclear.cs258
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/idictionary/idictionarycontains.cs216
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/idictionary/idictionarygetenumerator.cs100
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/idictionary/idictionaryisfixedsize.cs220
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/idictionary/idictionaryisreadonly.cs220
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/idictionary/idictionaryremove.cs318
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/ienumerator/IEnumeratorCurrent.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/ienumerator/IEnumeratorMoveNext.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/ienumerator/IEnumeratorReset.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/ienumerator/ienumeratorcurrent.cs151
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/ienumerator/ienumeratormovenext.cs147
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/ienumerator/ienumeratorreset.cs192
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/ilist/IListIsFixedSize.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/ilist/IListItem.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/ilist/ilistisfixedsize.cs98
-rw-r--r--tests/src/CoreMangLib/cti/system/collections/ilist/ilistitem.cs140
-rw-r--r--tests/src/CoreMangLib/cti/system/comparison/ComparisonBeginInvoke.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/comparison/ComparisonEndInvoke.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/comparison/ComparisonInvoke.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/comparison/comparisonbegininvoke.cs96
-rw-r--r--tests/src/CoreMangLib/cti/system/comparison/comparisonendinvoke.cs98
-rw-r--r--tests/src/CoreMangLib/cti/system/comparison/comparisoninvoke.cs186
-rw-r--r--tests/src/CoreMangLib/cti/system/console/ConsoleSetOut_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/console/consoleseterror.cs125
-rw-r--r--tests/src/CoreMangLib/cti/system/console/consoleseterror_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/console/consolesetout.cs125
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertChangeType2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertFromBase64CharArray.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertFromBase64String.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToBase64CharArray.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToBase64String1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToBase64String2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean7.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToByte1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToByte2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToByte3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToByte4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToByte6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToByte7.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToByte8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToChar.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToChar10.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToChar11.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToChar12.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToChar13.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToChar14.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToChar15.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToChar16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToChar5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToChar6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToChar7.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToChar8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToChar9.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDateTime.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal10.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal11.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal12.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal13.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal14.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal15.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal17.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal18.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal9.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDouble.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDouble10.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDouble11.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDouble12.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDouble13.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDouble14.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDouble15.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDouble16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDouble17.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDouble5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDouble6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDouble7.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDouble8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToDouble9.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_10.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_11.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_17.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_18.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_7.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_9.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_10.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_11.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_17.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_18.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_7.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_9.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_10.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_11.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_17.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_18.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_7.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_9.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToSByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToSByte1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToSByte10.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToSByte11.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToSByte16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToSByte2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToSByte3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToSByte4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToSByte5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToSByte6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToSByte7.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToSByte8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToSByte9.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToSingle.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToSingle13.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToSingle14.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToSingle15.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToSingle16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToSingle17.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString10.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString11.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString12.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString13.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString14.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString15.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString17.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString18.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString19.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString20.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString21.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString22.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString23.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString24.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString25.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString28.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString29.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString30.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString31.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString33.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString7.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToString9.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt161.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1610.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1611.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1612.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1613.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1614.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1615.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1616.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1617.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1618.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt162.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt163.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt164.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt165.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt166.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt167.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt168.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt169.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt321.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3210.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3211.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3212.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3213.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3215.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3216.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3217.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3218.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3219.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt322.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt323.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt324.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt325.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt326.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt327.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt328.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt329.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt641.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6410.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6411.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6412.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6413.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6414.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6415.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6416.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6417.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6418.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt642.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt643.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt644.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt645.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt646.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt647.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt648.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/ConvertToUInt649.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/convertchangetype2.cs293
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/convertfrombase64chararray.cs310
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/convertfrombase64string.cs123
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttobase64chararray.cs148
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttobase64string1.cs136
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttobase64string2.cs128
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoboolean.cs127
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoboolean2.cs149
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoboolean4.cs221
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoboolean5.cs365
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoboolean6.cs222
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoboolean7.cs221
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoboolean8.cs221
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttobyte.cs197
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttobyte1.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttobyte2.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttobyte3.cs110
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttobyte4.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttobyte6.cs140
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttobyte7.cs140
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttobyte8.cs140
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttochar.cs125
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttochar10.cs189
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttochar11.cs77
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttochar12.cs190
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttochar13.cs190
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttochar14.cs149
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttochar15.cs190
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttochar16.cs210
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttochar5.cs189
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttochar6.cs225
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttochar7.cs225
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttochar8.cs399
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttochar9.cs407
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodatetime.cs128
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodecimal.cs174
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodecimal1.cs145
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodecimal10.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodecimal11.cs144
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodecimal12.cs144
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodecimal13.cs144
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodecimal14.cs301
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodecimal15.cs344
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodecimal16.cs144
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodecimal17.cs124
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodecimal18.cs142
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodecimal2.cs145
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodecimal5.cs98
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodecimal6.cs144
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodecimal8.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodecimal9.cs156
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodouble.cs181
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodouble10.cs305
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodouble11.cs177
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodouble12.cs168
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodouble13.cs290
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodouble14.cs336
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodouble15.cs136
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodouble16.cs136
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodouble17.cs157
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodouble5.cs264
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodouble6.cs168
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodouble7.cs168
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodouble8.cs168
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttodouble9.cs259
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint16.cs199
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint16_1.cs138
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint16_10.cs282
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint16_11.cs113
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint16_16.cs111
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint16_17.cs111
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint16_18.cs142
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint16_2.cs167
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint16_3.cs177
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint16_4.cs277
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint16_5.cs267
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint16_6.cs176
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint16_7.cs232
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint16_8.cs232
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint16_9.cs304
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint32.cs144
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint32_1.cs138
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint32_10.cs281
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint32_11.cs113
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint32_16.cs81
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint32_17.cs111
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint32_18.cs112
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint32_2.cs167
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint32_3.cs170
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint32_4.cs278
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint32_5.cs273
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint32_6.cs203
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint32_7.cs118
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint32_8.cs151
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint32_9.cs304
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint64.cs131
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint64_1.cs134
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint64_10.cs281
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint64_11.cs113
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint64_16.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint64_17.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint64_18.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint64_2.cs167
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint64_3.cs139
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint64_4.cs277
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint64_5.cs274
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint64_6.cs203
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint64_7.cs118
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint64_8.cs118
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttoint64_9.cs304
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttosbyte.cs186
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttosbyte1.cs98
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttosbyte10.cs277
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttosbyte11.cs143
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttosbyte16.cs172
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttosbyte2.cs172
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttosbyte3.cs172
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttosbyte4.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttosbyte5.cs288
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttosbyte6.cs199
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttosbyte7.cs199
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttosbyte8.cs200
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttosbyte9.cs232
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttosingle.cs168
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttosingle13.cs356
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttosingle14.cs337
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttosingle15.cs191
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttosingle16.cs191
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttosingle17.cs193
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring1.cs139
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring10.cs355
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring11.cs318
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring12.cs316
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring13.cs164
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring14.cs278
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring15.cs323
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring16.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring17.cs273
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring18.cs320
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring19.cs144
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring2.cs177
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring20.cs250
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring21.cs320
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring22.cs205
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring23.cs202
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring24.cs144
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring25.cs177
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring28.cs144
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring29.cs148
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring30.cs144
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring31.cs149
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring32.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring33.cs168
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring4.cs287
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring5.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring6.cs149
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring7.cs141
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring8.cs240
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttostring9.cs223
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint16.cs194
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint161.cs79
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint1610.cs125
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint1611.cs125
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint1612.cs125
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint1613.cs263
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint1614.cs282
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint1615.cs175
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint1616.cs254
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint1617.cs322
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint1618.cs279
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint162.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint163.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint164.cs167
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint165.cs167
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint166.cs125
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint167.cs145
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint168.cs145
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint169.cs124
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint32.cs139
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint321.cs78
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint3210.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint3211.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint3212.cs125
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint3213.cs125
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint3215.cs263
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint3216.cs282
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint3217.cs253
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint3218.cs278
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint3219.cs321
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint322.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint323.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint324.cs167
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint325.cs167
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint326.cs56
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint327.cs125
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint328.cs125
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint329.cs145
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint64.cs126
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint641.cs78
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint6410.cs125
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint6411.cs124
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint6412.cs124
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint6413.cs174
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint6414.cs244
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint6415.cs281
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint6416.cs252
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint6417.cs277
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint6418.cs320
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint642.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint643.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint644.cs124
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint645.cs124
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint646.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint647.cs167
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint648.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/convert/converttouint649.cs124
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeCompare.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeCompareTo1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeCtor4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeCtor6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeCtor7.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeDate.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeHour.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeKind.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeMaxValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeMillisecond.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeMinValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeMinute.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeNow.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeParse1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeParse2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeParse3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeParseExact1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeParseExact2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeParseExact3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeSecond.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeSubtract1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeSubtract2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeTicks.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeTimeOfDay.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeToFileTime.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeToFileTimeUtc.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeToLocalTime.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeToString1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeToString2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeToString3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimeUtcNow.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/DateTimetoday.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/cfdatetimetools.cs142
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimecompare.cs250
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimecompareto1.cs250
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimector1.cs342
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimector3.cs521
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimector4.cs638
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimector6.cs570
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimector7.cs689
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimedate.cs144
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimegethashcode.cs141
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimehour.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimekind.cs221
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimemaxvalue.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimemillisecond.cs124
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimeminute.cs95
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimeminvalue.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimenow.cs93
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimeparse1.cs830
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimeparse2.cs216
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimeparse3.cs274
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimeparseexact1.cs964
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimeparseexact2.cs285
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimeparseexact3.cs318
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimesecond.cs98
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimesubtract1.cs205
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimesubtract2.cs225
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimeticks.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimetimeofday.cs98
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimetoday.cs95
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimetofiletime.cs126
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimetofiletimeutc.cs126
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimetolocaltime.cs66
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimetostring1.cs122
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimetostring2.cs118
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimetostring3.cs588
-rw-r--r--tests/src/CoreMangLib/cti/system/datetime/datetimeutcnow.cs93
-rw-r--r--tests/src/CoreMangLib/cti/system/datetimekind/DateTimeKindLocal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetimekind/DateTimeKindUnspecified.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetimekind/DateTimeKindUtc.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/datetimekind/datetimekindlocal.cs69
-rw-r--r--tests/src/CoreMangLib/cti/system/datetimekind/datetimekindunspecified.cs69
-rw-r--r--tests/src/CoreMangLib/cti/system/datetimekind/datetimekindutc.cs69
-rw-r--r--tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekFriday.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekMonday.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekSaturday.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekSunday.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekThursday.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekTuesDay.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekWednesday.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/dayofweek/dayofweekfriday.cs67
-rw-r--r--tests/src/CoreMangLib/cti/system/dayofweek/dayofweekmonday.cs67
-rw-r--r--tests/src/CoreMangLib/cti/system/dayofweek/dayofweeksaturday.cs67
-rw-r--r--tests/src/CoreMangLib/cti/system/dayofweek/dayofweeksunday.cs67
-rw-r--r--tests/src/CoreMangLib/cti/system/dayofweek/dayofweekthursday.cs67
-rw-r--r--tests/src/CoreMangLib/cti/system/dayofweek/dayofweektuesday.cs67
-rw-r--r--tests/src/CoreMangLib/cti/system/dayofweek/dayofweekwednesday.cs67
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimaFloor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalAdd.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalCompare.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalCtor4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalCtor5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalCtor6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalCtor7.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalCtor8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalDivide.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalEquals1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalEquals2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalEquals3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalGetBits.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalMaxValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalMinValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalMinusOne.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalMultiply.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalNegate.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalOne.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalParse.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalParse2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalParse3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalParse4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalRemainder.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalSubtract.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalToBoolean.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalToByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalToByte1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalToChar.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalToDateTime.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalToDecimal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalToDouble.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalToInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalToInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalToInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalToSByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalToSingle.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalToString1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalToString2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalToString3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalToString4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalToUInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalToUInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalToUInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalTruncate.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalTryParse.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/DecimalZero.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimafloor.cs197
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimaladd.cs205
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalcompare.cs282
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalctor1.cs263
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalctor2.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalctor3.cs275
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalctor4.cs206
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalctor5.cs179
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalctor6.cs308
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalctor7.cs133
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalctor8.cs135
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimaldivide.cs249
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalequals1.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalequals2.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalequals3.cs169
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalgetbits.csbin0 -> 10754 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalmaxvalue.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalminusone.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalminvalue.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalmultiply.csbin0 -> 9986 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalnegate.cs108
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalone.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalparse.cs171
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalparse2.cs414
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalparse3.cs417
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalparse4.cs292
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalremainder.csbin0 -> 8530 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalsubtract.csbin0 -> 12112 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimaltoboolean.cs212
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimaltobyte.cs200
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimaltobyte1.cs197
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimaltochar.csbin0 -> 3590 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimaltodatetime.csbin0 -> 3648 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimaltodecimal.cs160
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimaltodouble.cs112
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimaltoint16.cs172
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimaltoint32.cs172
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimaltoint64.cs172
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimaltosbyte.cs174
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimaltosingle.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimaltostring1.cs154
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimaltostring2.cs154
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimaltostring3.cs195
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimaltostring4.cs209
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimaltouint16.cs137
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimaltouint32.cs137
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimaltouint64.cs137
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimaltruncate.cs125
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimaltryparse.cs839
-rw-r--r--tests/src/CoreMangLib/cti/system/decimal/decimalzero.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/delegate/DelegateABI.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/delegate/DelegateCombine1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/delegate/DelegateCombineImpl.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/delegate/DelegateEquals1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/delegate/DelegateGetHashCode1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/delegate/DelegateGetInvocationList1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/delegate/DelegateRemove.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/delegate/TestForOtherAssembly.csproj44
-rw-r--r--tests/src/CoreMangLib/cti/system/delegate/delegateRemoveImpl.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/delegate/delegateabi.cs68
-rw-r--r--tests/src/CoreMangLib/cti/system/delegate/delegatecombine1.cs272
-rw-r--r--tests/src/CoreMangLib/cti/system/delegate/delegatecombineimpl.cs290
-rw-r--r--tests/src/CoreMangLib/cti/system/delegate/delegateequals1.csbin0 -> 23538 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/delegate/delegategethashcode1.csbin0 -> 25374 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/delegate/delegategetinvocationlist1.csbin0 -> 19234 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/delegate/delegateremove.csbin0 -> 27380 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/delegate/delegateremoveimpl.csbin0 -> 23370 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/delegate/testforotherassembly.cs23
-rw-r--r--tests/src/CoreMangLib/cti/system/diagnostics/conditionalattribute/ConditionalAttributeConditionString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/diagnostics/conditionalattribute/ConditionalAttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/diagnostics/conditionalattribute/conditionalattributeconditionstring.cs152
-rw-r--r--tests/src/CoreMangLib/cti/system/diagnostics/conditionalattribute/conditionalattributector.cs140
-rw-r--r--tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/DebuggingModesDefault.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/DebuggingModesDisableOptimizations.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/DebuggingModesEnableEditAndContinue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/DebuggingModesIgnoreSymbolStoreSequencePoints.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/DebuggingModesNone.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/debuggingmodesdefault.cs92
-rw-r--r--tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/debuggingmodesdisableoptimizations.cs92
-rw-r--r--tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/debuggingmodesenableeditandcontinue.cs92
-rw-r--r--tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/debuggingmodesignoresymbolstoresequencepoints.cs92
-rw-r--r--tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/debuggingmodesnone.cs92
-rw-r--r--tests/src/CoreMangLib/cti/system/dividebyzeroexception/DivideByZeroExceptionCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/dividebyzeroexception/DivideByZeroExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/dividebyzeroexception/DivideByZeroExceptionCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/dividebyzeroexception/dividebyzeroexceptionctor.cs93
-rw-r--r--tests/src/CoreMangLib/cti/system/dividebyzeroexception/dividebyzeroexceptionctor2.cs194
-rw-r--r--tests/src/CoreMangLib/cti/system/dividebyzeroexception/dividebyzeroexceptionctor3.cs194
-rw-r--r--tests/src/CoreMangLib/cti/system/dllnotfoundexception/DllNotFoundException1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/dllnotfoundexception/DllNotFoundExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/dllnotfoundexception/DllNotFoundExceptionCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/dllnotfoundexception/dllnotfoundexception1.cs63
-rw-r--r--tests/src/CoreMangLib/cti/system/dllnotfoundexception/dllnotfoundexceptionctor2.cs188
-rw-r--r--tests/src/CoreMangLib/cti/system/dllnotfoundexception/dllnotfoundexceptionctor3.cs187
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleCompareTo1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleEpsilon.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleEquals1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleEquals2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToBoolean.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToDateTime.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToDecimal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToDouble.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToSByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToSingle.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleIsInfinity.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleIsNaN.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleIsNegativeInfinity.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleIsPositiveInfinity.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleMaxValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleMinValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleNaN.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleNegativeInfinity.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleParse3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoublePositiveInfinity.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleToString1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleToString2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleToString3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleToString4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/DoubleTryParse.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doublecompareto1.cs260
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubleepsilon.cs63
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubleequals1.cs108
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubleequals2.cs109
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doublegethashcode.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubleiconvertibletoboolean.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubleiconvertibletobyte.cs255
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubleiconvertibletodatetime.cs70
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubleiconvertibletodecimal.cs168
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubleiconvertibletodouble.cs188
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubleiconvertibletoint16.cs221
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubleiconvertibletoint32.cs221
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubleiconvertibletoint64.cs162
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubleiconvertibletosbyte.cs221
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubleiconvertibletosingle.cs219
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubleisinfinity.cs186
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubleisnan.cs130
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubleisnegativeinfinity.cs162
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubleispositiveinfinity.cs161
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doublemaxvalue.cs63
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubleminvalue.cs66
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doublenan.cs63
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doublenegativeinfinity.cs88
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubleparse3.cs612
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doublepositiveinfinity.cs88
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubletostring1.cs93
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubletostring2.cs160
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubletostring3.cs141
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubletostring4.cs135
-rw-r--r--tests/src/CoreMangLib/cti/system/double/doubletryparse.cs606
-rw-r--r--tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToSingle.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToType.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToUint16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToUint32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToUint64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/enum/EnumIsDefined.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/enum/EnumToObjectb.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/enum/EnumToString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/enum/EnumToString3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/enum/enumiconvertibletoint64.cs194
-rw-r--r--tests/src/CoreMangLib/cti/system/enum/enumiconvertibletosingle.cs223
-rw-r--r--tests/src/CoreMangLib/cti/system/enum/enumiconvertibletotype.cs253
-rw-r--r--tests/src/CoreMangLib/cti/system/enum/enumiconvertibletouint16.cs225
-rw-r--r--tests/src/CoreMangLib/cti/system/enum/enumiconvertibletouint32.cs224
-rw-r--r--tests/src/CoreMangLib/cti/system/enum/enumiconvertibletouint64.cs196
-rw-r--r--tests/src/CoreMangLib/cti/system/enum/enumisdefined.cs389
-rw-r--r--tests/src/CoreMangLib/cti/system/enum/enumtoobjectb.cs263
-rw-r--r--tests/src/CoreMangLib/cti/system/enum/enumtostring.csbin0 -> 14326 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/enum/enumtostring3.cs250
-rw-r--r--tests/src/CoreMangLib/cti/system/environment/EnvironmentNewLine.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/environment/environmentnewline.cs68
-rw-r--r--tests/src/CoreMangLib/cti/system/eventargs/EventArgsctor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/eventargs/eventargsctor.cs62
-rw-r--r--tests/src/CoreMangLib/cti/system/eventhandler/EventHandlerInvoke.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/eventhandler/eventhandlerinvoke.cs184
-rw-r--r--tests/src/CoreMangLib/cti/system/eventhandler_generic/EventHandlerBeginInvoke.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/eventhandler_generic/EventHandlerCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/eventhandler_generic/EventHandlerEndInvoke.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/eventhandler_generic/EventHandlerInvoke.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/eventhandler_generic/eventhandlerbegininvoke.cs130
-rw-r--r--tests/src/CoreMangLib/cti/system/eventhandler_generic/eventhandlerctor.cs130
-rw-r--r--tests/src/CoreMangLib/cti/system/eventhandler_generic/eventhandlerendinvoke.cs133
-rw-r--r--tests/src/CoreMangLib/cti/system/eventhandler_generic/eventhandlerinvoke.cs127
-rw-r--r--tests/src/CoreMangLib/cti/system/exception/ExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/exception/ExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/exception/ExceptionCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/exception/ExceptionGetBaseException.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/exception/exceptionctor1.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/exception/exceptionctor2.cs170
-rw-r--r--tests/src/CoreMangLib/cti/system/exception/exceptionctor3.cs262
-rw-r--r--tests/src/CoreMangLib/cti/system/exception/exceptiongetbaseexception.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/flagsattribute/FlagsAttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/flagsattribute/flagsattributector.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/formatexception/FormatExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/formatexception/FormatExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/formatexception/FormatExceptionCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/formatexception/formatexceptionctor1.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/formatexception/formatexceptionctor2.cs147
-rw-r--r--tests/src/CoreMangLib/cti/system/formatexception/formatexceptionctor3.cs154
-rw-r--r--tests/src/CoreMangLib/cti/system/gc/GCCollect.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/gc/GCGetTotalMemory.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/gc/GCKeepAlive.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/gc/GCMaxGeneration.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/gc/GCReRegisterForFinalize.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/gc/GCSuppressFinalize.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/gc/GCWaitForPendingFinalizers.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/gc/gccollect.cs101
-rw-r--r--tests/src/CoreMangLib/cti/system/gc/gcgettotalmemory.cs97
-rw-r--r--tests/src/CoreMangLib/cti/system/gc/gckeepalive.cs86
-rw-r--r--tests/src/CoreMangLib/cti/system/gc/gcmaxgeneration.cs71
-rw-r--r--tests/src/CoreMangLib/cti/system/gc/gcreregisterforfinalize.cs190
-rw-r--r--tests/src/CoreMangLib/cti/system/gc/gcsuppressfinalize.cs169
-rw-r--r--tests/src/CoreMangLib/cti/system/gc/gcwaitforpendingfinalizers.cs98
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/CalendarWeekRuleFirstDay.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/CalendarWeekRuleFirstFourDayWeek.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/CalendarWeekRuleFirstFullWeek.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/calendarweekrulefirstday.cs70
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/calendarweekrulefirstfourdayweek.cs70
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/calendarweekrulefirstfullweek.cs70
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/CharUnicodeInfoGetNumericValue1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/CharUnicodeInfoGetNumericValue2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/CharUnicodeInfoGetUnicodeCategory1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/CharUnicodeInfoGetUnicodeCategory2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/charunicodeinfogetnumericvalue1.cs226
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/charunicodeinfogetnumericvalue2.cs310
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/charunicodeinfogetunicodecategory1.cs944
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/charunicodeinfogetunicodecategory2.cs1040
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/compareinfo/CompareInfoCompare2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/compareinfo/CompareInfoIndexOf2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/compareinfo/compareinfocompare2.cs218
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/compareinfo/compareinfoindexof2.cs185
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsIgnoreCase.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsIgnoreKanaType.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsIgnoreNonSpace.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsIgnoreSymbols.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsIgnoreWidth.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsNone.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsOrdinal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsOrdinalIgoreCase.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsStringSort.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsignorecase.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsignorekanatype.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsignorenonspace.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsignoresymbols.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsignorewidth.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsnone.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsordinal.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsordinaligorecase.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsstringsort.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoClone.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoEnglishName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoEquals.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoGetCultureInfo2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoInvariantCulture.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoIsNeutralCulture.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoNativeName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoParent.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoReadOnly.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoTextInfo.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoToString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoTwoLetterISOLanguageName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoclone.csbin0 -> 7244 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoenglishname.csbin0 -> 3738 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoequals.csbin0 -> 15856 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfogetcultureinfo2.csbin0 -> 15566 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfogethashcode.csbin0 -> 10202 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoinvariantculture.csbin0 -> 3866 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoisneutralculture.csbin0 -> 7066 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoname.csbin0 -> 3724 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfonativename.csbin0 -> 3844 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoparent.csbin0 -> 8140 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinforeadonly.csbin0 -> 9148 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfotextinfo.csbin0 -> 7212 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfotostring.csbin0 -> 7288 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfotwoletterisolanguagename.csbin0 -> 8410 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoClone.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoCurrentInfo.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoGetAbbreviatedMonthName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoGetFormat.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoGetInstance.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoGetMonthName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoInvariantInfo.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoIsReadOnly.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoRFC1123Pattern.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoReadOnly.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoSortableDateTimePattern.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/UniversalSortableDateTimePattern.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfoclone.cs239
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfocurrentinfo.cs70
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfogetabbreviatedmonthname.cs277
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfogetformat.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfogetinstance.cs195
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfogetmonthname.cs277
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfoinvariantinfo.cs70
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfoisreadonly.cs122
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinforeadonly.cs131
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinforfc1123pattern.cs92
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfosortabledatetimepattern.cs93
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfouniversalsortabledatetimepattern.cs93
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStyleAllowInnerWhite.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAdjustToUniversal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAllowLeadingWhite.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAllowTrailingWhite.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAllowWhiteSpaces.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAssumeLocal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAssumeUniversal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesNoCurrentDateDefault.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesNone.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesRoundTripKind.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestyleallowinnerwhite.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesadjusttouniversal.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesallowleadingwhite.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesallowtrailingwhite.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesallowwhitespaces.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesassumelocal.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesassumeuniversal.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesnocurrentdatedefault.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesnone.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesroundtripkind.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoClone.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoCurrencyDecimalSeparator.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoCurrencyGroupSeparator.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoGetFormat.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoGetInstance.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoReadOnly.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfoclone.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfoctor.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfocurrencydecimalseparator.cs193
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfocurrencygroupseparator.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfogetformat.cs137
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfogetinstance.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinforeadonly.cs107
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowCurrencySymbol.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowDecimalPoint.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowExponent.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowHexSpecifier.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowLeadingSign.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowLeadingWhite.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowParentheses.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowThousands.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowTrailingSign.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowTrailingWhite.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAny.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesCurrency.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesFloat.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesHexNumber.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesInteger.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesNone.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesNumber.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowcurrencysymbol.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowdecimalpoint.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowexponent.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowhexspecifier.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowleadingsign.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowleadingwhite.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowparentheses.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowthousands.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowtrailingsign.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowtrailingwhite.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesany.cs125
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylescurrency.cs124
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesfloat.cs119
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstyleshexnumber.cs112
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesinteger.cs111
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesnone.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesnumber.cs120
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoEquals.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoISOCurrencySymbol.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoIsMetric.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoToString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoTwoLetterISORegionName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfoequals.cs133
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfogethashcode.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfoismetric.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfoisocurrencysymbol.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfoname.cs130
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfotostring.cs107
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfotwoletterisoregionname.cs129
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoEquals.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetNextTextElement2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetTextElementEnumerator1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetTextElementEnumerator2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoLengthInTextElements.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoParseCombiningCharacters.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoctor1.cs77
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoctor2.cs171
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoequals.cs235
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogethashcode.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogetnexttextelement2.cs267
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogettextelementenumerator1.cs185
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogettextelementenumerator2.cs257
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfolengthintextelements.cs109
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoparsecombiningcharacters.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfostring.cs184
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/TextElementEnumeratorCurrent.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/TextElementEnumeratorElementIndex.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/TextElementEnumeratorGetTextElement.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/TextElementEnumeratorMoveNext.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/TextElementEnumeratorReset.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/textelementenumeratorcurrent.csbin0 -> 10394 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/textelementenumeratorelementindex.csbin0 -> 7622 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/textelementenumeratorgettextelement.csbin0 -> 10562 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/textelementenumeratormovenext.csbin0 -> 5786 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/textelementenumeratorreset.csbin0 -> 4652 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoCultureName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoEquals.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoIsReadOnly.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoToString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoToUpper1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoToUpper2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfoculturename.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfoequals.cs243
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfogethashcode.cs108
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfoisreadonly.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfotostring.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfotoupper1.cs223
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfotoupper2.cs244
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryClosePunctuation.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryConnectorPunctuation.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryControl.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryDashPunctuation.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryDecimalDigitNumber.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryEnclosingMark.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryFinalQuotePunctuation.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryFormat.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryInitialQuotePunctuation.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryLetterNumber.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryLineSeparator.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryLowercaseLetter.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryMathSymbol.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryModifierLetter.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryModifierSymbol.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryNonSpacingMark.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOpenPunctuation.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOtherLetter.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOtherNotAssigned.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOtherNumber.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOtherPunctuation.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOtherSymbol.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryParagraphSeparator.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryPrivateUse.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategorySpaceSeparator.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategorySpacingCombiningMark.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategorySurrogate.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryTitlecaseLetter.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryUppercaseLetter.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryclosepunctuation.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryconnectorpunctuation.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorycontrol.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorydashpunctuation.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorydecimaldigitnumber.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryenclosingmark.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryfinalquotepunctuation.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryformat.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryinitialquotepunctuation.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryletternumber.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorylineseparator.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorylowercaseletter.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorymathsymbol.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorymodifierletter.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorymodifiersymbol.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorynonspacingmark.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryopenpunctuation.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryotherletter.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryothernotassigned.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryothernumber.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryotherpunctuation.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryothersymbol.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryparagraphseparator.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryprivateuse.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryspaceseparator.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryspacingcombiningmark.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorysurrogate.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorytitlecaseletter.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryuppercaseletter.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/GuidCompareTo1_cti.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/GuidCompareTo2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/GuidCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/GuidCtor1_cti.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/GuidCtor2_cti.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/GuidCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/GuidCtor3_cti.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/GuidEmpty.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/GuidEquals1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/GuidEquals1_cti.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/GuidEquals2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/GuidEquals2_cti.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/GuidEquals3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/GuidGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/GuidNewGuid.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/GuidToByteArray.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/GuidToString1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/guidcompareto1_cti.cs234
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/guidcompareto2.cs211
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/guidctor1.cs142
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/guidctor1_cti.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/guidctor2_cti.cs109
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/guidctor3.cs188
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/guidctor3_cti.cs172
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/guidempty.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/guidequals1.cs278
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/guidequals1_cti.cs209
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/guidequals2.cs211
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/guidequals2_cti.cs316
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/guidequals3.cs211
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/guidgethashcode.cs116
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/guidnewguid.cs70
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/guidtobytearray.cs147
-rw-r--r--tests/src/CoreMangLib/cti/system/guid/guidtostring1.cs152
-rw-r--r--tests/src/CoreMangLib/cti/system/icomparable/IComparableCompareTo.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/icomparable/icomparablecompareto.cs136
-rw-r--r--tests/src/CoreMangLib/cti/system/icomparable_generic/IComparable_GenericCompareTo.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/icomparable_generic/icomparable_genericcompareto.cs145
-rw-r--r--tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToBoolean.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToChar.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToDateTime.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToDecimal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToDouble.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletoboolean.cs123
-rw-r--r--tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletobyte.cs122
-rw-r--r--tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletochar.cs121
-rw-r--r--tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletodatetime.cs121
-rw-r--r--tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletodecimal.cs122
-rw-r--r--tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletodouble.cs126
-rw-r--r--tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletoint16.cs126
-rw-r--r--tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletoint32.cs126
-rw-r--r--tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletoint64.cs126
-rw-r--r--tests/src/CoreMangLib/cti/system/idisposable/IDisposableDispose.csproj44
-rw-r--r--tests/src/CoreMangLib/cti/system/idisposable/idisposabledispose.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/iformatable/IFormatableToString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/iformatable/iformatabletostring.cs91
-rw-r--r--tests/src/CoreMangLib/cti/system/indexoutofrangeexception/IndexOutOfRangeExceptionctor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/indexoutofrangeexception/IndexOutOfRangeExceptionctor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/indexoutofrangeexception/IndexOutOfRangeExceptionctor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/indexoutofrangeexception/indexoutofrangeexceptionctor1.cs56
-rw-r--r--tests/src/CoreMangLib/cti/system/indexoutofrangeexception/indexoutofrangeexceptionctor2.cs81
-rw-r--r--tests/src/CoreMangLib/cti/system/indexoutofrangeexception/indexoutofrangeexceptionctor3.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32CompareTo1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32Equals1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32Equals2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32GetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToBoolean.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToChar.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToDateTime.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToDecimal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToDouble.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToSByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToSingle.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToType.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToUInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToUInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToUInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32MaxValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32MinValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32Parse1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32Parse2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32Parse3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32Parse4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32ToString3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/Int32TryParse.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32compareto1.cs128
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32equals1.cs138
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32equals2.cs209
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32gethashcode.cs67
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32iconvertibletoboolean.cs154
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32iconvertibletobyte.cs215
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32iconvertibletochar.cs182
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32iconvertibletodatetime.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32iconvertibletodecimal.cs152
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32iconvertibletodouble.cs175
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32iconvertibletoint16.cs193
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32iconvertibletoint32.cs152
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32iconvertibletoint64.cs124
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32iconvertibletosbyte.cs198
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32iconvertibletosingle.cs164
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32iconvertibletotype.cs197
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32iconvertibletouint16.cs190
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32iconvertibletouint32.cs156
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32iconvertibletouint64.cs155
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32maxvalue.cs55
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32minvalue.cs56
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32parse1.cs289
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32parse2.cs360
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32parse3.cs340
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32parse4.cs238
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32tostring3.cs176
-rw-r--r--tests/src/CoreMangLib/cti/system/int/int32tryparse.cs565
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16Equals1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16Equals2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16GetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToBoolean.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToChar.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToDateTime.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToDecimal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToDouble.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToSByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToSingle.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToType.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToUInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToUInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToUInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16MaxValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16MinValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16Parse1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16Parse2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16Parse3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/Int16TryParse.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16equals1.cs145
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16equals2.cs223
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16gethashcode.cs69
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16iconvertibletoboolean.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16iconvertibletobyte.cs216
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16iconvertibletochar.cs129
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16iconvertibletodatetime.cs98
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16iconvertibletodecimal.cs155
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16iconvertibletodouble.cs175
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16iconvertibletoint16.cs155
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16iconvertibletoint32.cs155
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16iconvertibletoint64.cs120
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16iconvertibletosbyte.cs229
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16iconvertibletosingle.cs167
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16iconvertibletotype.cs234
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16iconvertibletouint16.cs159
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16iconvertibletouint32.cs156
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16iconvertibletouint64.cs155
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16maxvalue.cs69
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16minvalue.cs69
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16parse1.cs337
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16parse2.cs584
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16parse3.cs454
-rw-r--r--tests/src/CoreMangLib/cti/system/int16/int16tryparse.cs553
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64CompareTo1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64Equals1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64Equals2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64GetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToBoolean.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToChar.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToDateTime.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToDecimal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToDouble.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToSByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToSingle.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToType.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToUInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToUInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToUInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64MaxValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64MinValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64Parse1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64Parse2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64Parse3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64ToString3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/Int64TryParse.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64compareto1.cs131
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64equals1.cs129
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64equals2.cs147
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64gethashcode.cs175
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64iconvertibletoboolean.cs179
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64iconvertibletobyte.cs216
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64iconvertibletochar.cs217
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64iconvertibletodatetime.cs123
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64iconvertibletodecimal.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64iconvertibletodouble.cs157
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64iconvertibletoint16.cs201
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64iconvertibletoint32.cs201
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64iconvertibletoint64.cs109
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64iconvertibletosbyte.cs238
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64iconvertibletosingle.cs107
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64iconvertibletotype.cs390
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64iconvertibletouint16.cs178
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64iconvertibletouint32.cs178
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64iconvertibletouint64.cs158
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64maxvalue.cs81
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64minvalue.cs82
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64parse1.cs341
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64parse2.cs326
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64parse3.cs398
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64tostring3.cs180
-rw-r--r--tests/src/CoreMangLib/cti/system/int64/int64tryparse.cs571
-rw-r--r--tests/src/CoreMangLib/cti/system/intptr/IntPtrCtor_Int32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/intptr/IntPtrCtor_Int64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/intptr/IntPtrCtor_Void.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/intptr/IntPtrEquals.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/intptr/IntPtrGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/intptr/IntPtrToInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/intptr/IntPtrToInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/intptr/IntPtrToPointer.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/intptr/IntPtrToString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/intptr/IntPtrZero.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/intptr/intptrctor_int32.cs70
-rw-r--r--tests/src/CoreMangLib/cti/system/intptr/intptrctor_int64.cs119
-rw-r--r--tests/src/CoreMangLib/cti/system/intptr/intptrctor_void.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/intptr/intptrequals.cs190
-rw-r--r--tests/src/CoreMangLib/cti/system/intptr/intptrgethashcode.cs156
-rw-r--r--tests/src/CoreMangLib/cti/system/intptr/intptrtoint32.cs146
-rw-r--r--tests/src/CoreMangLib/cti/system/intptr/intptrtoint64.cs139
-rw-r--r--tests/src/CoreMangLib/cti/system/intptr/intptrtopointer.cs137
-rw-r--r--tests/src/CoreMangLib/cti/system/intptr/intptrtostring.cs109
-rw-r--r--tests/src/CoreMangLib/cti/system/intptr/intptrzero.cs101
-rw-r--r--tests/src/CoreMangLib/cti/system/invalidcastexception/InvalidCastExceptionctor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/invalidcastexception/InvalidCastExceptionctor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/invalidcastexception/InvalidCastExceptionctor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/invalidcastexception/invalidcastexceptionctor1.cs56
-rw-r--r--tests/src/CoreMangLib/cti/system/invalidcastexception/invalidcastexceptionctor2.cs79
-rw-r--r--tests/src/CoreMangLib/cti/system/invalidcastexception/invalidcastexceptionctor3.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/invalidoperationexception/InvalidOperationExceptionctor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/invalidoperationexception/InvalidOperationExceptionctor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/invalidoperationexception/InvalidOperationExceptionctor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/invalidoperationexception/invalidoperationexceptionctor1.cs56
-rw-r--r--tests/src/CoreMangLib/cti/system/invalidoperationexception/invalidoperationexceptionctor2.cs80
-rw-r--r--tests/src/CoreMangLib/cti/system/invalidoperationexception/invalidoperationexceptionctor3.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/invalidprogramexception/InvalidProgramExceptionctor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/invalidprogramexception/InvalidProgramExceptionctor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/invalidprogramexception/InvalidProgramExceptionctor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/invalidprogramexception/invalidprogramexceptionctor1.cs56
-rw-r--r--tests/src/CoreMangLib/cti/system/invalidprogramexception/invalidprogramexceptionctor2.cs79
-rw-r--r--tests/src/CoreMangLib/cti/system/invalidprogramexception/invalidprogramexceptionctor3.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/io/binarywriter/BinaryWriterOutStream_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/binarywriter/binarywriteroutstream.cs194
-rw-r--r--tests/src/CoreMangLib/cti/system/io/directorynotfoundexception/DirectoryNotFoundExceptionctor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/directorynotfoundexception/DirectoryNotFoundExceptionctor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/directorynotfoundexception/directorynotfoundexceptionctor1.cs123
-rw-r--r--tests/src/CoreMangLib/cti/system/io/directorynotfoundexception/directorynotfoundexceptionctor2.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/io/endofstreamexception/endofstreamexceptionctor1.cs74
-rw-r--r--tests/src/CoreMangLib/cti/system/io/endofstreamexception/endofstreamexceptionctor1_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/endofstreamexception/endofstreamexceptionctor2.cs128
-rw-r--r--tests/src/CoreMangLib/cti/system/io/endofstreamexception/endofstreamexceptionctor2_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileaccess/FileAccessEnum.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileaccess/FileAccessRead.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileaccess/FileAccessReadWrite.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileaccess/FileAccessWrite.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileaccess/fileaccessenum.cs68
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileaccess/fileaccessread.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileaccess/fileaccessreadwrite.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileaccess/fileaccesswrite.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesArchive.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesCompressed.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesDeivce.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesDirectory.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesEncrypted.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesEnum.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesHidden.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesNormal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesNotContentIndexed.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesOffline.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesReadOnly.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesReparsePoint.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesSystem.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesTemporary.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesarchive.cs97
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributescompressed.cs97
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesdeivce.cs97
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesdirectory.cs97
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesencrypted.cs97
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesenum.cs66
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributeshidden.cs97
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesnormal.cs97
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesnotcontentindexed.cs97
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesoffline.cs97
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesreadonly.cs97
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesreparsepoint.cs97
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributessystem.cs96
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributestemporary.cs96
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filemode/FileModeAppend.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filemode/FileModeCreate.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filemode/FileModeCreateNew.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filemode/FileModeEnum.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filemode/FileModeOpen.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filemode/FileModeOpenOrCreate.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filemode/FileModeTruncate.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filemode/filemodeappend.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filemode/filemodecreate.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filemode/filemodecreatenew.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filemode/filemodeenum.cs67
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filemode/filemodeopen.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filemode/filemodeopenorcreate.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filemode/filemodetruncate.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionGetMessage.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionMessage.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionToString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionctor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptionctor.cs66
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptionctor1.csbin0 -> 3586 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptionctor2.cs71
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptiongetmessage.cs66
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptionmessage.csbin0 -> 7738 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptiontostring.cs66
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileshare/FileShareEnum.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileshare/FileShareNone.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileshare/FileShareRead.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileshare/FileShareReadWrite.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileshare/FileShareWrite.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileshare/fileshareenum.cs66
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileshare/filesharenone.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileshare/fileshareread.cs71
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileshare/filesharereadwrite.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/io/fileshare/filesharewrite.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filestream/FileStreamDispose_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/filestream/filestreamdispose.cs276
-rw-r--r--tests/src/CoreMangLib/cti/system/io/ioexception/IOExceptionctor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/ioexception/IOExceptionctor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/ioexception/ioexceptionctor1.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/io/ioexception/ioexceptionctor2.cs126
-rw-r--r--tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor3.csproj44
-rw-r--r--tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor4.csproj44
-rw-r--r--tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor5.csproj44
-rw-r--r--tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor6.csproj44
-rw-r--r--tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor7.csproj44
-rw-r--r--tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor.cs66
-rw-r--r--tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor2.cs68
-rw-r--r--tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor3.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor4.cs93
-rw-r--r--tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor5.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor6.cs93
-rw-r--r--tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor7.cs93
-rw-r--r--tests/src/CoreMangLib/cti/system/io/pathtoolongexception/PathTooLongExceptionctor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/pathtoolongexception/PathTooLongExceptionctor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/pathtoolongexception/pathtoolongexceptionctor1.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/io/pathtoolongexception/pathtoolongexceptionctor2.cs123
-rw-r--r--tests/src/CoreMangLib/cti/system/io/seekorigin/SeekOriginBegin.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/seekorigin/SeekOriginCurrent.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/seekorigin/SeekOriginEnd.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/seekorigin/SeekOriginEnum.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/seekorigin/seekoriginbegin.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/io/seekorigin/seekorigincurrent.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/io/seekorigin/seekoriginend.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/io/seekorigin/seekoriginenum.cs66
-rw-r--r--tests/src/CoreMangLib/cti/system/io/stream/StreamDispose1_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/stream/StreamDispose2_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/stream/StreamNull_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/stream/StreamReadTimeOut_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/stream/StreamWriteTimeOut_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/stream/streamdispose1.cs129
-rw-r--r--tests/src/CoreMangLib/cti/system/io/stream/streamdispose2.cs262
-rw-r--r--tests/src/CoreMangLib/cti/system/io/stream/streamnull.cs245
-rw-r--r--tests/src/CoreMangLib/cti/system/io/stream/streamreadtimeout.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/io/stream/streamwritetimeout.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/io/streamreader/StreamReaderNull_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/streamreader/streamreadernull.cs144
-rw-r--r--tests/src/CoreMangLib/cti/system/io/stringwriter/StringWriterEncoding_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/stringwriter/stringwriterencoding.cs79
-rw-r--r--tests/src/CoreMangLib/cti/system/io/textreader/TextReaderNull_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/textreader/textreadernull.cs61
-rw-r--r--tests/src/CoreMangLib/cti/system/io/textwriter/TextWriterNull_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/io/textwriter/textwriternull.cs59
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathAbs1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathAbs2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathAbs3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathAbs4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathAbs5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathAbs6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathAbs7.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathAcos.csproj46
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathAtan.csproj46
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathAtan2.csproj46
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathCeiling.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathCos.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathCosh.csproj46
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathE.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathExp.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathFloor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathIEEERemainder.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathLog.csproj46
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathLog10.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathMax1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathMax10.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathMax11.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathMax2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathMax3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathMax4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathMax5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathMax6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathMax7.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathMax8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathMax9.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathMin1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathMin10.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathMin11.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathMin2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathMin3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathMin4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathMin5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathMin6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathMin7.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathMin8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathMin9.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathPI.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathPow.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathRound2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathRound3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathRound4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathSign1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathSign2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathSign3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathSign4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathSign5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathSign6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathSign7.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathSin.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathSinh.csproj46
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathSqrt.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathTan.csproj46
-rw-r--r--tests/src/CoreMangLib/cti/system/math/MathTanh.csproj46
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathRound1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathabs1.cs135
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathabs2.cs183
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathabs3.cs116
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathabs4.cs116
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathabs5.cs116
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathabs6.cs114
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathabs7.cs185
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathacos.cs214
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathatan.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathatan2.cs274
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathceiling.cs208
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathcos.cs185
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathcosh.cs170
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathe.cs64
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathexp.cs172
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathfloor.cs209
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathieeeremainder.cs149
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathlog.cs247
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathlog10.cs243
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathmax1.cs77
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathmax10.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathmax11.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathmax2.cs78
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathmax3.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathmax4.cs77
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathmax5.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathmax6.cs77
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathmax7.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathmax8.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathmax9.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathmin1.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathmin10.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathmin11.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathmin2.cs78
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathmin3.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathmin4.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathmin5.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathmin6.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathmin7.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathmin8.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathmin9.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathpi.cs63
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathpow.cs524
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathround1.cs151
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathround2.cs199
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathround3.cs142
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathround4.cs189
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathsign1.cs208
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathsign2.cs272
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathsign3.cs171
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathsign4.cs171
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathsign5.cs171
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathsign6.cs171
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathsign7.cs272
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathsin.cs232
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathsinh.cs232
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathsqrt.cs167
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathtan.cs191
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathtanh.cs193
-rw-r--r--tests/src/CoreMangLib/cti/system/math/mathtestlib.cs40
-rw-r--r--tests/src/CoreMangLib/cti/system/memberaccessexception/MemberAccessExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/memberaccessexception/MemberAccessExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/memberaccessexception/MemberAccessExceptionCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/memberaccessexception/memberaccessexceptionctor1.csbin0 -> 3544 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/memberaccessexception/memberaccessexceptionctor2.csbin0 -> 6358 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/memberaccessexception/memberaccessexceptionctor3.csbin0 -> 7756 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/methodaccessexception/MethodAccessExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/methodaccessexception/MethodAccessExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/methodaccessexception/MethodAccessExceptionCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/methodaccessexception/methodaccessexceptionctor1.csbin0 -> 3544 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/methodaccessexception/methodaccessexceptionctor2.csbin0 -> 6358 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/methodaccessexception/methodaccessexceptionctor3.csbin0 -> 7756 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/missingfieldexception/MissingFieldExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/missingfieldexception/MissingFieldExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/missingfieldexception/MissingFieldExceptionCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/missingfieldexception/MissingFieldExceptionMessage.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/missingfieldexception/missingfieldexceptionctor1.csbin0 -> 3544 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/missingfieldexception/missingfieldexceptionctor2.csbin0 -> 6358 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/missingfieldexception/missingfieldexceptionctor3.csbin0 -> 7756 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/missingfieldexception/missingfieldexceptionmessage.csbin0 -> 5774 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/missingmemberexception/MissingMemberExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/missingmemberexception/MissingMemberExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/missingmemberexception/MissingMemberExceptionCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/missingmemberexception/MissingMemberExceptionMessage.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/missingmemberexception/missingmemberexceptionctor1.csbin0 -> 3564 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/missingmemberexception/missingmemberexceptionctor2.csbin0 -> 6384 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/missingmemberexception/missingmemberexceptionctor3.csbin0 -> 7784 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/missingmemberexception/missingmemberexceptionmessage.csbin0 -> 5806 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/missingmethodexception/MissingMethodExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/missingmethodexception/MissingMethodExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/missingmethodexception/MissingMethodExceptionCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/missingmethodexception/MissingMethodExceptionMessage.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/missingmethodexception/missingmethodexceptionctor1.csbin0 -> 3564 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/missingmethodexception/missingmethodexceptionctor2.csbin0 -> 6384 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/missingmethodexception/missingmethodexceptionctor3.csbin0 -> 7784 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/missingmethodexception/missingmethodexceptionmessage.csbin0 -> 5806 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/multicastdelegate/MulticastDelegateCombineImpl.csproj47
-rw-r--r--tests/src/CoreMangLib/cti/system/multicastdelegate/MulticastDelegateEquals.csproj47
-rw-r--r--tests/src/CoreMangLib/cti/system/multicastdelegate/MulticastDelegateGetHashCode.csproj47
-rw-r--r--tests/src/CoreMangLib/cti/system/multicastdelegate/MulticastDelegateGetInvocationList.csproj47
-rw-r--r--tests/src/CoreMangLib/cti/system/multicastdelegate/delegatedefinitions.cs509
-rw-r--r--tests/src/CoreMangLib/cti/system/multicastdelegate/multicastdelegatecombineimpl.cs445
-rw-r--r--tests/src/CoreMangLib/cti/system/multicastdelegate/multicastdelegateequals.cs443
-rw-r--r--tests/src/CoreMangLib/cti/system/multicastdelegate/multicastdelegategethashcode.cs108
-rw-r--r--tests/src/CoreMangLib/cti/system/multicastdelegate/multicastdelegategetinvocationlist.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/multicastdelegate/verificationagent.cs26
-rw-r--r--tests/src/CoreMangLib/cti/system/notimplementedexception/NotImplementedExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/notimplementedexception/NotImplementedExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/notimplementedexception/NotImplementedExceptionCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/notimplementedexception/notimplementedexceptionctor1.csbin0 -> 3584 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/notimplementedexception/notimplementedexceptionctor2.csbin0 -> 6410 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/notimplementedexception/notimplementedexceptionctor3.csbin0 -> 7812 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/notsupportedexception/NotSupportedExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/notsupportedexception/NotSupportedExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/notsupportedexception/NotSupportedExceptionCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/notsupportedexception/notsupportedexceptionctor1.csbin0 -> 3544 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/notsupportedexception/notsupportedexceptionctor2.csbin0 -> 6358 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/notsupportedexception/notsupportedexceptionctor3.csbin0 -> 7756 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/nullable/NullableCompare.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/nullable/NullableCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/nullable/NullableEquals.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/nullable/NullableEquals2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/nullable/NullableGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/nullable/NullableGetUnderlyingType.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/nullable/NullableGetValueOrDefault1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/nullable/NullableGetValueOrDefault2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/nullable/NullableHasValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/nullable/NullableToString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/nullable/NullableValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/nullable/nullablecompare.cs251
-rw-r--r--tests/src/CoreMangLib/cti/system/nullable/nullablector.cs128
-rw-r--r--tests/src/CoreMangLib/cti/system/nullable/nullableequals.cs173
-rw-r--r--tests/src/CoreMangLib/cti/system/nullable/nullableequals2.cs243
-rw-r--r--tests/src/CoreMangLib/cti/system/nullable/nullablegethashcode.cs140
-rw-r--r--tests/src/CoreMangLib/cti/system/nullable/nullablegetunderlyingtype.cs144
-rw-r--r--tests/src/CoreMangLib/cti/system/nullable/nullablegetvalueordefault1.cs107
-rw-r--r--tests/src/CoreMangLib/cti/system/nullable/nullablegetvalueordefault2.cs112
-rw-r--r--tests/src/CoreMangLib/cti/system/nullable/nullablehasvalue.cs108
-rw-r--r--tests/src/CoreMangLib/cti/system/nullable/nullabletostring.cs136
-rw-r--r--tests/src/CoreMangLib/cti/system/nullable/nullablevalue.cs142
-rw-r--r--tests/src/CoreMangLib/cti/system/nullreferenceexception/NullReferenceExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/nullreferenceexception/nullreferenceexceptionctor1.cs137
-rw-r--r--tests/src/CoreMangLib/cti/system/object/ObjectCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/object/ObjectEquals1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/object/ObjectEquals2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/object/ObjectFinalize.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/object/ObjectGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/object/ObjectMemberwiseClone.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/object/ObjectReferenceEquals.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/object/ObjectToString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/object/objectctor.cs95
-rw-r--r--tests/src/CoreMangLib/cti/system/object/objectequals1.cs489
-rw-r--r--tests/src/CoreMangLib/cti/system/object/objectequals2.cs391
-rw-r--r--tests/src/CoreMangLib/cti/system/object/objectfinalize.cs123
-rw-r--r--tests/src/CoreMangLib/cti/system/object/objectgethashcode.cs167
-rw-r--r--tests/src/CoreMangLib/cti/system/object/objectmemberwiseclone.cs151
-rw-r--r--tests/src/CoreMangLib/cti/system/object/objectreferenceequals.cs191
-rw-r--r--tests/src/CoreMangLib/cti/system/object/objecttostring.cs66
-rw-r--r--tests/src/CoreMangLib/cti/system/objectdisposedexception/ObjectDisposedExceptionMessage.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/objectdisposedexception/ObjectDisposedExceptionObjectName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/objectdisposedexception/objectdisposedexceptionmessage.cs138
-rw-r--r--tests/src/CoreMangLib/cti/system/objectdisposedexception/objectdisposedexceptionobjectname.cs143
-rw-r--r--tests/src/CoreMangLib/cti/system/obsoleteattribute/ObsoleteAttributeCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/obsoleteattribute/ObsoleteAttributeCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/obsoleteattribute/ObsoleteAttributeCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/obsoleteattribute/ObsoleteAttributeIsError.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/obsoleteattribute/ObsoleteAttributeMessage.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/obsoleteattribute/obsoleteattributector1.cs158
-rw-r--r--tests/src/CoreMangLib/cti/system/obsoleteattribute/obsoleteattributector2.cs161
-rw-r--r--tests/src/CoreMangLib/cti/system/obsoleteattribute/obsoleteattributector3.cs200
-rw-r--r--tests/src/CoreMangLib/cti/system/obsoleteattribute/obsoleteattributeiserror.cs141
-rw-r--r--tests/src/CoreMangLib/cti/system/obsoleteattribute/obsoleteattributemessage.cs196
-rw-r--r--tests/src/CoreMangLib/cti/system/outofmemoryexception/OutOfMemoryExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/outofmemoryexception/OutOfMemoryExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/outofmemoryexception/OutOfMemoryExceptionCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/outofmemoryexception/outofmemoryexceptionctor1.csbin0 -> 3548 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/outofmemoryexception/outofmemoryexceptionctor2.csbin0 -> 6354 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/outofmemoryexception/outofmemoryexceptionctor3.csbin0 -> 7750 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/overflowexception/OverflowExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/overflowexception/OverflowExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/overflowexception/OverflowExceptionCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/overflowexception/overflowexceptionctor1.csbin0 -> 3486 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/overflowexception/overflowexceptionctor2.csbin0 -> 6276 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/overflowexception/overflowexceptionctor3.csbin0 -> 7666 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/paramarrayattribute/ParamArrayAttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/paramarrayattribute/paramarrayattributector.cs71
-rw-r--r--tests/src/CoreMangLib/cti/system/platformnotsupportedexception/PlatformNotSupportedExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/platformnotsupportedexception/PlatformNotSupportedExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/platformnotsupportedexception/PlatformNotSupportedExceptionCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/platformnotsupportedexception/platformnotsupportedexceptionctor1.cs71
-rw-r--r--tests/src/CoreMangLib/cti/system/platformnotsupportedexception/platformnotsupportedexceptionctor2.cs142
-rw-r--r--tests/src/CoreMangLib/cti/system/platformnotsupportedexception/platformnotsupportedexceptionctor3.cs188
-rw-r--r--tests/src/CoreMangLib/cti/system/predicate/PredicateBeginInvoke.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/predicate/PredicateEndInvoke.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/predicate/PredicateInvoke.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/predicate/predicatebegininvoke.cs100
-rw-r--r--tests/src/CoreMangLib/cti/system/predicate/predicateendinvoke.cs100
-rw-r--r--tests/src/CoreMangLib/cti/system/predicate/predicateinvoke.cs129
-rw-r--r--tests/src/CoreMangLib/cti/system/random/RandomCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/random/RandomCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/random/RandomNext1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/random/RandomNext2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/random/RandomNext3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/random/RandomNextBytes.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/random/RandomNextDouble.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/random/RandomSample.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/random/randomctor1.cs70
-rw-r--r--tests/src/CoreMangLib/cti/system/random/randomctor2.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/random/randomnext1.cs170
-rw-r--r--tests/src/CoreMangLib/cti/system/random/randomnext2.cs291
-rw-r--r--tests/src/CoreMangLib/cti/system/random/randomnext3.cs338
-rw-r--r--tests/src/CoreMangLib/cti/system/random/randomnextbytes.cs152
-rw-r--r--tests/src/CoreMangLib/cti/system/random/randomnextdouble.cs171
-rw-r--r--tests/src/CoreMangLib/cti/system/random/randomsample.cs98
-rw-r--r--tests/src/CoreMangLib/cti/system/rankexception/RankExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/rankexception/RankExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/rankexception/RankExceptionCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/rankexception/rankexceptionctor1.cs71
-rw-r--r--tests/src/CoreMangLib/cti/system/rankexception/rankexceptionctor2.cs142
-rw-r--r--tests/src/CoreMangLib/cti/system/rankexception/rankexceptionctor3.cs188
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/AmbiguousMatchExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/AmbiguousMatchExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/AmbiguousMatchExceptionCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/ambiguousmatchexceptionctor1.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/ambiguousmatchexceptionctor2.cs143
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/ambiguousmatchexceptionctor3.cs189
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assembly/TestAssembly1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assembly/TestTarget2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assembly/testassembly1.cs16
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assembly/testtarget.cs14
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblyconfigurationattribute/AssemblyConfigurationAttribute.csproj44
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblyconfigurationattribute/AssemblyConfigurationAttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblyconfigurationattribute/assemblyconfigurationattribute.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblyconfigurationattribute/assemblyconfigurationattributector.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblydefaultaliasattribute/AssemblyDefaultAliasAttribute.csproj44
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblydefaultaliasattribute/AssemblyDefaultAliasAttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblydefaultaliasattribute/assemblydefaultaliasattribute.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblydefaultaliasattribute/assemblydefaultaliasattributector.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblydelaysignattribute/AssemblyDelaySignAttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblydelaysignattribute/AssemblyDelaySignAttributeDelaySign.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblydelaysignattribute/assemblydelaysignattributector.cs133
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblydelaysignattribute/assemblydelaysignattributedelaysign.cs133
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblydescriptionattribute/AssemblyDescriptionAttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblydescriptionattribute/AssemblyDescriptionAttributeDescription.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblydescriptionattribute/assemblydescriptionattributector.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblydescriptionattribute/assemblydescriptionattributedescription.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblykeyfileattribute/AssemblyKeyFileAttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblykeyfileattribute/AssemblyKeyFileAttributeKeyFile.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblykeyfileattribute/assemblykeyfileattributector.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblykeyfileattribute/assemblykeyfileattributekeyfile.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblykeynameattribute/AssemblyKeyNameAttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblykeynameattribute/AssemblyKeyNameAttributeKeyName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblykeynameattribute/assemblykeynameattributector.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblykeynameattribute/assemblykeynameattributekeyname.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblyname/AssemblyNameGetPublicKey.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblyname/AssemblyNameGetPublicKeyToken.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblyname/AssemblyNameSetPublicKey.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblyname/AssemblyNameSetPublicKeyToken.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblyname/AssemblyNameVersion.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblyname/assemblynamegetpublickey.cs118
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblyname/assemblynamegetpublickeytoken.cs118
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblyname/assemblynamesetpublickey.cs124
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblyname/assemblynamesetpublickeytoken.cs123
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblyname/assemblynameversion.cs125
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/AssemblyNameFlagsNone.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/AssemblyNameFlagsPublicKey.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/AssemblyNameFlagsRetargetable.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/assemblynameflagsenablejitcompileoptimizer.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/assemblynameflagsenablejitcompiletracking.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/assemblynameflagsnone.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/assemblynameflagspublickey.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/assemblynameflagsretargetable.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblytitleattribute/AssemblyTitleAttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblytitleattribute/AssemblyTitleAttributeTitle.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblytitleattribute/assemblytitleattributector.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/assemblytitleattribute/assemblytitleattributetitle.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/callingconventions/CallingConventionsAny.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/callingconventions/CallingConventionsExplicitThis.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/callingconventions/CallingConventionsHasThis.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/callingconventions/CallingConventionsStandard.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/callingconventions/CallingConventionsVarArgs.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/callingconventions/callingconventionsany.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/callingconventions/callingconventionsexplicitthis.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/callingconventions/callingconventionshasthis.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/callingconventions/callingconventionsstandard.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/callingconventions/callingconventionsvarargs.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/constructorinfo/ConstructorInfoConstructorName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/constructorinfo/ConstructorInfoTypeConstructorName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/constructorinfo/constructorinfoconstructorname.cs69
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/constructorinfo/constructorinfotypeconstructorname.cs70
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/defaultmemberattribute/DefaultMemberAttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/defaultmemberattribute/DefaultMemberAttributeMemberName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/defaultmemberattribute/defaultmemberattributector.cs140
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/defaultmemberattribute/defaultmemberattributemembername.cs138
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlBranch.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlCall.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlCond_Branch.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlMeta.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlNext.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlReturn.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlThrow.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolbranch.cs71
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolcall.cs71
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolcond_branch.cs71
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolmeta.cs71
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolnext.cs71
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolreturn.cs71
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolthrow.cs71
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeEquals1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeEquals2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeFlowControl.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeOpCodeType.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeOperandType.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeSize.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeStackBehaviourPop.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeStackBehaviourPush.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeToString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesAdd_Ovf.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesAdd_Ovf_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesAnd.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesArglist.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBeq.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBeq_S.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBge.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBge_S.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBge_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBge_Un_S.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBgt.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBgt_S.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBgt_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBgt_Un_S.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBle.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBle_S.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBle_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBle_Un_S.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBlt.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBlt_S.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBlt_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBlt_Un_S.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBne_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBne_Un_S.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBox.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBr.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBr_S.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBreak.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBrfalse.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBrfalse_S.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBrtrue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBrtrue_S.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCall.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCalli.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCallvirt.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCastclass.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCeq.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCgt.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCgt_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCkfinite.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesClt.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesClt_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConstrained.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_I.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_I1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_I2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_I4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_I8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I1_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I2_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I4_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I8_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U1_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U2_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U4_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U8_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_R4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_R8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_R_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_U.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_U1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_U2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_U4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_U8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCpblk.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCpobj.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesDiv.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesDiv_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesDup.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesEndfilter.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesEndfinally.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesInitblk.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesInitobj.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesIsinst.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesJmp.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg_0.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg_1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg_2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg_3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg_S.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarga.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarga_S.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_0.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_7.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_M1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_S.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_R4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_R8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_I.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_I1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_I2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_I4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_I8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_R4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_R8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_Ref.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_U1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_U2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_U4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelema.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdfld.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdflda.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdftn.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_I.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_I1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_I2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_I4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_I8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_R4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_R8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_Ref.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_U1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_U2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_U4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdlen.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc_0.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc_1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc_2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc_3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc_S.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloca.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloca_S.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdnull.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdobj.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdsfld.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdsflda.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdstr.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdtoken.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdvirtftn.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLeave.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLeave_S.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLocalloc.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesMkrefany.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesMul.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesMul_Ovf.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesMul_Ovf_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesNeg.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesNewarr.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesNewobj.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesNop.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesNot.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesOr.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPop.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix7.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefixref.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesReadonly.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRefanytype.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRefanyval.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRem.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRem_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRet.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRethrow.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesShl.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesShr.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesShr_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesSizeof.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStarg.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStarg_S.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_I.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_I1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_I2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_I4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_I8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_R4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_R8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_Ref.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStfld.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_I.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_I1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_I2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_I4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_I8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_R4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_R8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_Ref.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc_0.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc_1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc_2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc_3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc_S.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStobj.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStsfld.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesSub.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesSub_Ovf.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesSub_Ovf_Un.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesSwitch.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesTailcall.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesTakesSingleByteArgument.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesThrow.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesUnaligned.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesUnbox.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesUnbox_Any.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesVolatile.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesXor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeequals1.cs197
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeequals2.cs143
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeflowcontrol.cs128
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodegethashcode.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodename.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeopcodetype.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeoperandtype.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesadd_ovf.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesadd_ovf_un.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesand.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesarglist.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbeq.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbeq_s.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbge.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbge_s.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbge_un.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbge_un_s.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbgt.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbgt_s.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbgt_un.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbgt_un_s.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesble.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesble_s.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesble_un.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesble_un_s.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesblt.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesblt_s.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesblt_un.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesblt_un_s.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbne_un.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbne_un_s.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbox.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbr.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbr_s.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbreak.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbrfalse.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbrfalse_s.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbrtrue.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbrtrue_s.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescall.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescalli.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescallvirt.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescastclass.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesceq.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescgt.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescgt_un.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesckfinite.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesclt.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesclt_un.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconstrained.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_i.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_i1.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_i2.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_i4.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_i8.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i1.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i1_un.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i2.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i2_un.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i4.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i4_un.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i8.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i8_un.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i_un.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u1.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u1_un.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u2.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u2_un.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u4.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u4_un.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u8.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u8_un.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u_un.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_r4.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_r8.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_r_un.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_u.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_u1.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_u2.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_u4.cs197
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_u8.cs198
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescpblk.cs198
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescpobj.cs198
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesdiv.cs198
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesdiv_un.cs199
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesdup.cs198
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesendfilter.cs197
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesendfinally.cs198
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesinitblk.cs198
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesinitobj.cs198
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesisinst.cs197
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesize.cs139
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesjmp.cs197
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg.cs197
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg_0.cs197
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg_1.cs197
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg_2.cs197
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg_3.cs197
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg_s.cs197
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarga.cs197
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarga_s.cs197
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_0.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_1.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_2.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_3.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_4.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_5.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_6.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_7.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_8.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_m1.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_s.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i8.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_r4.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_r8.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_i.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_i1.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_i2.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_i4.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_i8.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_r4.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_r8.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_ref.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_u1.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_u2.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_u4.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelema.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldfld.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldflda.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldftn.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_i.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_i1.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_i2.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_i4.cs152
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_i8.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_r4.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_r8.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_ref.cs152
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_u1.cs152
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_u2.cs152
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_u4.cs152
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldlen.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc_0.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc_1.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc_2.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc_3.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc_s.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloca.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloca_s.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldnull.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldobj.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldsfld.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldsflda.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldstr.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldtoken.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldvirtftn.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesleave.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesleave_s.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeslocalloc.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesmkrefany.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesmul.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesmul_ovf.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesmul_ovf_un.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesneg.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesnewarr.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesnewobj.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesnop.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesnot.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesor.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodespop.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix1.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix2.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix3.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix4.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix5.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix6.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix7.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefixref.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesreadonly.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesrefanytype.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesrefanyval.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesrem.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesrem_un.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesret.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesrethrow.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesshl.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesshr.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesshr_un.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodessizeof.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstarg.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstarg_s.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_i.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_i1.cs163
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_i2.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_i4.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_i8.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_r4.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_r8.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_ref.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstfld.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_i.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_i1.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_i2.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_i4.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_i8.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_r4.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_r8.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_ref.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc_0.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc_1.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc_2.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc_3.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc_s.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstobj.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstsfld.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodessub.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodessub_ovf.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodessub_ovf_un.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesswitch.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodestackbehaviourpop.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodestackbehaviourpush.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodestailcall.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodestakessinglebyteargument.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesthrow.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesunaligned.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesunbox.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesunbox_any.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesvolatile.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesxor.cs165
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodetostring.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodevalue.cs100
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/OpCodeTypeMacro.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/OpCodeTypeNternal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/OpCodeTypeObjmodel.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/OpCodeTypePrefix.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/OpCodeTypePrimitive.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/opcodetypemacro.cs86
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/opcodetypenternal.cs86
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/opcodetypeobjmodel.cs86
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/opcodetypeprefix.cs86
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/opcodetypeprimitive.cs86
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineBrTarget.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineField.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineI.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineI8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineMethod.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineNone.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineR.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineSig.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineSwitch.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineTok.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineType.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineVar.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeShortInlineBrTarget.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeShortInlineI.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeShortInlineR.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeShortInlineVar.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinebrtarget.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinefield.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinei.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinei8.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinemethod.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinenone.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinliner.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinesig.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinestring.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlineswitch.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinetok.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinetype.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinevar.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeshortinlinebrtarget.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeshortinlinei.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeshortinliner.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeshortinlinevar.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSize16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSize2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSize4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeSize1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeSize128.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeSize32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeSize64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeSize8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeUnspecified.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsize16.cs89
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsize2.cs89
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsize4.cs89
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizesize1.cs89
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizesize128.cs89
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizesize32.cs89
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizesize64.cs89
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizesize8.cs89
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizeunspecified.cs89
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPop0.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPop1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPop1_pop1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_pop1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_popi.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_popi8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_popi_popi.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_popr4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_popr8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_pop1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_pop1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_popi.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_popi8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_popr4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_popr8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_popref.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPush0.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPush1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPush1_push1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPushi.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPushi8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPushr4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPushr8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPushref.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourVarpop.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourVarpush.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpop0.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpop1.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpop1_pop1.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_pop1.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_popi.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_popi8.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_popi_popi.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_popr4.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_popr8.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_pop1.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi.cs74
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_pop1.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_popi.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_popi8.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_popr4.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_popr8.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_popref.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpush0.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpush1.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpush1_push1.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushi.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushi8.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushr4.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushr8.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushref.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourvarpop.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourvarpush.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/eventattributes/EventAttributesNone.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/eventattributes/EventAttributesRTSpecialName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/eventattributes/EventAttributesSpecialName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/eventattributes/eventattributesnone.cs95
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/eventattributes/eventattributesrtspecialname.cs94
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/eventattributes/eventattributesspecialname.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesAssembly.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesFamANDAssem.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesFamORAssem.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesFamily.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesFieldAccessMask.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesHasDefault.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesHasFieldRVA.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesInitOnly.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesLiteral.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesNotSerialized.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesPinvokeImpl.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesPrivate.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesPrivateScope.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesPublic.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesRTSpecialName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesSpecialName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesStatic.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesassembly.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesfamandassem.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesfamily.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesfamorassem.cs139
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesfieldaccessmask.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributeshasdefault.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributeshasfieldrva.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesinitonly.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesliteral.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesnotserialized.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributespinvokeimpl.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesprivate.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesprivatescope.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributespublic.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesrtspecialname.cs139
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesspecialname.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesstatic.cs139
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesAbstract.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesFamANDAssem.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesFamORAssem.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesFamily.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesFinal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesHasSecurity.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesHideBySig.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesMemberAccessMask.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesNewSlot.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesPinvokeImpl.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesPrivate.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesPrivateScope.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesPublic.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesRTSpecialName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesRequireSecObject.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesReuseSlot.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesSpecialName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesStatic.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesUnmanagedExport.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesVirtual.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesVtableLayoutMask.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesabstract.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesfamandassem.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesfamily.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesfamorassem.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesfinal.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributeshassecurity.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributeshidebysig.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesmemberaccessmask.cs98
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesnewslot.cs99
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributespinvokeimpl.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesprivate.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesprivatescope.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributespublic.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesrequiresecobject.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesreuseslot.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesrtspecialname.cs77
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesspecialname.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesstatic.cs77
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesunmanagedexport.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesvirtual.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesvtablelayoutmask.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesCodeTypeMask.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesForwardRef.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesIL.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesInternalCall.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesManaged.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesManagedMask.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesNative.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesNoInlining.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesOPTIL.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesPreserveSig.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesRuntime.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesSynchronized.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesUnmanaged.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributescodetypemask.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesforwardref.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesil.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesinternalcall.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesmanaged.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesmanagedmask.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesnative.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesnoinlining.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesoptil.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributespreservesig.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesruntime.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributessynchronized.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesunmanaged.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesHasDefault.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesIn.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesNone.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesOptional.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesOut.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesRetval.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributeshasdefault.cs94
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributesin.cs93
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributesnone.cs94
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributesoptional.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributesout.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributesretval.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/propertyattributes/PropertyAttributesHasDefault.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/propertyattributes/PropertyAttributesNone.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/propertyattributes/PropertyAttributesRTSpecialName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/propertyattributes/PropertyAttributesSpecialName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/propertyattributes/propertyattributeshasdefault.cs88
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/propertyattributes/propertyattributesnone.cs88
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/propertyattributes/propertyattributesrtspecialname.cs88
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/propertyattributes/propertyattributesspecialname.cs88
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/targetinvocationexception/TargetInvocationExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/targetinvocationexception/TargetInvocationExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/targetinvocationexception/targetinvocationexceptionctor1.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/targetinvocationexception/targetinvocationexceptionctor2.cs189
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/TargetParameterCountExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/TargetParameterCountExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/TargetParameterCountExceptionCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/targetparametercountexceptionctor1.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/targetparametercountexceptionctor2.cs143
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/targetparametercountexceptionctor3.cs189
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesAbstract.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesAnsiClass.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesAutoClass.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesAutoLayout.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesBeforeFieldInit.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesClass.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesClassSemanticsMask.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesExplicitLayout.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesHasSecurity.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesImport.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesInterface.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesLayoutMask.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedAssembly.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedFamANDAssem.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedFamORAssem.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedFamily.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedPrivate.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedPublic.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesPublic.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesRTSpecialName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesSealed.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesSequentialLayout.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesSerializable.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesSpecialName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesStringFormatMask.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesUnicodeClass.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesVisibilityMask.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttribytesNotPublic.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesabstract.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesansiclass.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesautoclass.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesautolayout.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesbeforefieldinit.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesclass.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesclasssemanticsmask.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesexplicitlayout.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributeshassecurity.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesimport.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesinterface.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributeslayoutmask.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedassembly.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedfamandassem.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedfamily.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedfamorassem.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedprivate.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedpublic.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributespublic.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesrtspecialname.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributessealed.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributessequentiallayout.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesserializable.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesspecialname.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesstringformatmask.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesunicodeclass.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesvisibilitymask.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattribytesnotpublic.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/MissingManifestResourceExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/MissingManifestResourceExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/MissingManifestResourceExceptionCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/missingmanifestresourceexceptionctor1.cs70
-rw-r--r--tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/missingmanifestresourceexceptionctor2.cs148
-rw-r--r--tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/missingmanifestresourceexceptionctor3.cs177
-rw-r--r--tests/src/CoreMangLib/cti/system/resources/neutralresourceslanguageattribute/CultureName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/resources/neutralresourceslanguageattribute/NeutralResourcesLanguageAttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/resources/neutralresourceslanguageattribute/neutralresourceslanguageattributector.cs144
-rw-r--r--tests/src/CoreMangLib/cti/system/resources/neutralresourceslanguageattribute/neutralresourceslanguageattributeculturename.cs114
-rw-r--r--tests/src/CoreMangLib/cti/system/resources/resourcemanager/CustomCulture.csproj44
-rw-r--r--tests/src/CoreMangLib/cti/system/resources/resourcemanager/customculture.cs64
-rw-r--r--tests/src/CoreMangLib/cti/system/resources/satellitecontractversionattribute/AttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/resources/satellitecontractversionattribute/AttributeVersion.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/resources/satellitecontractversionattribute/satellitecontractversionattributector.cs131
-rw-r--r--tests/src/CoreMangLib/cti/system/resources/satellitecontractversionattribute/satellitecontractversionattributeversion.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/accessedthroughpropertyattribute/ATPACtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/accessedthroughpropertyattribute/ATPAPropertyName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/accessedthroughpropertyattribute/atpactor.cs140
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/accessedthroughpropertyattribute/atpapropertyname.cs138
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/compilationrelaxations/AttributeCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/compilationrelaxations/compilationrelaxationsattributector1.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/compilergeneratedattribute/CompilerGeneratedAttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/compilergeneratedattribute/compilergeneratedattributector.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/customconstantattribute/CustomConstantAttributector.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/customconstantattribute/customconstantattributector.cs83
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/indexernameattribute/IndexerNameAttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/indexernameattribute/indexernameattributector.cs140
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/internalsvisibletoattribute/IVTAAssemblyName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/internalsvisibletoattribute/IVTACtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/internalsvisibletoattribute/internalsvisibletoattributeassemblyname.cs181
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/internalsvisibletoattribute/internalsvisibletoattributector.cs74
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/methodimploptions/MethodImplOptionsNoInlining.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/methodimploptions/MethodImplOptionsPreserveSig.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/methodimploptions/methodimploptionsnoinlining.cs86
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/methodimploptions/methodimploptionspreservesig.cs86
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimecompatibilityattribute/RCAttrWrapNEThrows.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimecompatibilityattribute/RuntimeCompatAttrCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimecompatibilityattribute/runtimecompatibilityattributector.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimecompatibilityattribute/runtimecompatibilityattributewrapnonexceptionthrows.cs112
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/GetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/PlatformAssembly.csproj44
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/UserAssembly.csproj44
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/gethashcode.cs98
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/platformassembly.cs49
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/userassembly.cs115
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/decimalconstantattribute/DecimalConstantAttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/decimalconstantattribute/DecimalConstantAttributeValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/decimalconstantattribute/decimalconstantattributector.cs118
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/decimalconstantattribute/decimalconstantattributevalue.cs107
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/FixedBufferAttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/FixedBufferAttributeElementType.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/FixedBufferAttributeLength.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/fixedbufferattributector.cs93
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/fixedbufferattributeelementtype.cs86
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/fixedbufferattributelength.cs88
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/callingconvention/CallingConventionWinapi.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/callingconvention/callingconventionwinapi.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/charset/CharSetUnicode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/charset/charsetunicode.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/dllimportattribute/DllImportTest.csproj44
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/dllimportattribute/dllimporttest.cs23
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/fieldoffsetattribute/FieldOffsetAttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/fieldoffsetattribute/FieldOffsetAttributeValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/fieldoffsetattribute/fieldoffsetattributector.cs124
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/fieldoffsetattribute/fieldoffsetattributevalue.cs124
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/GCHandleAddrOfPinnedObject_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/GCHandleAlloc1_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/GCHandleFree_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/GCHandleTarget_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/gchandleaddrofpinnedobject.cs109
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/gchandlealloc1.cs168
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/gchandlefree.cs201
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/gchandletarget.cs277
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/GCHandleTypeNormal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/GCHandleTypePinned.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/GCHandleTypeWeak.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/GCHandleTypeWeakTrackResurrection.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/gchandletypenormal.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/gchandletypepinned.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/gchandletypeweak.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/gchandletypeweaktrackresurrection.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/inattribute/InAttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/inattribute/inattributector.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/layoutkind/LayoutKindAuto.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/layoutkind/LayoutKindSequential.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/layoutkind/layoutkindauto.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/layoutkind/layoutkindsequential.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/MarshalSizeOf1_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/MarshalSizeOf2_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/OleAut32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/marshalsizeof1.cs512
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/marshalsizeof2.cs516
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/oleaut32.cs44
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeArraySubType.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeMarshalCookie.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeMarshalType.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeMarshalTypeRef.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeSizeConst.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeSizeParamIndex.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributearraysubtype.cs82
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributector1.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributector2.cs334
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributemarshalcookie.cs82
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributemarshaltype.cs82
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributemarshaltyperef.cs82
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributesizeconst.cs82
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributesizeparamindex.cs82
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributevalue.cs82
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/outattribute/OutAttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/outattribute/outattributector.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/preservesigattribute/PreserveSigAttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/preservesigattribute/preservesigattributector.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleCtor_cti_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleDangerousAddRef_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleDangerousGetHandle_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleDangerousRelease_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleDispose1_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleDispose2_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleHandle_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleIsClosed_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleIsInvalid_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleSetHandleAsInvalid_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleSetHandle_PSC.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandlector_cti.cs149
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandledangerousaddref.cs229
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandledangerousgethandle.cs272
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandledangerousrelease.cs398
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandledispose1.cs238
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandledispose2.cs361
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandlehandle.cs148
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandleisclosed.cs153
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandleisinvalid.cs170
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandlesethandle.cs133
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandlesethandleasinvalid.cs133
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/StructLayoutAttributeCharSet.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/StructLayoutAttributeCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/StructLayoutAttributePack.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/StructLayoutAttributeSize.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/StructLayoutAttributeValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/structlayoutattributecharset.cs80
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/structlayoutattributector.cs58
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/structlayoutattributepack.cs80
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/structlayoutattributesize.cs80
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/structlayoutattributevalue.cs80
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/unmanagedtype/UnmanagedType.csproj44
-rw-r--r--tests/src/CoreMangLib/cti/system/runtime/interopservices/unmanagedtype/unmanagedtype.csbin0 -> 5876 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/runtimefieldhandle/RuntimeFieldHandleEquals.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtimefieldhandle/RuntimeFieldHandleGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtimefieldhandle/runtimefieldhandleequals.cs172
-rw-r--r--tests/src/CoreMangLib/cti/system/runtimefieldhandle/runtimefieldhandlegethashcode.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/runtimemethodhandle/RuntimeMethodHandleEquals.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtimemethodhandle/RuntimeMethodHanldeGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtimemethodhandle/runtimemethodhandleequals.cs115
-rw-r--r--tests/src/CoreMangLib/cti/system/runtimemethodhandle/runtimemethodhanldegethashcode.cs89
-rw-r--r--tests/src/CoreMangLib/cti/system/runtimetypehandle/RuntimeTypeHandleEquals.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtimetypehandle/RuntimeTypeHandleGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/runtimetypehandle/runtimetypehandleequals.cs318
-rw-r--r--tests/src/CoreMangLib/cti/system/runtimetypehandle/runtimetypehandlegethashcode.cs228
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/SByteCompareTo2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/SByteEquals1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/SByteEquals2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/SByteGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToBoolean.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToChar.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToDecimal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToDouble.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToUInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToUInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToUInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/SByteMaxValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/SByteMinValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/SByteParse1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/SByteParse2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/SByteParse3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/SByteTryParse.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/sbytecompareto2.cs129
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/sbyteequals1.cs197
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/sbyteequals2.cs172
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/sbytegethashcode.cs169
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletoboolean.cs201
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletobyte.cs157
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletochar.cs157
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletodecimal.cs154
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletodouble.cs158
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletoint16.cs158
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletoint32.cs158
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletoint64.cs158
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletouint16.cs157
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletouint32.cs157
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletouint64.cs157
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/sbytemaxvalue.cs77
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/sbyteminvalue.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/sbyteparse1.cs253
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/sbyteparse2.cs330
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/sbyteparse3.cs402
-rw-r--r--tests/src/CoreMangLib/cti/system/sbyte/sbytetryparse.cs499
-rw-r--r--tests/src/CoreMangLib/cti/system/security/securityexception/SecurityExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/security/securityexception/SecurityExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/security/securityexception/SecurityExceptionCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/security/securityexception/SecurityExceptionToString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/security/securityexception/securityexceptionctor1.cs65
-rw-r--r--tests/src/CoreMangLib/cti/system/security/securityexception/securityexceptionctor2.cs70
-rw-r--r--tests/src/CoreMangLib/cti/system/security/securityexception/securityexceptionctor3.cs86
-rw-r--r--tests/src/CoreMangLib/cti/system/security/securityexception/securityexceptiontostring.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleEpsilon.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleIsInfinity.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleIsNaN.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleIsNegativeInfinity.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleIsPositiveInfinity.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleMaxValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleMinValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleNaN.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleParse1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleParse2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleToBoolean.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleToByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleToChar.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleToDateTime.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleToDecimal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleToDouble.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleToInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleToInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleToInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleToSByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleToSingle.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleToUInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleToUInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleToUInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/SingleTryParse.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singleepsilon.csbin0 -> 3342 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singlegethashcode.cs152
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singleisinfinity.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singleisnan.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singleisnegativeinfinity.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singleispositiveinfinity.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singlemaxvalue.csbin0 -> 3412 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singleminvalue.csbin0 -> 3402 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singlenan.csbin0 -> 3482 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singleparse1.csbin0 -> 21004 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singleparse2.csbin0 -> 35332 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singletoboolean.cs219
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singletobyte.cs107
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singletochar.csbin0 -> 3704 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singletodatetime.csbin0 -> 3768 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singletodecimal.cs129
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singletodouble.cs129
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singletoint16.cs193
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singletoint32.cs194
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singletoint64.cs193
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singletosbyte.cs193
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singletosingle.cs172
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singletouint16.cs137
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singletouint32.cs137
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singletouint64.cs137
-rw-r--r--tests/src/CoreMangLib/cti/system/single/singletryparse.cs615
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringChars.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringCompare1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringCompare15.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringCompare2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringCompare9.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringCompareOrdinal1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringCompareOrdinal2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringConcat1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringConcat2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringConcat3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringConcat4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringConcat5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringConcat6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringConcat7.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringConcat8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringCopyTo.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringCtor5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringCtorChar.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringEmpty.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringEquals1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringEquals2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringEquals3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringEquals6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringFormat1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringFormat2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringGetEnumerator.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringIConvertibleToBoolean.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringIConvertibleToByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringIConvertibleToChar.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringIConvertibleToInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringIConvertibleToInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringIConvertibleToInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringIConvertibleToSByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringIConvertibleToUInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringIConvertibleToUInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringIConvertibleToUInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringIEnumerableGetEnumerator.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringIndexOf10.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringInsert.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringIsNullOrEmpty.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringJoin.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringJoin1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringJoin2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringLength.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringPadLeft.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringPadLeft1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringPadLeft2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringPadRight.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringPadRight1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringPadRight2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringRemove1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringRemove2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringReplace1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringReplace2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringSplit1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringSubString1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringSubString2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringToCharArray.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringToString1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringTrim1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringTrim1b.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringTrim2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringTrim3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/StringTrim4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringchars.cs227
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringcompare1.cs724
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringcompare15.cs408
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringcompare2.cs416
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringcompare9.cs218
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringcompareordinal1.cs587
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringcompareordinal2.cs1216
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringconcat1.cs373
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringconcat2.cs476
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringconcat3.cs395
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringconcat4.cs356
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringconcat5.cs501
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringconcat6.cs372
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringconcat7.cs435
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringconcat8.cs384
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringcopyto.cs480
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringctor5.cs305
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringctorchar.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringempty.cs77
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringequals1.cs659
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringequals2.cs512
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringequals3.cs458
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringequals6.cs215
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringformat1.cs581
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringformat2.cs663
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringgetenumerator.cs217
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringgethashcode.cs308
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringiconvertibletoboolean.cs266
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringiconvertibletobyte.cs340
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringiconvertibletochar.cs188
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringiconvertibletoint16.cs384
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringiconvertibletoint32.cs385
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringiconvertibletoint64.cs385
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringiconvertibletosbyte.cs383
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringiconvertibletouint16.cs339
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringiconvertibletouint32.cs339
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringiconvertibletouint64.cs362
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringienumerablegetenumerator.cs218
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringindexof10.cs185
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringinsert.cs374
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringisnullorempty.cs264
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringjoin.csbin0 -> 12426 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringjoin1.cs278
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringjoin2.cs696
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringlength.cs209
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringpadleft.cs101
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringpadleft1.cs276
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringpadleft2.cs285
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringpadright.cs101
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringpadright1.cs276
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringpadright2.cs285
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringremove1.cs269
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringremove2.cs417
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringreplace1.cs379
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringreplace2.cs374
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringsplit1.cs401
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringsubstring1.cs276
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringsubstring2.cs355
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringtochararray.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringtostring1.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringtrim1.cs196
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringtrim1b.cs202
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringtrim2.cs332
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringtrim3.cs269
-rw-r--r--tests/src/CoreMangLib/cti/system/string/stringtrim4.cs298
-rw-r--r--tests/src/CoreMangLib/cti/system/stringcompare/StringComparerCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/stringcompare/stringcomparerctor.cs214
-rw-r--r--tests/src/CoreMangLib/cti/system/stringcomparer/StringComparerCompare2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/stringcomparer/StringComparerEquals1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/stringcomparer/StringComparerEquals3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/stringcomparer/StringComparerGetType.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/stringcomparer/stringcomparercompare2.cs233
-rw-r--r--tests/src/CoreMangLib/cti/system/stringcomparer/stringcomparerequals1.cs174
-rw-r--r--tests/src/CoreMangLib/cti/system/stringcomparer/stringcomparerequals3.cs190
-rw-r--r--tests/src/CoreMangLib/cti/system/stringcomparer/stringcomparergettype.cs213
-rw-r--r--tests/src/CoreMangLib/cti/system/stringcomparison/StringComparisonCurrentCulture.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/stringcomparison/StringComparisonCurrentCultureIgnoreCase.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/stringcomparison/StringComparisonOrdinal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/stringcomparison/StringComparisonOrdinalIgnoreCase.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/stringcomparison/stringcomparisoncurrentculture.cs70
-rw-r--r--tests/src/CoreMangLib/cti/system/stringcomparison/stringcomparisoncurrentcultureignorecase.cs70
-rw-r--r--tests/src/CoreMangLib/cti/system/stringcomparison/stringcomparisonordinal.cs70
-rw-r--r--tests/src/CoreMangLib/cti/system/stringcomparison/stringcomparisonordinalignorecase.cs70
-rw-r--r--tests/src/CoreMangLib/cti/system/szarrayhelper/SZArrayHelperSetItem.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/szarrayhelper/szarrayhelpersetitem.cs48
-rw-r--r--tests/src/CoreMangLib/cti/system/text/decoder/DecoderCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/decoder/DecoderReset.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/decoder/decoderctor.cs84
-rw-r--r--tests/src/CoreMangLib/cti/system/text/decoder/decoderreset.cs146
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoder/EncoderCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoder/encoderctor.cs84
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingBigEndianUnicode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingClone.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingConvert1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingConvert2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingEquals.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetByteCount.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetByteCount1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetByteCount2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetByteCount3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetBytes1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetBytes2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetBytes3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetBytes4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetBytes5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetCharCount.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetCharCount1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetCharCount2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetChars1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetChars2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetChars3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetDecoder.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetEncoder.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetEncoding2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetMaxByteCount.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetMaxCharCount.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetPreamble.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingUTF8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingUnicode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/EncodingWebName.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodingbigendianunicode.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodingclone.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodingconvert1.cs183
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodingconvert2.cs358
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodingctor1.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodingequals.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytecount.cs213
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytecount1.cs113
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytecount2.cs200
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytecount3.cs111
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytes1.cs460
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytes2.cs271
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytes3.cs369
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytes4.cs202
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytes5.cs365
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodinggetcharcount.csbin0 -> 26652 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodinggetcharcount1.cs131
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodinggetcharcount2.cs237
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodinggetchars1.csbin0 -> 40576 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodinggetchars2.cs212
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodinggetchars3.cs377
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodinggetdecoder.cs126
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodinggetencoder.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodinggetencoding2.cs148
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodinggetmaxbytecount.csbin0 -> 9968 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodinggetmaxcharcount.csbin0 -> 9020 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodinggetpreamble.cs106
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodinggetstring.csbin0 -> 26012 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodingunicode.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodingutf8.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/text/encoding/encodingwebname.cs177
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend10.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend11.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend12.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend13.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend14.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend15.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend17.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend18.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend19.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend7.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend8.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend9.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderCapacity.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderCapacity_cti.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderChars.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderInsert.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderInsert3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderInsert4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderLength.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderLength_cti.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderRemove.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderReplace1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderReplace2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderReplace3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderReplace4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderToString1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderToString2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend.cs335
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend1.cs107
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend10.cs129
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend11.cs129
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend12.cs107
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend13.cs155
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend14.cs135
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend15.cs108
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend16.cs157
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend17.cs183
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend18.cs270
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend19.cs258
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend2.cs107
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend3.cs107
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend4.cs140
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend5.cs107
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend6.cs107
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend7.cs109
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend8.cs107
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend9.cs107
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuildercapacity.cs247
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuildercapacity_cti.cs264
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderchars.cs316
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor1.cs57
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor2.cs125
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor3.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor4.cs183
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor5.cs230
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor6.cs230
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderinsert.cs169
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderinsert3.cs254
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderinsert4.cs356
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderlength.cs251
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderlength_cti.cs206
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderremove.cs340
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderreplace1.cs200
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderreplace2.cs311
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderreplace3.cs275
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderreplace4.cs433
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuildertostring1.cs79
-rw-r--r--tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuildertostring2.cs317
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingEquals.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetByteCount1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetByteCount2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetBytes2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetCharCount.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetChars.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetDecoder.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetEncoder.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetMaxByteCount.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetMaxCharCount.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetPreamble.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodingctor1.cs72
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodingequals.cs136
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetbytecount1.cs269
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetbytecount2.cs210
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetbytes2.cs504
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetcharcount.cs384
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetchars.cs560
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetdecoder.cs125
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetencoder.cs126
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggethashcode.cs77
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetmaxbytecount.cs199
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetmaxcharcount.cs172
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetpreamble.cs133
-rw-r--r--tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetstring.cs409
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingEquals.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetByteCount1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetByteCount2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetBytes1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetBytes2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetCharCount.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetChars.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetDecoder.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetEncoder.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetMaxByteCount.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetMaxCharCount.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetPreamble.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodingctor.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodingctor2.cs131
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodingctor3.cs187
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodingequals.cs161
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetbytecount1.cs238
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetbytecount2.cs142
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetbytes1.cs373
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetbytes2.cs341
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetcharcount.cs234
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetchars.cs372
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetdecoder.cs98
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetencoder.cs98
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggethashcode.cs133
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetmaxbytecount.cs105
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetmaxcharcount.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetpreamble.cs100
-rw-r--r--tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetstring.cs201
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/autoresetevent/AutoResetEventCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/autoresetevent/AutoResetEventReSet.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/autoresetevent/AutoResetEventSet.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/autoresetevent/autoreseteventctor.cs110
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/autoresetevent/autoreseteventreset.cs89
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/autoresetevent/autoreseteventset.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedAdd1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedAdd2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedCompareExchange1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedCompareExchange5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedCompareExchange6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedCompareExchange7.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedDecrement1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedDecrement2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedExchange1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedExchange5.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedExchange6.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedExchange7.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedIncrement1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedIncrement2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedadd1.cs224
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedadd2.cs214
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedcompareexchange1.cs141
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedcompareexchange5.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedcompareexchange6.cs130
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedcompareexchange7.cs361
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/interlockeddecrement1.cs115
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/interlockeddecrement2.cs115
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedexchange1.cs84
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedexchange5.cs85
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedexchange6.cs83
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedexchange7.cs149
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedincrement1.cs115
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedincrement2.cs115
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/manualresetevent/ManualResetEventCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/manualresetevent/manualreseteventctor.cs97
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/timeout/TimeOutInfinite.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/timeout/timeoutinfinite.cs71
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/waithandle/WaitHandleCtor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/waithandle/WaitHandleDispose1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/waithandle/WaitHandleDispose3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/waithandle/waithandlector.cs79
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/waithandle/waithandledispose1.cs149
-rw-r--r--tests/src/CoreMangLib/cti/system/threading/waithandle/waithandledispose3.cs101
-rw-r--r--tests/src/CoreMangLib/cti/system/timeoutexception/TimeoutExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timeoutexception/TimeoutExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timeoutexception/TimeoutExceptionCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timeoutexception/timeoutexceptionctor1.cs69
-rw-r--r--tests/src/CoreMangLib/cti/system/timeoutexception/timeoutexceptionctor2.cs147
-rw-r--r--tests/src/CoreMangLib/cti/system/timeoutexception/timeoutexceptionctor3.cs176
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanAdd.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanCompare1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanCompareTo2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanCtor4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanDuration.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanEquals1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanEquals2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanEquals3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanFromTicks.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanMaxValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanMinValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanNegate.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanTicks.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanTicksPerDay.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanTicksPerHour.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanTicksPerMinute.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanTicksPerSecond.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanToString_str.csproj46
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanTotalDays.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanTotalHours.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanTotalMilliseconds.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanTotalMinutes.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanTotalSeconds.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/TimeSpanZero.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespanadd.cs161
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespancompare1.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespancompareto2.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespanctor1.cs172
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespanctor2.cs175
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespanctor3.cs177
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespanctor4.cs133
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespanduration.cs178
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespanequals1.cs172
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespanequals2.cs138
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespanequals3.cs141
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespanfromticks.cs106
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespangethashcode.cs108
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespanmaxvalue.cs84
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespanminvalue.cs84
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespannegate.cs181
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespansupport.cs168
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespanticks.cs74
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespanticksperday.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespanticksperhour.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespanticksperminute.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespantickspersecond.cs75
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespantostring_str.cs279
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespantotaldays.cs139
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespantotalhours.cs151
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespantotalmilliseconds.cs123
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespantotalminutes.cs150
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespantotalseconds.cs151
-rw-r--r--tests/src/CoreMangLib/cti/system/timespan/timespanzero.cs84
-rw-r--r--tests/src/CoreMangLib/cti/system/type/TypeEquals1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/type/TypeEquals2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/type/TypeGetArrayRank.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/type/TypeGetElementType.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/type/TypeGetGenericTypeDefinition.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/type/TypeGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/type/TypeGetType1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/type/TypeGetType2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/type/TypeGetTypeFromHandle.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/type/TypeHasElementTypeImpl.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/type/TypeIsByRefImpl.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/type/TypeIsPointerImpl.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/type/TypeMakeArrayType1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/type/TypeMakeArrayType2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/type/TypeMakeByRefType.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/type/TypeMakePointerType.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/type/TypeToString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/type/typeequals1.cs211
-rw-r--r--tests/src/CoreMangLib/cti/system/type/typeequals2.cs123
-rw-r--r--tests/src/CoreMangLib/cti/system/type/typegetarrayrank.cs199
-rw-r--r--tests/src/CoreMangLib/cti/system/type/typegetelementtype.csbin0 -> 5722 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/type/typegetgenerictypedefinition.cs127
-rw-r--r--tests/src/CoreMangLib/cti/system/type/typegethashcode.cs116
-rw-r--r--tests/src/CoreMangLib/cti/system/type/typegettype1.cs120
-rw-r--r--tests/src/CoreMangLib/cti/system/type/typegettype2.cs176
-rw-r--r--tests/src/CoreMangLib/cti/system/type/typegettypefromhandle.cs140
-rw-r--r--tests/src/CoreMangLib/cti/system/type/typehaselementtypeimpl.cs121
-rw-r--r--tests/src/CoreMangLib/cti/system/type/typeisbyrefimpl.cs101
-rw-r--r--tests/src/CoreMangLib/cti/system/type/typeispointerimpl.cs195
-rw-r--r--tests/src/CoreMangLib/cti/system/type/typemakearraytype1.cs238
-rw-r--r--tests/src/CoreMangLib/cti/system/type/typemakearraytype2.cs385
-rw-r--r--tests/src/CoreMangLib/cti/system/type/typemakebyreftype.cs216
-rw-r--r--tests/src/CoreMangLib/cti/system/type/typemakepointertype.cs183
-rw-r--r--tests/src/CoreMangLib/cti/system/type/typetostring.cs287
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/TypeCodeBoolean.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/TypeCodeByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/TypeCodeChar.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/TypeCodeDateTime.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/TypeCodeDecimal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/TypeCodeDouble.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/TypeCodeEmpty.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/TypeCodeInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/TypeCodeInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/TypeCodeInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/TypeCodeObject.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/TypeCodeSByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/TypeCodeSingle.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/TypeCodeString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/TypeCodeUInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/TypeCodeUInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/TypeCodeUInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/typecodeboolean.cs103
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/typecodebyte.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/typecodechar.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/typecodedatetime.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/typecodedecimal.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/typecodedouble.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/typecodeempty.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/typecodeint16.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/typecodeint32.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/typecodeint64.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/typecodeobject.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/typecodesbyte.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/typecodesingle.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/typecodestring.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/typecodeuint16.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/typecodeuint32.cs98
-rw-r--r--tests/src/CoreMangLib/cti/system/typecode/typecodeuint64.cs102
-rw-r--r--tests/src/CoreMangLib/cti/system/typeloadexception/TypeLoadExceptionCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/typeloadexception/TypeLoadExceptionCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/typeloadexception/TypeLoadExceptionCtor3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/typeloadexception/TypeLoadExceptionMessage.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/typeloadexception/typeloadexceptionctor1.cs70
-rw-r--r--tests/src/CoreMangLib/cti/system/typeloadexception/typeloadexceptionctor2.cs189
-rw-r--r--tests/src/CoreMangLib/cti/system/typeloadexception/typeloadexceptionctor3.cs189
-rw-r--r--tests/src/CoreMangLib/cti/system/typeloadexception/typeloadexceptionmessage.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16CompareTo1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16Equals1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16Equals2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToBoolean.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToChar.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToDateTime.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToDecimal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToDouble.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToSByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToSingle.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToType.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToUInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToUInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToUInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16Parse1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16Parse2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16Parse3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16ToString3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16ToString4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/UInt16TryParse.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16compareto1.cs156
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16equals1.cs181
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16equals2.cs156
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletoboolean.cs155
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletobyte.cs195
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletochar.cs158
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletodatetime.cs81
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletodecimal.cs158
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletodouble.cs158
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletoint16.cs195
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletoint32.cs158
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletoint64.cs158
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletosbyte.cs195
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletosingle.cs158
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletotype.cs626
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletouint16.cs158
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletouint32.cs158
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletouint64.cs158
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16parse1.cs284
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16parse2.cs503
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16parse3.cs548
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16tostring3.cs251
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16tostring4.cs251
-rw-r--r--tests/src/CoreMangLib/cti/system/uint16/uint16tryparse.cs554
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32CompareTo2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32Equals1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32Equals2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32GetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToBoolean.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToChar.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToDecimal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToDouble.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToSByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToSingle.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToType.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToUInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToUInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToUInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32MaxValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32MinValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32Parse1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32Parse2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32Parse3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32ToString2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/UInt32TryParse.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32compareto2.cs159
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32equals1.cs208
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32equals2.cs158
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32gethashcode.cs184
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletoboolean.cs156
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletobyte.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletochar.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletodecimal.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletodouble.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletoint16.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletoint32.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletoint64.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletosbyte.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletosingle.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletotype.cs340
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletouint16.cs130
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletouint32.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletouint64.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32maxvalue.cs84
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32minvalue.cs61
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32parse1.cs357
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32parse2.cs392
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32parse3.cs334
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32tostring2.cs203
-rw-r--r--tests/src/CoreMangLib/cti/system/uint32/uint32tryparse.cs556
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/UInt64GetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToBoolean.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToChar.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToDateTime.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToDecimal.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToDouble.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToSByte.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToSingle.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToType.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToUInt16.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToUInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToUInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/UInt64MaxValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/UInt64MinValue.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/UInt64Parse1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/UInt64Parse2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/UInt64Parse3.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/UInt64ToString2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/UInt64TryParse.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/uint64gethashcode.cs119
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletoboolean.cs156
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletobyte.cs134
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletochar.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletodatetime.cs123
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletodecimal.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletodouble.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletoint16.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletoint32.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletoint64.cs133
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletosbyte.cs132
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletosingle.cs129
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletotype.cs300
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletouint16.cs131
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletouint32.cs131
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletouint64.cs133
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/uint64maxvalue.cs98
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/uint64minvalue.cs73
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/uint64parse1.cs354
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/uint64parse2.cs391
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/uint64parse3.cs331
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/uint64tostring2.cs238
-rw-r--r--tests/src/CoreMangLib/cti/system/uint64/uint64tryparse.cs561
-rw-r--r--tests/src/CoreMangLib/cti/system/uintptr/UIntPtrCtor_UInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uintptr/UIntPtrCtor_UInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uintptr/UIntPtrCtor_VoidPtr.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uintptr/UIntPtrEquals.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uintptr/UIntPtrGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uintptr/UIntPtrSize.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uintptr/UIntPtrToPointer.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uintptr/UIntPtrToString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uintptr/UIntPtrToUInt32.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uintptr/UIntPtrToUInt64.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uintptr/UIntPtrZero.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/uintptr/uintptrctor_uint32.cs162
-rw-r--r--tests/src/CoreMangLib/cti/system/uintptr/uintptrctor_uint64.cs249
-rw-r--r--tests/src/CoreMangLib/cti/system/uintptr/uintptrctor_voidptr.cs187
-rw-r--r--tests/src/CoreMangLib/cti/system/uintptr/uintptrequals.cs271
-rw-r--r--tests/src/CoreMangLib/cti/system/uintptr/uintptrgethashcode.cs198
-rw-r--r--tests/src/CoreMangLib/cti/system/uintptr/uintptrsize.cs76
-rw-r--r--tests/src/CoreMangLib/cti/system/uintptr/uintptrtopointer.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/uintptr/uintptrtostring.cs198
-rw-r--r--tests/src/CoreMangLib/cti/system/uintptr/uintptrtouint32.cs257
-rw-r--r--tests/src/CoreMangLib/cti/system/uintptr/uintptrtouint64.cs177
-rw-r--r--tests/src/CoreMangLib/cti/system/uintptr/uintptrzero.cs233
-rw-r--r--tests/src/CoreMangLib/cti/system/valuetype/ValueTypeEquals.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/valuetype/ValueTypeEquals2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/valuetype/valuetypeequals.csbin0 -> 16240 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/valuetype/valuetypeequals2.csbin0 -> 18078 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/version/VersionBuild.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/version/VersionCompareTo2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/version/VersionCtor4.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/version/VersionEquals1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/version/VersionEquals2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/version/VersionGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/version/VersionMajor.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/version/VersionRevision.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/version/VersionToString1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/version/VersionToString2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/version/versionbuild.cs138
-rw-r--r--tests/src/CoreMangLib/cti/system/version/versioncompareto2.cs144
-rw-r--r--tests/src/CoreMangLib/cti/system/version/versionctor4.cs310
-rw-r--r--tests/src/CoreMangLib/cti/system/version/versionequals1.cs146
-rw-r--r--tests/src/CoreMangLib/cti/system/version/versionequals2.cs93
-rw-r--r--tests/src/CoreMangLib/cti/system/version/versiongethashcode.cs81
-rw-r--r--tests/src/CoreMangLib/cti/system/version/versionmajor.cs110
-rw-r--r--tests/src/CoreMangLib/cti/system/version/versionrevision.cs139
-rw-r--r--tests/src/CoreMangLib/cti/system/version/versiontostring1.cs84
-rw-r--r--tests/src/CoreMangLib/cti/system/version/versiontostring2.cs147
-rw-r--r--tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceCtor1_PSC.csproj46
-rw-r--r--tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceCtor2_PSC.csproj47
-rw-r--r--tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceCtor2b_PSC.csproj46
-rw-r--r--tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceIsAlive_PSC.csproj47
-rw-r--r--tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceIsAliveb_PSC.csproj46
-rw-r--r--tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceTargetb_PSC.csproj46
-rw-r--r--tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceTrackResurrection_cti_PSC.csproj46
-rw-r--r--tests/src/CoreMangLib/cti/system/weakreference/helper.cs33
-rw-r--r--tests/src/CoreMangLib/cti/system/weakreference/weakreferencector1.cs380
-rw-r--r--tests/src/CoreMangLib/cti/system/weakreference/weakreferencector2.cs137
-rw-r--r--tests/src/CoreMangLib/cti/system/weakreference/weakreferencector2b.cs296
-rw-r--r--tests/src/CoreMangLib/cti/system/weakreference/weakreferenceisalive.cs119
-rw-r--r--tests/src/CoreMangLib/cti/system/weakreference/weakreferenceisaliveb.cs334
-rw-r--r--tests/src/CoreMangLib/cti/system/weakreference/weakreferencetargetb.cs392
-rw-r--r--tests/src/CoreMangLib/cti/system/weakreference/weakreferencetrackresurrection_cti.cs320
-rw-r--r--tests/src/CoreMangLib/reflection/assembly/TestAssemblyAppBase.csproj45
-rw-r--r--tests/src/CoreMangLib/reflection/assembly/TestAssemblyNotAppBase.csproj45
-rw-r--r--tests/src/CoreMangLib/reflection/assembly/testassembly.cs18
-rw-r--r--tests/src/CoreMangLib/system/buffer/ASURT_99893.csproj45
-rw-r--r--tests/src/CoreMangLib/system/buffer/asurt_99893.cs106
-rw-r--r--tests/src/CoreMangLib/system/collections/generic/hashset/Regression_Dev10_609271.csproj44
-rw-r--r--tests/src/CoreMangLib/system/collections/generic/hashset/Regression_Dev10_624201.csproj44
-rw-r--r--tests/src/CoreMangLib/system/collections/generic/hashset/regression_dev10_609271.cs28
-rw-r--r--tests/src/CoreMangLib/system/collections/generic/hashset/regression_dev10_624201.cs43
-rw-r--r--tests/src/CoreMangLib/system/datetime/Co7510ParseExact_formatarray.csproj44
-rw-r--r--tests/src/CoreMangLib/system/datetime/co7510parseexact_formatarray.cs69
-rw-r--r--tests/src/CoreMangLib/system/delegate/VSD/OpenDelegate.cs50
-rw-r--r--tests/src/CoreMangLib/system/delegate/VSD/OpenDelegate.csproj39
-rw-r--r--tests/src/CoreMangLib/system/delegate/generics/NG_Standard.csproj45
-rw-r--r--tests/src/CoreMangLib/system/delegate/generics/NegativeGenerics.csproj44
-rw-r--r--tests/src/CoreMangLib/system/delegate/generics/NullableTypes.csproj44
-rw-r--r--tests/src/CoreMangLib/system/delegate/generics/common.cs333
-rw-r--r--tests/src/CoreMangLib/system/delegate/generics/negativegenerics.cs38
-rw-r--r--tests/src/CoreMangLib/system/delegate/generics/ng_standard.cs110
-rw-r--r--tests/src/CoreMangLib/system/delegate/generics/nullabletypes.cs349
-rw-r--r--tests/src/CoreMangLib/system/delegate/miscellaneous/Central.csproj44
-rw-r--r--tests/src/CoreMangLib/system/delegate/miscellaneous/ClosedStatic.cs41
-rw-r--r--tests/src/CoreMangLib/system/delegate/miscellaneous/ClosedStatic.csproj43
-rw-r--r--tests/src/CoreMangLib/system/delegate/miscellaneous/Co6010DelegateEqualsTwo.csproj47
-rw-r--r--tests/src/CoreMangLib/system/delegate/miscellaneous/Co6031GetHashCode.csproj47
-rw-r--r--tests/src/CoreMangLib/system/delegate/miscellaneous/central.csbin0 -> 9294 bytes
-rw-r--r--tests/src/CoreMangLib/system/delegate/miscellaneous/co6010delegateequalstwo.csbin0 -> 32312 bytes
-rw-r--r--tests/src/CoreMangLib/system/delegate/miscellaneous/co6031gethashcode.cs86
-rw-r--r--tests/src/CoreMangLib/system/delegate/regressions/devdivbugs/113347/DDB113347.csproj45
-rw-r--r--tests/src/CoreMangLib/system/delegate/regressions/devdivbugs/113347/ddb113347.cs42
-rw-r--r--tests/src/CoreMangLib/system/delegate/threatmodel/public/TestClass.csproj44
-rw-r--r--tests/src/CoreMangLib/system/delegate/threatmodel/public/TestClassFrameworkInternal.csproj44
-rw-r--r--tests/src/CoreMangLib/system/delegate/threatmodel/public/testclass.cs46
-rw-r--r--tests/src/CoreMangLib/system/delegate/threatmodel/public/testclassframeworkinternal.cs28
-rw-r--r--tests/src/CoreMangLib/system/delegate/threatmodel/tests/BindingTarget.csproj44
-rw-r--r--tests/src/CoreMangLib/system/delegate/threatmodel/tests/CritConstructorClass.csproj44
-rw-r--r--tests/src/CoreMangLib/system/delegate/threatmodel/tests/TestClass.csproj44
-rw-r--r--tests/src/CoreMangLib/system/delegate/threatmodel/tests/TestClassFrameworkInternal.csproj44
-rw-r--r--tests/src/CoreMangLib/system/delegate/threatmodel/tests/bindingtarget.cs52
-rw-r--r--tests/src/CoreMangLib/system/delegate/threatmodel/tests/critconstructorclass.cs20
-rw-r--r--tests/src/CoreMangLib/system/delegate/threatmodel/tests/testclass.cs44
-rw-r--r--tests/src/CoreMangLib/system/delegate/threatmodel/tests/testclassframeworkinternal.cs27
-rw-r--r--tests/src/CoreMangLib/system/exception/Data_Helper.csproj44
-rw-r--r--tests/src/CoreMangLib/system/exception/data_helper.cs42
-rw-r--r--tests/src/CoreMangLib/system/guid/Guid_Parsing.csproj45
-rw-r--r--tests/src/CoreMangLib/system/guid/guid_parsing.cs968
-rw-r--r--tests/src/CoreMangLib/system/lazyt/LazyTTF.csproj45
-rw-r--r--tests/src/CoreMangLib/system/lazyt/lazyttf.cs14
-rw-r--r--tests/src/CoreMangLib/system/reflection/assembly/server1.cs17
-rw-r--r--tests/src/CoreMangLib/system/reflection/assembly/server1.csproj45
-rw-r--r--tests/src/CoreMangLib/system/reflection/assembly/server2.cs17
-rw-r--r--tests/src/CoreMangLib/system/reflection/assembly/server2.csproj45
-rw-r--r--tests/src/CoreMangLib/system/reflection/assembly/server3.cs17
-rw-r--r--tests/src/CoreMangLib/system/reflection/assembly/server3.csproj45
-rw-r--r--tests/src/CoreMangLib/system/reflection/assembly/server4.cs17
-rw-r--r--tests/src/CoreMangLib/system/reflection/assembly/server4.csproj45
-rw-r--r--tests/src/CoreMangLib/system/resources/resourcemanager/CustomCulture.csproj44
-rw-r--r--tests/src/CoreMangLib/system/resources/resourcemanager/customculture.cs64
-rw-r--r--tests/src/CoreMangLib/system/text/encoding/Shift_Jis.csproj45
-rw-r--r--tests/src/CoreMangLib/system/text/encoding/shift_jis.cs224
-rw-r--r--tests/src/CoreMangLib/system/version/Version_Parsing.csproj45
-rw-r--r--tests/src/CoreMangLib/system/version/version_parsing.cs317
4596 files changed, 464412 insertions, 0 deletions
diff --git a/tests/src/CoreMangLib/components/fileversioninfo/Assembly1.csproj b/tests/src/CoreMangLib/components/fileversioninfo/Assembly1.csproj
new file mode 100644
index 0000000000..f81ebf6f66
--- /dev/null
+++ b/tests/src/CoreMangLib/components/fileversioninfo/Assembly1.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="assembly1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/components/fileversioninfo/assembly1.cs b/tests/src/CoreMangLib/components/fileversioninfo/assembly1.cs
new file mode 100644
index 0000000000..52290faf37
--- /dev/null
+++ b/tests/src/CoreMangLib/components/fileversioninfo/assembly1.cs
@@ -0,0 +1,23 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Reflection;
+
+// Comments
+[assembly:AssemblyDescriptionAttribute("This is the description.")]
+// CompanyName
+[assembly:AssemblyCompanyAttribute("The name of the company.")]
+// FileDescription
+[assembly:AssemblyTitleAttribute("My File")]
+// FileVersion & ProductVersion
+[assembly:AssemblyFileVersionAttribute("4.3.2.1")]
+// LegalCopyright
+[assembly:AssemblyCopyrightAttribute("Copyright, you betcha!")]
+// LegalTrademarks
+[assembly:AssemblyTrademarkAttribute("TM")]
+// Product
+[assembly:AssemblyProductAttribute("The greatest product EVER")]
+public class Test
+{
+}
+
diff --git a/tests/src/CoreMangLib/components/stopwatch/Co9600Ctor.csproj b/tests/src/CoreMangLib/components/stopwatch/Co9600Ctor.csproj
new file mode 100644
index 0000000000..94138fcb48
--- /dev/null
+++ b/tests/src/CoreMangLib/components/stopwatch/Co9600Ctor.csproj
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="co9600ctor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/components/stopwatch/Co9604get_IsRunning.csproj b/tests/src/CoreMangLib/components/stopwatch/Co9604get_IsRunning.csproj
new file mode 100644
index 0000000000..3e666b807c
--- /dev/null
+++ b/tests/src/CoreMangLib/components/stopwatch/Co9604get_IsRunning.csproj
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="co9604get_isrunning.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/components/stopwatch/co9600ctor.cs b/tests/src/CoreMangLib/components/stopwatch/co9600ctor.cs
new file mode 100644
index 0000000000..6a00dfac03
--- /dev/null
+++ b/tests/src/CoreMangLib/components/stopwatch/co9600ctor.cs
@@ -0,0 +1,184 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+using System.Diagnostics;
+
+public class Co9600Ctor
+{
+ public static String s_strActiveBugNums = "";
+ public static String s_strDtTmVer = "2003/02/03 09:49 LakshanF";
+ public static String s_strClassMethod = "StopWatch.Ctor()";
+ public static String s_strTFName = "Co9600Ctor.cs";
+ public static String s_strTFAbbrev = s_strTFName.Substring(0, 6);
+
+
+ public Boolean runTest()
+ {
+ int iCountErrors = 0;
+ int iCountTestcases = 0;
+ String strLoc = "Loc_000oo";
+
+ Stopwatch watch;
+
+
+ try
+ {
+
+ //Scenario 1: Vanilla - ensure that a valid componenet is returned
+
+ strLoc = "Loc_001oo";
+
+ iCountTestcases++;
+
+ try
+ {
+ watch = new Stopwatch();
+
+ if(watch==null)
+ {
+ iCountErrors++;
+ Console.WriteLine("Err_974tsg! null returned");
+ }
+
+ }catch(Exception ex){
+ iCountErrors++;
+ Console.WriteLine("Err_346gr! Unexpected exception thrown! {0}", ex);
+ }
+
+ //Scenario 2: Check that ElapsedXXX values are zero. Check this after resetting the watch
+
+ strLoc = "Loc_002oo";
+
+ iCountTestcases++;
+
+ try
+ {
+ watch = new Stopwatch();
+
+ if(watch.Elapsed!=TimeSpan.Zero)
+ {
+ iCountErrors++;
+ Console.WriteLine("Err_342rsdg! Unexpected value returned: {0}", watch.Elapsed);
+ }
+
+ if(watch.ElapsedTicks!=0)
+ {
+ iCountErrors++;
+ Console.WriteLine("Err_34rsg! Unexpected value returned: {0}", watch.ElapsedTicks);
+ }
+
+ if(watch.ElapsedMilliseconds!=0)
+ {
+ iCountErrors++;
+ Console.WriteLine("Err_346sg! Unexpected value returned: {0}", watch.ElapsedMilliseconds);
+ }
+
+ watch.Reset();
+
+ if(watch.Elapsed!=TimeSpan.Zero)
+ {
+ iCountErrors++;
+ Console.WriteLine("Err_342rsdg! Unexpected value returned: {0}", watch.Elapsed);
+ }
+
+ if(watch.ElapsedTicks!=0)
+ {
+ iCountErrors++;
+ Console.WriteLine("Err_34rsg! Unexpected value returned: {0}", watch.ElapsedTicks);
+ }
+
+ if(watch.ElapsedMilliseconds!=0)
+ {
+ iCountErrors++;
+ Console.WriteLine("Err_346sg! Unexpected value returned: {0}", watch.ElapsedMilliseconds);
+ }
+
+ }catch(Exception ex){
+ iCountErrors++;
+ Console.WriteLine("Err_234s7g! Unexpected exception thrown! {0}", ex);
+ }
+
+ //Scenario 3: " Check that IsRunning returns false
+
+ strLoc = "Loc_003oo";
+
+ iCountTestcases++;
+
+ try
+ {
+ watch = new Stopwatch();
+
+ if(watch.IsRunning)
+ {
+ iCountErrors++;
+ Console.WriteLine("Err_432s7g! Unexpected value returned: {0}", watch.IsRunning);
+ }
+
+ watch.Reset();
+
+ if(watch.IsRunning)
+ {
+ iCountErrors++;
+ Console.WriteLine("Err_467sfg! Unexpected value returned: {0}", watch.IsRunning);
+ }
+
+ }catch(Exception ex){
+ iCountErrors++;
+ Console.WriteLine("Err_3407sfg! Unexpected exception thrown! {0}", ex);
+ }
+
+
+
+
+ }
+ catch(Exception globalE)
+ {
+ iCountErrors++;
+ Console.WriteLine("Err_9374sfg! Unexpected exception thrown: location: {0}\r\n{1}", strLoc, globalE);
+ }
+
+ //// Finish Diagnostics
+
+ if ( iCountErrors == 0 )
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+
+ static int Main()
+ {
+ Boolean bResult = false;
+ Co9600Ctor cbA = new Co9600Ctor();
+
+ try
+ {
+ bResult = cbA.runTest();
+ }
+ catch (Exception exc_main)
+ {
+ bResult = false;
+ Console.WriteLine(s_strTFAbbrev + " : FAiL! Error Err_9999zzz! Uncaught Exception in main(), exc_main=="+exc_main);
+ }
+
+ if (bResult)
+ {
+ Console.WriteLine("Pass");
+ return 100;
+ }
+ else
+ {
+ Console.WriteLine( "FAiL! "+ s_strTFAbbrev);
+ Console.WriteLine( " " );
+ return 1;
+ }
+ }
+
+
+}
diff --git a/tests/src/CoreMangLib/components/stopwatch/co9604get_isrunning.cs b/tests/src/CoreMangLib/components/stopwatch/co9604get_isrunning.cs
new file mode 100644
index 0000000000..688bb327f4
--- /dev/null
+++ b/tests/src/CoreMangLib/components/stopwatch/co9604get_isrunning.cs
@@ -0,0 +1,209 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+using System.Diagnostics;
+using System.Threading;
+using System.Runtime.InteropServices;
+
+public class Co9604get_IsRunning
+{
+ public static String s_strActiveBugNums = "";
+ public static String s_strDtTmVer = "2003/02/12 08:43 LakshanF";
+ public static String s_strClassMethod = "StopWatch.IsRunning";
+ public static String s_strTFName = "Co9604get_IsRunning.cs";
+ public static String s_strTFAbbrev = s_strTFName.Substring(0, 6);
+
+ public Boolean runTest()
+ {
+ int iCountErrors = 0;
+ int iCountTestcases = 0;
+ String strLoc = "Loc_000oo";
+
+ Stopwatch watch;
+
+ try
+ {
+
+ //Scenario 1: Createa a new Stopwatch instance and ensure that IsRunning is false
+ //Scenario 2: Start and ensure that the property is true
+ //Sceanrio 3: Start, stop and check that property is false
+
+ strLoc = "Loc_001oo";
+
+ iCountTestcases++;
+
+ try
+ {
+ watch = new Stopwatch();
+
+ if(watch.IsRunning)
+ {
+ iCountErrors++;
+ Console.WriteLine("Err_367sfg! Unexpected value returned: {0}", watch.IsRunning);
+ }
+
+ watch.Start();
+
+ if(!watch.IsRunning)
+ {
+ iCountErrors++;
+ Console.WriteLine("Err_3tw7sdg! Unexpected value returned: {0}", watch.IsRunning);
+ }
+
+ watch.Stop();
+
+ if(watch.IsRunning)
+ {
+ iCountErrors++;
+ Console.WriteLine("Err_24t7dg! Unexpected value returned: {0}", watch.IsRunning);
+ }
+
+ }catch(Exception ex){
+ iCountErrors++;
+ Console.WriteLine("Err_346gr! Unexpected exception thrown! {0}", ex);
+ }
+
+
+ //Scenario 4: " Start multiple times and check that property is true
+ //Scenario 5: " Stop multiple times and check property is false
+
+ strLoc = "Loc_002oo";
+
+ iCountTestcases++;
+
+ try
+ {
+ watch = new Stopwatch();
+
+ for(int i=0; i<10; i++)
+ {
+ watch.Start();
+
+ if(!watch.IsRunning)
+ {
+ iCountErrors++;
+ Console.WriteLine("Err_23readg_{0}! Unexpected value returned: {1}", i, watch.IsRunning);
+ }
+ }
+
+ for(int i=0; i<10; i++)
+ {
+ watch.Stop();
+
+ if(watch.IsRunning)
+ {
+ iCountErrors++;
+ Console.WriteLine("Err_234457gd_{0}! Unexpected value returned: {1}", i, watch.IsRunning);
+ }
+ }
+
+ }catch(Exception ex){
+ iCountErrors++;
+ Console.WriteLine("Err_346gr! Unexpected exception thrown! {0}", ex);
+ }
+
+
+ //Scenario 6: " Start, Reset and then check that property is false
+
+ strLoc = "Loc_003oo";
+
+ iCountTestcases++;
+
+ try
+ {
+ watch = new Stopwatch();
+
+ watch.Start();
+
+ watch.Reset();
+
+ if(watch.IsRunning)
+ {
+ iCountErrors++;
+ Console.WriteLine("Err_24tsdg! Unexpected value returned: {0}", watch.IsRunning);
+ }
+
+ }catch(Exception ex){
+ iCountErrors++;
+ Console.WriteLine("Err_346gr! Unexpected exception thrown! {0}", ex);
+ }
+
+ //Scenario 7: " Reset (once and then multiple times) and check that property is false
+
+ strLoc = "Loc_005oo";
+
+ iCountTestcases++;
+
+ try
+ {
+ watch = new Stopwatch();
+
+ for(int i=0; i<10; i++)
+ {
+ watch.Reset();
+
+ if(watch.IsRunning)
+ {
+ iCountErrors++;
+ Console.WriteLine("Err_234t7g_{0}! Unexpected value returned: {1}", i, watch.IsRunning);
+ }
+ }
+
+ }catch(Exception ex){
+ iCountErrors++;
+ Console.WriteLine("Err_346gr! Unexpected exception thrown! {0}", ex);
+ }
+
+ }
+ catch(Exception globalE)
+ {
+ iCountErrors++;
+ Console.WriteLine("Err_9374sfg! Unexpected exception thrown: location: {0}\r\n{1}", strLoc, globalE);
+ }
+
+ //// Finish Diagnostics
+
+ if ( iCountErrors == 0 )
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+
+ static int Main()
+ {
+
+ Boolean bResult = false;
+ Co9604get_IsRunning cbA = new Co9604get_IsRunning();
+
+ try
+ {
+ bResult = cbA.runTest();
+ }
+ catch (Exception exc_main)
+ {
+ bResult = false;
+ Console.WriteLine(s_strTFAbbrev + " : FAiL! Error Err_9999zzz! Uncaught Exception in main(), exc_main=="+exc_main);
+ }
+
+ if (bResult)
+ {
+ Console.WriteLine("Pass");
+ return 100;
+ }
+ else
+ {
+ Console.WriteLine("FAiL! " + s_strTFAbbrev);
+ Console.WriteLine(" ");
+ return 1;
+ }
+ }
+
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/action/ActionCtor.csproj b/tests/src/CoreMangLib/cti/system/action/ActionCtor.csproj
new file mode 100644
index 0000000000..8a2b372df8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/action/ActionCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="actionctor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/action/ActionInvoke.csproj b/tests/src/CoreMangLib/cti/system/action/ActionInvoke.csproj
new file mode 100644
index 0000000000..f2b5bf726b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/action/ActionInvoke.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="actioninvoke.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/action/actionctor.cs b/tests/src/CoreMangLib/cti/system/action/actionctor.cs
new file mode 100644
index 0000000000..bf0c8f94dd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/action/actionctor.cs
@@ -0,0 +1,154 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public class ActionCtor
+{
+ private const int c_MIN_RANGE = 64;
+ private const int c_MAX_RANGE = 128;
+ private const int c_DELTA_RANGE = 55;
+
+ public static int Main()
+ {
+ ActionCtor ac = new ActionCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("ActionCtor");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ List<int> list;
+ int startValue;
+ int endValue;
+ int sum;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Action<T> used in List<int>.ForEach");
+
+ try
+ {
+ startValue = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_RANGE-c_MIN_RANGE)) + c_MIN_RANGE;
+ endValue = startValue + c_DELTA_RANGE;
+
+ list = new List<int>();
+
+ // populate the array
+ sum = 0;
+ for(int i=startValue; i<endValue; i++)
+ {
+ list.Add(i);
+ sum += i;
+ }
+
+ // iterate through the entries
+ list.ForEach( delegate(int value)
+ {
+ sum -= value;
+ if (startValue > value || value > endValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Incorrect value: " + value);
+ retVal = false;
+ }
+ }
+ );
+
+ // decent validation that all numbers were accounted for
+ if (0 != sum)
+ {
+ // if sum is not zero that means that some values where not
+ // iterated through
+ TestLibrary.TestFramework.LogError("002", "It appears that not all values where accounted for.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ List<string> list;
+ int startValue;
+ int endValue;
+ int sum;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Action<T> used in List<string>.ForEach");
+
+ try
+ {
+ startValue = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_RANGE-c_MIN_RANGE)) + c_MIN_RANGE;
+ endValue = startValue + c_DELTA_RANGE;
+
+ list = new List<string>();
+
+ // populate the array
+ sum = 0;
+ for(int i=startValue; i<endValue; i++)
+ {
+ list.Add(Convert.ToString(i));
+ sum += i;
+ }
+
+ // iterate through the entries
+ list.ForEach( delegate(string sValue)
+ {
+ int value = Convert.ToInt32(sValue);
+ sum -= value;
+ if (startValue > value || value > endValue)
+ {
+ TestLibrary.TestFramework.LogError("004", "Incorrect value: " + value);
+ retVal = false;
+ }
+ }
+ );
+
+ // decent validation that all numbers were accounted for
+ if (0 != sum)
+ {
+ // if sum is not zero that means that some values where not
+ // iterated through
+ TestLibrary.TestFramework.LogError("005", "It appears that not all values where accounted for.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/action/actioninvoke.cs b/tests/src/CoreMangLib/cti/system/action/actioninvoke.cs
new file mode 100644
index 0000000000..b003fc1dfe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/action/actioninvoke.cs
@@ -0,0 +1,203 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public class ActionInvoke
+{
+ private const int c_DEFAULT_INT = 234;
+ private const string c_DEFAULT_STRING = "The\0default string";
+ private bool g_testCasePassed;
+
+ public static int Main()
+ {
+ ActionInvoke ai = new ActionInvoke();
+
+ TestLibrary.TestFramework.BeginTestCase("ActionInvoke");
+
+ if (ai.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ public void ActionFunction<T>(T obj)
+ {
+ g_testCasePassed = true;
+ // validate input
+ if (typeof(int) == obj.GetType())
+ {
+ if (c_DEFAULT_INT != (int)(object)obj)
+ {
+ TestLibrary.TestFramework.LogError("001", "Failed to get correct value: Expected(" + c_DEFAULT_INT + ") Actual(" + obj + ")");
+ g_testCasePassed = false;
+ }
+ }
+ else if (typeof(string) == obj.GetType())
+ {
+ if (!c_DEFAULT_STRING.Equals((string)(object)obj))
+ {
+ TestLibrary.TestFramework.LogError("002", "Failed to get correct value: Expected(" + c_DEFAULT_STRING + ") Actual(" + obj + ")");
+ g_testCasePassed = false;
+ }
+ }
+ else
+ {
+ TestLibrary.TestFramework.LogError("003", "Failed to get type as expected: " + obj.GetType());
+ g_testCasePassed = false;
+ }
+ }
+
+ public void AsyncCallback(IAsyncResult asyncRes)
+ {
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Action<int> actionDelegate;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Action<int>.Invoke");
+
+ try
+ {
+ // this variable will be set by the delegate if it is run
+ g_testCasePassed = false;
+
+ actionDelegate = new Action<int>( ActionFunction );
+
+ actionDelegate.Invoke(c_DEFAULT_INT);
+
+ retVal = g_testCasePassed;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Action<string> actionDelegate;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Action<string>.Invoke");
+
+ try
+ {
+ // this variable will be set by the delegate if it is run
+ g_testCasePassed = false;
+
+ actionDelegate = new Action<string>( ActionFunction );
+
+ actionDelegate.Invoke(c_DEFAULT_STRING);
+
+ retVal = g_testCasePassed;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ Action<int> actionDelegate;
+ IAsyncResult asyncRes;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Action<int>.BeingInvoke EndInvoke");
+
+ try
+ {
+ // this variable will be set by the delegate if it is run
+ g_testCasePassed = false;
+
+ actionDelegate = new Action<int>( ActionFunction );
+
+ asyncRes = actionDelegate.BeginInvoke(c_DEFAULT_INT, new AsyncCallback( AsyncCallback ), null);
+ actionDelegate.EndInvoke(asyncRes);
+
+ TestLibrary.TestFramework.LogError("003", "Exception expected");
+ retVal = false;
+ }
+ catch (NotSupportedException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ Action<string> actionDelegate;
+ IAsyncResult asyncRes;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Action<string>.BeingInvoke EndInvoke");
+
+ try
+ {
+ // this variable will be set by the delegate if it is run
+ g_testCasePassed = false;
+
+ actionDelegate = new Action<string>( ActionFunction );
+
+ asyncRes = actionDelegate.BeginInvoke(c_DEFAULT_STRING, new AsyncCallback( AsyncCallback ), null);
+ actionDelegate.EndInvoke(asyncRes);
+
+ TestLibrary.TestFramework.LogError("005", "Exception expected");
+ retVal = false;
+ }
+ catch (NotSupportedException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/activator/ActivatorCreateInstance2.csproj b/tests/src/CoreMangLib/cti/system/activator/ActivatorCreateInstance2.csproj
new file mode 100644
index 0000000000..2fac0483fb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/activator/ActivatorCreateInstance2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="activatorcreateinstance2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/activator/activatorcreateinstance2.cs b/tests/src/CoreMangLib/cti/system/activator/activatorcreateinstance2.cs
new file mode 100644
index 0000000000..e26eef13bb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/activator/activatorcreateinstance2.cs
@@ -0,0 +1,137 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public class ActivatorCreateInstance2
+{
+ public ActivatorCreateInstance2() {}
+ public ActivatorCreateInstance2(string str, int i) {}
+
+ public static int Main()
+ {
+ ActivatorCreateInstance2 ac = new ActivatorCreateInstance2();
+
+ TestLibrary.TestFramework.BeginTestCase("ActivatorCreateInstance2");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ object obj;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Activator.CreateInstance(Type, null)");
+
+ try
+ {
+ obj = Activator.CreateInstance(this.GetType(), null);
+
+ if (null == obj)
+ {
+ TestLibrary.TestFramework.LogError("001", "Returned object is null: Obj=" + obj);
+ retVal = false;
+ }
+ if (null == obj || obj.GetType() != this.GetType())
+ {
+ TestLibrary.TestFramework.LogError("002", "Type of object does not match: Expected(" + this.GetType() + ") Actual(" + obj.GetType() + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ object obj;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Activator.CreateInstance(Type, object[])");
+
+ try
+ {
+ obj = Activator.CreateInstance(this.GetType(), new object[2] { "Text", (object)1} );
+
+ if (null == obj)
+ {
+ TestLibrary.TestFramework.LogError("004", "Returned object is null: Obj=" + obj);
+ retVal = false;
+ }
+ if (null == obj || obj.GetType() != this.GetType())
+ {
+ TestLibrary.TestFramework.LogError("005", "Type of object does not match: Expected(" + this.GetType() + ") Actual(" + obj.GetType() + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ object obj;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Activator.CreateInstance(Type, object[]), constructor not found");
+
+ try
+ {
+ obj = Activator.CreateInstance(this.GetType(), new object[1] { "Text"} );
+
+ TestLibrary.TestFramework.LogError("007", "Exception expected");
+ retVal = false;
+ }
+ catch (MissingMethodException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/argumentexception/ArgumentExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/argumentexception/ArgumentExceptionCtor1.csproj
new file mode 100644
index 0000000000..6026faa40d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/argumentexception/ArgumentExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="argumentexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/argumentexception/argumentexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/argumentexception/argumentexceptionctor1.cs
new file mode 100644
index 0000000000..9eef6b747f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/argumentexception/argumentexceptionctor1.cs
@@ -0,0 +1,71 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.ArgumentException.Ctor
+/// </summary>
+public class ArgumentExceptionCtor1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor to construct a new instance");
+
+ try
+ {
+ ArgumentException argumentException = new ArgumentException();
+ if (argumentException == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArgumentExceptionCtor1 test = new ArgumentExceptionCtor1();
+
+ TestLibrary.TestFramework.BeginTestCase("ArgumentExceptionCtor1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/argumentnullexception/ArgumentNullExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/argumentnullexception/ArgumentNullExceptionCtor1.csproj
new file mode 100644
index 0000000000..ad3fe2fe72
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/argumentnullexception/ArgumentNullExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="argumentnullexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/argumentnullexception/argumentnullexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/argumentnullexception/argumentnullexceptionctor1.cs
new file mode 100644
index 0000000000..a6f9c2551f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/argumentnullexception/argumentnullexceptionctor1.cs
@@ -0,0 +1,71 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.ArgumentNullException.Ctor()
+/// </summary>
+public class ArgumentNullExceptionCtor1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor to construct a new instance");
+
+ try
+ {
+ ArgumentNullException argumentNullException = new ArgumentNullException();
+ if (argumentNullException == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArgumentNullExceptionCtor1 test = new ArgumentNullExceptionCtor1();
+
+ TestLibrary.TestFramework.BeginTestCase("ArgumentNullExceptionCtor1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/argumentoutofrangeexception/ArgumentOutOfRangeExceptionCtor.csproj b/tests/src/CoreMangLib/cti/system/argumentoutofrangeexception/ArgumentOutOfRangeExceptionCtor.csproj
new file mode 100644
index 0000000000..e75c4eb701
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/argumentoutofrangeexception/ArgumentOutOfRangeExceptionCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="argumentoutofrangeexceptionctor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/argumentoutofrangeexception/ArgumentOutOfRangeExceptionMessage.csproj b/tests/src/CoreMangLib/cti/system/argumentoutofrangeexception/ArgumentOutOfRangeExceptionMessage.csproj
new file mode 100644
index 0000000000..4611c5e937
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/argumentoutofrangeexception/ArgumentOutOfRangeExceptionMessage.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="argumentoutofrangeexceptionmessage.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/argumentoutofrangeexception/argumentoutofrangeexceptionctor.cs b/tests/src/CoreMangLib/cti/system/argumentoutofrangeexception/argumentoutofrangeexceptionctor.cs
new file mode 100644
index 0000000000..5b31e2acae
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/argumentoutofrangeexception/argumentoutofrangeexceptionctor.cs
@@ -0,0 +1,71 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.ArgumentOutOfRangeException.Ctor()
+/// </summary>
+public class ArgumentOutOfRangeExceptionCtor
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor to construct a new instance");
+
+ try
+ {
+ ArgumentOutOfRangeException argumentOutOfRangeException = new ArgumentOutOfRangeException();
+ if (argumentOutOfRangeException == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArgumentOutOfRangeExceptionCtor test = new ArgumentOutOfRangeExceptionCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("ArgumentOutOfRangeExceptionCtor");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/argumentoutofrangeexception/argumentoutofrangeexceptionmessage.cs b/tests/src/CoreMangLib/cti/system/argumentoutofrangeexception/argumentoutofrangeexceptionmessage.cs
new file mode 100644
index 0000000000..14d2d1b320
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/argumentoutofrangeexception/argumentoutofrangeexceptionmessage.cs
@@ -0,0 +1,186 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.ArgumentOutOfRangeException.Message
+/// </summary>
+public class ArgumentOutOfRangeExceptionMessage
+{
+ private const int c_MIN_STRING_LENGTH = 1;
+ private const int c_MAX_STRING_LENGTH = 256;
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Using ctor1 to test the message property");
+
+ try
+ {
+ string randValue = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ ArgumentOutOfRangeException argumentOutOfRangeException = new ArgumentOutOfRangeException(randValue);
+ if ((argumentOutOfRangeException.Message != "Specified argument was out of the range of valid values." + Environment.NewLine + "Parameter name: " + randValue) &
+ (!argumentOutOfRangeException.Message.Contains("[Arg_ArgumentOutOfRangeException]")))
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Using ctor2 to test the message property");
+
+ try
+ {
+ string randValue = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ string paramName = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ ArgumentOutOfRangeException argumentOutOfRangeException = new ArgumentOutOfRangeException(paramName, randValue);
+ if ((argumentOutOfRangeException.Message != randValue + "" + Environment.NewLine + "Parameter name: " + paramName) &
+ (argumentOutOfRangeException.Message != randValue))
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The string argument for message is a null reference");
+
+ try
+ {
+ string paramName = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ string Value = null;
+ ArgumentOutOfRangeException argumentOutOfRangeException = new ArgumentOutOfRangeException(paramName, Value);
+ if ((argumentOutOfRangeException.Message != "Exception of type 'System.ArgumentOutOfRangeException' was thrown." + Environment.NewLine + "Parameter name: " + paramName) &
+ (argumentOutOfRangeException.Message != "Exception of type 'System.ArgumentOutOfRangeException' was thrown."))
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: The message is string empty");
+
+ try
+ {
+ string Value = string.Empty;
+ string paramName = null;
+ ArgumentOutOfRangeException argumentOutOfRangeException = new ArgumentOutOfRangeException(paramName, Value);
+ if (!argumentOutOfRangeException.Message.Equals(string.Empty))
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: The message is white space");
+
+ try
+ {
+ string Value = " ";
+ string paramName = null;
+ ArgumentOutOfRangeException argumentOutOfRangeException = new ArgumentOutOfRangeException(paramName, Value);
+ if (argumentOutOfRangeException.Message != " ")
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArgumentOutOfRangeExceptionMessage test = new ArgumentOutOfRangeExceptionMessage();
+
+ TestLibrary.TestFramework.BeginTestCase("ArgumentOutOfRangeExceptionMessage");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/arithmeticexception/ArithmeticExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/arithmeticexception/ArithmeticExceptionCtor1.csproj
new file mode 100644
index 0000000000..42778b8130
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/arithmeticexception/ArithmeticExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arithmeticexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/arithmeticexception/arithmeticexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/arithmeticexception/arithmeticexceptionctor1.cs
new file mode 100644
index 0000000000..9715d249ba
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/arithmeticexception/arithmeticexceptionctor1.cs
@@ -0,0 +1,71 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.ArithmeticException.Ctor()
+/// </summary>
+public class ArithmeticExceptionCtor1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor to construct a new instance");
+
+ try
+ {
+ ArithmeticException arithmeticException = new ArithmeticException();
+ if (arithmeticException == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArithmeticExceptionCtor1 test = new ArithmeticExceptionCtor1();
+
+ TestLibrary.TestFramework.BeginTestCase("ArithmeticExceptionCtor1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch1.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch1.csproj
new file mode 100644
index 0000000000..b1542e69c8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraybinarysearch1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch1b.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch1b.csproj
new file mode 100644
index 0000000000..2414ce13a2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch1b.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraybinarysearch1b.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch2.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch2.csproj
new file mode 100644
index 0000000000..b720598ba9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraybinarysearch2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch2b.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch2b.csproj
new file mode 100644
index 0000000000..d77023b061
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch2b.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraybinarysearch2b.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch3.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch3.csproj
new file mode 100644
index 0000000000..41095a04a8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraybinarysearch3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch3b.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch3b.csproj
new file mode 100644
index 0000000000..fbc25a4288
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch3b.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraybinarysearch3b.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch4.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch4.csproj
new file mode 100644
index 0000000000..dae669bd46
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraybinarysearch4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch4b.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch4b.csproj
new file mode 100644
index 0000000000..b4e03cc8ff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch4b.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraybinarysearch4b.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch5.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch5.csproj
new file mode 100644
index 0000000000..795f160e5e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraybinarysearch5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch5b.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch5b.csproj
new file mode 100644
index 0000000000..7ec6d15aaa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch5b.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraybinarysearch5b.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch6.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch6.csproj
new file mode 100644
index 0000000000..c00978c042
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayBinarySearch6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraybinarysearch6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayClear.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayClear.csproj
new file mode 100644
index 0000000000..e7a549a351
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayClear.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayclear.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayClone.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayClone.csproj
new file mode 100644
index 0000000000..b93e526688
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayClone.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayclone.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayCopy1.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayCopy1.csproj
new file mode 100644
index 0000000000..83d142699b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayCopy1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraycopy1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayCopy2.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayCopy2.csproj
new file mode 100644
index 0000000000..30d0946f7f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayCopy2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraycopy2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayCopyTo.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayCopyTo.csproj
new file mode 100644
index 0000000000..d0d1b14dde
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayCopyTo.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraycopyto.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayCreateInstance1.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayCreateInstance1.csproj
new file mode 100644
index 0000000000..90fe984ed8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayCreateInstance1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraycreateinstance1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayCreateInstance1b.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayCreateInstance1b.csproj
new file mode 100644
index 0000000000..8ba4c858c7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayCreateInstance1b.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraycreateinstance1b.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayCreateInstance2.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayCreateInstance2.csproj
new file mode 100644
index 0000000000..baea5ac0a9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayCreateInstance2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraycreateinstance2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayCreateInstance2b.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayCreateInstance2b.csproj
new file mode 100644
index 0000000000..863926f39b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayCreateInstance2b.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraycreateinstance2b.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayGetEnumerator.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayGetEnumerator.csproj
new file mode 100644
index 0000000000..45f04eb1d5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayGetEnumerator.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraygetenumerator.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayGetLength.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayGetLength.csproj
new file mode 100644
index 0000000000..f064691ecc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayGetLength.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraygetlength.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayGetLowerBound.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayGetLowerBound.csproj
new file mode 100644
index 0000000000..2668f6e914
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayGetLowerBound.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraygetlowerbound.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayGetUpperBound.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayGetUpperBound.csproj
new file mode 100644
index 0000000000..174ca36389
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayGetUpperBound.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraygetupperbound.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayGetValue.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayGetValue.csproj
new file mode 100644
index 0000000000..f9a3b01ef1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayGetValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraygetvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayGetValue1.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayGetValue1.csproj
new file mode 100644
index 0000000000..bbfa3e4a04
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayGetValue1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraygetvalue1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayGetValue2.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayGetValue2.csproj
new file mode 100644
index 0000000000..11f5083a7f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayGetValue2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraygetvalue2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayGetValue2b.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayGetValue2b.csproj
new file mode 100644
index 0000000000..3fd332fa74
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayGetValue2b.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraygetvalue2b.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayICollectionget_Count.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayICollectionget_Count.csproj
new file mode 100644
index 0000000000..1dce1edfa4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayICollectionget_Count.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayicollectionget_count.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayIListAdd.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayIListAdd.csproj
new file mode 100644
index 0000000000..d92019ec2c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayIListAdd.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayilistadd.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayIListClear.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayIListClear.csproj
new file mode 100644
index 0000000000..f3d012b9c2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayIListClear.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayilistclear.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayIListContains.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayIListContains.csproj
new file mode 100644
index 0000000000..d0b98cb260
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayIListContains.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayilistcontains.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayIListIndexOF.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayIListIndexOF.csproj
new file mode 100644
index 0000000000..44d552fbb7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayIListIndexOF.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayilistindexof.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayIListInsert.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayIListInsert.csproj
new file mode 100644
index 0000000000..6caa13363a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayIListInsert.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayilistinsert.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayIListRemove.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayIListRemove.csproj
new file mode 100644
index 0000000000..007041efac
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayIListRemove.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayilistremove.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayIListRemoveAt.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayIListRemoveAt.csproj
new file mode 100644
index 0000000000..71fa5d642f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayIListRemoveAt.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayilistremoveat.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayIListget_item.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayIListget_item.csproj
new file mode 100644
index 0000000000..3aa23f9e18
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayIListget_item.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayilistget_item.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayIListset_item.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayIListset_item.csproj
new file mode 100644
index 0000000000..2727f7a7f7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayIListset_item.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayilistset_item.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf1.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf1.csproj
new file mode 100644
index 0000000000..80dc955ef6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayindexof1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf1b.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf1b.csproj
new file mode 100644
index 0000000000..aef6731999
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf1b.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayindexof1b.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf2.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf2.csproj
new file mode 100644
index 0000000000..6c7df8d601
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayindexof2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf2b.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf2b.csproj
new file mode 100644
index 0000000000..3d3c243b8c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf2b.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayindexof2b.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf3.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf3.csproj
new file mode 100644
index 0000000000..d4c5c3d18b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayindexof3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf3b.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf3b.csproj
new file mode 100644
index 0000000000..24cab9fbf3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf3b.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayindexof3b.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf4.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf4.csproj
new file mode 100644
index 0000000000..7aa0b8eca3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayindexof4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf4b.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf4b.csproj
new file mode 100644
index 0000000000..0fc252348a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayIndexOf4b.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayindexof4b.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayInitialize.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayInitialize.csproj
new file mode 100644
index 0000000000..30c7f63b00
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayInitialize.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayinitialize.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf1.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf1.csproj
new file mode 100644
index 0000000000..be1385af3f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraylastindexof1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf1b.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf1b.csproj
new file mode 100644
index 0000000000..52e0ad0c8a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf1b.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraylastindexof1b.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf2.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf2.csproj
new file mode 100644
index 0000000000..4703099349
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraylastindexof2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf2b.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf2b.csproj
new file mode 100644
index 0000000000..1e12acc2fd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf2b.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraylastindexof2b.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf3.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf3.csproj
new file mode 100644
index 0000000000..68e71436a5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraylastindexof3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf3b.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf3b.csproj
new file mode 100644
index 0000000000..c84a7545f0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf3b.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraylastindexof3b.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf4.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf4.csproj
new file mode 100644
index 0000000000..439502d2e9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayLastIndexOf4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraylastindexof4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayLength.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayLength.csproj
new file mode 100644
index 0000000000..264a44a9f7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayLength.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraylength.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayRank.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayRank.csproj
new file mode 100644
index 0000000000..ea9f10632d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayRank.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayrank.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayReserse1.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayReserse1.csproj
new file mode 100644
index 0000000000..9cd469d3c1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayReserse1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayreserse1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayReserse2.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayReserse2.csproj
new file mode 100644
index 0000000000..dc5ec1840b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayReserse2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayreserse2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayReverse1.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayReverse1.csproj
new file mode 100644
index 0000000000..f1676b1d44
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayReverse1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayreverse1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArrayReverse2.csproj b/tests/src/CoreMangLib/cti/system/array/ArrayReverse2.csproj
new file mode 100644
index 0000000000..87e7b133ad
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArrayReverse2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arrayreverse2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArraySetValue1.csproj b/tests/src/CoreMangLib/cti/system/array/ArraySetValue1.csproj
new file mode 100644
index 0000000000..33a00e8ff5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArraySetValue1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraysetvalue1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArraySetValue1b.csproj b/tests/src/CoreMangLib/cti/system/array/ArraySetValue1b.csproj
new file mode 100644
index 0000000000..632171a694
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArraySetValue1b.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraysetvalue1b.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArraySetValue2.csproj b/tests/src/CoreMangLib/cti/system/array/ArraySetValue2.csproj
new file mode 100644
index 0000000000..13a3f3cfe7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArraySetValue2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraysetvalue2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArraySetValue2b.csproj b/tests/src/CoreMangLib/cti/system/array/ArraySetValue2b.csproj
new file mode 100644
index 0000000000..8ded777226
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArraySetValue2b.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraysetvalue2b.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArraySort1.csproj b/tests/src/CoreMangLib/cti/system/array/ArraySort1.csproj
new file mode 100644
index 0000000000..ad0fc7eae1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArraySort1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraysort1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArraySort10.csproj b/tests/src/CoreMangLib/cti/system/array/ArraySort10.csproj
new file mode 100644
index 0000000000..e0f37d4084
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArraySort10.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraysort10.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArraySort11.csproj b/tests/src/CoreMangLib/cti/system/array/ArraySort11.csproj
new file mode 100644
index 0000000000..01fdc20559
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArraySort11.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraysort11.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArraySort12.csproj b/tests/src/CoreMangLib/cti/system/array/ArraySort12.csproj
new file mode 100644
index 0000000000..c47aef416a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArraySort12.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraysort12.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArraySort13.csproj b/tests/src/CoreMangLib/cti/system/array/ArraySort13.csproj
new file mode 100644
index 0000000000..f5b70c11b8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArraySort13.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraysort13.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArraySort14.csproj b/tests/src/CoreMangLib/cti/system/array/ArraySort14.csproj
new file mode 100644
index 0000000000..acdfca9f24
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArraySort14.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraysort14.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArraySort1b.csproj b/tests/src/CoreMangLib/cti/system/array/ArraySort1b.csproj
new file mode 100644
index 0000000000..48812bf2ea
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArraySort1b.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraysort1b.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArraySort2.csproj b/tests/src/CoreMangLib/cti/system/array/ArraySort2.csproj
new file mode 100644
index 0000000000..67de2efee2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArraySort2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraysort2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArraySort2b.csproj b/tests/src/CoreMangLib/cti/system/array/ArraySort2b.csproj
new file mode 100644
index 0000000000..f6db1c1c0d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArraySort2b.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraysort2b.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArraySort3.csproj b/tests/src/CoreMangLib/cti/system/array/ArraySort3.csproj
new file mode 100644
index 0000000000..7a36b628e8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArraySort3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraysort3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArraySort3b.csproj b/tests/src/CoreMangLib/cti/system/array/ArraySort3b.csproj
new file mode 100644
index 0000000000..a9f3f50535
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArraySort3b.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraysort3b.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArraySort4.csproj b/tests/src/CoreMangLib/cti/system/array/ArraySort4.csproj
new file mode 100644
index 0000000000..19ea29b19d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArraySort4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraysort4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArraySort5.csproj b/tests/src/CoreMangLib/cti/system/array/ArraySort5.csproj
new file mode 100644
index 0000000000..327e8e7d01
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArraySort5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraysort5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArraySort6.csproj b/tests/src/CoreMangLib/cti/system/array/ArraySort6.csproj
new file mode 100644
index 0000000000..71ec6f4028
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArraySort6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraysort6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArraySort7.csproj b/tests/src/CoreMangLib/cti/system/array/ArraySort7.csproj
new file mode 100644
index 0000000000..58094548d2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArraySort7.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraysort7.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArraySort8.csproj b/tests/src/CoreMangLib/cti/system/array/ArraySort8.csproj
new file mode 100644
index 0000000000..b80cb29c0e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArraySort8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraysort8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/ArraySort9.csproj b/tests/src/CoreMangLib/cti/system/array/ArraySort9.csproj
new file mode 100644
index 0000000000..4edb5f8550
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/ArraySort9.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraysort9.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/arraybinarysearch1.cs b/tests/src/CoreMangLib/cti/system/array/arraybinarysearch1.cs
new file mode 100644
index 0000000000..654a9cb1f0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraybinarysearch1.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/array/arraybinarysearch1b.cs b/tests/src/CoreMangLib/cti/system/array/arraybinarysearch1b.cs
new file mode 100644
index 0000000000..23639b23a9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraybinarysearch1b.cs
@@ -0,0 +1,614 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArrayBinarySearch1
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ArrayBinarySearch1 ac = new ArrayBinarySearch1();
+
+ TestLibrary.TestFramework.BeginTestCase("Array.BinarySearch(Array, int, int, object, IComparer)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+ retVal = NegTest9() && retVal;
+ retVal = NegTest10() && retVal;
+ retVal = NegTest11() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ int element;
+ int index;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Array.BinarySearch(Array, int, int, object, IComparer) where element is found");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ element = TestLibrary.Generator.GetInt32(-55);
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ do
+ {
+ array.SetValue((object)TestLibrary.Generator.GetInt32(-55), i);
+ }
+ while(element == (int)array.GetValue(i));
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32(-55) % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ Array.Sort(array);
+
+ newIndex = Array.BinarySearch(array, 0, array.Length, (object)element, null);
+
+ if (element != (int)array.GetValue(newIndex))
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected value: Expected(" + element + ") Actual(" + (int)array.GetValue(newIndex) + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ MyStruct element;
+ int index;
+ int newIndex;
+ MyStructComparer msc = new MyStructComparer();
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Array.BinarySearch(Array, int, int, object, IComparer) non-primitive type (not derived from object)");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(MyStruct), length);
+
+ element = new MyStruct(TestLibrary.Generator.GetSingle(-55));
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ do
+ {
+ array.SetValue(new MyStruct(TestLibrary.Generator.GetSingle(-55)), i);
+ }
+ while(element.f == ((MyStruct)array.GetValue(i)).f);
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32(-55) % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ Array.Sort(array);
+
+ newIndex = Array.BinarySearch(array, 0, array.Length, (object)element, msc);
+
+ if (element.f != ((MyStruct)array.GetValue(newIndex)).f)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected value: Expected(" + element.f + ") Actual(" + ((MyStruct)array.GetValue(newIndex)).f + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ int element;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Array.BinarySearch(Array, int, int, object, IComparer) where element is not found");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ element = TestLibrary.Generator.GetInt32(-55);
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ do
+ {
+ array.SetValue((object)TestLibrary.Generator.GetInt32(-55), i);
+ }
+ while(element == (int)array.GetValue(i));
+ }
+
+ Array.Sort(array);
+
+ newIndex = Array.BinarySearch(array, 0, array.Length, (object)element, null);
+
+ if (0 <= newIndex)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected index: Expected(<0) Actual(" + newIndex + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ MyStruct element;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Array.BinarySearch(Array, int, int, object, IComparer) non-primitive type (not derived from object) not found");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(MyStruct), length);
+
+ element = new MyStruct(TestLibrary.Generator.GetSingle(-55));
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ do
+ {
+ array.SetValue(new MyStruct(TestLibrary.Generator.GetSingle(-55)), i);
+ }
+ while(element.f == ((MyStruct)array.GetValue(i)).f);
+ }
+
+ Array.Sort(array);
+
+ newIndex = Array.BinarySearch(array, 0, array.Length, (object)element, null);
+
+ if (0 <= newIndex)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected index: Expected(<0) Actual(" + newIndex + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ int element;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Array.BinarySearch(Array, int, int, object, IComparer) array full of null's");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ element = TestLibrary.Generator.GetInt32(-55);
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array.SetValue(null, i);
+ }
+
+ newIndex = Array.BinarySearch(array, 0, array.Length, (object)element, null);
+
+ if (0 <= newIndex)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected index: Actual(" + newIndex + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: Array.BinarySearch(Array, int, int, object, IComparer) array is null");
+
+ try
+ {
+ Array.BinarySearch(null, 0, 0, (object)1, null);
+
+ TestLibrary.TestFramework.LogError("010", "Should have thrown an expection");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("011", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ Array array;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: Array.BinarySearch(Array, int, int, object, IComparer) array of length 0");
+
+ try
+ {
+ // creat the array
+ array = Array.CreateInstance(typeof(Int32), 0);
+
+ newIndex = Array.BinarySearch(array, 0, array.Length, (object)null, null);
+
+ if (0 <= newIndex)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected index: Actual(" + newIndex + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("013", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: Array.BinarySearch(Array, int, int, object, IComparer) start index less than lower bound");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ Array.BinarySearch(array, -1, array.Length, (object)null, null);
+
+ TestLibrary.TestFramework.LogError("014", "Should have thrown an exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("015", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest7: Array.BinarySearch(Array, int, int, object, IComparer) start index greater than upper bound");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ Array.BinarySearch(array, array.Length, array.Length, (object)null, null);
+
+ TestLibrary.TestFramework.LogError("016", "Should have thrown an exception");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("017", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest8()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest8: Array.BinarySearch(Array, int, int, object, IComparer) count less than 0");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ Array.BinarySearch(array, 0, -1, (object)null, null);
+
+ TestLibrary.TestFramework.LogError("018", "Should have thrown an exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("019", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest9()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest9: Array.BinarySearch(Array, int, int, object, IComparer) (startindex < 0)");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ Array.BinarySearch(array, -1, array.Length, (object)null, null);
+
+ TestLibrary.TestFramework.LogError("020", "Should have thrown an exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("021", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest10()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest10: Array.BinarySearch(Array, int, int, object, IComparer) multi dim array");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), new int[2] {length, length});
+
+ Array.BinarySearch(array, 0, array.Length, (object)null, null);
+
+ TestLibrary.TestFramework.LogError("022", "Should have thrown an exception");
+ retVal = false;
+ }
+ catch (RankException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("023", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest11()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ MyStruct2 element;
+ int index;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest11: Array.BinarySearch(Array, int, int, object, IComparer) non-primitive type (not derived from object or IComparable)");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(MyStruct2), length);
+
+ element = new MyStruct2(TestLibrary.Generator.GetSingle(-55));
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ do
+ {
+ array.SetValue(new MyStruct2(TestLibrary.Generator.GetSingle(-55)), i);
+ }
+ while(element.f == ((MyStruct2)array.GetValue(i)).f);
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32(-55) % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ Array.Sort(array);
+
+ newIndex = Array.BinarySearch(array, 0, array.Length, (object)element, null);
+
+ TestLibrary.TestFramework.LogError("024", "Exception expected");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("025", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public struct MyStruct : IComparable
+ {
+ public float f;
+
+ public MyStruct(float ff) { f = ff; }
+
+ public int CompareTo(object obj)
+ {
+ MyStruct m1 = (MyStruct)obj;
+
+ if (m1.f == f) return 0;
+
+ return ((m1.f < f)?1:-1);
+ }
+ }
+
+ public struct MyStruct2
+ {
+ public float f;
+
+ public MyStruct2(float ff) { f = ff; }
+ }
+
+ public class MyStructComparer : IComparer
+ {
+ public int Compare(object x, object y)
+ {
+ MyStruct m1 = (MyStruct)x;
+ MyStruct m2 = (MyStruct)y;
+
+ if (m1.f == m2.f) return 0;
+
+ return ((m1.f < m2.f)?-1:1);
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraybinarysearch2.cs b/tests/src/CoreMangLib/cti/system/array/arraybinarysearch2.cs
new file mode 100644
index 0000000000..a477f5a484
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraybinarysearch2.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/array/arraybinarysearch2b.cs b/tests/src/CoreMangLib/cti/system/array/arraybinarysearch2b.cs
new file mode 100644
index 0000000000..57b7a52c7b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraybinarysearch2b.cs
@@ -0,0 +1,142 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArrayBinarySearch2
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ArrayBinarySearch2 ac = new ArrayBinarySearch2();
+
+ TestLibrary.TestFramework.BeginTestCase("Array.BinarySearch<T>(T[], T)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1() { return PosBinarySearch<Int64>(1, TestLibrary.Generator.GetInt64(), TestLibrary.Generator.GetInt64()); }
+ public bool PosTest2() { return PosBinarySearch<Int32>(2, TestLibrary.Generator.GetInt32(), TestLibrary.Generator.GetInt32()); }
+ public bool PosTest3() { return PosBinarySearch<Int16>(3, TestLibrary.Generator.GetInt16(), TestLibrary.Generator.GetInt16()); }
+ public bool PosTest4() { return PosBinarySearch<Byte>(4, TestLibrary.Generator.GetByte(), TestLibrary.Generator.GetByte()); }
+ public bool PosTest5() { return PosBinarySearch<double>(5, TestLibrary.Generator.GetDouble(), TestLibrary.Generator.GetDouble()); }
+ public bool PosTest6() { return PosBinarySearch<float>(6, TestLibrary.Generator.GetSingle(), TestLibrary.Generator.GetSingle()); }
+ public bool PosTest7() { return PosBinarySearch<char>(7, TestLibrary.Generator.GetCharLetter(), TestLibrary.Generator.GetCharLetter()); }
+ public bool PosTest8() { return PosBinarySearch<char>(8, TestLibrary.Generator.GetCharNumber(), TestLibrary.Generator.GetCharNumber()); }
+ public bool PosTest9() { return PosBinarySearch<char>(9, TestLibrary.Generator.GetChar(), TestLibrary.Generator.GetChar()); }
+ public bool PosTest10() { return PosBinarySearch<string>(10, TestLibrary.Generator.GetString(false, c_MIN_STRLEN, c_MAX_STRLEN), TestLibrary.Generator.GetString(false, c_MIN_STRLEN, c_MAX_STRLEN)); }
+
+ public bool PosBinarySearch<T>(int id, T element, T otherElem) where T : IComparable<T>
+ {
+ bool retVal = true;
+ T[] array;
+ int length;
+ int index;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Array.BinarySearch<T>(T[], T) (T == "+typeof(T)+") where element is found");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32() % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = new T[length];
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array.SetValue(otherElem, i);
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32() % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ Array.Sort(array);
+
+ newIndex = Array.BinarySearch<T>(array, element);
+
+ if (0 != element.CompareTo((T) array.GetValue(newIndex)))
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected value: Expected(" + element + ") Actual(" + array.GetValue(newIndex) + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: Array.BinarySearch<T>(T[], T) array is null");
+
+ try
+ {
+ Array.BinarySearch<Int32>(null, 1);
+
+ TestLibrary.TestFramework.LogError("002", "Should have thrown an expection");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraybinarysearch3.cs b/tests/src/CoreMangLib/cti/system/array/arraybinarysearch3.cs
new file mode 100644
index 0000000000..359280877c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraybinarysearch3.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/array/arraybinarysearch3b.cs b/tests/src/CoreMangLib/cti/system/array/arraybinarysearch3b.cs
new file mode 100644
index 0000000000..35db07f0bb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraybinarysearch3b.cs
@@ -0,0 +1,144 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public class ArrayBinarySearch3
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ArrayBinarySearch3 ac = new ArrayBinarySearch3();
+
+ TestLibrary.TestFramework.BeginTestCase("Array.BinarySearch<T>(T[], T)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1() { return PosBinarySearch<Int64>(1, TestLibrary.Generator.GetInt64(), TestLibrary.Generator.GetInt64()); }
+ public bool PosTest2() { return PosBinarySearch<Int32>(2, TestLibrary.Generator.GetInt32(), TestLibrary.Generator.GetInt32()); }
+ public bool PosTest3() { return PosBinarySearch<Int16>(3, TestLibrary.Generator.GetInt16(), TestLibrary.Generator.GetInt16()); }
+ public bool PosTest4() { return PosBinarySearch<Byte>(4, TestLibrary.Generator.GetByte(), TestLibrary.Generator.GetByte()); }
+ public bool PosTest5() { return PosBinarySearch<double>(5, TestLibrary.Generator.GetDouble(), TestLibrary.Generator.GetDouble()); }
+ public bool PosTest6() { return PosBinarySearch<float>(6, TestLibrary.Generator.GetSingle(), TestLibrary.Generator.GetSingle()); }
+ public bool PosTest7() { return PosBinarySearch<char>(7, TestLibrary.Generator.GetCharLetter(), TestLibrary.Generator.GetCharLetter()); }
+ public bool PosTest8() { return PosBinarySearch<char>(8, TestLibrary.Generator.GetCharNumber(), TestLibrary.Generator.GetCharNumber()); }
+ public bool PosTest9() { return PosBinarySearch<char>(9, TestLibrary.Generator.GetChar(), TestLibrary.Generator.GetChar()); }
+ public bool PosTest10() { return PosBinarySearch<string>(10, TestLibrary.Generator.GetString(false, c_MIN_STRLEN, c_MAX_STRLEN), TestLibrary.Generator.GetString(false, c_MIN_STRLEN, c_MAX_STRLEN)); }
+
+ public bool PosBinarySearch<T>(int id, T element, T otherElem) where T:IComparable<T>
+ {
+ bool retVal = true;
+ T[] array;
+ int length;
+ int index;
+ int newIndex;
+ IComparer<T> ic = null;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Array.BinarySearch<T>(T[], T, IComparer) (T == "+typeof(T)+") where element is found");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32() % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = new T[length];
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array.SetValue(otherElem, i);
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32() % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ Array.Sort(array);
+
+ newIndex = Array.BinarySearch<T>(array, element, ic);
+
+ if (0 != element.CompareTo((T) array.GetValue(newIndex)))
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected value: Expected(" + element + ") Actual(" + array.GetValue(newIndex) + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ IComparer<Int32> ic = null;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: Array.BinarySearch<T>(T[], T, IComparer) array is null");
+
+ try
+ {
+ Array.BinarySearch<Int32>(null, 1, ic);
+
+ TestLibrary.TestFramework.LogError("002", "Should have thrown an expection");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraybinarysearch4.cs b/tests/src/CoreMangLib/cti/system/array/arraybinarysearch4.cs
new file mode 100644
index 0000000000..3e14674811
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraybinarysearch4.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/array/arraybinarysearch4b.cs b/tests/src/CoreMangLib/cti/system/array/arraybinarysearch4b.cs
new file mode 100644
index 0000000000..b0923ab554
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraybinarysearch4b.cs
@@ -0,0 +1,142 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArrayBinarySearch4
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ArrayBinarySearch4 ac = new ArrayBinarySearch4();
+
+ TestLibrary.TestFramework.BeginTestCase("Array.BinarySearch<T>(T[], T)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1() { return PosBinarySearch<Int64>(1, TestLibrary.Generator.GetInt64(), TestLibrary.Generator.GetInt64()); }
+ public bool PosTest2() { return PosBinarySearch<Int32>(2, TestLibrary.Generator.GetInt32(), TestLibrary.Generator.GetInt32()); }
+ public bool PosTest3() { return PosBinarySearch<Int16>(3, TestLibrary.Generator.GetInt16(), TestLibrary.Generator.GetInt16()); }
+ public bool PosTest4() { return PosBinarySearch<Byte>(4, TestLibrary.Generator.GetByte(), TestLibrary.Generator.GetByte()); }
+ public bool PosTest5() { return PosBinarySearch<double>(5, TestLibrary.Generator.GetDouble(), TestLibrary.Generator.GetDouble()); }
+ public bool PosTest6() { return PosBinarySearch<float>(6, TestLibrary.Generator.GetSingle(), TestLibrary.Generator.GetSingle()); }
+ public bool PosTest7() { return PosBinarySearch<char>(7, TestLibrary.Generator.GetCharLetter(), TestLibrary.Generator.GetCharLetter()); }
+ public bool PosTest8() { return PosBinarySearch<char>(8, TestLibrary.Generator.GetCharNumber(), TestLibrary.Generator.GetCharNumber()); }
+ public bool PosTest9() { return PosBinarySearch<char>(9, TestLibrary.Generator.GetChar(), TestLibrary.Generator.GetChar()); }
+ public bool PosTest10() { return PosBinarySearch<string>(10, TestLibrary.Generator.GetString(false, c_MIN_STRLEN, c_MAX_STRLEN), TestLibrary.Generator.GetString(false, c_MIN_STRLEN, c_MAX_STRLEN)); }
+
+ public bool PosBinarySearch<T>(int id, T element, T otherElem) where T : IComparable<T>
+ {
+ bool retVal = true;
+ T[] array;
+ int length;
+ int index;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Array.BinarySearch<T>(T[], int, int, T) (T == "+typeof(T)+") where element is found");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32() % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = new T[length];
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array.SetValue(otherElem, i);
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32() % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ Array.Sort(array);
+
+ newIndex = Array.BinarySearch<T>(array, 0, length, element);
+
+ if (0 != element.CompareTo((T) array.GetValue(newIndex)))
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected value: Expected(" + element + ") Actual(" + array.GetValue(newIndex) + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: Array.BinarySearch<T>(T[], T) array is null");
+
+ try
+ {
+ Array.BinarySearch<Int32>(null, 0, 0, 1);
+
+ TestLibrary.TestFramework.LogError("002", "Should have thrown an expection");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraybinarysearch5.cs b/tests/src/CoreMangLib/cti/system/array/arraybinarysearch5.cs
new file mode 100644
index 0000000000..f68a738516
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraybinarysearch5.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/array/arraybinarysearch5b.cs b/tests/src/CoreMangLib/cti/system/array/arraybinarysearch5b.cs
new file mode 100644
index 0000000000..a31c0afd9a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraybinarysearch5b.cs
@@ -0,0 +1,185 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArrayBinarySearch5
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ArrayBinarySearch5 ac = new ArrayBinarySearch5();
+
+ TestLibrary.TestFramework.BeginTestCase("Array.BinarySearch<T>(T[], T)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1() { return PosBinarySearch<Int64>(1, TestLibrary.Generator.GetInt64(), TestLibrary.Generator.GetInt64()); }
+ public bool PosTest2() { return PosBinarySearch<Int32>(2, TestLibrary.Generator.GetInt32(), TestLibrary.Generator.GetInt32()); }
+ public bool PosTest3() { return PosBinarySearch<Int16>(3, TestLibrary.Generator.GetInt16(), TestLibrary.Generator.GetInt16()); }
+ public bool PosTest4() { return PosBinarySearch<Byte>(4, TestLibrary.Generator.GetByte(), TestLibrary.Generator.GetByte()); }
+ public bool PosTest5() { return PosBinarySearch<double>(5, TestLibrary.Generator.GetDouble(), TestLibrary.Generator.GetDouble()); }
+ public bool PosTest6() { return PosBinarySearch<float>(6, TestLibrary.Generator.GetSingle(), TestLibrary.Generator.GetSingle()); }
+ public bool PosTest7() { return PosBinarySearch<char>(7, TestLibrary.Generator.GetCharLetter(), TestLibrary.Generator.GetCharLetter()); }
+ public bool PosTest8() { return PosBinarySearch<char>(8, TestLibrary.Generator.GetCharNumber(), TestLibrary.Generator.GetCharNumber()); }
+ public bool PosTest9() { return PosBinarySearch<char>(9, TestLibrary.Generator.GetChar(), TestLibrary.Generator.GetChar()); }
+ public bool PosTest10() { return PosBinarySearch<string>(10, TestLibrary.Generator.GetString(false, c_MIN_STRLEN, c_MAX_STRLEN), TestLibrary.Generator.GetString(false, c_MIN_STRLEN, c_MAX_STRLEN)); }
+
+ //index length element
+ public bool NegTest2() { return NegBinarySearch2<Int32>(2, -1, 1, 1); }
+ public bool NegTest3() { return NegBinarySearch2<Int32>(3, 0, -1, 1); }
+ public bool NegTest4() { return NegBinarySearch2<Int32>(4, 2, 1, 1); }
+
+ public bool PosBinarySearch<T>(int id, T element, T otherElem) where T : IComparable<T>
+ {
+ bool retVal = true;
+ T[] array;
+ int length;
+ int index;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Array.BinarySearch<T>(T[], int, int, T, IComparer<T>) (T == "+typeof(T)+") where element is found");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32() % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = new T[length];
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array.SetValue(otherElem, i);
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32() % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ Array.Sort(array);
+
+ newIndex = Array.BinarySearch<T>(array, 0, length, element, null);
+
+ if (0 != element.CompareTo((T) array.GetValue(newIndex)))
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected value: Expected(" + element + ") Actual(" + array.GetValue(newIndex) + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: Array.BinarySearch<T>(T[], T) array is null");
+
+ try
+ {
+ Array.BinarySearch<Int32>(null, 0, 0, 1, null);
+
+ TestLibrary.TestFramework.LogError("002", "Should have thrown an expection");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegBinarySearch2<T>(int id, int index, int length, T element)
+ {
+ bool retVal = true;
+ T[] array;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Array.BinarySearch<T>(T[], "+index+", "+length+", T, IComparer<T>) (T == "+typeof(T)+")");
+
+ try
+ {
+ // creat the array
+ array = new T[1];
+
+ newIndex = Array.BinarySearch<T>(array, index, length, element, null);
+
+ TestLibrary.TestFramework.LogError("004", "Exception expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // expected
+ }
+ catch (ArgumentException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraybinarysearch6.cs b/tests/src/CoreMangLib/cti/system/array/arraybinarysearch6.cs
new file mode 100644
index 0000000000..7c5f58c904
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraybinarysearch6.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayclear.cs b/tests/src/CoreMangLib/cti/system/array/arrayclear.cs
new file mode 100644
index 0000000000..ce4388bb21
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayclear.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayclone.cs b/tests/src/CoreMangLib/cti/system/array/arrayclone.cs
new file mode 100644
index 0000000000..511c620a68
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayclone.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/array/arraycopy1.cs b/tests/src/CoreMangLib/cti/system/array/arraycopy1.cs
new file mode 100644
index 0000000000..2837d95b33
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraycopy1.cs
@@ -0,0 +1,537 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using System.Collections;
+/// <summary>
+/// Copy(System.Array,System.Array,System.Int32)
+/// </summary>
+public class ArrayCopy1
+{
+ const int c_MaxValue = 10;
+ const int c_MinValue = 0;
+ public static int Main()
+ {
+ ArrayCopy1 ArrayCopy1 = new ArrayCopy1();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayCopy1");
+ if (ArrayCopy1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Copies a range of elements from an Array starting at the first element and pastes them into another Array starting at the first element,the two array have the same value type.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(Int32), c_MaxValue*2);
+ for(int i=0;i<c_MaxValue;i++)
+ {
+ myOriginalArray.SetValue(i, i);
+ myTargetArray.SetValue(i + c_MaxValue, i);
+ }
+ Array.Copy(myOriginalArray, myTargetArray, c_MaxValue);
+ int index = 0;
+ for (IEnumerator itr = myOriginalArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current ;
+ if (!current.Equals(myTargetArray.GetValue(index)))
+ {
+ TestLibrary.TestFramework.LogError("001", "Copy error");
+ retVal = false;
+ break;
+ }
+ index++;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Copies a range of elements from an Array starting at the first element and pastes them into another Array starting at the first element,the two array have the same reference type.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(string), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(string), c_MaxValue * 2);
+ string generator1 = string.Empty;
+ string generator2 = string.Empty;
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ generator1 = TestLibrary.Generator.GetString(-55, true, c_MinValue, c_MaxValue);
+ generator2 = TestLibrary.Generator.GetString(-55, true, c_MinValue, c_MaxValue);
+ myOriginalArray.SetValue(generator1, i);
+ myTargetArray.SetValue(generator2, i);
+ }
+ Array.Copy(myOriginalArray, myTargetArray, c_MaxValue);
+ int index = 0;
+ for (IEnumerator itr = myOriginalArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myTargetArray.GetValue(index)))
+ {
+ TestLibrary.TestFramework.LogError("003", "Copy error");
+ retVal = false;
+ break;
+ }
+ index++;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Copies a range of elements from an Array starting at the first element and pastes them into another Array starting at the first element,the two array can upcast.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(TestDeriveClass), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(TestBaseClass), c_MaxValue * 2);
+ TestDeriveClass generator1;
+ TestBaseClass generator2 ;
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ generator1 = new TestDeriveClass(i);
+ generator2 = new TestDeriveClass(i + c_MaxValue);
+ myOriginalArray.SetValue(generator1, i);
+ myTargetArray.SetValue(generator2, i);
+ }
+ Array.Copy(myOriginalArray, myTargetArray, c_MaxValue);
+ int index = 0;
+ for (IEnumerator itr = myOriginalArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myTargetArray.GetValue(index)))
+ {
+ TestLibrary.TestFramework.LogError("005", "Copy error");
+ retVal = false;
+ break;
+ }
+ index++;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Copies a range of elements from an Array starting at the first element and pastes them into another Array starting at the first element,the two array can boxing.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(Object), c_MaxValue * 2);
+ int generator1;
+ object generator2;
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ generator1 =i;
+ generator2 = i+c_MaxValue;
+ myOriginalArray.SetValue(generator1, i);
+ myTargetArray.SetValue(generator2, i);
+ }
+ Array.Copy(myOriginalArray, myTargetArray, c_MaxValue);
+ int index = 0;
+ for (IEnumerator itr = myOriginalArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myTargetArray.GetValue(index)))
+ {
+ TestLibrary.TestFramework.LogError("007", "Copy error");
+ retVal = false;
+ break;
+ }
+ index++;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1:sourceArray is a null reference.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(Int32), c_MaxValue * 2);
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ myOriginalArray.SetValue(i, i);
+ myTargetArray.SetValue(i + c_MaxValue, i);
+ }
+ myOriginalArray = null;
+ Array.Copy(myOriginalArray, myTargetArray, c_MaxValue);
+ TestLibrary.TestFramework.LogError("009", "Copy error");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2:destinationArray is a null reference .");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(Int32), c_MaxValue * 2);
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ myOriginalArray.SetValue(i, i);
+ myTargetArray.SetValue(i + c_MaxValue, i);
+ }
+ myTargetArray = null;
+ Array.Copy(myOriginalArray, myTargetArray, c_MaxValue);
+ TestLibrary.TestFramework.LogError("011", "Copy error");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3:sourceArray and destinationArray have different ranks.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ int[] parameter ={ c_MaxValue, c_MaxValue };
+ Array myTargetArray = Array.CreateInstance(typeof(Int32), parameter);
+ Array.Copy(myOriginalArray, myTargetArray, c_MaxValue);
+ TestLibrary.TestFramework.LogError("013", "Copy error");
+ retVal = false;
+ }
+ catch (RankException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4:sourceArray and destinationArray are of incompatible types.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(string), c_MaxValue * 2);
+ Array.Copy(myOriginalArray, myTargetArray, c_MaxValue);
+ TestLibrary.TestFramework.LogError("015", "Copy error");
+ retVal = false;
+ }
+ catch (ArrayTypeMismatchException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5:At least one element in sourceArray cannot be cast to the type of destinationArray.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(ITestInterface), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(TestBaseClass), c_MaxValue * 2);
+ TestDeriveClass generator1;
+ TestBaseClass generator2;
+ TestDeriveClass1 generator3=new TestDeriveClass1(100);
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ generator1 = new TestDeriveClass(i);
+ generator2 = new TestDeriveClass(i + c_MaxValue);
+ myOriginalArray.SetValue(generator1, i);
+ myTargetArray.SetValue(generator2, i);
+ }
+
+ myOriginalArray.SetValue(generator3, c_MaxValue - 1);
+ Array.Copy(myOriginalArray, myTargetArray, c_MaxValue);
+ TestLibrary.TestFramework.LogError("017", "Copy error");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6:length is less than zero.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(Int32), c_MaxValue * 2);
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ myOriginalArray.SetValue(i, i);
+ myTargetArray.SetValue(i + c_MaxValue, i);
+ }
+ Array.Copy(myOriginalArray, myTargetArray, c_MinValue-1);
+ TestLibrary.TestFramework.LogError("019", "Copy error");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest7:length is greater than the number of elements in sourceArray.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(Int32), c_MaxValue * 2);
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ myOriginalArray.SetValue(i, i);
+ myTargetArray.SetValue(i + c_MaxValue, i);
+ }
+ Array.Copy(myOriginalArray, myTargetArray, c_MaxValue+1);
+ TestLibrary.TestFramework.LogError("021", "Copy error");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("022", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest8()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest8:length is greater than the number of elements in destinationArray.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(Int32), c_MaxValue * 2);
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ myOriginalArray.SetValue(i, i);
+ myTargetArray.SetValue(i + c_MaxValue, i);
+ }
+ Array.Copy(myOriginalArray, myTargetArray, c_MaxValue * 2+1);
+ TestLibrary.TestFramework.LogError("023", "Copy error");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("024", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
+
+
+//create ITestInterface for Negtest5.
+interface ITestInterface
+{
+ string GetName();
+}
+//create TestBaseClass for provding test method and test target.
+public abstract class TestBaseClass
+{
+ // The value holder
+ protected int id;
+ public TestBaseClass(int Id)
+ {
+ id = Id;
+ }
+ protected int m_value;
+ protected abstract int GetValue();
+
+}
+//create TestDeriveClass for provding test method and test source.
+public class TestDeriveClass : TestBaseClass, ITestInterface
+{
+ int deriveId;
+ public TestDeriveClass(int Id)
+ : base(Id)
+ {
+ deriveId = Id;
+ }
+
+ protected override int GetValue()
+ {
+ return deriveId;
+ }
+
+
+ #region ITestInterface Members
+
+ public string GetName()
+ {
+ return "TestDeriveClass";
+ }
+
+ #endregion
+}
+//create TestDeriveClass for provding test method and test source.
+public class TestDeriveClass1 : ITestInterface
+{
+ int deriveId;
+ public TestDeriveClass1(int Id)
+
+ {
+ deriveId = Id;
+ }
+
+ protected int GetValue()
+ {
+ return deriveId;
+ }
+ #region ITestInterface Members
+
+ public string GetName()
+ {
+ return "TestDeriveClass1";
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraycopy2.cs b/tests/src/CoreMangLib/cti/system/array/arraycopy2.cs
new file mode 100644
index 0000000000..7015fc9a7d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraycopy2.cs
@@ -0,0 +1,597 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using System.Collections;
+/// <summary>
+/// Array.Copy Method (Array, Int32, Array, Int32, Int32)
+/// </summary>
+public class ArrayCopy2
+{
+ const int c_MaxValue = 10;
+ const int c_MinValue = 0;
+ public static int Main()
+ {
+ ArrayCopy2 ArrayCopy2 = new ArrayCopy2();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayCopy2");
+ if (ArrayCopy2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+ retVal = NegTest9() && retVal;
+ retVal = NegTest10() && retVal;
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Copies a range of elements from an Array starting at the Sourceindex element and pastes them into another Array starting at the Target index element,the two array have the same value type.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(Int32), c_MaxValue * 2);
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ myOriginalArray.SetValue(i, i);
+ myTargetArray.SetValue(i + c_MaxValue, i);
+ }
+ Array.Copy(myOriginalArray,c_MinValue, myTargetArray,c_MaxValue, c_MaxValue);
+ int index = c_MaxValue;
+ for (IEnumerator itr = myOriginalArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myTargetArray.GetValue(index)))
+ {
+ TestLibrary.TestFramework.LogError("001", "Copy error");
+ retVal = false;
+ break;
+ }
+ index++;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Copies a range of elements from an Array starting at the Sourceindex element and pastes them into another Array starting at the Target index element,the two array have the same reference type.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(string), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(string), c_MaxValue * 2);
+ string generator1 = string.Empty;
+ string generator2 = string.Empty;
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ generator1 = TestLibrary.Generator.GetString(-55, true, c_MinValue, c_MaxValue);
+ generator2 = TestLibrary.Generator.GetString(-55, true, c_MinValue, c_MaxValue);
+ myOriginalArray.SetValue(generator1, i);
+ myTargetArray.SetValue(generator2, i);
+ }
+ Array.Copy(myOriginalArray, c_MinValue, myTargetArray, c_MaxValue, c_MaxValue);
+ int index = c_MaxValue;
+ for (IEnumerator itr = myOriginalArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myTargetArray.GetValue(index)))
+ {
+ TestLibrary.TestFramework.LogError("003", "Copy error");
+ retVal = false;
+ break;
+ }
+ index++;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Copies a range of elements from an Array starting at the Sourceindex element and pastes them into another Array starting at the Target index element,the two array can upcast.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(TestDeriveClass), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(TestBaseClass), c_MaxValue * 2);
+ TestDeriveClass generator1;
+ TestBaseClass generator2;
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ generator1 = new TestDeriveClass(i);
+ generator2 = new TestDeriveClass(i + c_MaxValue);
+ myOriginalArray.SetValue(generator1, i);
+ myTargetArray.SetValue(generator2, i);
+ }
+ Array.Copy(myOriginalArray, c_MinValue, myTargetArray, c_MaxValue, c_MaxValue);
+ int index = c_MaxValue;
+ for (IEnumerator itr = myOriginalArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myTargetArray.GetValue(index)))
+ {
+ TestLibrary.TestFramework.LogError("005", "Copy error");
+ retVal = false;
+ break;
+ }
+ index++;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Copies a range of elements from an Array starting at the Sourceindex element and pastes them into another Array starting at the Target index element,the two array can boxing.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(Object), c_MaxValue * 2);
+ int generator1;
+ object generator2;
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ generator1 = i;
+ generator2 = i + c_MaxValue;
+ myOriginalArray.SetValue(generator1, i);
+ myTargetArray.SetValue(generator2, i);
+ }
+ Array.Copy(myOriginalArray, c_MinValue, myTargetArray, c_MaxValue, c_MaxValue);
+ int index = c_MaxValue;
+ for (IEnumerator itr = myOriginalArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myTargetArray.GetValue(index)))
+ {
+ TestLibrary.TestFramework.LogError("007", "Copy error");
+ retVal = false;
+ break;
+ }
+ index++;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1:sourceArray is a null reference.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(Int32), c_MaxValue * 2);
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ myOriginalArray.SetValue(i, i);
+ myTargetArray.SetValue(i + c_MaxValue, i);
+ }
+ myOriginalArray = null;
+ Array.Copy(myOriginalArray, c_MinValue, myTargetArray, c_MaxValue, c_MaxValue);
+ TestLibrary.TestFramework.LogError("009", "Copy error");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2:destinationArray is a null reference .");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(Int32), c_MaxValue * 2);
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ myOriginalArray.SetValue(i, i);
+ myTargetArray.SetValue(i + c_MaxValue, i);
+ }
+ myTargetArray = null;
+ Array.Copy(myOriginalArray, c_MinValue, myTargetArray, c_MaxValue, c_MaxValue);
+ TestLibrary.TestFramework.LogError("011", "Copy error");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3:sourceArray and destinationArray have different ranks.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ int[] parameter ={ c_MaxValue, c_MaxValue };
+ Array myTargetArray = Array.CreateInstance(typeof(Int32), parameter);
+ Array.Copy(myOriginalArray, c_MinValue, myTargetArray, c_MaxValue, c_MaxValue);
+ TestLibrary.TestFramework.LogError("013", "Copy error");
+ retVal = false;
+ }
+ catch (RankException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4:sourceArray and destinationArray are of incompatible types.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(string), c_MaxValue * 2);
+ Array.Copy(myOriginalArray, c_MinValue, myTargetArray, c_MaxValue, c_MaxValue);
+ TestLibrary.TestFramework.LogError("015", "Copy error");
+ retVal = false;
+ }
+ catch (ArrayTypeMismatchException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5:At least one element in sourceArray cannot be cast to the type of destinationArray.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(ITestInterface), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(TestBaseClass), c_MaxValue * 2);
+ TestDeriveClass generator1;
+ TestBaseClass generator2;
+ TestDeriveClass1 generator3 = new TestDeriveClass1(100);
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ generator1 = new TestDeriveClass(i);
+ generator2 = new TestDeriveClass(i + c_MaxValue);
+ myOriginalArray.SetValue(generator1, i);
+ myTargetArray.SetValue(generator2, i);
+ }
+
+ myOriginalArray.SetValue(generator3, c_MaxValue - 1);
+ Array.Copy(myOriginalArray, c_MinValue, myTargetArray, c_MaxValue, c_MaxValue);
+ TestLibrary.TestFramework.LogError("017", "Copy error");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6:length is less than zero.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(Int32), c_MaxValue * 2);
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ myOriginalArray.SetValue(i, i);
+ myTargetArray.SetValue(i + c_MaxValue, i);
+ }
+ Array.Copy(myOriginalArray, c_MinValue, myTargetArray, c_MaxValue, c_MinValue - 1);
+ TestLibrary.TestFramework.LogError("019", "Copy error");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest7:sourceIndex is less than the lower bound of the first dimension of sourceArray.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(Int32), c_MaxValue * 2);
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ myOriginalArray.SetValue(i, i);
+ myTargetArray.SetValue(i + c_MaxValue, i);
+ }
+ Array.Copy(myOriginalArray, c_MinValue-1, myTargetArray, c_MaxValue, c_MaxValue);
+ TestLibrary.TestFramework.LogError("019", "Copy error");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest8()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest8:destinationIndex is less than the lower bound of the first dimension of destinationArray.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(Int32), c_MaxValue * 2);
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ myOriginalArray.SetValue(i, i);
+ myTargetArray.SetValue(i + c_MaxValue, i);
+ }
+ Array.Copy(myOriginalArray, c_MinValue, myTargetArray, c_MinValue-1, c_MaxValue);
+ TestLibrary.TestFramework.LogError("019", "Copy error");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest9()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest9:length is greater than the number of elements in sourceArray.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(Int32), c_MaxValue * 2);
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ myOriginalArray.SetValue(i, i);
+ myTargetArray.SetValue(i + c_MaxValue, i);
+ }
+ Array.Copy(myOriginalArray, c_MinValue, myTargetArray, c_MaxValue, c_MaxValue + 1);
+ TestLibrary.TestFramework.LogError("021", "Copy error");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("022", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest10()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest10:length is greater than the number of elements in destinationArray.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(Int32), c_MaxValue * 2);
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ myOriginalArray.SetValue(i, i);
+ myTargetArray.SetValue(i + c_MaxValue, i);
+ }
+ Array.Copy(myOriginalArray, c_MinValue, myTargetArray, c_MaxValue, c_MaxValue * 2 + 1);
+ TestLibrary.TestFramework.LogError("023", "Copy error");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("024", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
+
+
+//create ITestInterface for Negtest5.
+interface ITestInterface
+{
+ string GetName();
+}
+//create TestBaseClass for provding test method and test target.
+public abstract class TestBaseClass
+{
+ // The value holder
+ protected int id;
+ public TestBaseClass(int Id)
+ {
+ id = Id;
+ }
+ protected int m_value;
+ protected abstract int GetValue();
+
+}
+//create TestDeriveClass for provding test method and test source.
+public class TestDeriveClass : TestBaseClass, ITestInterface
+{
+ int deriveId;
+ public TestDeriveClass(int Id)
+ : base(Id)
+ {
+ deriveId = Id;
+ }
+
+ protected override int GetValue()
+ {
+ return deriveId;
+ }
+
+
+ #region ITestInterface Members
+
+ public string GetName()
+ {
+ return "TestDeriveClass";
+ }
+
+ #endregion
+}
+//create TestDeriveClass for provding test method and test source.
+public class TestDeriveClass1 : ITestInterface
+{
+ int deriveId;
+ public TestDeriveClass1(int Id)
+ {
+ deriveId = Id;
+ }
+
+ protected int GetValue()
+ {
+ return deriveId;
+ }
+ #region ITestInterface Members
+
+ public string GetName()
+ {
+ return "TestDeriveClass1";
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraycopyto.cs b/tests/src/CoreMangLib/cti/system/array/arraycopyto.cs
new file mode 100644
index 0000000000..73e22cb1a7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraycopyto.cs
@@ -0,0 +1,534 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using System.Collections;
+/// <summary>
+/// CopyTo
+/// </summary>
+public class ArrayCopyTo
+{
+ const int c_MaxValue = 10;
+ const int c_MinValue = 0;
+ public static int Main()
+ {
+ ArrayCopyTo ArrayCopyTo = new ArrayCopyTo();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayCopyTo");
+ if (ArrayCopyTo.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Copies all the elements of the current one-dimensional Array to the specified one-dimensional Array starting at the specified destination Array index,the two array have the same value type.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(Int32), c_MaxValue * 2);
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ myOriginalArray.SetValue(i, i);
+ myTargetArray.SetValue(i + c_MaxValue, i);
+ }
+ myOriginalArray.CopyTo(myTargetArray, c_MaxValue);
+ int index = c_MaxValue;
+ for (IEnumerator itr = myOriginalArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myTargetArray.GetValue(index)))
+ {
+ TestLibrary.TestFramework.LogError("001", "Copy error");
+ retVal = false;
+ break;
+ }
+ index++;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Copies all the elements of the current one-dimensional Array to the specified one-dimensional Array starting at the specified destination Array index,the two array have the same reference type.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(string), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(string), c_MaxValue * 2);
+ string generator1 = string.Empty;
+ string generator2 = string.Empty;
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ generator1 = TestLibrary.Generator.GetString(-55, true, c_MinValue, c_MaxValue);
+ generator2 = TestLibrary.Generator.GetString(-55, true, c_MinValue, c_MaxValue);
+ myOriginalArray.SetValue(generator1, i);
+ myTargetArray.SetValue(generator2, i);
+ }
+ myOriginalArray.CopyTo(myTargetArray, c_MaxValue);
+ int index = c_MaxValue;
+ for (IEnumerator itr = myOriginalArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myTargetArray.GetValue(index)))
+ {
+ TestLibrary.TestFramework.LogError("003", "Copy error");
+ retVal = false;
+ break;
+ }
+ index++;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Copies all the elements of the current one-dimensional Array to the specified one-dimensional Array starting at the specified destination Array index,the two array can upcast.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(TestDeriveClass), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(TestBaseClass), c_MaxValue * 2);
+ TestDeriveClass generator1;
+ TestBaseClass generator2;
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ generator1 = new TestDeriveClass(i);
+ generator2 = new TestDeriveClass(i + c_MaxValue);
+ myOriginalArray.SetValue(generator1, i);
+ myTargetArray.SetValue(generator2, i);
+ }
+ myOriginalArray.CopyTo(myTargetArray, c_MaxValue);
+ int index = c_MaxValue;
+ for (IEnumerator itr = myOriginalArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myTargetArray.GetValue(index)))
+ {
+ TestLibrary.TestFramework.LogError("005", "Copy error");
+ retVal = false;
+ break;
+ }
+ index++;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Copies all the elements of the current one-dimensional Array to the specified one-dimensional Array starting at the specified destination Array index,the two array can boxing.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(Object), c_MaxValue * 2);
+ int generator1;
+ object generator2;
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ generator1 = i;
+ generator2 = i + c_MaxValue;
+ myOriginalArray.SetValue(generator1, i);
+ myTargetArray.SetValue(generator2, i);
+ }
+ myOriginalArray.CopyTo(myTargetArray, c_MaxValue);
+ int index = c_MaxValue;
+ for (IEnumerator itr = myOriginalArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myTargetArray.GetValue(index)))
+ {
+ TestLibrary.TestFramework.LogError("007", "Copy error");
+ retVal = false;
+ break;
+ }
+ index++;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1:myTargetArray is a null reference.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(Int32), c_MaxValue * 2);
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ myOriginalArray.SetValue(i, i);
+ myTargetArray.SetValue(i + c_MaxValue, i);
+ }
+ myTargetArray = null;
+ myOriginalArray.CopyTo(myTargetArray, c_MaxValue);
+ TestLibrary.TestFramework.LogError("009", "Copy error");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6:index is less than the lower bound of array.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(Int32), c_MaxValue * 2);
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ myOriginalArray.SetValue(i, i);
+ myTargetArray.SetValue(i + c_MaxValue, i);
+ }
+ myOriginalArray.CopyTo(myTargetArray, c_MinValue-1);
+ TestLibrary.TestFramework.LogError("011", "Copy error");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3:The source Array is multidimensional.");
+ try
+ {
+ int[] parameter ={ c_MaxValue, c_MaxValue };
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), parameter);
+ Array myTargetArray = Array.CreateInstance(typeof(Int32), c_MaxValue*3);
+ myOriginalArray.CopyTo(myTargetArray, c_MinValue - 1);
+ TestLibrary.TestFramework.LogError("013", "Copy error");
+ retVal = false;
+ }
+ catch (RankException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4:The type of the source Array cannot be cast automatically to the type of the destination array.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(string), c_MaxValue * 2);
+ myOriginalArray.CopyTo(myTargetArray, c_MaxValue);
+ TestLibrary.TestFramework.LogError("015", "Copy error");
+ retVal = false;
+ }
+ catch (ArrayTypeMismatchException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5:array is multidimensional.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ int[] parameter ={ c_MaxValue, c_MaxValue };
+ Array myTargetArray = Array.CreateInstance(typeof(Int32), parameter);
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ myOriginalArray.SetValue(i, i);
+ }
+ myOriginalArray.CopyTo(myTargetArray, c_MaxValue);
+ TestLibrary.TestFramework.LogError("017", "Copy error");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6:index is equal to or greater than the length of array.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ myOriginalArray.SetValue(i, i);
+ }
+ myOriginalArray.CopyTo(myTargetArray, c_MaxValue);
+ TestLibrary.TestFramework.LogError("019", "Copy error");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest7:The number of elements in the source Array is greater than the available space from index to the end of the destination array.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(Int32), c_MaxValue * 2);
+ Array myTargetArray = Array.CreateInstance(typeof(Int32), c_MaxValue);
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ myOriginalArray.SetValue(i, i);
+ }
+ myOriginalArray.CopyTo(myTargetArray, c_MinValue);
+ TestLibrary.TestFramework.LogError("021", "Copy error");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("022", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest8()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest8:At least one element in sourceArray cannot be cast to the type of destinationArray.");
+ try
+ {
+ Array myOriginalArray = Array.CreateInstance(typeof(ITestInterface), c_MaxValue);
+ Array myTargetArray = Array.CreateInstance(typeof(TestBaseClass), c_MaxValue * 2);
+ TestDeriveClass generator1;
+ TestBaseClass generator2;
+ TestDeriveClass1 generator3 = new TestDeriveClass1(100);
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ generator1 = new TestDeriveClass(i);
+ generator2 = new TestDeriveClass(i + c_MaxValue);
+ myOriginalArray.SetValue(generator1, i);
+ myTargetArray.SetValue(generator2, i);
+ }
+
+ myOriginalArray.SetValue(generator3, c_MaxValue - 1);
+ myOriginalArray.CopyTo(myTargetArray, c_MinValue);
+ TestLibrary.TestFramework.LogError("023", "Copy error");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("024", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
+
+
+//create ITestInterface for Negtest8.
+interface ITestInterface
+{
+ string GetName();
+}
+//create TestBaseClass for provding test method and test target.
+public abstract class TestBaseClass
+{
+ // The value holder
+ protected int id;
+ public TestBaseClass(int Id)
+ {
+ id = Id;
+ }
+ protected int m_value;
+ protected abstract int GetValue();
+
+}
+//create TestDeriveClass for provding test method and test source.
+public class TestDeriveClass : TestBaseClass, ITestInterface
+{
+ int deriveId;
+ public TestDeriveClass(int Id)
+ : base(Id)
+ {
+ deriveId = Id;
+ }
+
+ protected override int GetValue()
+ {
+ return deriveId;
+ }
+
+
+ #region ITestInterface Members
+
+ public string GetName()
+ {
+ return "TestDeriveClass";
+ }
+
+ #endregion
+}
+//create TestDeriveClass for provding test method and test source.
+public class TestDeriveClass1 : ITestInterface
+{
+ int deriveId;
+ public TestDeriveClass1(int Id)
+ {
+ deriveId = Id;
+ }
+
+ protected int GetValue()
+ {
+ return deriveId;
+ }
+ #region ITestInterface Members
+
+ public string GetName()
+ {
+ return "TestDeriveClass1";
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraycreateinstance1.cs b/tests/src/CoreMangLib/cti/system/array/arraycreateinstance1.cs
new file mode 100644
index 0000000000..ae653d24c4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraycreateinstance1.cs
@@ -0,0 +1,370 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using System.Collections;
+/// <summary>
+/// CreateInstance Method (Type, Int32)
+/// </summary>
+public class ArrayCreateInstance1
+{
+ const int c_MaxValue = 10;
+ const int c_MinValue = 0;
+ public static int Main()
+ {
+ ArrayCreateInstance1 ArrayCreateInstance1 = new ArrayCreateInstance1();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayCreateInstance1");
+ if (ArrayCreateInstance1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: create a one-dimensional Array with int type.");
+ try
+ {
+
+ Array myArray = Array.CreateInstance(typeof(int), c_MaxValue);
+ int[] myIntArray = new int[c_MaxValue];
+ int generator = 0;
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ generator = TestLibrary.Generator.GetInt32(-55);
+ myArray.SetValue(generator, i);
+ myIntArray[i] = generator;
+ }
+ int index = c_MinValue;
+ for (IEnumerator itr = myArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myIntArray[index]))
+ {
+ TestLibrary.TestFramework.LogError("001", "Create error.");
+ retVal = false;
+ break;
+ }
+ index++;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: create a one-dimensional Array with string type.");
+ try
+ {
+ Array myArray = Array.CreateInstance(typeof(string), c_MaxValue);
+ string[] myStringArray = new string[c_MaxValue];
+ string generator = string.Empty;
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ generator = TestLibrary.Generator.GetString(-55, true, c_MinValue, c_MaxValue);
+ myArray.SetValue(generator, i);
+ myStringArray[i] = generator;
+ }
+ int index = c_MinValue;
+ for (IEnumerator itr = myArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myStringArray[index]))
+ {
+ TestLibrary.TestFramework.LogError("003", "Create error.");
+ retVal = false;
+ break;
+ }
+ index++;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: create a one-dimensional Array with user define type.");
+
+ try
+ {
+ Array myArray = Array.CreateInstance(typeof(Temperature), c_MaxValue);
+ Temperature[] myTemperatureArray = new Temperature[c_MaxValue];
+ Temperature generator = null;
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ generator = new Temperature();
+ generator.Value = i * 4;
+ myArray.SetValue(generator, i);
+ myTemperatureArray[i] = generator;
+ }
+ int index = c_MinValue;
+ for (IEnumerator itr = myArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myTemperatureArray[index]))
+ {
+ TestLibrary.TestFramework.LogError("005", "Create error.");
+ retVal = false;
+ break;
+ }
+ index++;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: create a one-dimensional Array with user define Generic type.");
+ try
+ {
+ Array myArray = Array.CreateInstance(typeof(TestClass1<int>), c_MaxValue);
+ TestClass1<int>[] myTemperatureArray = new TestClass1<int>[c_MaxValue];
+ TestClass1<int> generator = null;
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ generator = new TestClass1<int>();
+ generator.Value = i * 4;
+ myArray.SetValue(generator, i);
+ myTemperatureArray[i] = generator;
+ }
+ int index = c_MinValue;
+ for (IEnumerator itr = myArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myTemperatureArray[index]))
+ {
+ TestLibrary.TestFramework.LogError("007", "Create error.");
+ retVal = false;
+ break;
+ }
+ index++;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: elementType is a null reference .");
+
+ try
+ {
+ Array myArray = Array.CreateInstance(null, c_MaxValue);
+ TestLibrary.TestFramework.LogError("009", "elementType is a null reference should not be created.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: elementType is not supported. Void is not supported.");
+ try
+ {
+ Array myArray = Array.CreateInstance(typeof(void), c_MaxValue);
+ TestLibrary.TestFramework.LogError("011", "Void should not be supported.");
+ retVal = false;
+ }
+ catch (NotSupportedException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: elementType is an open generic type.");
+
+ try
+ {
+ Array myArray = Array.CreateInstance(typeof(TestClass1<>), c_MaxValue);
+ TestLibrary.TestFramework.LogError("013", "elementType is an open generic type.");
+ retVal = false;
+ }
+ catch (NotSupportedException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: length is less than zero.");
+
+ try
+ {
+ Array myArray = Array.CreateInstance(typeof(int), c_MinValue -1);
+ TestLibrary.TestFramework.LogError("015", "length is less than zero.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+}
+//create Temperature for provding test method and test target.
+public class Temperature : System.Collections.IComparer
+{
+
+ // The value holder
+ protected int m_value;
+
+ public int Value
+ {
+ get
+ {
+ return m_value;
+ }
+ set
+ {
+ m_value = value;
+ }
+ }
+ #region IComparer Members
+
+ public int Compare(object x, object y)
+ {
+ if (x is Temperature)
+ {
+ Temperature temp = (Temperature)x;
+
+ return ((Temperature)y).m_value.CompareTo(temp.m_value);
+ }
+
+ throw new Exception("The method parameter x is not expected.");
+ }
+
+ #endregion
+}
+
+public class TestClass1<T>
+{
+ // The value holder
+ protected int m_value;
+
+ public int Value
+ {
+ get
+ {
+ return m_value;
+ }
+ set
+ {
+ m_value = value;
+ }
+ }
+}
+
+
diff --git a/tests/src/CoreMangLib/cti/system/array/arraycreateinstance1b.cs b/tests/src/CoreMangLib/cti/system/array/arraycreateinstance1b.cs
new file mode 100644
index 0000000000..070175b4a0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraycreateinstance1b.cs
@@ -0,0 +1,169 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArrayCreateInstance1
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ArrayCreateInstance1 ac = new ArrayCreateInstance1();
+
+ TestLibrary.TestFramework.BeginTestCase("Array.CreateInstance(Type, int)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1() { return PosCreateInstance<Int64>(1, TestLibrary.Generator.GetInt64(-55)); }
+ public bool PosTest2() { return PosCreateInstance<Int32>(2, TestLibrary.Generator.GetInt32(-55)); }
+ public bool PosTest3() { return PosCreateInstance<Int16>(3, TestLibrary.Generator.GetInt16(-55)); }
+ public bool PosTest4() { return PosCreateInstance<Byte>(4, TestLibrary.Generator.GetByte(-55)); }
+ public bool PosTest5() { return PosCreateInstance<double>(5, TestLibrary.Generator.GetDouble(-55)); }
+ public bool PosTest6() { return PosCreateInstance<float>(6, TestLibrary.Generator.GetSingle(-55)); }
+ public bool PosTest7() { return PosCreateInstance<char>(7, TestLibrary.Generator.GetCharLetter(-55)); }
+ public bool PosTest8() { return PosCreateInstance<char>(8, TestLibrary.Generator.GetCharNumber(-55)); }
+ public bool PosTest9() { return PosCreateInstance<char>(9, TestLibrary.Generator.GetChar(-55)); }
+ public bool PosTest10() { return PosCreateInstance<string>(10, TestLibrary.Generator.GetString(-55, false, c_MIN_STRLEN, c_MAX_STRLEN)); }
+
+
+
+ public bool PosCreateInstance<T>(int id, T defaultValue)
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Array.CreateInstance(Type, int) (T == "+typeof(T)+")");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+
+ array = Array.CreateInstance(typeof(T), length);
+
+ array.SetValue(defaultValue, 0);
+
+ if (length != array.Length)
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected length: Expected(" + length + ") Actual(" + array.Length + ")");
+ retVal = false;
+ }
+
+ if (typeof(T) != array.GetValue(0).GetType())
+ {
+ TestLibrary.TestFramework.LogError("001", "Type mismatch: Expected(" + typeof(T) + ") Actual(" + array.GetValue(0).GetType() + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Array.CreateInstance(Type, int) where T is null");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+
+ array = Array.CreateInstance(null, length);
+
+ TestLibrary.TestFramework.LogError("003", "Execption expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ Array array;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Array.CreateInstance(Type, int) length < 0");
+
+ try
+ {
+ // creat the array
+ array = Array.CreateInstance(typeof(Int32), -1);
+
+ TestLibrary.TestFramework.LogError("005", "Exception expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraycreateinstance2.cs b/tests/src/CoreMangLib/cti/system/array/arraycreateinstance2.cs
new file mode 100644
index 0000000000..dbdf3efd03
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraycreateinstance2.cs
@@ -0,0 +1,205 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArrayCreateInstance2
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ArrayCreateInstance2 ac = new ArrayCreateInstance2();
+
+ TestLibrary.TestFramework.BeginTestCase("Array.CreateInstance(Type, int[])");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1() { return PosCreateInstance<Int64>(1, TestLibrary.Generator.GetInt64(-55)); }
+ public bool PosTest2() { return PosCreateInstance<Int32>(2, TestLibrary.Generator.GetInt32(-55)); }
+ public bool PosTest3() { return PosCreateInstance<Int16>(3, TestLibrary.Generator.GetInt16(-55)); }
+ public bool PosTest4() { return PosCreateInstance<Byte>(4, TestLibrary.Generator.GetByte(-55)); }
+ public bool PosTest5() { return PosCreateInstance<double>(5, TestLibrary.Generator.GetDouble(-55)); }
+ public bool PosTest6() { return PosCreateInstance<float>(6, TestLibrary.Generator.GetSingle(-55)); }
+ public bool PosTest7() { return PosCreateInstance<char>(7, TestLibrary.Generator.GetCharLetter(-55)); }
+ public bool PosTest8() { return PosCreateInstance<char>(8, TestLibrary.Generator.GetCharNumber(-55)); }
+ public bool PosTest9() { return PosCreateInstance<char>(9, TestLibrary.Generator.GetChar(-55)); }
+ public bool PosTest10() { return PosCreateInstance<string>(10, TestLibrary.Generator.GetString(-55, false, c_MIN_STRLEN, c_MAX_STRLEN)); }
+
+
+
+ public bool PosCreateInstance<T>(int id, T defaultValue)
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ int[] dims;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Array.CreateInstance(Type, int[]) (T == "+typeof(T)+")");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % 5) + 1;
+
+ dims = new int[ length ];
+
+ for(int i=0; i<dims.Length; i++) dims[i] = (TestLibrary.Generator.GetInt32(-55) % 10);
+
+ array = Array.CreateInstance(typeof(T), dims);
+
+ if (length != array.Rank)
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected rank: Expected(" + length + ") Actual(" + array.Rank + ")");
+ retVal = false;
+ }
+
+ for(int i=0; i<dims.Length; i++)
+ {
+ if (dims[i] != array.GetLength(i))
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected length (dim "+i+"): Expected(" + dims[i] + ") Actual(" + array.GetLength(i) + ")");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Array.CreateInstance(Type, int[]) where T is null");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+
+ array = Array.CreateInstance(null, new int[2] {length, length});
+
+ TestLibrary.TestFramework.LogError("003", "Execption expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ Array array;
+ int[] dims = null;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Array.CreateInstance(Type, int[]) length == null");
+
+ try
+ {
+ // creat the array
+ array = Array.CreateInstance(typeof(Int32), dims);
+
+ TestLibrary.TestFramework.LogError("005", "Exception expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ Array array;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Array.CreateInstance(Type, int[]) length.Length == 0");
+
+ try
+ {
+ // creat the array
+ array = Array.CreateInstance(typeof(Int32), new int[0]);
+
+ TestLibrary.TestFramework.LogError("007", "Exception expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraycreateinstance2b.cs b/tests/src/CoreMangLib/cti/system/array/arraycreateinstance2b.cs
new file mode 100644
index 0000000000..7b77e9ed3f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraycreateinstance2b.cs
@@ -0,0 +1,495 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using System.Collections;
+/// <summary>
+/// CreateInstance Method (Type, Int32[])
+/// </summary>
+public class ArrayCreateInstance2
+{
+ const int c_MaxValue = 10;
+ const int c_MinValue = 0;
+ public static int Main()
+ {
+ ArrayCreateInstance2 ArrayCreateInstance2 = new ArrayCreateInstance2();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayCreateInstance2");
+ if (ArrayCreateInstance2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ return retVal;
+ }
+
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: create a multidimensional Array with int type.");
+ try
+ {
+ int[] parameter ={ c_MaxValue, c_MaxValue };
+ Array myArray = Array.CreateInstance(typeof(int), parameter);
+ int[,] myIntArray = new int[c_MaxValue, c_MaxValue];
+ int generator = 0;
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ for (int j = 0; j < c_MaxValue;j++)
+ {
+ generator = TestLibrary.Generator.GetInt32(-55);
+ myArray.SetValue(generator, i, j);
+ myIntArray[i,j] = generator;
+ }
+ }
+ if (!ToAssureReturnValue(myArray, myIntArray))
+ {
+ TestLibrary.TestFramework.LogError("001", "Create error.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: create a multidimensional Array with string type.");
+ try
+ {
+ int[] parameter ={ c_MaxValue, c_MaxValue };
+ Array myArray = Array.CreateInstance(typeof(string), parameter);
+ string[,] myStringArray = new string[c_MaxValue, c_MaxValue];
+ string generator = string.Empty;
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ for (int j = 0; j < c_MaxValue; j++)
+ {
+ generator = TestLibrary.Generator.GetString(-55, true, c_MinValue, c_MaxValue);
+ myArray.SetValue(generator, i, j);
+ myStringArray[i,j] = generator;
+ }
+ }
+ if (!ToAssureReturnValue(myArray, myStringArray))
+ {
+ TestLibrary.TestFramework.LogError("003", "Create error.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: create a multidimensional Array with user define type.");
+
+ try
+ {
+ int[] parameter ={ c_MaxValue, c_MaxValue };
+ Array myArray = Array.CreateInstance(typeof(Temperature), parameter);
+ Temperature[,] myTemperatureArray = new Temperature[c_MaxValue, c_MaxValue];
+ Temperature generator = null;
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ for (int j = 0; j < c_MaxValue; j++)
+ {
+ generator = new Temperature();
+ generator.Value = i * 4 + j;
+ myArray.SetValue(generator, i, j);
+ myTemperatureArray[i,j] = generator;
+ }
+ }
+ if (!ToAssureReturnValue(myArray, myTemperatureArray))
+ {
+ TestLibrary.TestFramework.LogError("005", "Create error.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: create a multidimensional Array with user define Generic type.");
+ try
+ {
+ int[] parameter ={ c_MaxValue, c_MaxValue };
+ Array myArray = Array.CreateInstance(typeof(TestClass1<int>), parameter);
+ TestClass1<int>[,] myTemperatureArray = new TestClass1<int>[c_MaxValue, c_MaxValue];
+ TestClass1<int> generator = null;
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ for (int j = 0; j < c_MaxValue; j++)
+ {
+ generator = new TestClass1<int>();
+ generator.Value = i * 4+j;
+ myArray.SetValue(generator, i, j);
+ myTemperatureArray[i,j] = generator;
+ }
+ }
+ if (!ToAssureReturnValue(myArray, myTemperatureArray))
+ {
+ TestLibrary.TestFramework.LogError("007", "Create error.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: elementType is a null reference .");
+
+ try
+ {
+ int[] parameter ={ c_MaxValue, c_MaxValue };
+ Array myArray = Array.CreateInstance(null, parameter);
+ TestLibrary.TestFramework.LogError("009", "elementType is a null reference should not be created.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: lengths is a null reference .");
+
+ try
+ {
+ int[] parameter =null;
+ Array myArray = Array.CreateInstance(typeof(int), parameter);
+ TestLibrary.TestFramework.LogError("011", "lengths is a null reference should not be created.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: elementType is not supported. Void is not supported.");
+ try
+ {
+ int[] parameter ={ c_MaxValue, c_MaxValue };
+ Array myArray = Array.CreateInstance(typeof(void), parameter);
+ TestLibrary.TestFramework.LogError("013", "Void should not be supported.");
+ retVal = false;
+ }
+ catch (NotSupportedException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: elementType is an open generic type.");
+
+ try
+ {
+ int[] parameter ={ c_MaxValue, c_MaxValue };
+ Array myArray = Array.CreateInstance(typeof(TestClass1<>), parameter);
+ TestLibrary.TestFramework.LogError("015", "elementType is an open generic type.");
+ retVal = false;
+ }
+ catch (NotSupportedException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: Any value in lengths is less than zero.");
+
+ try
+ {
+ int[] parameter ={ c_MinValue - 1, c_MaxValue };
+ Array myArray = Array.CreateInstance(typeof(int), parameter);
+ TestLibrary.TestFramework.LogError("017", "Any value in lengths is less than zero.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: The lengths array contains less than one element.");
+
+ try
+ {
+ int[] parameter ={ };
+ Array myArray = Array.CreateInstance(typeof(int), parameter);
+ TestLibrary.TestFramework.LogError("019", "The lengths array contains less than one element.");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #region private method
+ private bool ToAssureReturnValue(Array myArray, int [,] myExpectArray)
+ {
+ int indexi = c_MinValue;
+ int indexj = c_MinValue;
+ for (IEnumerator itr = myArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myExpectArray[indexi, indexj]))
+ {
+ return false;
+ }
+ indexj++;
+ if (indexj == c_MaxValue)
+ {
+ indexj = c_MinValue;
+ indexi++;
+ }
+ }
+ return true;
+ }
+ private bool ToAssureReturnValue(Array myArray, string[,] myExpectArray)
+ {
+ int indexi = c_MinValue;
+ int indexj = c_MinValue;
+ for (IEnumerator itr = myArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myExpectArray[indexi, indexj]))
+ {
+ return false;
+ }
+ indexj++;
+ if (indexj == c_MaxValue)
+ {
+ indexj = c_MinValue;
+ indexi++;
+ }
+ }
+ return true;
+ }
+ private bool ToAssureReturnValue(Array myArray, Temperature [,] myExpectArray)
+ {
+ int indexi = c_MinValue;
+ int indexj = c_MinValue;
+ for (IEnumerator itr = myArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myExpectArray[indexi, indexj]))
+ {
+ return false;
+ }
+ indexj++;
+ if (indexj == c_MaxValue)
+ {
+ indexj = c_MinValue;
+ indexi++;
+ }
+ }
+ return true;
+ }
+ private bool ToAssureReturnValue(Array myArray, TestClass1<int>[,] myExpectArray)
+ {
+ int indexi = c_MinValue;
+ int indexj = c_MinValue;
+ for (IEnumerator itr = myArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myExpectArray[indexi, indexj]))
+ {
+ return false;
+ }
+ indexj++;
+ if (indexj == c_MaxValue)
+ {
+ indexj = c_MinValue;
+ indexi++;
+ }
+ }
+ return true;
+ }
+ #endregion
+}
+//create Temperature for provding test method and test target.
+public class Temperature : System.Collections.IComparer
+{
+
+ // The value holder
+ protected int m_value;
+
+ public int Value
+ {
+ get
+ {
+ return m_value;
+ }
+ set
+ {
+ m_value = value;
+ }
+ }
+ #region IComparer Members
+
+ public int Compare(object x, object y)
+ {
+ if (x is Temperature)
+ {
+ Temperature temp = (Temperature)x;
+
+ return ((Temperature)y).m_value.CompareTo(temp.m_value);
+ }
+
+ throw new Exception("The method parameter x is not expected.");
+ }
+
+ #endregion
+}
+
+public class TestClass1<T>
+{
+ // The value holder
+ protected int m_value;
+
+ public int Value
+ {
+ get
+ {
+ return m_value;
+ }
+ set
+ {
+ m_value = value;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/array/arraygetenumerator.cs b/tests/src/CoreMangLib/cti/system/array/arraygetenumerator.cs
new file mode 100644
index 0000000000..0b7b7950a5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraygetenumerator.cs
@@ -0,0 +1,375 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using System.Collections;
+/// <summary>
+///GetEnumerator
+/// </summary>
+public class ArrayGetEnumerator
+{
+ const int c_MaxValue = 10;
+ const int c_MinValue = 0;
+ public static int Main()
+ {
+ ArrayGetEnumerator ArrayGetEnumerator = new ArrayGetEnumerator();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayGetEnumerator");
+ if (ArrayGetEnumerator.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ return retVal;
+ }
+
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: create a multidimensional Array with int type.GetEnumerator method Returns an IEnumerator for the Array.");
+ try
+ {
+ int[] parameter ={ c_MaxValue, c_MaxValue };
+ Array myArray = Array.CreateInstance(typeof(int), parameter);
+ int[,] myIntArray = new int[c_MaxValue, c_MaxValue];
+ int generator = 0;
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ for (int j = 0; j < c_MaxValue;j++)
+ {
+ generator = TestLibrary.Generator.GetInt32(-55);
+ myArray.SetValue(generator, i, j);
+ myIntArray[i,j] = generator;
+ }
+ }
+ if (!ToAssureIenumeratorReturnandCorrect(myArray, myIntArray))
+ {
+ TestLibrary.TestFramework.LogError("001", "Getenumerator method should returns an IEnumerator for the Array. ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: create a multidimensional Array with string type..GetEnumerator method Returns an IEnumerator for the Array.");
+ try
+ {
+ int[] parameter ={ c_MaxValue, c_MaxValue };
+ Array myArray = Array.CreateInstance(typeof(string), parameter);
+ string[,] myStringArray = new string[c_MaxValue, c_MaxValue];
+ string generator = string.Empty;
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ for (int j = 0; j < c_MaxValue; j++)
+ {
+ generator = TestLibrary.Generator.GetString(-55, true, c_MinValue, c_MaxValue);
+ myArray.SetValue(generator, i, j);
+ myStringArray[i,j] = generator;
+ }
+ }
+ if (!ToAssureIenumeratorReturnandCorrect(myArray, myStringArray))
+ {
+ TestLibrary.TestFramework.LogError("003", "Getenumerator method should returns an IEnumerator for the Array. ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: create a multidimensional Array with user define type..GetEnumerator method Returns an IEnumerator for the Array.");
+
+ try
+ {
+ int[] parameter ={ c_MaxValue, c_MaxValue };
+ Array myArray = Array.CreateInstance(typeof(Temperature), parameter);
+ Temperature[,] myTemperatureArray = new Temperature[c_MaxValue, c_MaxValue];
+ Temperature generator = null;
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ for (int j = 0; j < c_MaxValue; j++)
+ {
+ generator = new Temperature();
+ generator.Value = i * 4 + j;
+ myArray.SetValue(generator, i, j);
+ myTemperatureArray[i,j] = generator;
+ }
+ }
+ if (!ToAssureIenumeratorReturnandCorrect(myArray, myTemperatureArray))
+ {
+ TestLibrary.TestFramework.LogError("005", "Getenumerator method should returns an IEnumerator for the Array. ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: create a multidimensional Array with user define Generic type..GetEnumerator method Returns an IEnumerator for the Array.");
+ try
+ {
+ int[] parameter ={ c_MaxValue, c_MaxValue };
+ Array myArray = Array.CreateInstance(typeof(TestClass1<int>), parameter);
+ TestClass1<int>[,] myTemperatureArray = new TestClass1<int>[c_MaxValue, c_MaxValue];
+ TestClass1<int> generator = null;
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ for (int j = 0; j < c_MaxValue; j++)
+ {
+ generator = new TestClass1<int>();
+ generator.Value = i * 4+j;
+ myArray.SetValue(generator, i, j);
+ myTemperatureArray[i,j] = generator;
+ }
+ }
+ if (!ToAssureIenumeratorReturnandCorrect(myArray, myTemperatureArray))
+ {
+ TestLibrary.TestFramework.LogError("007", "Getenumerator method should returns an IEnumerator for the Array. ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: create a one-dimensional Array with int type.Getenumerator method Returns an IEnumerator for the Array.");
+ try
+ {
+
+ Array myArray = Array.CreateInstance(typeof(int), c_MaxValue);
+ int[] myIntArray = new int[c_MaxValue];
+ int generator = 0;
+ for (int i = 0; i < c_MaxValue; i++)
+ {
+ generator = TestLibrary.Generator.GetInt32(-55);
+ myArray.SetValue(generator, i);
+ myIntArray[i] = generator;
+ }
+ int index = c_MinValue;
+ for (IEnumerator itr = myArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myIntArray[index]))
+ {
+ TestLibrary.TestFramework.LogError("009", "Getenumerator method should returns an IEnumerator for the Array. ");
+ retVal = false;
+ break;
+ }
+ index++;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #region private method
+
+ private bool ToAssureIenumeratorReturnandCorrect(Array myArray, int [,] myExpectArray)
+ {
+ int indexi = c_MinValue;
+ int indexj = c_MinValue;
+ for (IEnumerator itr = myArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myExpectArray[indexi, indexj]))
+ {
+ return false;
+ }
+ indexj++;
+ if (indexj == c_MaxValue)
+ {
+ indexj = c_MinValue;
+ indexi++;
+ }
+ }
+ return true;
+ }
+ private bool ToAssureIenumeratorReturnandCorrect(Array myArray, string[,] myExpectArray)
+ {
+ int indexi = c_MinValue;
+ int indexj = c_MinValue;
+ for (IEnumerator itr = myArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myExpectArray[indexi, indexj]))
+ {
+ return false;
+ }
+ indexj++;
+ if (indexj == c_MaxValue)
+ {
+ indexj = c_MinValue;
+ indexi++;
+ }
+ }
+ return true;
+ }
+ private bool ToAssureIenumeratorReturnandCorrect(Array myArray, Temperature [,] myExpectArray)
+ {
+ int indexi = c_MinValue;
+ int indexj = c_MinValue;
+ for (IEnumerator itr = myArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myExpectArray[indexi, indexj]))
+ {
+ return false;
+ }
+ indexj++;
+ if (indexj == c_MaxValue)
+ {
+ indexj = c_MinValue;
+ indexi++;
+ }
+ }
+ return true;
+ }
+ private bool ToAssureIenumeratorReturnandCorrect(Array myArray, TestClass1<int>[,] myExpectArray)
+ {
+ int indexi = c_MinValue;
+ int indexj = c_MinValue;
+ for (IEnumerator itr = myArray.GetEnumerator(); itr.MoveNext(); )
+ {
+ object current = itr.Current;
+ if (!current.Equals(myExpectArray[indexi, indexj]))
+ {
+ return false;
+ }
+ indexj++;
+ if (indexj == c_MaxValue)
+ {
+ indexj = c_MinValue;
+ indexi++;
+ }
+ }
+ return true;
+ }
+ #endregion
+}
+//create Temperature for provding test method and test target.
+public class Temperature : System.Collections.IComparer
+{
+
+ // The value holder
+ protected int m_value;
+
+ public int Value
+ {
+ get
+ {
+ return m_value;
+ }
+ set
+ {
+ m_value = value;
+ }
+ }
+ #region IComparer Members
+
+ public int Compare(object x, object y)
+ {
+ if (x is Temperature)
+ {
+ Temperature temp = (Temperature)x;
+
+ return ((Temperature)y).m_value.CompareTo(temp.m_value);
+ }
+
+ throw new Exception("The method parameter x is not expected.");
+ }
+
+ #endregion
+}
+
+public class TestClass1<T>
+{
+ // The value holder
+ protected int m_value;
+
+ public int Value
+ {
+ get
+ {
+ return m_value;
+ }
+ set
+ {
+ m_value = value;
+ }
+ }
+}
+
+
diff --git a/tests/src/CoreMangLib/cti/system/array/arraygetlength.cs b/tests/src/CoreMangLib/cti/system/array/arraygetlength.cs
new file mode 100644
index 0000000000..2c1d146f98
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraygetlength.cs
@@ -0,0 +1,202 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+//System.Array.GetLength(System.Int32)
+public class ArrayGetLength
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test the one dimension array ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ int[] i1 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ i1[i] = i;
+ }
+ if (i1.GetLength(0) != length)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test the two dimension array ");
+
+ try
+ {
+ int[] length = { TestLibrary.Generator.GetInt16(-55), TestLibrary.Generator.GetByte() };
+ string[,] s1 = new string[length[0], length[1]];
+ int d1, d2;
+ d1 = s1.GetLength(0);
+ d2 = s1.GetLength(1);
+ if ((d1 != length[0]) || (d2 != length[1]))
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Test the multiple dimension array ");
+
+ try
+ {
+ int dimen = 5;
+ int[] d = new int[5];// the return value array of GetLength methods,
+ int[] length = new int[dimen];
+ for (int y = 0; y < 5; y++)
+ {
+ do
+ {
+ length[y] = TestLibrary.Generator.GetByte(-55) % 10;
+ }
+ while (length[y] == 0);
+ }
+ double[, , , ,] s1 = new double[length[0], length[1], length[2], length[3], length[4]];
+
+ for (int i = 0; i < dimen; i++)
+ {
+ d[i] = s1.GetLength(i);
+ }
+ for (int i = 0; i < dimen; i++)
+ {
+ if (d[i] != length[i])
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected. ");
+ retVal = false;
+ }
+
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The dimension is less than zero");
+
+ try
+ {
+ int[] i1 = new int[TestLibrary.Generator.GetByte(-55)];
+ int length = i1.GetLength(-1);
+ TestLibrary.TestFramework.LogError("101", "The IndexOutOfRangeException is not thrown as expected ");
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The dimension is greater than the rank");
+
+ try
+ {
+ int rank = TestLibrary.Generator.GetByte(-55);
+ int[] i1 = new int[rank];
+ int length = i1.GetLength(rank + 1);
+ TestLibrary.TestFramework.LogError("103", "The IndexOutOfRangeException is not thrown as expected ");
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArrayGetLength test = new ArrayGetLength();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayGetLength");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraygetlowerbound.cs b/tests/src/CoreMangLib/cti/system/array/arraygetlowerbound.cs
new file mode 100644
index 0000000000..2dc0545baa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraygetlowerbound.cs
@@ -0,0 +1,208 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+//System.Array.GetLowerBound(System.Int32)
+public class ArrayGetLowerBound
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test the one dimension array ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ int[] i1 = new int[length];
+ if (i1.GetLowerBound(0) != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test the multiple dimension array ");
+
+ try
+ {
+ int dimen = 3;
+ int[] d = new int[dimen];// the return value array of Getlowerbound methods,
+ int[] length = new int[dimen];
+ for (int y = 0; y < 3; y++)
+ {
+ do
+ {
+ length[y] = TestLibrary.Generator.GetByte(-55) % 10;
+ }
+ while (length[y] == 0);
+ }
+ double[, ,] s1 = new double[length[0], length[1], length[2]];
+
+ for (int i = 0; i < dimen; i++)
+ {
+ d[i] = s1.GetLowerBound(i);
+ }
+ for (int i = 0; i < dimen; i++)
+ {
+ if (d[i] != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected. ");
+ retVal = false;
+ }
+
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The dimension is less than zero");
+
+ try
+ {
+ int[] i1 = new int[TestLibrary.Generator.GetByte(-55) + 1];
+ int bound = i1.GetLowerBound(-1);
+ TestLibrary.TestFramework.LogError("101", "The IndexOutOfRangeException is not thrown as expected ");
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The dimension is greater than the rank");
+
+ try
+ {
+ int rank = (TestLibrary.Generator.GetByte(-55) % 12) + 1;
+ Array theArray = GetArrayOfRank(rank, 2);
+ int bound = theArray.GetLowerBound(theArray.Rank + 1);
+ TestLibrary.TestFramework.LogError("103", "The IndexOutOfRangeException is not thrown as expected ");
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: The dimension is equal to the rank");
+
+ try
+ {
+ int rank = (TestLibrary.Generator.GetByte(-55) % 12) + 1;
+ Array theArray = GetArrayOfRank(rank, 2);
+ int bound = theArray.GetLowerBound(theArray.Rank);
+ TestLibrary.TestFramework.LogError("105", "The IndexOutOfRangeException is not thrown as expected ");
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ // Return an (integer) System.Array with specified rank, each dimension of size dimSize
+ // ex. GetArrayOfRank(4, 3) is equivalent to new int[3,3,3,3]
+ private Array GetArrayOfRank(int rank, int dimSize)
+ {
+ int[] sizeArray = new int[rank];
+ for (int j = 0; j < rank; j++)
+ sizeArray[j] = dimSize;
+ return Array.CreateInstance(typeof(int), sizeArray);
+ }
+ #endregion
+
+ public static int Main()
+ {
+ ArrayGetLowerBound test = new ArrayGetLowerBound();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayGetLowerBound");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraygetupperbound.cs b/tests/src/CoreMangLib/cti/system/array/arraygetupperbound.cs
new file mode 100644
index 0000000000..afacbd03d8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraygetupperbound.cs
@@ -0,0 +1,215 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+//System.Array.GetUpperBound(System.Int32)
+public class ArrayGetUpperBound
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test the one dimension array ");
+
+ try
+ {
+ int length = GetInt(1, Byte.MaxValue);
+ int[] i1 = new int[length];
+ if (i1.GetUpperBound(0) != (length - 1))
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test the multiple dimension array ");
+
+ try
+ {
+ int dimen = 3;
+ int[] d = new int[dimen];// the return value array of Getlowerbound methods,
+ int[] length = new int[dimen];
+ for (int y = 0; y < 3; y++)
+ {
+ do
+ {
+ length[y] = TestLibrary.Generator.GetByte() % 10;
+ }
+ while (length[y] == 0);
+ }
+ double[, ,] s1 = new double[length[0], length[1], length[2]];
+
+ for (int i = 0; i < dimen; i++)
+ {
+ d[i] = s1.GetUpperBound(i);
+ }
+ for (int i = 0; i < dimen; i++)
+ {
+ if (d[i] != (length[i] - 1))
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected. ");
+ retVal = false;
+ }
+
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The dimension is less than zero");
+
+ try
+ {
+ int[] i1 = new int[GetInt(1, Byte.MaxValue)];
+ int bound = i1.GetUpperBound(-1);
+ TestLibrary.TestFramework.LogError("101", "The IndexOutOfRangeException is not thrown as expected ");
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The dimension is equal to the rank");
+
+ try
+ {
+ int rank = GetInt(1, Byte.MaxValue);
+ int[] i1 = new int[rank];
+ int bound = i1.GetUpperBound(rank);
+ TestLibrary.TestFramework.LogError("103", "The IndexOutOfRangeException is not thrown as expected ");
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: The dimension is greater than the rank");
+
+ try
+ {
+ int rank = GetInt(1, Byte.MaxValue);
+ int range = GetInt(1, Byte.MaxValue);
+ int[] i1 = new int[rank];
+ int bound = i1.GetUpperBound(rank + range);
+ TestLibrary.TestFramework.LogError("105", "The IndexOutOfRangeException is not thrown as expected ");
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ #region Help method for geting test data
+
+ private Int32 GetInt(Int32 minValue, Int32 maxValue)
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32() % (maxValue - minValue);
+ }
+
+ return minValue;
+ }
+
+ #endregion
+
+ public static int Main()
+ {
+ ArrayGetUpperBound test = new ArrayGetUpperBound();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayGetUpperBound");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraygetvalue.cs b/tests/src/CoreMangLib/cti/system/array/arraygetvalue.cs
new file mode 100644
index 0000000000..c345da1f71
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraygetvalue.cs
@@ -0,0 +1,160 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Array.GetValue(System.Int32)
+/// </summary>
+public class ArrayGetValue1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test the one dimension array ");
+
+ try
+ {
+ int[] i1 = new int[1000];
+ for (int i = 0; i < 1000; i++) // set the value in every element of the array
+ {
+ i1[i] = i;
+ }
+ for (int i = 0; i < 1000; i++)
+ {
+ if (i1[i] != (int)i1.GetValue(i))
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected. ");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The dimension is greater than one");
+
+ try
+ {
+ int[,] i1 = new int[6, 8];
+ object o1 = i1.GetValue(3);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentException is not thrown as expected ");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The index is less than zero");
+
+ try
+ {
+ int rank = TestLibrary.Generator.GetByte(-55);
+ int[] i1 = new int[rank];
+ object i2 = i1.GetValue(-1);
+ TestLibrary.TestFramework.LogError("103", "The IndexOutOfRangeException is not thrown as expected ");
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: The index is greater than the upper bound");
+
+ try
+ {
+ int rank = TestLibrary.Generator.GetByte(-55);
+ int[] i1 = new int[rank];
+ object i2 = i1.GetValue(rank + 1);
+ TestLibrary.TestFramework.LogError("105", "The IndexOutOfRangeException is not thrown as expected ");
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArrayGetValue1 test = new ArrayGetValue1();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayGetValue1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraygetvalue1.cs b/tests/src/CoreMangLib/cti/system/array/arraygetvalue1.cs
new file mode 100644
index 0000000000..8495298208
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraygetvalue1.cs
@@ -0,0 +1,208 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArrayGetValue1
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ArrayGetValue1 ac = new ArrayGetValue1();
+
+ TestLibrary.TestFramework.BeginTestCase("Array.GetValue(int[])");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ int element;
+ int index;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Array.GetValue(int[]) single dim");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ element = TestLibrary.Generator.GetInt32(-55);
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array.SetValue((object)TestLibrary.Generator.GetInt32(-55), i);
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32(-55) % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ if (element != (int)array.GetValue(new int[1] {index} ))
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected value: Expected(" + element + ") Actual(" + (int)array.GetValue(new int[1] {index} ) + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ int element;
+ int index;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Array.GetValue(int[]) multi dim");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), new int[2] {length, length});
+
+ element = TestLibrary.Generator.GetInt32(-55);
+
+ // fill the array
+ for (int i=0; i<array.GetLength(0); i++)
+ {
+ array.SetValue((object)TestLibrary.Generator.GetInt32(-55), new int[2] {i,i});
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32(-55) % length;
+
+ // set the value
+ array.SetValue( element, new int[2] {index,index} );
+
+ if (element != (int)array.GetValue(new int[2] {index,index} ))
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected value: Expected(" + element + ") Actual(" + (int)array.GetValue(new int[2] {index, index} ) + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ int[] dims;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Array.GetValue(int[]) null dims");
+
+ try
+ {
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+ dims = null;
+
+ array.GetValue(dims);
+
+ TestLibrary.TestFramework.LogError("004", "Exception expected.");
+ retVal = false;
+
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Array.GetValue(int[]) wrong dim length");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), new int[2] {length, length});
+
+ array.GetValue(new int[4] {0,0,0,0});
+
+ TestLibrary.TestFramework.LogError("006", "Exception expected.");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraygetvalue2.cs b/tests/src/CoreMangLib/cti/system/array/arraygetvalue2.cs
new file mode 100644
index 0000000000..6ad224e24a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraygetvalue2.cs
@@ -0,0 +1,250 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Array.GetValue(System.Int32[])
+/// </summary>
+public class ArrayGetValue2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test the two dimension array ");
+
+ try
+ {
+ int length1 = TestLibrary.Generator.GetByte(-55);
+ int length2 = TestLibrary.Generator.GetByte(-55);
+ int[,] i1 = new int[length1, length2];
+ for (int i = 0; i < length1; i++)
+ {
+ for (int y = 0; y < length2; y++)
+ {
+ i1[i, y] = i * length2 + y;
+ }
+ }
+
+ for (int a = 0; a < length1; a++)
+ {
+ for (int b = 0; b < length2; b++)
+ {
+ if ((int)(i1.GetValue(a, b)) != a * length2 + b)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected.");
+ retVal = false;
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test the three dimension array ");
+
+ try
+ {
+ string[, ,] s1 = new string[9, 9, 9];
+ s1[3, 4, 5] = "Hello";
+ if ((string)s1.GetValue(3, 4, 5) != "Hello")
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Test the multiple dimension array ");
+
+ try
+ {
+ int[, , , , , ,] d = new int[9, 9, 9, 9, 9, 9, 9];
+ int[] index1 = new int[7] { 5, 4, 3, 2, 1, 3, 4 };
+ int value = TestLibrary.Generator.GetInt32(-55);
+ d.SetValue(value, index1);
+ if ((int)d.GetValue(index1) != value)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected. ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: There are negative numbers in index[] ");
+
+ try
+ {
+ int[, , ,] i1 = new int[5, 5, 5, 5];
+ i1[2, 3, 4, 1] = TestLibrary.Generator.GetInt32(-55);
+ int result = (int)i1.GetValue(2, -3, 4, -1);
+ TestLibrary.TestFramework.LogError("101", "The IndexOutOfRangeException is not thrown as expected ");
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The index is greater than the upper bound");
+
+ try
+ {
+ int[, , ,] i1 = new int[5, 5, 5, 5];
+ i1[2, 3, 4, 1] = TestLibrary.Generator.GetInt32(-55);
+ int result = (int)i1.GetValue(2, 5, 4, 4);
+ TestLibrary.TestFramework.LogError("103", "The IndexOutOfRangeException is not thrown as expected ");
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: The number of dimensions is not equal to the number of elements in index[]");
+
+ try
+ {
+ int[, , , , ,] i1 = new int[9, 9, 9, 9, 9, 9];
+ int result = (int)i1.GetValue(2, 5, 4, 4);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentException is not thrown as expected ");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: Set the argument index[] to null");
+
+ try
+ {
+ int[, , , , ,] i1 = new int[9, 9, 9, 9, 9, 9];
+ int[] i2 = null;
+ int result = (int)i1.GetValue(i2);
+ TestLibrary.TestFramework.LogError("107", "The ArgumentNullException is not thrown as expected ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArrayGetValue2 test = new ArrayGetValue2();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayGetValue2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraygetvalue2b.cs b/tests/src/CoreMangLib/cti/system/array/arraygetvalue2b.cs
new file mode 100644
index 0000000000..acc81f5620
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraygetvalue2b.cs
@@ -0,0 +1,126 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArrayGetValue2
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ArrayGetValue2 ac = new ArrayGetValue2();
+
+ TestLibrary.TestFramework.BeginTestCase("Array.GetValue(int)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ int element;
+ int index;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Array.GetValue(int) single dim");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ element = TestLibrary.Generator.GetInt32(-55);
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array.SetValue((object)TestLibrary.Generator.GetInt32(-55), i);
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32(-55) % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ if (element != (int)array.GetValue(index))
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected value: Expected(" + element + ") Actual(" + (int)array.GetValue(index) + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Array.GetValue(int) wrong rank");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), new int[2] {length, length});
+
+ array.GetValue(0);
+
+ TestLibrary.TestFramework.LogError("002", "Exception expected.");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayicollectionget_count.cs b/tests/src/CoreMangLib/cti/system/array/arrayicollectionget_count.cs
new file mode 100644
index 0000000000..41729009f9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayicollectionget_count.cs
@@ -0,0 +1,120 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArrayICollectionget_Count
+{
+ const int row_Length = 10;
+ const int column_length = 10;
+ const int three_dimensionlngth = 10;
+
+ public static int Main(string[] args)
+ {
+ ArrayICollectionget_Count aICollectionCount = new ArrayICollectionget_Count();
+ TestLibrary.TestFramework.BeginScenario("Testing Array.System.ICollection.get_Count...");
+
+ if (aICollectionCount.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify get_Count interface can fetch correct value in one-dimensional array...");
+
+ try
+ {
+ Array myArray = Array.CreateInstance(typeof(object), row_Length);
+ ICollection myIList = (ICollection)myArray;
+ if (myIList.Count != row_Length)
+ {
+ TestLibrary.TestFramework.LogError("001","The count is not equal to row_length in one-dimensional array!");
+ return retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify get_Count interface can fetch correct value in two-dimensional array...");
+
+ try
+ {
+ Array myArray = Array.CreateInstance(typeof(object), row_Length,column_length);
+ ICollection myIList = (ICollection)myArray;
+ if (myIList.Count != row_Length*column_length)
+ {
+ TestLibrary.TestFramework.LogError("001", "The count is not equal to total length in two-dimensional array!");
+ return retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify get_Count interface can fetch correct value in multi-dimensional array...");
+
+ try
+ {
+ int[] dimensionCount = { row_Length, column_length, three_dimensionlngth };
+ Array myArray = Array.CreateInstance(typeof(object), dimensionCount);
+ ICollection myIList = (ICollection)myArray;
+ if (myIList.Count != row_Length * column_length * three_dimensionlngth)
+ {
+ TestLibrary.TestFramework.LogError("003", "The count is not equal to total length in multi-dimensional array... ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004","Unexpected exception ouucrs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayilistadd.cs b/tests/src/CoreMangLib/cti/system/array/arrayilistadd.cs
new file mode 100644
index 0000000000..282a5e4abf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayilistadd.cs
@@ -0,0 +1,68 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+
+public class ArrayIListAdd
+{
+ public static int Main(string[] args)
+ {
+ ArrayIListAdd aIListAdd = new ArrayIListAdd();
+ TestLibrary.TestFramework.BeginScenario("Testing Array.System.Collections.IList.Add...");
+
+ if (aIListAdd.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify add interface is not implement...");
+
+ try
+ {
+ Array myObjArray = Array.CreateInstance(typeof(object), 10);
+ IList myObjList = (IList)myObjArray;
+ object addValue = (object)new Int32();
+ myObjList.Add(addValue);
+
+ TestLibrary.TestFramework.LogError("001","No exception occurs!");
+ retVal = false;
+ }
+ catch (NotSupportedException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayilistclear.cs b/tests/src/CoreMangLib/cti/system/array/arrayilistclear.cs
new file mode 100644
index 0000000000..1b1f815b85
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayilistclear.cs
@@ -0,0 +1,175 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArrayIListClear
+{
+ public static int Main(string[] args)
+ {
+ ArrayIListClear aIListClear = new ArrayIListClear();
+ TestLibrary.TestFramework.BeginScenario("Testing Array.System.Collections.IList.clear...");
+
+ if (aIListClear.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify Int array is set zero value after clear action...");
+
+ try
+ {
+ Array myObjArray = Array.CreateInstance(typeof(int), 10);
+ for (int i = 0; i < myObjArray.Length; i++)
+ {
+ myObjArray.SetValue(i + 1, i);
+ }
+
+ IList myIList = (IList)myObjArray;
+ myIList.Clear();
+ foreach (int element in myIList)
+ {
+ if (element != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "element is not removed yet!");
+ retVal = false;
+ break;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify object array is set null value after clear action...");
+
+ try
+ {
+ Array myObjArray = Array.CreateInstance(typeof(object), 10);
+ for (int i = 0; i < myObjArray.Length; i++)
+ {
+ myObjArray.SetValue((object)(i + 1), i);
+ }
+
+ IList myIList = (IList)myObjArray;
+ myIList.Clear();
+ foreach (object element in myIList)
+ {
+ if (element != null)
+ {
+ TestLibrary.TestFramework.LogError("001", "element is not removed yet!");
+ retVal = false;
+ break;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify bool array is set false value after clear action...");
+
+ try
+ {
+ Array myObjArray = Array.CreateInstance(typeof(bool), 10);
+ for (int i = 0; i < myObjArray.Length; i++)
+ {
+ myObjArray.SetValue(true, i);
+ }
+
+ IList myIList = (IList)myObjArray;
+ myIList.Clear();
+ foreach (bool element in myIList)
+ {
+ if (element)
+ {
+ TestLibrary.TestFramework.LogError("005", "element is not removed yet!");
+ retVal = false;
+ break;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify ArgumentNullException is thrown when array is null...");
+
+ try
+ {
+ Array myArray = null;
+ IList myIList = (IList)myArray;
+
+ myIList.Clear();
+ TestLibrary.TestFramework.LogError("007","No exception occurs!");
+ retVal = true;
+ }
+ catch (NullReferenceException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayilistcontains.cs b/tests/src/CoreMangLib/cti/system/array/arrayilistcontains.cs
new file mode 100644
index 0000000000..bc7e3facb0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayilistcontains.cs
@@ -0,0 +1,136 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArrayIListContains
+{
+ public static int Main(string[] args)
+ {
+ ArrayIListContains aIListContains = new ArrayIListContains();
+ TestLibrary.TestFramework.BeginScenario("Testing Array.System.Collections.IList.Contains...");
+
+ if (aIListContains.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify Contains referrence type...");
+
+ try
+ {
+ Array myArray = Array.CreateInstance(typeof(object), 10);
+ for (int i = 0; i < myArray.Length; i++)
+ {
+ myArray.SetValue((object)(i + 1), i);
+ }
+
+ IList myIList = (IList)myArray;
+ for (int i = 0; i < myIList.Count; i++)
+ {
+ if (!myIList.Contains((object)(i + 1)))
+ {
+ TestLibrary.TestFramework.LogError("001", "Contains wrong object!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify Contains value type...");
+
+ try
+ {
+ Array myArray = Array.CreateInstance(typeof(int), 10);
+ for (int i = 0; i < myArray.Length; i++)
+ {
+ myArray.SetValue(i + 1, i);
+ }
+
+ IList myIList = (IList)myArray;
+ for (int i = 0; i < myIList.Count; i++)
+ {
+ if (!myIList.Contains(i + 1))
+ {
+ TestLibrary.TestFramework.LogError("003", "Contains wrong object!");
+ retVal = false;
+ break;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify RankException is thrown when invole contain using multiple array...");
+
+ try
+ {
+ object obj = new object();
+ Array myMultiArray = Array.CreateInstance(typeof(object), 10, 10);
+ IList myIList = (IList)myMultiArray;
+ myIList.Contains(obj);
+
+ TestLibrary.TestFramework.LogError("005","No exception occurs!");
+ retVal = false;
+ }
+ catch (RankException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayilistget_item.cs b/tests/src/CoreMangLib/cti/system/array/arrayilistget_item.cs
new file mode 100644
index 0000000000..972ef6b7f7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayilistget_item.cs
@@ -0,0 +1,180 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArrayIListget_item
+{
+ const int row_length = 10;
+ const int colomn_length = 10;
+
+ public static int Main(string[] args)
+ {
+ ArrayIListget_item aILIstGetItem = new ArrayIListget_item();
+ TestLibrary.TestFramework.BeginScenario("Testing Array.System.IList.get_item...");
+
+ if (aILIstGetItem.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify set_item method can get the correct object element in the range...");
+
+ try
+ {
+ Array myArray = Array.CreateInstance(typeof(object), row_length);
+ object[] myObjArray1 = new object[myArray.Length];
+ for (int i = 0; i < myArray.Length; i++)
+ {
+ myObjArray1[i] = (object)(i + 1);
+ }
+ IList myIList = (IList)myArray;
+
+ for (int j = 0; j < myIList.Count; j++)
+ {
+ myIList[j] = myObjArray1[j];
+ if (Convert.ToInt32(myObjArray1[j]) != Convert.ToInt32(myIList[j]))
+ {
+ TestLibrary.TestFramework.LogError("002", "The value get from myIList is not equal to original set");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify set element before IList instance first index...");
+
+ try
+ {
+ Array myArray = Array.CreateInstance(typeof(object), row_length);
+ for (int i = 0; i < myArray.Length; i++)
+ {
+ myArray.SetValue((object)(i + 1), i);
+ }
+ IList myIList = (IList)myArray;
+ myIList[-1] = (object)10;
+
+ TestLibrary.TestFramework.LogError("004", "No exception occurs!");
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify set element after IList instance last index...");
+
+ try
+ {
+ Array myArray = Array.CreateInstance(typeof(object), row_length);
+ for (int i = 0; i < myArray.Length; i++)
+ {
+ myArray.SetValue((object)(i + 1), i);
+ }
+ IList myIList = (IList)myArray;
+ object myIListElement = myIList[myIList.Count];
+
+ TestLibrary.TestFramework.LogError("006", "No exception occurs!");
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Testing ArgumentException is thrown when set item from multidimensional array...");
+
+ try
+ {
+ Array myArray = Array.CreateInstance(typeof(object), row_length, colomn_length);
+ object[] objArray = new object[row_length * colomn_length];
+
+ for (int i = 0; i < row_length; i++)
+ {
+ for (int j = 0; j < colomn_length; j++)
+ {
+ myArray.SetValue((object)((i + 1) * (j + 1)), i, j);
+ }
+ }
+ IList myIList = (IList)myArray;
+
+ for (int j = 0; j < myIList.Count; j++)
+ {
+ objArray[j] = myIList[j];
+ }
+
+ TestLibrary.TestFramework.LogError("008", "No exception occurs!");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexcepted exception ouucrs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayilistindexof.cs b/tests/src/CoreMangLib/cti/system/array/arrayilistindexof.cs
new file mode 100644
index 0000000000..cd269fe1dc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayilistindexof.cs
@@ -0,0 +1,129 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArrayIListIndexOF
+{
+ const int minLength = 1;
+ const int maxLength = 10;
+ string myValue = TestLibrary.Generator.GetString(-55, false, minLength, maxLength);
+
+ public static int Main(string[] args)
+ {
+ ArrayIListIndexOF aIListIndexOf = new ArrayIListIndexOF();
+ TestLibrary.TestFramework.BeginScenario("Testing Array.System.Collections.IList.IndexOf...");
+
+ if (aIListIndexOf.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify Indexof method return correct when multiple same objects in array...");
+
+ try
+ {
+ Array myArray = Array.CreateInstance(typeof(String), 10);
+
+ for (int i = 0; i < myValue.Length; i++)
+ {
+ myArray.SetValue(myValue, i);
+ }
+ IList myIList = (IList)myArray;
+ if (myIList.IndexOf(myValue) != 0)
+ {
+ TestLibrary.TestFramework.LogError("001","The index if not the first place the value appears!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify NullReferrenceException is thrown when array is null...");
+
+ try
+ {
+ Array myArray = null;
+ IList myIList = (IList)myArray;
+ myIList.IndexOf(myValue);
+
+ TestLibrary.TestFramework.LogError("001","No exception ouucrs!");
+ retVal = false;
+ }
+ catch (NullReferenceException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify RankException is thrown when array is multidimensional...");
+
+ try
+ {
+ Array myMultiArray = Array.CreateInstance(typeof(string), 10, 10);
+ IList myIList = (IList)myMultiArray;
+ myIList.IndexOf(myValue);
+
+ TestLibrary.TestFramework.LogError("003","No exception occurs!");
+ retVal = false;
+ }
+ catch (RankException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayilistinsert.cs b/tests/src/CoreMangLib/cti/system/array/arrayilistinsert.cs
new file mode 100644
index 0000000000..bde092355a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayilistinsert.cs
@@ -0,0 +1,69 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+
+public class ArrayIListInsert
+{
+ public static int Main(string[] args)
+ {
+ ArrayIListInsert aIListInsert = new ArrayIListInsert();
+ TestLibrary.TestFramework.BeginScenario("Testing Array.System.Collections.IList.Insert...");
+
+ if (aIListInsert.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ //retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify Insert interface is not implement...");
+
+ try
+ {
+ Array myObjArray = Array.CreateInstance(typeof(object), 10);
+ IList myObjList = (IList)myObjArray;
+ object addValue = (object)new Int32();
+ myObjList.Insert(0,addValue);
+
+ TestLibrary.TestFramework.LogError("001", "No exception occurs!");
+ retVal = false;
+ }
+ catch (NotSupportedException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayilistremove.cs b/tests/src/CoreMangLib/cti/system/array/arrayilistremove.cs
new file mode 100644
index 0000000000..974f7549d2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayilistremove.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+
+public class ArrayIListRemove
+{
+ public static int Main(string[] args)
+ {
+ ArrayIListRemove aIListRemove = new ArrayIListRemove();
+ TestLibrary.TestFramework.BeginScenario("Testing Array.System.Collections.IList.Remove...");
+
+ if (aIListRemove.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify System.IList.Remove interface is not implement...");
+
+ try
+ {
+ Array myObjArray = Array.CreateInstance(typeof(object), 10);
+ for (int i = 0; i < myObjArray.Length; i++)
+ {
+ myObjArray.SetValue((object)(i+1),i);
+ }
+ IList myObjList = (IList)myObjArray;
+
+ for (int j = 0; j < myObjArray.Length; j++)
+ {
+ myObjList.Remove((object)j);
+ }
+
+ TestLibrary.TestFramework.LogError("001", "No exception occurs!");
+ retVal = false;
+ }
+ catch (NotSupportedException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayilistremoveat.cs b/tests/src/CoreMangLib/cti/system/array/arrayilistremoveat.cs
new file mode 100644
index 0000000000..5e91903944
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayilistremoveat.cs
@@ -0,0 +1,74 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArrayIListRemoveAt
+{
+ public static int Main(string[] args)
+ {
+ ArrayIListRemoveAt aIListRemove = new ArrayIListRemoveAt();
+ TestLibrary.TestFramework.BeginScenario("Testing Array,System.IList.RemoveAt...");
+
+ if (aIListRemove.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify System.IList.RemoveAt interface is not implement...");
+
+ try
+ {
+ Array myObjArray = Array.CreateInstance(typeof(object), 10);
+ for (int i = 0; i < myObjArray.Length; i++)
+ {
+ myObjArray.SetValue((object)(i + 1), i);
+ }
+ IList myObjList = (IList)myObjArray;
+
+ for (int j = 0; j < myObjArray.Length; j++)
+ {
+ myObjList.RemoveAt(j);
+ }
+
+ TestLibrary.TestFramework.LogError("001", "No exception occurs!");
+ retVal = false;
+ }
+ catch (NotSupportedException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayilistset_item.cs b/tests/src/CoreMangLib/cti/system/array/arrayilistset_item.cs
new file mode 100644
index 0000000000..0697c9e843
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayilistset_item.cs
@@ -0,0 +1,186 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArrayIListset_item
+{
+ const int row_length = 10;
+ const int column_length = 10;
+
+ public static int Main(string[] args)
+ {
+ ArrayIListset_item aIListItem = new ArrayIListset_item();
+ TestLibrary.TestFramework.BeginScenario("Testing Array.System.Collections.IList.set_item...");
+
+ if (aIListItem.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify get_item method can get the correct object element in the range...");
+
+ try
+ {
+ Array myArray = Array.CreateInstance(typeof(object), row_length);
+ object[] myObjArray1 = new object[myArray.Length];
+ for (int i = 0; i < myArray.Length; i++)
+ {
+ myObjArray1[i] = (object)(i + 1);
+ myArray.SetValue((object)(i + 1), i);
+ }
+ IList myIList = (IList)myArray;
+ object[] myObjArray2 = new object[myIList.Count];
+ if (myObjArray1.Length != myObjArray2.Length)
+ {
+ TestLibrary.TestFramework.LogError("001", "The length is not equal!");
+ retVal = false;
+ }
+ else
+ {
+ for (int j = 0; j < myIList.Count; j++)
+ {
+ myObjArray2[j] = myIList[j];
+ if (Convert.ToInt32(myObjArray1[j]) != Convert.ToInt32(myObjArray2[j]))
+ {
+ TestLibrary.TestFramework.LogError("002", "The value get from myIList is not equal to original set");
+ retVal = false;
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify get element before IList instance first index...");
+
+ try
+ {
+ Array myArray = Array.CreateInstance(typeof(object), row_length);
+ for (int i = 0; i < myArray.Length; i++)
+ {
+ myArray.SetValue((object)(i + 1), i);
+ }
+ IList myIList = (IList)myArray;
+ object myIListElement = myIList[-1];
+
+ TestLibrary.TestFramework.LogError("003", "No exception occurs!");
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify get element after IList instance last index...");
+
+ try
+ {
+ Array myArray = Array.CreateInstance(typeof(object), row_length);
+ for (int i = 0; i < myArray.Length; i++)
+ {
+ myArray.SetValue((object)(i + 1), i);
+ }
+ IList myIList = (IList)myArray;
+ object myIListElement = myIList[myIList.Count];
+
+ TestLibrary.TestFramework.LogError("005", "No exception occurs!");
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Testing ArgumentException is thrown when get item from multidimensional array...");
+
+ try
+ {
+ Array myArray = Array.CreateInstance(typeof(Int32), row_length, column_length);
+ object[] objArray = new object[row_length * column_length];
+ for (int i = 0; i < myArray.Length; i++)
+ {
+ myArray.SetValue(i + 1, i);
+ }
+ IList myIList = (IList)myArray;
+
+ for (int j = 0; j < myIList.Count; j++)
+ {
+ objArray[j] = myIList[j];
+ }
+
+ TestLibrary.TestFramework.LogError("007", "No exception occurs!");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexcepted exception ouucrs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayindexof1.cs b/tests/src/CoreMangLib/cti/system/array/arrayindexof1.cs
new file mode 100644
index 0000000000..3a1be5986e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayindexof1.cs
@@ -0,0 +1,394 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Array.IndexOf(System.Array,System.Object,System.Int32,System.Int32)
+/// </summary>
+public class ArrayIndexOf1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Travel the array");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ int[] i1 = new int[length];
+ for (int i = 0; i < length; i++) //set the value for the array
+ {
+ i1[i] = i;
+ }
+ for (int a = 0; a < length; a++) //check every value using indexof method
+ {
+ int result = (int)Array.IndexOf(i1, a, 0, length);
+ if (result != a)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Search the value from the middle of the array");
+
+ try
+ {
+ int[] i1 = new int[5] { 6, 3, 4, 7, 10 };
+ int result = (int)Array.IndexOf(i1, 7, 3, 2);
+ if (result != 3)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Set the fourth argument \"count\"to zero");
+
+ try
+ {
+ int[] i1 = new int[5] { 6, 6, 6, 6, 6 };
+ int result = Array.IndexOf(i1, 6, 0, 0);
+ if (result != -1)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Set two equal value in one array");
+
+ try
+ {
+ int[] i1 = new int[5] { 1, 6, 9, 6, 2 };
+ int result = Array.IndexOf(i1, 6, 0, 5);
+ if (result != 1)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Find out the second value which has a equal value before it");
+
+ try
+ {
+ int[] i1 = new int[5] { 1, 3, 7, 7, 2 };
+ int result = Array.IndexOf(i1, 7, 3, 2);
+ if (result != 3)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Find out no expected value");
+
+ try
+ {
+ int[] i1 = new int[5] { 1, 3, 7, 8, 2 };
+ int result = Array.IndexOf(i1, 9, 0, 5);
+ if (result != -1)
+ {
+ TestLibrary.TestFramework.LogError("011", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Set the second argument as a different type value");
+
+ try
+ {
+ int[] i1 = new int[5] { 7, 7, 7, 7, 7 };
+ Int16 i2 = 7;
+ int result = Array.IndexOf(i1, (object)i2, 0, 5);
+ if (result != -1)
+ {
+ TestLibrary.TestFramework.LogError("013", "The result is not the value as expected: Expected(-1) Actual("+result+")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The array to be searched is null reference ");
+
+ try
+ {
+ string[] s1 = null;
+ int result = Array.IndexOf(s1, 0, 0, 10);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException is not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The startIndex is less than zero ");
+
+ try
+ {
+ int[] s1 = new int[5] { 3, 4, 5, 6, 7 };
+ int result = Array.IndexOf(s1, 4, -1, 3);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException is not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: The startIndex is greater than range of index for the array ");
+
+ try
+ {
+ int[] s1 = new int[5] { 3, 4, 5, 6, 7 };
+ int result = Array.IndexOf(s1, 4, 5, 1);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentOutOfRangeException is not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: The count is less than zero ");
+
+ try
+ {
+ int[] s1 = new int[5] { 3, 4, 5, 6, 7 };
+ int result = Array.IndexOf(s1, 4, 0, -1);
+ TestLibrary.TestFramework.LogError("107", "The ArgumentOutOfRangeException is not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: The count exceed the end of the array ");
+
+ try
+ {
+ int[] s1 = new int[5] { 3, 4, 5, 6, 7 };
+ int result = Array.IndexOf(s1, 4, 3, 8);
+ TestLibrary.TestFramework.LogError("109", "The ArgumentOutOfRangeException is not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("110", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: The array is multidimension . ");
+
+ try
+ {
+ int[,] s1 = new int[2, 3] { { 1, 2, 3 }, { 4, 4, 6 } };
+ int result = Array.IndexOf(s1, 4, 0, 2);
+ TestLibrary.TestFramework.LogError("111", "The ArgumentOutOfRangeException is not thrown as expected");
+ retVal = false;
+ }
+ catch (RankException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("112", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArrayIndexOf1 test = new ArrayIndexOf1();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayIndexOf1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayindexof1b.cs b/tests/src/CoreMangLib/cti/system/array/arrayindexof1b.cs
new file mode 100644
index 0000000000..b172165df4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayindexof1b.cs
@@ -0,0 +1,635 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public class ArrayIndexOf1
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ArrayIndexOf1 ac = new ArrayIndexOf1();
+
+ TestLibrary.TestFramework.BeginTestCase("Array.IndexOf(Array, object, int, int)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+ retVal = NegTest9() && retVal;
+ retVal = NegTest10() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ int element;
+ int index;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Array.IndexOf(Array, object, int, int) where element is found");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ element = TestLibrary.Generator.GetInt32(-55);
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array.SetValue((object)TestLibrary.Generator.GetInt32(-55), i);
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32(-55) % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ newIndex = Array.IndexOf(array, (object)element, 0, array.Length);
+
+ if (index < newIndex)
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected index: Expected(" + index + ") Actual(" + newIndex + ")");
+ retVal = false;
+ }
+
+ if (element != (int)array.GetValue(newIndex))
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected value: Expected(" + element + ") Actual(" + (int)array.GetValue(newIndex) + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ string element;
+ int index;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Array.IndexOf(Array, object, int, int) non-primitive type");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(string), length);
+
+ element = TestLibrary.Generator.GetString(-55, false, c_MIN_STRLEN, c_MAX_STRLEN);
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array.SetValue(TestLibrary.Generator.GetString(-55, false, c_MIN_STRLEN, c_MAX_STRLEN), i);
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32(-55) % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ newIndex = Array.IndexOf(array, (object)element, 0, array.Length);
+
+ if (index < newIndex)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected index: Expected(" + index + ") Actual(" + newIndex + ")");
+ retVal = false;
+ }
+
+ if (!element.Equals(array.GetValue(newIndex)))
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected value: Expected(" + element + ") Actual(" + array.GetValue(newIndex) + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ object element;
+ int index;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Array.IndexOf(Array, object, int, int) non-primitive type (with value == null)");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(string), length);
+
+ element = null;
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array.SetValue(TestLibrary.Generator.GetString(-55, false, c_MIN_STRLEN, c_MAX_STRLEN), i);
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32(-55) % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ newIndex = Array.IndexOf(array, (object)element, 0, array.Length);
+
+ if (index < newIndex)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected index: Expected(" + index + ") Actual(" + newIndex + ")");
+ retVal = false;
+ }
+
+ if (element != array.GetValue(newIndex))
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected value: Expected(" + element + ") Actual(" + array.GetValue(newIndex) + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ MyStruct element;
+ int index;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Array.IndexOf(Array, object, int, int) non-primitive type (not derived from object)");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(MyStruct), length);
+
+ element = new MyStruct(TestLibrary.Generator.GetSingle(-55));
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array.SetValue(new MyStruct(TestLibrary.Generator.GetSingle(-55)), i);
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32(-55) % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ newIndex = Array.IndexOf(array, (object)element, 0, array.Length);
+
+ if (index < newIndex)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected index: Expected(" + index + ") Actual(" + newIndex + ")");
+ retVal = false;
+ }
+
+ if (element.f != ((MyStruct)array.GetValue(newIndex)).f)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected value: Expected(" + element.f + ") Actual(" + ((MyStruct)array.GetValue(newIndex)).f + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("011", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ int element;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Array.IndexOf(Array, object, int, int) where element is not found");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ element = TestLibrary.Generator.GetInt32(-55);
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ do
+ {
+ array.SetValue((object)TestLibrary.Generator.GetInt32(-55), i);
+ }
+ while (element == (int)array.GetValue(i));
+ }
+
+ newIndex = Array.IndexOf(array, (object)element, 0, array.Length);
+
+ if (-1 != newIndex)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected index: Actual(" + newIndex + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("013", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ int element;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Array.IndexOf(Array, object, int, int) array full of null's");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ element = TestLibrary.Generator.GetInt32(-55);
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array.SetValue(null, i);
+ }
+
+ newIndex = Array.IndexOf(array, (object)element, 0, array.Length);
+
+ if (-1 != newIndex)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected index: Actual(" + newIndex + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("015", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Array.IndexOf(Array, object, int, int) array is null");
+
+ try
+ {
+ Array.IndexOf(null, (object)1, 0, 0);
+
+ TestLibrary.TestFramework.LogError("016", "Should have thrown an expection");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("017", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ Array array;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: Array.IndexOf(Array, object, int, int) array of length 0");
+
+ try
+ {
+ // creat the array
+ array = Array.CreateInstance(typeof(Int32), 0);
+
+ newIndex = Array.IndexOf(array, (object)null, 0, array.Length);
+
+ if (-1 != newIndex)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected index: Actual(" + newIndex + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("019", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: Array.IndexOf(Array, object, int, int) start index less than lower bound");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ Array.IndexOf(array, (object)null, -1, array.Length);
+
+ TestLibrary.TestFramework.LogError("020", "Should have thrown an exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("021", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: Array.IndexOf(Array, object, int, int) start index greater than upper bound");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ Array.IndexOf(array, (object)null, array.Length, array.Length);
+
+ TestLibrary.TestFramework.LogError("022", "Should have thrown an exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("023", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest7: Array.IndexOf(Array, object, int, int) count less than 0");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ Array.IndexOf(array, (object)null, 0, -1);
+
+ TestLibrary.TestFramework.LogError("024", "Should have thrown an exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("025", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest8()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest8: Array.IndexOf(Array, object, int, int) (startindex < 0)");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ Array.IndexOf(array, (object)null, -1, array.Length);
+
+ TestLibrary.TestFramework.LogError("026", "Should have thrown an exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("027", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest9()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest9: Array.IndexOf(Array, object, int, int) multi dim array");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), new int[2] {length, length});
+
+ Array.IndexOf(array, (object)null, 0, array.Length);
+
+ TestLibrary.TestFramework.LogError("028", "Should have thrown an exception");
+ retVal = false;
+ }
+ catch (RankException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("029", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public struct MyStruct
+ {
+ public float f;
+
+ public MyStruct(float ff) { f = ff; }
+ }
+
+ public bool NegTest10()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ MyStruct element;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest10: Array.IndexOf(Array, object, int, int) non-primitive type (not derived from object) not found");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(MyStruct), length);
+
+ element = new MyStruct(TestLibrary.Generator.GetSingle(-55));
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ do
+ {
+ array.SetValue(new MyStruct(TestLibrary.Generator.GetSingle(-55)), i);
+ }
+ while(element.Equals((MyStruct)array.GetValue(i)));
+ }
+
+ newIndex = Array.IndexOf(array, (object)element, 0, array.Length);
+
+ if (-1 != newIndex)
+ {
+ TestLibrary.TestFramework.LogError("030", "Unexpected index: Expected(-1) Actual(" + newIndex + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("031", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayindexof2.cs b/tests/src/CoreMangLib/cti/system/array/arrayindexof2.cs
new file mode 100644
index 0000000000..9c76f95654
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayindexof2.cs
@@ -0,0 +1,158 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+///System.Array.IndexOf<T>(T[], T)
+/// </summary>
+public class ArrayIndexOf2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Set the argument T as int type ");
+
+ try
+ {
+ int[] i1 = new int[5] { 3, 4, 6, 7, 8 };
+ if (Array.IndexOf<int>(i1, 6) != 2)
+ {
+ TestLibrary.TestFramework.LogError("001", " The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Set the argument T as string type ");
+
+ try
+ {
+ string[] s1 = new string[5]{"Jack",
+ "Tom",
+ "mary",
+ "Joan",
+ "Michael"};
+ int result = Array.IndexOf<string>(s1, "Joan");
+ if (result != 3)
+ {
+ TestLibrary.TestFramework.LogError("003", " The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Find out no expected value ");
+
+ try
+ {
+ string[] s1 = new string[5]{"Jack",
+ "Tom",
+ "mary",
+ "Joan",
+ "Michael"};
+ int result = Array.IndexOf<string>(s1, "Mary");
+ if (result != -1)
+ {
+ TestLibrary.TestFramework.LogError("005", " The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Input a null reference array ");
+
+ try
+ {
+ string[] s1 = null;
+ int result = Array.IndexOf<string>(s1, "Tom");
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArrayIndexOf2 test = new ArrayIndexOf2();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayIndexOf2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayindexof2b.cs b/tests/src/CoreMangLib/cti/system/array/arrayindexof2b.cs
new file mode 100644
index 0000000000..c5b0d4ba31
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayindexof2b.cs
@@ -0,0 +1,149 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public class ArrayIndexOf2
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ArrayIndexOf2 ac = new ArrayIndexOf2();
+
+ TestLibrary.TestFramework.BeginTestCase("Array.IndexOf(T[] array, T value)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1() { return PosIndexOf<Int64>(1, TestLibrary.Generator.GetInt64(-55), TestLibrary.Generator.GetInt64(-55)); }
+ public bool PosTest2() { return PosIndexOf<Int32>(2, TestLibrary.Generator.GetInt32(-55), TestLibrary.Generator.GetInt32(-55)); }
+ public bool PosTest3() { return PosIndexOf<Int16>(3, TestLibrary.Generator.GetInt16(-55), TestLibrary.Generator.GetInt16(-55)); }
+ public bool PosTest4() { return PosIndexOf<Byte>(4, TestLibrary.Generator.GetByte(-55), TestLibrary.Generator.GetByte(-55)); }
+ public bool PosTest5() { return PosIndexOf<double>(5, TestLibrary.Generator.GetDouble(-55), TestLibrary.Generator.GetDouble(-55)); }
+ public bool PosTest6() { return PosIndexOf<float>(6, TestLibrary.Generator.GetSingle(-55), TestLibrary.Generator.GetSingle(-55)); }
+ public bool PosTest7() { return PosIndexOf<char>(7, TestLibrary.Generator.GetCharLetter(-55), TestLibrary.Generator.GetCharLetter(-55)); }
+ public bool PosTest8() { return PosIndexOf<char>(8, TestLibrary.Generator.GetCharNumber(-55), TestLibrary.Generator.GetCharNumber(-55)); }
+ public bool PosTest9() { return PosIndexOf<char>(9, TestLibrary.Generator.GetChar(-55), TestLibrary.Generator.GetChar(-55)); }
+ public bool PosTest10() { return PosIndexOf<string>(10, TestLibrary.Generator.GetString(-55, false, c_MIN_STRLEN, c_MAX_STRLEN), TestLibrary.Generator.GetString(-55, false, c_MIN_STRLEN, c_MAX_STRLEN)); }
+
+ public bool NegTest1() { return NegIndexOf<Int32>(1, 1); }
+
+ public bool PosIndexOf<T>(int id, T element, T otherElem)
+ {
+ bool retVal = true;
+ T[] array;
+ int length;
+ int index;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Array.IndexOf(T[] array, T value) (T=="+typeof(T)+") where value is found");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = new T[length];
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array[i] = otherElem;
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32(-55) % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ newIndex = Array.IndexOf<T>(array, element);
+
+ if (index < newIndex)
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected index: Expected(" + index + ") Actual(" + newIndex + ")");
+ retVal = false;
+ }
+
+ if (!element.Equals(array[newIndex]))
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected value: Expected(" + element + ") Actual(" + array[newIndex] + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegIndexOf<T>(int id, T defaultValue)
+ {
+ bool retVal = true;
+ T[] array = null;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Array.IndexOf(T[] array, T value) (T == "+typeof(T)+" where array is null");
+
+ try
+ {
+ Array.IndexOf<T>(array, defaultValue);
+
+ TestLibrary.TestFramework.LogError("003", "Exepction should have been thrown");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayindexof3.cs b/tests/src/CoreMangLib/cti/system/array/arrayindexof3.cs
new file mode 100644
index 0000000000..6a95b9a505
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayindexof3.cs
@@ -0,0 +1,300 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+///System.Array.IndexOf<T>(T[], T,System.Int32)
+/// </summary>
+public class ArrayIndexOf3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Set the argument T as int type ");
+
+ try
+ {
+ int[] i1 = new int[5] { 3, 4, 6, 7, 8 };
+ if (Array.IndexOf<int>(i1, 6, 0) != 2)
+ {
+ TestLibrary.TestFramework.LogError("001", " The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Set the argument T as string type ");
+
+ try
+ {
+ string[] s1 = new string[5]{"Jack",
+ "Tom",
+ "mary",
+ "Joan",
+ "Michael"};
+ int result = Array.IndexOf<string>(s1, "Joan", 3);
+ if (result != 3)
+ {
+ TestLibrary.TestFramework.LogError("003", " The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Find out no expected value ");
+
+ try
+ {
+ string[] s1 = new string[5]{"Jack",
+ "Tom",
+ "mary",
+ "Joan",
+ "Michael"};
+ int result = Array.IndexOf<string>(s1, "Rabelais", 0);
+ if (result != -1)
+ {
+ TestLibrary.TestFramework.LogError("005", " The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Find out no expected value because of the startIndex ");
+
+ try
+ {
+ string[] s1 = new string[5]{"Bachham",
+ "Bachham",
+ "Bachham",
+ "Joan",
+ "Bachham"};
+ int result = Array.IndexOf<string>(s1, "Joan", 4);
+ if (result != -1)
+ {
+ TestLibrary.TestFramework.LogError("007", " The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Find out the fourth expected value ");
+
+ try
+ {
+ string[] s1 = new string[5]{"Bachham",
+ "Bachham",
+ "Bachham",
+ "Joan",
+ "Bachham"};
+ int result = Array.IndexOf<string>(s1, "Bachham", 4);
+ if (result != 4)
+ {
+ TestLibrary.TestFramework.LogError("009", " The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Find out the null element in an array of string ");
+
+ try
+ {
+ string[] s1 = new string[5]{"Bachham",
+ "Bachham",
+ null,
+ "Joan",
+ "Bachham"};
+ int result = Array.IndexOf<string>(s1, null, 0);
+ if (result != 2)
+ {
+ TestLibrary.TestFramework.LogError("011", " The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Input a null reference array ");
+
+ try
+ {
+ string[] s1 = null;
+ int result = Array.IndexOf<string>(s1, "Tom", 0);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The startIndex is negative.");
+
+ try
+ {
+ int[] i1 = { 2, 3, 4, 4, 5 };
+ int result = Array.IndexOf<int>(i1, 4, -1);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: The startIndex is greater than the maxIndex of the array.");
+
+ try
+ {
+ int[] i1 = new int[5] { 2, 3, 4, 4, 5 };
+ int result = Array.IndexOf<int>(i1, 4, 6);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentOutOfRangeException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArrayIndexOf3 test = new ArrayIndexOf3();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayIndexOf3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayindexof3b.cs b/tests/src/CoreMangLib/cti/system/array/arrayindexof3b.cs
new file mode 100644
index 0000000000..92b6b80669
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayindexof3b.cs
@@ -0,0 +1,149 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public class ArrayIndexOf3
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ArrayIndexOf3 ac = new ArrayIndexOf3();
+
+ TestLibrary.TestFramework.BeginTestCase("Array.IndexOf(T[] array, T value)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1() { return PosIndexOf<Int64>(1, TestLibrary.Generator.GetInt64(-55), TestLibrary.Generator.GetInt64(-55)); }
+ public bool PosTest2() { return PosIndexOf<Int32>(2, TestLibrary.Generator.GetInt32(-55), TestLibrary.Generator.GetInt32(-55)); }
+ public bool PosTest3() { return PosIndexOf<Int16>(3, TestLibrary.Generator.GetInt16(-55), TestLibrary.Generator.GetInt16(-55)); }
+ public bool PosTest4() { return PosIndexOf<Byte>(4, TestLibrary.Generator.GetByte(-55), TestLibrary.Generator.GetByte(-55)); }
+ public bool PosTest5() { return PosIndexOf<double>(5, TestLibrary.Generator.GetDouble(-55), TestLibrary.Generator.GetDouble(-55)); }
+ public bool PosTest6() { return PosIndexOf<float>(6, TestLibrary.Generator.GetSingle(-55), TestLibrary.Generator.GetSingle(-55)); }
+ public bool PosTest7() { return PosIndexOf<char>(7, TestLibrary.Generator.GetCharLetter(-55), TestLibrary.Generator.GetCharLetter(-55)); }
+ public bool PosTest8() { return PosIndexOf<char>(8, TestLibrary.Generator.GetCharNumber(-55), TestLibrary.Generator.GetCharNumber(-55)); }
+ public bool PosTest9() { return PosIndexOf<char>(9, TestLibrary.Generator.GetChar(-55), TestLibrary.Generator.GetChar(-55)); }
+ public bool PosTest10() { return PosIndexOf<string>(10, TestLibrary.Generator.GetString(-55, false, c_MIN_STRLEN, c_MAX_STRLEN), TestLibrary.Generator.GetString(-55, false, c_MIN_STRLEN, c_MAX_STRLEN)); }
+
+ public bool NegTest1() { return NegIndexOf<Int32>(1, 1); }
+
+ public bool PosIndexOf<T>(int id, T element, T otherElem)
+ {
+ bool retVal = true;
+ T[] array;
+ int length;
+ int index;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Array.IndexOf(T[] array, T value, int startIndex) (T=="+typeof(T)+") where value is found");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = new T[length];
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array[i] = otherElem;
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32(-55) % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ newIndex = Array.IndexOf<T>(array, element, 0);
+
+ if (index < newIndex)
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected index: Expected(" + index + ") Actual(" + newIndex + ")");
+ retVal = false;
+ }
+
+ if (!element.Equals(array[newIndex]))
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected value: Expected(" + element + ") Actual(" + array[newIndex] + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegIndexOf<T>(int id, T defaultValue)
+ {
+ bool retVal = true;
+ T[] array = null;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Array.IndexOf(T[] array, T value, int startIndex) (T == "+typeof(T)+" where array is null");
+
+ try
+ {
+ Array.IndexOf<T>(array, defaultValue, 0);
+
+ TestLibrary.TestFramework.LogError("003", "Exepction should have been thrown");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayindexof4.cs b/tests/src/CoreMangLib/cti/system/array/arrayindexof4.cs
new file mode 100644
index 0000000000..18b7f0157b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayindexof4.cs
@@ -0,0 +1,376 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Array.IndexOf<>(T<>,T,System.Int32,System.Int32)
+/// </summary>
+public class ArrayIndexOf4
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Travel the array");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ int[] i1 = new int[length];
+ for (int i = 0; i < length; i++) //set the value for the array
+ {
+ i1[i] = i;
+ }
+ for (int a = 0; a < length; a++) //check every value using indexof<> method
+ {
+ int result = Array.IndexOf<int>(i1, a, 0, length);
+ if (result != a)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected. The index is:" + a.ToString());
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Search the value from the middle of the array");
+
+ try
+ {
+ int[] i1 = new int[5] { 6, 3, 4, 7, 10 };
+ int result = Array.IndexOf<int>(i1, 7, 3, 2);
+ if (result != 3)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Set the fourth argument \"count\"to zero");
+
+ try
+ {
+ int[] i1 = new int[5] { 6, 6, 6, 6, 6 };
+ int result = Array.IndexOf<int>(i1, 6, 2, 0);
+ if (result != -1)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Set two equal value in one array");
+
+ try
+ {
+ string[] i1 = new string[6]{"Fix",
+ "Right",
+ "Correct",
+ "Right",
+ "Hello",
+ "Back"};
+
+ int result = Array.IndexOf<string>(i1, "Right", 0, 5);
+ if (result != 1)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Find out the second value which has a equal value before it");
+
+ try
+ {
+ char[] i1 = { 'g', 't', 'r', 'd', 't', 'o' };
+ int result = Array.IndexOf<char>(i1, 't', 3, 2);
+ if (result != 4)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Find out no expected value");
+
+ try
+ {
+ int[] i1 = new int[5] { 1, 3, 7, 8, 2 };
+ int result = Array.IndexOf<int>(i1, 9, 0, 5);
+ if (result != -1)
+ {
+ TestLibrary.TestFramework.LogError("011", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Set the second argument as a different type value");
+
+ try
+ {
+ int[] i1 = new int[5] { 5, 7, 15, 6, 0 };
+ byte i2 = 7;
+ int result = Array.IndexOf<int>(i1, i2, 0, 5);
+ if (result != 1)
+ {
+ TestLibrary.TestFramework.LogError("013", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The array to be searched is null reference ");
+
+ try
+ {
+ string[] s1 = null;
+ int result = Array.IndexOf<string>(s1, "Tom", 0, 10);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException is not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The startIndex is less than zero ");
+
+ try
+ {
+ int[] s1 = new int[5] { 3, 4, 5, 6, 7 };
+ int result = Array.IndexOf<int>(s1, 4, -1, 3);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException is not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: The startIndex is greater than range of index for the array ");
+
+ try
+ {
+ int[] s1 = new int[5] { 3, 4, 5, 6, 7 };
+ int result = Array.IndexOf<int>(s1, 4, 6, 0);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentOutOfRangeException is not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: The count is less than zero ");
+
+ try
+ {
+ int[] s1 = new int[5] { 3, 4, 5, 6, 7 };
+ int result = Array.IndexOf<int>(s1, 4, 0, -1);
+ TestLibrary.TestFramework.LogError("107", "The ArgumentOutOfRangeException is not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: The count exceed the end of the array ");
+
+ try
+ {
+ int[] s1 = new int[5] { 3, 4, 5, 6, 7 };
+ int result = Array.IndexOf<int>(s1, 4, 3, 8);
+ TestLibrary.TestFramework.LogError("109", "The ArgumentOutOfRangeException is not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("110", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArrayIndexOf4 test = new ArrayIndexOf4();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayIndexOf4");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayindexof4b.cs b/tests/src/CoreMangLib/cti/system/array/arrayindexof4b.cs
new file mode 100644
index 0000000000..cc64c7b211
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayindexof4b.cs
@@ -0,0 +1,234 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public class ArrayIndexOf4
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ArrayIndexOf4 ac = new ArrayIndexOf4();
+
+ TestLibrary.TestFramework.BeginTestCase("Array.IndexOf(T[] array, T value)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+ retVal = NegTest9() && retVal;
+ retVal = NegTest10() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1() { return PosIndexOf<Int64>(1, TestLibrary.Generator.GetInt64(-55), TestLibrary.Generator.GetInt64(-55)); }
+ public bool PosTest2() { return PosIndexOf<Int32>(2, TestLibrary.Generator.GetInt32(-55), TestLibrary.Generator.GetInt32(-55)); }
+ public bool PosTest3() { return PosIndexOf<Int16>(3, TestLibrary.Generator.GetInt16(-55), TestLibrary.Generator.GetInt16(-55)); }
+ public bool PosTest4() { return PosIndexOf<Byte>(4, TestLibrary.Generator.GetByte(-55), TestLibrary.Generator.GetByte(-55)); }
+ public bool PosTest5() { return PosIndexOf<double>(5, TestLibrary.Generator.GetDouble(-55), TestLibrary.Generator.GetDouble(-55)); }
+ public bool PosTest6() { return PosIndexOf<float>(6, TestLibrary.Generator.GetSingle(-55), TestLibrary.Generator.GetSingle(-55)); }
+ public bool PosTest7() { return PosIndexOf<char>(7, TestLibrary.Generator.GetCharLetter(-55), TestLibrary.Generator.GetCharLetter(-55)); }
+ public bool PosTest8() { return PosIndexOf<char>(8, TestLibrary.Generator.GetCharNumber(-55), TestLibrary.Generator.GetCharNumber(-55)); }
+ public bool PosTest9() { return PosIndexOf<char>(9, TestLibrary.Generator.GetChar(-55), TestLibrary.Generator.GetChar(-55)); }
+ public bool PosTest10() { return PosIndexOf<string>(10, TestLibrary.Generator.GetString(-55, false, c_MIN_STRLEN, c_MAX_STRLEN), TestLibrary.Generator.GetString(-55, false, c_MIN_STRLEN, c_MAX_STRLEN)); }
+
+ public bool PosTest11() { return PosIndexOf2<Int32>(11, 1, 0, 0, 0); }
+
+ public bool NegTest1() { return NegIndexOf<Int32>(1, 1); }
+ // id, defaultValue, length, startIndex, count
+ public bool NegTest2() { return NegIndexOf2<Int32>( 2, 1, 0, 1, 0); }
+ public bool NegTest3() { return NegIndexOf2<Int32>( 3, 1, 0, -2, 0); }
+ public bool NegTest4() { return NegIndexOf2<Int32>( 4, 1, 0, -1, 1); }
+ public bool NegTest5() { return NegIndexOf2<Int32>( 5, 1, 0, 0, 1); }
+ public bool NegTest6() { return NegIndexOf2<Int32>( 6, 1, 1, -1, 1); }
+ public bool NegTest7() { return NegIndexOf2<Int32>( 7, 1, 1, 2, 1); }
+ public bool NegTest8() { return NegIndexOf2<Int32>( 8, 1, 1, 0, -1); }
+ public bool NegTest9() { return NegIndexOf2<Int32>( 9, 1, 1, 0, -1); }
+ public bool NegTest10() { return NegIndexOf2<Int32>(10, 1, 1, 1, 2); }
+
+ public bool PosIndexOf<T>(int id, T element, T otherElem)
+ {
+ bool retVal = true;
+ T[] array;
+ int length;
+ int index;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Array.IndexOf(T[] array, T value, int startIndex, int count) (T=="+typeof(T)+") where value is found");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = new T[length];
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array[i] = otherElem;
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32(-55) % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ newIndex = Array.IndexOf<T>(array, element, 0, array.Length);
+
+ if (index < newIndex)
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected index: Expected(" + index + ") Actual(" + newIndex + ")");
+ retVal = false;
+ }
+
+ if (!element.Equals(array[newIndex]))
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected value: Expected(" + element + ") Actual(" + array[newIndex] + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosIndexOf2<T>(int id, T defaultValue, int length, int startIndex, int count)
+ {
+ bool retVal = true;
+ T[] array = null;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Array.IndexOf(T["+length+"] array, T value, "+startIndex+", "+count+") (T == "+typeof(T)+" where array is null");
+
+ try
+ {
+ array = new T[ length ];
+
+ newIndex = Array.IndexOf<T>(array, defaultValue, startIndex, count);
+
+ if (-1 != newIndex)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected value: Expected(-1) Actual("+newIndex+")");
+ retVal = false;
+ }
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegIndexOf<T>(int id, T defaultValue)
+ {
+ bool retVal = true;
+ T[] array = null;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Array.IndexOf(T[] array, T value, int startIndex, int count) (T == "+typeof(T)+" where array is null");
+
+ try
+ {
+ Array.IndexOf<T>(array, defaultValue, 0, 0);
+
+ TestLibrary.TestFramework.LogError("005", "Exepction should have been thrown");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegIndexOf2<T>(int id, T defaultValue, int length, int startIndex, int count)
+ {
+ bool retVal = true;
+ T[] array = null;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Array.IndexOf(T["+length+"] array, T value, "+startIndex+", "+count+") (T == "+typeof(T)+" where array is null");
+
+ try
+ {
+ array = new T[ length ];
+
+ Array.IndexOf<T>(array, defaultValue, startIndex, count);
+
+ TestLibrary.TestFramework.LogError("007", "Exepction should have been thrown");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayinitialize.cs b/tests/src/CoreMangLib/cti/system/array/arrayinitialize.cs
new file mode 100644
index 0000000000..b7a93e2dee
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayinitialize.cs
@@ -0,0 +1,216 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Array.Initialize()
+/// </summary>
+public class ArrayInitialize
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Array of Int32, Initialize ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55);
+ int[] i1 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ i1[i] = i;
+ }
+ i1.Initialize(); // The type of int32 does not have constructors, so the value is not changed
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Try to Initialize a customized structure type");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55);
+ A[] i1 = new A[length];
+ for (int i = 0; i < length; i++)
+ {
+ i1[i] = new A(i);
+ }
+ i1.Initialize();
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i].a != i)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Initialize a reference-type array ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55);
+ string[] i1 = new string[length];
+ for (int i = 0; i < length; i++)
+ {
+ i1[i] = i.ToString();
+ }
+ i1.Initialize(); // The type of int32 does not have constructors, so the value is not changed
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Try to Initialize a customized class type");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55);
+ B[] i1 = new B[length];
+ for (int i = 0; i < length; i++)
+ {
+ i1[i] = new B(i);
+ }
+ i1.Initialize();
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i].b_value != i)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArrayInitialize test = new ArrayInitialize();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayInitialize");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+struct A
+{
+ public A(int a)
+ {
+ this.a = a;
+ }
+ public int a;
+}
+
+class B
+{
+ public B()
+ {
+ this.b = 0;
+ }
+ public B(int b)
+ {
+ this.b = b;
+ }
+ public int b_value
+ {
+ get
+ {
+ return this.b;
+ }
+
+ }
+ private int b;
+
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/array/arraylastindexof1.cs b/tests/src/CoreMangLib/cti/system/array/arraylastindexof1.cs
new file mode 100644
index 0000000000..a600ae512f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraylastindexof1.cs
@@ -0,0 +1,469 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Array.LastIndexOf(System.Array,System.Object,System.Int32,System.Int32)
+/// </summary>
+public class ArrayLastIndexOf1
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Test the array of many elements which have the same value ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55);
+ int value = TestLibrary.Generator.GetByte(-55);
+ int[] i1 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ i1[i] = value;
+ }
+ for (int i = length - 1; i >= 0; i--) // travel the array
+ {
+ if (Array.LastIndexOf(i1, value, i, i + 1) != i)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test the empty string ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ string[] s1 = new string[length];
+ for (int i = 0; i < length; i++)
+ {
+ s1[i] = "";
+ }
+ for (int i = length - 1; i >= 0; i--) // travel the array
+ {
+ if (Array.LastIndexOf(s1, "", i, i + 1) != i)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Test the null element of the string array ");
+
+ try
+ {
+ int length;
+ string value = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ int index1, index2;
+ do
+ {
+ length = TestLibrary.Generator.GetInt16(-55);
+ } while (10 > length);
+ do
+ {
+ index1 = this.GetInt32(0, length);
+ index2 = this.GetInt32(0, length);
+ } while (index1 == index2);
+ string[] s1 = new string[length];
+ for (int i = 0; i < length; i++)
+ {
+ if (i != index1 && (i != index2))
+ {
+ s1[i] = value;
+ }
+ else
+ {
+ s1[i] = null;
+ }
+
+ }
+ if (index1 < index2)
+ {
+ if (Array.LastIndexOf(s1, null, length - 1, length) != index2)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (Array.LastIndexOf(s1, null, length - 1, length) != index1)
+ {
+ TestLibrary.TestFramework.LogError("006", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Find out no result ");
+
+ try
+ {
+ string[] s1 = new string[5]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Joan"};
+
+ if (Array.LastIndexOf(s1, "Jaon", 4, 5) != -1)
+ {
+ TestLibrary.TestFramework.LogError("008", "The result is not the value as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Find the second last value because of the startIndex ");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Mary",
+ "Joan"};
+
+ if (Array.LastIndexOf(s1, "Mary", 3, 4) != 1)
+ {
+ TestLibrary.TestFramework.LogError("010", "The result is not the value as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("011", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Find out no value because of the count argument ");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Mary",
+ "Joan"};
+
+ if (Array.LastIndexOf(s1, "Mike", 5, 3) != -1)
+ {
+ TestLibrary.TestFramework.LogError("012", "The result is not the value as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("013", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Find out no value because of different type ");
+
+ try
+ {
+ int[] i1 = new int[5] { 1, 2, 34, 67, 10 };
+ Int16 value = 34;
+ int result = Array.LastIndexOf(i1, (object)value, 4, 5);
+ if (result != -1)
+ {
+ TestLibrary.TestFramework.LogError("014", "The result is not the value as expected: Expected(-1) Actual("+result+")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("015", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The array is a null reference ");
+
+ try
+ {
+ string[] s1 = null;
+ int i1 = Array.LastIndexOf(s1, "", 1, 0);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Set the negative startIndex argument");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Mary",
+ "Joan"};
+ int i1 = Array.LastIndexOf(s1, "", -1, 3);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Set the startIndex greater than the max index of the array");
+
+ try
+ {
+ int[] i1 = new int[6] { 2, 34, 56, 87, 23, 209 };
+ int i2 = Array.LastIndexOf(i1, 56, 6, 3);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: Count argument is less than zero");
+ try
+ {
+ int[] i1 = new int[6] { 2, 34, 56, 87, 23, 209 };
+ int i2 = Array.LastIndexOf(i1, 56, 3, -3);
+ TestLibrary.TestFramework.LogError("107", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: Count argument do not specify a valid section in array");
+ try
+ {
+ int[] i1 = new int[6] { 2, 34, 56, 87, 23, 209 };
+ int i2 = Array.LastIndexOf(i1, 56, 3, 5);
+ TestLibrary.TestFramework.LogError("109", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("110", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: The array is not a one dimension array ");
+ try
+ {
+ int[,] i1 = new int[2, 3] { { 2, 3, 5 }, { 34, 56, 77 } };
+ int i2 = Array.LastIndexOf(i1, 3, 1, 0);
+ TestLibrary.TestFramework.LogError("111", "The RankException was not thrown as expected");
+ retVal = false;
+ }
+ catch (RankException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("112", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArrayLastIndexOf1 test = new ArrayLastIndexOf1();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayLastIndexOf1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public Int32 GetInt32(int min, int max)
+ {
+ return min + TestLibrary.Generator.GetInt32(-55) % (max - min);
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraylastindexof1b.cs b/tests/src/CoreMangLib/cti/system/array/arraylastindexof1b.cs
new file mode 100644
index 0000000000..8cc49efe95
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraylastindexof1b.cs
@@ -0,0 +1,635 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public class ArrayLastIndexOf1
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ArrayLastIndexOf1 ac = new ArrayLastIndexOf1();
+
+ TestLibrary.TestFramework.BeginTestCase("Array.LastInexOf(Array, object, int, int)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+ retVal = NegTest9() && retVal;
+ retVal = NegTest10() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ int element;
+ int index;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Array.LastInexOf(Array, object, int, int) where element is found");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ element = TestLibrary.Generator.GetInt32(-55);
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array.SetValue((object)TestLibrary.Generator.GetInt32(-55), i);
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32(-55) % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ newIndex = Array.LastIndexOf(array, (object)element, array.Length-1, array.Length);
+
+ if (index > newIndex)
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected index: Expected(" + index + ") Actual(" + newIndex + ")");
+ retVal = false;
+ }
+
+ if (element != (int)array.GetValue(newIndex))
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected value: Expected(" + element + ") Actual(" + (int)array.GetValue(newIndex) + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ string element;
+ int index;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Array.LastInexOf(Array, object, int, int) non-primitive type");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(string), length);
+
+ element = TestLibrary.Generator.GetString(-55, false, c_MIN_STRLEN, c_MAX_STRLEN);
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array.SetValue(TestLibrary.Generator.GetString(-55, false, c_MIN_STRLEN, c_MAX_STRLEN), i);
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32(-55) % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ newIndex = Array.LastIndexOf(array, (object)element, array.Length-1, array.Length);
+
+ if (index > newIndex)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected index: Expected(" + index + ") Actual(" + newIndex + ")");
+ retVal = false;
+ }
+
+ if (!element.Equals(array.GetValue(newIndex)))
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected value: Expected(" + element + ") Actual(" + array.GetValue(newIndex) + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ object element;
+ int index;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Array.LastInexOf(Array, object, int, int) non-primitive type (with value == null)");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(string), length);
+
+ element = null;
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array.SetValue(TestLibrary.Generator.GetString(-55, false, c_MIN_STRLEN, c_MAX_STRLEN), i);
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32(-55) % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ newIndex = Array.LastIndexOf(array, (object)element, array.Length-1, array.Length);
+
+ if (index > newIndex)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected index: Expected(" + index + ") Actual(" + newIndex + ")");
+ retVal = false;
+ }
+
+ if (element != array.GetValue(newIndex))
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected value: Expected(" + element + ") Actual(" + array.GetValue(newIndex) + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ MyStruct element;
+ int index;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Array.LastInexOf(Array, object, int, int) non-primitive type (not derived from object)");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(MyStruct), length);
+
+ element = new MyStruct(TestLibrary.Generator.GetSingle(-55));
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array.SetValue(new MyStruct(TestLibrary.Generator.GetSingle(-55)), i);
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32(-55) % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ newIndex = Array.LastIndexOf(array, (object)element, array.Length-1, array.Length);
+
+ if (index > newIndex)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected index: Expected(" + index + ") Actual(" + newIndex + ")");
+ retVal = false;
+ }
+
+ if (element.f != ((MyStruct)array.GetValue(newIndex)).f)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected value: Expected(" + element.f + ") Actual(" + ((MyStruct)array.GetValue(newIndex)).f + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("011", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ int element;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Array.LastInexOf(Array, object, int, int) where element is not found");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ element = TestLibrary.Generator.GetInt32(-55);
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ do
+ {
+ array.SetValue((object)TestLibrary.Generator.GetInt32(-55), i);
+ }
+ while (element == (int)array.GetValue(i));
+ }
+
+ newIndex = Array.LastIndexOf(array, (object)element, array.Length-1, array.Length);
+
+ if (-1 != newIndex)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected index: Actual(" + newIndex + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("013", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ int element;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Array.LastInexOf(Array, object, int, int) array full of null's");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ element = TestLibrary.Generator.GetInt32(-55);
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array.SetValue(null, i);
+ }
+
+ newIndex = Array.LastIndexOf(array, (object)element, array.Length-1, array.Length);
+
+ if (-1 != newIndex)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected index: Actual(" + newIndex + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("015", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Array.LastInexOf(Array, object, int, int) array is null");
+
+ try
+ {
+ Array.LastIndexOf(null, (object)1, 0, 0);
+
+ TestLibrary.TestFramework.LogError("016", "Should have thrown an expection");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("017", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ Array array;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: Array.LastInexOf(Array, object, int, int) array of length 0");
+
+ try
+ {
+ // creat the array
+ array = Array.CreateInstance(typeof(Int32), 0);
+
+ newIndex = Array.LastIndexOf(array, (object)null, array.Length-1, array.Length);
+
+ if (-1 != newIndex)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected index: Actual(" + newIndex + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("019", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: Array.LastInexOf(Array, object, int, int) start index less than lower bound");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ Array.LastIndexOf(array, (object)null, -1, array.Length);
+
+ TestLibrary.TestFramework.LogError("020", "Should have thrown an exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("021", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: Array.LastInexOf(Array, object, int, int) start index greater than upper bound");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ Array.LastIndexOf(array, (object)null, array.Length, array.Length);
+
+ TestLibrary.TestFramework.LogError("022", "Should have thrown an exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("023", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest7: Array.LastInexOf(Array, object, int, int) count less than 0");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ Array.LastIndexOf(array, (object)null, array.Length-1, -1);
+
+ TestLibrary.TestFramework.LogError("024", "Should have thrown an exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("025", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest8()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest8: Array.LastInexOf(Array, object, int, int) (count > startIndex - lb + 1)");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ Array.LastIndexOf(array, (object)null, 0, array.Length);
+
+ TestLibrary.TestFramework.LogError("026", "Should have thrown an exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("027", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest9()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest9: Array.LastInexOf(Array, object, int, int) multi dim array");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), new int[2] {length, length});
+
+ Array.LastIndexOf(array, (object)null, array.Length-1, array.Length);
+
+ TestLibrary.TestFramework.LogError("028", "Should have thrown an exception");
+ retVal = false;
+ }
+ catch (RankException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("029", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public struct MyStruct
+ {
+ public float f;
+
+ public MyStruct(float ff) { f = ff; }
+ }
+
+ public bool NegTest10()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ MyStruct element;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest10: Array.LastInexOf(Array, object, int, int) non-primitive type (not derived from object) not found");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(MyStruct), length);
+
+ element = new MyStruct(TestLibrary.Generator.GetSingle(-55));
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ do
+ {
+ array.SetValue(new MyStruct(TestLibrary.Generator.GetSingle(-55)), i);
+ }
+ while(element.Equals((MyStruct)array.GetValue(i)));
+ }
+
+ newIndex = Array.LastIndexOf(array, (object)element, array.Length-1, array.Length);
+
+ if (-1 != newIndex)
+ {
+ TestLibrary.TestFramework.LogError("030", "Unexpected index: Expected(-1) Actual(" + newIndex + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("031", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraylastindexof2.cs b/tests/src/CoreMangLib/cti/system/array/arraylastindexof2.cs
new file mode 100644
index 0000000000..77ab835b7f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraylastindexof2.cs
@@ -0,0 +1,239 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Array.LastIndexOf<>(T[],T)
+/// </summary>
+public class ArrayIndexOf2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Find out the last value which is equal to 3");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55);
+ int[] i1 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ if (i % 3 == 0)
+ {
+ i1[i] = 3;
+ }
+ else
+ {
+ i1[i] = i;
+ }
+ }
+ for (int a = length - 1; a > length - 4; a--)
+ {
+ if (a % 3 == 0)
+ {
+ int i2 = Array.LastIndexOf<int>(i1, 3);
+ if (i2 != a)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Find the last string value in an array ");
+
+ try
+ {
+ string[] s1 = new string[5]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Jack"};
+ if (Array.LastIndexOf<string>(s1, "Jack") != 4)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Find out the null element in an array of string ");
+
+ try
+ {
+ string[] s1 = new string[7]{"Jack",
+ "Mary",
+ "Mike",
+ null,
+ "Peter",
+ null,
+ "Jack"};
+ if (Array.LastIndexOf<string>(s1, null) != 5)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Find out no expected value in an array of string ");
+
+ try
+ {
+ string[] s1 = new string[5]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Jack"};
+ if (Array.LastIndexOf<string>(s1, "Tom") != -1)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Find out the last empty string ");
+
+ try
+ {
+ string[] s1 = new string[5]{"",
+ "",
+ "",
+ "",
+ "Tom"};
+ if (Array.LastIndexOf<string>(s1, "") != 3)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The array is a null reference");
+
+ try
+ {
+ string[] s1 = null;
+ int i1 = Array.LastIndexOf<string>(s1, "");
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException is not thrown as expected ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArrayIndexOf2 test = new ArrayIndexOf2();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayIndexOf2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraylastindexof2b.cs b/tests/src/CoreMangLib/cti/system/array/arraylastindexof2b.cs
new file mode 100644
index 0000000000..7a13fb513f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraylastindexof2b.cs
@@ -0,0 +1,149 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public class ArrayLastIndexOf2
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ArrayLastIndexOf2 ac = new ArrayLastIndexOf2();
+
+ TestLibrary.TestFramework.BeginTestCase("Array.LastInexOf(T[] array, T value)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1() { return PosIndexOf<Int64>(1, TestLibrary.Generator.GetInt64(-55), TestLibrary.Generator.GetInt64(-55)); }
+ public bool PosTest2() { return PosIndexOf<Int32>(2, TestLibrary.Generator.GetInt32(-55), TestLibrary.Generator.GetInt32(-55)); }
+ public bool PosTest3() { return PosIndexOf<Int16>(3, TestLibrary.Generator.GetInt16(-55), TestLibrary.Generator.GetInt16(-55)); }
+ public bool PosTest4() { return PosIndexOf<Byte>(4, TestLibrary.Generator.GetByte(-55), TestLibrary.Generator.GetByte(-55)); }
+ public bool PosTest5() { return PosIndexOf<double>(5, TestLibrary.Generator.GetDouble(-55), TestLibrary.Generator.GetDouble(-55)); }
+ public bool PosTest6() { return PosIndexOf<float>(6, TestLibrary.Generator.GetSingle(-55), TestLibrary.Generator.GetSingle(-55)); }
+ public bool PosTest7() { return PosIndexOf<char>(7, TestLibrary.Generator.GetCharLetter(-55), TestLibrary.Generator.GetCharLetter(-55)); }
+ public bool PosTest8() { return PosIndexOf<char>(8, TestLibrary.Generator.GetCharNumber(-55), TestLibrary.Generator.GetCharNumber(-55)); }
+ public bool PosTest9() { return PosIndexOf<char>(9, TestLibrary.Generator.GetChar(-55), TestLibrary.Generator.GetChar(-55)); }
+ public bool PosTest10() { return PosIndexOf<string>(10, TestLibrary.Generator.GetString(-55, false, c_MIN_STRLEN, c_MAX_STRLEN), TestLibrary.Generator.GetString(-55, false, c_MIN_STRLEN, c_MAX_STRLEN)); }
+
+ public bool NegTest1() { return NegIndexOf<Int32>(1, 1); }
+
+ public bool PosIndexOf<T>(int id, T element, T otherElem)
+ {
+ bool retVal = true;
+ T[] array;
+ int length;
+ int index;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Array.LastInexOf(T[] array, T value) (T=="+typeof(T)+") where value is found");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = new T[length];
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array[i] = otherElem;
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32(-55) % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ newIndex = Array.LastIndexOf<T>(array, element);
+
+ if (index > newIndex)
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected index: Expected(" + index + ") Actual(" + newIndex + ")");
+ retVal = false;
+ }
+
+ if (!element.Equals(array[newIndex]))
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected value: Expected(" + element + ") Actual(" + array[newIndex] + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegIndexOf<T>(int id, T defaultValue)
+ {
+ bool retVal = true;
+ T[] array = null;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Array.LastInexOf(T[] array, T value) (T == "+typeof(T)+" where array is null");
+
+ try
+ {
+ Array.LastIndexOf<T>(array, defaultValue);
+
+ TestLibrary.TestFramework.LogError("003", "Exepction should have been thrown");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraylastindexof3.cs b/tests/src/CoreMangLib/cti/system/array/arraylastindexof3.cs
new file mode 100644
index 0000000000..af16f29846
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraylastindexof3.cs
@@ -0,0 +1,365 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// system.Array.LastIndexOf<>(T[],T,int32,int32)
+/// </summary>
+public class ArrayIndexOf3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Test the array of elements which have the same value ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55);
+ int value = TestLibrary.Generator.GetByte(-55);
+ int[] i1 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ i1[i] = value;
+ }
+ for (int i = length - 1; i >= 0; i--) // travel the array
+ {
+ if (Array.LastIndexOf<int>(i1, value, i, i + 1) != i)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test the empty string ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ string[] s1 = new string[length];
+ for (int i = 0; i < length; i++)
+ {
+ s1[i] = "";
+ }
+ for (int i = length - 1; i >= 0; i--) // travel the array
+ {
+ if (Array.LastIndexOf<string>(s1, "", i, i + 1) != i)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Generic convert byte to int32");
+
+ try
+ {
+ int[] i1 = new int[6] { 2356, 255, 988874, 90875, 255, 123334564 };
+ byte b1 = 255;
+ if (Array.LastIndexOf<int>(i1, b1, 5, 6) != 4)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Test the array of char");
+
+ try
+ {
+ char[] i1 = new char[6] { 't', 'r', 'c', '4', 'r', 'c' };
+ char b1 = 'c';
+ if (Array.LastIndexOf<char>(i1, b1, 4, 5) != 2)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Test the null element of the string array ");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ null,
+ "Mary"};
+ if (Array.LastIndexOf<string>(s1, null, 5, 6) != 4)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Find out no result ");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Tim",
+ "Mary"};
+ if (Array.LastIndexOf<string>(s1, "mary", 5, 6) != -1)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The array is a null reference ");
+
+ try
+ {
+ string[] s1 = null;
+ int i1 = Array.LastIndexOf<string>(s1, "", 1, 0);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Set the negative startIndex argument");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Mary",
+ "Joan"};
+ int i1 = Array.LastIndexOf<string>(s1, "", -1, 3);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Set the startIndex greater than the max index of the array");
+
+ try
+ {
+ int[] i1 = new int[6] { 2, 34, 56, 87, 23, 209 };
+ int i2 = Array.LastIndexOf<int>(i1, 56, 6, 3);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: Count argument is less than zero");
+ try
+ {
+ int[] i1 = new int[6] { 2, 34, 56, 87, 23, 209 };
+ int i2 = Array.LastIndexOf<int>(i1, 56, 3, -3);
+ TestLibrary.TestFramework.LogError("107", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: Count argument do not specify a valid section in array");
+ try
+ {
+ int[] i1 = new int[6] { 2, 34, 56, 87, 23, 209 };
+ int i2 = Array.LastIndexOf<int>(i1, 56, 3, 5);
+ TestLibrary.TestFramework.LogError("109", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("110", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArrayIndexOf3 test = new ArrayIndexOf3();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayIndexOf3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraylastindexof3b.cs b/tests/src/CoreMangLib/cti/system/array/arraylastindexof3b.cs
new file mode 100644
index 0000000000..1e3dda9dca
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraylastindexof3b.cs
@@ -0,0 +1,149 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public class ArrayLastIndexOf3
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ArrayLastIndexOf3 ac = new ArrayLastIndexOf3();
+
+ TestLibrary.TestFramework.BeginTestCase("Array.LastInexOf(T[] array, T value)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1() { return PosIndexOf<Int64>(1, TestLibrary.Generator.GetInt64(-55), TestLibrary.Generator.GetInt64(-55)); }
+ public bool PosTest2() { return PosIndexOf<Int32>(2, TestLibrary.Generator.GetInt32(-55), TestLibrary.Generator.GetInt32(-55)); }
+ public bool PosTest3() { return PosIndexOf<Int16>(3, TestLibrary.Generator.GetInt16(-55), TestLibrary.Generator.GetInt16(-55)); }
+ public bool PosTest4() { return PosIndexOf<Byte>(4, TestLibrary.Generator.GetByte(-55), TestLibrary.Generator.GetByte(-55)); }
+ public bool PosTest5() { return PosIndexOf<double>(5, TestLibrary.Generator.GetDouble(-55), TestLibrary.Generator.GetDouble(-55)); }
+ public bool PosTest6() { return PosIndexOf<float>(6, TestLibrary.Generator.GetSingle(-55), TestLibrary.Generator.GetSingle(-55)); }
+ public bool PosTest7() { return PosIndexOf<char>(7, TestLibrary.Generator.GetCharLetter(-55), TestLibrary.Generator.GetCharLetter(-55)); }
+ public bool PosTest8() { return PosIndexOf<char>(8, TestLibrary.Generator.GetCharNumber(-55), TestLibrary.Generator.GetCharNumber(-55)); }
+ public bool PosTest9() { return PosIndexOf<char>(9, TestLibrary.Generator.GetChar(-55), TestLibrary.Generator.GetChar(-55)); }
+ public bool PosTest10() { return PosIndexOf<string>(10, TestLibrary.Generator.GetString(-55, false, c_MIN_STRLEN, c_MAX_STRLEN), TestLibrary.Generator.GetString(-55, false, c_MIN_STRLEN, c_MAX_STRLEN)); }
+
+ public bool NegTest1() { return NegIndexOf<Int32>(1, 1); }
+
+ public bool PosIndexOf<T>(int id, T element, T otherElem)
+ {
+ bool retVal = true;
+ T[] array;
+ int length;
+ int index;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Array.LastInexOf(T[] array, T value, int startIndex) (T=="+typeof(T)+") where value is found");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = new T[length];
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array[i] = otherElem;
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32(-55) % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ newIndex = Array.LastIndexOf<T>(array, element, array.Length-1);
+
+ if (index > newIndex)
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected index: Expected(" + index + ") Actual(" + newIndex + ")");
+ retVal = false;
+ }
+
+ if (!element.Equals(array[newIndex]))
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected value: Expected(" + element + ") Actual(" + array[newIndex] + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegIndexOf<T>(int id, T defaultValue)
+ {
+ bool retVal = true;
+ T[] array = null;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Array.LastInexOf(T[] array, T value, int startIndex) (T == "+typeof(T)+" where array is null");
+
+ try
+ {
+ Array.LastIndexOf<T>(array, defaultValue, 0);
+
+ TestLibrary.TestFramework.LogError("003", "Exepction should have been thrown");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraylastindexof4.cs b/tests/src/CoreMangLib/cti/system/array/arraylastindexof4.cs
new file mode 100644
index 0000000000..a5c2f03c77
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraylastindexof4.cs
@@ -0,0 +1,234 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public class ArrayLastIndexOf4
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ArrayLastIndexOf4 ac = new ArrayLastIndexOf4();
+
+ TestLibrary.TestFramework.BeginTestCase("Array.LastInexOf(T[] array, T value)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+ retVal = NegTest9() && retVal;
+ retVal = NegTest10() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1() { return PosIndexOf<Int64>(1, TestLibrary.Generator.GetInt64(-55), TestLibrary.Generator.GetInt64(-55)); }
+ public bool PosTest2() { return PosIndexOf<Int32>(2, TestLibrary.Generator.GetInt32(-55), TestLibrary.Generator.GetInt32(-55)); }
+ public bool PosTest3() { return PosIndexOf<Int16>(3, TestLibrary.Generator.GetInt16(-55), TestLibrary.Generator.GetInt16(-55)); }
+ public bool PosTest4() { return PosIndexOf<Byte>(4, TestLibrary.Generator.GetByte(-55), TestLibrary.Generator.GetByte(-55)); }
+ public bool PosTest5() { return PosIndexOf<double>(5, TestLibrary.Generator.GetDouble(-55), TestLibrary.Generator.GetDouble(-55)); }
+ public bool PosTest6() { return PosIndexOf<float>(6, TestLibrary.Generator.GetSingle(-55), TestLibrary.Generator.GetSingle(-55)); }
+ public bool PosTest7() { return PosIndexOf<char>(7, TestLibrary.Generator.GetCharLetter(-55), TestLibrary.Generator.GetCharLetter(-55)); }
+ public bool PosTest8() { return PosIndexOf<char>(8, TestLibrary.Generator.GetCharNumber(-55), TestLibrary.Generator.GetCharNumber(-55)); }
+ public bool PosTest9() { return PosIndexOf<char>(9, TestLibrary.Generator.GetChar(-55), TestLibrary.Generator.GetChar(-55)); }
+ public bool PosTest10() { return PosIndexOf<string>(10, TestLibrary.Generator.GetString(-55, false, c_MIN_STRLEN, c_MAX_STRLEN), TestLibrary.Generator.GetString(-55, false, c_MIN_STRLEN, c_MAX_STRLEN)); }
+
+ public bool PosTest11() { return PosIndexOf2<Int32>(11, 1, 0, 0, 0); }
+
+ public bool NegTest1() { return NegIndexOf<Int32>(1, 1); }
+ // id, defaultValue, length, startIndex, count
+ public bool NegTest2() { return NegIndexOf2<Int32>( 2, 1, 0, 1, 0); }
+ public bool NegTest3() { return NegIndexOf2<Int32>( 3, 1, 0, -2, 0); }
+ public bool NegTest4() { return NegIndexOf2<Int32>( 4, 1, 0, -1, 1); }
+ public bool NegTest5() { return NegIndexOf2<Int32>( 5, 1, 0, 0, 1); }
+ public bool NegTest6() { return NegIndexOf2<Int32>( 6, 1, 1, -1, 1); }
+ public bool NegTest7() { return NegIndexOf2<Int32>( 7, 1, 1, 2, 1); }
+ public bool NegTest8() { return NegIndexOf2<Int32>( 8, 1, 1, 0, -1); }
+ public bool NegTest9() { return NegIndexOf2<Int32>( 9, 1, 1, 0, -1); }
+ public bool NegTest10() { return NegIndexOf2<Int32>(10, 1, 1, 1, 2); }
+
+ public bool PosIndexOf<T>(int id, T element, T otherElem)
+ {
+ bool retVal = true;
+ T[] array;
+ int length;
+ int index;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Array.LastInexOf(T[] array, T value, int startIndex, int count) (T=="+typeof(T)+") where value is found");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = new T[length];
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array[i] = otherElem;
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32(-55) % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ newIndex = Array.LastIndexOf<T>(array, element, array.Length-1, array.Length);
+
+ if (index > newIndex)
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected index: Expected(" + index + ") Actual(" + newIndex + ")");
+ retVal = false;
+ }
+
+ if (!element.Equals(array[newIndex]))
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected value: Expected(" + element + ") Actual(" + array[newIndex] + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosIndexOf2<T>(int id, T defaultValue, int length, int startIndex, int count)
+ {
+ bool retVal = true;
+ T[] array = null;
+ int newIndex;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Array.LastInexOf(T["+length+"] array, T value, "+startIndex+", "+count+") (T == "+typeof(T)+" where array is null");
+
+ try
+ {
+ array = new T[ length ];
+
+ newIndex = Array.LastIndexOf<T>(array, defaultValue, startIndex, count);
+
+ if (-1 != newIndex)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected value: Expected(-1) Actual("+newIndex+")");
+ retVal = false;
+ }
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegIndexOf<T>(int id, T defaultValue)
+ {
+ bool retVal = true;
+ T[] array = null;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Array.LastInexOf(T[] array, T value, int startIndex, int count) (T == "+typeof(T)+" where array is null");
+
+ try
+ {
+ Array.LastIndexOf<T>(array, defaultValue, 0, 0);
+
+ TestLibrary.TestFramework.LogError("005", "Exepction should have been thrown");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegIndexOf2<T>(int id, T defaultValue, int length, int startIndex, int count)
+ {
+ bool retVal = true;
+ T[] array = null;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Array.LastInexOf(T["+length+"] array, T value, "+startIndex+", "+count+") (T == "+typeof(T)+" where array is null");
+
+ try
+ {
+ array = new T[ length ];
+
+ Array.LastIndexOf<T>(array, defaultValue, startIndex, count);
+
+ TestLibrary.TestFramework.LogError("007", "Exepction should have been thrown");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/array/arraylength.cs b/tests/src/CoreMangLib/cti/system/array/arraylength.cs
new file mode 100644
index 0000000000..3f3a00a0e9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraylength.cs
@@ -0,0 +1,147 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArrayLength
+{
+ const int row_length = 100;
+ const int column_length = 10;
+ const int high_length = 10;
+
+ public static int Main(string[] args)
+ {
+ ArrayLength aLength = new ArrayLength();
+ TestLibrary.TestFramework.BeginScenario("Testing Array.Length property...");
+
+ if (aLength.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify Length property of one-dimensional array...");
+
+ try
+ {
+ Array myArray = Array.CreateInstance(typeof(Int32), row_length);
+ if (myArray.Length!=row_length)
+ {
+ TestLibrary.TestFramework.LogError("001", "The Length property is not correct!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpceted exception ouucrs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify Length property of two-dimensional array...");
+
+ try
+ {
+ Array myArray = Array.CreateInstance(typeof(object),row_length,column_length);
+ if (myArray.Length!=row_length*column_length)
+ {
+ TestLibrary.TestFramework.LogError("003", "The Length property is not correct!");
+ retVal = true;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify Length property of multi-dimensional array...");
+
+ try
+ {
+ int[] dimenArray = { row_length,column_length,high_length};
+ Array myArray = Array.CreateInstance(typeof(object),dimenArray);
+
+ if (myArray.Length!=row_length*column_length*high_length)
+ {
+ TestLibrary.TestFramework.LogError("005", "The Length property is not correct...");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool RetVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify Length property of array with null reference...");
+
+ try
+ {
+ Array myArray = null;
+ if (myArray.Length != 0)
+ {
+ TestLibrary.TestFramework.LogError("007", "No exception occurs!");
+ RetVal = true;
+ }
+ }
+ catch (NullReferenceException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ RetVal = false;
+ }
+
+ return RetVal;
+ }
+
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayrank.cs b/tests/src/CoreMangLib/cti/system/array/arrayrank.cs
new file mode 100644
index 0000000000..86002e41f4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayrank.cs
@@ -0,0 +1,208 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArrayRank
+{
+ const int row_length = 100;
+ const int column_length = 10;
+ const int high_length = 10;
+
+ public static int Main(string[] args)
+ {
+ ArrayRank aRank = new ArrayRank();
+ TestLibrary.TestFramework.BeginScenario("Testing Array.Rank property...");
+
+ if (aRank.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify Rank property of one-dimensional array...");
+
+ try
+ {
+ Array myArray = Array.CreateInstance(typeof(Int32), row_length);
+ if (myArray.Rank != 1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The Rank property is not correct!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpceted exception ouucrs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify Rank property of two-dimensional array...");
+
+ try
+ {
+ Array myArray = Array.CreateInstance(typeof(object), row_length, column_length);
+ if (myArray.Rank != 2)
+ {
+ TestLibrary.TestFramework.LogError("003", "The Rank property is not correct!");
+ retVal = true;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify Rank property of multi-dimensional array...");
+
+ try
+ {
+ int[] dimenArray = { row_length, column_length, high_length };
+ Array myArray = Array.CreateInstance(typeof(object), dimenArray);
+
+ if (myArray.Rank != 3)
+ {
+ TestLibrary.TestFramework.LogError("005", "The Rank property is not correct...");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// new added scenario
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("check the rank of an empty array...");
+
+ try
+ {
+ Array myArray = new int[0];
+
+ if (myArray.Rank != 1)
+ {
+ TestLibrary.TestFramework.LogError("009", "The Rank property is not correct...");
+ retVal = false;
+ }
+
+ myArray = new object[0,0];
+ if (myArray.Rank != 2)
+ {
+ TestLibrary.TestFramework.LogError("010", "The Rank property is not correct...");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("011", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool RetVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify Rank property of array with null reference...");
+
+ try
+ {
+ Array myArray = null;
+ int arrayRank = myArray.Rank;
+
+ TestLibrary.TestFramework.LogError("007", "No exception occurs!");
+ RetVal = true;
+ }
+ catch (NullReferenceException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ RetVal = false;
+ }
+
+ return RetVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool RetVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify Rank property of array with null reference...");
+
+ try
+ {
+ Array myArray = null;
+ int rank = myArray.Rank;
+
+ TestLibrary.TestFramework.LogError("007", "No exception occurs!");
+ RetVal = true;
+ }
+ catch (NullReferenceException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ RetVal = false;
+ }
+
+ return RetVal;
+ }
+
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayreserse1.cs b/tests/src/CoreMangLib/cti/system/array/arrayreserse1.cs
new file mode 100644
index 0000000000..4927e93467
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayreserse1.cs
@@ -0,0 +1,266 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Array.Reverse(System.Array)
+/// </summary>
+public class ArrayReverse1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Reverse an int array ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55);
+ int[] i1 = new int[length];
+ int[] i2 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ int value = TestLibrary.Generator.GetByte(-55);
+ i1[i] = value;
+ i2[length - 1 - i] = value;
+ }
+ Array.Reverse(i1);
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Reverse an string array ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ string[] s1 = new string[length];
+ string[] s2 = new string[length];
+ for (int i = 0; i < length; i++)
+ {
+ string value = TestLibrary.Generator.GetString(-55, false, 0, 255);
+ s1[i] = value;
+ s2[length - 1 - i] = value;
+ }
+ Array.Reverse(s1);
+ for (int i = 0; i < length; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Reverse an array which only has one element");
+
+ try
+ {
+ Array myarray1 = Array.CreateInstance(typeof(int), 1);
+ int value = TestLibrary.Generator.GetInt32(-55);
+ myarray1.SetValue(value, 0);
+ Array.Reverse(myarray1);
+ if ((int)myarray1.GetValue(0) != value)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Reverse an array which has no element");
+
+ try
+ {
+ Array myarray1 = Array.CreateInstance(typeof(int), 0);
+ Array.Reverse(myarray1);
+ if (myarray1.Length != 0)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Reverse a string array twice which included null element");
+
+ try
+ {
+ string[] s1 = new string[8]{"Jack",
+ null,
+ "Mary",
+ null,
+ "Mike",
+ "Peter",
+ "Mary",
+ "Joan"};
+ string[] s2 = new string[8];
+ s1.CopyTo(s2, 0);
+ Array.Reverse(s1);
+ Array.Reverse(s1);
+ for (int i = 0; i < 8; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The array is a null reference ");
+
+ try
+ {
+ Array myarray = null;
+ Array.Reverse(myarray);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The array is not one dimension ");
+
+ try
+ {
+ int[,] s1 = new int[2, 2] { { 1, 2 }, { 3, 4 } };
+ Array.Reverse(s1);
+ TestLibrary.TestFramework.LogError("103", "The RankException is not throw as expected ");
+ retVal = false;
+ }
+ catch (RankException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArrayReverse1 test = new ArrayReverse1();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayReverse1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayreserse2.cs b/tests/src/CoreMangLib/cti/system/array/arrayreserse2.cs
new file mode 100644
index 0000000000..2aa2e8c516
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayreserse2.cs
@@ -0,0 +1,501 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Array.Reverse(System.Array,int32,int32)
+/// </summary>
+public class ArrayReverse2
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Random reverse an int array 1: argument count is even");
+
+ try
+ {
+ int length = GetInt(2, UInt16.MaxValue);
+ int[] i1 = new int[length]; //the array length of i1
+ int[] i2 = new int[length]; //the array length of i2
+ int startIdx = GetInt(0, length-1); //The starting index of the section to reverse.
+ int endIdx = GetInt(startIdx, length);//The end index of the section to reverse.
+ int count = endIdx - startIdx + 1;
+ while (count == 0 || (count % 2 != 0)) // Make the argument count to be even
+ {
+ endIdx = GetInt(startIdx, length);
+ count = endIdx - startIdx + 1;
+ }
+ for (int i = 0; i < length; i++)
+ {
+ int value = TestLibrary.Generator.GetByte();
+ i1[i] = value;
+ i2[i] = value;
+ }
+ int times = count / 2; // the times need to exchange value
+ int endIdx_temp = endIdx;
+ int startIdx_temp = startIdx;
+ for (int i = 0; i < times; i++) //reverse the array manually
+ {
+ int temp = i2[startIdx_temp];
+ i2[startIdx_temp] = i2[endIdx_temp];
+ i2[endIdx_temp] = temp;
+ startIdx_temp++;
+ endIdx_temp--;
+ }
+ Array.Reverse(i1, startIdx, count);
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,the index not equal is " + i.ToString());
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Random reverse a char array 2: argument count is odd");
+
+ try
+ {
+ int length = GetInt(1, UInt16.MaxValue);
+ char[] i1 = new char[length]; //the array length of i1
+ char[] i2 = new char[length]; //the array length of i2
+ int startIdx = GetInt(0, length); //The starting index of the section to reverse.
+ int endIdx = GetInt(startIdx, length);//The end index of the section to reverse.
+ int count = endIdx - startIdx + 1;
+ while (count == 0 || (count % 2 == 0)) // Make the argument count to be odd but not zero
+ {
+ endIdx = GetInt(startIdx, length);
+ count = endIdx - startIdx + 1;
+ }
+ for (int i = 0; i < length; i++)
+ {
+ char value = TestLibrary.Generator.GetChar();
+ i1[i] = value;
+ i2[i] = value;
+ }
+ int times = (count - 1) / 2; // the times need to exchange value
+ int endIdx_temp = endIdx;
+ int startIdx_temp = startIdx;
+ for (int i = 0; i < times; i++) //reverse the array manually
+ {
+ char temp = i2[startIdx_temp];
+ i2[startIdx_temp] = i2[endIdx_temp];
+ i2[endIdx_temp] = temp;
+ startIdx_temp++;
+ endIdx_temp--;
+ }
+ Array.Reverse(i1, startIdx, count);
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,the index not equal is " + i.ToString());
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Random reverse a string array 3: argument count is zero");
+
+ try
+ {
+ int length = GetInt(1, Byte.MaxValue);
+ string[] i1 = new string[length]; //the array length of i1
+ string[] i2 = new string[length]; //the array length of i2
+ int startIdx = GetInt(0, length); //The starting index of the section to reverse.
+ int count = 0;
+ for (int i = 0; i < length; i++)
+ {
+ string value = TestLibrary.Generator.GetString(false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ i1[i] = value;
+ i2[i] = value;
+ }
+ Array.Reverse(i1, startIdx, count);
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected,the index not equal is " + i.ToString());
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Reserve the last element of a string array ");
+
+ try
+ {
+ int length = GetInt(1, Byte.MaxValue);
+ string[] i1 = new string[length]; //the array length of i1
+ string[] i2 = new string[length]; //the array length of i2
+ int startIdx = length - 1; //The starting index of the section to reverse.
+ int count = 1;
+ for (int i = 0; i < length; i++)
+ {
+ string value = TestLibrary.Generator.GetString(false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ i1[i] = value;
+ i2[i] = value;
+ }
+ Array.Reverse(i1, startIdx, count);
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected,the index not equal is " + i.ToString());
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Reserve the customized type array ");
+
+ try
+ {
+ int length = GetInt(1, Byte.MaxValue);
+ A[] i1 = new A[length]; //the array length of i1
+ A[] i2 = new A[length]; //the array length of i2
+ for (int i = 0; i < length; i++)
+ {
+ A value = new A(TestLibrary.Generator.GetInt32());
+ i1[i] = value;
+ i2[length - 1 - i] = value;
+ }
+ Array.Reverse(i1, 0, length);
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i].a != i2[i].a)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected,the index not equal is " + i.ToString());
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Reserve array including null elements ");
+
+ try
+ {
+ int length = GetInt(1, Byte.MaxValue);
+ A[] i1 = new A[length]; //the array length of i1
+ A[] i2 = new A[length]; //the array length of i2
+ for (int i = 0; i < length; i++)
+ {
+ int pro = TestLibrary.Generator.GetInt16();
+ if (pro % 3 == 0)
+ {
+ A value = null;
+ i1[i] = value;
+ i2[length - 1 - i] = value;
+ }
+ else
+ {
+ A value = new A(TestLibrary.Generator.GetInt32());
+ i1[i] = value;
+ i2[length - 1 - i] = value;
+ }
+ }
+ Array.Reverse(i1, 0, length);
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("011", "The result is not the value as expected,the index not equal is " + i.ToString());
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The array is null reference");
+
+ try
+ {
+ string[] s1 = null;
+ Array.Reverse(s1, 0, 0);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The array is not a one dimension array ");
+ try
+ {
+ int[,] i1 = new int[2, 3] { { 2, 3, 5 }, { 34, 56, 77 } };
+ Array.Reverse(i1, 0, 1);
+ TestLibrary.TestFramework.LogError("103", "The RankException was not thrown as expected");
+ retVal = false;
+ }
+ catch (RankException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Set the negative startIndex argument");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Mary",
+ "Joan"};
+ Array.Reverse(s1, -1, 3);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ // This Scenario failed !
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: Set the startIndex greater than the max index of the array");
+
+ try
+ {
+ int[] i1 = new int[6] { 2, 34, 56, 87, 23, 209 };
+ Array.Reverse(i1, 7, 0);
+ TestLibrary.TestFramework.LogError("107", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: index and length do not specify a valid range in array");
+
+ try
+ {
+ int[] i1 = new int[6] { 2, 34, 56, 87, 23, 209 };
+ Array.Reverse(i1, 3, 4);
+ TestLibrary.TestFramework.LogError("107", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArrayReverse2 test = new ArrayReverse2();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayReverse2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Help method for geting test data
+
+ private Int32 GetInt(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32() % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ #endregion
+}
+
+class A
+{
+ public A(int a)
+ {
+ this.a_value = a;
+ }
+ private int a_value;
+ public int a
+ {
+ get
+ {
+ return this.a_value;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayreverse1.cs b/tests/src/CoreMangLib/cti/system/array/arrayreverse1.cs
new file mode 100644
index 0000000000..068499a067
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayreverse1.cs
@@ -0,0 +1,125 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArrayReverse1
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ArrayReverse1 ac = new ArrayReverse1();
+
+ TestLibrary.TestFramework.BeginTestCase("Array.Reverse(Array)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Array afterArray;
+ Array beforeArray;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Array.Reverse(Array)");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ beforeArray = Array.CreateInstance(typeof(Int32), length);
+ afterArray = Array.CreateInstance(typeof(Int32), length);
+
+ // fill the array
+ for (int i=0; i<beforeArray.Length; i++)
+ {
+ beforeArray.SetValue((object)TestLibrary.Generator.GetInt32(-55), i);
+ }
+
+ // copy the array
+ Array.Copy(beforeArray, afterArray, length);
+
+ Array.Reverse(afterArray);
+
+ if (beforeArray.Length != afterArray.Length)
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected length: Expected(" + beforeArray.Length + ") Actual(" + afterArray.Length + ")");
+ retVal = false;
+ }
+
+ for (int i=0; i<beforeArray.Length; i++)
+ {
+ if ((int)beforeArray.GetValue(length-i-1) != (int)afterArray.GetValue(i))
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected value: Expected(" + beforeArray.GetValue(length-i-1) + ") Actual(" + afterArray.GetValue(i) + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Array.Reverse(Array) where array is null");
+
+ try
+ {
+ Array.Reverse(null);
+
+ TestLibrary.TestFramework.LogError("003", "Exception expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arrayreverse2.cs b/tests/src/CoreMangLib/cti/system/array/arrayreverse2.cs
new file mode 100644
index 0000000000..d2faa423e2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arrayreverse2.cs
@@ -0,0 +1,464 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArrayReverse2
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ArrayReverse2 ac = new ArrayReverse2();
+
+ TestLibrary.TestFramework.BeginTestCase("Array.Reverse(Array, int, int)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Array afterArray;
+ Array beforeArray;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Array.Reverse(Array, int, int)");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ beforeArray = Array.CreateInstance(typeof(Int32), length);
+ afterArray = Array.CreateInstance(typeof(Int32), length);
+
+ // fill the array
+ for (int i=0; i<beforeArray.Length; i++)
+ {
+ beforeArray.SetValue((object)TestLibrary.Generator.GetInt32(-55), i);
+ }
+
+ // copy the array
+ Array.Copy(beforeArray, afterArray, length);
+
+ Array.Reverse(afterArray, 0, length);
+
+ if (beforeArray.Length != afterArray.Length)
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected length: Expected(" + beforeArray.Length + ") Actual(" + afterArray.Length + ")");
+ retVal = false;
+ }
+
+ for (int i=0; i<beforeArray.Length; i++)
+ {
+ if ((int)beforeArray.GetValue(length-i-1) != (int)afterArray.GetValue(i))
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected value: Expected(" + beforeArray.GetValue(length-i-1) + ") Actual(" + afterArray.GetValue(i) + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Array afterArray;
+ Array beforeArray;
+ int length;
+ int startIndex;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Array.Reverse(Array, int, int) only reverse half of the array");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ beforeArray = Array.CreateInstance(typeof(Int32), length);
+ afterArray = Array.CreateInstance(typeof(Int32), length);
+
+ startIndex = length/2;
+
+ // fill the array
+ for (int i=0; i<beforeArray.Length; i++)
+ {
+ beforeArray.SetValue((object)TestLibrary.Generator.GetInt32(-55), i);
+ }
+
+ // copy the array
+ Array.Copy(beforeArray, afterArray, length);
+
+ Array.Reverse(afterArray, startIndex, length-startIndex);
+
+ if (beforeArray.Length != afterArray.Length)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected length: Expected(" + beforeArray.Length + ") Actual(" + afterArray.Length + ")");
+ retVal = false;
+ }
+
+ for (int i=0; i<beforeArray.Length; i++)
+ {
+ int beforeIndex;
+
+ if (i < startIndex)
+ {
+ beforeIndex = i;
+ }
+ else
+ {
+ beforeIndex = (length-(i-startIndex)-1);
+ }
+
+ if ((int)beforeArray.GetValue(beforeIndex) != (int)afterArray.GetValue(i))
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected value: Expected(" + beforeArray.GetValue(beforeIndex) + ") Actual(" + afterArray.GetValue(i) + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ Array afterArray;
+ Array beforeArray;
+ int length;
+ int endIndex;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Array.Reverse(Array, int, int) only reverse half of the array (begining)");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ beforeArray = Array.CreateInstance(typeof(Int32), length);
+ afterArray = Array.CreateInstance(typeof(Int32), length);
+
+ endIndex = length/2;
+
+ // fill the array
+ for (int i=0; i<beforeArray.Length; i++)
+ {
+ beforeArray.SetValue((object)TestLibrary.Generator.GetInt32(-55), i);
+ }
+
+ // copy the array
+ Array.Copy(beforeArray, afterArray, length);
+
+ Array.Reverse(afterArray, 0, endIndex);
+
+ if (beforeArray.Length != afterArray.Length)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected length: Expected(" + beforeArray.Length + ") Actual(" + afterArray.Length + ")");
+ retVal = false;
+ }
+
+ for (int i=0; i<beforeArray.Length; i++)
+ {
+ int beforeIndex;
+
+ if (i >= endIndex)
+ {
+ beforeIndex = i;
+ }
+ else
+ {
+ beforeIndex = endIndex-i-1;
+ }
+
+ if ((int)beforeArray.GetValue(beforeIndex) != (int)afterArray.GetValue(i))
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected value: Expected(" + beforeArray.GetValue(beforeIndex) + ") Actual(" + afterArray.GetValue(i) + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ Array afterArray;
+ Array beforeArray;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Array.Reverse(Array, int, int) array of strings");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ beforeArray = Array.CreateInstance(typeof(string), length);
+ afterArray = Array.CreateInstance(typeof(string), length);
+
+ // fill the array
+ for (int i=0; i<beforeArray.Length; i++)
+ {
+ beforeArray.SetValue(TestLibrary.Generator.GetString(-55, false, c_MIN_STRLEN, c_MAX_STRLEN), i);
+ }
+
+ // copy the array
+ Array.Copy(beforeArray, afterArray, length);
+
+ Array.Reverse(afterArray, 0, length);
+
+ if (beforeArray.Length != afterArray.Length)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected length: Expected(" + beforeArray.Length + ") Actual(" + afterArray.Length + ")");
+ retVal = false;
+ }
+
+ for (int i=0; i<beforeArray.Length; i++)
+ {
+ if (!beforeArray.GetValue(length-i-1).Equals(afterArray.GetValue(i)))
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected value: Expected(" + beforeArray.GetValue(length-i-1) + ") Actual(" + afterArray.GetValue(i) + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("011", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ Array afterArray;
+ Array beforeArray;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Array.Reverse(Array, int, int) array of MyStructs");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ beforeArray = Array.CreateInstance(typeof(MyStruct), length);
+ afterArray = Array.CreateInstance(typeof(MyStruct), length);
+
+ // fill the array
+ for (int i=0; i<beforeArray.Length; i++)
+ {
+ beforeArray.SetValue(new MyStruct(TestLibrary.Generator.GetSingle(-55)), i);
+ }
+
+ // copy the array
+ Array.Copy(beforeArray, afterArray, length);
+
+ Array.Reverse(afterArray, 0, length);
+
+ if (beforeArray.Length != afterArray.Length)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected length: Expected(" + beforeArray.Length + ") Actual(" + afterArray.Length + ")");
+ retVal = false;
+ }
+
+ for (int i=0; i<beforeArray.Length; i++)
+ {
+ if (((MyStruct)beforeArray.GetValue(length-i-1)).f != ((MyStruct)afterArray.GetValue(i)).f)
+ {
+ TestLibrary.TestFramework.LogError("013", "Unexpected value: Expected(" + ((MyStruct)beforeArray.GetValue(length-i-1)).f + ") Actual(" + ((MyStruct)afterArray.GetValue(i)).f + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Array.Reverse(Array, int, int) where array is null");
+
+ try
+ {
+ Array.Reverse(null, 0, 0);
+
+ TestLibrary.TestFramework.LogError("015", "Exception expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Array.Reverse(Array, int, int) where index is negative");
+
+ try
+ {
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ Array.Reverse(array, -1, length);
+
+ TestLibrary.TestFramework.LogError("017", "Exception expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Array.Reverse(Array, int, int) where index is greater than length");
+
+ try
+ {
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ Array.Reverse(array, length, length);
+
+ TestLibrary.TestFramework.LogError("019", "Exception expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: Array.Reverse(Array, int, int) multi dimension array");
+
+ try
+ {
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), new int[2] {length, length});
+
+ Array.Reverse(array, length, length);
+
+ TestLibrary.TestFramework.LogError("021", "Exception expected");
+ retVal = false;
+ }
+ catch (RankException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("022", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public struct MyStruct
+ {
+ public float f;
+
+ public MyStruct(float ff) { f = ff; }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraysetvalue1.cs b/tests/src/CoreMangLib/cti/system/array/arraysetvalue1.cs
new file mode 100644
index 0000000000..8d77e5bc85
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraysetvalue1.cs
@@ -0,0 +1,419 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Array.SetValue(system.object,Int32)
+/// </summary>
+public class ArraySetValue1
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Set the value of a string array ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55) + 1;
+ string[] s1 = new string[length];
+ int index = TestLibrary.Generator.GetInt32(-55) % length;
+ string value = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ s1.SetValue(value, index);
+ if (s1[index] != value)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected.The index is: " + index.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Set the value of a char array ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55) + 1;
+ char[] s1 = new char[length];
+ int index = TestLibrary.Generator.GetInt32(-55) % length;
+ char value = TestLibrary.Generator.GetChar(-55);
+ s1.SetValue(value, index);
+ if (s1[index] != value)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected.The index is: " + index.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Set the first value in an array");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55) + 1;
+ int[] s1 = new int[length];
+ int value = TestLibrary.Generator.GetInt32(-55);
+ s1.SetValue(value, 0);
+ if (s1[0] != value)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Set the last value in an array");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55) + 1;
+ int[] s1 = new int[length];
+ int value = TestLibrary.Generator.GetInt32(-55);
+ s1.SetValue(value, length - 1);
+ if (s1[length - 1] != value)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Set an int32 array using int16 type");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55) + 1;
+ int[] s1 = new int[length];
+ Int16 value = TestLibrary.Generator.GetInt16(-55);
+ int index = TestLibrary.Generator.GetInt32(-55) % length;
+ s1.SetValue(value, index);
+ if (s1[index] != value)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Set an element of a string array to null");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55) + 1;
+ string[] s1 = new string[length];
+ string[] s2 = new string[length];
+ for (int i = 0; i < length; i++)
+ {
+ string value = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ s1[i] = value;
+ s2[i] = value;
+ }
+ int index = TestLibrary.Generator.GetInt32(-55) % length;
+ s1.SetValue(null, index);
+ s2[index] = null;
+ for (int i = 0; i < length; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("011", "The result is not the value as expected.");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Set a customized array ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55) + 1;
+ A[] s1 = new A[length];
+ int value = TestLibrary.Generator.GetInt32(-55);
+ A a = new A(value);
+ int index = TestLibrary.Generator.GetInt32(-55) % length;
+ s1.SetValue(a, index);
+ if (s1[index].a != value)
+ {
+ TestLibrary.TestFramework.LogError("013", "The result is not the value as expected.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The array is not one dimension");
+
+ try
+ {
+ int[,] i1 = new int[2, 3] { { 2, 3, 5 }, { 34, 56, 77 } };
+ i1.SetValue(0, 2);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Set the value which cannot be cast to the element type of the current Array ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55) + 1;
+ string[] s1 = new string[length];
+ int index = TestLibrary.Generator.GetInt32(-55) % length;
+ char value = TestLibrary.Generator.GetChar(-55);
+ s1.SetValue(value, index);
+ TestLibrary.TestFramework.LogError("103", "The InvalidCastException was not thrown as expected");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: The index argument is negative");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55) + 1;
+ char[] s1 = new char[length];
+ int index = -1;
+ char value = TestLibrary.Generator.GetChar(-55);
+ s1.SetValue(value, index);
+ TestLibrary.TestFramework.LogError("105", "The IndexOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: The index argument is greater than the max index of the array");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55) + 1;
+ int[] s1 = new int[length];
+ int index = length;
+ int value = TestLibrary.Generator.GetInt32(-55);
+ s1.SetValue(value, index);
+ TestLibrary.TestFramework.LogError("107", "The IndexOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: Array is length zero");
+
+ try
+ {
+ int[] s1 = new int[0];
+ int value = TestLibrary.Generator.GetInt32(-55);
+ s1.SetValue(value, 0);
+ TestLibrary.TestFramework.LogError("109", "The IndexOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("110", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArraySetValue1 test = new ArraySetValue1();
+
+ TestLibrary.TestFramework.BeginTestCase("ArraySetValue1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
+
+class A
+{
+ public A(int a)
+ {
+ this.a_value = a;
+ }
+ private int a_value;
+ public int a
+ {
+ get
+ {
+ return this.a_value;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraysetvalue1b.cs b/tests/src/CoreMangLib/cti/system/array/arraysetvalue1b.cs
new file mode 100644
index 0000000000..d9a4e57dec
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraysetvalue1b.cs
@@ -0,0 +1,126 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArrayGetValue2
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ArrayGetValue2 ac = new ArrayGetValue2();
+
+ TestLibrary.TestFramework.BeginTestCase("Array.SetValue(int)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ int element;
+ int index;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Array.SetValue(int) single dim");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ element = TestLibrary.Generator.GetInt32(-55);
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array.SetValue((object)TestLibrary.Generator.GetInt32(-55), i);
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32(-55) % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ if (element != (int)array.GetValue(index))
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected value: Expected(" + element + ") Actual(" + (int)array.GetValue(index) + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Array.SetValue(int) wrong rank");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), new int[2] {length, length});
+
+ array.SetValue(0, 0);
+
+ TestLibrary.TestFramework.LogError("002", "Exception expected.");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraysetvalue2.cs b/tests/src/CoreMangLib/cti/system/array/arraysetvalue2.cs
new file mode 100644
index 0000000000..bb2ec90a33
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraysetvalue2.cs
@@ -0,0 +1,291 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Array.SetValue(system.object,Int32[])
+/// </summary>
+public class ArrayIndexOf1
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test a two dimension array ");
+
+ try
+ {
+ string[,] s1 = new string[2, 3];
+ string s_value = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ s1.SetValue(s_value, 1, 0);
+ if (s1[1, 0] != s_value)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test a three dimension array ");
+
+ try
+ {
+ int[, ,] s1 = new int[9, 7, 5];
+ int i_value = TestLibrary.Generator.GetInt32(-55);
+ s1.SetValue(i_value, 8, 6, 4);
+ if (s1[8, 6, 4] != i_value)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Test a multiple dimension array ");
+
+ try
+ {
+ string[, , , , , ,] s1 = new string[7, 7, 7, 7, 7, 7, 7];
+ int[] i_index = new int[7] { 2, 3, 4, 6, 4, 5, 0 };
+ string s_value = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ s1.SetValue(s_value, i_index);
+ if (s1[2, 3, 4, 6, 4, 5, 0] != s_value)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Test a multiple dimension array with customized type TypeA ");
+
+ try
+ {
+ TypeA[, , , ,] s1 = new TypeA[9, 9, 9, 9, 9];
+ int[] i_index = new int[5] { 2, 3, 4, 6, 8 };
+ string value = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ TypeA typea = new TypeA(value);
+ s1.SetValue(typea, i_index);
+ if (s1[2, 3, 4, 6, 8].a != value)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The second argument indices is null reference ");
+
+ try
+ {
+ int[, ,] s1 = new int[9, 7, 5];
+ int i_value = TestLibrary.Generator.GetInt32(-55);
+ int[] i_index = null;
+ s1.SetValue(i_value, i_index);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2:The number of dimensions in the current Array is not equal to the number of elements in indices ");
+
+ try
+ {
+ int[, ,] s1 = new int[9, 7, 5];
+ int i_value = TestLibrary.Generator.GetInt32(-55);
+ int[] i_index = new int[4] { 1, 3, 2, 7 };
+ s1.SetValue(i_value, i_index);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentException was not thrown as expected");
+ retVal = false;
+
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Value cannot be cast to the element type of the current Array");
+
+ try
+ {
+ int[, ,] s1 = new int[9, 7, 5];
+ string i_value = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ int[] i_index = new int[3] { 1, 3, 4 };
+ s1.SetValue(i_value, i_index);
+ TestLibrary.TestFramework.LogError("105", "The InvalidCastException was not thrown as expected");
+ retVal = false;
+
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: indices is outside the range of array");
+
+ try
+ {
+ int[, ,] s1 = new int[9, 7, 5];
+ int i_value = TestLibrary.Generator.GetInt32(-55);
+ int[] i_index = new int[3] { 9, 3, 4 };
+ s1.SetValue(i_value, i_index);
+ TestLibrary.TestFramework.LogError("105", "The IndexOutOfRangeException was not thrown as expected");
+ retVal = false;
+
+ }
+ catch (IndexOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArrayIndexOf1 test = new ArrayIndexOf1();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayIndexOf1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+class TypeA
+{
+ public TypeA(string a)
+ {
+ this.a_value = a;
+ }
+ private string a_value;
+ public string a
+ {
+ get
+ {
+ return this.a_value;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraysetvalue2b.cs b/tests/src/CoreMangLib/cti/system/array/arraysetvalue2b.cs
new file mode 100644
index 0000000000..29f7525bba
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraysetvalue2b.cs
@@ -0,0 +1,208 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArraySetValue2
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ArraySetValue2 ac = new ArraySetValue2();
+
+ TestLibrary.TestFramework.BeginTestCase("array.GetValue(int[])");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ int element;
+ int index;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: array.GetValue(int[]) single dim");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+
+ element = TestLibrary.Generator.GetInt32(-55);
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array.SetValue((object)TestLibrary.Generator.GetInt32(-55), i);
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32(-55) % length;
+
+ // set the value
+ array.SetValue( element, index);
+
+ if (element != (int)array.GetValue(new int[1] {index} ))
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected value: Expected(" + element + ") Actual(" + (int)array.GetValue(new int[1] {index} ) + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ int element;
+ int index;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: array.GetValue(int[]) multi dim");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), new int[2] {length, length});
+
+ element = TestLibrary.Generator.GetInt32(-55);
+
+ // fill the array
+ for (int i=0; i<array.GetLength(0); i++)
+ {
+ array.SetValue((object)TestLibrary.Generator.GetInt32(-55), new int[2] {i,i});
+ }
+
+ // set the lucky index
+ index = TestLibrary.Generator.GetInt32(-55) % length;
+
+ // set the value
+ array.SetValue( element, new int[2] {index,index} );
+
+ if (element != (int)array.GetValue(new int[2] {index,index} ))
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected value: Expected(" + element + ") Actual(" + (int)array.GetValue(new int[2] {index, index} ) + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ int[] dims;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: array.GetValue(int[]) null dims");
+
+ try
+ {
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), length);
+ dims = null;
+
+ array.SetValue(0, dims);
+
+ TestLibrary.TestFramework.LogError("004", "Exception expected.");
+ retVal = false;
+
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: array.GetValue(int[]) wrong dim length");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Int32), new int[2] {length, length});
+
+ array.SetValue(0, new int[4] {0,0,0,0});
+
+ TestLibrary.TestFramework.LogError("006", "Exception expected.");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraysort1.cs b/tests/src/CoreMangLib/cti/system/array/arraysort1.cs
new file mode 100644
index 0000000000..252294bfcb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraysort1.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArrayBinarySort1
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_NUM_LOOPS = 50;
+
+ public static int Main()
+ {
+ ArrayBinarySort1 ac = new ArrayBinarySort1();
+
+ TestLibrary.TestFramework.BeginTestCase("Array.Sort(Array)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal; // jagged array
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ double element;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Array.Sort(Array) ");
+
+ try
+ {
+ for(int j=0; j<c_NUM_LOOPS; j++)
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Double), length);
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array.SetValue((object)TestLibrary.Generator.GetDouble(-55), i);
+ }
+
+ Array.Sort(array);
+
+ // ensure that all the elements are sorted
+ element = (double)array.GetValue(0);
+ for(int i=0; i<array.Length; i++)
+ {
+ if (element > (double)array.GetValue(i))
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected value: Element (" + element + ") is greater than (" + (double)array.GetValue(i) + ")");
+ retVal = false;
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ Array array;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Array.Sort(Array) null array");
+
+ try
+ {
+ array = null;
+
+ Array.Sort(array);
+
+ TestLibrary.TestFramework.LogError("002", "Exception expected.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Array.Sort(Array) jagged array");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(double), new int[2] {length, length/2});
+
+ // fill the array
+ for (int i=0; i<array.GetLength(0); i++)
+ {
+ for (int j=0; j<array.GetLength(1); j++)
+ {
+ array.SetValue(TestLibrary.Generator.GetDouble(-55), new int[2] {i,j});
+ }
+ }
+
+ Array.Sort(array);
+
+ TestLibrary.TestFramework.LogError("004", "Exception expected");
+ retVal = false;
+ }
+ catch (RankException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraysort10.cs b/tests/src/CoreMangLib/cti/system/array/arraysort10.cs
new file mode 100644
index 0000000000..8442cc541a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraysort10.cs
@@ -0,0 +1,497 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Array.Sort<T>(T [],System.Int32,System.Int32,System.Collections.IComparer<T>)
+/// </summary>
+public class ArraySort10
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ //Bug 385712: Won't fix
+ //retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Sort a string array using generics and customized comparer");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Tom",
+ "Allin"};
+ string[] s2 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Allin",
+ "Peter",
+ "Tom"};
+ A a1 = new A();
+ Array.Sort<string>(s1, 3, 3, a1);
+ for (int i = 0; i < 6; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Sort an int32 array using customized comparer<T> ");
+
+ try
+ {
+ // We'll add two here since we later do things like subtract two from length
+ int length = 2 + TestLibrary.Generator.GetByte();
+ int[] i1 = new int[length];
+ int[] i2 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ int value = TestLibrary.Generator.GetByte();
+ i1[i] = value;
+ i2[i] = value;
+ }
+ IComparer<int> b1 = new B<int>();
+ int startIdx = GetInt(0, length - 2);
+ int endIdx = GetInt(startIdx, length - 1);
+ int count = endIdx - startIdx + 1;
+ Array.Sort<int>(i1, startIdx, count, b1);
+ for (int i = startIdx; i < endIdx; i++) //manually quich sort
+ {
+ for (int j = i + 1; j <= endIdx; j++)
+ {
+ if (i2[i] > i2[j])
+ {
+ int temp = i2[i];
+ i2[i] = i2[j];
+ i2[j] = temp;
+ }
+ }
+ }
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,the start index is:" + startIdx.ToString() + "the end index is:" + endIdx.ToString());
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Sort a char array using reverse comparer<T> ");
+
+ try
+ {
+ char[] c1 = new char[10] { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' };
+ char[] d1 = new char[10] { 'a', 'e', 'd', 'c', 'b', 'f', 'g', 'h', 'i', 'j' };
+ IComparer<char> b2 = new B<char>();
+ Array.Sort<char>(c1, 1, 4, b2);
+ for (int i = 0; i < 10; i++)
+ {
+ if (c1[i] != d1[i])
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Sort customized type array using default customized comparer");
+
+ try
+ {
+ C<int>[] c_array = new C<int>[5];
+ C<int>[] c_result = new C<int>[5];
+ for (int i = 0; i < 5; i++)
+ {
+ int value = TestLibrary.Generator.GetInt32();
+ C<int> c1 = new C<int>(value);
+ c_array.SetValue(c1, i);
+ c_result.SetValue(c1, i);
+ }
+ //sort manually
+ C<int> temp;
+ for (int j = 0; j < 4; j++)
+ {
+ for (int i = 0; i < 4; i++)
+ {
+ if (c_result[i].value > c_result[i + 1].value)
+ {
+ temp = c_result[i];
+ c_result[i] = c_result[i + 1];
+ c_result[i + 1] = temp;
+ }
+ }
+ }
+ Array.Sort<C<int>>(c_array, 0, 5, null);
+ for (int i = 0; i < 5; i++)
+ {
+ if (c_result[i].value != c_array[i].value)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The array to be sorted is null reference ");
+
+ try
+ {
+ string[] s1 = null;
+ Array.Sort<string>(s1, 0, 2, null);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The start index is less than the minimal bound of the array");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Peter",
+ "Mike",
+ "Tom",
+ "Allin"};
+ Array.Sort<string>(s1, -1, 4, null);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Length is less than zero");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Peter",
+ "Mike",
+ "Tom",
+ "Allin"};
+ Array.Sort<string>(s1, 3, -3, null);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentOutOfRangeException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: The start index and length do not specify a valid range in array");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte();
+ string[] s1 = new string[length];
+ for (int i = 0; i < length; i++)
+ {
+ string value = TestLibrary.Generator.GetString(false, 0, 10);
+ s1[i] = value;
+ }
+ int startIdx = GetInt(0, Byte.MaxValue);
+ int increment = length + 1;
+ Array.Sort<string>(s1, startIdx + increment, 0, null);
+ TestLibrary.TestFramework.LogError("107", "The ArgumentException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5:The implementation of comparer caused an error during the sort");
+
+ try
+ {
+ int[] i1 = new int[9] { 2, 34, 56, 87, 34, 23, 209, 34, 87 };
+ IComparer<int> d1 = new D<int>();
+ Array.Sort<int>(i1, 0, 9, d1);
+ TestLibrary.TestFramework.LogError("109", "The ArgumentException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("110", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: Elements in array do not implement the IComparable interface");
+
+ try
+ {
+ E[] a1 = new E[4] { new E(), new E(), new E(), new E() };
+ IComparer<E> d2 = null;
+ Array.Sort<E>(a1, 0, 4, d2);
+ TestLibrary.TestFramework.LogError("111", "The InvalidOperationException is not throw as expected ");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("112", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArraySort10 test = new ArraySort10();
+
+ TestLibrary.TestFramework.BeginTestCase("ArraySort10");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ class A : IComparer<string>
+ {
+ #region IComparer<string> Members
+
+ public int Compare(string x, string y)
+ {
+ return x.CompareTo(y);
+ }
+
+ #endregion
+ }
+
+ class B<T> : IComparer<T> where T : IComparable
+ {
+ #region IComparer<T> Members
+
+ public int Compare(T x, T y)
+ {
+ if (typeof(T) == typeof(char))
+ {
+ return -x.CompareTo(y);
+ }
+ return x.CompareTo(y);
+ }
+
+ #endregion
+ }
+
+ class C<T> : IComparable where T : IComparable
+ {
+ public T value;
+ public C(T a)
+ {
+ this.value = a;
+ }
+
+
+ #region IComparable Members
+
+ public int CompareTo(object obj)
+ {
+ return value.CompareTo(((C<T>)obj).value);
+ }
+
+ #endregion
+ }
+
+ class D<T> : IComparer<T> where T : IComparable
+ {
+ #region IComparer<T> Members
+
+ public int Compare(T x, T y)
+ {
+ if (x.CompareTo(x) == 0)
+ return -1;
+ return 1;
+ }
+ #endregion
+ }
+ class E
+ {
+ public E()
+ {
+ }
+ }
+
+ #region Help method for geting test data
+
+ private Int32 GetInt(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32() % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraysort11.cs b/tests/src/CoreMangLib/cti/system/array/arraysort11.cs
new file mode 100644
index 0000000000..adb64287c7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraysort11.cs
@@ -0,0 +1,397 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Array.Sort<Tkey,Tvalue>(Tkey[],Tvalue[])
+/// </summary>
+public class ArraySort11
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Sort a string array ");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Tom",
+ "Allin"};
+ int[] i1 = new int[6] { 24, 30, 28, 26, 32, 23 };
+ string[] s2 = new string[6]{"Allin",
+ "Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Tom"};
+ int[] i2 = new int[6] { 23, 24, 30, 28, 26, 32 };
+ Array.Sort<string, int>(s1, i1);
+ for (int i = 0; i < 6; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("002", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Sort an int32 array ");
+
+ try
+ {
+ int length = GetInt(1, Byte.MaxValue);
+ int[] i1 = new int[length];
+ int[] i2 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ int value = TestLibrary.Generator.GetInt32();
+ i1[i] = value;
+ i2[i] = value;
+ }
+ Array.Sort<int, int>(i1, i2);
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("004", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Sort a char array using reverse comparer ");
+
+ try
+ {
+ char[] c1 = new char[10] { 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a' };
+ char[] d1 = new char[10] { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' };
+ int[] a1 = new int[10] { 2, 3, 4, 1, 0, 2, 12, 52, 31, 0 };
+ int[] b1 = new int[10] { 0, 31, 52, 12, 2, 0, 1, 4, 3, 2 };
+ Array.Sort<char, int>(c1, a1);
+ for (int i = 0; i < 10; i++)
+ {
+ if (c1[i] != d1[i])
+ {
+ TestLibrary.TestFramework.LogError("006", "The result is not the value as expected");
+ retVal = false;
+ }
+ if (a1[i] != b1[i])
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Sort a customized type array ");
+
+ try
+ {
+ A[] a1 = new A[5] { new A(3), new A(43), null, new A(-888), new A(0) };
+ int[] c1 = new int[] { 3, 43, 4, 0, 5 };
+ int[] d1 = new int[] { 4, 0, 5, 3, 43 };
+ Array.Sort<A, int>(a1, c1);
+ for (int i = 0; i < 5; i++)
+ {
+ if (c1[i] != d1[i])
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: The value[] argument is null ");
+
+ try
+ {
+ int length = GetInt(1, Int16.MaxValue);
+ char[] c1 = new char[length];
+ char[] c2 = new char[length];
+ for (int i = 0; i < length; i++)
+ {
+ char value = TestLibrary.Generator.GetChar();
+ c1[i] = value;
+ c2[i] = value;
+ }
+ string[] s1 = null;
+ Array.Sort<char, string>(c1, s1);
+ for (int i = 0; i < length - 1; i++) //manually quich sort
+ {
+ for (int j = i + 1; j < length; j++)
+ {
+ if (c2[i] > c2[j])
+ {
+ char temp = c2[i];
+ c2[i] = c2[j];
+ c2[j] = temp;
+ }
+ }
+ }
+ for (int i = 0; i < length; i++)
+ {
+ if (c1[i] != c2[i])
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The first key argument is null reference ");
+
+ try
+ {
+ string[] s1 = null;
+ int[] i1 = { 1, 2, 3, 4, 5 };
+ Array.Sort<string, int>(s1, i1);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2:The length of items array is less than the length of keys array ");
+
+ try
+ {
+ int length_array = GetInt(2, Int16.MaxValue);
+ int length_value = GetInt(1, length_array-1);
+ string[] s1 = new string[length_array];
+ int[] i1 = new int[length_value];
+ for (int i = 0; i < length_array; i++)
+ {
+ string value = TestLibrary.Generator.GetString(false, 0, 10);
+ s1[i] = value;
+ }
+ for (int i = 0; i < length_value; i++)
+ {
+ int value = TestLibrary.Generator.GetInt32();
+ i1[i] = value;
+ }
+ Array.Sort<string, int>(s1, i1);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: The keys array does not implement the IComparable interface ");
+
+ try
+ {
+ D d1 = new D();
+ D d2 = new D();
+ D d3 = new D();
+ D d4 = new D();
+ int[] i2 = { 1, 2, 3, 4 };
+ D[] d = new D[4] { d1, d2, d3, d4 };
+ Array.Sort<D, int>(d, i2);
+ TestLibrary.TestFramework.LogError("105", "The InvalidOperationException is not throw as expected ");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArraySort11 test = new ArraySort11();
+
+ TestLibrary.TestFramework.BeginTestCase("ArraySort11");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ class A : IComparable
+ {
+ public int value;
+ public A(int a)
+ {
+ this.value = a;
+ }
+
+ #region IComparable Members
+
+ public int CompareTo(object obj)
+ {
+ return this.value.CompareTo(((A)obj).value);
+ }
+
+ #endregion
+ }
+
+ class D
+ {
+ public D()
+ {
+ }
+ }
+ #region Help method for geting test data
+
+ private Int32 GetInt(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32() % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/array/arraysort12.cs b/tests/src/CoreMangLib/cti/system/array/arraysort12.cs
new file mode 100644
index 0000000000..86a8ffac53
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraysort12.cs
@@ -0,0 +1,511 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// Array.Sort<Tkey,Tvalue>(Tkey[],Tvalue[],IComparer)
+/// </summary>
+public class ArraySort12
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ //Bug 385712: Won’t fix
+ //retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Sort a string array using customizes comparer ");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Tom",
+ "Allin"};
+ int[] i1 = new int[6] { 24, 30, 28, 26, 32, 23 };
+ string[] s2 = new string[6]{"Allin",
+ "Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Tom"};
+ int[] i2 = new int[6] { 23, 24, 30, 28, 26, 32 };
+ IComparer<string> a = new A<string>();
+ Array.Sort<string, int>(s1, i1, a);
+ for (int i = 0; i < 6; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("002", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Sort an int32 array using comparer ");
+
+ try
+ {
+ int length = GetInt(1, Byte.MaxValue);
+ int[] i1 = new int[length];
+ int[] i2 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ int value = TestLibrary.Generator.GetInt32();
+ i1[i] = value;
+ i2[i] = value;
+ }
+ IComparer<int> a1 = new A<int>();
+ Array.Sort<int, int>(i1, i2, a1);
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("004", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Sort a char array using reverse comparer ");
+
+ try
+ {
+ char[] c1 = new char[10] { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' };
+ char[] c2 = new char[10] { 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a' };
+ char[] d1 = new char[10];
+ char[] d2 = new char[10];
+ c1.CopyTo(d2, 0);
+ c2.CopyTo(d1, 0);
+ IComparer<char> a2 = new A<char>();
+ Array.Sort<char, char>(c1, c2, a2);
+ for (int i = 0; i < 10; i++)
+ {
+ if (c1[i] != d1[i])
+ {
+ TestLibrary.TestFramework.LogError("006", "The result is not the value as expected");
+ retVal = false;
+ }
+ if (c2[i] != d2[i])
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Sort a customized array ");
+
+ try
+ {
+ C c1 = new C(100);
+ C c2 = new C(16);
+ C c3 = new C(11);
+ C c4 = new C(9);
+ C c5 = new C(0);
+ C c6 = new C(-100);
+ int[] i1 = new int[6] { 1, 2, 3, 4, 5, 6 };
+ int[] i2 = new int[6] { 1, 2, 3, 4, 5, 6 };
+ C[] c = new C[6] { c1, c2, c3, c4, c5, c6 };
+ IComparer<C> b1 = new B<C>();
+ Array.Sort<C, int>(c, i1, b1);
+ for (int i = 0; i < 6; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Sort a customized array and the comparer argument is null ");
+
+ try
+ {
+ C c1 = new C(100);
+ C c2 = new C(16);
+ C c3 = new C(11);
+ C c4 = new C(9);
+ C c5 = new C(0);
+ C c6 = new C(-100);
+ int[] i1 = new int[6] { 1, 2, 3, 4, 5, 6 };
+ int[] i2 = new int[6] { 6, 5, 4, 3, 2, 1 };
+ C[] c = new C[6] { c1, c2, c3, c4, c5, c6 };
+ IComparer<C> b1 = null;
+ Array.Sort<C, int>(c, i1, b1);
+ for (int i = 0; i < 6; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: The length of items array is greater than the length of keys array");
+
+ try
+ {
+ int[] i1 = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ int[] i2 = { 6, 5, 4, 3, 2, 1, 7, 8, 9 };
+ C[] c = { new C(100), new C(16), new C(11), new C(9), new C(0), new C(-100)};
+ IComparer<C> b1 = null;
+ Array.Sort<C, int>(c, i1, b1);
+ for (int i = 0; i < i1.Length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("011", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("013", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The first argument is null reference ");
+
+ try
+ {
+ string[] s1 = null;
+ int[] i1 = { 1, 2, 3, 4, 5 };
+ IComparer<string> a = new A<string>();
+ Array.Sort<string, int>(s1, i1, a);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2:The length of items array is less than the length of keys array ");
+
+ try
+ {
+ int length_array = GetInt(2, Int16.MaxValue);
+ int length_value = GetInt(1, length_array-1);
+ string[] s1 = new string[length_array];
+ int[] i1 = new int[length_value];
+ for (int i = 0; i < length_array; i++)
+ {
+ string value = TestLibrary.Generator.GetString(false, 0, 10);
+ s1[i] = value;
+ }
+ for (int i = 0; i < length_value; i++)
+ {
+ int value = TestLibrary.Generator.GetInt32();
+ i1[i] = value;
+ }
+ IComparer<string> a = new A<string>();
+ Array.Sort<string, int>(s1, i1, a);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: The keys array does not implement the IComparable interface ");
+
+ try
+ {
+ D d1 = new D();
+ D d2 = new D();
+ D d3 = new D();
+ D d4 = new D();
+ int[] i2 = { 1, 2, 3, 4 };
+ D[] d = new D[4] { d1, d2, d3, d4 };
+ Array.Sort<D, int>(d, i2, null);
+ TestLibrary.TestFramework.LogError("105", "The InvalidOperationException is not throw as expected ");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: The implementation of comparison caused an error during the sort");
+
+ try
+ {
+ string[] s1 = new string[7]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Boy",
+ "Tom",
+ "Allin"};
+ int[] i2 = { 1, 2, 3, 4, 6, 7, 88 };
+ IComparer<string> a5 = new E<string>();
+ Array.Sort<string, int>(s1, i2, a5);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArraySort12 test = new ArraySort12();
+
+ TestLibrary.TestFramework.BeginTestCase("ArraySort12");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ class A<T> : IComparer<T> where T : IComparable
+ {
+
+ #region IComparer<T> Members
+
+ int IComparer<T>.Compare(T x, T y)
+ {
+ if (typeof(T) == typeof(char))
+ {
+ return -(x.CompareTo(y));
+ }
+ return x.CompareTo(y);
+ }
+
+ #endregion
+ }
+ class B<T> : IComparer<T> where T : IComparable
+ {
+
+ #region IComparer<T> Members
+
+ int IComparer<T>.Compare(T x, T y)
+ {
+ return -(x.CompareTo(y));
+ }
+
+ #endregion
+ }
+
+ class C : IComparable
+ {
+ protected int c_value;
+ public C(int a)
+ {
+ this.c_value = a;
+ }
+
+ #region IComparable Members
+
+ int IComparable.CompareTo(object obj)
+ {
+ return this.c_value.CompareTo((obj as C).c_value);
+ }
+
+ #endregion
+ }
+
+
+ class D
+ {
+ public D()
+ {
+ }
+ }
+ class E<T> : IComparer<T> where T : IComparable
+ {
+ #region IComparer<T> Members
+
+ int IComparer<T>.Compare(T x, T y)
+ {
+ if (x.CompareTo(x) == 0)
+ {
+ return -1;
+ }
+ return 1;
+ }
+
+ #endregion
+ }
+
+ #region Help method for geting test data
+
+ private Int32 GetInt(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32() % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ #endregion
+}
+ #endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/arraysort13.cs b/tests/src/CoreMangLib/cti/system/array/arraysort13.cs
new file mode 100644
index 0000000000..91f392ac1f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraysort13.cs
@@ -0,0 +1,563 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// Array.Sort<Tkey,Tvalue>(Tkey[],Tvalue[],System.Int32,System.Int32)
+/// </summary>
+public class ArraySort13
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Sort a string array using default comparer ");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Tom",
+ "Allin"};
+ int[] i1 = new int[6] { 24, 30, 28, 26, 32, 23 };
+ string[] s2 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Allin",
+ "Peter",
+ "Tom"};
+ int[] i2 = new int[6] { 24, 30, 28, 23, 26, 32 };
+ Array.Sort<string, int>(s1, i1, 3, 3);
+ for (int i = 0; i < 6; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("002", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Sort an int32 array using default comparer ");
+
+ try
+ {
+ int length = GetInt(1, Byte.MaxValue);
+ int[] i1 = new int[length];
+ int[] i2 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ int value = TestLibrary.Generator.GetInt32();
+ i1[i] = value;
+ i2[i] = value;
+ }
+ int startIdx = GetInt(0, length - 1);
+ int endIdx = GetInt(startIdx, length - 1);
+ int count = endIdx - startIdx + 1;
+ Array.Sort<int, int>(i1, i2, startIdx, count);
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("004", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Sort an int array and the items array is null ");
+
+ try
+ {
+ int length = GetInt(1, Int16.MaxValue);
+ int[] i1 = new int[length];
+ int[] i2 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ int value = TestLibrary.Generator.GetByte();
+ i1[i] = value;
+ i2[i] = value;
+ }
+ int startIdx = GetInt(0, length - 2);
+ int endIdx = GetInt(startIdx, length - 1);
+ int count = endIdx - startIdx + 1;
+ for (int i = startIdx; i < endIdx; i++) //manually quich sort
+ {
+ for (int j = i + 1; j <= endIdx; j++)
+ {
+ if (i2[i] > i2[j])
+ {
+ int temp = i2[i];
+ i2[i] = i2[j];
+ i2[j] = temp;
+ }
+ }
+ }
+ Array.Sort<int, int>(i1, null, startIdx, count);
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("006", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Sort a customized array ");
+
+ try
+ {
+ int length = 10;
+ C[] i1 = { new C(10), new C(9), new C(8), new C(7), new C(6), new C(5), new C(4), new C(3), new C(2), new C(1) };
+ C[] i2 = { new C(10), new C(9), new C(8), new C(3), new C(4), new C(5), new C(6), new C(7), new C(2), new C(1) };
+ int[] i4 = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 };
+ int[] i3 = { 1, 2, 3, 8, 7, 6, 5, 4, 9, 0 };
+
+ Array.Sort<C, int>(i1, i4, 3, 5); // arrays should be sorted from 3 to 7
+
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i].show_v != i2[i].show_v)
+ {
+ TestLibrary.TestFramework.LogError("008", "The result is not the value as expected");
+ retVal = false;
+ }
+ if (i3[i] != i4[i])
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Sort a customized array: keys are same");
+
+ try
+ {
+ int length = 10;
+ C[] i1 = { new C(1), new C(1), new C(1), new C(1), new C(1), new C(1), new C(1), new C(1), new C(1), new C(1) };
+ C[] i2 = { new C(1), new C(1), new C(1), new C(1), new C(1), new C(1), new C(1), new C(1), new C(1), new C(1) };
+ int[] i4 = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 };
+ int[] i3 = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 };
+
+ //Array.Sort swaps the items even if keys are same: Post Dev10 Bug 868577
+ Array.Sort<C, int>(i1, i4, 3, 5); // arrays should be sorted from 3 to 7
+
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i].show_v != i2[i].show_v)
+ {
+ TestLibrary.TestFramework.LogError("010", "The result is not the value as expected");
+ retVal = false;
+ }
+ if (i3[i] != i4[i])
+ {
+ TestLibrary.TestFramework.LogError("011", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The first argument is null reference ");
+
+ try
+ {
+ string[] s1 = null;
+ int[] i1 = { 1, 2, 3, 4, 5 };
+ Array.Sort<string, int>(s1, i1, 0, 2);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The start index is less than the minimal bound of the array");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Peter",
+ "Mike",
+ "Tom",
+ "Allin"};
+ int[] i1 = new int[6] { 1, 2, 3, 4, 5, 6 };
+ Array.Sort<string, int>(s1, i1, -1, 4);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Length is less than zero");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Peter",
+ "Mike",
+ "Tom",
+ "Allin"};
+ int[] i1 = new int[6] { 1, 2, 3, 4, 5, 6 };
+ Array.Sort<string, int>(s1, i1, 3, -3);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentOutOfRangeException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: The start index is greater than the maximal index of the array");
+
+ try
+ {
+ int length = GetInt(1, Byte.MaxValue);
+ string[] s1 = new string[length];
+ for (int i = 0; i < length; i++)
+ {
+ string value = TestLibrary.Generator.GetString(false, 0, 10);
+ s1[i] = value;
+ }
+ int[] i1 = new int[6] { 1, 2, 3, 4, 5, 6 };
+ int startIdx = GetInt(1, Byte.MaxValue);
+ int increment = length;
+ Array.Sort<string, int>(s1, i1, startIdx + increment, 0);
+ TestLibrary.TestFramework.LogError("107", "The ArgumentException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: The start index is valid, but the length is too large for that index");
+
+ try
+ {
+ int length = GetInt(1, Byte.MaxValue);
+ string[] s1 = new string[length];
+ for (int i = 0; i < length; i++)
+ {
+ string value = TestLibrary.Generator.GetString(false, 0, 10);
+ s1[i] = value;
+ }
+ int[] i1 = new int[6] { 1, 2, 3, 4, 5, 6 };
+ int startIdx = GetInt(1, length - 1);
+ int count = length;
+ Array.Sort<string, int>(s1, i1, startIdx, count);
+ TestLibrary.TestFramework.LogError("109", "The ArgumentException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("110", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: The keys array does not implement the IComparable interface ");
+
+ try
+ {
+ D d1 = new D();
+ D d2 = new D();
+ D d3 = new D();
+ D d4 = new D();
+ int[] i2 = { 1, 2, 3, 4 };
+ D[] d = new D[4] { d1, d2, d3, d4 };
+ Array.Sort<D, int>(d, i2, null);
+ TestLibrary.TestFramework.LogError("111", "The InvalidOperationException is not throw as expected ");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("112", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArraySort13 test = new ArraySort13();
+
+ TestLibrary.TestFramework.BeginTestCase("ArraySort13");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ class A<T> : IComparer<T> where T : IComparable
+ {
+
+ #region IComparer<T> Members
+
+ int IComparer<T>.Compare(T x, T y)
+ {
+ if (typeof(T) == typeof(char))
+ {
+ return -(x.CompareTo(y));
+ }
+ return x.CompareTo(y);
+ }
+
+ #endregion
+ }
+ class B<T> : IComparer<T> where T : IComparable
+ {
+
+ #region IComparer<T> Members
+
+ int IComparer<T>.Compare(T x, T y)
+ {
+ return -(x.CompareTo(y));
+ }
+
+ #endregion
+ }
+
+ class C : IComparable
+ {
+ protected int c_value;
+ public C(int a)
+ {
+ this.c_value = a;
+ }
+ public int show_v
+ {
+ get
+ {
+ return this.c_value;
+ }
+ }
+
+ #region IComparable Members
+
+ int IComparable.CompareTo(object obj)
+ {
+ return this.c_value.CompareTo((obj as C).c_value);
+ }
+
+ #endregion
+ }
+
+
+ class D
+ {
+ public D()
+ {
+ }
+ }
+ class E<T> : IComparer<T> where T : IComparable
+ {
+ #region IComparer<T> Members
+
+ int IComparer<T>.Compare(T x, T y)
+ {
+ if (x.CompareTo(x) == 0)
+ {
+ return -1;
+ }
+ return 1;
+ }
+
+ #endregion
+ }
+ #region Help method for geting test data
+
+ private Int32 GetInt(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32() % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ #endregion
+}
+ #endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/array/arraysort14.cs b/tests/src/CoreMangLib/cti/system/array/arraysort14.cs
new file mode 100644
index 0000000000..aaa9e8c0d2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraysort14.cs
@@ -0,0 +1,528 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// Array.Sort<Tkey,Tvalue>(Tkey[],Tvalue[],System.Int32,System.Int32,IComparer)
+/// </summary>
+
+public class ArraySort14
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ //DevDiv Bug 385712: Won't fix
+ //retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Sort a string array using comparer ");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Tom",
+ "Allin"};
+ int[] i1 = new int[6] { 24, 30, 28, 26, 32, 23 };
+ string[] s2 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Allin",
+ "Peter",
+ "Tom"};
+ int[] i2 = new int[6] { 24, 30, 28, 23, 26, 32 };
+ A a1 = new A();
+ Array.Sort<string, int>(s1, i1, 3, 3, a1);
+ for (int i = 0; i < 6; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("002", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Sort an int32 array using comparer ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ int[] i1 = new int[length];
+ int[] i2 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ int value = TestLibrary.Generator.GetInt32(-55);
+ i1[i] = value;
+ i2[i] = value;
+ }
+ IComparer<int> b1 = new B<int>();
+ int startIdx = GetInt(0, length - 1);
+ int endIdx = GetInt(startIdx, length - 1);
+ int count = endIdx - startIdx + 1;
+ Array.Sort<int, int>(i1, i2, startIdx, count, b1);
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("004", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Sort a char array using reverse comparer ");
+
+ try
+ {
+ char[] c1 = new char[10] { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' };
+ char[] d1 = new char[10] { 'a', 'e', 'd', 'c', 'b', 'f', 'g', 'h', 'i', 'j' };
+ int[] a1 = new int[10] { 2, 3, 4, 1, 0, 2, 12, 52, 31, 0 };
+ int[] b1 = new int[10] { 2, 0, 1, 4, 3, 2, 12, 52, 31, 0 };
+ IComparer<char> b2 = new B<char>();
+ Array.Sort<char, int>(c1, a1, 1, 4, b2);
+ for (int i = 0; i < 10; i++)
+ {
+ if (c1[i] != d1[i])
+ {
+ TestLibrary.TestFramework.LogError("006", "The result is not the value as expected");
+ retVal = false;
+ }
+ if (a1[i] != b1[i])
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Sort an int array and the items array is null ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55);
+ int[] i1 = new int[length];
+ int[] i2 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ int value = TestLibrary.Generator.GetByte(-55);
+ i1[i] = value;
+ i2[i] = value;
+ }
+ int startIdx = GetInt(0, length - 2);
+ int endIdx = GetInt(startIdx, length - 1);
+ int count = endIdx - startIdx + 1;
+ for (int i = startIdx; i < endIdx; i++) //manually quich sort
+ {
+ for (int j = i + 1; j <= endIdx; j++)
+ {
+ if (i2[i] > i2[j])
+ {
+ int temp = i2[i];
+ i2[i] = i2[j];
+ i2[j] = temp;
+ }
+ }
+ }
+ Array.Sort<int, int>(i1, null, startIdx, count, new B<int>());
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The first argument is null reference ");
+
+ try
+ {
+ string[] s1 = null;
+ int[] i1 = { 1, 2, 3, 4, 5 };
+ Array.Sort<string, int>(s1, i1, 0, 2, new B<string>());
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The start index is less than the minimal bound of the array");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Peter",
+ "Mike",
+ "Tom",
+ "Allin"};
+ int[] i1 = new int[6] { 1, 2, 3, 4, 5, 6 };
+ Array.Sort<string, int>(s1, i1, -1, 4, new B<string>());
+ TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Length is less than zero");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Peter",
+ "Mike",
+ "Tom",
+ "Allin"};
+ int[] i1 = new int[6] { 1, 2, 3, 4, 5, 6 };
+ Array.Sort<string, int>(s1, i1, 3, -3, new B<string>());
+ TestLibrary.TestFramework.LogError("105", "The ArgumentOutOfRangeException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: The start index is greater than the maximal index of the array");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ string[] s1 = new string[length];
+ for (int i = 0; i < length; i++)
+ {
+ string value = TestLibrary.Generator.GetString(-55, false, 0, 10);
+ s1[i] = value;
+ }
+ int[] i1 = new int[6] { 1, 2, 3, 4, 5, 6 };
+ int startIdx = GetInt(1, Byte.MaxValue);
+ int increment = length;
+ Array.Sort<string, int>(s1, i1, startIdx + increment, 0, new B<string>());
+ TestLibrary.TestFramework.LogError("107", "The ArgumentException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: The start index is valid, but the length is too large for that index");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ string[] s1 = new string[length];
+ for (int i = 0; i < length; i++)
+ {
+ string value = TestLibrary.Generator.GetString(-55, false, 0, 10);
+ s1[i] = value;
+ }
+ int[] i1 = new int[6] { 1, 2, 3, 4, 5, 6 };
+ int startIdx = GetInt(1, length - 1);
+ int count = length;
+ Array.Sort<string, int>(s1, i1, startIdx, count);
+ TestLibrary.TestFramework.LogError("109", "The ArgumentException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("110", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6:The implementation of comparer caused an error during the sort");
+
+ try
+ {
+ string[] s1 = new string[9]{"Jack",
+ "Mary",
+ "Peter",
+ "Mike",
+ "Tom",
+ "Allin",
+ "Kelly",
+ "Agassi",
+ "Koter"};
+ int[] i1 = new int[9] { 2, 34, 56, 87, 34, 23, 209, 34, 87 };
+ IComparer<string> d1 = new D<string>();
+ Array.Sort<string, int>(s1, i1, 0, 9, d1);
+ TestLibrary.TestFramework.LogError("111", "The ArgumentException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("112", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest7: The keys array does not implement the IComparable interface ");
+
+ try
+ {
+ E d1 = new E();
+ E d2 = new E();
+ E d3 = new E();
+ E d4 = new E();
+ int[] i2 = { 1, 2, 3, 4 };
+ E[] e = new E[4] { d1, d2, d3, d4 };
+ Array.Sort<E, int>(e, i2, null);
+ TestLibrary.TestFramework.LogError("113", "The InvalidOperationException is not throw as expected ");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("114", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArraySort14 test = new ArraySort14();
+
+ TestLibrary.TestFramework.BeginTestCase("ArraySort14");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ class A : IComparer<string>
+ {
+ #region IComparer<string> Members
+
+ public int Compare(string x, string y)
+ {
+ return x.CompareTo(y);
+ }
+
+ #endregion
+ }
+
+ class B<T> : IComparer<T> where T : IComparable
+ {
+ #region IComparer<T> Members
+
+ public int Compare(T x, T y)
+ {
+ if (typeof(T) == typeof(char))
+ {
+ return -x.CompareTo(y);
+ }
+ return x.CompareTo(y);
+ }
+
+ #endregion
+ }
+ class D<T> : IComparer<T> where T : IComparable
+ {
+ #region IComparer<T> Members
+
+ public int Compare(T x, T y)
+ {
+ if (x.CompareTo(x) == 0)
+ return -1;
+ return 1;
+ }
+ #endregion
+ }
+ class E
+ {
+ public E()
+ {
+ }
+ }
+ #region Help method for geting test data
+
+ private Int32 GetInt(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraysort1b.cs b/tests/src/CoreMangLib/cti/system/array/arraysort1b.cs
new file mode 100644
index 0000000000..b74bc90728
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraysort1b.cs
@@ -0,0 +1,312 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Array.Sort(System.Array)
+/// </summary>
+public class ArrayIndexOf1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Sort a string array using default comparer ");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Tom",
+ "Allin"};
+ string[] s2 = new string[]{"Allin",
+ "Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Tom"};
+ Array.Sort(s1);
+ for (int i = 0; i < 6; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Sort an int32 array using default comparer ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ int[] i1 = new int[length];
+ int[] i2 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ int value = TestLibrary.Generator.GetInt32(-55);
+ i1[i] = value;
+ i2[i] = value;
+ }
+ Array.Sort(i1);
+ for (int i = 0; i < length - 1; i++) //manually quich sort
+ {
+ for (int j = i + 1; j < length; j++)
+ {
+ if (i2[i] > i2[j])
+ {
+ int temp = i2[i];
+ i2[i] = i2[j];
+ i2[j] = temp;
+ }
+ }
+ }
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Sort a char array using default comparer ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55);
+ char[] c1 = new char[length];
+ char[] c2 = new char[length];
+ for (int i = 0; i < length; i++)
+ {
+ char value = TestLibrary.Generator.GetChar(-55);
+ c1[i] = value;
+ c2[i] = value;
+ }
+ Array.Sort(c1);
+ for (int i = 0; i < length - 1; i++) //manually quich sort
+ {
+ for (int j = i + 1; j < length; j++)
+ {
+ if (c2[i] > c2[j])
+ {
+ char temp = c2[i];
+ c2[i] = c2[j];
+ c2[j] = temp;
+ }
+ }
+ }
+ for (int i = 0; i < length; i++)
+ {
+ if (c1[i] != c2[i])
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Sort a string array including null reference ");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ null,
+ "Peter",
+ "Tom",
+ "Allin"};
+ string[] s2 = new string[]{null,
+ "Allin",
+ "Jack",
+ "Mary",
+ "Peter",
+ "Tom"};
+ Array.Sort(s1);
+ for (int i = 0; i < 6; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The array is null ");
+
+ try
+ {
+ string[] s1 = null;
+ Array.Sort(s1);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The array is not one dimension ");
+
+ try
+ {
+ int[,] i1 = new int[2, 3] { { 2, 3, 5 }, { 34, 56, 77 } };
+ Array.Sort(i1);
+ TestLibrary.TestFramework.LogError("103", "The RankException is not throw as expected ");
+ retVal = false;
+ }
+ catch (RankException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: One or more elements in array do not implement the IComparable interface ");
+
+ try
+ {
+ A[] a1 = new A[4] { new A(), new A(), new A(), new A() };
+ Array.Sort(a1);
+ TestLibrary.TestFramework.LogError("105", "The InvalidOperationException is not throw as expected ");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArrayIndexOf1 test = new ArrayIndexOf1();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayIndexOf1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ class A
+ {
+ public A() { }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraysort2.cs b/tests/src/CoreMangLib/cti/system/array/arraysort2.cs
new file mode 100644
index 0000000000..ea7a16c253
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraysort2.cs
@@ -0,0 +1,185 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArrayBinarySort2
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_NUM_LOOPS = 50;
+
+ public static int Main()
+ {
+ ArrayBinarySort2 ac = new ArrayBinarySort2();
+
+ TestLibrary.TestFramework.BeginTestCase("Array.Sort(Array, IComparer)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ double element;
+ IComparer myc;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Array.Sort(Array, IComparer) ");
+
+ try
+ {
+ for(int j=0; j<c_NUM_LOOPS; j++)
+ {
+ myc = new MyComparer();
+
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(Double), length);
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array.SetValue((object)TestLibrary.Generator.GetDouble(-55), i);
+ }
+
+ Array.Sort(array, myc);
+
+ // ensure that all the elements are sorted
+ element = (double)array.GetValue(0);
+ for(int i=0; i<array.Length; i++)
+ {
+ if (element > (double)array.GetValue(i))
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected value: Element (" + element + ") is greater than (" + (double)array.GetValue(i) + ")");
+ retVal = false;
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Array array;
+ int length;
+ IComparer myc;
+ double element;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Array.Sort(Array, IComparer) null comparer");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ array = Array.CreateInstance(typeof(double), length);
+
+ // fill the array
+ for (int i=0; i<array.Length; i++)
+ {
+ array.SetValue(TestLibrary.Generator.GetDouble(-55), i);
+ }
+
+ myc = null;
+ Array.Sort(array, myc);
+
+ // ensure that all the elements are sorted
+ element = (double)array.GetValue(0);
+ for(int i=0; i<array.Length; i++)
+ {
+ if (element > (double)array.GetValue(i))
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected value: Element (" + element + ") is greater than (" + (double)array.GetValue(i) + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ Array array;
+ IComparer myc;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Array.Sort(Array, IComparer) null array");
+
+ try
+ {
+ array = null;
+ myc = new MyComparer();
+
+ Array.Sort(array, myc);
+
+ TestLibrary.TestFramework.LogError("004", "Exception expected.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public class MyComparer : IComparer
+ {
+ public int Compare(object obj1, object obj2)
+ {
+
+ if ((double)obj1 == (double)obj2) return 0;
+
+ return ((double)obj1 < (double)obj2) ? -1 : 1;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraysort2b.cs b/tests/src/CoreMangLib/cti/system/array/arraysort2b.cs
new file mode 100644
index 0000000000..a627d2b98b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraysort2b.cs
@@ -0,0 +1,427 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Array.Sort(System.Array,System.Array,System.Collections.IComparer)
+/// </summary>
+public class ArrayIndexOf1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Sort a string array using default comparer ");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Tom",
+ "Allin"};
+ int[] i1 = new int[6] { 24, 30, 28, 26, 32, 23 };
+ string[] s2 = new string[6]{"Allin",
+ "Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Tom"};
+ int[] i2 = new int[6] { 23, 24, 30, 28, 26, 32 };
+ Array.Sort(s1, i1, null);
+ for (int i = 0; i < 6; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("002", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Sort an int32 array using comparer ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ int[] i1 = new int[length];
+ int[] i2 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ int value = TestLibrary.Generator.GetInt32(-55);
+ i1[i] = value;
+ i2[i] = value;
+ }
+ IComparer a1 = new A();
+ Array.Sort(i1, i2, a1);
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("004", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Sort a char array using reverse comparer ");
+
+ try
+ {
+ char[] c1 = new char[10] { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' };
+ char[] c2 = new char[10] { 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a' };
+ char[] d1 = new char[10];
+ char[] d2 = new char[10];
+ c1.CopyTo(d2, 0);
+ c2.CopyTo(d1, 0);
+ IComparer b = new B();
+ Array.Sort(c1, c2, b);
+ for (int i = 0; i < 10; i++)
+ {
+ if (c1[i] != d1[i])
+ {
+ TestLibrary.TestFramework.LogError("006", "The result is not the value as expected");
+ retVal = false;
+ }
+ if (c2[i] != d2[i])
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Sort a customized array ");
+
+ try
+ {
+ C c1 = new C(100);
+ C c2 = new C(16);
+ C c3 = new C(11);
+ C c4 = new C(9);
+ C c5 = new C(7);
+ C c6 = new C(2);
+ int[] i1 = new int[6] { 1, 2, 3, 4, 5, 6 };
+ int[] i2 = new int[6] { 6, 5, 4, 3, 2, 1 };
+ Array myarray = Array.CreateInstance(typeof(C), 6);
+ myarray.SetValue(c1, 0);
+ myarray.SetValue(c2, 1);
+ myarray.SetValue(c3, 2);
+ myarray.SetValue(c4, 3);
+ myarray.SetValue(c5, 4);
+ myarray.SetValue(c6, 5);
+ Array.Sort(myarray, i1, (IComparer)myarray.GetValue(0));
+ for (int i = 0; i < 6; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The first argument is null reference ");
+
+ try
+ {
+ string[] s1 = null;
+ int[] i1 = { 1, 2, 3, 4, 5 };
+ Array.Sort(s1, i1, null);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The keys array is not one dimension ");
+
+ try
+ {
+ int[,] i1 = new int[2, 3] { { 2, 3, 5 }, { 34, 56, 77 } };
+ int[] i2 = { 1, 2, 3, 4, 5 };
+ Array.Sort(i1, i2, null);
+ TestLibrary.TestFramework.LogError("103", "The RankException is not throw as expected ");
+ retVal = false;
+ }
+ catch (RankException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: The items array is not one dimension ");
+
+ try
+ {
+ int[,] i1 = new int[2, 3] { { 2, 3, 5 }, { 34, 56, 77 } };
+ int[] i2 = { 1, 2, 3, 4, 5 };
+ Array.Sort(i2, i1, null);
+ TestLibrary.TestFramework.LogError("105", "The RankException is not throw as expected ");
+ retVal = false;
+ }
+ catch (RankException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: The length of items array is not equal to the length of keys array");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Tom",
+ "Allin"};
+ int[] i1 = new int[5] { 24, 30, 28, 26, 32 };
+ Array.Sort(s1, i1, null);
+ TestLibrary.TestFramework.LogError("107", "The ArgumentException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: The Icomparer is null and keys array does not implement the IComparer interface ");
+
+ try
+ {
+ D d1 = new D();
+ D d2 = new D();
+ D d3 = new D();
+ D d4 = new D();
+ int[] i2 = { 1, 2, 3, 4 };
+ D[] d = new D[4] { d1, d2, d3, d4 };
+ Array.Sort(d, i2, null);
+ TestLibrary.TestFramework.LogError("109", "The InvalidOperationException is not throw as expected ");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("110", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArrayIndexOf1 test = new ArrayIndexOf1();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayIndexOf1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ class A : IComparer
+ {
+
+ #region IComparer Members
+
+ public int Compare(object x, object y)
+ {
+ return ((int)x).CompareTo((int)y);
+ }
+ #endregion
+ }
+ class B : IComparer
+ {
+
+ #region IComparer Members
+
+ public int Compare(object x, object y)
+ {
+ if (((char)x).CompareTo((char)y) > 0)
+ return -1;
+ else
+ {
+ if (x == y)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+ }
+ }
+ #endregion
+ }
+
+ class C : IComparer
+ {
+ protected int c_value;
+ public C(int a)
+ {
+ this.c_value = a;
+ }
+
+ #region IComparer Members
+
+ public int Compare(object x, object y)
+ {
+ return (x as C).c_value.CompareTo((y as C).c_value);
+ }
+ #endregion
+ }
+
+ class D : IComparer
+ {
+ #region IComparer Members
+
+ public int Compare(object x, object y)
+ {
+ return 0;
+ }
+ #endregion
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraysort3.cs b/tests/src/CoreMangLib/cti/system/array/arraysort3.cs
new file mode 100644
index 0000000000..ddf5ed642d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraysort3.cs
@@ -0,0 +1,275 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ArrayBinarySort2
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_NUM_LOOPS = 50;
+
+ public static int Main()
+ {
+ ArrayBinarySort2 ac = new ArrayBinarySort2();
+
+ TestLibrary.TestFramework.BeginTestCase("Array.Sort(Array, Array, int, int, IComparer)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Array keys;
+ Array items;
+ int length;
+ IComparer myc;
+ byte element;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Array.Sort(Array, Array, int, int, IComparer) ");
+
+ try
+ {
+ myc = new MyComparer();
+
+ for (int j=0; j<c_NUM_LOOPS; j++)
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ keys = Array.CreateInstance(typeof(byte), length);
+ items = Array.CreateInstance(typeof(byte), length);
+
+ // fill the array
+ for (int i=0; i<keys.Length; i++)
+ {
+ keys.SetValue((object)TestLibrary.Generator.GetByte(-55), i);
+ items.SetValue(keys.GetValue(i), i);
+ }
+
+ Array.Sort(keys, items, 0, length, myc);
+
+ // ensure that all the elements are sorted
+ element = (byte)keys.GetValue(0);
+ for(int i=0; i<keys.Length; i++)
+ {
+ if (element > (byte)keys.GetValue(i))
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected key: Element (" + element + ") is greater than (" + (byte)keys.GetValue(i) + ")");
+ retVal = false;
+ }
+ if ((byte)items.GetValue(i) != (byte)keys.GetValue(i))
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected item: Expected(" + (byte)keys.GetValue(i) + ") Actual(" + (byte)items.GetValue(i) + ")");
+ retVal = false;
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Array keys;
+ Array items;
+ int length;
+ IComparer myc;
+ byte element;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Array.Sort(Array, Array, int, int, IComparer) items is null");
+
+ try
+ {
+ myc = new MyComparer();
+
+ for (int j=0; j<c_NUM_LOOPS; j++)
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ keys = Array.CreateInstance(typeof(byte), length);
+ items = null;
+
+ // fill the array
+ for (int i=0; i<keys.Length; i++)
+ {
+ keys.SetValue((object)TestLibrary.Generator.GetByte(-55), i);
+ }
+
+ Array.Sort(keys, items, 0, length, myc);
+
+ // ensure that all the elements are sorted
+ element = (byte)keys.GetValue(0);
+ for(int i=0; i<keys.Length; i++)
+ {
+ if (element > (byte)keys.GetValue(i))
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected key: Element (" + element + ") is greater than (" + (byte)keys.GetValue(i) + ")");
+ retVal = false;
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ Array keys;
+ Array items;
+ IComparer myc;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Array.Sort(Array, Array, int, int, IComparer) keys is null");
+
+ try
+ {
+ keys = null;
+ items = null;
+ myc = new MyComparer();
+
+ Array.Sort(keys, items, 0, 0, myc);
+
+ TestLibrary.TestFramework.LogError("005", "Exception expected.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ Array keys;
+ Array items;
+ IComparer myc;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Array.Sort(Array, Array, int, int, IComparer) length < 0");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ keys = Array.CreateInstance(typeof(byte), length);
+ items = Array.CreateInstance(typeof(byte), length);
+ myc = new MyComparer();
+
+ Array.Sort(keys, items, 0, -1, myc);
+
+ TestLibrary.TestFramework.LogError("007", "Exception expected.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ Array keys;
+ Array items;
+ IComparer myc;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Array.Sort(Array, Array, int, int, IComparer) length too long");
+
+ try
+ {
+ // creat the array
+ length = (TestLibrary.Generator.GetInt32(-55) % (c_MAX_SIZE-c_MIN_SIZE)) + c_MIN_SIZE;
+ keys = Array.CreateInstance(typeof(byte), length);
+ items = Array.CreateInstance(typeof(byte), length);
+ myc = new MyComparer();
+
+ Array.Sort(keys, items, length+10, length, myc);
+
+ TestLibrary.TestFramework.LogError("009", "Exception expected.");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public class MyComparer : IComparer
+ {
+ public int Compare(object obj1, object obj2)
+ {
+
+ if ((byte)obj1 == (byte)obj2) return 0;
+
+ return ((byte)obj1 < (byte)obj2) ? -1 : 1;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraysort3b.cs b/tests/src/CoreMangLib/cti/system/array/arraysort3b.cs
new file mode 100644
index 0000000000..f707be995c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraysort3b.cs
@@ -0,0 +1,570 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Array.Sort(System.Array,System.Array,System.Int32,System.Int32,System.Collections.IComparer)
+/// </summary>
+public class ArrayIndexOf1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Sort a string array using default comparer ");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Tom",
+ "Allin"};
+ int[] i1 = new int[6] { 24, 30, 28, 26, 32, 23 };
+ string[] s2 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Allin",
+ "Peter",
+ "Tom"};
+ int[] i2 = new int[6] { 24, 30, 28, 23, 26, 32 };
+ Array.Sort(s1, i1, 3, 3, null);
+ for (int i = 0; i < 6; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("002", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Sort an int32 array using comparer ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ int[] i1 = new int[length];
+ int[] i2 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ int value = TestLibrary.Generator.GetInt32(-55);
+ i1[i] = value;
+ i2[i] = value;
+ }
+ IComparer a1 = new A();
+ int startIdx = GetInt(0, length - 1);
+ int endIdx = GetInt(startIdx, length - 1);
+ int count = endIdx - startIdx;
+ Array.Sort(i1, i2, startIdx, count, a1);
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("004", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Sort a char array using reverse comparer ");
+
+ try
+ {
+ char[] c1 = new char[10] { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' };
+ char[] d1 = new char[10] { 'a', 'e', 'd', 'c', 'b', 'f', 'g', 'h', 'i', 'j' };
+ int[] a1 = new int[10] { 2, 3, 4, 1, 0, 2, 12, 52, 31, 0 };
+ int[] b1 = new int[10] { 2, 0, 1, 4, 3, 2, 12, 52, 31, 0 };
+ IComparer b = new B();
+ Array.Sort(c1, a1, 1, 4, b);
+ for (int i = 0; i < 10; i++)
+ {
+ if (c1[i] != d1[i])
+ {
+ TestLibrary.TestFramework.LogError("006", "The result is not the value as expected");
+ retVal = false;
+ }
+ if (a1[i] != b1[i])
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Sort an int array and the items array is null ");
+
+ try
+ {
+ int length = (int) TestLibrary.Generator.GetByte(-55);
+ int[] i1 = new int[length];
+ int[] i2 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ int value = TestLibrary.Generator.GetByte(-55);
+ i1[i] = value;
+ i2[i] = value;
+ }
+ int startIdx = GetInt(0, length - 2);
+ int endIdx = GetInt(startIdx, length - 1);
+ int count = endIdx - startIdx + 1;
+ for (int i = startIdx; i < endIdx; i++) //manually quich sort
+ {
+ for (int j = i + 1; j <= endIdx; j++)
+ {
+ if (i2[i] > i2[j])
+ {
+ int temp = i2[i];
+ i2[i] = i2[j];
+ i2[j] = temp;
+ }
+ }
+ }
+ Array.Sort(i1, null, startIdx, count, new A());
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The first argument is null reference ");
+
+ try
+ {
+ string[] s1 = null;
+ int[] i1 = { 1, 2, 3, 4, 5 };
+ Array.Sort(s1, i1, 0, 2, null);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The keys array is not one dimension ");
+
+ try
+ {
+ int[,] i1 = new int[2, 3] { { 2, 3, 5 }, { 34, 56, 77 } };
+ int[] i2 = { 1, 2, 3, 4, 5 };
+ Array.Sort(i1, i2, 0, 3, null);
+ TestLibrary.TestFramework.LogError("103", "The RankException is not throw as expected ");
+ retVal = false;
+ }
+ catch (RankException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: The items array is not one dimension ");
+
+ try
+ {
+ int[,] i1 = new int[2, 3] { { 2, 3, 5 }, { 34, 56, 77 } };
+ int[] i2 = { 1, 2, 3, 4, 5 };
+ Array.Sort(i2, i1, 0, 2, null);
+ TestLibrary.TestFramework.LogError("105", "The RankException is not throw as expected ");
+ retVal = false;
+ }
+ catch (RankException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4:The length of items array is not equal to the length of keys array ");
+
+ try
+ {
+ int length_array = TestLibrary.Generator.GetInt16(-55);
+ int length_value = TestLibrary.Generator.GetByte(-55);
+ string[] s1 = new string[length_array];
+ int[] i1 = new int[length_value];
+ for (int i = 0; i < length_array; i++)
+ {
+ string value = TestLibrary.Generator.GetString(-55, false, 0, 10);
+ s1[i] = value;
+ }
+ for (int i = 0; i < length_value; i++)
+ {
+ int value = TestLibrary.Generator.GetInt32(-55);
+ i1[i] = value;
+ }
+ int startIdx = GetInt(0, 255);
+ int count = GetInt(256, length_array - 1);
+ Array.Sort(s1, i1, startIdx, count, null);
+ TestLibrary.TestFramework.LogError("107", "The ArgumentException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: The Icomparer is null and keys array does not implement the IComparer interface ");
+
+ try
+ {
+ D d1 = new D();
+ D d2 = new D();
+ D d3 = new D();
+ D d4 = new D();
+ int[] i2 = { 1, 2, 3, 4 };
+ D[] d = new D[4] { d1, d2, d3, d4 };
+ Array.Sort(d, i2, 1, 3, null);
+ TestLibrary.TestFramework.LogError("109", "The InvalidOperationException is not throw as expected ");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("110", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: The start index is less than the minimal bound of the array");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Peter",
+ "Mike",
+ "Tom",
+ "Allin"};
+ int[] i1 = new int[6] { 24, 30, 28, 26, 32, 44 };
+ Array.Sort(s1, i1, -1, 4, null);
+ TestLibrary.TestFramework.LogError("111", "The ArgumentOutOfRangeException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("112", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest7: The length is less than zero");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Peter",
+ "Mike",
+ "Tom",
+ "Allin"};
+ int[] i1 = new int[6] { 24, 30, 28, 26, 32, 44 };
+ Array.Sort(s1, i1, 3, -1, null);
+ TestLibrary.TestFramework.LogError("111", "The ArgumentOutOfRangeException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("112", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest8()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest8:The start index is greater than the max bound of the array");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55);
+ string[] s1 = new string[length];
+ int[] i1 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ string value1 = TestLibrary.Generator.GetString(-55, false, 0, 10);
+ int value2 = TestLibrary.Generator.GetInt32(-55);
+ s1[i] = value1;
+ i1[i] = value2;
+ }
+ Array.Sort(s1, i1, length + 1, 0, null);
+ TestLibrary.TestFramework.LogError("113", "The ArgumentException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("114", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArrayIndexOf1 test = new ArrayIndexOf1();
+
+ TestLibrary.TestFramework.BeginTestCase("ArrayIndexOf1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ class A : IComparer
+ {
+
+ #region IComparer Members
+
+ public int Compare(object x, object y)
+ {
+ return ((int)x).CompareTo((int)y);
+ }
+ #endregion
+ }
+ class B : IComparer
+ {
+
+ #region IComparer Members
+
+ public int Compare(object x, object y)
+ {
+ if (((char)x).CompareTo((char)y) > 0)
+ return -1;
+ else
+ {
+ if (x == y)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+ }
+ }
+ #endregion
+ }
+
+ class C : IComparer
+ {
+ protected int c_value;
+ public C(int a)
+ {
+ this.c_value = a;
+ }
+
+ #region IComparer Members
+
+ public int Compare(object x, object y)
+ {
+ return (x as C).c_value.CompareTo((y as C).c_value);
+ }
+ #endregion
+ }
+
+ class D : IComparer
+ {
+ #region IComparer Members
+
+ public int Compare(object x, object y)
+ {
+ return 0;
+ }
+ #endregion
+ }
+ #region Help method for geting test data
+
+ private Int32 GetInt(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraysort4.cs b/tests/src/CoreMangLib/cti/system/array/arraysort4.cs
new file mode 100644
index 0000000000..2bb402cdb5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraysort4.cs
@@ -0,0 +1,449 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// Array.Sort(System.Array,System.Collections.IComparer)
+/// </summary>
+public class ArraySort4
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Sort a string array using string comparer ");
+
+ try
+ {
+ string[] s1 = new string[7]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Boy",
+ "Tom",
+ "Allin"};
+ IComparer a = new A();
+ Array.Sort(s1, a);
+ string[] s2 = new string[7]{"Allin",
+ "Boy",
+ "Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Tom"};
+ for (int i = 0; i < 7; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Sort an int32 array using reverse comparer ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55);
+ TestLibrary.TestFramework.LogInformation("Using random length: " + length);
+ int[] i1 = new int[length];
+ int[] i2 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ int value = TestLibrary.Generator.GetByte(-55);
+ i1[i] = value;
+ i2[i] = value;
+ }
+ IComparer b = new B();
+ Array.Sort(i1, b);
+ for (int i = 0; i < length - 1; i++) //manually quich sort
+ {
+ for (int j = i + 1; j < length; j++)
+ {
+ if (i2[i] < i2[j])
+ {
+ int temp = i2[i];
+ i2[i] = i2[j];
+ i2[j] = temp;
+ }
+ }
+ }
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Sort a char array using default comparer ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55);
+ char[] i1 = new char[length];
+ char[] i2 = new char[length];
+ for (int i = 0; i < length; i++)
+ {
+ char value = TestLibrary.Generator.GetChar(-55);
+ i1[i] = value;
+ i2[i] = value;
+ }
+ IComparer c = null;
+ Array.Sort(i1, c);
+ for (int i = 0; i < length - 1; i++) //manually quich sort
+ {
+ for (int j = i + 1; j < length; j++)
+ {
+ if (i2[i] > i2[j])
+ {
+ char temp = i2[i];
+ i2[i] = i2[j];
+ i2[j] = temp;
+ }
+ }
+ }
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Sort an array which has same elements ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ string[] s1 = new string[length];
+ string[] s2 = new string[length];
+ string value = TestLibrary.Generator.GetString(-55, false, 0, 10);
+ for (int i = 0; i < length; i++)
+ {
+ s1[i] = value;
+ s2[i] = value;
+ }
+ IComparer c = null;
+ Array.Sort(s1, c);
+ for (int i = 0; i < length; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Sort a string array including null reference and using customized comparer interface");
+
+ try
+ {
+ string[] s1 = new string[9]{"Jack",
+ "Mary",
+ "Mike",
+ null,
+ "Peter",
+ "Boy",
+ "Tom",
+ null,
+ "Allin"};
+ IComparer d = new D();
+ Array.Sort(s1, d);
+ string[] s2 = new string[9]{"Allin",
+ "Boy",
+ "Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Tom",
+ null,
+ null};
+ for (int i = 0; i < 7; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6:The implementation of comparer caused an error during the sort");
+
+ try
+ {
+ int[] i1 = new int[9] { 2, 34, 56, 87, 34, 23, 209, 34, 87 };
+ IComparer f = new F();
+ Array.Sort(i1, f);
+
+ for(int i=1; i<i1.Length; i++)
+ {
+ if (i1[i-1] > i1[i])
+ {
+ TestLibrary.TestFramework.LogError("107", "The " + i + " element in the array is out of order: [i-1]=" + i1[i-1] + " [i]="+i1[i]);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The array is null ");
+
+ try
+ {
+ string[] s1 = null;
+ IComparer a = new A();
+ Array.Sort(s1, a);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The array is not one dimension ");
+
+ try
+ {
+ int[,] i1 = new int[2, 3] { { 2, 3, 5 }, { 34, 56, 77 } };
+ IComparer a = new A();
+ Array.Sort(i1, a);
+ TestLibrary.TestFramework.LogError("103", "The RankException is not throw as expected ");
+ retVal = false;
+ }
+ catch (RankException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Elements in array do not implement the IComparable interface ");
+
+ try
+ {
+ E[] a1 = new E[4] { new E(), new E(), new E(), new E() };
+ IComparer d = null;
+ Array.Sort(a1,d);
+ TestLibrary.TestFramework.LogError("105", "The InvalidOperationException is not throw as expected ");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArraySort4 test = new ArraySort4();
+
+ TestLibrary.TestFramework.BeginTestCase("ArraySort4");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ class A : IComparer
+ {
+
+ #region IComparer Members
+
+ public int Compare(object x, object y)
+ {
+ return ((string)x).CompareTo((string)y);
+ }
+ #endregion
+ }
+
+ class B : IComparer
+ {
+
+ #region IComparer Members
+
+ public int Compare(object x, object y)
+ {
+ return (-((int)x).CompareTo((int)y));
+ }
+ #endregion
+ }
+
+ class D : IComparer
+ {
+
+ #region IComparer Members
+
+ public int Compare(object x, object y)
+ {
+ if (x == null)
+ {
+ return 1;
+ }
+ if (y == null)
+ return -1;
+
+ return ((string)x).CompareTo((string)y);
+ }
+ #endregion
+ }
+
+ class E
+ {
+ public E() { }
+ }
+
+ class F : IComparer
+ {
+ public int Compare(object x, object y)
+ {
+ int a = (int)x;
+ int b = (int)y;
+ return a > b ? 1 : (-1);
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraysort5.cs b/tests/src/CoreMangLib/cti/system/array/arraysort5.cs
new file mode 100644
index 0000000000..d4566038ca
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraysort5.cs
@@ -0,0 +1,557 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Array.Sort(System.Array,System.Int32,System.Int32,System.Collections.IComparer)
+/// </summary>
+public class ArraySort5
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest8() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Sort a string array using default comparer ");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Tom",
+ "Allin"};
+ string[] s2 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Allin",
+ "Peter",
+ "Tom"};
+ Array.Sort(s1, 3, 3, null);
+ for (int i = 0; i < 6; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Sort an int32 array using comparer ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ int[] i1 = new int[length];
+ int[] i2 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ int value = TestLibrary.Generator.GetByte(-55);
+ i1[i] = value;
+ i2[i] = value;
+ }
+ IComparer a1 = new A();
+ int startIdx = GetInt(0, length - 2);
+ int endIdx = GetInt(startIdx, length - 1);
+ int count = length == 0 ? length : endIdx - startIdx + 1;
+ Array.Sort(i1, startIdx, count, a1);
+ for (int i = startIdx; i < endIdx; i++) //manually quich sort
+ {
+ for (int j = i + 1; j <= endIdx; j++)
+ {
+ if (i2[i] > i2[j])
+ {
+ int temp = i2[i];
+ i2[i] = i2[j];
+ i2[j] = temp;
+ }
+ }
+ }
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,the start index is:" + startIdx.ToString() + "the end index is:" + endIdx.ToString());
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Sort a char array using reverse comparer ");
+
+ try
+ {
+ char[] c1 = new char[10] { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' };
+ char[] d1 = new char[10] { 'a', 'e', 'd', 'c', 'b', 'f', 'g', 'h', 'i', 'j' };
+ IComparer b = new B();
+ Array.Sort(c1, 1, 4, b);
+ for (int i = 0; i < 10; i++)
+ {
+ if (c1[i] != d1[i])
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Sort an int array from the minimal index to the maximal index of the array ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55);
+ int[] i1 = new int[length];
+ int[] i2 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ int value = TestLibrary.Generator.GetByte(-55);
+ i1[i] = value;
+ i2[i] = value;
+ }
+ int startIdx = 0;
+ int count = length;
+ Array.Sort(i1, startIdx, count, new A());
+ Array.Sort(i2, new A());
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("007", string.Format("The result is not the value as expected, the length is:{0}", length));
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5:The implementation of comparer caused an error during the sort");
+
+ try
+ {
+ int[] i1 = new int[9] { 2, 34, 56, 87, 34, 23, 209, 34, 87 };
+ IComparer f = new F();
+ Array.Sort(i1, 0, 9, f);
+ for(int i=1; i<i1.Length; i++)
+ {
+ if (i1[i-1] > i1[i])
+ {
+ TestLibrary.TestFramework.LogError("107", "The " + i + " element in the array is out of order: [i-1]=" + i1[i-1] + " [i]="+i1[i]);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("114", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The array to be sorted is null reference ");
+
+ try
+ {
+ string[] s1 = null;
+ Array.Sort(s1, 0, 2, null);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The array is not one dimension ");
+
+ try
+ {
+ int[,] i1 = new int[2, 3] { { 2, 3, 5 }, { 34, 56, 77 } };
+ Array.Sort(i1, 0, 3, null);
+ TestLibrary.TestFramework.LogError("103", "The RankException is not throw as expected ");
+ retVal = false;
+ }
+ catch (RankException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: The start index is less than the minimal bound of the array");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Peter",
+ "Mike",
+ "Tom",
+ "Allin"};
+ Array.Sort(s1, -1, 4, null);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentOutOfRangeException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: Length is less than zero");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Peter",
+ "Mike",
+ "Tom",
+ "Allin"};
+ Array.Sort(s1, 3, -3, null);
+ TestLibrary.TestFramework.LogError("107", "The ArgumentOutOfRangeException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: The start index is greater than the maximal range of the array");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ string[] s1 = new string[length];
+ for (int i = 0; i < length; i++)
+ {
+ string value = TestLibrary.Generator.GetString(-55, false, 0, 10);
+ s1[i] = value;
+ }
+ int startIdx = GetInt(1, Byte.MaxValue);
+ int increment = length;
+ Array.Sort(s1, startIdx + increment, 0, null);
+ TestLibrary.TestFramework.LogError("109", "The ArgumentException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("110", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: The start index and length do not specify a valid range in array. ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ string[] s1 = new string[length];
+ for (int i = 0; i < length; i++)
+ {
+ string value = TestLibrary.Generator.GetString(-55, false, 0, 10);
+ s1[i] = value;
+ }
+ int startIdx = GetInt(1, length - 1);
+ int count = length;
+ Array.Sort(s1, startIdx, count, null);
+ TestLibrary.TestFramework.LogError("111", "The ArgumentException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("112", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest8()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest8: Elements in array do not implement the IComparable interface ");
+
+ try
+ {
+ E[] a1 = new E[4] { new E(), new E(), new E(), new E() };
+ IComparer d = null;
+ Array.Sort(a1, 0, 4, d);
+ TestLibrary.TestFramework.LogError("115", "The InvalidOperationException is not throw as expected ");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("116", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArraySort5 test = new ArraySort5();
+
+ TestLibrary.TestFramework.BeginTestCase("ArraySort5");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ class A : IComparer
+ {
+
+ #region IComparer Members
+
+ public int Compare(object x, object y)
+ {
+ return ((int)x).CompareTo((int)y);
+ }
+ #endregion
+ }
+ class B : IComparer
+ {
+
+ #region IComparer Members
+
+ public int Compare(object x, object y)
+ {
+ if (((char)x).CompareTo((char)y) > 0)
+ return -1;
+ else
+ {
+ if (x == y)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+ }
+ }
+ #endregion
+ }
+
+ class C : IComparer
+ {
+ protected int c_value;
+ public C(int a)
+ {
+ this.c_value = a;
+ }
+
+ #region IComparer Members
+
+ public int Compare(object x, object y)
+ {
+ return (x as C).c_value.CompareTo((y as C).c_value);
+ }
+ #endregion
+ }
+
+ class D : IComparer
+ {
+ #region IComparer Members
+
+ public int Compare(object x, object y)
+ {
+ return 0;
+ }
+ #endregion
+ }
+
+ class E
+ {
+ public E() { }
+ }
+
+ class F : IComparer
+ {
+ public int Compare(object x, object y)
+ {
+ int a = (int)x;
+ int b = (int)y;
+ return a > b ? 1 : (-1);
+ }
+ }
+ #region Help method for geting test data
+
+ private Int32 GetInt(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraysort6.cs b/tests/src/CoreMangLib/cti/system/array/arraysort6.cs
new file mode 100644
index 0000000000..7e53405056
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraysort6.cs
@@ -0,0 +1,374 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Array.Sort (T[])
+/// </summary>
+public class ArraySort6
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Sort a string array");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Tom",
+ "Allin"};
+ string[] s2 = new string[]{"Allin",
+ "Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Tom"};
+ Array.Sort<string>(s1);
+ for (int i = 0; i < 6; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Sort an int32 array");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ int[] i1 = new int[length];
+ int[] i2 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ int value = TestLibrary.Generator.GetInt32(-55);
+ i1[i] = value;
+ i2[i] = value;
+ }
+ Array.Sort<int>(i1);
+ for (int i = 0; i < length - 1; i++) //manually quich sort
+ {
+ for (int j = i + 1; j < length; j++)
+ {
+ if (i2[i] > i2[j])
+ {
+ int temp = i2[i];
+ i2[i] = i2[j];
+ i2[j] = temp;
+ }
+ }
+ }
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Sort a char array ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55);
+ char[] c1 = new char[length];
+ char[] c2 = new char[length];
+ for (int i = 0; i < length; i++)
+ {
+ char value = TestLibrary.Generator.GetChar(-55);
+ c1[i] = value;
+ c2[i] = value;
+ }
+ Array.Sort<char>(c1);
+ for (int i = 0; i < length - 1; i++) //manually quich sort
+ {
+ for (int j = i + 1; j < length; j++)
+ {
+ if (c2[i] > c2[j])
+ {
+ char temp = c2[i];
+ c2[i] = c2[j];
+ c2[j] = temp;
+ }
+ }
+ }
+ for (int i = 0; i < length; i++)
+ {
+ if (c1[i] != c2[i])
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Sort a string array including null reference ");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ null,
+ "Peter",
+ "Tom",
+ "Allin"};
+ string[] s2 = new string[]{null,
+ "Allin",
+ "Jack",
+ "Mary",
+ "Peter",
+ "Tom"};
+ Array.Sort<string>(s1);
+ for (int i = 0; i < 6; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Sort customized type array");
+
+ try
+ {
+ C[] c_array = new C[5];
+ C[] c_result = new C[5];
+ for (int i = 0; i < 5; i++)
+ {
+ int value = TestLibrary.Generator.GetInt32(-55);
+ C c1 = new C(value);
+ c_array.SetValue(c1, i);
+ c_result.SetValue(c1, i);
+ }
+ //sort manually
+ C temp;
+ for (int j = 0; j < 4; j++)
+ {
+ for (int i = 0; i < 4; i++)
+ {
+ if (c_result[i].c > c_result[i + 1].c)
+ {
+ temp = c_result[i];
+ c_result[i] = c_result[i + 1];
+ c_result[i + 1] = temp;
+ }
+ }
+ }
+ Array.Sort<C>(c_array);
+ for (int i = 0; i < 5; i++)
+ {
+ if (c_result[i].c != c_array[i].c)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The array is null ");
+
+ try
+ {
+ string[] s1 = null;
+ Array.Sort<string>(s1);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: One or more elements in array do not implement the IComparable interface");
+
+ try
+ {
+ A<int>[] i1 = new A<int>[5] { new A<int>(7), new A<int>(99), new A<int>(-23), new A<int>(0), new A<int>(345) };
+ Array.Sort<A<int>>(i1);
+ TestLibrary.TestFramework.LogError("103", "The InvalidOperationException is not throw as expected ");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArraySort6 test = new ArraySort6();
+
+ TestLibrary.TestFramework.BeginTestCase("ArraySort6");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ class C : IComparable
+ {
+ protected int c_value;
+ public C(int a)
+ {
+ this.c_value = a;
+ }
+ public int c
+ {
+ get
+ {
+ return c_value;
+ }
+ }
+ #region IComparable Members
+
+ public int CompareTo(object obj)
+ {
+ if (this.c_value <= ((C)obj).c)
+ {
+ return -1;
+ }
+ else
+ {
+ return 1;
+ }
+ }
+
+ #endregion
+ }
+
+ class A<T>
+ {
+ protected T a_value;
+ public A(T a)
+ {
+ this.a_value = a;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraysort7.cs b/tests/src/CoreMangLib/cti/system/array/arraysort7.cs
new file mode 100644
index 0000000000..eae90a98e6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraysort7.cs
@@ -0,0 +1,425 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Array.Sort<T>(T[],System.Collections.Generic.IComparer<T>)
+/// </summary>
+public class ArraySort7
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ //Bug 385712: Won’t fix
+ //retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Sort a string array using string comparer<string>");
+
+ try
+ {
+ string[] s1 = new string[7]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Boy",
+ "Tom",
+ "Allin"};
+ IComparer<string> a = new A<string>();
+ Array.Sort<string>(s1, a);
+ string[] s2 = new string[7]{"Allin",
+ "Boy",
+ "Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Tom"};
+ for (int i = 0; i < 7; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Sort an int32 array using reverse comparer<int>");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55);
+ int[] i1 = new int[length];
+ int[] i2 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ int value = TestLibrary.Generator.GetByte(-55);
+ i1[i] = value;
+ i2[i] = value;
+ }
+ IComparer<int> b = new B<int>();
+ Array.Sort<int>(i1, b);
+ for (int i = 0; i < length - 1; i++) //manually quich sort
+ {
+ for (int j = i + 1; j < length; j++)
+ {
+ if (i2[i] < i2[j])
+ {
+ int temp = i2[i];
+ i2[i] = i2[j];
+ i2[j] = temp;
+ }
+ }
+ }
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Sort a char array using default comparer ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55);
+ char[] i1 = new char[length];
+ char[] i2 = new char[length];
+ for (int i = 0; i < length; i++)
+ {
+ char value = TestLibrary.Generator.GetChar(-55);
+ i1[i] = value;
+ i2[i] = value;
+ }
+ IComparer<char> c = null;
+ Array.Sort<char>(i1, c);
+ for (int i = 0; i < length - 1; i++) //manually quich sort
+ {
+ for (int j = i + 1; j < length; j++)
+ {
+ if (i2[i] > i2[j])
+ {
+ char temp = i2[i];
+ i2[i] = i2[j];
+ i2[j] = temp;
+ }
+ }
+ }
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Sort an array which has same elements using default Icomparer ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ string[] s1 = new string[length];
+ string[] s2 = new string[length];
+ string value = TestLibrary.Generator.GetString(-55, false, 0, 10);
+ for (int i = 0; i < length; i++)
+ {
+ s1[i] = value;
+ s2[i] = value;
+ }
+ IComparer<string> c = null;
+ Array.Sort<string>(s1, c);
+ for (int i = 0; i < length; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Sort a string array including null reference and using customized comparer<T> interface");
+
+ try
+ {
+ string[] s1 = new string[9]{"Jack",
+ "Mary",
+ "Mike",
+ null,
+ "Peter",
+ "Boy",
+ "Tom",
+ null,
+ "Allin"};
+ IComparer<string> d = new D<string>();
+ Array.Sort<string>(s1, d);
+ string[] s2 = new string[9]{"Allin",
+ "Boy",
+ "Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Tom",
+ null,
+ null};
+ for (int i = 0; i < 7; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The array is null ");
+
+ try
+ {
+ string[] s1 = null;
+ IComparer<string> a = new A<string>();
+ Array.Sort<string>(s1, a);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Elements in array do not implement the IComparable<T> interface ");
+
+ try
+ {
+ E<int>[] a1 = new E<int>[4] { new E<int>(), new E<int>(), new E<int>(), new E<int>() };
+ IComparer<E<int>> d = null;
+ Array.Sort<E<int>>(a1, d);
+ TestLibrary.TestFramework.LogError("103", "The InvalidOperationException is not throw as expected ");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3:The implementation of comparer<T> caused an error during the sort");
+
+ try
+ {
+ int[] i1 = new int[9] { 2, 34, 56, 87, 34, 23, 209, 34, 87 };
+ F f = new F();
+ Array.Sort<int>(i1, f);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArraySort7 test = new ArraySort7();
+
+ TestLibrary.TestFramework.BeginTestCase("ArraySort7");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ class A<T> : IComparer<T> where T : IComparable
+ {
+
+ #region IComparer Members
+
+ public int Compare(T x, T y)
+ {
+ return x.CompareTo(y);
+ }
+ #endregion
+ }
+
+ class B<T> : IComparer<T> where T : IComparable
+ {
+
+ #region IComparer Members
+
+ public int Compare(T x, T y)
+ {
+ return (-(x).CompareTo(y));
+ }
+ #endregion
+ }
+
+ class D<T> : IComparer<T> where T : IComparable
+ {
+
+ #region IComparer Members
+
+ public int Compare(T x, T y)
+ {
+ if (x == null)
+ {
+ return 1;
+ }
+ if (y == null)
+ {
+ return -1;
+ }
+
+ return x.CompareTo(y);
+ }
+ #endregion
+ }
+ class E<T>
+ {
+ public E() { }
+ }
+
+ class F : IComparer<int>
+ {
+
+
+ #region IComparer<int> Members
+
+ int IComparer<int>.Compare(int a, int b)
+ {
+ if (a.CompareTo(a) == 0)
+ {
+ return -1;
+ }
+
+ return a.CompareTo(b);
+
+ }
+
+ #endregion
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraysort8.cs b/tests/src/CoreMangLib/cti/system/array/arraysort8.cs
new file mode 100644
index 0000000000..afb83ce9ef
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraysort8.cs
@@ -0,0 +1,400 @@
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Array.Sort<T>(T[],System.Comparison<T>)
+/// </summary>
+public class ArraySort8
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ //Bug 385712: Won’t fix
+ //retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Sort a string array including null reference and using customized comparison delegate ");
+
+ try
+ {
+ string[] s1 = new string[9]{"Jack",
+ "Mary",
+ "Mike",
+ null,
+ "Peter",
+ "Boy",
+ "Tom",
+ null,
+ "Allin"};
+ string[] s2 = new string[9]{"Allin",
+ "Boy",
+ "Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Tom",
+ null,
+ null};
+ Array.Sort<string>(s1, this.M1_compare);
+ for (int i = 0; i < 7; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Sort an int32 array using reverse comparison delegate ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetInt16(-55);
+ int[] i1 = new int[length];
+ int[] i2 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ int value = TestLibrary.Generator.GetByte(-55);
+ i1[i] = value;
+ i2[i] = value;
+ }
+ Array.Sort<int>(i1, ArraySort8.M2_compare);
+ for (int i = 0; i < length - 1; i++) //manually quich sort
+ {
+ for (int j = i + 1; j < length; j++)
+ {
+ if (i2[i] < i2[j])
+ {
+ int temp = i2[i];
+ i2[i] = i2[j];
+ i2[j] = temp;
+ }
+ }
+ }
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Sort an array which has same elements ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ string[] s1 = new string[length];
+ string[] s2 = new string[length];
+ string value = TestLibrary.Generator.GetString(-55, false, 0, 10);
+ for (int i = 0; i < length; i++)
+ {
+ s1[i] = value;
+ s2[i] = value;
+ }
+ Array.Sort<string>(s1, this.M1_compare);
+ for (int i = 0; i < length; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Sort customized type array using customized comparison");
+
+ try
+ {
+ C[] c_array = new C[5];
+ C[] c_result = new C[5];
+ for (int i = 0; i < 5; i++)
+ {
+
+ int value = TestLibrary.Generator.GetInt32(-55);
+ C c1 = new C(value);
+ c_array.SetValue(c1, i);
+ c_result.SetValue(c1, i);
+ }
+ //sort manually
+ C temp;
+ for (int j = 0; j < 4; j++)
+ {
+ for (int i = 0; i < 4; i++)
+ {
+ if (c_result[i].value > c_result[i + 1].value)
+ {
+ temp = c_result[i];
+ c_result[i] = c_result[i + 1];
+ c_result[i + 1] = temp;
+ }
+ }
+ }
+ Array.Sort<C>(c_array, ArraySort8.M3_compare);
+ for (int i = 0; i < 5; i++)
+ {
+ if (c_result[i].value != c_array[i].value)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The array is null ");
+
+ try
+ {
+ string[] s1 = null;
+ Array.Sort<string>(s1, this.M1_compare);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The comparison is null");
+
+ try
+ {
+ string[] s1 = new string[7]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Boy",
+ "Tom",
+ "Allin"};
+ Array.Sort<string>(s1, (Comparison<string>)null);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentNullException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: The implementation of comparison caused an error during the sort");
+
+ try
+ {
+ string[] s1 = new string[7]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Boy",
+ "Tom",
+ "Allin"};
+ Array.Sort<string>(s1, this.M4_compare);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArraySort8 test = new ArraySort8();
+
+ TestLibrary.TestFramework.BeginTestCase("ArraySort8");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ private int M1_compare(string s1, string s2)
+ {
+ if (s1 == null)
+ {
+ if (s2 == null)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+ }
+ else
+ {
+ if (s2 == null)
+ {
+ return -1;
+ }
+ }
+ return s1.CompareTo(s2);
+ }
+
+ private static int M2_compare(int s1, int s2)
+ {
+ return -(s1.CompareTo(s2));
+ }
+
+ private static int M3_compare(C s1, C s2)
+ {
+ if (s1 == null)
+ {
+ if (s2 == null)
+ {
+ return 0;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+ else
+ {
+ if (s2 == null)
+ {
+ return 1;
+ }
+ }
+ return s1.value.CompareTo(s2.value);
+ }
+
+ private int M4_compare(string s1, string s2)
+ {
+ if (s1.CompareTo(s1) == 0)
+ {
+ return -1;
+ }
+ return s1.CompareTo(s2);
+ }
+
+ class C
+ {
+ protected int c_value;
+ public C(int a)
+ {
+ this.c_value = a;
+ }
+ public int value
+ {
+ get
+ {
+ return c_value;
+ }
+ }
+
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/array/arraysort9.cs b/tests/src/CoreMangLib/cti/system/array/arraysort9.cs
new file mode 100644
index 0000000000..b022c34360
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/array/arraysort9.cs
@@ -0,0 +1,470 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Array.Sort<T>(T[],System.Int32,System.Int32)
+/// </summary>
+public class ArraySort9
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Sort a string array using generics ");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Peter",
+ "Tom",
+ "Allin"};
+ string[] s2 = new string[6]{"Jack",
+ "Mary",
+ "Mike",
+ "Allin",
+ "Peter",
+ "Tom"};
+ Array.Sort<string>(s1, 3, 3);
+ for (int i = 0; i < 6; i++)
+ {
+ if (s1[i] != s2[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Sort an int32 array using generics");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55) + 1;
+ int[] i1 = new int[length];
+ int[] i2 = new int[length];
+ for (int i = 0; i < length; i++)
+ {
+ int value = TestLibrary.Generator.GetByte(-55);
+ i1[i] = value;
+ i2[i] = value;
+ }
+ int startIdx = GetInt(0, length - 2);
+ int endIdx = GetInt(startIdx, length - 1);
+ int count = endIdx - startIdx + 1;
+
+ Array.Sort<int>(i1, startIdx, count);
+ for (int i = startIdx; i < endIdx; i++) //manually quich sort
+ {
+ for (int j = i + 1; j <= endIdx; j++)
+ {
+ if (i2[i] > i2[j])
+ {
+ int temp = i2[i];
+ i2[i] = i2[j];
+ i2[j] = temp;
+ }
+ }
+ }
+ for (int i = 0; i < length; i++)
+ {
+ if (i1[i] != i2[i])
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,the start index is:" + startIdx.ToString() + "the end index is:" + endIdx.ToString());
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Sort a char array from the minimal index to the maximal index of the array ");
+
+ try
+ {
+ char[] c1 = new char[10] { 'j', 'h', 'g', 'i', 'f', 'e', 'c', 'd', 'a', 'b' };
+ char[] d1 = new char[10] { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' };
+ Array.Sort<char>(c1, 0, c1.Length);
+ for (int i = 0; i < 10; i++)
+ {
+ if (c1[i] != d1[i])
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Sort customized type array using default customized comparer");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ C[] c_array = new C[length];
+ C[] c_result = new C[length];
+ for (int i = 0; i < length; i++)
+ {
+ int value = TestLibrary.Generator.GetInt32(-55);
+ C c1 = new C(value);
+ c_array.SetValue(c1, i);
+ c_result.SetValue(c1, i);
+ }
+ //sort manually
+ C temp;
+ for (int j = 0; j < length - 1; j++)
+ {
+ for (int i = 0; i < length - 1; i++)
+ {
+ if (c_result[i].value < c_result[i + 1].value)
+ {
+ temp = c_result[i];
+ c_result[i] = c_result[i + 1];
+ c_result[i + 1] = temp;
+ }
+ }
+ }
+ Array.Sort<C>(c_array, 0, length);
+ for (int i = 0; i < length; i++)
+ {
+ if (c_result[i].value != c_array[i].value)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The array is null ");
+
+ try
+ {
+ string[] s1 = null;
+ Array.Sort<string>(s1, 0, 5);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The start index is less than the minimal bound of the array");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Peter",
+ "Mike",
+ "Tom",
+ "Allin"};
+ Array.Sort<string>(s1, -1, 4);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: The length is less than zero");
+
+ try
+ {
+ string[] s1 = new string[6]{"Jack",
+ "Mary",
+ "Peter",
+ "Mike",
+ "Tom",
+ "Allin"};
+ Array.Sort<string>(s1, 1, -4);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentOutOfRangeException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: The start index is greater than the maximal range of the array");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ string[] s1 = new string[length];
+ for (int i = 0; i < length; i++)
+ {
+ string value = TestLibrary.Generator.GetString(-55, false, 0, 10);
+ s1[i] = value;
+ }
+ int startIdx = GetInt(0, Byte.MaxValue);
+ int increment = length;
+ Array.Sort<string>(s1, startIdx + increment, 3);
+ TestLibrary.TestFramework.LogError("107", "The ArgumentException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: Elements in array do not implement the IComparable interface ");
+
+ try
+ {
+ E[] a1 = new E[4] { new E(), new E(), new E(), new E() };
+ Array.Sort<E>(a1, 0, 4);
+ TestLibrary.TestFramework.LogError("109", "The InvalidOperationException is not throw as expected ");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("110", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: The index argument is valid, but the length argument is too large for that index. ");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ string[] s1 = new string[length];
+ for (int i = 0; i < length; i++)
+ {
+ string value = TestLibrary.Generator.GetString(-55, false, 0, 10);
+ s1[i] = value;
+ }
+ int startIdx = GetInt(0, length - 1);
+ int count = GetInt(length + 1, TestLibrary.Generator.GetByte(-55));
+ Array.Sort<string>(s1, startIdx, count);
+ TestLibrary.TestFramework.LogError("11", "The ArgumentException is not throw as expected ");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("112", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ArraySort9 test = new ArraySort9();
+
+ TestLibrary.TestFramework.BeginTestCase("ArraySort9");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ class C : IComparable
+ {
+ private int c_value;
+ public C(int a)
+ {
+ this.c_value = a;
+ }
+ public int value
+ {
+ get
+ {
+ return c_value;
+ }
+ }
+ #region IComparable Members
+
+ public int CompareTo(object obj)
+ {
+ if (this.c_value <= ((C)obj).c_value)
+ {
+ return 1;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ #endregion
+ }
+ class E
+ {
+ public E() { }
+ }
+
+ #region Help method for geting test data
+
+ private Int32 GetInt(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/arraytypemismatchexception/ArrayTypeMismatchExceptionctor1.csproj b/tests/src/CoreMangLib/cti/system/arraytypemismatchexception/ArrayTypeMismatchExceptionctor1.csproj
new file mode 100644
index 0000000000..a8c8ab8a4f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/arraytypemismatchexception/ArrayTypeMismatchExceptionctor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraytypemismatchexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/arraytypemismatchexception/ArrayTypeMismatchExceptionctor2.csproj b/tests/src/CoreMangLib/cti/system/arraytypemismatchexception/ArrayTypeMismatchExceptionctor2.csproj
new file mode 100644
index 0000000000..1126a47bd6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/arraytypemismatchexception/ArrayTypeMismatchExceptionctor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraytypemismatchexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/arraytypemismatchexception/ArrayTypeMismatchExceptionctor3.csproj b/tests/src/CoreMangLib/cti/system/arraytypemismatchexception/ArrayTypeMismatchExceptionctor3.csproj
new file mode 100644
index 0000000000..fe0b554b10
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/arraytypemismatchexception/ArrayTypeMismatchExceptionctor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="arraytypemismatchexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/arraytypemismatchexception/arraytypemismatchexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/arraytypemismatchexception/arraytypemismatchexceptionctor1.cs
new file mode 100644
index 0000000000..12a28e7850
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/arraytypemismatchexception/arraytypemismatchexceptionctor1.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/arraytypemismatchexception/arraytypemismatchexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/arraytypemismatchexception/arraytypemismatchexceptionctor2.cs
new file mode 100644
index 0000000000..243050c0a0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/arraytypemismatchexception/arraytypemismatchexceptionctor2.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/arraytypemismatchexception/arraytypemismatchexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/arraytypemismatchexception/arraytypemismatchexceptionctor3.cs
new file mode 100644
index 0000000000..e868b777ff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/arraytypemismatchexception/arraytypemismatchexceptionctor3.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/attribute/DDB125472_GetHashCode.csproj b/tests/src/CoreMangLib/cti/system/attribute/DDB125472_GetHashCode.csproj
new file mode 100644
index 0000000000..6e872f9a89
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attribute/DDB125472_GetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="ddb125472_gethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/attribute/GetHashCode.csproj b/tests/src/CoreMangLib/cti/system/attribute/GetHashCode.csproj
new file mode 100644
index 0000000000..ebe6af1e92
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attribute/GetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="gethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/attribute/ddb125472_gethashcode.cs b/tests/src/CoreMangLib/cti/system/attribute/ddb125472_gethashcode.cs
new file mode 100644
index 0000000000..33a80e91df
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attribute/ddb125472_gethashcode.cs
@@ -0,0 +1,59 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+/// <summary>
+/// Attribute.GetHashCode()
+/// </summary>
+public class AttributeGetHashCode
+{
+ public static int Main()
+ {
+ AttributeGetHashCode attrGetHashCode = new AttributeGetHashCode();
+ TestLibrary.TestFramework.BeginTestCase("Regression Test: DDB 125472");
+ if (attrGetHashCode.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Regression Test for DDB 125472]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Attribute.GetHashCode()");
+ try
+ {
+ MyAttribute myAttr = new MyAttribute();
+ myAttr.GetHashCode();
+ }
+ catch (FieldAccessException e)
+ {
+ TestLibrary.TestFramework.LogError("001", "DDB 125472 is present. Exception:"+e);
+ retVal = false;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ class MyAttribute : Attribute { }
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/attribute/gethashcode.cs b/tests/src/CoreMangLib/cti/system/attribute/gethashcode.cs
new file mode 100644
index 0000000000..e6e203cc99
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attribute/gethashcode.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+/// <summary>
+/// Attribute.GetHashCode()
+/// </summary>
+public class AttributeGetHashCode
+{
+ public static int Main()
+ {
+ AttributeGetHashCode attrGetHashCode = new AttributeGetHashCode();
+ TestLibrary.TestFramework.BeginTestCase("AttributeGetHashCode");
+ if (attrGetHashCode.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Get the Attribute Hash Code");
+ try
+ {
+ int intVal = TestLibrary.Generator.GetInt32(-55);
+ MyAttribute myAttr = new MyAttribute(intVal);
+ int hashcode = myAttr.GetHashCode();
+ if (hashcode != intVal)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class MyAttribute : Attribute
+ {
+ protected int hashcod;
+ public MyAttribute(int HashCode)
+ {
+ this.hashcod = HashCode;
+ }
+ public override int GetHashCode()
+ {
+ return base.GetHashCode();
+ }
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsAll.csproj b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsAll.csproj
new file mode 100644
index 0000000000..2e37bd39da
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsAll.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="attributetargetsall.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsAssembly.csproj b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsAssembly.csproj
new file mode 100644
index 0000000000..3e05460427
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsAssembly.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="attributetargetsassembly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsClass.csproj b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsClass.csproj
new file mode 100644
index 0000000000..ff8197587e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsClass.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="attributetargetsclass.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsConstructor.csproj b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsConstructor.csproj
new file mode 100644
index 0000000000..fd5d53f77c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsConstructor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="attributetargetsconstructor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsDelegate.csproj b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsDelegate.csproj
new file mode 100644
index 0000000000..2007159cb1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsDelegate.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="attributetargetsdelegate.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsEnum.csproj b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsEnum.csproj
new file mode 100644
index 0000000000..63ec262ea8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsEnum.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="attributetargetsenum.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsEvent.csproj b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsEvent.csproj
new file mode 100644
index 0000000000..f67dc3def9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsEvent.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="attributetargetsevent.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsField.csproj b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsField.csproj
new file mode 100644
index 0000000000..19a29439c9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsField.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="attributetargetsfield.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsGenericParameter.csproj b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsGenericParameter.csproj
new file mode 100644
index 0000000000..2113890daf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsGenericParameter.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="attributetargetsgenericparameter.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsInterface.csproj b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsInterface.csproj
new file mode 100644
index 0000000000..795850e33f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsInterface.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="attributetargetsinterface.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsMethod.csproj b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsMethod.csproj
new file mode 100644
index 0000000000..1a3fc33714
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsMethod.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="attributetargetsmethod.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsModule.csproj b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsModule.csproj
new file mode 100644
index 0000000000..3a32cb64cd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsModule.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="attributetargetsmodule.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsParameter.csproj b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsParameter.csproj
new file mode 100644
index 0000000000..ddcc38eb1a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsParameter.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="attributetargetsparameter.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsProperty.csproj b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsProperty.csproj
new file mode 100644
index 0000000000..e84822ecef
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsProperty.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="attributetargetsproperty.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsReturnValue.csproj b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsReturnValue.csproj
new file mode 100644
index 0000000000..a45e3f9f4d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsReturnValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="attributetargetsreturnvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsStruct.csproj b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsStruct.csproj
new file mode 100644
index 0000000000..6c9c2333bf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/AttributeTargetsStruct.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="attributetargetsstruct.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsall.cs b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsall.cs
new file mode 100644
index 0000000000..b1b407ad24
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsall.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsassembly.cs b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsassembly.cs
new file mode 100644
index 0000000000..b469377370
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsassembly.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsclass.cs b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsclass.cs
new file mode 100644
index 0000000000..7caf23bc39
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsclass.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsconstructor.cs b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsconstructor.cs
new file mode 100644
index 0000000000..dc816c6369
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsconstructor.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsdelegate.cs b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsdelegate.cs
new file mode 100644
index 0000000000..f0fc9c91f2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsdelegate.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsenum.cs b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsenum.cs
new file mode 100644
index 0000000000..0bc708fe06
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsenum.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsevent.cs b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsevent.cs
new file mode 100644
index 0000000000..79027882ce
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsevent.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsfield.cs b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsfield.cs
new file mode 100644
index 0000000000..196428b947
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsfield.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsgenericparameter.cs b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsgenericparameter.cs
new file mode 100644
index 0000000000..1fa5061a4d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsgenericparameter.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsinterface.cs b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsinterface.cs
new file mode 100644
index 0000000000..426a75c592
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsinterface.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsmethod.cs b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsmethod.cs
new file mode 100644
index 0000000000..ff0fa5cd03
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsmethod.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsmodule.cs b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsmodule.cs
new file mode 100644
index 0000000000..4c94c482f8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsmodule.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsparameter.cs b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsparameter.cs
new file mode 100644
index 0000000000..dccec71031
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsparameter.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsproperty.cs b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsproperty.cs
new file mode 100644
index 0000000000..70ee4cec60
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsproperty.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsreturnvalue.cs b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsreturnvalue.cs
new file mode 100644
index 0000000000..b1edc3d0d6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsreturnvalue.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsstruct.cs b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsstruct.cs
new file mode 100644
index 0000000000..3f4b17a66b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributetargets/attributetargetsstruct.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/attributeusageattribute/AttributeUsageAttributeAllowMultiple.csproj b/tests/src/CoreMangLib/cti/system/attributeusageattribute/AttributeUsageAttributeAllowMultiple.csproj
new file mode 100644
index 0000000000..e0c70fec02
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributeusageattribute/AttributeUsageAttributeAllowMultiple.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="attributeusageattributeallowmultiple.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/attributeusageattribute/AttributeUsageAttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/attributeusageattribute/AttributeUsageAttributeCtor.csproj
new file mode 100644
index 0000000000..4b070e669a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributeusageattribute/AttributeUsageAttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="attributeusageattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/attributeusageattribute/attributeusageattributeallowmultiple.cs b/tests/src/CoreMangLib/cti/system/attributeusageattribute/attributeusageattributeallowmultiple.cs
new file mode 100644
index 0000000000..32d14d7784
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributeusageattribute/attributeusageattributeallowmultiple.cs
@@ -0,0 +1,96 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+///<summary>
+///System.AttributeUsageAttribute.AllowMultiple
+///</summary>
+
+public class AttributeUsageAttributeAllowMultiple
+{
+
+ public static int Main()
+ {
+ AttributeUsageAttributeAllowMultiple testObj = new AttributeUsageAttributeAllowMultiple();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.AttributeUsageAttribute.AllowMultiple");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ bool expectedValue = true;
+
+ AttributeUsageAttribute aUT = new AttributeUsageAttribute(AttributeTargets.All);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get and set AllowMultiple as true.");
+ try
+ {
+ aUT.AllowMultiple = expectedValue;
+ if (expectedValue != aUT.AllowMultiple)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + aUT.AllowMultiple + ") !=ActualValue(" + expectedValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ bool expectedValue = false;
+
+ AttributeUsageAttribute aUT = new AttributeUsageAttribute(AttributeTargets.All);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:get and set AllowMultiple as false.");
+ try
+ {
+ aUT.AllowMultiple = expectedValue;
+ if (expectedValue != aUT.AllowMultiple)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(" + aUT.AllowMultiple + ") !=ActualValue(" + expectedValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/attributeusageattribute/attributeusageattributector.cs b/tests/src/CoreMangLib/cti/system/attributeusageattribute/attributeusageattributector.cs
new file mode 100644
index 0000000000..b4540e104e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/attributeusageattribute/attributeusageattributector.cs
@@ -0,0 +1,487 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+///<summary>
+///System.AttributeUsageAttribute.AttributeUsageAttribute(AttributeTargets validOn)
+///</summary>
+
+public class AttributeUsageAttributeCtor
+{
+
+ public static int Main()
+ {
+ AttributeUsageAttributeCtor testObj = new AttributeUsageAttributeCtor();
+ TestLibrary.TestFramework.BeginTestCase("for Constructor of System.AttributeUsageAttribute");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+ retVal = PosTest12() && retVal;
+ retVal = PosTest13() && retVal;
+ retVal = PosTest14() && retVal;
+ retVal = PosTest15() && retVal;
+ retVal = PosTest16() && retVal;
+ retVal = PosTest17() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ AttributeTargets validOn = AttributeTargets.All;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:set ValidOn as AttributeTargets.All and create a instance of class AttributeUsageAttribute.");
+ try
+ {
+ AttributeUsageAttribute aUT = new AttributeUsageAttribute(validOn);
+ if (aUT == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedObject(Not null) !=Actual(null)");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ AttributeTargets validOn = AttributeTargets.Assembly;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:set ValidOn as AttributeTargets.Assembly and create a instance of class AttributeUsageAttribute.");
+ try
+ {
+ AttributeUsageAttribute aUT = new AttributeUsageAttribute(validOn);
+ if (aUT == null)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedObject(Not null) !=Actual(null)");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ AttributeTargets validOn = AttributeTargets.Module;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:set ValidOn as AttributeTargets.Module and create a instance of class AttributeUsageAttribute.");
+ try
+ {
+ AttributeUsageAttribute aUT = new AttributeUsageAttribute(validOn);
+ if (aUT == null)
+ {
+ TestLibrary.TestFramework.LogError("005", "ExpectedObject(Not null) !=Actual(null)");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ AttributeTargets validOn = AttributeTargets.Class;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4:set ValidOn as AttributeTargets.Class and create a instance of class AttributeUsageAttribute.");
+ try
+ {
+ AttributeUsageAttribute aUT = new AttributeUsageAttribute(validOn);
+ if (aUT == null)
+ {
+ TestLibrary.TestFramework.LogError("007", "ExpectedObject(Not null) !=Actual(null)");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ AttributeTargets validOn = AttributeTargets.Struct;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5:set ValidOn as AttributeTargets.Struct and create a instance of class AttributeUsageAttribute.");
+ try
+ {
+ AttributeUsageAttribute aUT = new AttributeUsageAttribute(validOn);
+ if (aUT == null)
+ {
+ TestLibrary.TestFramework.LogError("009", "ExpectedObject(Not null) !=Actual(null)");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ AttributeTargets validOn = AttributeTargets.All;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6:set ValidOn as AttributeTargets.Enum and create a instance of class AttributeUsageAttribute.");
+ try
+ {
+ AttributeUsageAttribute aUT = new AttributeUsageAttribute(validOn);
+ if (aUT == null)
+ {
+ TestLibrary.TestFramework.LogError("011", "ExpectedObject(Not null) !=Actual(null)");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ AttributeTargets validOn = AttributeTargets.Constructor;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7:set ValidOn as AttributeTargets.Constructor and create a instance of class AttributeUsageAttribute.");
+ try
+ {
+ AttributeUsageAttribute aUT = new AttributeUsageAttribute(validOn);
+ if (aUT == null)
+ {
+ TestLibrary.TestFramework.LogError("013", "ExpectedObject(Not null) !=Actual(null)");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+
+ AttributeTargets validOn = AttributeTargets.Method;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest8:set ValidOn as AttributeTargets.Method and create a instance of class AttributeUsageAttribute.");
+ try
+ {
+ AttributeUsageAttribute aUT = new AttributeUsageAttribute(validOn);
+ if (aUT == null)
+ {
+ TestLibrary.TestFramework.LogError("015", "ExpectedObject(Not null) !=Actual(null)");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+
+ AttributeTargets validOn = AttributeTargets.Property;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest9:set ValidOn as AttributeTargets.Property and create a instance of class AttributeUsageAttribute.");
+ try
+ {
+ AttributeUsageAttribute aUT = new AttributeUsageAttribute(validOn);
+ if (aUT == null)
+ {
+ TestLibrary.TestFramework.LogError("017", "ExpectedObject(Not null) !=Actual(null)");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest10()
+ {
+ bool retVal = true;
+
+ AttributeTargets validOn = AttributeTargets.Field;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest10:set ValidOn as AttributeTargets.Field and create a instance of class AttributeUsageAttribute.");
+ try
+ {
+ AttributeUsageAttribute aUT = new AttributeUsageAttribute(validOn);
+ if (aUT == null)
+ {
+ TestLibrary.TestFramework.LogError("019", "ExpectedObject(Not null) !=Actual(null)");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest11()
+ {
+ bool retVal = true;
+
+ AttributeTargets validOn = AttributeTargets.Event;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest11:set ValidOn as AttributeTargets.Event and create a instance of class AttributeUsageAttribute.");
+ try
+ {
+ AttributeUsageAttribute aUT = new AttributeUsageAttribute(validOn);
+ if (aUT == null)
+ {
+ TestLibrary.TestFramework.LogError("021", "ExpectedObject(Not null) !=Actual(null)");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("022", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest12()
+ {
+ bool retVal = true;
+
+ AttributeTargets validOn = AttributeTargets.Interface;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest12:set ValidOn as AttributeTargets.Interface and create a instance of class AttributeUsageAttribute.");
+ try
+ {
+ AttributeUsageAttribute aUT = new AttributeUsageAttribute(validOn);
+ if (aUT == null)
+ {
+ TestLibrary.TestFramework.LogError("023", "ExpectedObject(Not null) !=Actual(null)");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("024", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest13()
+ {
+ bool retVal = true;
+
+ AttributeTargets validOn = AttributeTargets.Parameter;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest13:set ValidOn as AttributeTargets.Parameter and create a instance of class AttributeUsageAttribute.");
+ try
+ {
+ AttributeUsageAttribute aUT = new AttributeUsageAttribute(validOn);
+ if (aUT == null)
+ {
+ TestLibrary.TestFramework.LogError("025", "ExpectedObject(Not null) !=Actual(null)");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("026", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest14()
+ {
+ bool retVal = true;
+
+ AttributeTargets validOn = AttributeTargets.Delegate;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest14:set ValidOn as AttributeTargets.Delegate and create a instance of class AttributeUsageAttribute.");
+ try
+ {
+ AttributeUsageAttribute aUT = new AttributeUsageAttribute(validOn);
+ if (aUT == null)
+ {
+ TestLibrary.TestFramework.LogError("027", "ExpectedObject(Not null) !=Actual(null)");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("028", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest15()
+ {
+ bool retVal = true;
+
+ AttributeTargets validOn = AttributeTargets.ReturnValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest15:set ValidOn as AttributeTargets.ReturnValue and create a instance of class AttributeUsageAttribute.");
+ try
+ {
+ AttributeUsageAttribute aUT = new AttributeUsageAttribute(validOn);
+ if (aUT == null)
+ {
+ TestLibrary.TestFramework.LogError("029", "ExpectedObject(Not null) !=Actual(null)");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("030", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest16()
+ {
+ bool retVal = true;
+
+ AttributeTargets validOn = AttributeTargets.GenericParameter;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest16:set ValidOn as AttributeTargets.GenericParameter and create a instance of class AttributeUsageAttribute.");
+ try
+ {
+ AttributeUsageAttribute aUT = new AttributeUsageAttribute(validOn);
+ if (aUT == null)
+ {
+ TestLibrary.TestFramework.LogError("031", "ExpectedObject(Not null) !=Actual(null)");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("032", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest17()
+ {
+ bool retVal = true;
+
+ AttributeTargets expectedValue = (AttributeTargets)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+
+ TestLibrary.TestFramework.BeginScenario("PosTest17:set ValidOn as Random int16 and try to get it.");
+ try
+ {
+ AttributeUsageAttribute aUT = new AttributeUsageAttribute(expectedValue);
+
+ if (aUT == null)
+ {
+ TestLibrary.TestFramework.LogError("033", "ExpectedObject(Not null) !=Actual(null)");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("034", "Unexpected exception:" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/badimageformatexception/BadImageFormatExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/badimageformatexception/BadImageFormatExceptionCtor1.csproj
new file mode 100644
index 0000000000..03803705a4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/badimageformatexception/BadImageFormatExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="badimageformatexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/badimageformatexception/BadImageFormatExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/badimageformatexception/BadImageFormatExceptionCtor2.csproj
new file mode 100644
index 0000000000..2310402666
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/badimageformatexception/BadImageFormatExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="badimageformatexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/badimageformatexception/BadImageFormatExceptionCtor3.csproj b/tests/src/CoreMangLib/cti/system/badimageformatexception/BadImageFormatExceptionCtor3.csproj
new file mode 100644
index 0000000000..839418ea50
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/badimageformatexception/BadImageFormatExceptionCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="badimageformatexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/badimageformatexception/BadImageFormatExceptionMessage.csproj b/tests/src/CoreMangLib/cti/system/badimageformatexception/BadImageFormatExceptionMessage.csproj
new file mode 100644
index 0000000000..1c062018a7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/badimageformatexception/BadImageFormatExceptionMessage.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="badimageformatexceptionmessage.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/badimageformatexception/BadImageFormatExceptionToString.csproj b/tests/src/CoreMangLib/cti/system/badimageformatexception/BadImageFormatExceptionToString.csproj
new file mode 100644
index 0000000000..21f26bbeb1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/badimageformatexception/BadImageFormatExceptionToString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="badimageformatexceptiontostring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/badimageformatexception/badimageformatexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/badimageformatexception/badimageformatexceptionctor1.cs
new file mode 100644
index 0000000000..55827de02e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/badimageformatexception/badimageformatexceptionctor1.cs
@@ -0,0 +1,81 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ctor
+/// </summary>
+public class BadImageFormatExceptionCtor1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor to create a new instance");
+
+ try
+ {
+ BadImageFormatException ex = new BadImageFormatException();
+ if (ex == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling ctor returns null reference");
+ retVal = false;
+ }
+
+ if (!(ex is BadImageFormatException))
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Calling ctor returns non BadImageFormatException instance");
+ retVal = false;
+ }
+
+ // check we can throw this instance
+ throw ex;
+ }
+ catch (BadImageFormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ BadImageFormatExceptionCtor1 test = new BadImageFormatExceptionCtor1();
+
+ TestLibrary.TestFramework.BeginTestCase("BadImageFormatExceptionCtor1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/badimageformatexception/badimageformatexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/badimageformatexception/badimageformatexceptionctor2.cs
new file mode 100644
index 0000000000..5981954bcf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/badimageformatexception/badimageformatexceptionctor2.cs
@@ -0,0 +1,120 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ctor(System.String)
+/// </summary>
+public class BadImageFormatExceptionCtor2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor to create a new instance");
+
+ try
+ {
+ string expected = TestLibrary.Generator.GetString(-55, false, 1, 256);
+ BadImageFormatException ex = new BadImageFormatException(expected);
+ if (ex == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling ctor returns null reference");
+ retVal = false;
+ }
+
+ if (!(ex is BadImageFormatException))
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Calling ctor returns non BadImageFormatException instance");
+ retVal = false;
+ }
+
+ // check we can throw this instance
+ throw ex;
+ }
+ catch (BadImageFormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call ctor to create a new instance with message set to null");
+
+ try
+ {
+ BadImageFormatException ex = new BadImageFormatException(null);
+ if (ex == null)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling ctor returns null reference");
+ retVal = false;
+ }
+
+ if (!(ex is BadImageFormatException))
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Calling ctor returns non BadImageFormatException instance");
+ retVal = false;
+ }
+
+ // check we can throw this instance
+ throw ex;
+ }
+ catch (BadImageFormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ BadImageFormatExceptionCtor2 test = new BadImageFormatExceptionCtor2();
+
+ TestLibrary.TestFramework.BeginTestCase("BadImageFormatExceptionCtor2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/badimageformatexception/badimageformatexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/badimageformatexception/badimageformatexceptionctor3.cs
new file mode 100644
index 0000000000..f73caab581
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/badimageformatexception/badimageformatexceptionctor3.cs
@@ -0,0 +1,133 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ctor(System.String,System.Exception)
+/// </summary>
+public class BadImageFormatExceptionCtor3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor to create a new instance");
+
+ try
+ {
+ Exception inner = new Exception();
+ BadImageFormatException ex = new BadImageFormatException(TestLibrary.Generator.GetString(-55, false, 1, 256), inner);
+ if (ex == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling ctor returns null reference");
+ retVal = false;
+ }
+
+ if (!(ex is BadImageFormatException))
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Calling ctor returns non BadImageFormatException instance");
+ retVal = false;
+ }
+
+ if (ex.InnerException != inner)
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Calling ctor can not set InnerException property");
+ retVal = false;
+ }
+
+ // check we can throw this instance
+ throw ex;
+ }
+ catch (BadImageFormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call ctor to create a new instance with message and innerException set to null");
+
+ try
+ {
+ Exception inner = null;
+ BadImageFormatException ex = new BadImageFormatException(null, inner);
+ if (ex == null)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling ctor returns null reference");
+ retVal = false;
+ }
+
+ if (!(ex is BadImageFormatException))
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Calling ctor returns non BadImageFormatException instance");
+ retVal = false;
+ }
+
+ if (ex.InnerException != inner)
+ {
+ TestLibrary.TestFramework.LogError("002.3", "Calling ctor can not set InnerException property");
+ retVal = false;
+ }
+
+ // check we can throw this instance
+ throw ex;
+ }
+ catch (BadImageFormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ BadImageFormatExceptionCtor3 test = new BadImageFormatExceptionCtor3();
+
+ TestLibrary.TestFramework.BeginTestCase("BadImageFormatExceptionCtor3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/badimageformatexception/badimageformatexceptionmessage.cs b/tests/src/CoreMangLib/cti/system/badimageformatexception/badimageformatexceptionmessage.cs
new file mode 100644
index 0000000000..411e208d8f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/badimageformatexception/badimageformatexceptionmessage.cs
@@ -0,0 +1,127 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Message
+/// </summary>
+public class BadImageFormatExceptionMessage
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Message should not return null reference for empty instance");
+
+ try
+ {
+ BadImageFormatException ex = new BadImageFormatException();
+ if (ex.Message == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Message returns null reference for empty instance");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Message should return correct value for instance with message is set");
+
+ try
+ {
+ string expected = TestLibrary.Generator.GetString(-55, false, 1, 256);
+ BadImageFormatException ex = new BadImageFormatException(expected);
+ string actual = ex.Message;
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Message returns wrong value for instance with message is set");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Message should return correct value for instance with message and inner is set");
+
+ try
+ {
+ string expected = TestLibrary.Generator.GetString(-55, false, 1, 256);
+ BadImageFormatException ex = new BadImageFormatException(expected, new Exception());
+ string actual = ex.Message;
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Message returns wrong value for instance with message and inner is set");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ BadImageFormatExceptionMessage test = new BadImageFormatExceptionMessage();
+
+ TestLibrary.TestFramework.BeginTestCase("BadImageFormatExceptionMessage");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/badimageformatexception/badimageformatexceptiontostring.cs b/tests/src/CoreMangLib/cti/system/badimageformatexception/badimageformatexceptiontostring.cs
new file mode 100644
index 0000000000..c195c93a1a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/badimageformatexception/badimageformatexceptiontostring.cs
@@ -0,0 +1,136 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToString
+/// </summary>
+public class BadImageFormatExceptionToString
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ToString on an empty exception class");
+
+ try
+ {
+ BadImageFormatException ex = new BadImageFormatException();
+ string expected = "System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.";
+ string actual = ex.ToString();
+
+ if (ex.ToString() == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToString returns unexpected value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call ToString on an exception class with message is set");
+
+ try
+ {
+ string message = TestLibrary.Generator.GetString(-55, false, 1, 50);
+ BadImageFormatException ex = new BadImageFormatException(message);
+ string expected = "System.BadImageFormatException: " + message;
+ string actual = ex.ToString();
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToString returns unexpected value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call ToString on an exception class with message and inner is set");
+
+ try
+ {
+ string message = TestLibrary.Generator.GetString(-55, false, 1, 50);
+ Exception inner = new Exception();
+ BadImageFormatException ex = new BadImageFormatException(message, inner);
+ string expected = "System.BadImageFormatException: " + message + " ---> " + inner.ToString();
+ string actual = ex.ToString();
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "ToString returns unexpected value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ BadImageFormatExceptionToString test = new BadImageFormatExceptionToString();
+
+ TestLibrary.TestFramework.BeginTestCase("BadImageFormatExceptionToString");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanCompareTo_Boolean.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanCompareTo_Boolean.csproj
new file mode 100644
index 0000000000..2343442fd6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanCompareTo_Boolean.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleancompareto_boolean.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanEquals_Boolean.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanEquals_Boolean.csproj
new file mode 100644
index 0000000000..024283d580
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanEquals_Boolean.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleanequals_boolean.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanEquals_Object.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanEquals_Object.csproj
new file mode 100644
index 0000000000..fee4e42fe5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanEquals_Object.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleanequals_object.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanFalseString.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanFalseString.csproj
new file mode 100644
index 0000000000..419f79981c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanFalseString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleanfalsestring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanGetHashCode.csproj
new file mode 100644
index 0000000000..de7cae5b1a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleangethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToBoolean.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToBoolean.csproj
new file mode 100644
index 0000000000..fb46a2f3bc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToBoolean.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleaniconvertibletoboolean.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToByte.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToByte.csproj
new file mode 100644
index 0000000000..522bc819c4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleaniconvertibletobyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToChar.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToChar.csproj
new file mode 100644
index 0000000000..9448f3d738
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToChar.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleaniconvertibletochar.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToDateTime.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToDateTime.csproj
new file mode 100644
index 0000000000..adcbdd694c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToDateTime.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleaniconvertibletodatetime.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToDecimal.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToDecimal.csproj
new file mode 100644
index 0000000000..c850f8f0e5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToDecimal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleaniconvertibletodecimal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToDouble.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToDouble.csproj
new file mode 100644
index 0000000000..8fb005bdbd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToDouble.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleaniconvertibletodouble.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToInt16.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToInt16.csproj
new file mode 100644
index 0000000000..0d6b763a98
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleaniconvertibletoint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToInt32.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToInt32.csproj
new file mode 100644
index 0000000000..644c8ab50c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleaniconvertibletoint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToInt64.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToInt64.csproj
new file mode 100644
index 0000000000..6ccae6950a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleaniconvertibletoint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToSByte.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToSByte.csproj
new file mode 100644
index 0000000000..c550c233e2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToSByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleaniconvertibletosbyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToSingle.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToSingle.csproj
new file mode 100644
index 0000000000..095f959bd6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToSingle.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleaniconvertibletosingle.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToType.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToType.csproj
new file mode 100644
index 0000000000..c0eef53f71
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToType.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleaniconvertibletotype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToUInt16.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToUInt16.csproj
new file mode 100644
index 0000000000..8044d659fc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToUInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleaniconvertibletouint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToUInt32.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToUInt32.csproj
new file mode 100644
index 0000000000..257e38faf5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToUInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleaniconvertibletouint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToUInt64.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToUInt64.csproj
new file mode 100644
index 0000000000..1ee36595f8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanIConvertibleToUInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleaniconvertibletouint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanParse.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanParse.csproj
new file mode 100644
index 0000000000..945915348e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanParse.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleanparse.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanToString.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanToString.csproj
new file mode 100644
index 0000000000..4b0a221a6b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanToString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleantostring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanTrueString.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanTrueString.csproj
new file mode 100644
index 0000000000..f484a83926
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanTrueString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleantruestring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/BooleanTryParse.csproj b/tests/src/CoreMangLib/cti/system/boolean/BooleanTryParse.csproj
new file mode 100644
index 0000000000..ef6f235e5e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/BooleanTryParse.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="booleantryparse.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleancompareto_boolean.cs b/tests/src/CoreMangLib/cti/system/boolean/booleancompareto_boolean.cs
new file mode 100644
index 0000000000..7378d55e9e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleancompareto_boolean.cs
@@ -0,0 +1,124 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class BooleanCompareTo_Boolean
+{
+
+ public static int Main()
+ {
+ BooleanCompareTo_Boolean testCase = new BooleanCompareTo_Boolean();
+
+ TestLibrary.TestFramework.BeginTestCase("Boolean.CompareTo(Boolean)");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ Boolean b0 = false;
+ Boolean b1 = false;
+ if (b0.CompareTo(b1) != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "expect false.CompareTo(false) == 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ Boolean b0 = false;
+ Boolean b1 = true;
+ if (b0.CompareTo(b1) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("002", "expect false.CompareTo(true) < 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ try
+ {
+ Boolean b0 = true;
+ Boolean b1 = false;
+ if (b0.CompareTo(b1) <= 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "expect true.CompareTo(false) > 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ try
+ {
+ Boolean b0 = true;
+ Boolean b1 = true;
+ if (b0.CompareTo(b1) != 0)
+ {
+ TestLibrary.TestFramework.LogError("004", "expect true.CompareTo(true) == 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleanequals_boolean.cs b/tests/src/CoreMangLib/cti/system/boolean/booleanequals_boolean.cs
new file mode 100644
index 0000000000..5db0ce6f66
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleanequals_boolean.cs
@@ -0,0 +1,125 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class BooleanEquals_Boolean
+{
+
+ public static int Main()
+ {
+ BooleanEquals_Boolean testCase = new BooleanEquals_Boolean();
+
+ TestLibrary.TestFramework.BeginTestCase("Boolean.Equals(Boolean)");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ Boolean b0 = false;
+ Boolean b1 = false;
+ if (!b0.Equals(b1))
+ {
+ TestLibrary.TestFramework.LogError("001", "expect false.Equals(false) == true");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ Boolean b0 = false;
+ Boolean b1 = true;
+ if (b0.Equals(b1))
+ {
+ TestLibrary.TestFramework.LogError("002", "expect false.Equals(true) == false");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ try
+ {
+ Boolean b0 = true;
+ Boolean b1 = false;
+ if (b0.Equals(b1))
+ {
+ TestLibrary.TestFramework.LogError("003", "expect true.Equals(false) == false");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ try
+ {
+ Boolean b0 = true;
+ Boolean b1 = true;
+ if (!b0.Equals(b1))
+ {
+ TestLibrary.TestFramework.LogError("004", "expect true.CompareTo(true) == true");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleanequals_object.cs b/tests/src/CoreMangLib/cti/system/boolean/booleanequals_object.cs
new file mode 100644
index 0000000000..f7964bc7da
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleanequals_object.cs
@@ -0,0 +1,228 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class BooleanEquals_Object
+{
+
+ public static int Main()
+ {
+ BooleanEquals_Object testCase = new BooleanEquals_Object();
+
+ TestLibrary.TestFramework.BeginTestCase("Boolean.Equals(Object)");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ Boolean b0 = false;
+ Boolean b1 = false;
+ if (!b0.Equals(b1 as Object))
+ {
+ TestLibrary.TestFramework.LogError("001", "expect false.Equals(false as object) == true");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ Boolean b0 = false;
+ Boolean b1 = true;
+ if (b0.Equals(b1 as Object))
+ {
+ TestLibrary.TestFramework.LogError("002", "expect false.Equals(true as object) == false");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ try
+ {
+ Boolean b0 = true;
+ Boolean b1 = false;
+ if (b0.Equals(b1 as Object))
+ {
+ TestLibrary.TestFramework.LogError("003", "expect true.Equals(false as object) == false");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ try
+ {
+ Boolean b0 = true;
+ Boolean b1 = true;
+ if (!b0.Equals(b1 as Object))
+ {
+ TestLibrary.TestFramework.LogError("004", "expect true.Equals(true as object) == true");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ try
+ {
+ Boolean b0 = false;
+ if (b0.Equals(null))
+ {
+ TestLibrary.TestFramework.LogError("005", "expect false.Equals(null) == false");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ try
+ {
+ Boolean b0 = true;
+ if (b0.Equals(null))
+ {
+ TestLibrary.TestFramework.LogError("006", "expect true.Equals(null) == false");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ try
+ {
+ Boolean b0 = true;
+ if (b0.Equals(1))
+ {
+ TestLibrary.TestFramework.LogError("007", "expect true.Equals(1) == false");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ try
+ {
+ if (false.Equals(0))
+ {
+ TestLibrary.TestFramework.LogError("008", "expect false.Equals(0) == false");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+ try
+ {
+ if (false.Equals(Single.NaN))
+ {
+ TestLibrary.TestFramework.LogError("009", "expect false.Equals(Single.NaN) == false");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleanfalsestring.cs b/tests/src/CoreMangLib/cti/system/boolean/booleanfalsestring.cs
new file mode 100644
index 0000000000..db32bf6c82
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleanfalsestring.cs
@@ -0,0 +1,58 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class BooleanFalseString
+{
+ const string FALSE_STRING = "False";
+
+ public static int Main()
+ {
+ BooleanFalseString testCase = new BooleanFalseString();
+
+ TestLibrary.TestFramework.BeginTestCase("Boolean.FalseString");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ if (Boolean.FalseString != FALSE_STRING)
+ {
+ TestLibrary.TestFramework.LogError("001", "expect Boolean.FalseString == \"False\" ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleangethashcode.cs b/tests/src/CoreMangLib/cti/system/boolean/booleangethashcode.cs
new file mode 100644
index 0000000000..6cfbb832db
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleangethashcode.cs
@@ -0,0 +1,77 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class BooleanGetHashCode
+{
+
+ public static int Main()
+ {
+ BooleanGetHashCode testCase = new BooleanGetHashCode();
+
+ TestLibrary.TestFramework.BeginTestCase("Boolean.GetHashCode");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ if (true.GetHashCode() != 1)
+ {
+ TestLibrary.TestFramework.LogError("001", "expect true.GetHashCode() == 1");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ if (false.GetHashCode() != 0)
+ {
+ TestLibrary.TestFramework.LogError("002", "expect false.GetHashCode() == 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletoboolean.cs b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletoboolean.cs
new file mode 100644
index 0000000000..3c11233de1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletoboolean.cs
@@ -0,0 +1,81 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class BooleanIConvertableToBoolean
+{
+ #region MainEntry
+ public static int Main()
+ {
+ BooleanIConvertableToBoolean testCase = new BooleanIConvertableToBoolean();
+
+ TestLibrary.TestFramework.BeginTestCase("Boolean.IConvertible.ToBoolean");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #endregion
+
+ #region Run Cases
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+
+ return retVal;
+ }
+ #endregion
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ if ( (true as IConvertible).ToBoolean(null) != true)
+ {
+ TestLibrary.TestFramework.LogError("001", "expect (true as IConvertible).ToBoolean(null) == true");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ if ( (false as IConvertible).ToBoolean(null) != false)
+ {
+ TestLibrary.TestFramework.LogError("002", "(false as IConvertible).ToBoolean(null) == false");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletobyte.cs b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletobyte.cs
new file mode 100644
index 0000000000..7c54236e33
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletobyte.cs
@@ -0,0 +1,78 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class BooleanIConvertibleToByte
+{
+
+ public static int Main()
+ {
+ BooleanIConvertibleToByte testCase = new BooleanIConvertibleToByte();
+
+ TestLibrary.TestFramework.BeginTestCase("Boolean.IConvertible.ToByte");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ if( (true as IConvertible).ToByte(null) != (byte)1)
+ {
+ TestLibrary.TestFramework.LogError("001", "expect (true as IConvertible).ToByte(null) == (byte)1");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ if ( (false as IConvertible).ToByte(null) != (byte)0)
+ {
+ TestLibrary.TestFramework.LogError("002", "expect (false as IConvertible).ToByte(null) == 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletochar.cs b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletochar.cs
new file mode 100644
index 0000000000..32b51d72c1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletochar.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class BooleanIConvertibleToChar
+{
+
+ public static int Main()
+ {
+ BooleanIConvertibleToChar testCase = new BooleanIConvertibleToChar();
+
+ TestLibrary.TestFramework.BeginTestCase("Boolean.IConvertible.ToChar");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ char v = (true as IConvertible).ToChar(null);
+ TestLibrary.TestFramework.LogError("001",
+ String.Format("expected a InvalidCastException on (true as IConvertible).ToChar(null)) but got {0}", v));
+ retVal = false;
+ }
+ catch(InvalidCastException)
+ {
+ retVal = true;
+ return retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ char v = (false as IConvertible).ToChar(null);
+ TestLibrary.TestFramework.LogError("002",
+ String.Format("expected a InvalidCastException on (false as IConvertible).ToChar(null)) but got {0}", v));
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ retVal = true;
+ return retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletodatetime.cs b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletodatetime.cs
new file mode 100644
index 0000000000..d8fc128c90
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletodatetime.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class BooleanIConvertibleToDateTime
+{
+
+ public static int Main()
+ {
+ BooleanIConvertibleToDateTime testCase = new BooleanIConvertibleToDateTime();
+
+ TestLibrary.TestFramework.BeginTestCase("Boolean.IConvertible.ToDateTime");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ DateTime v = (true as IConvertible).ToDateTime(null);
+ TestLibrary.TestFramework.LogError("001",
+ String.Format("expected a InvalidCastException on (true as IConvertible).ToDateTime(null)) but got {0}", v));
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ retVal = true;
+ return retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ DateTime v = (false as IConvertible).ToDateTime(null);
+ TestLibrary.TestFramework.LogError("002",
+ String.Format("expected a InvalidCastException on (false as IConvertible).ToDateTime(null)) but got {0}", v));
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ retVal = true;
+ return retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletodecimal.cs b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletodecimal.cs
new file mode 100644
index 0000000000..a85136b1e1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletodecimal.cs
@@ -0,0 +1,79 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Boolean.IConvertible.ToDecimal
+/// </summary>
+public class BooleanIConvertibleToDecimal
+{
+
+ public static int Main()
+ {
+ BooleanIConvertibleToDecimal testCase = new BooleanIConvertibleToDecimal();
+
+ TestLibrary.TestFramework.BeginTestCase("Boolean.IConvertible.ToDecimal");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ if ((true as IConvertible).ToDecimal(null) != 1)
+ {
+ TestLibrary.TestFramework.LogError("001", "expect (true as IConvertible).ToDecimal(null) == 1");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ if ((false as IConvertible).ToDecimal(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("002", "expect (false as IConvertible).ToDecimal(null) == 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletodouble.cs b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletodouble.cs
new file mode 100644
index 0000000000..ea8df432b3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletodouble.cs
@@ -0,0 +1,79 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Boolean.IConvertible.ToDouble
+/// </summary>
+public class BooleanIConvertibleToDouble
+{
+
+ public static int Main()
+ {
+ BooleanIConvertibleToDouble testCase = new BooleanIConvertibleToDouble();
+
+ TestLibrary.TestFramework.BeginTestCase("Boolean.IConvertible.ToDouble");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ if ((true as IConvertible).ToDouble(null) != 1.0)
+ {
+ TestLibrary.TestFramework.LogError("001", "expect (true as IConvertible).ToDouble(null) == 1.0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ if ((false as IConvertible).ToDouble(null) != 0.0)
+ {
+ TestLibrary.TestFramework.LogError("002", "expect (false as IConvertible).ToDouble(null) == 0.0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletoint16.cs b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletoint16.cs
new file mode 100644
index 0000000000..961230a5ee
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletoint16.cs
@@ -0,0 +1,78 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class BooleanIConvertibleToInt16
+{
+
+ public static int Main()
+ {
+ BooleanIConvertibleToInt16 testCase = new BooleanIConvertibleToInt16();
+
+ TestLibrary.TestFramework.BeginTestCase("Boolean.IConvertible.ToInt16");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ if ( (true as IConvertible).ToInt16(null) != (short)1 )
+ {
+ TestLibrary.TestFramework.LogError("001", "expect (true as IConvertible).ToInt16(null) == (short)1");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ if ( (false as IConvertible).ToInt16(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("002", "expect (false as IConvertible).ToInt16(null) == 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletoint32.cs b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletoint32.cs
new file mode 100644
index 0000000000..a8da69fbd9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletoint32.cs
@@ -0,0 +1,78 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class BooleanIConvertibleToInt32
+{
+
+ public static int Main()
+ {
+ BooleanIConvertibleToInt32 testCase = new BooleanIConvertibleToInt32();
+
+ TestLibrary.TestFramework.BeginTestCase("Boolean.IConvertible.ToInt32");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ if ( (true as IConvertible).ToInt32(null) != 1 )
+ {
+ TestLibrary.TestFramework.LogError("001", "expect (true as IConvertible).ToInt32(null) == 1");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ if ( (false as IConvertible).ToInt32(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("002", "expect (false as IConvertible).ToInt32(null) == 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletoint64.cs b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletoint64.cs
new file mode 100644
index 0000000000..06994d0340
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletoint64.cs
@@ -0,0 +1,78 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class BooleanIConvertibleToInt64
+{
+
+ public static int Main()
+ {
+ BooleanIConvertibleToInt64 testCase = new BooleanIConvertibleToInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("Boolean.IConvertible.ToInt64");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ if ( (true as IConvertible).ToInt64(null) != 1L)
+ {
+ TestLibrary.TestFramework.LogError("001", "expect (true as IConvertible).ToInt64(null) == 1L");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ if ( (false as IConvertible).ToInt64(null) != 0L )
+ {
+ TestLibrary.TestFramework.LogError("002", "expect (false as IConvertible).ToInt64(null) == 0L");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletosbyte.cs b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletosbyte.cs
new file mode 100644
index 0000000000..873731a4cd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletosbyte.cs
@@ -0,0 +1,78 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class BooleanIConvertibleToSByte
+{
+
+ public static int Main()
+ {
+ BooleanIConvertibleToSByte testCase = new BooleanIConvertibleToSByte();
+
+ TestLibrary.TestFramework.BeginTestCase("Boolean.IConvertible.ToSByte");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ if ((true as IConvertible).ToSByte(null) != (sbyte)1)
+ {
+ TestLibrary.TestFramework.LogError("001", "expect (true as IConvertible).ToSByte(null) == (sbyte)1");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ if ((false as IConvertible).ToSByte(null) != (sbyte)0)
+ {
+ TestLibrary.TestFramework.LogError("002", "expect (false as IConvertible).ToSByte(null) == (sbyte)0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletosingle.cs b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletosingle.cs
new file mode 100644
index 0000000000..49478d730b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletosingle.cs
@@ -0,0 +1,79 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Boolean.IConvertible.ToSingle
+/// </summary>
+public class BooleanIConvertibleToSingle
+{
+
+ public static int Main()
+ {
+ BooleanIConvertibleToSingle testCase = new BooleanIConvertibleToSingle();
+
+ TestLibrary.TestFramework.BeginTestCase("Boolean.IConvertible.ToSingle");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ if ((true as IConvertible).ToSingle(null) != 1.0f)
+ {
+ TestLibrary.TestFramework.LogError("001", "expect (true as IConvertible).ToSingle(null) == 1.0f");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ if ((false as IConvertible).ToSingle(null) != 0.0f)
+ {
+ TestLibrary.TestFramework.LogError("002", "expect (false as IConvertible).ToSingle(null) == 0.0f");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletotype.cs b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletotype.cs
new file mode 100644
index 0000000000..146664f6e6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletotype.cs
@@ -0,0 +1,478 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+class MyTestClass
+{
+ public MyTestClass()
+ {
+ this.m_value = false;
+ }
+
+ public MyTestClass(bool value)
+ {
+ this.m_value = value;
+ }
+
+ bool m_value;
+};
+
+public class BooleanIConvertibleToType
+{
+
+ public static int Main()
+ {
+ BooleanIConvertibleToType testCase = new BooleanIConvertibleToType();
+
+ TestLibrary.TestFramework.BeginTestCase("Boolean.IConvertible.ToType");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+ retVal = PosTest12() && retVal;
+ retVal = PosTest13() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+
+ return retVal;
+ }
+
+ #region Positive test cases
+ /// <summary>
+ /// convert to int
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ if ( (int)(true as IConvertible).ToType(typeof(int), null) != 1 )
+ {
+ TestLibrary.TestFramework.LogError("001", "expect (int)(true as IConvertible).ToType(typeof(int), null) == 1");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ /// <summary>
+ /// convert to uint
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ if ((uint)(true as IConvertible).ToType(typeof(uint), null) != 1)
+ {
+ TestLibrary.TestFramework.LogError("002", "expect (uint)(true as IConvertible).ToType(typeof(uint), null) == 1");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ /// <summary>
+ /// convert to long
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ try
+ {
+ if ((long)(false as IConvertible).ToType(typeof(long), null) != (long)0)
+ {
+ TestLibrary.TestFramework.LogError("003", "expect (long)(false as IConvertible).ToType(typeof(long), null) == (long)0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ /// <summary>
+ /// convert to ulong
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ try
+ {
+ if ((ulong)(false as IConvertible).ToType(typeof(ulong), null) != (ulong)0)
+ {
+ TestLibrary.TestFramework.LogError("004", "expect (ulong)(false as IConvertible).ToType(typeof(ulong), null) == (ulong)0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ /// <summary>
+ /// convert to short
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ try
+ {
+ if ((short)(true as IConvertible).ToType(typeof(short), null) != (short)1)
+ {
+ TestLibrary.TestFramework.LogError("005", "expect (short)(true as IConvertible).ToType(typeof(short), null) == (short)1");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ /// <summary>
+ /// convert to ushort
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ try
+ {
+ if ((ushort)(false as IConvertible).ToType(typeof(ushort), null) != (ushort)0)
+ {
+ TestLibrary.TestFramework.LogError("006", "expect (ushort)(false as IConvertible).ToType(typeof(ushort), null) == (ushort)0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ /// <summary>
+ /// convert to byte
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ try
+ {
+ if ((byte)(true as IConvertible).ToType(typeof(byte), null) != (byte)1)
+ {
+ TestLibrary.TestFramework.LogError("007", "expect (byte)(true as IConvertible).ToType(typeof(byte), null) == (byte)1");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ /// <summary>
+ /// convert to sbyte
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ try
+ {
+ if ((sbyte)(true as IConvertible).ToType(typeof(sbyte), null) != (sbyte)1)
+ {
+ TestLibrary.TestFramework.LogError("008", "expect (sbyte)(true as IConvertible).ToType(typeof(sbyte), null) == (sbyte)1");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ /// <summary>
+ /// convert to bool
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest9()
+ {
+ bool retVal = true;
+ try
+ {
+ if ((bool)(true as IConvertible).ToType(typeof(Boolean), null) != true)
+ {
+ TestLibrary.TestFramework.LogError("009", "expect (bool)(true as IConvertible).ToType(typeof(Boolean), null) == true");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ /// <summary>
+ /// convert to Object
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest10()
+ {
+ bool retVal = true;
+ try
+ {
+ object v = (true as IConvertible).ToType(typeof(Object), null);
+ if ( v.GetType() != typeof(Boolean) )
+ {
+ TestLibrary.TestFramework.LogError("010.1", "expect (true as IConvertible).ToType(typeof(Object), null).GetType() == typeof(Boolean)");
+ retVal = false;
+ }
+
+ if ((bool)v != true)
+ {
+ TestLibrary.TestFramework.LogError("0010.2", "expect (bool)(true as IConvertible).ToType(typeof(Object), null) == true");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ /// <summary>
+ /// convert to float
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest11()
+ {
+ bool retVal = true;
+ try
+ {
+ if ((float)(true as IConvertible).ToType(typeof(float), null) != 1.0f)
+ {
+ TestLibrary.TestFramework.LogError("011.1", "expect (float)(true as IConvertible).ToType(typeof(float), null) == 1.0f");
+ retVal = false;
+ }
+ if ((float)(false as IConvertible).ToType(typeof(float), null) != 0.0f)
+ {
+ TestLibrary.TestFramework.LogError("011.1", "expect (float)(false as IConvertible).ToType(typeof(float), null) == 0.0f");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("011", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ /// <summary>
+ /// convert to double
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest12()
+ {
+ bool retVal = true;
+ try
+ {
+ if ((double)(true as IConvertible).ToType(typeof(double), null) != 1.0)
+ {
+ TestLibrary.TestFramework.LogError("012.1", "expect (double)(true as IConvertible).ToType(typeof(double), null) == 1.0");
+ retVal = false;
+ }
+ if ((double)(false as IConvertible).ToType(typeof(double), null) != 0.0)
+ {
+ TestLibrary.TestFramework.LogError("012.1", "expect (double)(false as IConvertible).ToType(typeof(double), null) == 0.0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ /// <summary>
+ /// convert to decimal
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest13()
+ {
+ bool retVal = true;
+ try
+ {
+ if ((decimal)(true as IConvertible).ToType(typeof(decimal), null) != (decimal)1.0)
+ {
+ TestLibrary.TestFramework.LogError("013.1", "expect (decimal)(true as IConvertible).ToType(typeof(decimal), null) == (decimal)1.0");
+ retVal = false;
+ }
+ if ((decimal)(false as IConvertible).ToType(typeof(decimal), null) != (decimal)0.0)
+ {
+ TestLibrary.TestFramework.LogError("013.1", "expect (decimal)(false as IConvertible).ToType(typeof(decimal), null) == (decimal)0.0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("013", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+
+ #region Negative test cases
+
+ /// <summary>
+ /// convert to char and expcet InvalidCastException
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ char v = (char)(true as IConvertible).ToType(typeof(Char), null);
+ TestLibrary.TestFramework.LogError("001",
+ String.Format("expected a InvalidCastException on (true as IConvertible).ToType(typeof(Char), null) but got {0}", v));
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ retVal = true;
+ return retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ /// <summary>
+ /// convert to DateTime and expcet InvalidCastException
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ DateTime v = (DateTime)(true as IConvertible).ToType(typeof(DateTime), null);
+ TestLibrary.TestFramework.LogError("002",
+ String.Format("expected a InvalidCastException on (true as IConvertible).ToType(typeof(DateTime), null) but got {0}", v));
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ retVal = true;
+ return retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ /// <summary>
+ /// convert to MyTestClass and expcet InvalidCastException
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ try
+ {
+ MyTestClass v = (MyTestClass)(true as IConvertible).ToType(typeof(MyTestClass), null);
+ TestLibrary.TestFramework.LogError("003",
+ String.Format("expected a InvalidCastException on (true as IConvertible).ToType(typeof(MyTestClass), null) but got {0}", v));
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ retVal = true;
+ return retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletouint16.cs b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletouint16.cs
new file mode 100644
index 0000000000..e7d6acfab1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletouint16.cs
@@ -0,0 +1,78 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class BooleanIConvertibleToUInt16
+{
+
+ public static int Main()
+ {
+ BooleanIConvertibleToUInt16 testCase = new BooleanIConvertibleToUInt16();
+
+ TestLibrary.TestFramework.BeginTestCase("Boolean.IConvertible.ToUInt16");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ if ( (true as IConvertible).ToUInt16(null) != (ushort)1 )
+ {
+ TestLibrary.TestFramework.LogError("001", "expect (true as IConvertible).ToUInt16(null) == (ushort)1");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ if ((false as IConvertible).ToUInt16(null) != (ushort)0)
+ {
+ TestLibrary.TestFramework.LogError("002", "expect (false as IConvertible).ToUInt16(null) == (ushort)0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletouint32.cs b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletouint32.cs
new file mode 100644
index 0000000000..8d2dabf9ca
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletouint32.cs
@@ -0,0 +1,78 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class BooleanIConvertibleToUInt32
+{
+
+ public static int Main()
+ {
+ BooleanIConvertibleToUInt32 testCase = new BooleanIConvertibleToUInt32();
+
+ TestLibrary.TestFramework.BeginTestCase("Boolean.IConvertible.ToUInt32");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ if ( (true as IConvertible).ToUInt32(null) != 1 )
+ {
+ TestLibrary.TestFramework.LogError("001", "expect (true as IConvertible).ToUInt32(null) == 1");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ if ((false as IConvertible).ToUInt32(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("002", "expect (false as IConvertible).ToUInt32(null) == 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletouint64.cs b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletouint64.cs
new file mode 100644
index 0000000000..f677d551cf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleaniconvertibletouint64.cs
@@ -0,0 +1,78 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class BooleanIConvertibleToInt64
+{
+
+ public static int Main()
+ {
+ BooleanIConvertibleToInt64 testCase = new BooleanIConvertibleToInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("Boolean.IConvertible.ToInt64");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ if ( (true as IConvertible).ToUInt64(null) != 1 )
+ {
+ TestLibrary.TestFramework.LogError("001", "expect (true as IConvertible).ToUInt64(null) == 1");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ if ((false as IConvertible).ToUInt64(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("002", "expect (false as IConvertible).ToUInt64(null) == 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleanparse.cs b/tests/src/CoreMangLib/cti/system/boolean/booleanparse.cs
new file mode 100644
index 0000000000..0090df02cd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleanparse.cs
@@ -0,0 +1,188 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// to test System.Boolean.Parse(string)
+/// </summary>
+public class BooleanParse
+{
+ // not using Boolean.TrueString/FalseString in order to not test circularly
+ const string cTRUE = "True";
+ const string cFALSE = "False";
+
+ public static int Main()
+ {
+ BooleanParse testCase = new BooleanParse();
+
+ TestLibrary.TestFramework.BeginTestCase("Boolean.Parse");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+
+ return retVal;
+ }
+
+
+
+ public bool PosTest1()
+ {
+ return PosTest("001", cFALSE, false);
+ }
+
+ public bool PosTest2()
+ {
+ return PosTest("002", cTRUE, true);
+ }
+
+ public bool PosTest3()
+ {
+ return PosTest("003", "\t"+cTRUE, true);
+ }
+ public bool PosTest4()
+ {
+ return PosTest("004", cFALSE+" ", false);
+ }
+
+ public bool PosTest5()
+ {
+ return PosTest("005", " "+cFALSE+"\t ", false);
+ }
+
+ public bool PosTest6()
+ {
+ return PosTest("006", "fAlse", false);
+ }
+
+ public bool PosTest7()
+ {
+ return PosTest("007", "tRUE", true);
+ }
+
+ bool PosTest(string id, string str, bool expect)
+ {
+ bool retVal = true;
+ try
+ {
+ if (Boolean.Parse(str) != expect)
+ {
+ TestLibrary.TestFramework.LogError(id, String.Format("expect Boolean.Parse(\"{0}\") == {1}",str, expect));
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(id, "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool NegTest1()
+ {
+ bool retVal = false;
+ try
+ {
+ bool v = Boolean.Parse(null);
+ }
+ catch (ArgumentNullException)
+ {
+ // that exception is what's expected
+ retVal = true;
+ return retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ return retVal;
+ }
+
+ TestLibrary.TestFramework.LogError("001", "expect a FormatException on Boolean.Parse(null)");
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ return NegTest("002", "0");
+ }
+ public bool NegTest3()
+ {
+ return NegTest("003", "1");
+ }
+ public bool NegTest4()
+ {
+ return NegTest("004", "Yes");
+ }
+ public bool NegTest5()
+ {
+ return NegTest("005", String.Empty);
+ }
+ public bool NegTest6()
+ {
+ return NegTest("006", cTRUE + cFALSE);
+ }
+
+ public bool NegTest7()
+ {
+ return NegTest("007", cFALSE +" "+ cTRUE);
+ }
+
+ bool NegTest(string id, string str)
+ {
+ bool retVal = false;
+ try
+ {
+ bool v = Boolean.Parse(str);
+ }
+ catch ( FormatException )
+ {
+ // that exception is what's expected
+ retVal = true;
+ return retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(id, "Unexpected exception: " + e);
+ retVal = false;
+ return retVal;
+ }
+
+ TestLibrary.TestFramework.LogError(id, String.Format("expect a FormatException on Boolean.Parse(\"{0}\")", str));
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleantostring.cs b/tests/src/CoreMangLib/cti/system/boolean/booleantostring.cs
new file mode 100644
index 0000000000..b51a5f2071
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleantostring.cs
@@ -0,0 +1,83 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Boolean.ToString()
+/// </summary>
+public class BooleanToString
+{
+ const string cTRUE = "True";
+ const string cFALSE = "False";
+
+ #region Main Entry
+ public static int Main()
+ {
+ BooleanToString testCase = new BooleanToString();
+
+ TestLibrary.TestFramework.BeginTestCase("Boolean.ToString");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #endregion
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ if (true.ToString() != cTRUE)
+ {
+ TestLibrary.TestFramework.LogError("001", "expect true.ToString() != \"True\"");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ if (false.ToString() != cFALSE)
+ {
+ TestLibrary.TestFramework.LogError("002", "expect false.ToString() != \"False\"");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleantruestring.cs b/tests/src/CoreMangLib/cti/system/boolean/booleantruestring.cs
new file mode 100644
index 0000000000..ddcaa4ae43
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleantruestring.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class BooleanTrueString
+{
+ const string TRUE_STRING = "True";
+ public static int Main()
+ {
+ BooleanTrueString testCase = new BooleanTrueString();
+
+ TestLibrary.TestFramework.BeginTestCase("Boolean.TrueString");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ if (Boolean.TrueString != TRUE_STRING)
+ {
+ TestLibrary.TestFramework.LogError("001", "expect Boolean.TrueString == \"True\" ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/boolean/booleantryparse.cs b/tests/src/CoreMangLib/cti/system/boolean/booleantryparse.cs
new file mode 100644
index 0000000000..ae745ba29a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/boolean/booleantryparse.cs
@@ -0,0 +1,97 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+// This test was ported over to CoreCLR from Co7521TryParse.cs
+// Tests Boolean.TryParse(str)
+// 2003/02/25 KatyK
+// 2007/06/28 adapted by MarielY
+public class BooleanTryParse
+{
+ static bool verbose = false;
+
+ public static int Main()
+ {
+ bool passed = true;
+
+ try
+ {
+ // Success cases
+ passed &= VerifyBooleanTryParse("True", true, true);
+ passed &= VerifyBooleanTryParse("true", true, true);
+ passed &= VerifyBooleanTryParse("TRUE", true, true);
+ passed &= VerifyBooleanTryParse("tRuE", true, true);
+ passed &= VerifyBooleanTryParse("False", false, true);
+ passed &= VerifyBooleanTryParse("false", false, true);
+ passed &= VerifyBooleanTryParse("FALSE", false, true);
+ passed &= VerifyBooleanTryParse("fAlSe", false, true);
+ passed &= VerifyBooleanTryParse(" True ", true, true);
+ passed &= VerifyBooleanTryParse("False ", false, true);
+ passed &= VerifyBooleanTryParse("True\0", true, true); // VSWhidbey 465401
+ passed &= VerifyBooleanTryParse("False\0", false, true);
+ passed &= VerifyBooleanTryParse("True\0 ", true, true);
+ passed &= VerifyBooleanTryParse(" \0 \0 True \0 ", true, true);
+ passed &= VerifyBooleanTryParse(" False \0\0\0 ", false, true);
+
+ // Fail cases
+ passed &= VerifyBooleanTryParse(null, false, false);
+ passed &= VerifyBooleanTryParse("", false, false);
+ passed &= VerifyBooleanTryParse(" ", false, false);
+ passed &= VerifyBooleanTryParse("Garbage", false, false);
+ passed &= VerifyBooleanTryParse("True\0Garbage", false, false);
+ passed &= VerifyBooleanTryParse("True\0True", false, false);
+ passed &= VerifyBooleanTryParse("True True", false, false);
+ passed &= VerifyBooleanTryParse("True False", false, false);
+ passed &= VerifyBooleanTryParse("False True", false, false);
+ passed &= VerifyBooleanTryParse("Fa lse", false, false);
+ passed &= VerifyBooleanTryParse("T", false, false);
+ passed &= VerifyBooleanTryParse("0", false, false);
+ passed &= VerifyBooleanTryParse("1", false, false);
+
+ /// END TEST CASES
+ }
+ catch (Exception e)
+ {
+ TestLibrary.Logging.WriteLine("Unexpected exception!! " + e.ToString());
+ passed = false;
+ }
+
+ if (passed)
+ {
+ TestLibrary.Logging.WriteLine ("paSs");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.Logging.WriteLine ("FAiL");
+ return 1;
+ }
+ }
+
+ public static bool VerifyBooleanTryParse(string value, bool expectedResult, bool expectedReturn) {
+ bool result;
+ if (verbose) {
+ TestLibrary.Logging.WriteLine ("Test: Boolean.TryParse, Value = '{0}', Expected Result, {1}, Expected Return = {2}",
+ value, expectedResult, expectedReturn);
+ }
+ try {
+ bool returnValue = Boolean.TryParse(value, out result);
+ if (returnValue != expectedReturn) {
+ TestLibrary.Logging.WriteLine ("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedReturn, returnValue);
+ return false;
+ }
+ if (result != expectedResult) {
+ TestLibrary.Logging.WriteLine ("FAILURE: Value = '{0}', Expected Result: {1}, Actual Result: {2}", value, expectedResult, result);
+ return false;
+ }
+
+ return true;
+ }
+ catch (Exception ex) {
+ TestLibrary.Logging.WriteLine ("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteEquals1.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteEquals1.csproj
new file mode 100644
index 0000000000..7e9650d061
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteEquals1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="byteequals1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteEquals2.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteEquals2.csproj
new file mode 100644
index 0000000000..8d0f10ec4c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteEquals2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="byteequals2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteGetHashCode.csproj
new file mode 100644
index 0000000000..4cc22b3d0d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="bytegethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToBoolean.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToBoolean.csproj
new file mode 100644
index 0000000000..2e138064a5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToBoolean.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="byteiconvertibletoboolean.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToByte.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToByte.csproj
new file mode 100644
index 0000000000..a189858852
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="byteiconvertibletobyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToChar.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToChar.csproj
new file mode 100644
index 0000000000..2f2680670d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToChar.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="byteiconvertibletochar.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToDateTime.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToDateTime.csproj
new file mode 100644
index 0000000000..f2c6b98f58
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToDateTime.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="byteiconvertibletodatetime.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToDecimal.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToDecimal.csproj
new file mode 100644
index 0000000000..5c8234ccf6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToDecimal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="byteiconvertibletodecimal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToDouble.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToDouble.csproj
new file mode 100644
index 0000000000..4d652c7c3f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToDouble.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="byteiconvertibletodouble.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToInt16.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToInt16.csproj
new file mode 100644
index 0000000000..3365efe2cd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="byteiconvertibletoint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToInt32.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToInt32.csproj
new file mode 100644
index 0000000000..520dba8242
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="byteiconvertibletoint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToInt64.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToInt64.csproj
new file mode 100644
index 0000000000..3852ecf243
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="byteiconvertibletoint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToSByte.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToSByte.csproj
new file mode 100644
index 0000000000..9cfa7442c2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToSByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="byteiconvertibletosbyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToSingle.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToSingle.csproj
new file mode 100644
index 0000000000..6bb05da9ba
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToSingle.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="byteiconvertibletosingle.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToType.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToType.csproj
new file mode 100644
index 0000000000..decaca238d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToType.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="byteiconvertibletotype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToUInt16.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToUInt16.csproj
new file mode 100644
index 0000000000..9b14c505f0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToUInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="byteiconvertibletouint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToUInt32.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToUInt32.csproj
new file mode 100644
index 0000000000..58a2d2882b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToUInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="byteiconvertibletouint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToUInt64.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToUInt64.csproj
new file mode 100644
index 0000000000..877f5c3342
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteIConvertibleToUInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="byteiconvertibletouint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteMaxValue.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteMaxValue.csproj
new file mode 100644
index 0000000000..1e7e62884e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteMaxValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="bytemaxvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteMinValue.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteMinValue.csproj
new file mode 100644
index 0000000000..830833cf3e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteMinValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="byteminvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteParse1.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteParse1.csproj
new file mode 100644
index 0000000000..0e80c5397f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteParse1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="byteparse1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteParse3.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteParse3.csproj
new file mode 100644
index 0000000000..d2d84416db
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteParse3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="byteparse3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteToString2.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteToString2.csproj
new file mode 100644
index 0000000000..282fff4814
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteToString2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="bytetostring2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteToString3.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteToString3.csproj
new file mode 100644
index 0000000000..b997ebda4f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteToString3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="bytetostring3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteToString4.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteToString4.csproj
new file mode 100644
index 0000000000..9d650cbff9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteToString4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="bytetostring4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/ByteTryParse.csproj b/tests/src/CoreMangLib/cti/system/byte/ByteTryParse.csproj
new file mode 100644
index 0000000000..d997a55c17
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/ByteTryParse.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="bytetryparse.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/byte/byteequals1.cs b/tests/src/CoreMangLib/cti/system/byte/byteequals1.cs
new file mode 100644
index 0000000000..24874bfcfa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/byteequals1.cs
@@ -0,0 +1,170 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Byte.Equals(System.Byte)
+/// </summary>
+public class ByteEquals1
+{
+ public static int Main(string[] args)
+ {
+ ByteEquals1 equal1 = new ByteEquals1();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte.Equals(System.Byte)...");
+
+ if (equal1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify byte1 is less than byte2...");
+
+ try
+ {
+ Byte byte1 = 20;
+ Byte byte2 = 30;
+
+ if (byte1.Equals(byte2))
+ {
+ TestLibrary.TestFramework.LogError("001", "The compare result is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify byte1 is larger than byte2...");
+
+ try
+ {
+ Byte byte1 = 30;
+ Byte byte2 = 20;
+
+ if (byte1.Equals(byte2))
+ {
+ TestLibrary.TestFramework.LogError("003", "The compare result is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify byte1 is equal to byte2...");
+
+ try
+ {
+ Byte byte1 = 20;
+ Byte byte2 = 20;
+
+ if (!byte1.Equals(byte2))
+ {
+ TestLibrary.TestFramework.LogError("005", "The compare result is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify Byte instance compare to itself...");
+
+ try
+ {
+ Byte byte1 = 20;
+
+ if (!byte1.Equals(byte1))
+ {
+ TestLibrary.TestFramework.LogError("007", "The result of compare is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify Byte instance compare to Int32 instance when they have the same values...");
+
+ try
+ {
+ Byte byte1 = 20;
+ Int32 int1 = 20;
+
+ if (byte1.Equals(int1))
+ {
+ TestLibrary.TestFramework.LogError("009","The compare result is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/byte/byteequals2.cs b/tests/src/CoreMangLib/cti/system/byte/byteequals2.cs
new file mode 100644
index 0000000000..1ac0286fdc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/byteequals2.cs
@@ -0,0 +1,171 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+
+/// <summary>
+/// System.Byte,Equals(System.Object)
+/// </summary>
+public class ByteEquals2
+{
+ public static int Main(string[] args)
+ {
+ ByteEquals2 equal2 = new ByteEquals2();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte.Equals(System.Object)...");
+
+ if (equal2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify byte1 is less than byte2...");
+
+ try
+ {
+ Byte byte1 = 20;
+ object byte2 = (Byte)30;
+
+ if (byte1.Equals(byte2))
+ {
+ TestLibrary.TestFramework.LogError("001", "The compare result is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify byte1 is larger than byte2...");
+
+ try
+ {
+ Byte byte1 = 30;
+ object byte2 = (Byte)20;
+
+ if (byte1.Equals(byte2))
+ {
+ TestLibrary.TestFramework.LogError("003", "The compare result is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify byte1 is equal to byte2...");
+
+ try
+ {
+ Byte byte1 = 20;
+ object byte2 = (Byte)20;
+
+ if (!byte1.Equals(byte2))
+ {
+ TestLibrary.TestFramework.LogError("005", "The compare result is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify Byte instance compare to itself...");
+
+ try
+ {
+ Byte byte1 = 20;
+
+ if (!byte1.Equals((object)byte1))
+ {
+ TestLibrary.TestFramework.LogError("007", "The result of compare is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify Byte instance compare to Int32 instance when they have the same values...");
+
+ try
+ {
+ Byte byte1 = 20;
+ Int32 int1 = 20;
+
+ if (byte1.Equals((object)int1))
+ {
+ TestLibrary.TestFramework.LogError("009", "The compare result is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/byte/bytegethashcode.cs b/tests/src/CoreMangLib/cti/system/byte/bytegethashcode.cs
new file mode 100644
index 0000000000..2123066a82
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/bytegethashcode.cs
@@ -0,0 +1,157 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+
+/// <summary>
+/// System.Byte.GetHashCode
+/// </summary>
+public class ByteGetHashCode
+{
+ public static int Main(string[] args)
+ {
+ ByteGetHashCode hashCode = new ByteGetHashCode();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte.GetHashCode()...");
+
+ if (hashCode.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify hashCode of two Byte instance should be different...");
+
+ try
+ {
+ Byte byte1;
+ Byte byte2;
+ do
+ {
+ byte1 = TestLibrary.Generator.GetByte(-55);
+ byte2 = TestLibrary.Generator.GetByte(-55);
+ }while(byte1 == byte2);
+
+ if (byte1.GetHashCode() == byte2.GetHashCode())
+ {
+ TestLibrary.TestFramework.LogError("001","The hashcode should be different!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexcepted exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify hashCode should be changed when value is modified...");
+
+ try
+ {
+ Byte byte1 = TestLibrary.Generator.GetByte(-55);
+ int hashcode1 = byte1.GetHashCode();
+ //Don't generate a second random number, since the new one could have the same hashcode.
+ byte1 = (byte)(byte1 + 1);
+ int hashcode2 = byte1.GetHashCode();
+
+ if (hashcode1 == hashcode2)
+ {
+ TestLibrary.TestFramework.LogError("003","The hashcode should not be equal!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify hashcode when two instance have the same reference...");
+
+ try
+ {
+ Byte byte1 = TestLibrary.Generator.GetByte(-55);
+ Byte byte2 = byte1;
+ int hashcode1 = byte1.GetHashCode();
+ int hashcode2 = byte2.GetHashCode();
+
+ if (hashcode1 != hashcode2)
+ {
+ TestLibrary.TestFramework.LogError("005","The hashcode should be equal!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginTestCase("Verify hashcode when create Byte instance assigned to null...");
+
+ try
+ {
+ Byte? byte1 = null;
+ int hashcode = byte1.GetHashCode();
+
+ if (hashcode != 0)
+ {
+ TestLibrary.TestFramework.LogError("007","The hashcode is not zero!");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletoboolean.cs b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletoboolean.cs
new file mode 100644
index 0000000000..0961567714
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletoboolean.cs
@@ -0,0 +1,134 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Globalization;
+
+
+public class ByteIConvertibleToBoolean
+{
+ public static int Main(string[] args)
+ {
+ ByteIConvertibleToBoolean toBoolean = new ByteIConvertibleToBoolean();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte.IConvertible.ToBoolean(System.IFormatProvider)...");
+
+ if (toBoolean.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the bool instance is false when the value of byte is zero...");
+
+ try
+ {
+ string byteString = "@0";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ bool toBool = ((IConvertible)myByte).ToBoolean(numberFormat);
+
+ if (toBool)
+ {
+ TestLibrary.TestFramework.LogError("001", "the value of bool should be false!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify the bool instance is true when the value of byte is non-zero...");
+
+ try
+ {
+ string byteString = "@10";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ bool toBool = ((IConvertible)myByte).ToBoolean(numberFormat);
+
+ if (!toBool)
+ {
+ TestLibrary.TestFramework.LogError("003", "the value of bool should be true!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify the bool instance is true when the value of byte is maxValue...");
+
+ try
+ {
+ string byteString = "@255";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ bool toBool = ((IConvertible)myByte).ToBoolean(numberFormat);
+
+ if (!toBool)
+ {
+ TestLibrary.TestFramework.LogError("005", "the value of bool should be true!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletobyte.cs b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletobyte.cs
new file mode 100644
index 0000000000..8318708d4a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletobyte.cs
@@ -0,0 +1,196 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+
+
+/// <summary>
+/// System.Byte.Iconvertible.ToByte(System.IFormatProvider)
+/// </summary>
+public class ByteIConvertibleToByte
+{
+ public static int Main(string[] args)
+ {
+ ByteIConvertibleToByte toByte = new ByteIConvertibleToByte();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte.IConvertible.ToByte(System.IFormatProvider)...");
+
+ if (toByte.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify convert byte value when positiveSign is set...");
+
+ try
+ {
+ string byteString = "plus128";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.PositiveSign = "plus";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ Byte conVertByte = ((IConvertible)myByte).ToByte(numberFormat);
+ if (conVertByte != myByte)
+ {
+ TestLibrary.TestFramework.LogError("001", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify convert byte value when CurrencySymbol is set...");
+
+ try
+ {
+ string byteString = "@10";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Byte conVertByte = ((IConvertible)myByte).ToByte(numberFormat);
+
+ if (conVertByte != myByte)
+ {
+ TestLibrary.TestFramework.LogError("003", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify NumberGroupSeparator of format provider is set...");
+
+ try
+ {
+ string byteString = "1_2_3";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.NumberGroupSeparator = "_";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ Byte conVertByte = ((IConvertible)myByte).ToByte(numberFormat);
+
+ if (myByte != conVertByte)
+ {
+ TestLibrary.TestFramework.LogError("005", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify byteString is maxValue...");
+
+ try
+ {
+ string byteString = "@255";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Byte conVertByte = ((IConvertible)myByte).ToByte(numberFormat);
+
+ if (myByte != conVertByte)
+ {
+ TestLibrary.TestFramework.LogError("007", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify byteString is minValue...");
+
+ try
+ {
+ string byteString = "@0";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Byte conVertByte = ((IConvertible)myByte).ToByte(numberFormat);
+
+ if (myByte != conVertByte)
+ {
+ TestLibrary.TestFramework.LogError("009", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletochar.cs b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletochar.cs
new file mode 100644
index 0000000000..1c2a7628b5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletochar.cs
@@ -0,0 +1,196 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+
+
+/// <summary>
+/// System.Byte.IConvertible.ToChar(System.IFormatProvider)
+/// </summary>
+public class ByteIConvertibleToChar
+{
+ public static int Main(string[] args)
+ {
+ ByteIConvertibleToChar toChar = new ByteIConvertibleToChar();
+ TestLibrary.TestFramework.BeginScenario("Testing System.Byte.Iconvertible.ToChar(System.IFormatProvider)...");
+
+ if (toChar.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify convert byte value when positiveSign is set...");
+
+ try
+ {
+ string byteString = "plus128";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.PositiveSign = "plus";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ Char conVertChar = ((IConvertible)myByte).ToChar(numberFormat);
+
+ if (Convert.ToInt32(conVertChar) != 128)
+ {
+ TestLibrary.TestFramework.LogError("001", "Convert to char is not correct!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify convert byte value when CurrencySymbol is set...");
+
+ try
+ {
+ string byteString = "@10";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Char conVertChar = ((IConvertible)myByte).ToChar(numberFormat);
+
+ if (Convert.ToInt32(conVertChar) != 10)
+ {
+ TestLibrary.TestFramework.LogError("003", "Convert to char is not correct!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify NumberGroupSeparator of format provider is set...");
+
+ try
+ {
+ string byteString = "1_2_3";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.NumberGroupSeparator = "_";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ Char conVertChar = ((IConvertible)myByte).ToChar(numberFormat);
+
+ if (Convert.ToInt32(conVertChar) != 123)
+ {
+ TestLibrary.TestFramework.LogError("005", "Convert to char is not correct!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify byteString is maxValue...");
+
+ try
+ {
+ string byteString = "@255";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Char conVertChar = ((IConvertible)myByte).ToChar(numberFormat);
+
+ if (Convert.ToInt32(conVertChar) != 255)
+ {
+ TestLibrary.TestFramework.LogError("007", "Convert to char is not correct!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify byteString is minValue...");
+
+ try
+ {
+ string byteString = "@0";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Char conVertChar = ((IConvertible)myByte).ToChar(numberFormat);
+
+ if (Convert.ToInt32(conVertChar) != 0)
+ {
+ TestLibrary.TestFramework.LogError("009", "Convert to char is not correct!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletodatetime.cs b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletodatetime.cs
new file mode 100644
index 0000000000..a1449fa604
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletodatetime.cs
@@ -0,0 +1,197 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+
+/// <summary>
+/// System.Byte.IConvertible.ToDateTime(System.IFormatProvider)
+/// </summary>
+public class ByteIConvertibleToDateTime
+{
+ public static int Main(string[] args)
+ {
+ ByteIConvertibleToDateTime toDateTime = new ByteIConvertibleToDateTime();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte.IConvertible.ToDateTime(System.IFormatProvider)...");
+
+ if (toDateTime.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify convert Byte value when positiveSign is set...");
+
+ try
+ {
+ string byteString = "plus128";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.PositiveSign = "plus";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ DateTime conVertDateTime = ((IConvertible)myByte).ToDateTime(numberFormat);
+
+ TestLibrary.TestFramework.LogError("001", "No exception occurs!");
+ retVal = false;
+
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify convert byte value when CurrencySymbol is set...");
+
+ try
+ {
+ string byteString = "@10";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ DateTime conVertDateTime = ((IConvertible)myByte).ToDateTime(numberFormat);
+
+ TestLibrary.TestFramework.LogError("003", "No exception occurs!");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify NumberGroupSeparator of format provider is set...");
+
+ try
+ {
+ string byteString = "1_2_3";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.NumberGroupSeparator = "_";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ DateTime conVertDateTime = ((IConvertible)myByte).ToDateTime(numberFormat);
+
+ TestLibrary.TestFramework.LogError("005", "No exception occurs!");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify byteString is maxValue...");
+
+ try
+ {
+ string byteString = "@255";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ DateTime conVertDateTime = ((IConvertible)myByte).ToDateTime(numberFormat);
+
+ TestLibrary.TestFramework.LogError("007", "No exception occurs!");
+ retVal = false;
+
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify byteString is minValue...");
+
+ try
+ {
+ string byteString = "@0";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ DateTime conVertDateTime = ((IConvertible)myByte).ToDateTime(numberFormat);
+
+ TestLibrary.TestFramework.LogError("009", "No exception occurs!");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletodecimal.cs b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletodecimal.cs
new file mode 100644
index 0000000000..fee740d542
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletodecimal.cs
@@ -0,0 +1,196 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+
+
+/// <summary>
+/// System.Byte.IConvertible.ToDecimal(System.IFormatProvider)
+/// </summary>
+public class ByteIConvertibleToDecimal
+{
+ public static int Main(string[] args)
+ {
+ ByteIConvertibleToDecimal toDecimal = new ByteIConvertibleToDecimal();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte.IConvertible.ToDecimal(System.IFormatProvider)...");
+
+ if (toDecimal.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify convert byte value when positiveSign is set...");
+
+ try
+ {
+ string byteString = "plus128";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.PositiveSign = "plus";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ Decimal toDecimal = ((IConvertible)myByte).ToDecimal(numberFormat);
+
+ if (toDecimal != 128)
+ {
+ TestLibrary.TestFramework.LogError("001", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify convert byte value when CurrencySymbol is set...");
+
+ try
+ {
+ string byteString = "@10";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Decimal conVertDecimal = ((IConvertible)myByte).ToDecimal(numberFormat);
+
+ if (conVertDecimal != 10)
+ {
+ TestLibrary.TestFramework.LogError("003", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify NumberGroupSeparator of format provider is set...");
+
+ try
+ {
+ string byteString = "1_2_3";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.NumberGroupSeparator = "_";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ Decimal conVertDecimal = ((IConvertible)myByte).ToDecimal(numberFormat);
+
+ if (conVertDecimal != 123)
+ {
+ TestLibrary.TestFramework.LogError("005", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify byteString is maxValue...");
+
+ try
+ {
+ string byteString = "@255";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Decimal conVertDecimal = ((IConvertible)myByte).ToDecimal(numberFormat);
+
+ if (conVertDecimal != 255)
+ {
+ TestLibrary.TestFramework.LogError("007", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify byteString is minValue...");
+
+ try
+ {
+ string byteString = "@0";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Decimal conVertDecimal = ((IConvertible)myByte).ToDecimal(numberFormat);
+
+ if (conVertDecimal != 0)
+ {
+ TestLibrary.TestFramework.LogError("009", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletodouble.cs b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletodouble.cs
new file mode 100644
index 0000000000..6ff339d4f0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletodouble.cs
@@ -0,0 +1,198 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+
+
+/// <summary>
+/// System.Byte.IConvertible.ToDecimal(System.IFormatProvide)
+/// </summary>
+public class ByteIConvertibleToDouble
+{
+ public static int Main(string[] args)
+ {
+ ByteIConvertibleToDouble toDouble = new ByteIConvertibleToDouble();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte.IConvertible.ToDouble(System.IFormatProvide)...");
+
+ if (toDouble.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify convert byte value when positiveSign is set...");
+
+ try
+ {
+ string byteString = "plus128";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.PositiveSign = "plus";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ Double conVertDouble = ((IConvertible)myByte).ToDouble(numberFormat);
+
+ if (conVertDouble != 128.0)
+ {
+ TestLibrary.TestFramework.LogError("001", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify convert byte value when CurrencySymbol is set...");
+
+ try
+ {
+ string byteString = "@10";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Double conVertDouble = ((IConvertible)myByte).ToDouble(numberFormat);
+
+ if (conVertDouble != 10.0)
+ {
+ TestLibrary.TestFramework.LogError("003", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify NumberGroupSeparator of format provider is set...");
+
+ try
+ {
+ string byteString = "1_2_3";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.NumberGroupSeparator = "_";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ Double conVertDouble = ((IConvertible)myByte).ToDouble(numberFormat);
+
+ if (conVertDouble != 123.0)
+ {
+ TestLibrary.TestFramework.LogError("005", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify byteString is maxValue...");
+
+ try
+ {
+ string byteString = "@255";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Double conVertDouble = ((IConvertible)myByte).ToDouble(numberFormat);
+
+ if (conVertDouble != 255.0)
+ {
+ TestLibrary.TestFramework.LogError("007", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify byteString is minValue...");
+
+ try
+ {
+ string byteString = "@0";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Double conVertDouble = ((IConvertible)myByte).ToDouble(numberFormat);
+
+ if (conVertDouble != 0.0)
+ {
+ TestLibrary.TestFramework.LogError("009", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletoint16.cs b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletoint16.cs
new file mode 100644
index 0000000000..12e4ba8a84
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletoint16.cs
@@ -0,0 +1,196 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+
+
+/// <summary>
+/// System.Byte.IConvertible.ToInt16(System.IFormatProvider)
+/// </summary>
+public class ByteIConvertibleToInt16
+{
+ public static int Main(string[] args)
+ {
+ ByteIConvertibleToInt16 toInt16 = new ByteIConvertibleToInt16();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte.IConvertible.ToInt16(System.IFormatProvider)...");
+
+ if (toInt16.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify convert byte value when positiveSign is set...");
+
+ try
+ {
+ string byteString = "plus128";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.PositiveSign = "plus";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ Int16 conVertInt16 = ((IConvertible)myByte).ToInt16(numberFormat);
+
+ if (conVertInt16 != 128)
+ {
+ TestLibrary.TestFramework.LogError("001", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify convert byte value when CurrencySymbol is set...");
+
+ try
+ {
+ string byteString = "@10";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Int16 conVertInt16 = ((IConvertible)myByte).ToInt16(numberFormat);
+
+ if (conVertInt16 != 10)
+ {
+ TestLibrary.TestFramework.LogError("003", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify NumberGroupSeparator of format provider is set...");
+
+ try
+ {
+ string byteString = "1_2_3";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.NumberGroupSeparator = "_";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ Int16 conVertInt16 = ((IConvertible)myByte).ToInt16(numberFormat);
+
+ if (conVertInt16 != 123)
+ {
+ TestLibrary.TestFramework.LogError("005", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify byteString is maxValue...");
+
+ try
+ {
+ string byteString = "@255";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Int16 conVertInt16 = ((IConvertible)myByte).ToInt16(numberFormat);
+
+ if (conVertInt16 != 255)
+ {
+ TestLibrary.TestFramework.LogError("007", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify byteString is minValue...");
+
+ try
+ {
+ string byteString = "@0";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Int16 conVertInt16 = ((IConvertible)myByte).ToInt16(numberFormat);
+
+ if (conVertInt16 != 0)
+ {
+ TestLibrary.TestFramework.LogError("009", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletoint32.cs b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletoint32.cs
new file mode 100644
index 0000000000..ff21b24321
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletoint32.cs
@@ -0,0 +1,196 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+
+
+/// <summary>
+/// System.Byte.IConvertible.ToInt32(System.IFormatProvider)
+/// </summary>
+public class ByteIConvertibleToInt32
+{
+ public static int Main(string[] args)
+ {
+ ByteIConvertibleToInt32 toInt32 = new ByteIConvertibleToInt32();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte.IConvertible.ToInt32(System.IFormatProvider)...");
+
+ if (toInt32.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify convert byte value when positiveSign is set...");
+
+ try
+ {
+ string byteString = "plus128";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.PositiveSign = "plus";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ Int32 conVertInt32 = ((IConvertible)myByte).ToInt32(numberFormat);
+
+ if (conVertInt32 != 128)
+ {
+ TestLibrary.TestFramework.LogError("001", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify convert byte value when CurrencySymbol is set...");
+
+ try
+ {
+ string byteString = "@10";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Int32 conVertInt32 = ((IConvertible)myByte).ToInt32(numberFormat);
+
+ if (conVertInt32 != 10)
+ {
+ TestLibrary.TestFramework.LogError("003", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify NumberGroupSeparator of format provider is set...");
+
+ try
+ {
+ string byteString = "1_2_3";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.NumberGroupSeparator = "_";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ Int32 conVertInt32 = ((IConvertible)myByte).ToInt32(numberFormat);
+
+ if (conVertInt32 != 123)
+ {
+ TestLibrary.TestFramework.LogError("005", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify byteString is maxValue...");
+
+ try
+ {
+ string byteString = "@255";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Int32 conVertInt32 = ((IConvertible)myByte).ToInt32(numberFormat);
+
+ if (conVertInt32 != 255)
+ {
+ TestLibrary.TestFramework.LogError("007", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify byteString is minValue...");
+
+ try
+ {
+ string byteString = "@0";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Int32 conVertInt32 = ((IConvertible)myByte).ToInt32(numberFormat);
+
+ if (conVertInt32 != 0)
+ {
+ TestLibrary.TestFramework.LogError("009", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletoint64.cs b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletoint64.cs
new file mode 100644
index 0000000000..fd080b5a55
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletoint64.cs
@@ -0,0 +1,196 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+
+
+/// <summary>
+/// System.Byte.IConvertible.ToInt64(System.IFormatProvider)
+/// </summary>
+public class ByteIConvertibleToInt64
+{
+ public static int Main(string[] args)
+ {
+ ByteIConvertibleToInt64 toInt64 = new ByteIConvertibleToInt64();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte.IConvertible.ToInt64(System.IFormatProvider)...");
+
+ if (toInt64.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify convert byte value when positiveSign is set...");
+
+ try
+ {
+ string byteString = "plus128";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.PositiveSign = "plus";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ Int64 conVertInt64 = ((IConvertible)myByte).ToInt64(numberFormat);
+
+ if (conVertInt64 != 128L)
+ {
+ TestLibrary.TestFramework.LogError("001", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify convert byte value when CurrencySymbol is set...");
+
+ try
+ {
+ string byteString = "@10";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Int64 conVertInt64 = ((IConvertible)myByte).ToInt64(numberFormat);
+
+ if (conVertInt64 != 10L)
+ {
+ TestLibrary.TestFramework.LogError("003", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify NumberGroupSeparator of format provider is set...");
+
+ try
+ {
+ string byteString = "1_2_3";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.NumberGroupSeparator = "_";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ Int64 conVertInt64 = ((IConvertible)myByte).ToInt64(numberFormat);
+
+ if (conVertInt64 != 123L)
+ {
+ TestLibrary.TestFramework.LogError("005", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify byteString is maxValue...");
+
+ try
+ {
+ string byteString = "@255";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Int64 conVertInt64 = ((IConvertible)myByte).ToInt64(numberFormat);
+
+ if (conVertInt64 != 255L)
+ {
+ TestLibrary.TestFramework.LogError("007", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify byteString is minValue...");
+
+ try
+ {
+ string byteString = "@0";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Int64 conVertInt64 = ((IConvertible)myByte).ToInt64(numberFormat);
+
+ if (conVertInt64 != 0L)
+ {
+ TestLibrary.TestFramework.LogError("009", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletosbyte.cs b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletosbyte.cs
new file mode 100644
index 0000000000..b3691333f8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletosbyte.cs
@@ -0,0 +1,197 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+
+
+/// <summary>
+/// System.Byte.IConvertible.ToSByte(System.IFormatProvider)
+/// </summary>
+public class ByteIConvertibleToSByte
+{
+ public static int Main(string[] args)
+ {
+ ByteIConvertibleToSByte toSByte = new ByteIConvertibleToSByte();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte.IConvertible.ToSByte(System.IFormatProvider)");
+
+ if (toSByte.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify convert byte value when positiveSign is set...");
+
+ try
+ {
+ string byteString = "plus64";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.PositiveSign = "plus";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ SByte sByte = ((IConvertible)myByte).ToSByte(numberFormat);
+
+ if (sByte != 64)
+ {
+ TestLibrary.TestFramework.LogError("001", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify convert byte value when CurrencySymbol is set...");
+
+ try
+ {
+ string byteString = "@64";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ SByte sByte = ((IConvertible)myByte).ToSByte(numberFormat);
+
+ if (sByte != 64)
+ {
+ TestLibrary.TestFramework.LogError("003", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify NumberGroupSeparator of format provider is set...");
+
+ try
+ {
+ string byteString = "1_2_3";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.NumberGroupSeparator = "_";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ SByte sByte = ((IConvertible)myByte).ToSByte(numberFormat);
+
+ if (sByte != 123)
+ {
+ TestLibrary.TestFramework.LogError("005", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify byteString is maxValue...");
+
+ try
+ {
+ string byteString = "@127";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ SByte sByte = ((IConvertible)myByte).ToSByte(numberFormat);
+
+ if (sByte != 127)
+ {
+ TestLibrary.TestFramework.LogError("007", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify byteString is minValue...");
+
+ try
+ {
+ string byteString = "@0";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ SByte sByte = ((IConvertible)myByte).ToSByte(numberFormat);
+
+ if (sByte != 0)
+ {
+ TestLibrary.TestFramework.LogError("009", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletosingle.cs b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletosingle.cs
new file mode 100644
index 0000000000..0a3c6ea2f7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletosingle.cs
@@ -0,0 +1,196 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+
+
+/// <summary>
+/// System.Byte.IConvertible.Tosingle(System.IFormatProvider)
+/// </summary>
+public class ByteIConvertibleToSingle
+{
+ public static int Main(string[] args)
+ {
+ ByteIConvertibleToSingle toSingle = new ByteIConvertibleToSingle();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte.IConvertible.ToSingle(System.IFormatProvider)...");
+
+ if (toSingle.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify convert byte value when positiveSign is set...");
+
+ try
+ {
+ string byteString = "plus128";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.PositiveSign = "plus";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ Single conVertSingle = ((IConvertible)myByte).ToSingle(numberFormat);
+
+ if (conVertSingle != 128.0)
+ {
+ TestLibrary.TestFramework.LogError("001", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify convert byte value when CurrencySymbol is set...");
+
+ try
+ {
+ string byteString = "@10";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Single conVertSingle = ((IConvertible)myByte).ToSingle(numberFormat);
+
+ if (conVertSingle != 10.0)
+ {
+ TestLibrary.TestFramework.LogError("003", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify NumberGroupSeparator of format provider is set...");
+
+ try
+ {
+ string byteString = "1_2_3";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.NumberGroupSeparator = "_";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ Single conVertSingle = ((IConvertible)myByte).ToSingle(numberFormat);
+
+ if (conVertSingle != 123.0)
+ {
+ TestLibrary.TestFramework.LogError("005", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify byteString is maxValue...");
+
+ try
+ {
+ string byteString = "@255";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Single conVertSingle = ((IConvertible)myByte).ToSingle(numberFormat);
+
+ if (conVertSingle != 255.0)
+ {
+ TestLibrary.TestFramework.LogError("007", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify byteString is minValue...");
+
+ try
+ {
+ string byteString = "@0";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ Single conVertSingle = ((IConvertible)myByte).ToSingle(numberFormat);
+
+ if (conVertSingle != 0.0)
+ {
+ TestLibrary.TestFramework.LogError("009", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletotype.cs b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletotype.cs
new file mode 100644
index 0000000000..e507c19dbb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletotype.cs
@@ -0,0 +1,561 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Globalization;
+
+public class MyClass
+{
+ private int m_value = 0;
+
+ public MyClass()
+ {
+ this.m_value = 0;
+ }
+
+ public MyClass(int value)
+ {
+ this.m_value = value;
+ }
+}
+
+/// <summary>
+/// System.Byte.IConvertible.ToType(System.Type,System.IFormatProvider)
+/// </summary>
+public class ByteIConvertibleToType
+{
+ public static int Main(string[] args)
+ {
+ ByteIConvertibleToType toType = new ByteIConvertibleToType();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte.IConvertible.ToType(System.Type,System.IFormatProvider)...");
+
+ if (toType.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+ retVal = PosTest12() && retVal;
+ retVal = PosTest13() && retVal;
+ retVal = PosTest14() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ //retVal = NegTest3() && retVal;
+
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify convert byte value when positiveSign is set and type is Boolean...");
+
+ try
+ {
+ string byteString = "plus128";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.PositiveSign = "plus";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ object conVertObj = ((IConvertible)myByte).ToType(typeof(Boolean),numberFormat);
+
+ if (conVertObj.ToString() != "True")
+ {
+ TestLibrary.TestFramework.LogError("001", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify convert byte value when CurrencySymbol is set and type is Byte...");
+
+ try
+ {
+ string byteString = "@10";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ object conVertObj = ((IConvertible)myByte).ToType(typeof(Byte),numberFormat);
+
+ if (conVertObj.ToString() != "10")
+ {
+ TestLibrary.TestFramework.LogError("003", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify NumberGroupSeparator of format provider is set and type is decimal...");
+
+ try
+ {
+ string byteString = "1_2_3";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.NumberGroupSeparator = "_";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ object conVertObj = ((IConvertible)myByte).ToType(typeof(Decimal),numberFormat);
+
+ if (conVertObj.ToString() != "123")
+ {
+ TestLibrary.TestFramework.LogError("005", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify byteString is maxValue and type is double...");
+
+ try
+ {
+ string byteString = "@255";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ object conVertObj = ((IConvertible)myByte).ToType(typeof(Double),numberFormat);
+
+ if (conVertObj.ToString() != "255")
+ {
+ TestLibrary.TestFramework.LogError("007", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify byteString is minValue and type is single...");
+
+ try
+ {
+ string byteString = "@0";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ object conVertSingle = ((IConvertible)myByte).ToType(typeof(Single),numberFormat);
+
+ if (conVertSingle.ToString() != "0")
+ {
+ TestLibrary.TestFramework.LogError("009", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Verify byteString is the middle value and type is Int16...");
+
+ try
+ {
+ string byteString = "@128";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ object conVertInt16 = ((IConvertible)myByte).ToType(typeof(Int16), numberFormat);
+
+ if (conVertInt16.ToString() != "128")
+ {
+ TestLibrary.TestFramework.LogError("011", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Verify byteString is the middle value and type is Int32...");
+
+ try
+ {
+ string byteString = "@128";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ object conVertInt32 = ((IConvertible)myByte).ToType(typeof(Int32), numberFormat);
+
+ if (conVertInt32.ToString() != "128")
+ {
+ TestLibrary.TestFramework.LogError("013", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest8: Verify byteString is the middle value and type is Int64...");
+
+ try
+ {
+ string byteString = "@128";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ object conVertInt64 = ((IConvertible)myByte).ToType(typeof(Int64), numberFormat);
+
+ if (conVertInt64.ToString() != "128")
+ {
+ TestLibrary.TestFramework.LogError("015", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest9: Verify byteString is the valid value for SByte and type is SByte...");
+
+ try
+ {
+ string byteString = "@127";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ object conVertSByte = ((IConvertible)myByte).ToType(typeof(SByte), numberFormat);
+
+ if (conVertSByte.ToString() != "127")
+ {
+ TestLibrary.TestFramework.LogError("017", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest10()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest10: Verify byteString is the valid value for UInt16 and type is UInt16...");
+
+ try
+ {
+ string byteString = "@127";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ object conVertUInt16 = ((IConvertible)myByte).ToType(typeof(UInt16), numberFormat);
+
+ if (conVertUInt16.ToString() != "127")
+ {
+ TestLibrary.TestFramework.LogError("019", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest11()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest11: Verify byteString is the valid value for UInt32 and type is UInt32...");
+
+ try
+ {
+ string byteString = "@127";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ object conVertUInt32 = ((IConvertible)myByte).ToType(typeof(UInt32), numberFormat);
+
+ if (conVertUInt32.ToString() != "127")
+ {
+ TestLibrary.TestFramework.LogError("021", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("022", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest12()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest12: Verify byteString is the valid value for UInt32 and type is UInt64...");
+
+ try
+ {
+ string byteString = "@127";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ object conVertUInt64 = ((IConvertible)myByte).ToType(typeof(UInt64), numberFormat);
+
+ if (conVertUInt64.ToString() != "127")
+ {
+ TestLibrary.TestFramework.LogError("023", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("024", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest13()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest13: Verify byteString is the valid value and type is object...");
+
+ try
+ {
+ string byteString = "@127";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ object conVertOBj = ((IConvertible)myByte).ToType(typeof(Object), numberFormat);
+
+ if (conVertOBj.ToString() != "127")
+ {
+ TestLibrary.TestFramework.LogError("025", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("026", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest14()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest14: Verify the type is char...");
+
+ try
+ {
+ string byteString = "@127";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ object conVertChar = ((IConvertible)myByte).ToType(typeof(Char), numberFormat);
+
+ if (conVertChar.ToString() != "")
+ {
+ TestLibrary.TestFramework.LogError("027", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("028", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Verify InvalidCastException is thrown when type is DateTime...");
+
+ try
+ {
+ string byteString = "@127";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ object conVertDateTime = ((IConvertible)myByte).ToType(typeof(DateTime), numberFormat);
+
+ if (conVertDateTime.ToString() != "127")
+ {
+ TestLibrary.TestFramework.LogError("101", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Verify InvalidCastException is thrown when type is customer defined...");
+
+ try
+ {
+ string byteString = "@127";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ object conVertMyClass = ((IConvertible)myByte).ToType(typeof(MyClass), numberFormat);
+
+ if (conVertMyClass.ToString() != "127")
+ {
+ TestLibrary.TestFramework.LogError("101", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletouint16.cs b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletouint16.cs
new file mode 100644
index 0000000000..c7c1f2f7fc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletouint16.cs
@@ -0,0 +1,196 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+
+
+/// <summary>
+/// System.Byte.IConvertible.ToUInt16
+/// </summary>
+public class ByteIConvertibleToUInt16
+{
+ public static int Main(string[] args)
+ {
+ ByteIConvertibleToUInt16 toUInt16 = new ByteIConvertibleToUInt16();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte.IConvertible.ToUInt16(System.IFormatProvider)...");
+
+ if (toUInt16.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify convert byte value when positiveSign is set...");
+
+ try
+ {
+ string byteString = "plus128";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.PositiveSign = "plus";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ UInt16 conVertUInt16 = ((IConvertible)myByte).ToUInt16(numberFormat);
+
+ if (conVertUInt16 != 128)
+ {
+ TestLibrary.TestFramework.LogError("001", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify convert byte value when CurrencySymbol is set...");
+
+ try
+ {
+ string byteString = "@10";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ UInt16 conVertUInt16 = ((IConvertible)myByte).ToUInt16(numberFormat);
+
+ if (conVertUInt16 != 10)
+ {
+ TestLibrary.TestFramework.LogError("003", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify NumberGroupSeparator of format provider is set...");
+
+ try
+ {
+ string byteString = "1_2_3";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.NumberGroupSeparator = "_";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ UInt16 conVertUInt16 = ((IConvertible)myByte).ToUInt16(numberFormat);
+
+ if (conVertUInt16 != 123)
+ {
+ TestLibrary.TestFramework.LogError("005", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify byteString is maxValue...");
+
+ try
+ {
+ string byteString = "@255";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ UInt16 conVertUInt16 = ((IConvertible)myByte).ToUInt16(numberFormat);
+
+ if (conVertUInt16 != 255)
+ {
+ TestLibrary.TestFramework.LogError("007", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify byteString is minValue...");
+
+ try
+ {
+ string byteString = "@0";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ UInt16 conVertUInt16 = ((IConvertible)myByte).ToUInt16(numberFormat);
+
+ if (conVertUInt16 != 0)
+ {
+ TestLibrary.TestFramework.LogError("009", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletouint32.cs b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletouint32.cs
new file mode 100644
index 0000000000..c7e2d8256d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletouint32.cs
@@ -0,0 +1,197 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+
+
+/// <summary>
+/// System.Byte.IConvertible.ToUInt32(System.IFormatProvider)
+/// </summary>
+public class ByteIConvertibleToUInt32
+{
+ public static int Main(string[] args)
+ {
+ ByteIConvertibleToUInt32 toUInt32 = new ByteIConvertibleToUInt32();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte.IConvertible.ToUInt32(System.IFormatProvider)");
+
+ if (toUInt32.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify convert byte value when positiveSign is set...");
+
+ try
+ {
+ string byteString = "plus128";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.PositiveSign = "plus";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ UInt32 conVertUInt32 = ((IConvertible)myByte).ToUInt32(numberFormat);
+
+ if (conVertUInt32 != 128)
+ {
+ TestLibrary.TestFramework.LogError("001", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify convert byte value when CurrencySymbol is set...");
+
+ try
+ {
+ string byteString = "@10";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ UInt32 conVertUInt32 = ((IConvertible)myByte).ToUInt32(numberFormat);
+
+ if (conVertUInt32 != 10)
+ {
+ TestLibrary.TestFramework.LogError("003", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify NumberGroupSeparator of format provider is set...");
+
+ try
+ {
+ string byteString = "1_2_3";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.NumberGroupSeparator = "_";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ UInt32 conVertUInt32 = ((IConvertible)myByte).ToUInt32(numberFormat);
+
+ if (conVertUInt32 != 123)
+ {
+ TestLibrary.TestFramework.LogError("005", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify byteString is maxValue...");
+
+ try
+ {
+ string byteString = "@255";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ UInt32 conVertUInt32 = ((IConvertible)myByte).ToUInt32(numberFormat);
+
+ if (conVertUInt32 != 255)
+ {
+ TestLibrary.TestFramework.LogError("007", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify byteString is minValue...");
+
+ try
+ {
+ string byteString = "@0";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ UInt32 conVertUInt32 = ((IConvertible)myByte).ToUInt32(numberFormat);
+
+ if (conVertUInt32 != 0)
+ {
+ TestLibrary.TestFramework.LogError("009", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletouint64.cs b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletouint64.cs
new file mode 100644
index 0000000000..f3e36b2070
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/byteiconvertibletouint64.cs
@@ -0,0 +1,196 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+
+
+/// <summary>
+/// System.Byte.IConvertible.ToUInt64(System.IFormatProvider)
+/// </summary>
+public class ByteIConvertibleToUInt64
+{
+ public static int Main(string[] args)
+ {
+ ByteIConvertibleToUInt64 toUInt64 = new ByteIConvertibleToUInt64();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte.IConvertible.ToUInt64(System.IFormatProvider)...");
+
+ if (toUInt64.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify convert byte value when positiveSign is set...");
+
+ try
+ {
+ string byteString = "plus128";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.PositiveSign = "plus";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ UInt32 conVertUInt32 = ((IConvertible)myByte).ToUInt32(numberFormat);
+
+ if (conVertUInt32 != 128)
+ {
+ TestLibrary.TestFramework.LogError("001", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify convert byte value when CurrencySymbol is set...");
+
+ try
+ {
+ string byteString = "@10";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ UInt32 conVertUInt32 = ((IConvertible)myByte).ToUInt32(numberFormat);
+
+ if (conVertUInt32 != 10)
+ {
+ TestLibrary.TestFramework.LogError("003", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify NumberGroupSeparator of format provider is set...");
+
+ try
+ {
+ string byteString = "1_2_3";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.NumberGroupSeparator = "_";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+ UInt32 conVertUInt32 = ((IConvertible)myByte).ToUInt32(numberFormat);
+
+ if (conVertUInt32 != 123)
+ {
+ TestLibrary.TestFramework.LogError("005", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify byteString is maxValue...");
+
+ try
+ {
+ string byteString = "@255";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ UInt32 conVertUInt32 = ((IConvertible)myByte).ToUInt32(numberFormat);
+
+ if (conVertUInt32 != 255)
+ {
+ TestLibrary.TestFramework.LogError("007", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify byteString is minValue...");
+
+ try
+ {
+ string byteString = "@0";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+ UInt32 conVertUInt32 = ((IConvertible)myByte).ToUInt32(numberFormat);
+
+ if (conVertUInt32 != 0)
+ {
+ TestLibrary.TestFramework.LogError("009", "The convert byte is not equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/byte/bytemaxvalue.cs b/tests/src/CoreMangLib/cti/system/byte/bytemaxvalue.cs
new file mode 100644
index 0000000000..fc7f3c34ac
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/bytemaxvalue.cs
@@ -0,0 +1,94 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Byte.MaxValue
+/// </summary>
+public class ByteMaxValue
+{
+ public static int Main(string[] args)
+ {
+ ByteMaxValue maxValue = new ByteMaxValue();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte.MaxValue property...");
+
+ if (maxValue.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify the MaxValue of Byte is 255...");
+
+ try
+ {
+ Byte max = Byte.MaxValue;
+
+ if (max != 255)
+ {
+ TestLibrary.TestFramework.LogError("001","The MaxValue of Byte is not 255!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify using number larger than MaxValue to create Byte instance...");
+
+ try
+ {
+ int beyondMax = 256;
+ Byte beyondByte = (Byte)beyondMax;
+
+ if (beyondByte != beyondMax % 256)
+ {
+ TestLibrary.TestFramework.LogError("003","The converting is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004","Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ return retVal;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/byte/byteminvalue.cs b/tests/src/CoreMangLib/cti/system/byte/byteminvalue.cs
new file mode 100644
index 0000000000..512e301824
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/byteminvalue.cs
@@ -0,0 +1,94 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Byte.MinValue
+/// </summary>
+public class ByteMinValue
+{
+ public static int Main(string[] args)
+ {
+ ByteMinValue minValue = new ByteMinValue();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte,MinValue property...");
+
+ if (minValue.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify the MinValue of Byte is zero...");
+
+ try
+ {
+ Byte min = Byte.MinValue;
+
+ if (min != 0)
+ {
+ TestLibrary.TestFramework.LogError("001","The MinValue of Byte is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify using negtive number to create Byte instance...");
+
+ try
+ {
+ int beyondMax = -1;
+ Byte beyondByte = (Byte)beyondMax;
+
+ if (beyondByte != (beyondMax+256) % 256)
+ {
+ TestLibrary.TestFramework.LogError("003", "The converting is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ return retVal;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/byte/byteparse1.cs b/tests/src/CoreMangLib/cti/system/byte/byteparse1.cs
new file mode 100644
index 0000000000..081c36f622
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/byteparse1.cs
@@ -0,0 +1,329 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+
+/// <summary>
+/// System.Byte.Parse(System.String)
+/// </summary>
+public class ByteParse1
+{
+ public static int Main(string[] args)
+ {
+ ByteParse1 parse1 = new ByteParse1();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte.Parse(System.String)...");
+
+ if (parse1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify byteString is between Byte.MinValue and Byte.MaxValue...");
+
+ try
+ {
+ string byteString = "99";
+ Byte myByte = Byte.Parse(byteString);
+
+ if (myByte != 99)
+ {
+ TestLibrary.TestFramework.LogError("001","The value should be equal to byteString.ToInt...");
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify byteString contains +...");
+
+ try
+ {
+ string byteString = "+99";
+ Byte myByte = Byte.Parse(byteString);
+
+ if (myByte != 99)
+ {
+ TestLibrary.TestFramework.LogError("003","The value should be equal to byteString.ToInt...");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004","Unexcepted exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify byteString is equal to Byte.MaxValue...");
+
+ try
+ {
+ string byteString = "255";
+ Byte myByte = Byte.Parse(byteString);
+
+ if (myByte != 255)
+ {
+ TestLibrary.TestFramework.LogError("005", "byteString should be equal to Byte.MaxValue!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify byteString is equal to Byte.MinValue...");
+
+ try
+ {
+ string byteString = "0";
+ Byte myByte = Byte.Parse(byteString);
+
+ if (myByte != 0)
+ {
+ TestLibrary.TestFramework.LogError("007", "byteString should be equal to Byte.MinValue!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify OverFlowException is thrown when byteString is greater than Byte.MaxValue...");
+
+ try
+ {
+ string byteString = "256";
+ Byte myByte = Byte.Parse(byteString);
+
+ TestLibrary.TestFramework.LogError("009","No exception occurs!");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify OverFlowException is thrown when byteString is less than Byte.MinValue...");
+
+ try
+ {
+ string byteString = "-1";
+ Byte myByte = Byte.Parse(byteString);
+
+ TestLibrary.TestFramework.LogError("011","No exception occurs!");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify ArgumentNullException occurs when byteString is null...");
+
+ try
+ {
+ string byteString = null;
+ Byte myByte = Byte.Parse(byteString);
+
+ TestLibrary.TestFramework.LogError("013", "No exception occurs!");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify byteString is between Byte.MaxValue and Byte.MinValue and contains plus...");
+
+ try
+ {
+ string byteString = "plus222";
+ Byte myByte = Byte.Parse(byteString);
+
+ TestLibrary.TestFramework.LogError("015", "No exception occurs!");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify byteString contains underline...");
+
+ try
+ {
+ string byteString = "1_2_3";
+ Byte myByte = Byte.Parse(byteString);
+
+ TestLibrary.TestFramework.LogError("017", "No exception occurs!");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify byteString contains only characters...");
+
+ try
+ {
+ string byteString = "hello";
+ Byte myByte = Byte.Parse(byteString);
+
+ TestLibrary.TestFramework.LogError("017", "No exception occurs!");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify byteString is an empty string...");
+
+ try
+ {
+ string byteString = "";
+ Byte myByte = Byte.Parse(byteString);
+
+ TestLibrary.TestFramework.LogError("017", "No exception occurs!");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/byte/byteparse3.cs b/tests/src/CoreMangLib/cti/system/byte/byteparse3.cs
new file mode 100644
index 0000000000..ef5afbd979
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/byteparse3.cs
@@ -0,0 +1,344 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Globalization;
+
+/// <summary>
+/// System.Byte.Parse(System.String,System.Globalization.NumberStyles,System.IFormatProvider)
+/// </summary>
+public class ByteParse3
+{
+ public static int Main(string[] args)
+ {
+ ByteParse3 parse3 = new ByteParse3();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte.Parse(System.String,System.Globalization.NumberStyles,System.IFormatProvider)...");
+
+ if (parse3.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify PositiveSign of format provider takes effect...");
+
+ try
+ {
+ string byteString = "plus128";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.PositiveSign = "plus";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+
+ if (myByte != 128)
+ {
+ TestLibrary.TestFramework.LogError("001", "The format provider does not takes effect!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify NumberGroupSeperator of format provider takes effect...");
+
+ try
+ {
+ string byteString = "1_2_3";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.NumberGroupSeparator = "_";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+
+ if (myByte != 123)
+ {
+ TestLibrary.TestFramework.LogError("003", "The NumberGroupSeparator of format provider does not takes effect!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify currency symbol of format provider should take effect...");
+
+ try
+ {
+ string byteString = "@123";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency, numberFormat);
+
+ if (myByte != 123)
+ {
+ TestLibrary.TestFramework.LogError("005", "The currency symbol of format provider does not take effect!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify byteString is maxValue...");
+
+ try
+ {
+ string byteString = "@255";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+
+ if (myByte != 255)
+ {
+ TestLibrary.TestFramework.LogError("007", "The format provider should takes effect!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify byteString is minValue...");
+
+ try
+ {
+ string byteString = "@0";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+
+ if (myByte != 0)
+ {
+ TestLibrary.TestFramework.LogError("009", "The format provider should takes effect!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Verify byteString is more than maxValue...");
+
+ try
+ {
+ string byteString = "@256";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+
+ TestLibrary.TestFramework.LogError("101", "The format provider should takes effect!");
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Verify byteString is less than minValue...");
+
+ try
+ {
+ string byteString = "@-1";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "@";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Currency | NumberStyles.Number, numberFormat);
+
+ TestLibrary.TestFramework.LogError("103", "The format provider should takes effect!");
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Verify byteString is null referrence...");
+
+ try
+ {
+ string byteString = null;
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.PositiveSign = "plus";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+
+ TestLibrary.TestFramework.LogError("105", "No exception occurs!");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: Verify byteString is not of the correct format...");
+
+ try
+ {
+ string byteString = "plusHelloWorld!";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.PositiveSign = "plus";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number, numberFormat);
+
+ TestLibrary.TestFramework.LogError("107", "No exception occurs!");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest5: Verify style is not a combination of AllowHexSpecifier and HexNumber values...");
+
+ try
+ {
+ string byteString = "#2fD";
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numberFormat = culture.NumberFormat;
+ numberFormat.CurrencySymbol = "#";
+
+ Byte myByte = Byte.Parse(byteString, NumberStyles.Number | NumberStyles.Currency | NumberStyles.AllowHexSpecifier, numberFormat);
+
+ TestLibrary.TestFramework.LogError("109", "No exception occurs!");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("110", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/byte/bytetostring2.cs b/tests/src/CoreMangLib/cti/system/byte/bytetostring2.cs
new file mode 100644
index 0000000000..41b8dd060e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/bytetostring2.cs
@@ -0,0 +1,135 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+
+
+/// <summary>
+/// System.Byte.ToString(System.IFormatProvider)
+/// </summary>
+public class ByteToString2
+{
+ public static int Main(string[] args)
+ {
+ ByteToString2 toString2 = new ByteToString2();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte.ToString(System.IFormatProvider)...");
+
+ if (toString2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify NumberGroupSeparator of provider is _");
+
+ try
+ {
+ Byte myByte = 128;
+
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numInfo = culture.NumberFormat;
+ numInfo.NumberGroupSizes = new int[] { 1 };
+ numInfo.NumberGroupSeparator = "_";
+ numInfo.NumberDecimalDigits = 0;
+
+ string myByteString = myByte.ToString(numInfo);
+ if (myByteString != "128")
+ {
+ TestLibrary.TestFramework.LogError("001","The byte string is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify NumberGroupSeparator of provider is _");
+
+ try
+ {
+ Byte myByte = 128;
+
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numInfo = culture.NumberFormat;
+ numInfo.CurrencySymbol = "$";
+ numInfo.CurrencyDecimalDigits = 0;
+
+ string myByteString = myByte.ToString(numInfo);
+ if (myByteString != "128")
+ {
+ TestLibrary.TestFramework.LogError("003", "The byte string is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify PositiveSign of provider is plus...");
+
+ try
+ {
+ Byte myByte = 128;
+
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numInfo = culture.NumberFormat;
+ numInfo.PositiveSign = "plus";
+ numInfo.NumberDecimalDigits = 0;
+
+ string myByteString = myByte.ToString("N",numInfo);
+ if (myByteString != "128")
+ {
+ TestLibrary.TestFramework.LogError("005", "The byte string is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/byte/bytetostring3.cs b/tests/src/CoreMangLib/cti/system/byte/bytetostring3.cs
new file mode 100644
index 0000000000..7418dc927f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/bytetostring3.cs
@@ -0,0 +1,120 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Globalization;
+using TestLibrary;
+
+/// <summary>
+/// System.Byte.ToString3(System.String)
+/// </summary>
+public class ByteToString3
+{
+ public static int Main(string[] args)
+ {
+ ByteToString3 toString3 = new ByteToString3();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte.ToString(System.String)...");
+
+ if (toString3.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ private CultureInfo CurrentCulture = TestLibrary.Utilities.CurrentCulture;
+ private CultureInfo customCulture = null;
+
+ private CultureInfo CustomCulture
+ {
+ get
+ {
+ if (null == customCulture)
+ {
+ customCulture = new CultureInfo(CultureInfo.CurrentCulture.Name);
+ NumberFormatInfo nfi = customCulture.NumberFormat;
+ //For "X", The result string isn't affected by the formatting information of the current NumberFormatInfo
+
+ //For "C"
+ // CurrencyPositivePattern, CurrencySymbol, CurrencyDecimalDigits, CurrencyDecimalSeparator, CurrencyGroupSeparator, CurrencyGroupSizes.
+ // Not consider NegativeSign and CurrencyNegativePattern for Byte
+ nfi.CurrencyDecimalDigits = 3; //Default: 2
+ nfi.CurrencyDecimalSeparator = ","; //Default: ","
+ nfi.CurrencyGroupSeparator = "."; //Default: "."
+ nfi.CurrencyGroupSizes = new int[] { 2 }; //Default: new int[]{3}
+ //nfi.NegativeSign = "-";
+ //nfi.CurrencyNegativePattern = 0;
+ nfi.CurrencyPositivePattern = 1; //Default: 0
+ nfi.CurrencySymbol = "USD"; //Default: "$"
+
+ //For "D"
+ // NegativeSign isn't taken care of consideration for Byte
+
+ //For "E"
+ // PositiveSign, and NumberDecimalSeparator. Not consider NegativeSign for Byte.
+ // If precision specifier is omitted, a default of six digits after the decimal point is used.
+ nfi.PositiveSign = "++"; //Default: "+"
+ nfi.NumberDecimalSeparator = ","; //Default: "."
+
+ //For "F"
+ // NumberDecimalDigits, and NumberDecimalSeparator. Not consider NegativeSign for Byte.
+ nfi.NumberDecimalDigits = 3; //Default: 2
+
+ //For "N"
+ // NumberGroupSizes, NumberGroupSeparator, NumberDecimalSeparator and NumberDecimalDigits. Not considfer NumberNegativePattern and NegativeSign for Byte
+ nfi.NumberGroupSizes = new int[] { 2 }; //Default: 3
+ nfi.NumberGroupSeparator = "#"; //Default: ","
+
+ customCulture.NumberFormat = nfi;
+ }
+ return customCulture;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ retVal &= VerifyToString("PostTest1", 128, "X", "80");
+ retVal &= VerifyToString("PostTest2", 128, "D", "128");
+
+ TestLibrary.Utilities.CurrentCulture = CustomCulture;
+
+ retVal &= VerifyToString("PostTest3", 128, "C", "1.28,000USD");
+ retVal &= VerifyToString("PostTest4, default", 128, "E", TestLibrary.Utilities.IsWindows ? "1,280000E++002" : "1,280000E2");
+ retVal &= VerifyToString("PostTest4, 4digits", 128, "E4", TestLibrary.Utilities.IsWindows ? "1,2800E++002" : "1,2800E2");
+ retVal &= VerifyToString("PostTest5", 128, "F", "128,000");
+ retVal &= VerifyToString("PostTest6", 128, "N", "1#28,000");
+
+ TestLibrary.Utilities.CurrentCulture = CurrentCulture;
+
+ return retVal;
+ }
+
+ private bool VerifyToString(String id, Byte myByte, String format, String expected)
+ {
+ try
+ {
+ String actual = myByte.ToString(format);
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError(id + "_001", "Expected: " + expected + " Actual: " + actual);
+ return false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(id + "_002", "Unexpected exception occurs: " + e);
+ return false;
+ }
+ return true;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/byte/bytetostring4.cs b/tests/src/CoreMangLib/cti/system/byte/bytetostring4.cs
new file mode 100644
index 0000000000..8e1f2049aa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/bytetostring4.cs
@@ -0,0 +1,221 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+
+
+/// <summary>
+/// System.Byte.ToString(System.String,System.IFormatProvider)
+/// </summary>
+public class ByteToString4
+{
+ public static int Main(string[] args)
+ {
+ ByteToString4 toString4 = new ByteToString4();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Byte.ToString(System.String,System.IFormatProvider)...");
+
+ if (toString4.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify NumberGroupSeparator of provider is _ and format string is N");
+
+ try
+ {
+ Byte myByte = 128;
+
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numInfo = culture.NumberFormat;
+ numInfo.NumberGroupSizes = new int[] { 1 };
+ numInfo.NumberGroupSeparator = "_";
+ numInfo.NumberDecimalDigits = 0;
+
+ string myByteString = myByte.ToString("N",numInfo);
+ if (myByteString != "1_2_8")
+ {
+ TestLibrary.TestFramework.LogError("001", "The byte string is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify CurrencySymbol of provider is $ and format string is C...");
+
+ try
+ {
+ Byte myByte = 128;
+
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numInfo = culture.NumberFormat;
+ numInfo.CurrencySymbol = "$";
+ numInfo.CurrencyDecimalDigits = 0;
+
+ string myByteString = myByte.ToString("C",numInfo);
+ if (myByteString != "$128")
+ {
+ TestLibrary.TestFramework.LogError("003", "The currency string is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify X format convert hex string...");
+
+ try
+ {
+ Byte myByte = 128;
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numInfo = culture.NumberFormat;
+ numInfo.PositiveSign = "plus";
+ string myByteString = myByte.ToString("X",numInfo);
+
+ if (myByteString != "80")
+ {
+ TestLibrary.TestFramework.LogError("005", "The hex string is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify D format convert decimal string...");
+
+ try
+ {
+ Byte myByte = 128;
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numInfo = culture.NumberFormat;
+ numInfo.PositiveSign = "plus";
+ string myByteString = myByte.ToString("D", numInfo);
+
+ if (myByteString != "128")
+ {
+ TestLibrary.TestFramework.LogError("007", "The decimal string is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify E format convert exponential format string...");
+
+ try
+ {
+ Byte myByte = 128;
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numInfo = culture.NumberFormat;
+ numInfo.PositiveSign = "plus";
+ string myByteString = myByte.ToString("E", numInfo);
+
+ if (myByteString != "1.280000Eplus002")
+ {
+ TestLibrary.TestFramework.LogError("009", "The exponential string is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Verify F format convert Fixed-point string...");
+
+ try
+ {
+ Byte myByte = 128;
+ CultureInfo culture = new CultureInfo("");
+ NumberFormatInfo numInfo = culture.NumberFormat;
+ numInfo.PositiveSign = "plus";
+ string myByteString = myByte.ToString("F", numInfo);
+
+ if (myByteString != "128.00")
+ {
+ TestLibrary.TestFramework.LogError("011", "The Fixed-point string is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/byte/bytetryparse.cs b/tests/src/CoreMangLib/cti/system/byte/bytetryparse.cs
new file mode 100644
index 0000000000..f0b08d98a0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/byte/bytetryparse.cs
@@ -0,0 +1,494 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using System.Security;
+
+// This test was ported over to CoreCLR from Co7523TryParse_all.cs
+// Tests Byte.TryParse(String), Byte.TryParse(String, NumberStyles, IFormatProvider, ref Byte)
+// 2003/02/25 KatyK
+// 2007/06/28 adapted by MarielY
+
+public class ByteTryParse
+{
+ static bool verbose = false;
+
+ public static int Main()
+ {
+ bool passed = true;
+
+ try
+ {
+ // Make the test culture independent
+ TestLibrary.Utilities.CurrentCulture = CultureInfo.InvariantCulture;
+
+ // Set up NFIs to use
+ NumberFormatInfo goodNFI = new NumberFormatInfo();
+
+ NumberFormatInfo corruptNFI = new NumberFormatInfo(); // DecimalSeparator == GroupSeparator
+ corruptNFI.NumberDecimalSeparator = ".";
+ corruptNFI.NumberGroupSeparator = ".";
+ corruptNFI.CurrencyDecimalSeparator = ".";
+ corruptNFI.CurrencyGroupSeparator = ".";
+ corruptNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo swappedNFI = new NumberFormatInfo(); // DecimalSeparator & GroupSeparator swapped
+ swappedNFI.NumberDecimalSeparator = ".";
+ swappedNFI.NumberGroupSeparator = ",";
+ swappedNFI.CurrencyDecimalSeparator = ",";
+ swappedNFI.CurrencyGroupSeparator = ".";
+ swappedNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo distinctNFI = new NumberFormatInfo(); // DecimalSeparator & GroupSeparator distinct
+ distinctNFI.NumberDecimalSeparator = ".";
+ distinctNFI.NumberGroupSeparator = ",";
+ distinctNFI.CurrencyDecimalSeparator = ":";
+ distinctNFI.CurrencyGroupSeparator = ";";
+ distinctNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo customNFI = new NumberFormatInfo();
+ customNFI.NegativeSign = "^";
+
+ NumberFormatInfo ambigNFI = new NumberFormatInfo();
+ ambigNFI.NegativeSign = "^";
+ ambigNFI.CurrencySymbol = "^";
+
+ CultureInfo germanCulture = new CultureInfo("de-DE");
+ CultureInfo japaneseCulture;
+
+ try
+ {
+ japaneseCulture = new CultureInfo("ja-JP");
+ }
+ catch (Exception)
+ {
+ TestLibrary.Logging.WriteLine("East Asian Languages are not installed. Skiping Japanese culture tests.");
+ japaneseCulture = null;
+ }
+
+ // Parse tests included for comparison/regression
+ passed &= VerifyByteParse("5", 5);
+ passed &= VerifyByteParse("5 ", 5);
+ passed &= VerifyByteParse("5 \0", 5);
+ passed &= VerifyByteParse("5\0\0\0", 5);
+ passed &= VerifyByteParse("5", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyByteParse("12", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0x12);
+ passed &= VerifyByteParse("fF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFF);
+ passed &= VerifyByteParse("5", NumberStyles.Integer, goodNFI, 5);
+ passed &= VerifyByteParse("5\0", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyByteParse("123", NumberStyles.Integer, germanCulture, 123);
+ passed &= VerifyByteParse("123", NumberStyles.Integer, japaneseCulture, 123);
+ passed &= VerifyByteParse("123,000", NumberStyles.AllowDecimalPoint, germanCulture, 123);
+ passed &= VerifyByteParse("123.000", NumberStyles.AllowDecimalPoint, japaneseCulture, 123);
+ passed &= VerifyByteParse("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 5); // currency
+ //
+ passed &= VerifyByteParse("5", NumberStyles.Integer, corruptNFI, 5);
+ passed &= VerifyByteParse("5", NumberStyles.Number, corruptNFI, 5);
+ passed &= VerifyByteParse("5.0", NumberStyles.Number, corruptNFI, 5);
+ passed &= VerifyByteParseException("5,0", NumberStyles.Number, corruptNFI, typeof(FormatException));
+ passed &= VerifyByteParseException("5.0.0", NumberStyles.Number, corruptNFI, typeof(FormatException));
+ passed &= VerifyByteParse("$5.0", NumberStyles.Currency, corruptNFI, 5);
+ passed &= VerifyByteParseException("$5,0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyByteParseException("$5.0.0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyByteParse("5.0", NumberStyles.Currency, corruptNFI, 5);
+ passed &= VerifyByteParseException("5,0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyByteParseException("5.0.0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyByteParse("5.0", NumberStyles.Any, corruptNFI, 5);
+ passed &= VerifyByteParseException("5,0", NumberStyles.Any, corruptNFI, typeof(FormatException));
+ passed &= VerifyByteParseException("5.0.0", NumberStyles.Any, corruptNFI, typeof(FormatException));
+ //
+ passed &= VerifyByteParse("5", NumberStyles.Integer, swappedNFI, 5);
+ passed &= VerifyByteParse("5", NumberStyles.Number, swappedNFI, 5);
+ passed &= VerifyByteParse("5.0", NumberStyles.Number, swappedNFI, 5);
+ passed &= VerifyByteParseException("5.000.000", NumberStyles.Number, swappedNFI, typeof(FormatException));
+ passed &= VerifyByteParse("5.0", NumberStyles.Currency, swappedNFI, 5); //???
+ passed &= VerifyByteParse("$5.0", NumberStyles.Currency, swappedNFI, 50);
+ passed &= VerifyByteParse("5.0", NumberStyles.Any, swappedNFI, 5); //?
+ passed &= VerifyByteParse("$5.0", NumberStyles.Any, swappedNFI, 50);
+ passed &= VerifyByteParse("5,0", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyByteParse("$5,0", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyByteParse("5,000", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyByteParse("$5,000", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyByteParse("5,000", NumberStyles.Any, swappedNFI, 5);
+ passed &= VerifyByteParse("$5,000", NumberStyles.Any, swappedNFI, 5);
+ //
+ passed &= VerifyByteParse("5.0", NumberStyles.Number, distinctNFI, 5);
+ passed &= VerifyByteParse("5.0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyByteParse("5.0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyByteParseException("$5.0", NumberStyles.Currency, distinctNFI, typeof(FormatException));
+ passed &= VerifyByteParseException("$5.0", NumberStyles.Any, distinctNFI, typeof(FormatException));
+ passed &= VerifyByteParseException("5:0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyByteParseException("$5:0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyByteParse("5:0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyByteParse("$5:0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyByteParse("5:0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyByteParse("$5:0", NumberStyles.Any, distinctNFI, 5);
+
+ passed &= VerifyByteParseException("300", typeof(OverflowException));
+ passed &= VerifyByteParseException("-5", typeof(OverflowException));
+ passed &= VerifyByteParseException("Garbage", typeof(FormatException));
+ passed &= VerifyByteParseException("5\0Garbage", typeof(FormatException));
+ passed &= VerifyByteParseException(null, typeof(ArgumentNullException));
+ passed &= VerifyByteParseException("1FF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, typeof(OverflowException));
+ passed &= VerifyByteParseException("FFFFFFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, typeof(OverflowException));
+ passed &= VerifyByteParseException("5", NumberStyles.AllowHexSpecifier | NumberStyles.AllowParentheses, null, typeof(ArgumentException));
+ passed &= VerifyByteParseException("4", (NumberStyles)(-1), typeof(ArgumentException));
+ passed &= VerifyByteParseException("4", (NumberStyles)0x10000, typeof(ArgumentException));
+ passed &= VerifyByteParseException("4", (NumberStyles)(-1), CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyByteParseException("4", (NumberStyles)0x10000, CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyByteParseException("123.000", NumberStyles.Any, germanCulture, typeof(OverflowException));
+ passed &= VerifyByteParseException("123,000", NumberStyles.Any, japaneseCulture, typeof(OverflowException));
+ passed &= VerifyByteParseException("123,000", NumberStyles.Integer, germanCulture, typeof(FormatException));
+ passed &= VerifyByteParseException("123.000", NumberStyles.Integer, japaneseCulture, typeof(FormatException));
+ passed &= VerifyByteParseException("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Integer, germanCulture, typeof(FormatException)); // currency
+
+ /////////// TryParse(String)
+ //// Pass cases
+ passed &= VerifyByteTryParse("5", 5, true);
+ passed &= VerifyByteTryParse(" 5 ", 5, true);
+ passed &= VerifyByteTryParse("5\0", 5, true);
+ passed &= VerifyByteTryParse("5 \0", 5, true);
+ passed &= VerifyByteTryParse("5\0\0\0", 5, true);
+ passed &= VerifyByteTryParse(Byte.MaxValue.ToString(), Byte.MaxValue, true);
+ passed &= VerifyByteTryParse(Byte.MinValue.ToString(), Byte.MinValue, true);
+
+ //// Fail cases
+ passed &= VerifyByteTryParse(null, 0, false);
+ passed &= VerifyByteTryParse("", 0, false);
+ passed &= VerifyByteTryParse("Garbage", 0, false);
+ passed &= VerifyByteTryParse("5\0Garbage", 0, false);
+ passed &= VerifyByteTryParse("300", 0, false);
+ passed &= VerifyByteTryParse("-5", 0, false);
+ passed &= VerifyByteTryParse("FF", 0, false);
+ passed &= VerifyByteTryParse("27.3", 0, false);
+ passed &= VerifyByteTryParse("23 5", 0, false);
+
+
+ /////////// TryParse(TryParse(String, NumberStyles, IFormatProvider, ref Byte)
+ //// Pass cases
+ passed &= VerifyByteTryParse("5", NumberStyles.Integer, CultureInfo.InvariantCulture, 5, true);
+ // Variations on NumberStyles
+ passed &= VerifyByteTryParse("12", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0x12, true);
+ passed &= VerifyByteTryParse("FF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFF, true);
+ passed &= VerifyByteTryParse("fF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFF, true);
+ passed &= VerifyByteTryParse(" 5", NumberStyles.AllowLeadingWhite, goodNFI, 5, true);
+ passed &= VerifyByteTryParse("5", NumberStyles.Number, goodNFI, 5, true);
+ // Variations on IFP
+ passed &= VerifyByteTryParse("5", NumberStyles.Integer, goodNFI, 5, true);
+ passed &= VerifyByteTryParse("5", NumberStyles.Integer, null, 5, true);
+ passed &= VerifyByteTryParse("5", NumberStyles.Integer, new DateTimeFormatInfo(), 5, true);
+ passed &= VerifyByteTryParse("123", NumberStyles.Integer, germanCulture, 123, true);
+ passed &= VerifyByteTryParse("123", NumberStyles.Integer, japaneseCulture, 123, true);
+ passed &= VerifyByteTryParse("123,000", NumberStyles.AllowDecimalPoint, germanCulture, 123, true);
+ passed &= VerifyByteTryParse("123.000", NumberStyles.AllowDecimalPoint, japaneseCulture, 123, true);
+ passed &= VerifyByteTryParse("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 5, true); // currency
+
+ //// Fail cases
+ passed &= VerifyByteTryParse("FF", NumberStyles.Integer, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifyByteTryParse("1FF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifyByteTryParse("FFFFFFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifyByteTryParse("^42", NumberStyles.Any, customNFI, 0, false);
+ passed &= VerifyByteTryParse("-42", NumberStyles.Any, customNFI, 0, false);
+ passed &= VerifyByteTryParse("5.3", NumberStyles.AllowDecimalPoint, goodNFI, 0, false);
+ passed &= VerifyByteTryParse("5 ", NumberStyles.AllowLeadingWhite, goodNFI, 0, false);
+ passed &= VerifyByteTryParse("123.000", NumberStyles.Any, germanCulture, 0, false);
+ passed &= VerifyByteTryParse("123,000", NumberStyles.Any, japaneseCulture, 0, false);
+ passed &= VerifyByteTryParse("123,000", NumberStyles.Integer, germanCulture, 0, false);
+ passed &= VerifyByteTryParse("123.000", NumberStyles.Integer, japaneseCulture, 0, false);
+ passed &= VerifyByteTryParse("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Integer, germanCulture, 0, false); // currency
+
+ //// Exception cases
+ passed &= VerifyByteTryParseException("5", NumberStyles.AllowHexSpecifier | NumberStyles.AllowParentheses, null, typeof(ArgumentException));
+ passed &= VerifyByteTryParseException("4", (NumberStyles)(-1), CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyByteTryParseException("4", (NumberStyles)0x10000, CultureInfo.InvariantCulture, typeof(ArgumentException));
+
+ // NumberStyles/NFI variations
+ //
+ passed &= VerifyByteTryParse("5", NumberStyles.Integer, corruptNFI, 5, true);
+ passed &= VerifyByteTryParse("5", NumberStyles.Number, corruptNFI, 5, true);
+ passed &= VerifyByteTryParse("5.0", NumberStyles.Number, corruptNFI, 5, true);
+ passed &= VerifyByteTryParse("5,0", NumberStyles.Number, corruptNFI, 0, false);
+ passed &= VerifyByteTryParse("5.0.0", NumberStyles.Number, corruptNFI, 0, false);
+ passed &= VerifyByteTryParse("$5.0", NumberStyles.Currency, corruptNFI, 5, true);
+ passed &= VerifyByteTryParse("$5,0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyByteTryParse("$5.0.0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyByteTryParse("5.0", NumberStyles.Currency, corruptNFI, 5, true);
+ passed &= VerifyByteTryParse("5,0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyByteTryParse("5.0.0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyByteTryParse("5.0", NumberStyles.Any, corruptNFI, 5, true);
+ passed &= VerifyByteTryParse("5,0", NumberStyles.Any, corruptNFI, 0, false);
+ passed &= VerifyByteTryParse("5.0.0", NumberStyles.Any, corruptNFI, 0, false);
+ //
+ passed &= VerifyByteTryParse("5", NumberStyles.Integer, swappedNFI, 5, true);
+ passed &= VerifyByteTryParse("5", NumberStyles.Number, swappedNFI, 5, true);
+ passed &= VerifyByteTryParse("5.0", NumberStyles.Number, swappedNFI, 5, true);
+ passed &= VerifyByteTryParse("5.000.000", NumberStyles.Number, swappedNFI, 0, false);
+ passed &= VerifyByteTryParse("5.0", NumberStyles.Currency, swappedNFI, 5, true); //???
+ passed &= VerifyByteTryParse("$5.0", NumberStyles.Currency, swappedNFI, 50, true);
+ passed &= VerifyByteTryParse("5.0", NumberStyles.Any, swappedNFI, 5, true); //?
+ passed &= VerifyByteTryParse("$5.0", NumberStyles.Any, swappedNFI, 50, true);
+ passed &= VerifyByteTryParse("5,0", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyByteTryParse("$5,0", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyByteTryParse("5,000", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyByteTryParse("$5,000", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyByteTryParse("5,000", NumberStyles.Any, swappedNFI, 5, true);
+ passed &= VerifyByteTryParse("$5,000", NumberStyles.Any, swappedNFI, 5, true);
+ //
+ passed &= VerifyByteTryParse("5.0", NumberStyles.Number, distinctNFI, 5, true);
+ passed &= VerifyByteTryParse("5.0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyByteTryParse("5.0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyByteTryParse("$5.0", NumberStyles.Currency, distinctNFI, 0, false);
+ passed &= VerifyByteTryParse("$5.0", NumberStyles.Any, distinctNFI, 0, false);
+ passed &= VerifyByteTryParse("5:0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyByteTryParse("$5:0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyByteTryParse("5:0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyByteTryParse("$5:0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyByteTryParse("5:0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyByteTryParse("$5:0", NumberStyles.Any, distinctNFI, 5, true);
+
+
+ // Should these pass or fail? Current parse behavior is to pass, so they might be
+ // parse bugs, but they're not tryparse bugs.
+ passed &= VerifyByteParse("5", NumberStyles.Float, goodNFI, 5);
+ passed &= VerifyByteTryParse("5", NumberStyles.Float, goodNFI, 5, true);
+ passed &= VerifyByteParse("5", NumberStyles.AllowDecimalPoint, goodNFI, 5);
+ passed &= VerifyByteTryParse("5", NumberStyles.AllowDecimalPoint, goodNFI, 5, true);
+ // I expect ArgumentException with an ambiguous NFI
+ passed &= VerifyByteParseException("^42", NumberStyles.Any, ambigNFI, typeof(OverflowException));
+ passed &= VerifyByteTryParse("^42", NumberStyles.Any, ambigNFI, 0, false);
+
+ /// END TEST CASES
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ passed = false;
+ }
+
+ if (passed)
+ {
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 1;
+ }
+ }
+
+ public static bool VerifyByteTryParse(string value, Byte expectedResult, bool expectedReturn)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Byte.TryParse, Value = '{0}', Expected Result = {1}, Expected Return = {2}",
+ value, expectedResult, expectedReturn);
+ }
+ Byte result = 0;
+ try
+ {
+ bool returnValue = Byte.TryParse(value, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedReturn, returnValue);
+ return false;
+ }
+ if (result != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, result);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyByteTryParse(string value, NumberStyles style, IFormatProvider provider, Byte expectedResult, bool expectedReturn)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Byte.TryParse, Value = '{0}', Style = {1}, Provider = {2}, Expected Result = {3}, Expected Return = {4}",
+ value, style, provider, expectedResult, expectedReturn);
+ }
+ Byte result = 0;
+ try
+ {
+ bool returnValue = Byte.TryParse(value, style, provider, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Style = {1}, Provider = {2}, Expected Return = {3}, Actual Return = {4}",
+ value, style, provider, expectedReturn, returnValue);
+ return false;
+ }
+ if (result != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, result);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyByteTryParseException(string value, NumberStyles style, IFormatProvider provider, Type exceptionType)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Byte.TryParse, Value = '{0}', Style = {1}, Provider = {2}, Expected Exception = {3}",
+ value, style, provider, exceptionType);
+ }
+ try
+ {
+ Byte result = 0;
+ Boolean returnValue = Byte.TryParse(value, style, provider, out result);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyByteParse(string value, Byte expectedResult)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Byte.Parse, Value = '{0}', Expected Result, {1}",
+ value, expectedResult);
+ }
+ try
+ {
+ Byte returnValue = Byte.Parse(value);
+ if (returnValue != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, returnValue);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyByteParse(string value, NumberStyles style, IFormatProvider provider, Byte expectedResult)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Byte.Parse, Value = '{0}', Style = {1}, provider = {2}, Expected Result = {3}",
+ value, style, provider, expectedResult);
+ }
+ try
+ {
+ Byte returnValue = Byte.Parse(value, style, provider);
+ if (returnValue != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, returnValue);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyByteParseException(string value, Type exceptionType)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Byte.Parse, Value = '{0}', Expected Exception, {1}",
+ value, exceptionType);
+ }
+ try
+ {
+ Byte returnValue = Byte.Parse(value);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyByteParseException(string value, NumberStyles style, Type exceptionType)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Byte.Parse, Value = '{0}', Style = {1}, Expected Exception = {3}",
+ value, style, exceptionType);
+ }
+ try
+ {
+ Byte returnValue = Byte.Parse(value, style);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyByteParseException(string value, NumberStyles style, IFormatProvider provider, Type exceptionType)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Byte.Parse, Value = '{0}', Style = {1}, Provider = {2}, Expected Exception = {3}",
+ value, style, provider, exceptionType);
+ }
+ try
+ {
+ Byte returnValue = Byte.Parse(value, style, provider);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/char/CharCompateTo1.csproj b/tests/src/CoreMangLib/cti/system/char/CharCompateTo1.csproj
new file mode 100644
index 0000000000..ba82910f7a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharCompateTo1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charcompateto1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharEquals1.csproj b/tests/src/CoreMangLib/cti/system/char/CharEquals1.csproj
new file mode 100644
index 0000000000..ac0148924b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharEquals1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charequals1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharEquals2.csproj b/tests/src/CoreMangLib/cti/system/char/CharEquals2.csproj
new file mode 100644
index 0000000000..3710029515
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharEquals2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charequals2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/char/CharGetHashCode.csproj
new file mode 100644
index 0000000000..4520299303
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="chargethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToBoolean.csproj b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToBoolean.csproj
new file mode 100644
index 0000000000..96770dd021
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToBoolean.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="chariconvertibletoboolean.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToByte.csproj b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToByte.csproj
new file mode 100644
index 0000000000..835d8a6aaa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="chariconvertibletobyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToChar.csproj b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToChar.csproj
new file mode 100644
index 0000000000..fb2918e3f9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToChar.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="chariconvertibletochar.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToDateTime.csproj b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToDateTime.csproj
new file mode 100644
index 0000000000..eff975feb9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToDateTime.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="chariconvertibletodatetime.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToDecimal.csproj b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToDecimal.csproj
new file mode 100644
index 0000000000..79c9437964
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToDecimal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="chariconvertibletodecimal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToDouble.csproj b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToDouble.csproj
new file mode 100644
index 0000000000..c292dd2778
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToDouble.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="chariconvertibletodouble.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToInt16.csproj b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToInt16.csproj
new file mode 100644
index 0000000000..16d2fcb545
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="chariconvertibletoint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToInt32.csproj b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToInt32.csproj
new file mode 100644
index 0000000000..d020d4310b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="chariconvertibletoint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToInt64.csproj b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToInt64.csproj
new file mode 100644
index 0000000000..522316e775
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="chariconvertibletoint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToSByte.csproj b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToSByte.csproj
new file mode 100644
index 0000000000..f5c8495fdf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToSByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="chariconvertibletosbyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToSingle.csproj b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToSingle.csproj
new file mode 100644
index 0000000000..8cf9f055e1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToSingle.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="chariconvertibletosingle.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToType.csproj b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToType.csproj
new file mode 100644
index 0000000000..75a25d2494
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToType.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="chariconvertibletotype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToUInt16.csproj b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToUInt16.csproj
new file mode 100644
index 0000000000..02790e1bce
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToUInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="chariconvertibletouint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToUInt32.csproj b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToUInt32.csproj
new file mode 100644
index 0000000000..daed9d05c7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToUInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="chariconvertibletouint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToUInt64.csproj b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToUInt64.csproj
new file mode 100644
index 0000000000..a2be949938
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIConvertibleToUInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="chariconvertibletouint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsControl1.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsControl1.csproj
new file mode 100644
index 0000000000..ceab689989
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsControl1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="chariscontrol1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsControl2.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsControl2.csproj
new file mode 100644
index 0000000000..dcf3c49af2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsControl2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="chariscontrol2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsDigit1.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsDigit1.csproj
new file mode 100644
index 0000000000..2e33e76cd6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsDigit1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charisdigit1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsDigit2.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsDigit2.csproj
new file mode 100644
index 0000000000..bda82cee2d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsDigit2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charisdigit2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsLetter1.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsLetter1.csproj
new file mode 100644
index 0000000000..cdcffb2736
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsLetter1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charisletter1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsLetter2.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsLetter2.csproj
new file mode 100644
index 0000000000..3f290f8d6e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsLetter2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charisletter2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsLetterOrDigit1.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsLetterOrDigit1.csproj
new file mode 100644
index 0000000000..d1ab3bed84
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsLetterOrDigit1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charisletterordigit1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsLetterOrDigit2.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsLetterOrDigit2.csproj
new file mode 100644
index 0000000000..3bd80551be
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsLetterOrDigit2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charisletterordigit2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsLower1.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsLower1.csproj
new file mode 100644
index 0000000000..0892633fec
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsLower1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charislower1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsLower2.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsLower2.csproj
new file mode 100644
index 0000000000..a5e677eecc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsLower2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charislower2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsNumber1.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsNumber1.csproj
new file mode 100644
index 0000000000..2f15458285
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsNumber1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charisnumber1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsNumber2.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsNumber2.csproj
new file mode 100644
index 0000000000..8fa0e48996
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsNumber2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charisnumber2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsPunctuation2.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsPunctuation2.csproj
new file mode 100644
index 0000000000..9a0a0a95a5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsPunctuation2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charispunctuation2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsSeparator1.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsSeparator1.csproj
new file mode 100644
index 0000000000..2c0d7ab344
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsSeparator1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charisseparator1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsSeparator2.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsSeparator2.csproj
new file mode 100644
index 0000000000..e33187fa94
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsSeparator2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charisseparator2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsSurrogate1.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsSurrogate1.csproj
new file mode 100644
index 0000000000..847ae0fd6b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsSurrogate1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charissurrogate1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsSurrogate2.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsSurrogate2.csproj
new file mode 100644
index 0000000000..f7ce4c7dd6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsSurrogate2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charissurrogate2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsSurrogatePair1.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsSurrogatePair1.csproj
new file mode 100644
index 0000000000..42c5e170d9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsSurrogatePair1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charissurrogatepair1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsSurrogatePair2.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsSurrogatePair2.csproj
new file mode 100644
index 0000000000..c0bb28ddcd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsSurrogatePair2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charissurrogatepair2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsSymbol1.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsSymbol1.csproj
new file mode 100644
index 0000000000..a74617f44b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsSymbol1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charissymbol1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsUpper1.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsUpper1.csproj
new file mode 100644
index 0000000000..b25d2d6f1c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsUpper1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charisupper1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsUpper2.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsUpper2.csproj
new file mode 100644
index 0000000000..d33b58b63e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsUpper2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charisupper2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsWhiteSpace1.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsWhiteSpace1.csproj
new file mode 100644
index 0000000000..99881e43b8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsWhiteSpace1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="chariswhitespace1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharIsWhiteSpace2.csproj b/tests/src/CoreMangLib/cti/system/char/CharIsWhiteSpace2.csproj
new file mode 100644
index 0000000000..b06308eadb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharIsWhiteSpace2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="chariswhitespace2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharMaxValue.csproj b/tests/src/CoreMangLib/cti/system/char/CharMaxValue.csproj
new file mode 100644
index 0000000000..a61942ebfe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharMaxValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charmaxvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharMinValue.csproj b/tests/src/CoreMangLib/cti/system/char/CharMinValue.csproj
new file mode 100644
index 0000000000..8ac01e6857
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharMinValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charminvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharToString1.csproj b/tests/src/CoreMangLib/cti/system/char/CharToString1.csproj
new file mode 100644
index 0000000000..dde02de826
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharToString1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="chartostring1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharToString2.csproj b/tests/src/CoreMangLib/cti/system/char/CharToString2.csproj
new file mode 100644
index 0000000000..e5b9ec6ffe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharToString2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="chartostring2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/CharTryParse.csproj b/tests/src/CoreMangLib/cti/system/char/CharTryParse.csproj
new file mode 100644
index 0000000000..764ba04fb8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/CharTryParse.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="chartryparse.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/char/charcompateto1.cs b/tests/src/CoreMangLib/cti/system/char/charcompateto1.cs
new file mode 100644
index 0000000000..7c55ae9c99
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charcompateto1.cs
@@ -0,0 +1,174 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.CompareTo(Char)
+/// Note: This method is new in the .NET Framework version 2.0.
+/// Compares this instance to a specified Char object and returns an indication of their relative values.
+/// </summary>
+public class CharCompareTo
+{
+ public static int Main()
+ {
+ CharCompareTo testObj = new CharCompareTo();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.CompareTo(Char)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = @"PosTest1: char.MaxValue vs '\uFFFF'";
+ string errorDesc;
+
+ const char c_MAX_CHAR = '\uFFFF';
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ char actualChar = char.MaxValue;
+ bool result = 0 == actualChar.CompareTo(c_MAX_CHAR);
+ if (!result)
+ {
+ errorDesc = "Char.MaxValue is not " + c_MAX_CHAR + " as expected: Actual(" + actualChar + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = @"PosTest2: char.MinValue vs '\u0000'";
+ string errorDesc;
+
+ const char c_MIN_CHAR = '\u0000';
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ char actualChar = char.MinValue;
+ bool result = 0 == actualChar.CompareTo(c_MIN_CHAR);
+ if (!result)
+ {
+ errorDesc = "char.MinValue is not " + c_MIN_CHAR + " as expected: Actual(" + actualChar + ")";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ const string c_TEST_DESC = "PosTest3: char.MaxValue vs char.MinValue";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ int expectedValue = (int) char.MaxValue - (int)char.MinValue;
+ int actualValue = char.MaxValue.CompareTo(char.MinValue);
+ if (actualValue != expectedValue)
+ {
+ errorDesc = @"char.MaxValue('\uFFFF') should be greater than char.MinValue('\u0000'), but not be less";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P004";
+ const string c_TEST_DESC = "PosTest4: comparison of two random charaters";
+ string errorDesc;
+
+ char chA, chB;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ chA = TestLibrary.Generator.GetChar(-55);
+ chB = TestLibrary.Generator.GetChar(-55);
+ int expectedValue = (int)chA - (int)chB;
+ int actualValue = chA.CompareTo(chB);
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format("The comparison result of character \'\\u{0:x}\' against character \'\\u{1:x}\' is not 0x{2:x} as expected: Actual(0x{3:x})",
+ (int)chA, (int)chB, (Int16)expectedValue, (Int16)actualValue);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charequals1.cs b/tests/src/CoreMangLib/cti/system/char/charequals1.cs
new file mode 100644
index 0000000000..b491080def
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charequals1.cs
@@ -0,0 +1,174 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.Equals(Char)
+/// Note: This method is new in the .NET Framework version 2.0.
+/// Returns a value indicating whether this instance is equal to the specified Char object.
+/// </summary>
+public class CharEquals
+{
+ public static int Main()
+ {
+ CharEquals testObj = new CharEquals();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.Equals(Char)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = @"PosTest1: char.MaxValue vs '\uFFFF'";
+ string errorDesc;
+
+ const char c_MAX_CHAR = '\uFFFF';
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ char actualChar = char.MaxValue;
+ bool result = actualChar.Equals(c_MAX_CHAR);
+ if (!result)
+ {
+ errorDesc = "Char.MaxValue is not " + c_MAX_CHAR + " as expected: Actual(" + actualChar + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = @"PosTest2: char.MinValue vs '\u0000'";
+ string errorDesc;
+
+ const char c_MIN_CHAR = '\u0000';
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ char actualChar = char.MinValue;
+ bool result = actualChar.Equals(c_MIN_CHAR);
+ if (!result)
+ {
+ errorDesc = "char.MinValue is not " + c_MIN_CHAR + " as expected: Actual(" + actualChar + ")";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ const string c_TEST_DESC = "PosTest3: char.MaxValue vs char.MinValue";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ bool expectedValue = false;
+ bool actualValue = char.MaxValue.Equals(char.MinValue);
+ if (actualValue != expectedValue)
+ {
+ errorDesc = @"char.MaxValue('\uFFFF') does not equal char.MinValue('\u0000')";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P004";
+ const string c_TEST_DESC = "PosTest4: equality of two random charaters";
+ string errorDesc;
+
+ char chA, chB;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ chA = TestLibrary.Generator.GetChar(-55);
+ chB = TestLibrary.Generator.GetChar(-55);
+ bool expectedValue = (int)chA == (int)chB;
+ bool actualValue = chA.Equals(chB);
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format("The equality of character \'\\u{0:x}\' against character \'\\u{1:x}\' is not {2} as expected: Actual({3})",
+ (int)chA, (int)chB, expectedValue, actualValue);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charequals2.cs b/tests/src/CoreMangLib/cti/system/char/charequals2.cs
new file mode 100644
index 0000000000..2c4d7deada
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charequals2.cs
@@ -0,0 +1,216 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.Equals(Object)
+/// Note: This method is new in the .NET Framework version 2.0.
+/// Returns a value indicating whether this instance is equal to the specified Char object.
+/// </summary>
+public class CharEquals
+{
+ public static int Main()
+ {
+ CharEquals testObj = new CharEquals();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.Equals(Object)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = @"PosTest1: char.MaxValue vs '\uFFFF'";
+ string errorDesc;
+
+ const char c_MAX_CHAR = '\uFFFF';
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ char actualChar = char.MaxValue;
+ object obj = c_MAX_CHAR;
+ bool result = actualChar.Equals(obj);
+ if (!result)
+ {
+ errorDesc = "Char.MaxValue is not " + c_MAX_CHAR + " as expected: Actual(" + actualChar + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = @"PosTest2: char.MinValue vs '\u0000'";
+ string errorDesc;
+
+ const char c_MIN_CHAR = '\u0000';
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ char actualChar = char.MinValue;
+ object obj = c_MIN_CHAR;
+ bool result = actualChar.Equals(obj);
+ if (!result)
+ {
+ errorDesc = "char.MinValue is not " + c_MIN_CHAR + " as expected: Actual(" + actualChar + ")";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ const string c_TEST_DESC = "PosTest3: char.MaxValue vs char.MinValue";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ bool expectedValue = false;
+ object obj = char.MinValue;
+ bool actualValue = char.MaxValue.Equals(obj);
+ if (actualValue != expectedValue)
+ {
+ errorDesc = @"char.MaxValue('\uFFFF') does not equal char.MinValue('\u0000')";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P004";
+ const string c_TEST_DESC = "PosTest4: equality of two random charaters";
+ string errorDesc;
+
+ char chA, chB;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ chA = TestLibrary.Generator.GetChar(-55);
+ chB = TestLibrary.Generator.GetChar(-55);
+ object obj = chB;
+ bool expectedValue = (int)chA == (int)chB;
+ bool actualValue = chA.Equals(obj);
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format("The equality of character \'\\u{0:x}\' against character \'\\u{1:x}\' is not {2} as expected: Actual({3})",
+ (int)chA, (int)chB, expectedValue, actualValue);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P004";
+ const string c_TEST_DESC = "PosTest4: char vs 32-bit integer value";
+ string errorDesc;
+
+ char chA;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ chA = TestLibrary.Generator.GetChar(-55);
+ object obj = (int)chA;
+ bool expectedValue = false;
+ bool actualValue = chA.Equals(obj);
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format("The equality of character \'\\u{0:x}\' against 32-bit integer {1:x} is not {2} as expected: Actual({3})",
+ (int)chA, (int)obj, expectedValue, actualValue);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/chargethashcode.cs b/tests/src/CoreMangLib/cti/system/char/chargethashcode.cs
new file mode 100644
index 0000000000..0cea6e033f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/chargethashcode.cs
@@ -0,0 +1,143 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.GetHashCode()
+/// Returns the hash code for this instance.
+/// </summary>
+public class CharGetHashCode
+{
+ public static int Main()
+ {
+ CharGetHashCode testObj = new CharGetHashCode();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.GetHashCode()");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: char.MaxValue";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)char.MaxValue | ((int)char.MaxValue << 16);
+ actualValue = char.MaxValue.GetHashCode();
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Hash code of char.MaxValue is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: char.MinValue";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)char.MinValue | ((int)char.MinValue << 16);
+ actualValue = char.MinValue.GetHashCode();
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Hash code of char.MinValue is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ const string c_TEST_DESC = "PosTest3: random character value";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ char ch = TestLibrary.Generator.GetChar(-55);
+ expectedValue = (int)ch | ((int)ch << 16);
+ actualValue = ch.GetHashCode();
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format("Hash code of \'\\u{0:x}\' is not {1} as expected: Actual({2})", (int)ch, expectedValue, actualValue);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/chariconvertibletoboolean.cs b/tests/src/CoreMangLib/cti/system/char/chariconvertibletoboolean.cs
new file mode 100644
index 0000000000..52706df4f7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/chariconvertibletoboolean.cs
@@ -0,0 +1,80 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.System.IConvertible.ToBoolean(IFormatProvider)
+/// This method supports the .NET Framework infrastructure and is not intended to be used
+/// directly from your code.
+/// Note: This conversion is not supported. Attempting to do so throws an InvalidCastException.
+/// </summary>
+public class CharIConvertibleToBoolean
+{
+ public static int Main()
+ {
+ CharIConvertibleToBoolean testObj = new CharIConvertibleToBoolean();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.System.IConvertible.ToBoolean(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+ #region Negative tests
+ //InvalidCastException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: Random character";
+ string errorDesc;
+
+ char ch = TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ IConvertible converter = ch;
+ converter.ToBoolean(null);
+
+ errorDesc = "InvalidCastException is not thrown as expected.";
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (InvalidCastException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/chariconvertibletobyte.cs b/tests/src/CoreMangLib/cti/system/char/chariconvertibletobyte.cs
new file mode 100644
index 0000000000..43a7c26571
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/chariconvertibletobyte.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Char.System.IConvertible.ToByte(IFormatProvider)
+/// Converts the value of the current Char object to an 8-bit unsigned integer.
+/// </summary>
+public class CharIConvertibleToByte
+{
+ public static int Main()
+ {
+ CharIConvertibleToByte testObj = new CharIConvertibleToByte();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.System.IConvertible.ToByte(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Random valid character from 0 to Byte.MaxValue";
+ string errorDesc;
+
+ Byte expectedValue;
+ Byte actualValue;
+ char ch;
+ expectedValue = TestLibrary.Generator.GetByte(-55);
+ ch = (char)expectedValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = ch;
+
+ actualValue = converter.ToByte(numberFormat);
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format("Byte value of character \\u{0:x} is not ", (int)ch);
+ errorDesc += expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Negative tests
+ //bug
+ //OverflowException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: Character with integer value greater than Byte.MaxValue";
+ string errorDesc;
+
+ UInt16 iValue;
+ char ch;
+ iValue = (UInt16)(Byte.MaxValue + 1 +
+ TestLibrary.Generator.GetInt32(-55) & (UInt16.MaxValue - byte.MaxValue));
+ ch = (char)iValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ IConvertible converter = ch;
+ converter.ToByte(null);
+
+ errorDesc = "OverflowException is not thrown as expected.";
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/chariconvertibletochar.cs b/tests/src/CoreMangLib/cti/system/char/chariconvertibletochar.cs
new file mode 100644
index 0000000000..5fc2869142
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/chariconvertibletochar.cs
@@ -0,0 +1,151 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Char.System.IConvertible.ToChar(IFormatProvider)
+/// Return the current char object.
+/// </summary>
+public class CharIConvertibleToChar
+{
+ public static int Main()
+ {
+ CharIConvertibleToChar testObj = new CharIConvertibleToChar();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.System.IConvertible.Tochar(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Random character between 0 and \\uFFFF";
+ string errorDesc;
+
+ char expectedChar = TestLibrary.Generator.GetChar(-55);
+ char actualChar;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ IConvertible converter = expectedChar;
+ actualChar = converter.ToChar(null);
+
+ if (actualChar != expectedChar)
+ {
+ errorDesc = string.Format("Character is not \\u{0:x} as expected: Actual(\\u{1:x}",
+ (int)expectedChar, (int)actualChar);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: Char.MaxValue";
+ string errorDesc;
+
+ char expectedChar = char.MaxValue;
+ char actualChar;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ IConvertible converter = expectedChar;
+ actualChar = converter.ToChar(null);
+
+ if (actualChar != expectedChar)
+ {
+ errorDesc = string.Format("Character is not \\u{0:x} as expected: Actual(\\u{1:x}",
+ (int)expectedChar, (int)actualChar);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ const string c_TEST_DESC = "PosTest3: Char.MinValue";
+ string errorDesc;
+
+ char expectedChar = char.MinValue;
+ char actualChar;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ IConvertible converter = expectedChar;
+ actualChar = converter.ToChar(null);
+
+ if (actualChar != expectedChar)
+ {
+ errorDesc = string.Format("Character is not \\u{0:x} as expected: Actual(\\u{1:x}",
+ (int)expectedChar, (int)actualChar);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/chariconvertibletodatetime.cs b/tests/src/CoreMangLib/cti/system/char/chariconvertibletodatetime.cs
new file mode 100644
index 0000000000..798dd85f7a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/chariconvertibletodatetime.cs
@@ -0,0 +1,119 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Char.System.IConvertible.ToDateTime(IFormatProvider)
+/// This method supports the .NET Framework infrastructure and is not intended to be
+/// used directly from your code.
+/// Note This conversion is not supported. Attempting to do so throws an InvalidCastException.
+/// </summary>
+public class CharIConvertibleToDateTime
+{
+ public static int Main()
+ {
+ CharIConvertibleToDateTime testObj = new CharIConvertibleToDateTime();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.System.IConvertible.ToDateTime(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Negative tests
+ //InvalidCastException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: Random character";
+ string errorDesc;
+
+ char ch = TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ IConvertible converter = ch;
+ converter.ToDateTime(null);
+
+ errorDesc = "InvalidCastException is not thrown as expected.";
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (InvalidCastException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: Random character to datetime in culture-independent format";
+ string errorDesc;
+
+ char ch = TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ IConvertible converter = ch;
+ DateTimeFormatInfo dtf = new DateTimeFormatInfo();
+ converter.ToDateTime(dtf);
+
+ errorDesc = "InvalidCastException is not thrown as expected.";
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (InvalidCastException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/chariconvertibletodecimal.cs b/tests/src/CoreMangLib/cti/system/char/chariconvertibletodecimal.cs
new file mode 100644
index 0000000000..48566ef5ca
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/chariconvertibletodecimal.cs
@@ -0,0 +1,116 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Char.System.IConvertible.ToDecimal(IFormatProvider)
+/// Note This conversion is not supported. Attempting to do so throws an InvalidCastException.
+/// </summary>
+public class CharIConvertibleToDecimal
+{
+ public static int Main()
+ {
+ CharIConvertibleToDecimal testObj = new CharIConvertibleToDecimal();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.System.IConvertible.ToDecimal(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Negative tests
+ //InvalidCastException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: Random character";
+ string errorDesc;
+
+ char ch = TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ IConvertible converter = ch;
+ converter.ToDecimal(null);
+
+ errorDesc = "InvalidCastException is not thrown as expected.";
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (InvalidCastException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: Random character to datetime in culture-independent format";
+ string errorDesc;
+
+ char ch = TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ IConvertible converter = ch;
+ DateTimeFormatInfo dtf = new DateTimeFormatInfo();
+ converter.ToDecimal(dtf);
+
+ errorDesc = "InvalidCastException is not thrown as expected.";
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (InvalidCastException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/char/chariconvertibletodouble.cs b/tests/src/CoreMangLib/cti/system/char/chariconvertibletodouble.cs
new file mode 100644
index 0000000000..5c343ca54f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/chariconvertibletodouble.cs
@@ -0,0 +1,78 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.System.IConvertible.ToDouble(IFormatProvider)
+/// Note This conversion is not supported. Attempting to do so throws an InvalidCastException.
+/// </summary>
+public class CharIConvertibleToDouble
+{
+ public static int Main()
+ {
+ CharIConvertibleToDouble testObj = new CharIConvertibleToDouble();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.System.IConvertible.ToDouble(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Negative tests
+ //InvalidCastException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: Random character";
+ string errorDesc;
+
+ char ch = TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ IConvertible converter = ch;
+ converter.ToDouble(null);
+
+ errorDesc = "InvalidCastException is not thrown as expected.";
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (InvalidCastException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/char/chariconvertibletoint16.cs b/tests/src/CoreMangLib/cti/system/char/chariconvertibletoint16.cs
new file mode 100644
index 0000000000..cf815d9c4b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/chariconvertibletoint16.cs
@@ -0,0 +1,133 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization; //for number format info
+
+/// <summary>
+/// Char.System.IConvertible.ToInt16(IFormatProvider)
+/// Converts the value of the current Char object to an 16-bit signed integer.
+/// </summary>
+public class CharIConvertibleToInt16
+{
+ public static int Main()
+ {
+ CharIConvertibleToInt16 testObj = new CharIConvertibleToInt16();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.System.IConvertible.ToInt16(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Random valid character from 0 to Int16.MaxValue";
+ string errorDesc;
+
+ Int16 expectedValue;
+ Int16 actualValue;
+ char ch;
+ expectedValue = TestLibrary.Generator.GetInt16(-55);
+ ch = (char)expectedValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = ch;
+
+ actualValue = converter.ToInt16(numberFormat);
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format("Int16 value of character \\u{0:x} is not ", (int)ch);
+ errorDesc += expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //bug
+ //overflow exception
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "NegTest1: Random valid character from Int16.MaxValue + 1 to UInt16.MaxValue";
+
+ UInt16 ui;
+ Int16 expectedValue;
+ Int16 actualValue;
+ char ch;
+ ui = (UInt16)(Int16.MaxValue + 1 +
+ TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue - Int16.MaxValue));
+ ch = (char)ui;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = ch;
+
+ expectedValue = (Int16)ui;
+ actualValue = converter.ToInt16(numberFormat);
+
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, c_TEST_DESC);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, "Exception expected");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, c_TEST_DESC);
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/chariconvertibletoint32.cs b/tests/src/CoreMangLib/cti/system/char/chariconvertibletoint32.cs
new file mode 100644
index 0000000000..2972214647
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/chariconvertibletoint32.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Char.System.IConvertible.ToInt32(IFormatProvider)
+/// Converts the value of the current Char object to an 32-bit signed integer.
+/// </summary>
+public class CharIConvertibleToInt32
+{
+ public static int Main()
+ {
+ CharIConvertibleToInt32 testObj = new CharIConvertibleToInt32();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.System.IConvertible.ToInt32(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Random valid character from 0 to UInt16.MaxValue";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+ char ch;
+ expectedValue = TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1);
+ ch = (char)expectedValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = ch;
+
+ actualValue = converter.ToInt32(numberFormat);
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format("Int32 value of character \\u{0:x} is not ", (int)ch);
+ errorDesc += expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/chariconvertibletoint64.cs b/tests/src/CoreMangLib/cti/system/char/chariconvertibletoint64.cs
new file mode 100644
index 0000000000..bded972652
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/chariconvertibletoint64.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Char.System.IConvertible.ToInt64(IFormatProvider)
+/// Converts the value of the current Char object to an 64-bit signed integer.
+/// </summary>
+public class CharIConvertibleToInt64
+{
+ public static int Main()
+ {
+ CharIConvertibleToInt64 testObj = new CharIConvertibleToInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.System.IConvertible.ToInt64(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Random valid character from 0 to UInt16.MaxValue";
+ string errorDesc;
+
+ Int64 expectedValue;
+ Int64 actualValue;
+ char ch;
+ expectedValue = TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1);
+ ch = (char)expectedValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = ch;
+
+ actualValue = converter.ToInt64(numberFormat);
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format("Int64 value of character \\u{0:x} is not ", (int)ch);
+ errorDesc += expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/chariconvertibletosbyte.cs b/tests/src/CoreMangLib/cti/system/char/chariconvertibletosbyte.cs
new file mode 100644
index 0000000000..e0f6746295
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/chariconvertibletosbyte.cs
@@ -0,0 +1,136 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Char.System.IConvertible.ToSByte(IFormatProvider)
+/// Converts the value of the current Char object to an 8-bit signed integer.
+/// </summary>
+public class CharIConvertibleToSByte
+{
+ public static int Main()
+ {
+ CharIConvertibleToSByte testObj = new CharIConvertibleToSByte();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.System.IConvertible.ToSByte(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Random valid character from 0 to SByte.MaxValue";
+ string errorDesc;
+
+ SByte expectedValue;
+ SByte actualValue;
+ char ch;
+ expectedValue = (sbyte)(TestLibrary.Generator.GetByte(-55) % (sbyte.MaxValue + 1));
+ ch = (char)expectedValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = ch;
+
+ actualValue = converter.ToSByte(numberFormat);
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format("SByte value of character \\u{0:x} is not ", (int)ch);
+ errorDesc += expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Negative tests
+ //bug
+ //OverflowException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: Character with integer value greater than SByte.MaxValue";
+ string errorDesc;
+
+ UInt16 iValue;
+ char ch;
+ // we need a UInt16 between (SByte.MaxValue + 1) and (UInt16.MaxValue)
+ int rangeSize = UInt16.MaxValue - (SByte.MaxValue + 1);
+ int rawRandom = TestLibrary.Generator.GetInt32(-55);
+ iValue = (UInt16)((rawRandom % rangeSize) +
+ (SByte.MaxValue + 1));
+
+ ch = (char)iValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ IConvertible converter = ch;
+ converter.ToSByte(null);
+
+ errorDesc = "OverflowException is not thrown as expected.";
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/chariconvertibletosingle.cs b/tests/src/CoreMangLib/cti/system/char/chariconvertibletosingle.cs
new file mode 100644
index 0000000000..678f27b696
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/chariconvertibletosingle.cs
@@ -0,0 +1,78 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.System.IConvertible.ToSingle(IFormatProvider)
+/// Note This conversion is not supported. Attempting to do so throws an InvalidCastException.
+/// </summary>
+public class CharIConvertibleToDouble
+{
+ public static int Main()
+ {
+ CharIConvertibleToDouble testObj = new CharIConvertibleToDouble();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.System.IConvertible.ToSingle(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Negative tests
+ //InvalidCastException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: Random character";
+ string errorDesc;
+
+ char ch = TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ IConvertible converter = ch;
+ converter.ToSingle(null);
+
+ errorDesc = "InvalidCastException is not thrown as expected.";
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (InvalidCastException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/char/chariconvertibletotype.cs b/tests/src/CoreMangLib/cti/system/char/chariconvertibletotype.cs
new file mode 100644
index 0000000000..91596dc788
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/chariconvertibletotype.cs
@@ -0,0 +1,675 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Char.System.IConvertible.ToType(Type, IFormatProvider)
+/// Converts the value of the current Char object to an object of the specified type using
+/// the specified IFormatProvider object.
+/// </summary>
+public class CharIConvertibleToType
+{
+ public static int Main()
+ {
+ CharIConvertibleToType testObj = new CharIConvertibleToType();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.System.IConvertible.ToType(Type, IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+ retVal = NegTest9() && retVal;
+ retVal = NegTest10() && retVal;
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Conversion to byte";
+ string errorDesc;
+
+ byte b;
+ object expectedObj;
+ object actualObj;
+ char ch;
+ b = TestLibrary.Generator.GetByte(-55);
+ ch = (char)b;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = ch;
+
+ expectedObj = b;
+ actualObj = converter.ToType(typeof(byte), numberFormat);
+
+ if (((byte)expectedObj != (byte)actualObj) || !(actualObj is byte))
+ {
+ errorDesc = string.Format("Byte value of character \\u{0:x} is not ", (int)ch);
+ errorDesc += expectedObj + " as expected: Actual(" + actualObj + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: Conversion to sbyte";
+ string errorDesc;
+
+ sbyte sb;
+ object expectedObj;
+ object actualObj;
+ char ch;
+ sb = (sbyte)(TestLibrary.Generator.GetByte(-55) % (sbyte.MaxValue + 1));
+ ch = (char)sb;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = ch;
+
+ expectedObj = sb;
+ actualObj = converter.ToType(typeof(sbyte), numberFormat);
+
+ if (((sbyte)expectedObj != (sbyte)actualObj) || !(actualObj is sbyte))
+ {
+ errorDesc = string.Format("SByte value of character \\u{0:x} is not ", (int)ch);
+ errorDesc += expectedObj + " as expected: Actual(" + actualObj + ")";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ const string c_TEST_DESC = "PosTest3: Conversion to Int16";
+ string errorDesc;
+
+ Int16 i;
+ object expectedObj;
+ object actualObj;
+ char ch;
+ i = (Int16)(TestLibrary.Generator.GetInt32(-55) % (Int16.MaxValue + 1));
+ ch = (char)i;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = ch;
+
+ expectedObj = i;
+ actualObj = converter.ToType(typeof(Int16), numberFormat);
+
+ if (((Int16)expectedObj != (Int16)actualObj) || !(actualObj is Int16))
+ {
+ errorDesc = string.Format("Int16 value of character \\u{0:x} is not ", (int)ch);
+ errorDesc += expectedObj + " as expected: Actual(" + actualObj + ")";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P004";
+ const string c_TEST_DESC = "PosTest4: Conversion to UInt16";
+ string errorDesc;
+
+ UInt16 i;
+ object expectedObj;
+ object actualObj;
+ char ch;
+ i = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+ ch = (char)i;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = ch;
+
+ expectedObj = i;
+ actualObj = converter.ToType(typeof(UInt16), numberFormat);
+
+ if (((UInt16)expectedObj != (UInt16)actualObj) || !(actualObj is UInt16))
+ {
+ errorDesc = string.Format("UInt16 value of character \\u{0:x} is not ", (int)ch);
+ errorDesc += expectedObj + " as expected: Actual(" + actualObj + ")";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P005";
+ const string c_TEST_DESC = "PosTest5: Conversion to Int32";
+ string errorDesc;
+
+ int i;
+ object expectedObj;
+ object actualObj;
+ char ch;
+ i = TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1);
+ ch = (char)i;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = ch;
+
+ expectedObj = i;
+ actualObj = converter.ToType(typeof(int), numberFormat);
+
+ if (((int)expectedObj != (int)actualObj) || !(actualObj is int))
+ {
+ errorDesc = string.Format("Int32 value of character \\u{0:x} is not ", (int)ch);
+ errorDesc += expectedObj + " as expected: Actual(" + actualObj + ")";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P006";
+ const string c_TEST_DESC = "PosTest6: Conversion to UInt32";
+ string errorDesc;
+
+ UInt32 i;
+ object expectedObj;
+ object actualObj;
+ char ch;
+ i = (UInt32)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+ ch = (char)i;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = ch;
+
+ expectedObj = i;
+ actualObj = converter.ToType(typeof(UInt32), numberFormat);
+
+ if (((UInt32)expectedObj != (UInt32)actualObj) || !(actualObj is UInt32))
+ {
+ errorDesc = string.Format("UInt32 value of character \\u{0:x} is not ", (int)ch);
+ errorDesc += expectedObj + " as expected: Actual(" + actualObj + ")";
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P007";
+ const string c_TEST_DESC = "PosTest7: Conversion to Int64";
+ string errorDesc;
+
+ Int64 i;
+ object expectedObj;
+ object actualObj;
+ char ch;
+ i = TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1);
+ ch = (char)i;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = ch;
+
+ expectedObj = i;
+ actualObj = converter.ToType(typeof(Int64), numberFormat);
+
+ if (((Int64)expectedObj != (Int64)actualObj) || !(actualObj is Int64))
+ {
+ errorDesc = string.Format("Int64 value of character \\u{0:x} is not ", (int)ch);
+ errorDesc += expectedObj + " as expected: Actual(" + actualObj + ")";
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P008";
+ const string c_TEST_DESC = "PosTest8: Conversion to UInt64";
+ string errorDesc;
+
+ UInt64 i;
+ object expectedObj;
+ object actualObj;
+ char ch;
+ i = (UInt64)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+ ch = (char)i;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = ch;
+
+ expectedObj = i;
+ actualObj = converter.ToType(typeof(UInt64), numberFormat);
+
+ if (((UInt64)expectedObj != (UInt64)actualObj) || !(actualObj is UInt64))
+ {
+ errorDesc = string.Format("UInt64 value of character \\u{0:x} is not ", (int)ch);
+ errorDesc += expectedObj + " as expected: Actual(" + actualObj + ")";
+ TestLibrary.TestFramework.LogError("015" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("016" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P009";
+ const string c_TEST_DESC = "PosTest9: Conversion to char";
+ string errorDesc;
+
+ object expectedObj;
+ object actualObj;
+ char ch;
+ ch = TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ IConvertible converter = ch;
+
+ expectedObj = ch;
+ actualObj = converter.ToType(typeof(char), null);
+
+ if (((char)expectedObj != (char)actualObj) || !(actualObj is char))
+ {
+ errorDesc = string.Format("char value of character \\u{0:x} is not ", (int)ch);
+ errorDesc += expectedObj + " as expected: Actual(" + actualObj + ")";
+ TestLibrary.TestFramework.LogError("017" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("018" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest10()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P010";
+ const string c_TEST_DESC = "PosTest10: Conversion to string";
+ string errorDesc;
+
+ object expectedObj;
+ object actualObj;
+ char ch;
+ ch = TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ IConvertible converter = ch;
+
+ expectedObj = new string(ch, 1);
+ actualObj = converter.ToType(typeof(string), null);
+
+ if (((string)expectedObj != (string)actualObj) || !(actualObj is string))
+ {
+ errorDesc = string.Format("string value of character \\u{0:x} is not ", (int)ch);
+ errorDesc += expectedObj + " as expected: Actual(" + actualObj + ")";
+ TestLibrary.TestFramework.LogError("019" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("020" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //ArgumentNullException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: type is a null reference (Nothing in Visual Basic).";
+ string errorDesc;
+
+ char ch = TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ IConvertible converter = ch;
+ converter.ToType(null, null);
+
+ errorDesc = "ArgumentNullException is not thrown as expected.";
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError("021" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError("022" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //InvalidCastException
+ public bool NegTest2()
+ {
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: type is boolean";
+
+ return this.DoInvalidCastTest(c_TEST_ID, c_TEST_DESC, "023", "024", typeof(bool));
+ }
+
+ public bool NegTest3()
+ {
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: type is double";
+
+ return this.DoInvalidCastTest(c_TEST_ID, c_TEST_DESC, "025", "026", typeof(double));
+ }
+
+ public bool NegTest4()
+ {
+ const string c_TEST_ID = "N004";
+ const string c_TEST_DESC = "NegTest4: type is single";
+
+ return this.DoInvalidCastTest(c_TEST_ID, c_TEST_DESC, "027", "028", typeof(Single));
+ }
+
+ public bool NegTest5()
+ {
+ const string c_TEST_ID = "N005";
+ const string c_TEST_DESC = "NegTest5: type is DateTime";
+
+ return this.DoInvalidCastTest(c_TEST_ID, c_TEST_DESC, "029", "030", typeof(DateTime));
+ }
+
+ public bool NegTest6()
+ {
+ const string c_TEST_ID = "N006";
+ const string c_TEST_DESC = "NegTest6: type is Decimal";
+
+ return this.DoInvalidCastTest(c_TEST_ID, c_TEST_DESC, "031", "032", typeof(Decimal));
+ }
+
+ public bool NegTest7()
+ {
+ const string c_TEST_ID = "N007";
+ const string c_TEST_DESC = "NegTest7: type is Decimal";
+
+ return this.DoInvalidCastTest(c_TEST_ID, c_TEST_DESC, "033", "034", typeof(Decimal));
+ }
+
+ //bug
+ //OverflowException
+ public bool NegTest8()
+ {
+ const string c_TEST_ID = "N008";
+ const string c_TEST_DESC = "NegTest8: Value is too large for destination type";
+ return this.DoOverflowTest(c_TEST_ID, c_TEST_DESC, "035", typeof(Int16), Int16.MaxValue);
+ }
+
+ public bool NegTest9()
+ {
+ const string c_TEST_ID = "N009";
+ const string c_TEST_DESC = "NegTest9: Value is too large for destination type";
+
+ return this.DoOverflowTest(c_TEST_ID, c_TEST_DESC, "036", typeof(byte), byte.MaxValue);
+ }
+
+ public bool NegTest10()
+ {
+ const string c_TEST_ID = "N010";
+ const string c_TEST_DESC = "NegTest10: Value is too large for destination type";
+
+ return this.DoOverflowTest(c_TEST_ID, c_TEST_DESC, "037", typeof(sbyte), sbyte.MaxValue);
+ }
+ #endregion
+
+ #region Helper methods for negative tests
+ private bool DoInvalidCastTest(string testId,
+ string testDesc,
+ string errorNum1,
+ string errorNum2,
+ Type destType)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ char ch = TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ IConvertible converter = ch;
+ converter.ToType(destType, null);
+
+ errorDesc = "InvalidCastException is not thrown as expected.";
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ private bool DoOverflowTest(string testId,
+ string testDesc,
+ string errorNum,
+ Type destType,
+ int destTypeMaxValue)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ int i;
+ char ch;
+ i = destTypeMaxValue + 1 +
+ TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue - destTypeMaxValue);
+ ch = (char)i;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ IConvertible converter = ch;
+ converter.ToType(destType, null);
+ TestLibrary.TestFramework.LogError(errorNum + "TestId-" +testId,
+ "No OverflowException thrown when expected");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ TestLibrary.TestFramework.LogInformation("Caught expected overflow.");
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError(errorNum + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/chariconvertibletouint16.cs b/tests/src/CoreMangLib/cti/system/char/chariconvertibletouint16.cs
new file mode 100644
index 0000000000..ecd2feffec
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/chariconvertibletouint16.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Char.System.IConvertible.ToUInt16(IFormatProvider)
+/// Converts the value of the current Char object to an 16-bit unsigned integer.
+/// </summary>
+public class CharIConvertibleToUInt16
+{
+ public static int Main()
+ {
+ CharIConvertibleToUInt16 testObj = new CharIConvertibleToUInt16();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.System.IConvertible.ToUInt16(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Random character";
+ string errorDesc;
+
+ UInt16 expectedValue;
+ UInt16 actualValue;
+ char ch;
+ expectedValue = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+ ch = (char)expectedValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = ch;
+
+ actualValue = converter.ToUInt16(numberFormat);
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format("UInt16 value of character \\u{0:x} is not ", (int)ch);
+ errorDesc += expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/chariconvertibletouint32.cs b/tests/src/CoreMangLib/cti/system/char/chariconvertibletouint32.cs
new file mode 100644
index 0000000000..1c868976ff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/chariconvertibletouint32.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Char.System.IConvertible.ToUInt32(IFormatProvider)
+/// Converts the value of the current Char object to an 32-bit unsigned integer.
+/// </summary>
+public class CharIConvertibleToUInt32
+{
+ public static int Main()
+ {
+ CharIConvertibleToUInt32 testObj = new CharIConvertibleToUInt32();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.System.IConvertible.ToUInt32(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Random character.";
+ string errorDesc;
+
+ UInt32 expectedValue;
+ UInt32 actualValue;
+ char ch;
+ expectedValue = (UInt32)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+ ch = (char)expectedValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = ch;
+
+ actualValue = converter.ToUInt32(numberFormat);
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format("UInt32 value of character \\u{0:x} is not ", (int)ch);
+ errorDesc += expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/chariconvertibletouint64.cs b/tests/src/CoreMangLib/cti/system/char/chariconvertibletouint64.cs
new file mode 100644
index 0000000000..30eca02b18
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/chariconvertibletouint64.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Char.System.IConvertible.ToUInt64(IFormatProvider)
+/// Converts the value of the current Char object to an 64-bit unsigned integer.
+/// </summary>
+public class CharIConvertibleToUInt64
+{
+ public static int Main()
+ {
+ CharIConvertibleToUInt64 testObj = new CharIConvertibleToUInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.System.IConvertible.ToUInt32(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Random character.";
+ string errorDesc;
+
+ UInt64 expectedValue;
+ UInt64 actualValue;
+ char ch;
+ expectedValue = (UInt64)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+ ch = (char)expectedValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = ch;
+
+ actualValue = converter.ToUInt64(numberFormat);
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format("UInt64 value of character \\u{0:x} is not ", (int)ch);
+ errorDesc += expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/chariscontrol1.cs b/tests/src/CoreMangLib/cti/system/char/chariscontrol1.cs
new file mode 100644
index 0000000000..9e30672765
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/chariscontrol1.cs
@@ -0,0 +1,106 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.IsControl(Char)
+/// Indicates whether the specified Unicode character is categorized as a control character.
+/// </summary>
+public class CharIsControl
+{
+ public static int Main()
+ {
+ CharIsControl testObj = new CharIsControl();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.GetUnicodeCategory(Char)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positve tests
+ public bool PosTest1()
+ {
+ //Generate the character for validate
+ char ch = TestLibrary.Generator.GetCharLetter(-55);
+
+ return this.DoTest("PosTest1: Non control character.",
+ "P001", "001", "002", ch,
+ false);
+ }
+
+ public bool PosTest2()
+ {
+ //Generate the character for validate
+ char ch = '\n';
+
+ return this.DoTest("PosTest2: Control character.",
+ "P002", "003", "004", ch,
+ true);
+ }
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char ch,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ bool actualResult = char.IsControl(ch);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} should belong to control characters.", (int)ch);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} does not belong to control characters.", (int)ch);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1+ " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/chariscontrol2.cs b/tests/src/CoreMangLib/cti/system/char/chariscontrol2.cs
new file mode 100644
index 0000000000..ed263614bb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/chariscontrol2.cs
@@ -0,0 +1,223 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// char.IsControl(string, int)
+/// Indicates whether the character at the specified position in a specified string is categorized
+/// as a control character.
+/// </summary>
+public class CharIsControl
+{
+ private const int c_MIN_STR_LEN = 2;
+ private const int c_MAX_STR_LEN = 256;
+
+ public static int Main()
+ {
+ CharIsControl testObj = new CharIsControl();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: char.IsControl(string, int)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negaitive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positve tests
+ public bool PosTest1()
+ {
+ //Generate the character for validate
+ char ch = TestLibrary.Generator.GetCharLetter(-55);
+
+ return this.DoTest("PosTest1: Non control character.",
+ "P001", "001", "002", ch,
+ false);
+ }
+
+ public bool PosTest2()
+ {
+ //Generate the character for validate
+ char ch = '\n';
+
+ return this.DoTest("PosTest2: Control character.",
+ "P002", "003", "004", ch,
+ true);
+ }
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char ch,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ string str = new string(ch, 1);
+ bool actualResult = char.IsControl(str, 0);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} should belong to control characters.", (int)ch);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} does not belong to control characters.", (int)ch);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1+ " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //ArgumentNullException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: String is a null reference (Nothing in Visual Basic).";
+ string errorDesc;
+
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ index = TestLibrary.Generator.GetInt32(-55);
+ char.IsControl(null, index);
+ errorDesc = "ArgumentNullException is not thrown as expected, index is " + index;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e + "\n Index is " + index;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //ArgumentOutOfRangeException
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: Index is too great.";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = str.Length + TestLibrary.Generator.GetInt16(-55);
+ index = str.Length;
+ char.IsControl(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", str[index]);
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: Index is a negative value";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = -1 * (TestLibrary.Generator.GetInt16(-55));
+ char.IsControl(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", str[index]);
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charisdigit1.cs b/tests/src/CoreMangLib/cti/system/char/charisdigit1.cs
new file mode 100644
index 0000000000..7d1609bca5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charisdigit1.cs
@@ -0,0 +1,111 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.IsDigit(Char)
+/// Indicates whether the specified Unicode character is categorized as a decimal digit.
+/// </summary>
+public class CharIsDigit
+{
+ private static readonly char[] r_decimalDigits =
+ {
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'
+ };
+
+ public static int Main()
+ {
+ CharIsDigit testObj = new CharIsDigit();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.IsDigit(Char)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ //Generate the character for validate
+ int index = TestLibrary.Generator.GetInt32(-55) % r_decimalDigits.Length;
+ char ch = r_decimalDigits[index];
+
+ return this.DoTest("PosTest1: Random decimal digit character (0-9).",
+ "P001", "001", "002", ch,
+ true);
+ }
+
+ public bool PosTest2()
+ {
+ //Generate a non character for validate
+ char ch = TestLibrary.Generator.GetCharLetter(-55);
+ return this.DoTest("PosTest2: Non decimal digit character.",
+ "P002", "003", "004", ch,
+ false);
+ }
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char ch,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ bool actualResult = char.IsDigit(ch);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} should belong to decimal digit characters.", (int)ch);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} does not belong to decimal digit characters.", (int)ch);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1+ " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nCharacter is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charisdigit2.cs b/tests/src/CoreMangLib/cti/system/char/charisdigit2.cs
new file mode 100644
index 0000000000..bd2efe1455
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charisdigit2.cs
@@ -0,0 +1,228 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// char.IsDigit(string, int)
+/// Indicates whether the character at the specified position in a specified string is categorized
+/// as a decimal digit character.
+/// </summary>
+public class CharIsDigit
+{
+ private const int c_MIN_STR_LEN = 2;
+ private const int c_MAX_STR_LEN = 256;
+
+ private static readonly char[] r_decimalDigits =
+ {
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'
+ };
+
+ public static int Main()
+ {
+ CharIsDigit testObj = new CharIsDigit();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: char.IsDigit(string, int)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negaitive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ //Generate the character for validate
+ int index = TestLibrary.Generator.GetInt32(-55) % r_decimalDigits.Length;
+ char ch = r_decimalDigits[index];
+
+ return this.DoTest("PosTest1: Random decimal digit character (0-9).",
+ "P001", "001", "002", ch,
+ true);
+ }
+
+ public bool PosTest2()
+ {
+ //Generate a non character for validate
+ char ch = TestLibrary.Generator.GetCharLetter(-55);
+ return this.DoTest("PosTest2: Non decimal digit character.",
+ "P002", "003", "004", ch,
+ false);
+ }
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char ch,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ string str = new string(ch, 1);
+ bool actualResult = char.IsDigit(str, 0);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} should belong to decimal digit characters.", (int)ch);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} does not belong to decimal digit characters.", (int)ch);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1+ " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nCharacter is \\u{0:x}", (int)ch);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //ArgumentNullException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: String is a null reference (Nothing in Visual Basic).";
+ string errorDesc;
+
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ index = TestLibrary.Generator.GetInt32(-55);
+ char.IsDigit(null, index);
+ errorDesc = "ArgumentNullException is not thrown as expected, index is " + index;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e + "\n Index is " + index;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //ArgumentOutOfRangeException
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: Index is too great.";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = str.Length + TestLibrary.Generator.GetInt16(-55);
+ index = str.Length;
+ char.IsDigit(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", str[index]);
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: Index is a negative value";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = -1 * (TestLibrary.Generator.GetInt16(-55));
+ char.IsDigit(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", str[index]);
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charisletter1.cs b/tests/src/CoreMangLib/cti/system/char/charisletter1.cs
new file mode 100644
index 0000000000..5a0e554af4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charisletter1.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.IsLetter(Char)
+/// Indicates whether the specified Unicode character is categorized as a letter.
+/// </summary>
+public class CharIsLetter
+{
+ public static int Main()
+ {
+ CharIsLetter testObj = new CharIsLetter();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.IsLetter(Char)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ //Generate the character for validate
+ char ch = 'a';
+
+ return this.DoTest("PosTest1: Letter character",
+ "P001", "001", "002", ch, true);
+ }
+
+ public bool PosTest2()
+ {
+ //Generate a non character for validate
+ char ch = TestLibrary.Generator.GetCharNumber(-55);
+ return this.DoTest("PosTest2: Non letter character.",
+ "P002", "003", "004", ch, false);
+ }
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char ch,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ bool actualResult = char.IsLetter(ch);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} should belong to letter characters.", (int)ch);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} does not belong to letter characters.", (int)ch);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1+ " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nCharacter is \\u{0:x}", ch);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charisletter2.cs b/tests/src/CoreMangLib/cti/system/char/charisletter2.cs
new file mode 100644
index 0000000000..2dc0b7e411
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charisletter2.cs
@@ -0,0 +1,219 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// char.IsLetter(string, int)
+/// Indicates whether the character at the specified position in a specified string is categorized
+/// as a letter character.
+/// </summary>
+public class CharIsLetter
+{
+ private const int c_MIN_STR_LEN = 2;
+ private const int c_MAX_STR_LEN = 256;
+
+ public static int Main()
+ {
+ CharIsLetter testObj = new CharIsLetter();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: char.IsLetter(string, int)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negaitive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ //Generate the character for validate
+ char ch = 'a';
+
+ return this.DoTest("PosTest1: Letter character",
+ "P001", "001", "002", ch, true);
+ }
+
+ public bool PosTest2()
+ {
+ //Generate a non character for validate
+ char ch = TestLibrary.Generator.GetCharNumber(-55);
+ return this.DoTest("PosTest2: Non letter character.",
+ "P002", "003", "004", ch, false);
+ }
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char ch,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ bool actualResult = char.IsLetter(ch);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} should belong to letter characters.", (int)ch);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} does not belong to letter characters.", (int)ch);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nCharacter is \\u{0:x}", ch);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //ArgumentNullException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: String is a null reference (Nothing in Visual Basic).";
+ string errorDesc;
+
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ index = TestLibrary.Generator.GetInt32(-55);
+ char.IsLetter(null, index);
+ errorDesc = "ArgumentNullException is not thrown as expected, index is " + index;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e + "\n Index is " + index;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //ArgumentOutOfRangeException
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: Index is too great.";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = str.Length + TestLibrary.Generator.GetInt16(-55);
+ index = str.Length;
+ char.IsLetter(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", str[index]);
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: Index is a negative value";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = -1 * (TestLibrary.Generator.GetInt16(-55));
+ char.IsLetter(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", str[index]);
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charisletterordigit1.cs b/tests/src/CoreMangLib/cti/system/char/charisletterordigit1.cs
new file mode 100644
index 0000000000..7d48d1c02b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charisletterordigit1.cs
@@ -0,0 +1,120 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization; //for UnicodeCategory enumeration
+
+/// <summary>
+/// Char.IsLetterOrDigit(Char)
+/// Indicates whether the specified Unicode character is categorized as a letter or decimal digit.
+/// </summary>
+public class CharIsLetterOrDigit
+{
+ private static readonly char[] r_decimalDigits =
+ {
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'
+ };
+
+ public static int Main()
+ {
+ CharIsLetterOrDigit testObj = new CharIsLetterOrDigit();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.IsLetterOrDigit(Char)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ //Generate the character for validate
+ char ch = 'a';
+
+ return this.DoTest("PosTest1: Letter character",
+ "P001", "001", "002", ch, true);
+ }
+
+ public bool PosTest2()
+ {
+ //Generate a non character for validate
+ int index = TestLibrary.Generator.GetInt32(-55) % r_decimalDigits.Length;
+ char ch = r_decimalDigits[index];
+
+ return this.DoTest("PosTest2: Decimal digit character.",
+ "P002", "003", "004", ch, true);
+ }
+
+ public bool PosTest3()
+ {
+ //Generate a non character for validate
+ char ch = '\n';
+
+ return this.DoTest("PosTest3: Not decimal digit nor letter character.",
+ "P003", "005", "006", ch, false);
+ }
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char ch,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ bool actualResult = char.IsLetterOrDigit(ch);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} should belong to letter or decimal digit characters.", (int)ch);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} does not belong to letter or decimal digit characters.", (int)ch);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1+ " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nCharacter is \\u{0:x}", ch);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charisletterordigit2.cs b/tests/src/CoreMangLib/cti/system/char/charisletterordigit2.cs
new file mode 100644
index 0000000000..34df969463
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charisletterordigit2.cs
@@ -0,0 +1,236 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// char.IsLetterOrDigit(string, int)
+/// Indicates whether the character at the specified position in a specified string is categorized
+/// as a letter or decimal digit character.
+/// </summary>
+public class CharIsLetterOrDigit
+{
+ private const int c_MIN_STR_LEN = 2;
+ private const int c_MAX_STR_LEN = 256;
+
+ private static readonly char[] r_decimalDigits =
+ {
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'
+ };
+
+ public static int Main()
+ {
+ CharIsLetterOrDigit testObj = new CharIsLetterOrDigit();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: char.IsLetterOrDigit(string, int)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negaitive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ //Generate the character for validate
+ char ch = 'a';
+
+ return this.DoTest("PosTest1: Letter character",
+ "P001", "001", "002", ch, true);
+ }
+
+ public bool PosTest2()
+ {
+ //Generate a non character for validate
+ int index = TestLibrary.Generator.GetInt32(-55) % r_decimalDigits.Length;
+ char ch = r_decimalDigits[index];
+
+ return this.DoTest("PosTest2: Decimal digit character.",
+ "P002", "003", "004", ch, true);
+ }
+
+ public bool PosTest3()
+ {
+ //Generate a non character for validate
+ char ch = '\n';
+
+ return this.DoTest("PosTest3: Not decimal digit nor letter character.",
+ "P003", "005", "006", ch, false);
+ }
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char ch,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ bool actualResult = char.IsLetterOrDigit(ch);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} should belong to letter or decimal digit characters.", (int)ch);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} does not belong to letter or decimal digit characters.", (int)ch);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nCharacter is \\u{0:x}", ch);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //ArgumentNullException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: String is a null reference (Nothing in Visual Basic).";
+ string errorDesc;
+
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ index = TestLibrary.Generator.GetInt32(-55);
+ char.IsLetterOrDigit(null, index);
+ errorDesc = "ArgumentNullException is not thrown as expected, index is " + index;
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e + "\n Index is " + index;
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //ArgumentOutOfRangeException
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: Index is too great.";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = str.Length + TestLibrary.Generator.GetInt16(-55);
+ index = str.Length;
+ char.IsLetterOrDigit(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", str[index]);
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: Index is a negative value";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = -1 * (TestLibrary.Generator.GetInt16(-55));
+ char.IsLetterOrDigit(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", str[index]);
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charislower1.cs b/tests/src/CoreMangLib/cti/system/char/charislower1.cs
new file mode 100644
index 0000000000..c7e25518f7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charislower1.cs
@@ -0,0 +1,111 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.IsLower(Char)
+/// Indicates whether the specified Unicode character is categorized as a lowercase letter.
+/// </summary>
+public class CharIsLower
+{
+ public static int Main()
+ {
+ CharIsLower testObj = new CharIsLower();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.IsLower(Char)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ //Generate the character for validate
+ char ch = 'a';
+
+ return this.DoTest("PosTest1: Lowercase letter character",
+ "P001", "001", "002", ch, true);
+ }
+
+ public bool PosTest2()
+ {
+ //Generate a non character for validate
+ char ch = 'A';
+ return this.DoTest("PosTest2: Uppercase letter character.",
+ "P002", "003", "004", ch, false);
+ }
+
+ public bool PosTest3()
+ {
+ //Generate a non character for validate
+ char ch = TestLibrary.Generator.GetCharNumber(-55);
+ return this.DoTest("PosTest3: Non letter character.",
+ "P003", "005", "006", ch, false);
+ }
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char ch,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ bool actualResult = char.IsLower(ch);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} should belong to lowercase letter characters.", (int)ch);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} does not belong to lowercase letter characters.", (int)ch);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1+ " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nCharacter is \\u{0:x}", ch);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charislower2.cs b/tests/src/CoreMangLib/cti/system/char/charislower2.cs
new file mode 100644
index 0000000000..d18358aca8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charislower2.cs
@@ -0,0 +1,228 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// char.IsLower(string, int)
+/// Indicates whether the character at the specified position in a specified string is categorized
+/// as a lowercase letter character.
+/// </summary>
+public class CharIsLower
+{
+ private const int c_MIN_STR_LEN = 2;
+ private const int c_MAX_STR_LEN = 256;
+
+ public static int Main()
+ {
+ CharIsLower testObj = new CharIsLower();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: char.IsLower(string, int)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negaitive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ //Generate the character for validate
+ char ch = 'a';
+
+ return this.DoTest("PosTest1: Lowercase letter character",
+ "P001", "001", "002", ch, true);
+ }
+
+ public bool PosTest2()
+ {
+ //Generate a non character for validate
+ char ch = 'A';
+ return this.DoTest("PosTest2: Uppercase letter character.",
+ "P002", "003", "004", ch, false);
+ }
+
+ public bool PosTest3()
+ {
+ //Generate a non character for validate
+ char ch = TestLibrary.Generator.GetCharNumber(-55);
+ return this.DoTest("PosTest3: Non letter character.",
+ "P003", "005", "006", ch, false);
+ }
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char ch,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ bool actualResult = char.IsLower(ch);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} should belong to lowercase letter characters.", (int)ch);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} does not belong to lowercase letter characters.", (int)ch);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nCharacter is \\u{0:x}", ch);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //ArgumentNullException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: String is a null reference (Nothing in Visual Basic).";
+ string errorDesc;
+
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ index = TestLibrary.Generator.GetInt32(-55);
+ char.IsLower(null, index);
+ errorDesc = "ArgumentNullException is not thrown as expected, index is " + index;
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e + "\n Index is " + index;
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //ArgumentOutOfRangeException
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: Index is too great.";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = str.Length + TestLibrary.Generator.GetInt16(-55);
+ index = str.Length;
+ char.IsLower(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", str[index]);
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: Index is a negative value";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = -1 * (TestLibrary.Generator.GetInt16(-55));
+ char.IsLower(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is \\u{0:x}", str[index]);
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charisnumber1.cs b/tests/src/CoreMangLib/cti/system/char/charisnumber1.cs
new file mode 100644
index 0000000000..40c9c54d4a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charisnumber1.cs
@@ -0,0 +1,109 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.IsNumber(Char)
+/// Indicates whether the specified Unicode character is categorized as a number.
+/// </summary>
+public class CharIsNumber
+{
+ private static readonly char[] r_decimalDigits =
+ {
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'
+ };
+
+ public static int Main()
+ {
+ CharIsNumber testObj = new CharIsNumber();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.IsNumber(Char)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ //Generate the character for validate
+ int index = TestLibrary.Generator.GetInt32(-55) % r_decimalDigits.Length;
+ char ch = r_decimalDigits[index];
+
+ return this.DoTest("PosTest1: Number character",
+ "P001", "001", "002", ch, true);
+ }
+
+ public bool PosTest2()
+ {
+ //Generate a non character for validate
+ char ch = 'A';
+ return this.DoTest("PosTest2: Non-number character.",
+ "P002", "003", "004", ch, false);
+ }
+
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char ch,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ bool actualResult = char.IsNumber(ch);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} should belong to number.", (int)ch);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} does not belong to number.", (int)ch);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nCharacter is \\u{0:x}", ch);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charisnumber2.cs b/tests/src/CoreMangLib/cti/system/char/charisnumber2.cs
new file mode 100644
index 0000000000..9419f0f60a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charisnumber2.cs
@@ -0,0 +1,227 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// char.IsNumber(string, int)
+/// Indicates whether the character at the specified position in a specified string is categorized
+/// as a number.
+/// </summary>
+public class CharIsNumber
+{
+ private const int c_MIN_STR_LEN = 2;
+ private const int c_MAX_STR_LEN = 256;
+
+ private static readonly char[] r_decimalDigits =
+ {
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'
+ };
+
+ public static int Main()
+ {
+ CharIsNumber testObj = new CharIsNumber();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: char.IsNumber(string, int)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negaitive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ //Generate the character for validate
+ int index = TestLibrary.Generator.GetInt32(-55) % r_decimalDigits.Length;
+ char ch = r_decimalDigits[index];
+
+ return this.DoTest("PosTest1: Number character",
+ "P001", "001", "002", ch, true);
+ }
+
+ public bool PosTest2()
+ {
+ //Generate a non character for validate
+ char ch = 'A';
+ return this.DoTest("PosTest2: Non-number character.",
+ "P002", "003", "004", ch, false);
+ }
+
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char ch,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ string str = new string(ch, 1);
+ bool actualResult = char.IsNumber(str, 0);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} should belong to number.", (int)ch);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} does not belong to number.", (int)ch);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nCharacter is \\u{0:x}", ch);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //ArgumentNullException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: String is a null reference (Nothing in Visual Basic).";
+ string errorDesc;
+
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ index = TestLibrary.Generator.GetInt32(-55);
+ char.IsNumber(null, index);
+ errorDesc = "ArgumentNullException is not thrown as expected, index is " + index;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e + "\n Index is " + index;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //ArgumentOutOfRangeException
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: Index is too great.";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = str.Length + TestLibrary.Generator.GetInt16(-55);
+ index = str.Length;
+ char.IsNumber(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe string is {0}, and the index is {1}", str, index);
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: Index is a negative value";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = -1 * (TestLibrary.Generator.GetInt16(-55));
+ char.IsNumber(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe string is {0}, and the index is {1}", str, index);
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charispunctuation2.cs b/tests/src/CoreMangLib/cti/system/char/charispunctuation2.cs
new file mode 100644
index 0000000000..cd08e1d500
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charispunctuation2.cs
@@ -0,0 +1,221 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// char.IsPunctuation(string, int)
+/// Indicates whether the character at the specified position in a specified string is categorized
+/// as a punctuation.
+/// </summary>
+public class CharIsPunctuation
+{
+ private const int c_MIN_STR_LEN = 2;
+ private const int c_MAX_STR_LEN = 256;
+
+ public static int Main()
+ {
+ CharIsPunctuation testObj = new CharIsPunctuation();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: char.IsPunctuation(string, int)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negaitive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ //Generate a character for validate
+ char ch = '"';
+
+ return this.DoTest("PosTest1: Punctuation character",
+ "P001", "001", "002", ch, true);
+ }
+
+ public bool PosTest2()
+ {
+ //Generate a non punctuation character for validate
+ char ch = 'A';
+ return this.DoTest("PosTest2: Non-punctuation character.",
+ "P002", "003", "004", ch, false);
+ }
+
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char ch,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ string str = new string(ch ,1);
+ bool actualResult = char.IsPunctuation(str, 0);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} should belong to punctuation.", (int)ch);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} does not belong to punctuation.", (int)ch);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nCharacter is \\u{0:x}", ch);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //ArgumentNullException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: String is a null reference (Nothing in Visual Basic).";
+ string errorDesc;
+
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ index = TestLibrary.Generator.GetInt32(-55);
+ char.IsPunctuation(null, index);
+ errorDesc = "ArgumentNullException is not thrown as expected, index is " + index;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e + "\n Index is " + index;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //ArgumentOutOfRangeException
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: Index is too great.";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = str.Length + TestLibrary.Generator.GetInt16(-55);
+ index = str.Length;
+ char.IsPunctuation(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe string is {0}, and the index is {1}", str, index);
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: Index is a negative value";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = -1 * (TestLibrary.Generator.GetInt16(-55));
+ char.IsPunctuation(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe string is {0}, and the index is {1}", str, index);
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charisseparator1.cs b/tests/src/CoreMangLib/cti/system/char/charisseparator1.cs
new file mode 100644
index 0000000000..56c6ba4efc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charisseparator1.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.IsSeparator(Char)
+/// Indicates whether the specified Unicode character is categorized as a separator.
+/// </summary>
+public class CharIsSeparator
+{
+ public static int Main()
+ {
+ CharIsSeparator testObj = new CharIsSeparator();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.IsSeparator(Char)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ //Generate the character for validate
+ char ch = ' '; //space character
+
+ return this.DoTest("PosTest1: Separator character",
+ "P001", "001", "002", ch, true);
+ }
+
+ public bool PosTest2()
+ {
+ //Generate a non separator character for validate
+ char ch = TestLibrary.Generator.GetCharLetter(-55);
+ return this.DoTest("PosTest2: Non-separator character.",
+ "P002", "003", "004", ch, false);
+ }
+
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char ch,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ bool actualResult = char.IsSeparator(ch);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} should belong to separator.", (int)ch);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} does not belong to separator.", (int)ch);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nCharacter is \\u{0:x}", ch);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charisseparator2.cs b/tests/src/CoreMangLib/cti/system/char/charisseparator2.cs
new file mode 100644
index 0000000000..7d1eee9e16
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charisseparator2.cs
@@ -0,0 +1,221 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// char.IsSeparator(string, int)
+/// Indicates whether the character at the specified position in a specified string is categorized
+/// as a separator.
+/// </summary>
+public class CharIsSeparator
+{
+ private const int c_MIN_STR_LEN = 2;
+ private const int c_MAX_STR_LEN = 256;
+
+ public static int Main()
+ {
+ CharIsSeparator testObj = new CharIsSeparator();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: char.IsSeparator(string, int)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negaitive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ //Generate the character for validate
+ char ch = ' '; //space character
+
+ return this.DoTest("PosTest1: Separator character",
+ "P001", "001", "002", ch, true);
+ }
+
+ public bool PosTest2()
+ {
+ //Generate a non separator character for validate
+ char ch = TestLibrary.Generator.GetCharLetter(-55);
+ return this.DoTest("PosTest2: Non-separator character.",
+ "P002", "003", "004", ch, false);
+ }
+
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char ch,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ string str = new string(ch, 1);
+ bool actualResult = char.IsSeparator(str, 0);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} should belong to separator.", (int)ch);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} does not belong to separator.", (int)ch);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nCharacter is \\u{0:x}", ch);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //ArgumentNullException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: String is a null reference (Nothing in Visual Basic).";
+ string errorDesc;
+
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ index = TestLibrary.Generator.GetInt32(-55);
+ char.IsSeparator(null, index);
+ errorDesc = "ArgumentNullException is not thrown as expected, index is " + index;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e + "\n Index is " + index;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //ArgumentOutOfRangeException
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: Index is too great.";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = str.Length + TestLibrary.Generator.GetInt16(-55);
+ index = str.Length;
+ char.IsSeparator(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe string is {0}, and the index is {1}", str, index);
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: Index is a negative value";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = -1 * (TestLibrary.Generator.GetInt16(-55));
+ char.IsSeparator(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe string is {0}, and the index is {1}", str, index);
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charissurrogate1.cs b/tests/src/CoreMangLib/cti/system/char/charissurrogate1.cs
new file mode 100644
index 0000000000..13ab7d633d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charissurrogate1.cs
@@ -0,0 +1,124 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.IsSurrogate(Char)
+/// Indicates whether the specified Unicode character is categorized as a surrogate.
+/// </summary>
+public class CharIsSurrogate
+{
+ private const char c_HIGH_SURROGATE_START = '\ud800';
+ private const char c_HIGH_SURROGATE_END = '\udbff';
+ private const char c_LOW_SURROGATE_START = '\udc00';
+ private const char c_LOW_SURROGATE_END = '\udfff';
+
+ public static int Main()
+ {
+ CharIsSurrogate testObj = new CharIsSurrogate();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.IsSurrogate(Char)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ char ch;
+ //Generate a low surrogate character for validate
+ int count = (int)c_LOW_SURROGATE_END - (int)c_LOW_SURROGATE_START + 1;
+ int offset = TestLibrary.Generator.GetInt32(-55) % count;
+ ch = (char)((int)c_LOW_SURROGATE_START + offset);
+
+ return this.DoTest("PosTest1: Low surrogate character",
+ "P001", "001", "002", ch, true);
+ }
+
+ public bool PosTest2()
+ {
+ char ch;
+ //Generate a hign surrogate character for validate
+ int count = (int)c_HIGH_SURROGATE_END - (int)c_HIGH_SURROGATE_START + 1;
+ int offset = TestLibrary.Generator.GetInt32(-55) % count;
+ ch = (char)((int)c_HIGH_SURROGATE_START + offset);
+
+ return this.DoTest("PosTest2: Hign surrogate character.",
+ "P002", "003", "004", ch, true);
+ }
+
+ public bool PosTest3()
+ {
+ //Generate a non surrogate character for validate
+ char ch = TestLibrary.Generator.GetCharLetter(-55);
+ return this.DoTest("PosTest3: Non-surrogate character.",
+ "P003", "005", "006", ch, false);
+ }
+
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char ch,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ bool actualResult = char.IsSurrogate(ch);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} should belong to surrogate.", (int)ch);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} does not belong to surrogate.", (int)ch);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nCharacter is \\u{0:x}", ch);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charissurrogate2.cs b/tests/src/CoreMangLib/cti/system/char/charissurrogate2.cs
new file mode 100644
index 0000000000..e6bb988513
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charissurrogate2.cs
@@ -0,0 +1,242 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.IsSurrogate(Char)
+/// Indicates whether the character at the specified position in a specified string is categorized
+/// as a surrogate.
+/// </summary>
+public class CharIsSurrogate
+{
+ private const int c_MIN_STR_LEN = 2;
+ private const int c_MAX_STR_LEN = 256;
+
+ private const char c_HIGH_SURROGATE_START = '\ud800';
+ private const char c_HIGH_SURROGATE_END = '\udbff';
+ private const char c_LOW_SURROGATE_START = '\udc00';
+ private const char c_LOW_SURROGATE_END = '\udfff';
+
+ public static int Main()
+ {
+ CharIsSurrogate testObj = new CharIsSurrogate();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.IsSurrogate(Char)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negaitive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+
+ char ch;
+ //Generate a low surrogate character for validate
+ int count = (int)c_LOW_SURROGATE_END - (int)c_LOW_SURROGATE_START + 1;
+ int offset = TestLibrary.Generator.GetInt32(-55) % count;
+ ch = (char)((int)c_LOW_SURROGATE_START + offset);
+
+ return this.DoTest("PosTest1: Low surrogate character",
+ "P001", "001", "002", ch, true);
+ }
+
+ public bool PosTest2()
+ {
+ char ch;
+ //Generate a hign surrogate character for validate
+ int count = (int)c_HIGH_SURROGATE_END - (int)c_HIGH_SURROGATE_START + 1;
+ int offset = TestLibrary.Generator.GetInt32(-55) % count;
+ ch = (char)((int)c_HIGH_SURROGATE_START + offset);
+
+ return this.DoTest("PosTest2: Hign surrogate character.",
+ "P002", "003", "004", ch, true);
+ }
+
+ public bool PosTest3()
+ {
+ //Generate a non surrogate character for validate
+ char ch = TestLibrary.Generator.GetCharLetter(-55);
+ return this.DoTest("PosTest3: Non-surrogate character.",
+ "P003", "005", "006", ch, false);
+ }
+
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char ch,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ string str = new string(ch, 1);
+ bool actualResult = char.IsSurrogate(str, 0);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} should belong to surrogate.", (int)ch);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} does not belong to surrogate.", (int)ch);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nCharacter is \\u{0:x}", ch);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //ArgumentNullException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: String is a null reference (Nothing in Visual Basic).";
+ string errorDesc;
+
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ index = TestLibrary.Generator.GetInt32(-55);
+ char.IsSurrogate(null, index);
+ errorDesc = "ArgumentNullException is not thrown as expected, index is " + index;
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e + "\n Index is " + index;
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //ArgumentOutOfRangeException
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: Index is too great.";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = str.Length + TestLibrary.Generator.GetInt16(-55);
+ index = str.Length;
+ char.IsSurrogate(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe string is {0}, and the index is {1}", str, index);
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: Index is a negative value";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = -1 * (TestLibrary.Generator.GetInt16(-55));
+ char.IsSurrogate(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe string is {0}, and the index is {1}", str, index);
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charissurrogatepair1.cs b/tests/src/CoreMangLib/cti/system/char/charissurrogatepair1.cs
new file mode 100644
index 0000000000..fb76d2e5c1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charissurrogatepair1.cs
@@ -0,0 +1,194 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.IsSurrogatePair(char, char)
+/// Note: This method is new in the .NET Framework version 2.0.
+/// Indicates whether the two specified Char objects form a surrogate pair.
+/// </summary>
+public class CharIsSurrogatePair
+{
+ private const char c_HIGH_SURROGATE_START = '\ud800';
+ private const char c_HIGH_SURROGATE_END = '\udbff';
+ private const char c_LOW_SURROGATE_START = '\udc00';
+ private const char c_LOW_SURROGATE_END = '\udfff';
+
+ public static int Main()
+ {
+ CharIsSurrogatePair testObj = new CharIsSurrogatePair();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.IsSurrogatePair(Char, char)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ char chA;
+ char chB;
+ //Generate a high surrogate character for validate
+ int count = (int)c_HIGH_SURROGATE_END - (int)c_HIGH_SURROGATE_START + 1;
+ int offset = TestLibrary.Generator.GetInt32(-55) % count;
+ chA = (char)((int)c_HIGH_SURROGATE_START + offset);
+
+ //Generate a character not low surrogate for validate
+ count = (int)c_LOW_SURROGATE_END - (int)c_LOW_SURROGATE_START + 1;
+ offset = TestLibrary.Generator.GetInt32(-55) % count;
+ chB = (char)((int)c_LOW_SURROGATE_START + offset);
+
+ return this.DoTest("PosTest1: First character is high surrogate, and the second is low surrogate",
+ "P001", "001", "002", chA, chB, true);
+ }
+
+ public bool PosTest2()
+ {
+ char chA;
+ char chB;
+ //Generate a high surrogate character for validate
+ int count = (int)c_HIGH_SURROGATE_END - (int)c_HIGH_SURROGATE_START + 1;
+ int offset = TestLibrary.Generator.GetInt32(-55) % count;
+ chA = (char)((int)c_HIGH_SURROGATE_START + offset);
+
+ //Generate a character not low surrogate for validate
+ int i = TestLibrary.Generator.GetInt32(-55) & 0x00000001;
+ if (0 == i)
+ {
+ chB = (char)(TestLibrary.Generator.GetInt32(-55) % ((int)c_LOW_SURROGATE_START));
+ }
+ else
+ {
+ chB = (char)((int)c_LOW_SURROGATE_END + 1 +
+ TestLibrary.Generator.GetInt32(-55) % ((int)char.MaxValue - (int)c_LOW_SURROGATE_END));
+ }
+
+ return this.DoTest("PosTest2: First character is high surrogate, but the second is not low surrogate",
+ "P002", "003", "004", chA, chB, false);
+ }
+
+ public bool PosTest3()
+ {
+ char chA;
+ char chB;
+ //Generate a character not high surrogate for validate
+ int i = TestLibrary.Generator.GetInt32(-55) & 0x00000001;
+ if (0 == i)
+ {
+ chA = (char)(TestLibrary.Generator.GetInt32(-55) % ((int)c_HIGH_SURROGATE_START));
+ }
+ else
+ {
+ chA = (char)((int)c_HIGH_SURROGATE_END + 1 +
+ TestLibrary.Generator.GetInt32(-55) % ((int)char.MaxValue - (int)c_HIGH_SURROGATE_END));
+ }
+
+ //Generate a low surrogate character for validate
+ int count = (int)c_LOW_SURROGATE_END - (int)c_LOW_SURROGATE_START + 1;
+ int offset = TestLibrary.Generator.GetInt32(-55) % count;
+ chB = (char)((int)c_LOW_SURROGATE_START + offset);
+
+ return this.DoTest("PosTest2: Second character is low surrogate, but the first is not high surrogate",
+ "P003", "005", "006", chA, chB, false);
+ }
+
+ public bool PosTest4()
+ {
+ char chA;
+ char chB;
+ //Generate a character not high surrogate for validate
+ int i = TestLibrary.Generator.GetInt32(-55) & 0x00000001;
+ if (0 == i)
+ {
+ chA = (char)(TestLibrary.Generator.GetInt32(-55) % ((int)c_HIGH_SURROGATE_START));
+ }
+ else
+ {
+ chA = (char)((int)c_HIGH_SURROGATE_END + 1 +
+ TestLibrary.Generator.GetInt32(-55) % ((int)char.MaxValue - (int)c_HIGH_SURROGATE_END));
+ }
+
+ //Generate a character not low surrogate for validate
+ i = TestLibrary.Generator.GetInt32(-55) & 0x00000001;
+ if (0 == i)
+ {
+ chB = (char)(TestLibrary.Generator.GetInt32(-55) % ((int)c_LOW_SURROGATE_START));
+ }
+ else
+ {
+ chB = (char)((int)c_LOW_SURROGATE_END + 1 +
+ TestLibrary.Generator.GetInt32(-55) % ((int)char.MaxValue - (int)c_LOW_SURROGATE_END));
+ }
+
+ return this.DoTest("PosTest2: Both the first character and the second are invalid",
+ "P004", "007", "008", chA, chB, false);
+ }
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char chA,
+ char chB,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ bool actualResult = char.IsSurrogatePair(chA, chB);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} and \\u{1:x} should belong to surrogate pair.", (int)chA, (int)chB);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} and \\u{1:x} does not belong to surrogate pair.", (int)chA, (int)chB);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nCharacter is \\u{0:x} and \\u{1:x}", chA, chB);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charissurrogatepair2.cs b/tests/src/CoreMangLib/cti/system/char/charissurrogatepair2.cs
new file mode 100644
index 0000000000..8fb09d19e2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charissurrogatepair2.cs
@@ -0,0 +1,310 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.IsSurrogatePair(string, index)
+/// Note: This method is new in the .NET Framework version 2.0.
+/// Indicates whether two adjacent Char objects at a specified position in a string form a surrogate pair.
+/// </summary>
+public class CharIsSurrogatePair
+{
+ private const int c_MIN_STR_LEN = 2;
+ private const int c_MAX_STR_LEN = 256;
+
+ private const char c_HIGH_SURROGATE_START = '\ud800';
+ private const char c_HIGH_SURROGATE_END = '\udbff';
+ private const char c_LOW_SURROGATE_START = '\udc00';
+ private const char c_LOW_SURROGATE_END = '\udfff';
+
+ public static int Main()
+ {
+ CharIsSurrogatePair testObj = new CharIsSurrogatePair();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.IsSurrogatePair(string, index)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negaitive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ char chA;
+ char chB;
+ //Generate a high surrogate character for validate
+ int count = (int)c_HIGH_SURROGATE_END - (int)c_HIGH_SURROGATE_START + 1;
+ int offset = TestLibrary.Generator.GetInt32(-55) % count;
+ chA = (char)((int)c_HIGH_SURROGATE_START + offset);
+
+ //Generate a character not low surrogate for validate
+ count = (int)c_LOW_SURROGATE_END - (int)c_LOW_SURROGATE_START + 1;
+ offset = TestLibrary.Generator.GetInt32(-55) % count;
+ chB = (char)((int)c_LOW_SURROGATE_START + offset);
+
+ return this.DoTest("PosTest1: First character is high surrogate, and the second is low surrogate",
+ "P001", "001", "002", chA, chB, true);
+ }
+
+ public bool PosTest2()
+ {
+ char chA;
+ char chB;
+ //Generate a high surrogate character for validate
+ int count = (int)c_HIGH_SURROGATE_END - (int)c_HIGH_SURROGATE_START + 1;
+ int offset = TestLibrary.Generator.GetInt32(-55) % count;
+ chA = (char)((int)c_HIGH_SURROGATE_START + offset);
+
+ //Generate a character not low surrogate for validate
+ int i = TestLibrary.Generator.GetInt32(-55) & 0x00000001;
+ if (0 == i)
+ {
+ chB = (char)(TestLibrary.Generator.GetInt32(-55) % ((int)c_LOW_SURROGATE_START));
+ }
+ else
+ {
+ chB = (char)((int)c_LOW_SURROGATE_END + 1 +
+ TestLibrary.Generator.GetInt32(-55) % ((int)char.MaxValue - (int)c_LOW_SURROGATE_END));
+ }
+
+ return this.DoTest("PosTest2: First character is high surrogate, but the second is not low surrogate",
+ "P002", "003", "004", chA, chB, false);
+ }
+
+ public bool PosTest3()
+ {
+ char chA;
+ char chB;
+ //Generate a character not high surrogate for validate
+ int i = TestLibrary.Generator.GetInt32(-55) & 0x00000001;
+ if (0 == i)
+ {
+ chA = (char)(TestLibrary.Generator.GetInt32(-55) % ((int)c_HIGH_SURROGATE_START));
+ }
+ else
+ {
+ chA = (char)((int)c_HIGH_SURROGATE_END + 1 +
+ TestLibrary.Generator.GetInt32(-55) % ((int)char.MaxValue - (int)c_HIGH_SURROGATE_END));
+ }
+
+ //Generate a low surrogate character for validate
+ int count = (int)c_LOW_SURROGATE_END - (int)c_LOW_SURROGATE_START + 1;
+ int offset = TestLibrary.Generator.GetInt32(-55) % count;
+ chB = (char)((int)c_LOW_SURROGATE_START + offset);
+
+ return this.DoTest("PosTest2: Second character is low surrogate, but the first is not high surrogate",
+ "P003", "005", "006", chA, chB, false);
+ }
+
+ public bool PosTest4()
+ {
+ char chA;
+ char chB;
+ //Generate a character not high surrogate for validate
+ int i = TestLibrary.Generator.GetInt32(-55) & 0x00000001;
+ if (0 == i)
+ {
+ chA = (char)(TestLibrary.Generator.GetInt32(-55) % ((int)c_HIGH_SURROGATE_START));
+ }
+ else
+ {
+ chA = (char)((int)c_HIGH_SURROGATE_END + 1 +
+ TestLibrary.Generator.GetInt32(-55) % ((int)char.MaxValue - (int)c_HIGH_SURROGATE_END));
+ }
+
+ //Generate a character not low surrogate for validate
+ i = TestLibrary.Generator.GetInt32(-55) & 0x00000001;
+ if (0 == i)
+ {
+ chB = (char)(TestLibrary.Generator.GetInt32(-55) % ((int)c_LOW_SURROGATE_START));
+ }
+ else
+ {
+ chB = (char)((int)c_LOW_SURROGATE_END + 1 +
+ TestLibrary.Generator.GetInt32(-55) % ((int)char.MaxValue - (int)c_LOW_SURROGATE_END));
+ }
+
+ return this.DoTest("PosTest2: Both the first character and the second are invalid",
+ "P004", "007", "008", chA, chB, false);
+ }
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char chA,
+ char chB,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ string str = string.Empty + chA + chB;
+ bool actualResult = char.IsSurrogatePair(str, 0);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} and \\u{1:x} should belong to surrogate pair.", (int)chA, (int)chB);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} and \\u{1:x} does not belong to surrogate pair.", (int)chA, (int)chB);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nCharacter is \\u{0:x} and \\u{1:x}", chA, chB);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //ArgumentNullException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: String is a null reference (Nothing in Visual Basic).";
+ string errorDesc;
+
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ index = TestLibrary.Generator.GetInt32(-55);
+ char.IsPunctuation(null, index);
+ errorDesc = "ArgumentNullException is not thrown as expected, index is " + index;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e + "\n Index is " + index;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //ArgumentOutOfRangeException
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: Index is too great.";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = str.Length + TestLibrary.Generator.GetInt16(-55);
+ index = str.Length;
+ char.IsPunctuation(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe string is {0}, and the index is {1}", str, index);
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: Index is a negative value";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = -1 * (TestLibrary.Generator.GetInt16(-55));
+ char.IsPunctuation(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe string is {0}, and the index is {1}", str, index);
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charissymbol1.cs b/tests/src/CoreMangLib/cti/system/char/charissymbol1.cs
new file mode 100644
index 0000000000..62a913d414
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charissymbol1.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.IsSymbol(Char)
+/// Indicates whether the specified Unicode character is categorized as a symbol.
+/// </summary>
+public class CharIsSymbol
+{
+ public static int Main()
+ {
+ CharIsSymbol testObj = new CharIsSymbol();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.IsSymbol(Char)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ //Generate the character for validate
+ char ch = '+';
+
+ return this.DoTest("PosTest1: Symbol character",
+ "P001", "001", "002", ch, true);
+ }
+
+ public bool PosTest2()
+ {
+ //Generate a non separator character for validate
+ char ch = TestLibrary.Generator.GetCharLetter(-55);
+ return this.DoTest("PosTest2: Non-symbol character.",
+ "P002", "003", "004", ch, false);
+ }
+
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char ch,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ bool actualResult = char.IsSymbol(ch);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} should belong to symbol.", (int)ch);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} does not belong to symbol.", (int)ch);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nCharacter is \\u{0:x}", ch);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charisupper1.cs b/tests/src/CoreMangLib/cti/system/char/charisupper1.cs
new file mode 100644
index 0000000000..2a7b234f04
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charisupper1.cs
@@ -0,0 +1,111 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.IsUpper(Char)
+/// Indicates whether the specified Unicode character is categorized as a uppercase letter.
+/// </summary>
+public class CharIsUpper
+{
+ public static int Main()
+ {
+ CharIsUpper testObj = new CharIsUpper();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.IsUpper(Char)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ //Generate the character for validate
+ char ch = 'a';
+
+ return this.DoTest("PosTest1: Lowercase letter character",
+ "P001", "001", "002", ch, false);
+ }
+
+ public bool PosTest2()
+ {
+ //Generate a non character for validate
+ char ch = 'A';
+ return this.DoTest("PosTest2: Uppercase letter character.",
+ "P002", "003", "004", ch, true);
+ }
+
+ public bool PosTest3()
+ {
+ //Generate a non character for validate
+ char ch = TestLibrary.Generator.GetCharNumber(-55);
+ return this.DoTest("PosTest3: Non letter character.",
+ "P003", "005", "006", ch, false);
+ }
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char ch,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ bool actualResult = char.IsUpper(ch);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} should belong to uppercase letter characters.", (int)ch);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} does not belong to uppercase letter characters.", (int)ch);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1+ " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nCharacter is \\u{0:x}", ch);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charisupper2.cs b/tests/src/CoreMangLib/cti/system/char/charisupper2.cs
new file mode 100644
index 0000000000..44bfdc50dd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charisupper2.cs
@@ -0,0 +1,228 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// char.IsUpper(string, int)
+/// Indicates whether the character at the specified position in a specified string is categorized
+/// as a uppercase letter character.
+/// </summary>
+public class CharIsUpper
+{
+ private const int c_MIN_STR_LEN = 2;
+ private const int c_MAX_STR_LEN = 256;
+
+ public static int Main()
+ {
+ CharIsUpper testObj = new CharIsUpper();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: char.IsUpper(string, int)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negaitive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ //Generate the character for validate
+ char ch = 'a';
+
+ return this.DoTest("PosTest1: Lowercase letter character",
+ "P001", "001", "002", ch, false);
+ }
+
+ public bool PosTest2()
+ {
+ //Generate a non character for validate
+ char ch = 'A';
+ return this.DoTest("PosTest2: Uppercase letter character.",
+ "P002", "003", "004", ch, true);
+ }
+
+ public bool PosTest3()
+ {
+ //Generate a non character for validate
+ char ch = TestLibrary.Generator.GetCharNumber(-55);
+ return this.DoTest("PosTest3: Non letter character.",
+ "P003", "005", "006", ch, false);
+ }
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char ch,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ bool actualResult = char.IsUpper(ch);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} should belong to uppercase letter characters.", (int)ch);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} does not belong to uppercase letter characters.", (int)ch);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nCharacter is \\u{0:x}", ch);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //ArgumentNullException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: String is a null reference (Nothing in Visual Basic).";
+ string errorDesc;
+
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ index = TestLibrary.Generator.GetInt32(-55);
+ char.IsUpper(null, index);
+ errorDesc = "ArgumentNullException is not thrown as expected, index is " + index;
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e + "\n Index is " + index;
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //ArgumentOutOfRangeException
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: Index is too great.";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = str.Length + TestLibrary.Generator.GetInt16(-55);
+ index = str.Length;
+ char.IsUpper(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe string is {0}, and the index is {1}", str, index);
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: Index is a negative value";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = -1 * (TestLibrary.Generator.GetInt16(-55));
+ char.IsUpper(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe string is {0}, and the index is {1}", str, index);
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/chariswhitespace1.cs b/tests/src/CoreMangLib/cti/system/char/chariswhitespace1.cs
new file mode 100644
index 0000000000..98506afae6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/chariswhitespace1.cs
@@ -0,0 +1,117 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.IsWhiteSpace(Char)
+/// Indicates whether the specified Unicode character is categorized as a whitespace.
+/// </summary>
+public class CharIsWhiteSpace
+{
+ private static readonly char[] r_whiteSpaceChars =
+ {
+ (char)0x0009, (char)0x000A, (char)0x000B, (char)0x000C, (char)0x000D,
+ (char)0x0020,
+ (char)0x0085, (char)0x00A0,
+ (char)0x1680, (char)0x180E, //compatibility with desktop
+ (char)0x2000, (char)0x2001, (char)0x2002, (char)0x2003, (char)0x2004, (char)0x2005,
+ (char)0x2006, (char)0x2007, (char)0x2008, (char)0x2009, (char)0x200A, //(char)0x200B,
+ (char)0x2028, (char)0x2029,
+ (char)0x202F, (char)0x205F, //compatibility with desktop
+ (char)0x3000, //(char)0xFEFF
+ };
+
+ public static int Main()
+ {
+ CharIsWhiteSpace testObj = new CharIsWhiteSpace();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.IsWhiteSpace(Char)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ //Generate the character for validate
+ int index = TestLibrary.Generator.GetInt32(-55) % r_whiteSpaceChars.Length;
+ char ch = r_whiteSpaceChars[index];
+
+ return this.DoTest("PosTest1: Whitespace character",
+ "P001", "001", "002", ch, true);
+ }
+
+ public bool PosTest2()
+ {
+ //Generate a non separator character for validate
+ char ch = TestLibrary.Generator.GetCharLetter(-55);
+ return this.DoTest("PosTest2: Non-whitespace character.",
+ "P002", "003", "004", ch, false);
+ }
+
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char ch,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ bool actualResult = char.IsWhiteSpace(ch);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} should belong to whitespace.", (int)ch);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} does not belong to whitespace.", (int)ch);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nCharacter is \\u{0:x}", ch);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/chariswhitespace2.cs b/tests/src/CoreMangLib/cti/system/char/chariswhitespace2.cs
new file mode 100644
index 0000000000..883a44e601
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/chariswhitespace2.cs
@@ -0,0 +1,234 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.IsWhiteSpace(string, int)
+/// Indicates whether the character at specifed position in a specified string is categorized
+/// as a whitespace.
+/// </summary>
+public class CharIsWhiteSpace
+{
+ private const int c_MIN_STR_LEN = 2;
+ private const int c_MAX_STR_LEN = 256;
+
+ private static readonly char[] r_whiteSpaceChars =
+ {
+ (char)0x0009, (char)0x000A, (char)0x000B, (char)0x000C, (char)0x000D,
+ (char)0x0020,
+ (char)0x0085, (char)0x00A0,
+ (char)0x1680, (char)0x180E, //compatibility with desktop
+ (char)0x2000, (char)0x2001, (char)0x2002, (char)0x2003, (char)0x2004, (char)0x2005,
+ (char)0x2006, (char)0x2007, (char)0x2008, (char)0x2009, (char)0x200A, //(char)0x200B,
+ (char)0x2028, (char)0x2029,
+ (char)0x202F, (char)0x205F, //compatibility with desktop
+ (char)0x3000, //(char)0xFEFF
+ };
+
+ public static int Main()
+ {
+ CharIsWhiteSpace testObj = new CharIsWhiteSpace();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.IsWhiteSpace(string ,int)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ //Generate the character for validate
+ int index = TestLibrary.Generator.GetInt32(-55) % r_whiteSpaceChars.Length;
+ char ch = r_whiteSpaceChars[index];
+
+ return this.DoTest("PosTest1: Whitespace character",
+ "P001", "001", "002", ch, true);
+ }
+
+ public bool PosTest2()
+ {
+ //Generate a non separator character for validate
+ char ch = TestLibrary.Generator.GetCharLetter(-55);
+ return this.DoTest("PosTest2: Non-whitespace character.",
+ "P002", "003", "004", ch, false);
+ }
+
+ #endregion
+
+ #region Helper method for positive tests
+ private bool DoTest(string testDesc,
+ string testId,
+ string errorNum1,
+ string errorNum2,
+ char ch,
+ bool expectedResult)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ string str = new string(ch, 1);
+ bool actualResult = char.IsWhiteSpace(str, 0);
+ if (expectedResult != actualResult)
+ {
+ if (expectedResult)
+ {
+ errorDesc = string.Format("Character \\u{0:x} should belong to whitespace.", (int)ch);
+ }
+ else
+ {
+ errorDesc = string.Format("Character \\u{0:x} does not belong to whitespace.", (int)ch);
+ }
+
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nCharacter is \\u{0:x}", ch);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //ArgumentNullException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: String is a null reference (Nothing in Visual Basic).";
+ string errorDesc;
+
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ index = TestLibrary.Generator.GetInt32(-55);
+ char.IsWhiteSpace(null, index);
+ errorDesc = "ArgumentNullException is not thrown as expected, index is " + index;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e + "\n Index is " + index;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //ArgumentOutOfRangeException
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: Index is too great.";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = str.Length + TestLibrary.Generator.GetInt16(-55);
+ index = str.Length;
+ char.IsWhiteSpace(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe string is {0}, and the index is {1}", str, index);
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: Index is a negative value";
+ string errorDesc;
+
+ string str = string.Empty;
+ int index = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ index = -1 * (TestLibrary.Generator.GetInt16(-55));
+ char.IsWhiteSpace(str, index);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe string is {0}, and the index is {1}", str, index);
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charmaxvalue.cs b/tests/src/CoreMangLib/cti/system/char/charmaxvalue.cs
new file mode 100644
index 0000000000..37e038abbe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charmaxvalue.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.MaxValue Field
+/// Represents the largest possible value of a Char. This field is constant.
+/// </summary>
+public class CharMaxValue
+{
+ public static int Main()
+ {
+ CharMaxValue testObj = new CharMaxValue();
+
+ TestLibrary.TestFramework.BeginTestCase("for field: Char.MaxValue");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: ";
+ string errorDesc;
+
+ const char c_MAX_CHAR = '\uFFFF';
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ char actualChar = char.MaxValue;
+ if (actualChar != c_MAX_CHAR)
+ {
+ errorDesc = "Field char.MaxValue is not " + c_MAX_CHAR + " as expected: Actual(" + actualChar + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/charminvalue.cs b/tests/src/CoreMangLib/cti/system/char/charminvalue.cs
new file mode 100644
index 0000000000..42a785cedc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/charminvalue.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.MinValue Field
+/// Represents the largest possible value of a Char. This field is constant.
+/// </summary>
+public class CharMinValue
+{
+ public static int Main()
+ {
+ CharMinValue testObj = new CharMinValue();
+
+ TestLibrary.TestFramework.BeginTestCase("for field: Char.MinValue");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: ";
+ string errorDesc;
+
+ const char c_MIN_CHAR = '\u0000';
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ char actualChar = char.MinValue;
+ if (actualChar != c_MIN_CHAR)
+ {
+ errorDesc = "Field char.MinValue is not " + c_MIN_CHAR + " as expected: Actual(" + actualChar + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/chartostring1.cs b/tests/src/CoreMangLib/cti/system/char/chartostring1.cs
new file mode 100644
index 0000000000..88eedc6a85
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/chartostring1.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.ToString()
+/// Converts the value of this instance to its equivalent string representation.
+/// </summary>
+public class CharToString
+{
+ public static int Main()
+ {
+ CharToString testObj = new CharToString();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.ToString()");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Random character";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ char ch = TestLibrary.Generator.GetChar(-55);
+ string expectedStr = new string(ch, 1);
+ string actualStr = ch.ToString();
+ if (actualStr != expectedStr)
+ {
+ errorDesc = string.Format("String representation of character \\u{0:x} is not the value ", (int)ch);
+ errorDesc += string.Format("{0} as expected: actual({1})", expectedStr, actualStr);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/chartostring2.cs b/tests/src/CoreMangLib/cti/system/char/chartostring2.cs
new file mode 100644
index 0000000000..ae5990b93b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/chartostring2.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char.ToString(char)
+/// Converts the value of this instance to its equivalent string representation.
+/// </summary>
+public class CharToString
+{
+ public static int Main()
+ {
+ CharToString testObj = new CharToString();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Char.ToString(char)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Random character";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ char ch = TestLibrary.Generator.GetChar(-55);
+ string expectedStr = new string(ch, 1);
+ string actualStr = char.ToString(ch);
+ if (actualStr != expectedStr)
+ {
+ errorDesc = string.Format("String representation of character \\u{0:x} is not the value ", (int)ch);
+ errorDesc += string.Format("{0} as expected: actual({1})", expectedStr, actualStr);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/char/chartryparse.cs b/tests/src/CoreMangLib/cti/system/char/chartryparse.cs
new file mode 100644
index 0000000000..e93d361f5f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/char/chartryparse.cs
@@ -0,0 +1,92 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+// Ported to CoreCLR from Desktop test Co7522TryParse.cs
+// Tests Char.TryParse(str)
+// 2003/02/25 KatyK
+// 2007/06/28 adapted by MarielY
+public class CharTryParse
+{
+ static bool verbose = false;
+
+ public static int Main()
+ {
+ bool passed = true;
+
+ try
+ {
+ // Success cases
+ passed &= VerifyCharTryParse("a", 'a', true);
+ passed &= VerifyCharTryParse("4", '4', true);
+ passed &= VerifyCharTryParse(" ", ' ', true);
+ passed &= VerifyCharTryParse("\n", '\n', true);
+ passed &= VerifyCharTryParse("\0", '\0', true);
+ passed &= VerifyCharTryParse("\u0135", '\u0135', true);
+ passed &= VerifyCharTryParse("\u05d9", '\u05d9', true);
+ passed &= VerifyCharTryParse("\ud801", '\ud801', true); // high surrogate
+ passed &= VerifyCharTryParse("\udc01", '\udc01', true); // low surrogate
+ passed &= VerifyCharTryParse("\ue001", '\ue001', true); // private use codepoint
+
+ // Fail cases
+ passed &= VerifyCharTryParse(null, '\0', false);
+ passed &= VerifyCharTryParse("", '\0', false);
+ passed &= VerifyCharTryParse("\n\r", '\0', false);
+ passed &= VerifyCharTryParse("kj", '\0', false);
+ passed &= VerifyCharTryParse(" a", '\0', false);
+ passed &= VerifyCharTryParse("a ", '\0', false);
+ passed &= VerifyCharTryParse("\\u0135", '\0', false);
+ passed &= VerifyCharTryParse("\u01356", '\0', false);
+ passed &= VerifyCharTryParse("\ud801\udc01", '\0', false); // surrogate pair
+
+ /// END TEST CASES
+ }
+ catch (Exception e)
+ {
+ TestLibrary.Logging.WriteLine("Unexpected exception!! " + e.ToString());
+ passed = false;
+ }
+
+ if (passed)
+ {
+ TestLibrary.Logging.WriteLine("paSs");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.Logging.WriteLine("FAiL");
+ return 1;
+ }
+ }
+
+ public static bool VerifyCharTryParse(string value, Char expectedResult, bool expectedReturn)
+ {
+ Char result;
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Char.TryParse, Value = '{0}', Expected Result, {1}, Expected Return = {2}",
+ value, expectedResult, expectedReturn);
+ }
+ try
+ {
+ bool returnValue = Char.TryParse(value, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedReturn, returnValue);
+ return false;
+ }
+ if (result != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Result: {1}, Actual Result: {2}", value, expectedResult, result);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/charenumerator/CharEnumeratorCurrent.csproj b/tests/src/CoreMangLib/cti/system/charenumerator/CharEnumeratorCurrent.csproj
new file mode 100644
index 0000000000..5b790de426
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/charenumerator/CharEnumeratorCurrent.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charenumeratorcurrent.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/charenumerator/CharEnumeratorIEnumeratorCurrent.csproj b/tests/src/CoreMangLib/cti/system/charenumerator/CharEnumeratorIEnumeratorCurrent.csproj
new file mode 100644
index 0000000000..117b860ba6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/charenumerator/CharEnumeratorIEnumeratorCurrent.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charenumeratorienumeratorcurrent.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/charenumerator/CharEnumeratorIEnumgetCurrent.csproj b/tests/src/CoreMangLib/cti/system/charenumerator/CharEnumeratorIEnumgetCurrent.csproj
new file mode 100644
index 0000000000..846b898c2e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/charenumerator/CharEnumeratorIEnumgetCurrent.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charenumeratorienumgetcurrent.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/charenumerator/CharEnumeratorMoveNext.csproj b/tests/src/CoreMangLib/cti/system/charenumerator/CharEnumeratorMoveNext.csproj
new file mode 100644
index 0000000000..c0c5fde291
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/charenumerator/CharEnumeratorMoveNext.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charenumeratormovenext.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/charenumerator/CharEnumeratorReset.csproj b/tests/src/CoreMangLib/cti/system/charenumerator/CharEnumeratorReset.csproj
new file mode 100644
index 0000000000..2717cbce2b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/charenumerator/CharEnumeratorReset.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charenumeratorreset.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/charenumerator/charenumeratorcurrent.cs b/tests/src/CoreMangLib/cti/system/charenumerator/charenumeratorcurrent.cs
new file mode 100644
index 0000000000..b3372a6f13
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/charenumerator/charenumeratorcurrent.cs
@@ -0,0 +1,157 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+
+public class CharEnumeratorCurrent
+{
+ const int minLength = 1;
+ const int maxLength = 10;
+
+ public static int Main(string[] args)
+ {
+ CharEnumeratorCurrent ceCurrent = new CharEnumeratorCurrent();
+ TestLibrary.TestFramework.BeginScenario("Testing System.CharEnumerator.Current property...");
+
+ if (ceCurrent.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ //retVal = NegTest1() && retVal;
+ //retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("Check the current show the correct element when index is valid...");
+ char[] strCopy = new char[str.Length];
+ str.CopyTo(0, strCopy, 0, str.Length);
+
+ try
+ {
+ IEnumerator<Char> charEnu = ((IEnumerable<Char>)str).GetEnumerator();
+ charEnu.Reset();
+ for (int i = 0; i < str.Length; i++)
+ {
+ charEnu.MoveNext();
+ if (charEnu.Current != strCopy[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "Current show the wrong element when index is valid!!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Check Current element when index is -1
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("Check Current element when index is -1...");
+ char[] strCopy = new char[str.Length];
+ str.CopyTo(0, strCopy, 0, str.Length);
+
+ try
+ {
+ IEnumerator<Char> charEnu = ((IEnumerable<Char>)str).GetEnumerator();
+ charEnu.Reset();
+ char charTest = charEnu.Current;
+
+ TestLibrary.TestFramework.LogError("003", "No exception occurs!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ TestLibrary.TestFramework.LogInformation("InvalidOperationException is throw after fetch current with -1 index!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Check Current element when index is length+1
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("Check Current element when index is length+1...");
+ char[] strCopy = new char[str.Length];
+ str.CopyTo(0, strCopy, 0, str.Length);
+
+ try
+ {
+ IEnumerator<Char> charEnu = ((IEnumerable<Char>)str).GetEnumerator();
+ charEnu.Reset();
+ for (int i = 0; i < str.Length; i++)
+ {
+ charEnu.MoveNext();
+ if (charEnu.Current != strCopy[i])
+ {
+ TestLibrary.TestFramework.LogError("005", "Current show the wrong element!");
+ retVal = false;
+ }
+ }
+ charEnu.MoveNext();
+ char charTest = charEnu.Current;
+
+ TestLibrary.TestFramework.LogError("006", "No exception occurs when fetch current out of range!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ TestLibrary.TestFramework.LogInformation("InvalidOperationException is thrown after fetch current out of range");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception occurs: " + e);
+ return retVal;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/charenumerator/charenumeratorienumeratorcurrent.cs b/tests/src/CoreMangLib/cti/system/charenumerator/charenumeratorienumeratorcurrent.cs
new file mode 100644
index 0000000000..832d577bb1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/charenumerator/charenumeratorienumeratorcurrent.cs
@@ -0,0 +1,151 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+
+public class CharEnumeratorIEnumeratorCurrent
+{
+ const int minLength = 1;
+ const int maxLength = 10;
+
+ public static int Main(string[] args)
+ {
+ CharEnumeratorIEnumeratorCurrent ceIEnumCurrent =
+ new CharEnumeratorIEnumeratorCurrent();
+
+ TestLibrary.TestFramework.BeginScenario("System.CharEnumerator.IEnumerator.Current...");
+
+ if (ceIEnumCurrent.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("Check IENumerator.Current show the correct element when index is valid...");
+ char[] strCopy = new char[str.Length];
+ str.CopyTo(0, strCopy, 0, str.Length);
+
+ try
+ {
+ System.Collections.IEnumerator charIEnum = (System.Collections.IEnumerator)((System.Collections.IEnumerable)str).GetEnumerator();
+ charIEnum.Reset();
+ for (int i = 0; i < str.Length; i++)
+ {
+ charIEnum.MoveNext();
+ if (!charIEnum.Current.Equals(strCopy[i]))
+ {
+ TestLibrary.TestFramework.LogError("001","IENumerator.Current show the wrong element when index is valid!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("Check the first index...");
+ char[] strCopy = new char[str.Length];
+ str.CopyTo(0, strCopy, 0, str.Length);
+
+ try
+ {
+ System.Collections.IEnumerator charIEnum = (System.Collections.IEnumerator)((System.Collections.IEnumerable)str).GetEnumerator();
+ charIEnum.Reset();
+ char charTest = (char)charIEnum.Current;
+
+ TestLibrary.TestFramework.LogError("003", "No exception occurs!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ TestLibrary.TestFramework.LogInformation("InvalidOperationException is throw after fetch IEnumerator.Current with -1 index!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("Check the last index...");
+ char[] strCopy = new char[str.Length];
+ str.CopyTo(0, strCopy, 0, str.Length);
+
+ try
+ {
+ System.Collections.IEnumerator charIEnum = (System.Collections.IEnumerator)((System.Collections.IEnumerable)str).GetEnumerator();
+ charIEnum.Reset();
+ for (int i = 0; i < str.Length; i++)
+ {
+ charIEnum.MoveNext();
+ if (!charIEnum.Current.Equals(strCopy[i]))
+ {
+ TestLibrary.TestFramework.LogError("005", "IEnumerator.Current show the wrong element!");
+ retVal = false;
+ }
+ }
+ charIEnum.MoveNext();
+ char charTest = (char)charIEnum.Current;
+
+ TestLibrary.TestFramework.LogError("006", "No exception occurs when fetch IEnumerator.Current out of range!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ TestLibrary.TestFramework.LogInformation("InvalidOperationException is thrown after fetch IEnumerator.Current out of range");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception occurs: " + e);
+ return retVal;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/charenumerator/charenumeratorienumgetcurrent.cs b/tests/src/CoreMangLib/cti/system/charenumerator/charenumeratorienumgetcurrent.cs
new file mode 100644
index 0000000000..a1d87f0b5b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/charenumerator/charenumeratorienumgetcurrent.cs
@@ -0,0 +1,154 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+
+/// <summary>
+/// I have no ideas about the different between IEnumerator.Current and IEnumerator.get_Current
+/// </summary>
+public class CharEnumeratorIEnumgetCurrent
+{
+ const int minLength = 1;
+ const int maxLength = 10;
+
+ public static int Main(string[] args)
+ {
+ CharEnumeratorIEnumgetCurrent ceIEumget_Current =
+ new CharEnumeratorIEnumgetCurrent();
+
+ TestLibrary.TestFramework.BeginScenario("System.CharEnumerator.IEnumerator.get_Current method...");
+
+ if (ceIEumget_Current.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("Check IENumerator.get_Current show the correct element when index is valid...");
+ char[] strCopy = new char[str.Length];
+ str.CopyTo(0, strCopy, 0, str.Length);
+
+ try
+ {
+ System.Collections.Generic.IEnumerator<Char> charIEnum = (System.Collections.Generic.IEnumerator<Char>)((System.Collections.Generic.IEnumerable<Char>)str).GetEnumerator();
+ charIEnum.Reset();
+
+ for (int i = 0; i < str.Length; i++)
+ {
+ charIEnum.MoveNext();
+ if (!charIEnum.Current.Equals(strCopy[i]))
+ {
+ TestLibrary.TestFramework.LogError("001", "IENumerator.get_Current show the wrong element when index is valid!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("Check the first index...");
+ char[] strCopy = new char[str.Length];
+ str.CopyTo(0, strCopy, 0, str.Length);
+
+ try
+ {
+ System.Collections.Generic.IEnumerator<Char> charIEnum = (System.Collections.Generic.IEnumerator<Char>)((System.Collections.Generic.IEnumerable<Char>)str).GetEnumerator();
+ charIEnum.Reset();
+ char charTest = (char)charIEnum.Current;
+
+ TestLibrary.TestFramework.LogError("003", "No exception occurs!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ TestLibrary.TestFramework.LogInformation("InvalidOperationException is throw after fetch IEnumerator.get_Current with -1 index!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("Check the last index...");
+ char[] strCopy = new char[str.Length];
+ str.CopyTo(0, strCopy, 0, str.Length);
+
+ try
+ {
+ System.Collections.Generic.IEnumerator<Char> charIEnum = (System.Collections.Generic.IEnumerator<Char>)((System.Collections.Generic.IEnumerable<Char>)str).GetEnumerator();
+ charIEnum.Reset();
+ for (int i = 0; i < str.Length; i++)
+ {
+ charIEnum.MoveNext();
+ if (!charIEnum.Current.Equals(strCopy[i]))
+ {
+ TestLibrary.TestFramework.LogError("005", "IEnumerator.get_Current show the wrong element!");
+ retVal = false;
+ }
+ }
+ charIEnum.MoveNext();
+ char charTest = (char)charIEnum.Current;
+
+ TestLibrary.TestFramework.LogError("006", "No exception occurs when fetch IEnumerator.Current out of range!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ TestLibrary.TestFramework.LogInformation("InvalidOperationException is thrown after fetch IEnumerator.Current out of range");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception occurs: " + e);
+ return retVal;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/charenumerator/charenumeratormovenext.cs b/tests/src/CoreMangLib/cti/system/charenumerator/charenumeratormovenext.cs
new file mode 100644
index 0000000000..4603ffd982
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/charenumerator/charenumeratormovenext.cs
@@ -0,0 +1,154 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+
+public class CharEnumeratorMoveNext
+{
+ const int minLength = 1;
+ const int maxLength = 10;
+
+ public static int Main(string[] args)
+ {
+ CharEnumeratorMoveNext ceMove = new CharEnumeratorMoveNext();
+ TestLibrary.TestFramework.BeginScenario("Testing CharEnumerator.MoveNext method...");
+
+ if (ceMove.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ //retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("Check MoveNext method return valid value...");
+
+ try
+ {
+ IEnumerator<Char> charEnu = ((IEnumerable<Char>)str).GetEnumerator();
+ for (int i = 0; i < str.Length; i++)
+ {
+ if (!charEnu.MoveNext())
+ {
+ TestLibrary.TestFramework.LogError("001", "MoveNext method does not return a valid value when index within range!");
+ retVal = false;
+ }
+ }
+
+ if (charEnu.MoveNext())
+ {
+ TestLibrary.TestFramework.LogError("002", "MoveNext should return false when index is out of range!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Check MoveNext method could pass the correct index...");
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ char[] strCopy = new char[str.Length];
+ str.CopyTo(0, strCopy, 0, str.Length);
+
+ try
+ {
+ IEnumerator<Char> charEnu = ((IEnumerable<Char>)str).GetEnumerator();
+ for (int i = 0; i < str.Length; i++)
+ {
+ charEnu.MoveNext();
+ if (charEnu.Current != strCopy[i])
+ {
+ TestLibrary.TestFramework.LogError("004", "MoveNext method does not navigate to correct index!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// New added scenario: Execute MoveNext method for several times after index to to max+1,verify it always return false
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("Check MoveNext method return valid value...");
+
+ try
+ {
+ IEnumerator<Char> charEnu = ((IEnumerable<Char>)str).GetEnumerator();
+ for (int i = 0; i < str.Length; i++)
+ {
+ if (!charEnu.MoveNext())
+ {
+ TestLibrary.TestFramework.LogError("001", "MoveNext method does not return a valid value when index within range!");
+ retVal = false;
+ }
+ }
+
+ //Execute MoveNext method for several times after index to to max+1,verify it always return false
+ for (int j = 0; j < str.Length; j++)
+ {
+ if (charEnu.MoveNext())
+ {
+ TestLibrary.TestFramework.LogError("001", "MoveNext method does not return a valid value when index within range!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/charenumerator/charenumeratorreset.cs b/tests/src/CoreMangLib/cti/system/charenumerator/charenumeratorreset.cs
new file mode 100644
index 0000000000..42568588ec
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/charenumerator/charenumeratorreset.cs
@@ -0,0 +1,195 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+
+public class CharEnumeratorReset
+{
+ const int minLength = 1;
+ const int maxLength = 10;
+
+ public static int Main(string[] args)
+ {
+ CharEnumeratorReset ceReset = new CharEnumeratorReset();
+ TestLibrary.TestFramework.BeginScenario("Testing System.CharEnumerator.Reset method...");
+
+ if (ceReset.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("Check the index point to the right position after execute reset method...");
+ char[] strCopy = new char[str.Length];
+ str.CopyTo(0, strCopy, 0, str.Length);
+
+ try
+ {
+ IEnumerator<Char> charEnu = ((IEnumerable<Char>)str).GetEnumerator();
+ charEnu.Reset();
+ for (int i = 0; i < str.Length; i++)
+ {
+ charEnu.MoveNext();
+ if (charEnu.Current != strCopy[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "Reset method can't nevigate to the correct position!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// new added scenario: Check the index point to the right position when index is not at beginning and then execute reset method...
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("Check the index point to the right position when index is not at beginning and then execute reset method...");
+ char[] strCopy = new char[str.Length];
+ str.CopyTo(0, strCopy, 0, str.Length);
+
+ try
+ {
+ IEnumerator<Char> charEnu = ((IEnumerable<Char>)str).GetEnumerator();
+ for (int i = 0; i < str.Length; i++)
+ {
+ charEnu.MoveNext();
+ if (charEnu.Current != strCopy[i])
+ {
+ TestLibrary.TestFramework.LogError("008", "Reset method can't nevigate to the correct position!");
+ retVal = false;
+ }
+ }
+ charEnu.Reset();
+ for (int i = 0; i < str.Length; i++)
+ {
+ charEnu.MoveNext();
+ if (charEnu.Current != strCopy[i])
+ {
+ TestLibrary.TestFramework.LogError("009", "Reset method can't nevigate to the correct position!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("Check the first index after execute reset method...");
+ char[] strCopy = new char[str.Length];
+ str.CopyTo(0, strCopy, 0, str.Length);
+
+ try
+ {
+ IEnumerator<Char> charEnu = ((IEnumerable<Char>)str).GetEnumerator();
+ charEnu.Reset();
+ char charTest = charEnu.Current;
+
+ TestLibrary.TestFramework.LogError("003", "No exception occurs!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ TestLibrary.TestFramework.LogInformation("InvalidOperationException is throw after fetch current with -1 index!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("Check the last index after traverse the whole enumerator...");
+ char[] strCopy = new char[str.Length];
+ str.CopyTo(0, strCopy, 0, str.Length);
+
+ try
+ {
+ IEnumerator<Char> charEnu = ((IEnumerable<Char>)str).GetEnumerator();
+ charEnu.Reset();
+ for (int i = 0; i < str.Length; i++)
+ {
+ charEnu.MoveNext();
+ if (charEnu.Current != strCopy[i])
+ {
+ TestLibrary.TestFramework.LogError("005", "Reset method can't nevigate to the correct position!");
+ retVal = false;
+ }
+ }
+ charEnu.MoveNext();
+ char charTest = charEnu.Current;
+
+ TestLibrary.TestFramework.LogError("006", "No exception occurs when fetch current out of range!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ TestLibrary.TestFramework.LogInformation("InvalidOperationException is thrown after fetch current out of range");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception occurs: " + e);
+ return retVal;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/clscompliantattribute/CLSCompliantAttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/clscompliantattribute/CLSCompliantAttributeCtor.csproj
new file mode 100644
index 0000000000..182fe1e302
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/clscompliantattribute/CLSCompliantAttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="clscompliantattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/clscompliantattribute/CLSCompliantAttributeIsCompliant.csproj b/tests/src/CoreMangLib/cti/system/clscompliantattribute/CLSCompliantAttributeIsCompliant.csproj
new file mode 100644
index 0000000000..0becbfd241
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/clscompliantattribute/CLSCompliantAttributeIsCompliant.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="clscompliantattributeiscompliant.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/clscompliantattribute/clscompliantattributector.cs b/tests/src/CoreMangLib/cti/system/clscompliantattribute/clscompliantattributector.cs
new file mode 100644
index 0000000000..3d9d50300f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/clscompliantattribute/clscompliantattributector.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ctor(System.Boolean)
+/// </summary>
+
+public class CLSCompliantAttributeCtor
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify ctor(true)");
+
+ try
+ {
+ CLSCompliantAttribute cca = new CLSCompliantAttribute(true);
+
+ if (cca.IsCompliant != true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Ctor Err !");
+ retVal = false;
+ return retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify ctor(false)");
+
+ try
+ {
+ CLSCompliantAttribute cca = new CLSCompliantAttribute(false);
+
+ if (cca.IsCompliant != false)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Ctor Err !");
+ retVal = false;
+ return retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ CLSCompliantAttributeCtor test = new CLSCompliantAttributeCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("CLSCompliantAttributeCtor");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/clscompliantattribute/clscompliantattributeiscompliant.cs b/tests/src/CoreMangLib/cti/system/clscompliantattribute/clscompliantattributeiscompliant.cs
new file mode 100644
index 0000000000..4f4e02fb5b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/clscompliantattribute/clscompliantattributeiscompliant.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// IsCompliant
+/// </summary>
+
+public class CLSCompliantAttributeIsCompliant
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property IsCompliant is true.");
+
+ try
+ {
+ CLSCompliantAttribute cca = new CLSCompliantAttribute(true);
+
+ if (cca.IsCompliant != true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property IsCompliant Err !");
+ retVal = false;
+ return retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify property IsCompliant is false.");
+
+ try
+ {
+ CLSCompliantAttribute cca = new CLSCompliantAttribute(false);
+
+ if (cca.IsCompliant != false)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Property IsCompliant Err !");
+ retVal = false;
+ return retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ CLSCompliantAttributeIsCompliant test = new CLSCompliantAttributeIsCompliant();
+
+ TestLibrary.TestFramework.BeginTestCase("CLSCompliantAttributeIsCompliant");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/dictionaryentry/DictionaryEntryCtor.csproj b/tests/src/CoreMangLib/cti/system/collections/dictionaryentry/DictionaryEntryCtor.csproj
new file mode 100644
index 0000000000..4f4d6a437b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/dictionaryentry/DictionaryEntryCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryentryctor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/dictionaryentry/DictionaryEntryKey.csproj b/tests/src/CoreMangLib/cti/system/collections/dictionaryentry/DictionaryEntryKey.csproj
new file mode 100644
index 0000000000..315f2d562a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/dictionaryentry/DictionaryEntryKey.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryentrykey.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/dictionaryentry/DictionaryEntryValue.csproj b/tests/src/CoreMangLib/cti/system/collections/dictionaryentry/DictionaryEntryValue.csproj
new file mode 100644
index 0000000000..3ad87f744e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/dictionaryentry/DictionaryEntryValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryentryvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/dictionaryentry/dictionaryentryctor.cs b/tests/src/CoreMangLib/cti/system/collections/dictionaryentry/dictionaryentryctor.cs
new file mode 100644
index 0000000000..0c137c60b2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/dictionaryentry/dictionaryentryctor.cs
@@ -0,0 +1,211 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class DictionaryEntryCtor
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ public static int Main()
+ {
+ DictionaryEntryCtor dec = new DictionaryEntryCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryEntryCtor");
+
+ if (dec.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ DictionaryEntry de;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: null key");
+
+ try
+ {
+ de = new DictionaryEntry(null, new object());
+
+ if (null != de.Key)
+ {
+ TestLibrary.TestFramework.LogError("001", "Key is not null as expected: Actual(" + de.Key + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ DictionaryEntry de;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: null value");
+
+ try
+ {
+ de = new DictionaryEntry(new object(), null);
+
+ if (null != de.Value)
+ {
+ TestLibrary.TestFramework.LogError("003", "Value is not null as expected: Actual(" + de.Value + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ DictionaryEntry de;
+ int key;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: boxed integral value as key");
+
+ try
+ {
+ key = TestLibrary.Generator.GetInt32(-55);
+ de = new DictionaryEntry((object)key, new object());
+
+ if (key != (int)de.Key)
+ {
+ TestLibrary.TestFramework.LogError("005", "Key is not " + key + " as expected: Actual(" + de.Key + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ DictionaryEntry de;
+ string key;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: boxed string value as key");
+
+ try
+ {
+ key = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ de = new DictionaryEntry(key, new object());
+
+ if (!key.Equals(de.Key))
+ {
+ TestLibrary.TestFramework.LogError("007", "Key is not " + key + " as expected: Actual(" + de.Key + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ DictionaryEntry de;
+ int value;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: boxed integral value as value");
+
+ try
+ {
+ value = TestLibrary.Generator.GetInt32(-55);
+ de = new DictionaryEntry(new object(), (object)value);
+
+ if (value != (int)de.Value)
+ {
+ TestLibrary.TestFramework.LogError("009", "Value is not " + value + " as expected: Actual(" + de.Value + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ DictionaryEntry de;
+ string value;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: boxed string value as value");
+
+ try
+ {
+ value = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ de = new DictionaryEntry(new object(), (object)value);
+
+ if (!value.Equals(de.Value))
+ {
+ TestLibrary.TestFramework.LogError("011", "Value is not " + value + " as expected: Actual(" + de.Value + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" ,"Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/dictionaryentry/dictionaryentrykey.cs b/tests/src/CoreMangLib/cti/system/collections/dictionaryentry/dictionaryentrykey.cs
new file mode 100644
index 0000000000..c38b585d81
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/dictionaryentry/dictionaryentrykey.cs
@@ -0,0 +1,130 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class DictionaryEntryKey
+{
+ private const int c_MIN_STRING_LEN = 64;
+ private const int c_MAX_STRING_LEN = 2048;
+
+ public static int Main()
+ {
+ DictionaryEntryKey dek = new DictionaryEntryKey();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryEntryKey");
+
+ if (dek.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ DictionaryEntry de;
+ int key;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Get and set integral key");
+
+ try
+ {
+ de = new DictionaryEntry(new object(), new object());
+
+ key = TestLibrary.Generator.GetInt32(-55);
+ de.Key = key;
+ if (key != (int)de.Key)
+ {
+ TestLibrary.TestFramework.LogError("001", "Failed to retrieve an integral value from Key: Expected(" + key + ") != Actual(" + (int)de.Key + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ DictionaryEntry de;
+ string key;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Get and set string key");
+
+ try
+ {
+ de = new DictionaryEntry(new object(), new object());
+
+ key = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ de.Key = key;
+ if (!key.Equals(de.Key))
+ {
+ TestLibrary.TestFramework.LogError("003", "Failed to retrieve an integral value from Key: Expected(" + key + ") != Actual(" + (string)de.Key + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ DictionaryEntry de;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Get and set a null key");
+
+ try
+ {
+ de = new DictionaryEntry(new object(), new object());
+
+ de.Key = null;
+ if (null != de.Key)
+ {
+ TestLibrary.TestFramework.LogError("005", "Failed to retrieve an integral value from value: Expected(null) != Actual(" + de.Key +")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/dictionaryentry/dictionaryentryvalue.cs b/tests/src/CoreMangLib/cti/system/collections/dictionaryentry/dictionaryentryvalue.cs
new file mode 100644
index 0000000000..de76d933ee
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/dictionaryentry/dictionaryentryvalue.cs
@@ -0,0 +1,129 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class DictionaryEntryValue
+{
+ private const int c_MIN_STRING_LEN = 64;
+ private const int c_MAX_STRING_LEN = 2048;
+
+ public static int Main()
+ {
+ DictionaryEntryValue dev = new DictionaryEntryValue();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryEntryValue");
+
+ if (dev.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ DictionaryEntry de;
+ int value;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Get and set integral value");
+
+ try
+ {
+ de = new DictionaryEntry(new object(), new object());
+
+ value = TestLibrary.Generator.GetInt32(-55);
+ de.Value = value;
+ if (value != (int)de.Value)
+ {
+ TestLibrary.TestFramework.LogError("001", "Failed to retrieve an integral value from Value: Expected(" + value + ") != Actual(" + (int)de.Value + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ DictionaryEntry de;
+ string value;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Get and set string value");
+
+ try
+ {
+ de = new DictionaryEntry(new object(), new object());
+
+ value = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ de.Value = value;
+ if (!value.Equals(de.Value))
+ {
+ TestLibrary.TestFramework.LogError("003", "Failed to retrieve an integral value from value: Expected(" + value + ") != Actual(" + de.Value + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ DictionaryEntry de;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Get and set a null value");
+
+ try
+ {
+ de = new DictionaryEntry(new object(), new object());
+
+ de.Value = null;
+ if (null != de.Value)
+ {
+ TestLibrary.TestFramework.LogError("005", "Failed to retrieve an integral value from value: Expected(null) != Actual(" + de.Value + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/comparer/ComparerCompare1.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/comparer/ComparerCompare1.csproj
new file mode 100644
index 0000000000..4ae0bb85b4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/comparer/ComparerCompare1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="comparercompare1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/comparer/ComparerCompare2.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/comparer/ComparerCompare2.csproj
new file mode 100644
index 0000000000..13f945808e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/comparer/ComparerCompare2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="comparercompare2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/comparer/ComparerCtor.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/comparer/ComparerCtor.csproj
new file mode 100644
index 0000000000..db79218224
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/comparer/ComparerCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="comparerctor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/comparer/ComparerDefault.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/comparer/ComparerDefault.csproj
new file mode 100644
index 0000000000..bfd5838bee
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/comparer/ComparerDefault.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="comparerdefault.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/comparer/comparercompare1.cs b/tests/src/CoreMangLib/cti/system/collections/generic/comparer/comparercompare1.cs
new file mode 100644
index 0000000000..e1586fc5da
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/comparer/comparercompare1.cs
@@ -0,0 +1,285 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public enum TestEnum
+{
+ VALUE_0,
+ VALUE_1
+}
+
+public class TestGenericComparer<T> : Comparer<T>
+{
+ public TestGenericComparer() : base() { }
+
+ public override int Compare(T x, T y)
+ {
+ if (!(x is ValueType))
+ {
+ // reference type
+ Object ox = x as Object;
+ Object oy = y as Object;
+
+ if (x == null) return (y == null) ? 0 : -1;
+ if (y == null) return 1;
+ }
+
+ if (x is IComparable<T>)
+ {
+ IComparable<T> comparer = x as IComparable<T>;
+ return comparer.CompareTo(y);
+ }
+
+ if (x is IComparable)
+ {
+ IComparable comparer = x as IComparable;
+ return comparer.CompareTo(y);
+ }
+
+ throw new ArgumentException();
+ }
+}
+
+public class TestClass : IComparable<TestClass>
+{
+ public int Value;
+
+ public TestClass(int value)
+ {
+ Value = value;
+ }
+
+ public int CompareTo(TestClass other)
+ {
+ return this.Value - other.Value;
+ }
+}
+
+public class TestClass1 : IComparable
+{
+ public int Value;
+
+ public TestClass1(int value)
+ {
+ Value = value;
+ }
+
+ public int CompareTo(object obj)
+ {
+ TestClass1 other = obj as TestClass1;
+ if (other != null)
+ {
+ return Value - other.Value;
+ }
+
+ if (obj is int)
+ {
+ int i = (int)obj;
+ return Value - i;
+ }
+
+ throw new ArgumentException("Must be instance of TestClass1 or Int32");
+ }
+}
+
+/// <summary>
+/// Compare(T,T)
+/// </summary>
+public class ComparerCompare1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Compare to compare two value type instance");
+
+ try
+ {
+ Comparer<ValueType> comparer = new TestGenericComparer<ValueType>();
+ retVal = VerificationHelper<ValueType>(comparer, 1, 2, -1, "001.1") && retVal;
+ retVal = VerificationHelper<ValueType>(comparer, 2, 1, 1, "001.2") && retVal;
+ retVal = VerificationHelper<ValueType>(comparer, 1, 1, 0, "001.3") && retVal;
+ retVal = VerificationHelper<ValueType>(comparer, 1.0, 2.0, -1, "001.4") && retVal;
+ retVal = VerificationHelper<ValueType>(comparer, 1, (int)TestEnum.VALUE_0, 1, "001.5") && retVal;
+ retVal = VerificationHelper<ValueType>(comparer, 1, (int)TestEnum.VALUE_1, 0, "001.6") && retVal;
+ retVal = VerificationHelper<ValueType>(comparer, 'a', 'A', 32, "001.7") && retVal;
+ retVal = VerificationHelper<ValueType>(comparer, 'a', 'a', 0, "001.8") && retVal;
+ retVal = VerificationHelper<ValueType>(comparer, 'A', 'a', -32, "001.9") && retVal;
+
+ Comparer<int> comparer1 = new TestGenericComparer<int>();
+ retVal = VerificationHelper<int>(comparer1, 1, 2, -1, "001.10") && retVal;
+ retVal = VerificationHelper<int>(comparer1, 2, 1, 1, "001.11") && retVal;
+ retVal = VerificationHelper<int>(comparer1, 1, 1, 0, "001.12") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Compare with one or both parameters are null reference");
+
+ try
+ {
+ Comparer<TestClass> comparer = new TestGenericComparer<TestClass>();
+ retVal = VerificationHelper<TestClass>(comparer, null, new TestClass(1), -1, "002.1") && retVal;
+ retVal = VerificationHelper<TestClass>(comparer, new TestClass(1), null, 1, "002.2") && retVal;
+ retVal = VerificationHelper<TestClass>(comparer, null, null, 0, "002.3") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call Compare when T implements IComparable<T>");
+
+ try
+ {
+ Comparer<TestClass> comparer = new TestGenericComparer<TestClass>();
+ retVal = VerificationHelper<TestClass>(comparer, new TestClass(0), new TestClass(1), -1, "003.1") && retVal;
+ retVal = VerificationHelper<TestClass>(comparer, new TestClass(1), new TestClass(0), 1, "003.2") && retVal;
+ retVal = VerificationHelper<TestClass>(comparer, new TestClass(1), new TestClass(1), 0, "003.3") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call Compare when T implements IComparable");
+
+ try
+ {
+ Comparer<TestClass1> comparer = new TestGenericComparer<TestClass1>();
+ retVal = VerificationHelper<TestClass1>(comparer, new TestClass1(0), new TestClass1(1), -1, "004.1") && retVal;
+ retVal = VerificationHelper<TestClass1>(comparer, new TestClass1(1), new TestClass1(0), 1, "004.2") && retVal;
+ retVal = VerificationHelper<TestClass1>(comparer, new TestClass1(1), new TestClass1(1), 0, "004.3") && retVal;
+
+ Comparer<Object> comparer1 = new TestGenericComparer<Object>();
+ retVal = VerificationHelper<Object>(comparer1, new TestClass1(0), 1, -1, "004.4") && retVal;
+ retVal = VerificationHelper<Object>(comparer1, new TestClass1(1), 0, 1, "004.5") && retVal;
+ retVal = VerificationHelper<Object>(comparer1, new TestClass1(1), 1, 0, "004.6") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentException should be thrown when Type T does not implement either the System.IComparable generic interface or the System.IComparable interface.");
+
+ try
+ {
+ TestGenericComparer<ComparerCompare1> comparer = new TestGenericComparer<ComparerCompare1>();
+ comparer.Compare(new ComparerCompare1(), new ComparerCompare1());
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentException is not thrown when Type T does not implement either the System.IComparable generic interface or the System.IComparable interface.");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ComparerCompare1 test = new ComparerCompare1();
+
+ TestLibrary.TestFramework.BeginTestCase("ComparerCompare1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper<T>(Comparer<T> comparer, T x, T y, int expected, string errorno)
+ {
+ bool retVal = true;
+
+ int actual = comparer.Compare(x, y);
+ if ( actual != expected )
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Compare returns unexpected value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] x = " + x + ", y = " + y + ", expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/comparer/comparercompare2.cs b/tests/src/CoreMangLib/cti/system/collections/generic/comparer/comparercompare2.cs
new file mode 100644
index 0000000000..b3cea19d16
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/comparer/comparercompare2.cs
@@ -0,0 +1,345 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+public enum TestEnum
+{
+ VALUE_0,
+ VALUE_1
+}
+
+public class TestGenericComparer<T> : Comparer<T>
+{
+ public TestGenericComparer() : base() { }
+
+ public override int Compare(T x, T y)
+ {
+ if (!(x is ValueType))
+ {
+ // reference type
+ Object ox = x as Object;
+ Object oy = y as Object;
+
+ if (x == null) return (y == null) ? 0 : -1;
+ if (y == null) return 1;
+ }
+
+ if (x is IComparable<T>)
+ {
+ IComparable<T> comparer = x as IComparable<T>;
+ return comparer.CompareTo(y);
+ }
+
+ if (x is IComparable)
+ {
+ IComparable comparer = x as IComparable;
+ return comparer.CompareTo(y);
+ }
+
+ throw new ArgumentException();
+ }
+}
+
+public class TestClass : IComparable<TestClass>
+{
+ public int Value;
+
+ public TestClass(int value)
+ {
+ Value = value;
+ }
+
+ public int CompareTo(TestClass other)
+ {
+ return this.Value - other.Value;
+ }
+}
+
+public class TestClass1 : IComparable
+{
+ public int Value;
+
+ public TestClass1(int value)
+ {
+ Value = value;
+ }
+
+ public int CompareTo(object obj)
+ {
+ TestClass1 other = obj as TestClass1;
+ if (other != null)
+ {
+ return Value - other.Value;
+ }
+
+ if (obj is int)
+ {
+ int i = (int)obj;
+ return Value - i;
+ }
+
+ throw new ArgumentException("Must be instance of TestClass1 or Int32");
+ }
+}
+
+/// <summary>
+/// System.Collections.IComparer.Compare(System.Object,System.Object)
+/// </summary>
+public class ComparerCompare2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Compare to compare two value type instance");
+
+ try
+ {
+ IComparer comparer = new TestGenericComparer<ValueType>() as IComparer;
+ retVal = VerificationHelper(comparer, 1, 2, -1, "001.1") && retVal;
+ retVal = VerificationHelper(comparer, 2, 1, 1, "001.2") && retVal;
+ retVal = VerificationHelper(comparer, 1, 1, 0, "001.3") && retVal;
+ retVal = VerificationHelper(comparer, 1.0, 2.0, -1, "001.4") && retVal;
+ retVal = VerificationHelper(comparer, 1, (int)TestEnum.VALUE_0, 1, "001.5") && retVal;
+ retVal = VerificationHelper(comparer, 1, (int)TestEnum.VALUE_1, 0, "001.6") && retVal;
+ retVal = VerificationHelper(comparer, 'a', 'A', 32, "001.7") && retVal;
+ retVal = VerificationHelper(comparer, 'a', 'a', 0, "001.8") && retVal;
+ retVal = VerificationHelper(comparer, 'A', 'a', -32, "001.9") && retVal;
+
+ comparer = new TestGenericComparer<int>() as IComparer;
+ retVal = VerificationHelper(comparer, 1, 2, -1, "001.10") && retVal;
+ retVal = VerificationHelper(comparer, 2, 1, 1, "001.11") && retVal;
+ retVal = VerificationHelper(comparer, 1, 1, 0, "001.12") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Compare with one or both parameters are null reference");
+
+ try
+ {
+ IComparer comparer = new TestGenericComparer<TestClass>() as IComparer;
+ retVal = VerificationHelper(comparer, null, new TestClass(1), -1, "002.1") && retVal;
+ retVal = VerificationHelper(comparer, new TestClass(1), null, 1, "002.2") && retVal;
+ retVal = VerificationHelper(comparer, null, null, 0, "002.3") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call Compare when T implements IComparable<T>");
+
+ try
+ {
+ IComparer comparer = new TestGenericComparer<TestClass>() as IComparer;
+ retVal = VerificationHelper(comparer, new TestClass(0), new TestClass(1), -1, "003.1") && retVal;
+ retVal = VerificationHelper(comparer, new TestClass(1), new TestClass(0), 1, "003.2") && retVal;
+ retVal = VerificationHelper(comparer, new TestClass(1), new TestClass(1), 0, "003.3") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call Compare when T implements IComparable");
+
+ try
+ {
+ IComparer comparer = new TestGenericComparer<TestClass1>() as IComparer;
+ retVal = VerificationHelper(comparer, new TestClass1(0), new TestClass1(1), -1, "004.1") && retVal;
+ retVal = VerificationHelper(comparer, new TestClass1(1), new TestClass1(0), 1, "004.2") && retVal;
+ retVal = VerificationHelper(comparer, new TestClass1(1), new TestClass1(1), 0, "004.3") && retVal;
+
+ comparer = new TestGenericComparer<Object>() as IComparer;
+ retVal = VerificationHelper(comparer, new TestClass1(0), 1, -1, "004.4") && retVal;
+ retVal = VerificationHelper(comparer, new TestClass1(1), 0, 1, "004.5") && retVal;
+ retVal = VerificationHelper(comparer, new TestClass1(1), 1, 0, "004.6") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentException should be thrown when Type T does not implement either the System.IComparable generic interface or the System.IComparable interface.");
+
+ try
+ {
+ TestGenericComparer<ComparerCompare2> comparer = new TestGenericComparer<ComparerCompare2>();
+ IComparer icompare = comparer as IComparer;
+ icompare.Compare(new ComparerCompare2(), new ComparerCompare2());
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentException is not thrown when Type T does not implement either the System.IComparable generic interface or the System.IComparable interface.");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentException should be thrown when x is of a type that cannot be cast to type T");
+
+ try
+ {
+ TestGenericComparer<TestClass1> comparer = new TestGenericComparer<TestClass1>();
+ IComparer icompare = comparer as IComparer;
+ icompare.Compare('a', new TestClass1(1));
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentException is not thrown when x is of a type that cannot be cast to type T");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentException should be thrown when y is of a type that cannot be cast to type T");
+
+ try
+ {
+ TestGenericComparer<TestClass1> comparer = new TestGenericComparer<TestClass1>();
+ IComparer icompare = comparer as IComparer;
+ icompare.Compare(new TestClass1(1), 'a');
+
+ TestLibrary.TestFramework.LogError("103.1", "ArgumentException is not thrown when y is of a type that cannot be cast to type T");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ComparerCompare2 test = new ComparerCompare2();
+
+ TestLibrary.TestFramework.BeginTestCase("ComparerCompare2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(IComparer comparer, object x, object y, int expected, string errorno)
+ {
+ bool retVal = true;
+
+ int actual = comparer.Compare(x, y);
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Compare returns unexpected value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] x = " + x + ", y = " + y + ", expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/comparer/comparerctor.cs b/tests/src/CoreMangLib/cti/system/collections/generic/comparer/comparerctor.cs
new file mode 100644
index 0000000000..b1ea6a02ad
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/comparer/comparerctor.cs
@@ -0,0 +1,92 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public class TestGenericComparer<T> : Comparer<T>
+{
+ public TestGenericComparer()
+ : base()
+ {
+ }
+
+ public override int Compare(T x, T y)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+}
+
+/// <summary>
+/// ctor
+/// </summary>
+public class ComparerCtor
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call protected ctor to create a new instance of sub class");
+
+ try
+ {
+ TestGenericComparer<int> comparer1 = new TestGenericComparer<int>();
+
+ if (comparer1 == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling protected ctor to create a new instance of sub class returns null reference");
+ retVal = false;
+ }
+
+ TestGenericComparer<string> comparer2 = new TestGenericComparer<string>();
+
+ if (comparer2 == null)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Calling protected ctor to create a new instance of sub class returns null reference");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ComparerCtor test = new ComparerCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("ComparerCtor");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/comparer/comparerdefault.cs b/tests/src/CoreMangLib/cti/system/collections/generic/comparer/comparerdefault.cs
new file mode 100644
index 0000000000..41c2a7bdb1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/comparer/comparerdefault.cs
@@ -0,0 +1,87 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public class ComparerDefault
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Default to return default order comparer of T");
+
+ try
+ {
+ retVal = VerificationHelper(Comparer<int>.Default, 1, 2, -1, "001.1") && retVal;
+ retVal = VerificationHelper(Comparer<int>.Default, 2, 1, 1, "001.2") && retVal;
+ retVal = VerificationHelper(Comparer<int>.Default, 1, 1, 0, "001.3") && retVal;
+ retVal = VerificationHelper(Comparer<char>.Default, 'a', 'b', -1, "001.4") && retVal;
+ retVal = VerificationHelper(Comparer<char>.Default, 'b', 'a', 1, "001.5") && retVal;
+ retVal = VerificationHelper(Comparer<char>.Default, 'a', 'a', 0, "001.6") && retVal;
+ retVal = VerificationHelper(Comparer<string>.Default, "ABCDEFG", "abcdefg", 1, "001.7") && retVal;
+ retVal = VerificationHelper(Comparer<string>.Default, "ABCDEFG", "ABCDEFG", 0, "001.8") && retVal;
+ retVal = VerificationHelper(Comparer<string>.Default, "abcdefg", "ABCDEFG", -1, "001.9") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ComparerDefault test = new ComparerDefault();
+
+ TestLibrary.TestFramework.BeginTestCase("ComparerDefault");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper<T>(Comparer<T> defaultCompare, T x, T y, int expected, string errorno)
+ {
+ bool retVal = true;
+
+ int actual = defaultCompare.Compare(x, y);
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Compare returns unexpected value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] x = " + x + ", y = " + y + ", expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryAdd.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryAdd.csproj
new file mode 100644
index 0000000000..19a2312c1f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryAdd.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryadd.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryClear.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryClear.csproj
new file mode 100644
index 0000000000..782ce7224d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryClear.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryclear.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryComparer.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryComparer.csproj
new file mode 100644
index 0000000000..3af86a9609
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryComparer.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionarycomparer.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryContainsKey.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryContainsKey.csproj
new file mode 100644
index 0000000000..e99d1c7572
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryContainsKey.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionarycontainskey.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryContainsValue.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryContainsValue.csproj
new file mode 100644
index 0000000000..f2b960c877
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryContainsValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionarycontainsvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCount.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCount.csproj
new file mode 100644
index 0000000000..d4cbf0bafd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCount.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionarycount.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor1.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor1.csproj
new file mode 100644
index 0000000000..c0796658e8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor2.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor2.csproj
new file mode 100644
index 0000000000..725e1a3067
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor3.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor3.csproj
new file mode 100644
index 0000000000..4e81db7fbb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor4.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor4.csproj
new file mode 100644
index 0000000000..0e284fddb8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryctor4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor5.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor5.csproj
new file mode 100644
index 0000000000..41640101e2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryctor5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor6.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor6.csproj
new file mode 100644
index 0000000000..a00320a6be
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryCtor6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryctor6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryGetEnumerator.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryGetEnumerator.csproj
new file mode 100644
index 0000000000..160de22e1a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryGetEnumerator.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionarygetenumerator.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionAdd.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionAdd.csproj
new file mode 100644
index 0000000000..5ba4f9e058
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionAdd.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryicollectionadd.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionContains.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionContains.csproj
new file mode 100644
index 0000000000..6bb9b31fa6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionContains.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryicollectioncontains.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionCopyTo.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionCopyTo.csproj
new file mode 100644
index 0000000000..800c9934fc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionCopyTo.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryicollectioncopyto.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionCopyTo2.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionCopyTo2.csproj
new file mode 100644
index 0000000000..64a0e486a6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionCopyTo2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryicollectioncopyto2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionIsReadOnly.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionIsReadOnly.csproj
new file mode 100644
index 0000000000..b8746ccd29
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionIsReadOnly.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryicollectionisreadonly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionIsReadOnly2.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionIsReadOnly2.csproj
new file mode 100644
index 0000000000..3f1e2b3a52
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionIsReadOnly2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryicollectionisreadonly2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionIsSynchronized.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionIsSynchronized.csproj
new file mode 100644
index 0000000000..82e218fc6e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionIsSynchronized.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryicollectionissynchronized.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionIsSynchronized2.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionIsSynchronized2.csproj
new file mode 100644
index 0000000000..d5c7c7f667
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionIsSynchronized2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryicollectionissynchronized2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionRemove.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionRemove.csproj
new file mode 100644
index 0000000000..ec1d5b89b8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionRemove.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryicollectionremove.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionSyncRoot.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionSyncRoot.csproj
new file mode 100644
index 0000000000..29c4dfada6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionSyncRoot.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryicollectionsyncroot.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionSyncRoot2.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionSyncRoot2.csproj
new file mode 100644
index 0000000000..adc27da1b8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryICollectionSyncRoot2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryicollectionsyncroot2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryAdd.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryAdd.csproj
new file mode 100644
index 0000000000..0ef62313aa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryAdd.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryidictionaryadd.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryContains.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryContains.csproj
new file mode 100644
index 0000000000..12dd475fad
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryContains.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryidictionarycontains.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryGetEnumerator.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryGetEnumerator.csproj
new file mode 100644
index 0000000000..bc482d378b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryGetEnumerator.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryidictionarygetenumerator.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryIsFixedSize.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryIsFixedSize.csproj
new file mode 100644
index 0000000000..3a99776898
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryIsFixedSize.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryidictionaryisfixedsize.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryIsFixedSize2.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryIsFixedSize2.csproj
new file mode 100644
index 0000000000..e1b06988a8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryIsFixedSize2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryidictionaryisfixedsize2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryIsReadOnly.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryIsReadOnly.csproj
new file mode 100644
index 0000000000..b8cbf8f98d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryIsReadOnly.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryidictionaryisreadonly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryIsReadOnly2.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryIsReadOnly2.csproj
new file mode 100644
index 0000000000..2c5318db02
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryIsReadOnly2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryidictionaryisreadonly2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryItem.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryItem.csproj
new file mode 100644
index 0000000000..698089e913
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryItem.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryidictionaryitem.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryItem2.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryItem2.csproj
new file mode 100644
index 0000000000..0ac2b12f81
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryItem2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryidictionaryitem2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryKeys.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryKeys.csproj
new file mode 100644
index 0000000000..6292c9155a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryKeys.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryidictionarykeys.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryKeys2.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryKeys2.csproj
new file mode 100644
index 0000000000..2daf922c35
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryKeys2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryidictionarykeys2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryKeys3.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryKeys3.csproj
new file mode 100644
index 0000000000..b969f65467
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryKeys3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryidictionarykeys3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryKeys4.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryKeys4.csproj
new file mode 100644
index 0000000000..5c002a659f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryKeys4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryidictionarykeys4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryRemove.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryRemove.csproj
new file mode 100644
index 0000000000..f261284443
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryRemove.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryidictionaryremove.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryValue2.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryValue2.csproj
new file mode 100644
index 0000000000..b2c1135103
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryValue2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryidictionaryvalue2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryValue3.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryValue3.csproj
new file mode 100644
index 0000000000..3c74334baf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryValue3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryidictionaryvalue3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryValue4.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryValue4.csproj
new file mode 100644
index 0000000000..db8e37d209
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryValue4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryidictionaryvalue4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryValues.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryValues.csproj
new file mode 100644
index 0000000000..71b78d84fe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIDictionaryValues.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryidictionaryvalues.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIEnumerableGetEnumerator.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIEnumerableGetEnumerator.csproj
new file mode 100644
index 0000000000..50aa95fd34
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIEnumerableGetEnumerator.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryienumerablegetenumerator.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIEnumerableGetEnumerator2.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIEnumerableGetEnumerator2.csproj
new file mode 100644
index 0000000000..7a68339439
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryIEnumerableGetEnumerator2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryienumerablegetenumerator2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryRemove.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryRemove.csproj
new file mode 100644
index 0000000000..b9bf7857ee
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryRemove.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryremove.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryTryGetValue.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryTryGetValue.csproj
new file mode 100644
index 0000000000..b54a28c6e6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/DictionaryTryGetValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionarytrygetvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryadd.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryadd.cs
new file mode 100644
index 0000000000..1ae8f5c5aa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryadd.cs
@@ -0,0 +1,152 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// Add(TKey,TValue)
+/// </summary>
+
+public class DictionaryAdd
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method Add(TKey,TValue) .");
+
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ string actual = dictionary["txt"] + " " +
+ dictionary["bmp"] + " " +
+ dictionary["dib"] + " " +
+ dictionary["rtf"];
+ string expected = "notepad.exe" + " " +
+ "paint.exe" + " " +
+ "paint.exe" + " " +
+ "wordpad.exe";
+
+ if (dictionary["txt"] != "notepad.exe" ||
+ dictionary["bmp"] != "paint.exe" ||
+ dictionary["dib"] != "paint.exe" ||
+ dictionary["rtf"] != "wordpad.exe")
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method Add(TKey,TValue) Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown when key is null ref.");
+
+ try
+ {
+ string str = null;
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add(str, "notepad.exe");
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentException is not thrown when An element with the same key already exists in the Dictionary .");
+
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("txt", "notepad.exe");
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryAdd test = new DictionaryAdd();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryAdd");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryclear.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryclear.cs
new file mode 100644
index 0000000000..28485da004
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryclear.cs
@@ -0,0 +1,112 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// Clear
+/// </summary>
+
+public class DictionaryClear
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method Clear .");
+
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ dictionary.Clear();
+
+ int actual = dictionary.Count;
+ int expected = 0;
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method Clear Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryClear test = new DictionaryClear();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryClear");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarycomparer.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarycomparer.cs
new file mode 100644
index 0000000000..ea27c7197e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarycomparer.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// Comparer
+/// </summary>
+
+public class DictionaryComparer
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property Comparer .");
+
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+
+ IEqualityComparer<string> iec = dictionary.Comparer;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryComparer test = new DictionaryComparer();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryComparer");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarycontainskey.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarycontainskey.cs
new file mode 100644
index 0000000000..e8bc5a08eb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarycontainskey.cs
@@ -0,0 +1,142 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// ContainsKey(TKey)
+/// </summary>
+
+public class DictionaryContainsKey
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ContainsKey(TKey) when no key/value in the dictionary .");
+
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+
+ bool actual = dictionary.ContainsKey("txt");
+ bool expected = false;
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ContainsKey(TKey) Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ContainsKey(TKey) when the dictionary contains key.");
+
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("txt", "notepad.exe");
+
+ bool actual = dictionary.ContainsKey("txt");
+ bool expected = true;
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ContainsKey(TKey) Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown when key is null ref .");
+
+ try
+ {
+ string str = null;
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add(str, "notepad.exe");
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryContainsKey test = new DictionaryContainsKey();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryContainsKey");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarycontainsvalue.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarycontainsvalue.cs
new file mode 100644
index 0000000000..d11ef2ee23
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarycontainsvalue.cs
@@ -0,0 +1,170 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// ContainsValue(TValue)
+/// </summary>
+
+public class DictionaryContainsValue
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ContainsValue(TValue) when no key/value in the dictionary .");
+
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+
+ bool actual = dictionary.ContainsValue("notepad.exe");
+ bool expected = false;
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method ContainsValue(TValue) Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ContainsValue(TValue) when the dictionary contains specified value .");
+
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("txt", "notepad.exe");
+
+ bool actual = dictionary.ContainsValue("notepad.exe");
+ bool expected = true;
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ContainsValue(TValue) Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method ContainsValue(TValue) when the dictionary contains specified value(=null) .");
+
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("txt", null);
+
+ bool actual = dictionary.ContainsValue(null);
+ bool expected = true;
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method ContainsValue(TValue) Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryContainsValue test = new DictionaryContainsValue();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryContainsValue");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarycount.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarycount.cs
new file mode 100644
index 0000000000..cc3b5f4520
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarycount.cs
@@ -0,0 +1,111 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// Count
+/// </summary>
+
+public class DictionaryCount
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property Count .");
+
+ try
+ {
+ int random = TestLibrary.Generator.GetByte(-55);
+
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ for (int i = 0; i < random; i++)
+ dictionary.Add("key" + i.ToString(), "value" + i.ToString());
+
+ int actual = dictionary.Count;
+ int expected = random;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property Count Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryCount test = new DictionaryCount();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryCount");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor1.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor1.cs
new file mode 100644
index 0000000000..da91e78400
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor1.cs
@@ -0,0 +1,108 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// ctor
+/// </summary>
+
+#region Private Test Help Class
+class DCTest<T, K> : Dictionary<T, K>
+{ }
+#endregion
+
+public class DictionaryCtor1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Dictionary() .");
+
+ try
+ {
+ DCTest<object,object> dct = new DCTest<object, object>();
+
+ if (null == dct)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Failed to instance a DCTest type");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryCtor1 test = new DictionaryCtor1();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryCtor1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor2.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor2.cs
new file mode 100644
index 0000000000..b766070ed8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor2.cs
@@ -0,0 +1,138 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// ctor(System.Collections.Generic.IDictionary&lt;TKey,TValue&gt;)
+/// </summary>
+
+public class DictionaryCtor2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Dictionary<T, K> with ctor(System.Collections.Generic.IDictionary&lt;TKey,TValue&gt;) .");
+
+ try
+ {
+ Dictionary<string, string> openWith = new Dictionary<string, string>();
+
+ Dictionary<string, string> dictionary = new Dictionary<string, string>(openWith);
+
+ if (null == dictionary)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Failed to instance a Dictionary type with ctor(System.Collections.Generic.IDictionary&lt;TKey,TValue&gt;)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown when ref of dictionary is null .");
+
+ try
+ {
+ Dictionary<string, string> openWith = null;
+
+ Dictionary<string, string> dictionary = new Dictionary<string, string>(openWith);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentException is not thrown when dictionary contains duplicate keys.");
+
+ try
+ {
+ Dictionary<string, string> openWith = new Dictionary<string, string>();
+ openWith.Add("duplicate key", "value");
+ openWith.Add("duplicate key", "value");
+
+ Dictionary<string, string> dictionary = new Dictionary<string, string>(openWith);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryCtor2 test = new DictionaryCtor2();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryCtor2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor3.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor3.cs
new file mode 100644
index 0000000000..a92e90349f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor3.cs
@@ -0,0 +1,138 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// ctor(System.Collections.Generic.IDictionary&lt;TKey,TValue&gt;,System.Collections.Generic.IEqualityComparer&lt;TKey&gt;)
+/// </summary>
+
+public class DictionaryCtor3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify ctor(System.Collections.Generic.IDictionary&lt;TKey,TValue&gt;,System.Collections.Generic.IEqualityComparer&lt;TKey&gt;) .");
+
+ try
+ {
+ Dictionary<string, string> openWith = new Dictionary<string, string>(StringComparer.CurrentCultureIgnoreCase);
+
+ Dictionary<string, string> dictionary = new Dictionary<string, string>(openWith, StringComparer.CurrentCultureIgnoreCase);
+
+ if (null == dictionary)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Failed to instance a Dictionary type with ctor(System.Collections.Generic.IDictionary&lt;TKey,TValue&gt;)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown when ref of dictionary is null .");
+
+ try
+ {
+ Dictionary<string, string> openWith = null;
+
+ Dictionary<string, string> dictionary = new Dictionary<string, string>(openWith, StringComparer.CurrentCultureIgnoreCase);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentException is not thrown when dictionary contains duplicate keys.");
+
+ try
+ {
+ Dictionary<string, string> openWith = new Dictionary<string, string>(StringComparer.CurrentCultureIgnoreCase);
+ openWith.Add("duplicate key", "value");
+ openWith.Add("duplicate key", "value");
+
+ Dictionary<string, string> dictionary = new Dictionary<string, string>(openWith, StringComparer.CurrentCultureIgnoreCase);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryCtor3 test = new DictionaryCtor3();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryCtor3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor4.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor4.cs
new file mode 100644
index 0000000000..d67e9875b1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor4.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// ctor(System.Collections.Generic.IEqualityComparer&lt;TKey&gt;)
+/// </summary>
+
+public class DictionaryCtor4
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Dictionary<T, K> with ctor(System.Collections.Generic.IEqualityComparer&lt;TKey&gt;) .");
+
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>(StringComparer.CurrentCultureIgnoreCase);
+
+ if (null == dictionary)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Failed to instance a Dictionary type with ctor(System.Collections.Generic.IEqualityComparer&lt;TKey&gt;) .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryCtor4 test = new DictionaryCtor4();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryCtor4");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor5.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor5.cs
new file mode 100644
index 0000000000..b89b787951
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor5.cs
@@ -0,0 +1,106 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// ctor(System.Int32)
+/// </summary>
+
+public class DictionaryCtor5
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify ctor(System.Int32) .");
+
+ try
+ {
+ int i = TestLibrary.Generator.GetInt16(-55);
+ Dictionary<string, string> dct = new Dictionary<string, string>(i);
+
+ if (null == dct)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Failed to instance a Dictionary type");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentOutOfRangeException is not thrown when capacity is less than 0.");
+
+ try
+ {
+ Dictionary<string, string> dct = new Dictionary<string, string>(-1);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentOutOfRangeException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryCtor5 test = new DictionaryCtor5();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryCtor5");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor6.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor6.cs
new file mode 100644
index 0000000000..e8bf3093b9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryctor6.cs
@@ -0,0 +1,106 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// ctor(System.Int32,System.Collections.Generic.IEqualityComparer&lt;TKey&gt;)
+/// </summary>
+
+public class DictionaryCtor6
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify ctor(System.Int32,System.Collections.Generic.IEqualityComparer&lt;TKey&gt;) .");
+
+ try
+ {
+ int i = TestLibrary.Generator.GetInt16(-55);
+ Dictionary<string, string> dictionary = new Dictionary<string, string>(i, StringComparer.CurrentCultureIgnoreCase);
+
+ if (null == dictionary)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Failed to instance a Dictionary type with ctor(System.Int32,System.Collections.Generic.IEqualityComparer&lt;TKey&gt;) .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentOutOfRangeException is not thrown when capacity is less than 0.");
+
+ try
+ {
+ Dictionary<string, string> openWith = new Dictionary<string, string>(-1, StringComparer.CurrentCultureIgnoreCase);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentOutOfRangeException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryCtor6 test = new DictionaryCtor6();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryCtor6");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarygetenumerator.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarygetenumerator.cs
new file mode 100644
index 0000000000..9420ae10d2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarygetenumerator.cs
@@ -0,0 +1,117 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// GetEnumerator
+/// </summary>
+
+public class DictionaryGetEnumerator
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method GetEnumerator .");
+
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ int i = 1;
+ foreach (KeyValuePair<string, string> item in dictionary)
+ {
+ if ( !(item.Value == "notepad.exe" ||
+ item.Value == "paint.exe" ||
+ item.Value == "wordpad.exe") )
+ {
+ TestLibrary.TestFramework.LogError("001." + i, "Method GetEnumerator Err.");
+ retVal = false;
+ }
+
+ i++;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryGetEnumerator test = new DictionaryGetEnumerator();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryGetEnumerator");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionadd.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionadd.cs
new file mode 100644
index 0000000000..3bf43932a4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionadd.cs
@@ -0,0 +1,151 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;TKey,TValue&gt;&gt;.Add(System.Collections.Generic.KeyValuePair&lt;TKey,TValue&gt;)
+/// </summary>
+
+public class DictionaryICollectionAdd
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ICollectionAdd .");
+
+ try
+ {
+ ICollection<KeyValuePair<String, String>> dictionary = new Dictionary<String, String>();
+
+ KeyValuePair<string, string> kvp1 = new KeyValuePair<String, String>("txt", "notepad.exe");
+ KeyValuePair<string, string> kvp2 = new KeyValuePair<String, String>("bmp", "paint.exe");
+ KeyValuePair<string, string> kvp3 = new KeyValuePair<String, String>("dib", "paint.exe");
+ KeyValuePair<string, string> kvp4 = new KeyValuePair<String, String>("rtf", "wordpad.exe");
+
+ dictionary.Add(kvp1);
+ dictionary.Add(kvp2);
+ dictionary.Add(kvp3);
+ dictionary.Add(kvp4);
+
+ if ( !(dictionary.Contains(kvp1) &&
+ dictionary.Contains(kvp2) &&
+ dictionary.Contains(kvp3) &&
+ dictionary.Contains(kvp4)) )
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ICollectionAdd Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown when key is null ref.");
+
+ try
+ {
+ ICollection<KeyValuePair<String, String>> dictionary = new Dictionary<String, String>();
+
+ string str1 = null;
+ KeyValuePair<string, string> kvp1 = new KeyValuePair<String, String>(str1, "notepad.exe");
+ dictionary.Add(kvp1);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentException is not thrown when An element with the same key already exists in the Dictionary .");
+
+ try
+ {
+ ICollection<KeyValuePair<String, String>> dictionary = new Dictionary<String, String>();
+
+ KeyValuePair<string, string> kvp1 = new KeyValuePair<String, String>("txt", "notepad.exe");
+ dictionary.Add(kvp1);
+ dictionary.Add(kvp1);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryICollectionAdd test = new DictionaryICollectionAdd();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryICollectionAdd");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectioncontains.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectioncontains.cs
new file mode 100644
index 0000000000..f0a34fb96d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectioncontains.cs
@@ -0,0 +1,156 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;TKey,TValue&gt;&gt;.Contains(System.Collections.Generic.KeyValuePair&lt;TKey,TValue&gt;)
+/// </summary>
+
+public class DictionaryICollectionContains
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ICollectionContains when k/v existed.");
+
+ try
+ {
+ ICollection<KeyValuePair<String, String>> dictionary = new Dictionary<String, String>();
+
+ KeyValuePair<string, string> kvp1 = new KeyValuePair<String, String>("txt", "notepad.exe");
+ KeyValuePair<string, string> kvp2 = new KeyValuePair<String, String>("bmp", "paint.exe");
+ KeyValuePair<string, string> kvp3 = new KeyValuePair<String, String>("dib", "paint.exe");
+ KeyValuePair<string, string> kvp4 = new KeyValuePair<String, String>("rtf", "wordpad.exe");
+
+ dictionary.Add(kvp1);
+ dictionary.Add(kvp2);
+ dictionary.Add(kvp3);
+ dictionary.Add(kvp4);
+
+ bool actual = dictionary.Contains(kvp1) &&
+ dictionary.Contains(kvp1) &&
+ dictionary.Contains(kvp1) &&
+ dictionary.Contains(kvp1);
+ bool expected = true;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ICollectionContains Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ICollectionContains when no k/v existed .");
+
+ try
+ {
+ ICollection<KeyValuePair<String, String>> dictionary = new Dictionary<String, String>();
+
+ KeyValuePair<string, string> kvp1 = new KeyValuePair<String, String>("txt", "notepad.exe");
+
+ bool actual = dictionary.Contains(kvp1);
+ bool expected = false;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method ICollectionContains Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryICollectionContains test = new DictionaryICollectionContains();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryICollectionContains");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectioncopyto.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectioncopyto.cs
new file mode 100644
index 0000000000..8cc6b6165e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectioncopyto.cs
@@ -0,0 +1,252 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;TKey,TValue&gt;&gt;.CopyTo(System.Collections.Generic.KeyValuePair&lt;TKey,TValue&gt;[],System.Int32)
+/// </summary>
+
+public class DictionaryICollectionCopyTo
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ICollectionCopyTo .");
+
+ try
+ {
+ ICollection<KeyValuePair<String, String>> dictionary = new Dictionary<String, String>();
+
+ KeyValuePair<string, string> kvp1 = new KeyValuePair<String, String>("txt", "notepad.exe");
+ KeyValuePair<string, string> kvp2 = new KeyValuePair<String, String>("bmp", "paint.exe");
+ KeyValuePair<string, string> kvp3 = new KeyValuePair<String, String>("dib", "paint.exe");
+ KeyValuePair<string, string> kvp4 = new KeyValuePair<String, String>("rtf", "wordpad.exe");
+
+ dictionary.Add(kvp1);
+ dictionary.Add(kvp2);
+ dictionary.Add(kvp3);
+ dictionary.Add(kvp4);
+
+ KeyValuePair<string, string>[] kvpArray = new KeyValuePair<string,string>[dictionary.Count];
+
+ dictionary.CopyTo(kvpArray, 0);
+
+
+ bool actual = (kvpArray[0].Equals(kvp1)) && (kvpArray[1].Equals(kvp2)) &&
+ (kvpArray[2].Equals(kvp3)) && (kvpArray[3].Equals(kvp4));
+ bool expected = true;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ICollectionCopyTo Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown when array is null ref.");
+
+ try
+ {
+ ICollection<KeyValuePair<String, String>> dictionary = new Dictionary<String, String>();
+
+ KeyValuePair<string, string> kvp1 = new KeyValuePair<String, String>("txt", "notepad.exe");
+ KeyValuePair<string, string> kvp2 = new KeyValuePair<String, String>("bmp", "paint.exe");
+ KeyValuePair<string, string> kvp3 = new KeyValuePair<String, String>("dib", "paint.exe");
+ KeyValuePair<string, string> kvp4 = new KeyValuePair<String, String>("rtf", "wordpad.exe");
+
+ dictionary.Add(kvp1);
+ dictionary.Add(kvp2);
+ dictionary.Add(kvp3);
+ dictionary.Add(kvp4);
+
+ KeyValuePair<string, string>[] kvpArray = null;
+ dictionary.CopyTo(kvpArray, 0);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentOutOfRangeException is not thrown .");
+
+ try
+ {
+ ICollection<KeyValuePair<String, String>> dictionary = new Dictionary<String, String>();
+
+ KeyValuePair<string, string> kvp1 = new KeyValuePair<String, String>("txt", "notepad.exe");
+ KeyValuePair<string, string> kvp2 = new KeyValuePair<String, String>("bmp", "paint.exe");
+ KeyValuePair<string, string> kvp3 = new KeyValuePair<String, String>("dib", "paint.exe");
+ KeyValuePair<string, string> kvp4 = new KeyValuePair<String, String>("rtf", "wordpad.exe");
+
+ dictionary.Add(kvp1);
+ dictionary.Add(kvp2);
+ dictionary.Add(kvp3);
+ dictionary.Add(kvp4);
+
+ KeyValuePair<string, string>[] kvpArray = new KeyValuePair<string, string>[dictionary.Count];
+ dictionary.CopyTo(kvpArray, -1);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentOutOfRangeException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentException is not thrown .");
+
+ try
+ {
+ ICollection<KeyValuePair<String, String>> dictionary = new Dictionary<String, String>();
+
+ KeyValuePair<string, string> kvp1 = new KeyValuePair<String, String>("txt", "notepad.exe");
+ KeyValuePair<string, string> kvp2 = new KeyValuePair<String, String>("bmp", "paint.exe");
+ KeyValuePair<string, string> kvp3 = new KeyValuePair<String, String>("dib", "paint.exe");
+ KeyValuePair<string, string> kvp4 = new KeyValuePair<String, String>("rtf", "wordpad.exe");
+
+ dictionary.Add(kvp1);
+ dictionary.Add(kvp2);
+ dictionary.Add(kvp3);
+ dictionary.Add(kvp4);
+
+ KeyValuePair<string, string>[] kvpArray = new KeyValuePair<string, string>[dictionary.Count];
+ dictionary.CopyTo(kvpArray, 4);
+
+ TestLibrary.TestFramework.LogError("103.1", "ArgumentException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: ArgumentException is not thrown .");
+
+ try
+ {
+ ICollection<KeyValuePair<String, String>> dictionary = new Dictionary<String, String>();
+
+ KeyValuePair<string, string> kvp1 = new KeyValuePair<String, String>("txt", "notepad.exe");
+ KeyValuePair<string, string> kvp2 = new KeyValuePair<String, String>("bmp", "paint.exe");
+ KeyValuePair<string, string> kvp3 = new KeyValuePair<String, String>("dib", "paint.exe");
+ KeyValuePair<string, string> kvp4 = new KeyValuePair<String, String>("rtf", "wordpad.exe");
+
+ dictionary.Add(kvp1);
+ dictionary.Add(kvp2);
+ dictionary.Add(kvp3);
+ dictionary.Add(kvp4);
+
+ KeyValuePair<string, string>[] kvpArray = new KeyValuePair<string, string>[dictionary.Count - 1];
+ dictionary.CopyTo(kvpArray, 0);
+
+ TestLibrary.TestFramework.LogError("104.1", "ArgumentException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryICollectionCopyTo test = new DictionaryICollectionCopyTo();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryICollectionCopyTo");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectioncopyto2.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectioncopyto2.cs
new file mode 100644
index 0000000000..ff447e6bba
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectioncopyto2.cs
@@ -0,0 +1,253 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.ICollection.CopyTo(System.Array,System.Int32)
+/// </summary>
+
+public class DictionaryICollectionCopyTo2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ICollection.CopyTo(System.Array,System.Int32) .");
+
+ try
+ {
+ ICollection<KeyValuePair<String, String>> dictionary = new Dictionary<String, String>();
+
+ KeyValuePair<string, string> kvp1 = new KeyValuePair<String, String>("txt", "notepad.exe");
+ KeyValuePair<string, string> kvp2 = new KeyValuePair<String, String>("bmp", "paint.exe");
+ KeyValuePair<string, string> kvp3 = new KeyValuePair<String, String>("dib", "paint.exe");
+ KeyValuePair<string, string> kvp4 = new KeyValuePair<String, String>("rtf", "wordpad.exe");
+
+ dictionary.Add(kvp1);
+ dictionary.Add(kvp2);
+ dictionary.Add(kvp3);
+ dictionary.Add(kvp4);
+
+ KeyValuePair<string, string>[] kvpArray = new KeyValuePair<string, string>[dictionary.Count];
+
+ dictionary.CopyTo(kvpArray, 0);
+
+
+ bool actual = (kvpArray[0].Equals(kvp1)) && (kvpArray[1].Equals(kvp2)) &&
+ (kvpArray[2].Equals(kvp3)) && (kvpArray[3].Equals(kvp4));
+ bool expected = true;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ICollectionCopyTo Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown when array is null ref.");
+
+ try
+ {
+ ICollection<KeyValuePair<String, String>> dictionary = new Dictionary<String, String>();
+
+ KeyValuePair<string, string> kvp1 = new KeyValuePair<String, String>("txt", "notepad.exe");
+ KeyValuePair<string, string> kvp2 = new KeyValuePair<String, String>("bmp", "paint.exe");
+ KeyValuePair<string, string> kvp3 = new KeyValuePair<String, String>("dib", "paint.exe");
+ KeyValuePair<string, string> kvp4 = new KeyValuePair<String, String>("rtf", "wordpad.exe");
+
+ dictionary.Add(kvp1);
+ dictionary.Add(kvp2);
+ dictionary.Add(kvp3);
+ dictionary.Add(kvp4);
+
+ KeyValuePair<string, string>[] kvpArray = null;
+ dictionary.CopyTo(kvpArray, 0);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentOutOfRangeException is not thrown .");
+
+ try
+ {
+ ICollection<KeyValuePair<String, String>> dictionary = new Dictionary<String, String>();
+
+ KeyValuePair<string, string> kvp1 = new KeyValuePair<String, String>("txt", "notepad.exe");
+ KeyValuePair<string, string> kvp2 = new KeyValuePair<String, String>("bmp", "paint.exe");
+ KeyValuePair<string, string> kvp3 = new KeyValuePair<String, String>("dib", "paint.exe");
+ KeyValuePair<string, string> kvp4 = new KeyValuePair<String, String>("rtf", "wordpad.exe");
+
+ dictionary.Add(kvp1);
+ dictionary.Add(kvp2);
+ dictionary.Add(kvp3);
+ dictionary.Add(kvp4);
+
+ KeyValuePair<string, string>[] kvpArray = new KeyValuePair<string, string>[dictionary.Count];
+ dictionary.CopyTo(kvpArray, -1);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentOutOfRangeException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentException is not thrown .");
+
+ try
+ {
+ ICollection<KeyValuePair<String, String>> dictionary = new Dictionary<String, String>();
+
+ KeyValuePair<string, string> kvp1 = new KeyValuePair<String, String>("txt", "notepad.exe");
+ KeyValuePair<string, string> kvp2 = new KeyValuePair<String, String>("bmp", "paint.exe");
+ KeyValuePair<string, string> kvp3 = new KeyValuePair<String, String>("dib", "paint.exe");
+ KeyValuePair<string, string> kvp4 = new KeyValuePair<String, String>("rtf", "wordpad.exe");
+
+ dictionary.Add(kvp1);
+ dictionary.Add(kvp2);
+ dictionary.Add(kvp3);
+ dictionary.Add(kvp4);
+
+ KeyValuePair<string, string>[] kvpArray = new KeyValuePair<string, string>[dictionary.Count];
+ dictionary.CopyTo(kvpArray, 4);
+
+ TestLibrary.TestFramework.LogError("103.1", "ArgumentException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: ArgumentException is not thrown .");
+
+ try
+ {
+ ICollection<KeyValuePair<String, String>> dictionary = new Dictionary<String, String>();
+
+ KeyValuePair<string, string> kvp1 = new KeyValuePair<String, String>("txt", "notepad.exe");
+ KeyValuePair<string, string> kvp2 = new KeyValuePair<String, String>("bmp", "paint.exe");
+ KeyValuePair<string, string> kvp3 = new KeyValuePair<String, String>("dib", "paint.exe");
+ KeyValuePair<string, string> kvp4 = new KeyValuePair<String, String>("rtf", "wordpad.exe");
+
+ dictionary.Add(kvp1);
+ dictionary.Add(kvp2);
+ dictionary.Add(kvp3);
+ dictionary.Add(kvp4);
+
+ KeyValuePair<string, string>[] kvpArray = new KeyValuePair<string, string>[dictionary.Count - 1];
+ dictionary.CopyTo(kvpArray, 0);
+
+ TestLibrary.TestFramework.LogError("104.1", "ArgumentException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryICollectionCopyTo2 test = new DictionaryICollectionCopyTo2();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryICollectionCopyTo2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionisreadonly.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionisreadonly.cs
new file mode 100644
index 0000000000..0cba896404
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionisreadonly.cs
@@ -0,0 +1,111 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;TKey,TValue&gt;&gt;.get_IsReadOnly
+/// </summary>
+
+public class DictionaryICollectionIsReadOnly
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property ICollectionIsReadOnly is false.");
+
+ try
+ {
+ ICollection<KeyValuePair<String, String>> dictionary = new Dictionary<String, String>();
+
+ KeyValuePair<string, string> kvp1 = new KeyValuePair<String, String>("txt", "notepad.exe");
+
+ bool actual = dictionary.IsReadOnly;
+ bool expected = false;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property ICollectionIsReadOnly Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryICollectionIsReadOnly test = new DictionaryICollectionIsReadOnly();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryICollectionIsReadOnly");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionisreadonly2.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionisreadonly2.cs
new file mode 100644
index 0000000000..243eed1e2c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionisreadonly2.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public class DictionaryICollectionIsReadOnly2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property IsReadOnly .");
+
+ try
+ {
+ ICollection<KeyValuePair<string, string>> dictionary = new Dictionary<string, string>();
+ KeyValuePair<string, string> kvp1 = new KeyValuePair<String, String>("txt", "notepad.exe");
+
+ bool actual = dictionary.IsReadOnly;
+ bool expected = false;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property ICollectionIsReadOnly Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryICollectionIsReadOnly2 test = new DictionaryICollectionIsReadOnly2();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryICollectionIsReadOnly2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionissynchronized.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionissynchronized.cs
new file mode 100644
index 0000000000..17aa65fa2e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionissynchronized.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.ICollection.get_IsSynchronized
+/// </summary>
+
+public class DictionaryICollectionIsSynchronized
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property ICollection.get_IsSynchronized Err .");
+
+ try
+ {
+ System.Collections.ICollection dictionary = new Dictionary<string, string>();
+
+ bool isSynchronized = dictionary.IsSynchronized;
+
+ if (isSynchronized == true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property ICollection.get_IsSynchronized Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryICollectionIsSynchronized test = new DictionaryICollectionIsSynchronized();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryICollectionIsSynchronized");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionissynchronized2.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionissynchronized2.cs
new file mode 100644
index 0000000000..090c3287d9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionissynchronized2.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.ICollection.IsSynchronized
+/// </summary>
+
+public class DictionaryICollectionIsSynchronized2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property ICollection.IsSynchronized Err .");
+
+ try
+ {
+ System.Collections.ICollection dictionary = new Dictionary<string, string>();
+
+ bool isSynchronized = dictionary.IsSynchronized;
+
+ if (isSynchronized == true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property ICollection.IsSynchronized Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryICollectionIsSynchronized2 test = new DictionaryICollectionIsSynchronized2();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryICollectionIsSynchronized2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionremove.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionremove.cs
new file mode 100644
index 0000000000..d93408c9e2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionremove.cs
@@ -0,0 +1,141 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;TKey,TValue&gt;&gt;.Remove(System.Collections.Generic.KeyValuePair&lt;TKey,TValue&gt;)
+/// </summary>
+
+public class DictionaryICollectionRemove
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method Remove when specified key is not exist .");
+
+ try
+ {
+ ICollection<KeyValuePair<String, String>> dictionary = new Dictionary<String, String>();
+ KeyValuePair<string, string> kvp1 = new KeyValuePair<String, String>("txt", "notepad.exe");
+ bool actual = dictionary.Remove(kvp1);
+ bool expected = false;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method Remove Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method Remove when specified key existed .");
+
+ try
+ {
+ ICollection<KeyValuePair<String, String>> dictionary = new Dictionary<String, String>();
+ KeyValuePair<string, string> kvp1 = new KeyValuePair<String, String>("txt", "notepad.exe");
+ dictionary.Add(kvp1);
+
+ bool actual = dictionary.Remove(kvp1);
+ bool expected = true;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method Remove Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryICollectionRemove test = new DictionaryICollectionRemove();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryICollectionRemove");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionsyncroot.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionsyncroot.cs
new file mode 100644
index 0000000000..9597ec9e08
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionsyncroot.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.ICollection.get_SyncRoot
+/// </summary>
+
+public class DictionaryICollectionSyncRoot
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property ICollection.SyncRoot");
+
+ try
+ {
+ System.Collections.ICollection dictionary = new Dictionary<string, string>();
+
+ object isSynchronized = dictionary.SyncRoot;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryICollectionSyncRoot test = new DictionaryICollectionSyncRoot();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryICollectionSyncRoot");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionsyncroot2.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionsyncroot2.cs
new file mode 100644
index 0000000000..258bfbaa85
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryicollectionsyncroot2.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.ICollection.SyncRoot
+/// </summary>
+
+public class DictionaryICollectionSyncRoot2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property ICollection.SyncRoot");
+
+ try
+ {
+ System.Collections.ICollection dictionary = new Dictionary<string, string>();
+
+ object isSynchronized = dictionary.SyncRoot;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryICollectionSyncRoot2 test = new DictionaryICollectionSyncRoot2();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryICollectionSyncRoot2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryadd.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryadd.cs
new file mode 100644
index 0000000000..18ad052323
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryadd.cs
@@ -0,0 +1,155 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.IDictionary.Add(System.Object,System.Object)
+/// </summary>
+
+public class DictionaryIDictionaryAdd
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method IDictionaryAdd .");
+
+ try
+ {
+ IDictionary<string, string> dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ ICollection<string> items = dictionary.Keys;
+
+ string testStr = null;
+ foreach (string s in items)
+ testStr += s;
+
+ bool actual = testStr.Contains("txt") && testStr.Contains("bmp") &&
+ testStr.Contains("dib") && testStr.Contains("rtf");
+
+ if (actual == false)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property IDictionaryKeys Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown when key is a null ref.");
+
+ try
+ {
+ string key = null;
+ string value = "notepad.exe";
+
+ IDictionary<string, string> dictionary = new Dictionary<string, string>();
+
+ dictionary.Add(key, value);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentNullException is not thrown when A value with the same key already exists in the Dictionary.");
+
+ try
+ {
+ string key = "txt";
+ string value = "notepad.exe";
+
+ IDictionary<string, string> dictionary = new Dictionary<string, string>();
+
+ dictionary.Add(key, value);
+ dictionary.Add(key, value);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryIDictionaryAdd test = new DictionaryIDictionaryAdd();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryIDictionaryAdd");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarycontains.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarycontains.cs
new file mode 100644
index 0000000000..71f18b0c45
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarycontains.cs
@@ -0,0 +1,151 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.IDictionary.Contains(System.Object)
+/// </summary>
+
+public class DictionaryIDictionaryContains
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method IDictionaryContains when specified key existed.");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ bool testVerify = dictionary.Contains("txt") && dictionary.Contains("bmp") &&
+ dictionary.Contains("dib") && dictionary.Contains("rtf");
+
+ if (testVerify == false)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method IDictionaryContains Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method IDictionaryContains when no specified key existed.");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ if (dictionary.Contains("txt") == true)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method IDictionaryContains Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown.");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ string key = null;
+
+ dictionary.Contains(key);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryIDictionaryContains test = new DictionaryIDictionaryContains();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryIDictionaryContains");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarygetenumerator.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarygetenumerator.cs
new file mode 100644
index 0000000000..f9463ec7e2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarygetenumerator.cs
@@ -0,0 +1,116 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.IDictionary.GetEnumerator
+/// </summary>
+
+public class DictionaryIDictionaryGetEnumerator
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method IDictionary.GetEnumerator .");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ string verifyStr = null;
+ foreach (DictionaryEntry de in dictionary)
+ verifyStr += de.Key;
+
+ bool verifyTest = verifyStr.Contains("txt") && verifyStr.Contains("bmp") &&
+ verifyStr.Contains("dib") && verifyStr.Contains("rtf");
+
+ if (verifyTest == false)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method IDictionary.GetEnumerator Err .");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryIDictionaryGetEnumerator test = new DictionaryIDictionaryGetEnumerator();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryIDictionaryGetEnumerator");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryisfixedsize.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryisfixedsize.cs
new file mode 100644
index 0000000000..eab7eb7dd5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryisfixedsize.cs
@@ -0,0 +1,109 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.IDictionary.get_IsFixedSize
+/// </summary>
+
+public class DictionaryIDictionaryIsFixedSize
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property IDictionaryIsFixedSize .");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ if (dictionary.IsFixedSize != false)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property IDictionaryIsFixedSize Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryIDictionaryIsFixedSize test = new DictionaryIDictionaryIsFixedSize();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryIDictionaryIsFixedSize");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryisfixedsize2.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryisfixedsize2.cs
new file mode 100644
index 0000000000..856fa0cb68
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryisfixedsize2.cs
@@ -0,0 +1,109 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.IDictionary.IsFixedSize
+/// </summary>
+
+public class DictionaryIDictionaryIsFixedSize2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property IDictionaryIsFixedSize .");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ if (dictionary.IsFixedSize != false)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property IDictionaryIsFixedSize Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryIDictionaryIsFixedSize2 test = new DictionaryIDictionaryIsFixedSize2();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryIDictionaryIsFixedSize2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryisreadonly.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryisreadonly.cs
new file mode 100644
index 0000000000..4d04b7ca37
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryisreadonly.cs
@@ -0,0 +1,109 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.IDictionary.get_IsReadOnly
+/// </summary>
+
+public class DictionaryIDictionaryIsReadOnly
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property IDictionaryIsReadOnly .");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ if (dictionary.IsReadOnly != false)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property IDictionaryIsReadOnly Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryIDictionaryIsReadOnly test = new DictionaryIDictionaryIsReadOnly();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryIDictionaryIsReadOnly");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryisreadonly2.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryisreadonly2.cs
new file mode 100644
index 0000000000..201a44c7d3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryisreadonly2.cs
@@ -0,0 +1,109 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.IDictionary.IsReadOnly
+/// </summary>
+///
+public class DictionaryIDictionaryIsReadOnly2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property IDictionaryIsFixedSize .");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ if (dictionary.IsReadOnly != false)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property IDictionaryIsFixedSize Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryIDictionaryIsReadOnly2 test = new DictionaryIDictionaryIsReadOnly2();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryIDictionaryIsReadOnly2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryitem.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryitem.cs
new file mode 100644
index 0000000000..88de6ecfd2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryitem.cs
@@ -0,0 +1,223 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.IDictionary.get_Item(System.Object)
+/// </summary>
+
+public class DictionaryIDictionaryItem
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property IDictionaryItem(get) .");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ bool testVerify = dictionary["txt"].Equals("notepad.exe") && dictionary["bmp"].Equals("paint.exe") &&
+ dictionary["dib"].Equals("paint.exe") && dictionary["rtf"].Equals("wordpad.exe");
+
+ if (testVerify != true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property IDictionaryItem(get) Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify property IDictionaryItem(set) .");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ dictionary["txt"] = "updated";
+
+ if (!dictionary["txt"].Equals("updated"))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Property IDictionaryItem(set) Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown .");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ string key = null;
+ dictionary[key] = "updated";
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentException is not thrown .");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ object key = new object();
+ dictionary[key] = "updated";
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentException is not thrown .");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ object updated = new object();
+ dictionary["txt"] = updated;
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryIDictionaryItem test = new DictionaryIDictionaryItem();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryIDictionaryItem");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryitem2.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryitem2.cs
new file mode 100644
index 0000000000..e8e2a2a677
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryitem2.cs
@@ -0,0 +1,223 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.IDictionary.Item(System.Object)
+/// </summary>
+
+public class DictionaryIDictionaryItem2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property IDictionaryItem(get) .");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ bool testVerify = dictionary["txt"].Equals("notepad.exe") && dictionary["bmp"].Equals("paint.exe") &&
+ dictionary["dib"].Equals("paint.exe") && dictionary["rtf"].Equals("wordpad.exe");
+
+ if (testVerify != true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property IDictionaryItem(get) Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify property IDictionaryItem(set) .");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ dictionary["txt"] = "updated";
+
+ if (!dictionary["txt"].Equals("updated"))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Property IDictionaryItem(set) Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown .");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ string key = null;
+ dictionary[key] = "updated";
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentException is not thrown .");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ object key = new object();
+ dictionary[key] = "updated";
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentException is not thrown .");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ object updated = new object();
+ dictionary["txt"] = updated;
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryIDictionaryItem2 test = new DictionaryIDictionaryItem2();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryIDictionaryItem2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarykeys.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarykeys.cs
new file mode 100644
index 0000000000..d9b7c1a929
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarykeys.cs
@@ -0,0 +1,117 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.IDictionary&lt;TKey,TValue&gt;.get_Keys
+/// </summary>
+
+public class DictionaryIDictionaryKeys
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property IDictionaryKeys.");
+
+ try
+ {
+ IDictionary<string, string> dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ ICollection<string> items = dictionary.Keys;
+
+ string testStr = null;
+ foreach (string s in items)
+ testStr += s;
+
+ bool actual = testStr.Contains("txt") && testStr.Contains("bmp") &&
+ testStr.Contains("dib") && testStr.Contains("rtf");
+
+ if (actual == false)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property IDictionaryKeys Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryIDictionaryKeys test = new DictionaryIDictionaryKeys();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryIDictionaryKeys");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarykeys2.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarykeys2.cs
new file mode 100644
index 0000000000..7b7bb34074
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarykeys2.cs
@@ -0,0 +1,116 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.IDictionary.get_Keys
+/// </summary>
+
+public class DictionaryIDictionaryKeys2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property IDictionaryKeys .");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ string testStr = null;
+ foreach (string s in dictionary.Keys)
+ testStr += s;
+
+ bool testVerify = testStr.Contains("txt") && testStr.Contains("bmp") &&
+ testStr.Contains("dib") && testStr.Contains("rtf");
+
+ if (testVerify != true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property IDictionaryKeys Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryIDictionaryKeys2 test = new DictionaryIDictionaryKeys2();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryIDictionaryKeys2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarykeys3.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarykeys3.cs
new file mode 100644
index 0000000000..1e3f8856cc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarykeys3.cs
@@ -0,0 +1,116 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.IDictionary&lt;TKey,TValue&gt;.Keys
+/// </summary>
+
+public class DictionaryIDictionaryKeys3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property IDictionaryKeys .");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ string testStr = null;
+ foreach (string s in dictionary.Keys)
+ testStr += s;
+
+ bool testVerify = testStr.Contains("txt") && testStr.Contains("bmp") &&
+ testStr.Contains("dib") && testStr.Contains("rtf");
+
+ if (testVerify != true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property IDictionaryKeys Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryIDictionaryKeys3 test = new DictionaryIDictionaryKeys3();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryIDictionaryKeys3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarykeys4.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarykeys4.cs
new file mode 100644
index 0000000000..f44cd569e9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionarykeys4.cs
@@ -0,0 +1,116 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.IDictionary.Keys
+/// </summary>
+
+public class DictionaryIDictionaryKeys4
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property IDictionaryKeys .");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ string testStr = null;
+ foreach (string s in dictionary.Keys)
+ testStr += s;
+
+ bool testVerify = testStr.Contains("txt") && testStr.Contains("bmp") &&
+ testStr.Contains("dib") && testStr.Contains("rtf");
+
+ if (testVerify != true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property IDictionaryKeys Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryIDictionaryKeys4 test = new DictionaryIDictionaryKeys4();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryIDictionaryKeys4");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryremove.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryremove.cs
new file mode 100644
index 0000000000..f6782da34a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryremove.cs
@@ -0,0 +1,149 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.IDictionary.Remove(System.Object)
+/// </summary>
+
+public class DictionaryIDictionaryRemove
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method IDictionaryRemove when the specified key existed.");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ dictionary.Remove("txt");
+
+ if (dictionary.Contains("txt") == true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method IDictionary.GetEnumerator Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method IDictionaryRemove when the specified key is not exist.");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ dictionary.Remove("txt");
+
+ if (dictionary.Contains("txt") == true)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method IDictionary.GetEnumerator Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown when key is null ref .");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ string key = null;
+ dictionary.Remove(key);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryIDictionaryRemove test = new DictionaryIDictionaryRemove();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryIDictionaryRemove");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryvalue2.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryvalue2.cs
new file mode 100644
index 0000000000..07291fa1c7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryvalue2.cs
@@ -0,0 +1,116 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.IDictionary.get_Values
+/// </summary>
+
+public class DictionaryIDictionaryValue2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property IDictionaryValues .");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ string testStr = null;
+ foreach (string s in dictionary.Values)
+ testStr += s;
+
+ bool testVerify = testStr.Contains("notepad.exe") && testStr.Contains("paint.exe") &&
+ testStr.Contains("paint.exe") && testStr.Contains("wordpad.exe");
+
+ if (testVerify != true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property IDictionaryValues Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryIDictionaryValue2 test = new DictionaryIDictionaryValue2();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryIDictionaryValue2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryvalue3.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryvalue3.cs
new file mode 100644
index 0000000000..e2d989f835
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryvalue3.cs
@@ -0,0 +1,116 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.IDictionary&lt;TKey,TValue&gt;.Values
+/// </summary>
+
+public class DictionaryIDictionaryValue3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property IDictionaryValues .");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ string testStr = null;
+ foreach (string s in dictionary.Values)
+ testStr += s;
+
+ bool testVerify = testStr.Contains("notepad.exe") && testStr.Contains("paint.exe") &&
+ testStr.Contains("paint.exe") && testStr.Contains("wordpad.exe");
+
+ if (testVerify != true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property IDictionaryValues Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryIDictionaryValue3 test = new DictionaryIDictionaryValue3();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryIDictionaryValue3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryvalue4.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryvalue4.cs
new file mode 100644
index 0000000000..57919c5dbf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryvalue4.cs
@@ -0,0 +1,116 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.IDictionary.Values
+/// </summary>
+
+public class DictionaryIDictionaryValue4
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property IDictionaryValues .");
+
+ try
+ {
+ IDictionary dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ string testStr = null;
+ foreach (string s in dictionary.Values)
+ testStr += s;
+
+ bool testVerify = testStr.Contains("notepad.exe") && testStr.Contains("paint.exe") &&
+ testStr.Contains("paint.exe") && testStr.Contains("wordpad.exe");
+
+ if (testVerify != true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property IDictionaryValues Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryIDictionaryValue4 test = new DictionaryIDictionaryValue4();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryIDictionaryValue4");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryvalues.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryvalues.cs
new file mode 100644
index 0000000000..0d426a282e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryidictionaryvalues.cs
@@ -0,0 +1,117 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.IDictionary&lt;TKey,TValue&gt;.get_Values
+/// </summary>
+
+public class DictionaryIDictionaryValues
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property IDictionaryValues.");
+
+ try
+ {
+ IDictionary<string, string> dictionary = new Dictionary<string, string>();
+
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ ICollection<string> items = dictionary.Values;
+
+ string testStr = null;
+ foreach (string s in items)
+ testStr += s;
+
+ bool actual = testStr.Contains("notepad.exe") && testStr.Contains("paint.exe") &&
+ testStr.Contains("paint.exe") && testStr.Contains("wordpad.exe");
+
+ if (actual == false)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property IDictionaryValues Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryIDictionaryValues test = new DictionaryIDictionaryValues();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryIDictionaryValues");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryienumerablegetenumerator.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryienumerablegetenumerator.cs
new file mode 100644
index 0000000000..88a22cac74
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryienumerablegetenumerator.cs
@@ -0,0 +1,129 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.IEnumerable&lt;System.Collections.Generic.KeyValuePair&lt;TKey,TValue&gt;&gt;.GetEnumerator
+/// </summary>
+
+public class DictionaryIEnumerableGetEnumerator
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method IEnumerableGetEnumerator.");
+
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+
+ KeyValuePair<string, string> kvp1 = new KeyValuePair<String, String>("txt", "notepad.exe");
+ KeyValuePair<string, string> kvp2 = new KeyValuePair<String, String>("bmp", "paint.exe");
+ KeyValuePair<string, string> kvp3 = new KeyValuePair<String, String>("dib", "paint.exe");
+ KeyValuePair<string, string> kvp4 = new KeyValuePair<String, String>("rtf", "wordpad.exe");
+
+ dictionary.Add(kvp1.Key,kvp1.Value);
+ dictionary.Add(kvp2.Key,kvp2.Value);
+ dictionary.Add(kvp3.Key,kvp3.Value);
+ dictionary.Add(kvp4.Key,kvp4.Value);
+
+ if (!(dictionary is IEnumerable<KeyValuePair<string, string>>))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The dictionary is not a instance of IEnumerable.");
+ retVal = false;
+ }
+ else
+ {
+
+ string testStr = null;
+ foreach (string s in dictionary.Values)
+ testStr += s;
+
+ if ( !(testStr.Contains(kvp1.Value) &&
+ testStr.Contains(kvp2.Value) &&
+ testStr.Contains(kvp3.Value) &&
+ testStr.Contains(kvp4.Value)) )
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Method IEnumerableGetEnumerator Err.");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryIEnumerableGetEnumerator test = new DictionaryIEnumerableGetEnumerator();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryIEnumerableGetEnumerator");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryienumerablegetenumerator2.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryienumerablegetenumerator2.cs
new file mode 100644
index 0000000000..f165237489
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryienumerablegetenumerator2.cs
@@ -0,0 +1,131 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.IEnumerable.GetEnumerator
+/// </summary>
+
+public class DictionaryIEnumerableGetEnumerator2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method IEnumerableGetEnumerator .");
+
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+
+ KeyValuePair<string, string> kvp1 = new KeyValuePair<String, String>("txt", "notepad.exe");
+ KeyValuePair<string, string> kvp2 = new KeyValuePair<String, String>("bmp", "paint.exe");
+ KeyValuePair<string, string> kvp3 = new KeyValuePair<String, String>("dib", "paint.exe");
+ KeyValuePair<string, string> kvp4 = new KeyValuePair<String, String>("rtf", "wordpad.exe");
+
+ dictionary.Add(kvp1.Key, kvp1.Value);
+ dictionary.Add(kvp2.Key, kvp2.Value);
+ dictionary.Add(kvp3.Key, kvp3.Value);
+ dictionary.Add(kvp4.Key, kvp4.Value);
+
+ if (!(dictionary is IEnumerable))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The dictionary is not a instance of IEnumerable.");
+ retVal = false;
+ }
+ else
+ {
+
+ string testStr = null;
+ foreach (string s in dictionary.Values)
+ testStr += s;
+
+ if ( !(testStr.Contains(kvp1.Value) &&
+ testStr.Contains(kvp2.Value) &&
+ testStr.Contains(kvp3.Value) &&
+ testStr.Contains(kvp4.Value)))
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Method IEnumerableGetEnumerator Err.");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryIEnumerableGetEnumerator2 test = new DictionaryIEnumerableGetEnumerator2();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryIEnumerableGetEnumerator2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryremove.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryremove.cs
new file mode 100644
index 0000000000..e157439fa6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionaryremove.cs
@@ -0,0 +1,156 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// Remove(TKey)
+/// </summary>
+
+public class DictionaryRemove
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method Remove when specified key is not exist .");
+
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+
+ bool actual = dictionary.Remove("txt");
+ bool expected = false;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method Remove Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method Remove when specified key existed.");
+
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ int count = dictionary.Count;
+
+ bool actual = dictionary.Remove("txt");
+ bool expected = true;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method Remove Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+
+ if (dictionary.Count != count - 1)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Method Remvoe Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + dictionary.Count + ", expected = " + (count-1));
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown when key is null ref .");
+
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ string str = null;
+ dictionary.Remove(str);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryRemove test = new DictionaryRemove();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryRemove");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarytrygetvalue.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarytrygetvalue.cs
new file mode 100644
index 0000000000..9b601316c5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionary/dictionarytrygetvalue.cs
@@ -0,0 +1,119 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// TryGetValue(TKey,TValue@)
+/// </summary>
+
+public class DictionaryTryGetValue
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method TryGetValue when the specified key existed .");
+
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ string value = "";
+ if (dictionary.TryGetValue("txt", out value) != true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method TryGetValue Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown.");
+
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("txt", "notepad.exe");
+ dictionary.Add("bmp", "paint.exe");
+ dictionary.Add("dib", "paint.exe");
+ dictionary.Add("rtf", "wordpad.exe");
+
+ string key = null;
+ string value = "";
+ bool b = dictionary.TryGetValue(key, out value);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DictionaryTryGetValue test = new DictionaryTryGetValue();
+
+ TestLibrary.TestFramework.BeginTestCase("DictionaryTryGetValue");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictEnumIDictEnumget_Entry.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictEnumIDictEnumget_Entry.csproj
new file mode 100644
index 0000000000..0184e85f53
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictEnumIDictEnumget_Entry.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryenumeratoridictionaryenumeratorget_entry.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictEnumIDictEnumget_Key.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictEnumIDictEnumget_Key.csproj
new file mode 100644
index 0000000000..0b860f76a0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictEnumIDictEnumget_Key.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryenumeratoridictionaryenumeratorget_key.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictEnumIDictEnumget_Value.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictEnumIDictEnumget_Value.csproj
new file mode 100644
index 0000000000..7de979a8e7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictEnumIDictEnumget_Value.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryenumeratoridictionaryenumeratorget_value.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictEnumIEnumReset.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictEnumIEnumReset.csproj
new file mode 100644
index 0000000000..deec17f716
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictEnumIEnumReset.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryenumeratorienumeratorreset.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictEnumIEnumget_Current.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictEnumIEnumget_Current.csproj
new file mode 100644
index 0000000000..2b952403f8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictEnumIEnumget_Current.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryenumeratorienumeratorget_current.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictionaryEnumeratorCurrent.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictionaryEnumeratorCurrent.csproj
new file mode 100644
index 0000000000..7bcd0c075b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictionaryEnumeratorCurrent.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryenumeratorcurrent.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictionaryEnumeratorDispose.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictionaryEnumeratorDispose.csproj
new file mode 100644
index 0000000000..0f3e22e2f5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictionaryEnumeratorDispose.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryenumeratordispose.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictionaryEnumeratorMoveNext.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictionaryEnumeratorMoveNext.csproj
new file mode 100644
index 0000000000..6e1626d4fa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/DictionaryEnumeratorMoveNext.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryenumeratormovenext.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratorcurrent.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratorcurrent.cs
new file mode 100644
index 0000000000..b2411c4f89
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratorcurrent.cs
@@ -0,0 +1,154 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Collections;
+/// <summary>
+/// Dictionary.Enumerator.Current
+/// </summary>
+public class DictionaryEnumeratorCurrent
+{
+ public static int Main()
+ {
+ DictionaryEnumeratorCurrent dicEnumCurrent = new DictionaryEnumeratorCurrent();
+ TestLibrary.TestFramework.BeginTestCase("DictionaryEnumeratorCurrent");
+ if (dicEnumCurrent.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Return the property Current of in the Dictionary Enumerator 1");
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("str1", "helloworld");
+ Dictionary<string, string>.Enumerator enumer = dictionary.GetEnumerator();
+ KeyValuePair<string, string> keyVal = enumer.Current;
+ if (keyVal.Key != null || keyVal.Value != null)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Return the property Current of in the Dictionary Enumerator 2");
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("str1", "helloworld");
+ Dictionary<string, string>.Enumerator enumer = dictionary.GetEnumerator();
+ if (enumer.MoveNext())
+ {
+ KeyValuePair<string, string> keyVal = enumer.Current;
+ if (keyVal.Key != "str1" || keyVal.Value != "helloworld")
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Return the property Current of in the Dictionary Enumerator 3");
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("str1", "helloworld");
+ dictionary.Add("str2", "goodluck");
+ Dictionary<string, string>.Enumerator enumer = dictionary.GetEnumerator();
+ if (enumer.MoveNext())
+ {
+ KeyValuePair<string, string> keyVal = enumer.Current;
+ if (enumer.MoveNext())
+ {
+ KeyValuePair<string, string> keyVal2 = enumer.Current;
+ if (keyVal2.Key != "str2" || keyVal2.Value != "goodluck")
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Return the property Current of in the Dictionary Enumerator 4");
+ try
+ {
+ TestClass TKey1 = new TestClass();
+ TestClass TValue1 = new TestClass();
+ Dictionary<TestClass,TestClass> dictionary = new Dictionary<TestClass,TestClass>();
+ dictionary.Add(TKey1,TValue1);
+ Dictionary<TestClass,TestClass>.Enumerator enumer = dictionary.GetEnumerator();
+ if (enumer.MoveNext())
+ {
+ KeyValuePair<TestClass,TestClass> keyVal = enumer.Current;
+ if (keyVal.Key != TKey1 || keyVal.Value != TValue1)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass
+ {
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratordispose.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratordispose.cs
new file mode 100644
index 0000000000..59048319c1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratordispose.cs
@@ -0,0 +1,87 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+/// <summary>
+/// Dictionary.Enumerator.Dispose()
+/// </summary>
+
+public class DictionaryEnumeratorDispose
+{
+
+ public static int Main()
+ {
+ DictionaryEnumeratorDispose dicEnumDis = new DictionaryEnumeratorDispose();
+ TestLibrary.TestFramework.BeginTestCase("DictionaryEnumeratorDispose");
+ if (dicEnumDis.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the Dispose method in Dictionary Enumerator 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("1", "test1");
+ dic.Add("2", "test2");
+ Dictionary<string, string>.Enumerator enumer1 = new Dictionary<string, string>.Enumerator();
+ Dictionary<string, string>.Enumerator enumer2 = dic.GetEnumerator();
+ enumer2.Dispose();
+ enumer1.Dispose();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the Dispose method in Dictionary Enumerator 2");
+ try
+ {
+ myClass TKey = new myClass();
+ myClass TValue = new myClass();
+ Dictionary<myClass, myClass> dic = new Dictionary<myClass, myClass>();
+ dic.Add(TKey,TValue );
+ Dictionary<myClass, myClass>.Enumerator enumer1 = new Dictionary<myClass, myClass>.Enumerator();
+ Dictionary<myClass, myClass>.Enumerator enumer2 = dic.GetEnumerator();
+ enumer2.Dispose();
+ enumer1.Dispose();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class myClass { }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratoridictionaryenumeratorget_entry.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratoridictionaryenumeratorget_entry.cs
new file mode 100644
index 0000000000..82a1985f8b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratoridictionaryenumeratorget_entry.cs
@@ -0,0 +1,157 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Collections;
+/// <summary>
+/// DictionaryEnumerator.IDictionaryEnumerator.get_Entry
+/// </summary>
+public class DictionaryEnumeratorIDictionaryEnumeratorget_Entry
+{
+ public static int Main()
+ {
+ DictionaryEnumeratorIDictionaryEnumeratorget_Entry dicEnumIDicEnumget_Entry = new DictionaryEnumeratorIDictionaryEnumeratorget_Entry();
+ TestLibrary.TestFramework.BeginTestCase("DictionaryEnumeratorIDictionaryEnumeratorget_Entry");
+ if (dicEnumIDicEnumget_Entry.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Return the property get_Entry in the IDictionaryEnumerator 1");
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("str1", "helloworld");
+ Dictionary<string, string>.Enumerator enumer = dictionary.GetEnumerator();
+ IDictionaryEnumerator idicEnumer = (IDictionaryEnumerator)enumer;
+ if (idicEnumer.MoveNext())
+ {
+ DictionaryEntry entryVal = idicEnumer.Entry;
+ if (entryVal.Key.ToString() != "str1" || entryVal.Value.ToString() != "helloworld")
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Return the property get_Entry in the IDictionaryEnumerator 2");
+ try
+ {
+ Dictionary<TestClass,TestClass> dictionary = new Dictionary<TestClass,TestClass>();
+ TestClass Tkey1 = new TestClass();
+ TestClass TVal1 = new TestClass();
+ dictionary.Add(Tkey1,TVal1);
+ Dictionary<TestClass,TestClass>.Enumerator enumer = dictionary.GetEnumerator();
+ IDictionaryEnumerator idicEnumer = (IDictionaryEnumerator)enumer;
+ if (idicEnumer.MoveNext())
+ {
+ DictionaryEntry entryVal = idicEnumer.Entry;
+ if (entryVal.Key != Tkey1 || entryVal.Value != TVal1)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The enumerator is positioned before the first element of the collection");
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("str1", "helloworld");
+ Dictionary<string, string>.Enumerator enumer = dictionary.GetEnumerator();
+ IDictionaryEnumerator idicEnumer = (IDictionaryEnumerator)enumer;
+ DictionaryEntry entryVal = idicEnumer.Entry;
+ TestLibrary.TestFramework.LogError("N001", "The enumerator is positioned before the first element of the collection but not throw exception");
+ retVal = false;
+ }
+ catch (InvalidOperationException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:The enumerator is positioned after the last element of the collection");
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("str1", "helloworld");
+ Dictionary<string, string>.Enumerator enumer = dictionary.GetEnumerator();
+ IDictionaryEnumerator idicEnumer = (IDictionaryEnumerator)enumer;
+ if (idicEnumer.MoveNext())
+ {
+ DictionaryEntry entryVal1 = idicEnumer.Entry;
+ }
+ if (!idicEnumer.MoveNext())
+ {
+ DictionaryEntry entryVal2 = idicEnumer.Entry;
+ TestLibrary.TestFramework.LogError("N002", "The enumerator is positioned after the last element of the collection but not throw exception");
+ retVal = false;
+ }
+ }
+ catch (InvalidOperationException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass
+ {
+
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratoridictionaryenumeratorget_key.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratoridictionaryenumeratorget_key.cs
new file mode 100644
index 0000000000..8942a0769e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratoridictionaryenumeratorget_key.cs
@@ -0,0 +1,157 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Collections;
+/// <summary>
+/// DictionaryEnumerator.IDictionaryEnumerator.get_Key
+/// </summary>
+public class DictionaryEnumeratorIDictionaryEnumeratorget_Key
+{
+ public static int Main()
+ {
+ DictionaryEnumeratorIDictionaryEnumeratorget_Key dicEnumIDicEnumget_Key = new DictionaryEnumeratorIDictionaryEnumeratorget_Key();
+ TestLibrary.TestFramework.BeginTestCase("DictionaryEnumeratorIDictionaryEnumeratorget_Key");
+ if (dicEnumIDicEnumget_Key.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Return the property get_Key in the IDictionaryEnumerator 1");
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("str1", "helloworld");
+ Dictionary<string, string>.Enumerator enumer = dictionary.GetEnumerator();
+ IDictionaryEnumerator idicEnumer = (IDictionaryEnumerator)enumer;
+ if (idicEnumer.MoveNext())
+ {
+ object objKey = idicEnumer.Key;
+ if (objKey.ToString() != "str1")
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Return the property get_Key in the IDictionaryEnumerator 2");
+ try
+ {
+ Dictionary<TestClass, TestClass> dictionary = new Dictionary<TestClass, TestClass>();
+ TestClass Tkey1 = new TestClass();
+ TestClass TVal1 = new TestClass();
+ dictionary.Add(Tkey1, TVal1);
+ Dictionary<TestClass, TestClass>.Enumerator enumer = dictionary.GetEnumerator();
+ IDictionaryEnumerator idicEnumer = (IDictionaryEnumerator)enumer;
+ if (idicEnumer.MoveNext())
+ {
+ object objKey = idicEnumer.Key;
+ if (!objKey.Equals(Tkey1))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The enumerator is positioned before the first element of the collection");
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("str1", "helloworld");
+ Dictionary<string, string>.Enumerator enumer = dictionary.GetEnumerator();
+ IDictionaryEnumerator idicEnumer = (IDictionaryEnumerator)enumer;
+ object objKey = idicEnumer.Key;
+ TestLibrary.TestFramework.LogError("N001", "The enumerator is positioned before the first element of the collection but not throw exception");
+ retVal = false;
+ }
+ catch (InvalidOperationException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:The enumerator is positioned after the last element of the collection");
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("str1", "helloworld");
+ Dictionary<string, string>.Enumerator enumer = dictionary.GetEnumerator();
+ IDictionaryEnumerator idicEnumer = (IDictionaryEnumerator)enumer;
+ if (idicEnumer.MoveNext())
+ {
+ DictionaryEntry entryVal1 = idicEnumer.Entry;
+ }
+ if (!idicEnumer.MoveNext())
+ {
+ object objKey = idicEnumer.Key;
+ TestLibrary.TestFramework.LogError("N003", "The enumerator is positioned after the last element of the collection but not throw exception");
+ retVal = false;
+ }
+ }
+ catch (InvalidOperationException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass
+ {
+
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratoridictionaryenumeratorget_value.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratoridictionaryenumeratorget_value.cs
new file mode 100644
index 0000000000..f8c6dc1b98
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratoridictionaryenumeratorget_value.cs
@@ -0,0 +1,157 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Collections;
+/// <summary>
+/// DictionaryEnumerator.IDictionaryEnumerator.get_Value
+/// </summary>
+public class DictionaryEnumeratorIDictionaryEnumeratorget_Value
+{
+ public static int Main()
+ {
+ DictionaryEnumeratorIDictionaryEnumeratorget_Value dicEnumIDicEnumget_Value = new DictionaryEnumeratorIDictionaryEnumeratorget_Value();
+ TestLibrary.TestFramework.BeginTestCase("DictionaryEnumeratorIDictionaryEnumeratorget_Value");
+ if (dicEnumIDicEnumget_Value.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Return the property get_Value in the IDictionaryEnumerator 1");
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("str1", "helloworld");
+ Dictionary<string, string>.Enumerator enumer = dictionary.GetEnumerator();
+ IDictionaryEnumerator idicEnumer = (IDictionaryEnumerator)enumer;
+ if (idicEnumer.MoveNext())
+ {
+ object objVal = idicEnumer.Value;
+ if (objVal.ToString() != "helloworld")
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Return the property get_Value in the IDictionaryEnumerator 2");
+ try
+ {
+ Dictionary<TestClass, TestClass> dictionary = new Dictionary<TestClass, TestClass>();
+ TestClass Tkey1 = new TestClass();
+ TestClass TVal1 = new TestClass();
+ dictionary.Add(Tkey1, TVal1);
+ Dictionary<TestClass, TestClass>.Enumerator enumer = dictionary.GetEnumerator();
+ IDictionaryEnumerator idicEnumer = (IDictionaryEnumerator)enumer;
+ if (idicEnumer.MoveNext())
+ {
+ object objVal = idicEnumer.Value;
+ if (!objVal.Equals(TVal1))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The enumerator is positioned before the first element of the collection");
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("str1", "helloworld");
+ Dictionary<string, string>.Enumerator enumer = dictionary.GetEnumerator();
+ IDictionaryEnumerator idicEnumer = (IDictionaryEnumerator)enumer;
+ object objVal = idicEnumer.Value;
+ TestLibrary.TestFramework.LogError("N001", "The enumerator is positioned before the first element of the collection but not throw exception");
+ retVal = false;
+ }
+ catch (InvalidOperationException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:The enumerator is positioned after the last element of the collection");
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("str1", "helloworld");
+ Dictionary<string, string>.Enumerator enumer = dictionary.GetEnumerator();
+ IDictionaryEnumerator idicEnumer = (IDictionaryEnumerator)enumer;
+ if (idicEnumer.MoveNext())
+ {
+ DictionaryEntry entryVal1 = idicEnumer.Entry;
+ }
+ if (!idicEnumer.MoveNext())
+ {
+ object objValue = idicEnumer.Value;
+ TestLibrary.TestFramework.LogError("N003", "The enumerator is positioned after the last element of the collection but not throw exception");
+ retVal = false;
+ }
+ }
+ catch (InvalidOperationException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass
+ {
+
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratorienumeratorget_current.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratorienumeratorget_current.cs
new file mode 100644
index 0000000000..a20ba9f8ce
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratorienumeratorget_current.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Collections;
+/// <summary>
+/// DictionaryEnumerator.IEnumerator.get_Current
+/// </summary>
+public class DictionaryEnumeratorIEnumeratorget_Current
+{
+ public static int Main()
+ {
+ DictionaryEnumeratorIEnumeratorget_Current dicEnumIDicEnumget_Current = new DictionaryEnumeratorIEnumeratorget_Current();
+ TestLibrary.TestFramework.BeginTestCase("DictionaryEnumeratorIEnumeratorget_Current");
+ if (dicEnumIDicEnumget_Current.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Return the property get_Current in the IEnumerator 1");
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("str1", "helloworld");
+ Dictionary<string, string>.Enumerator enumer = dictionary.GetEnumerator();
+ IEnumerator iEnumer = (IEnumerator)enumer;
+ while (iEnumer.MoveNext())
+ {
+ object objCurrent = iEnumer.Current;
+ KeyValuePair<string, string> keyVal = new KeyValuePair<string, string>("str1", "helloworld");
+ if (!objCurrent.Equals(keyVal))
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Return the property get_Current in the IEnumerator 2");
+ try
+ {
+ Dictionary<TestClass, TestClass> dictionary = new Dictionary<TestClass, TestClass>();
+ TestClass Tkey1 = new TestClass();
+ TestClass TVal1 = new TestClass();
+ dictionary.Add(Tkey1, TVal1);
+ Dictionary<TestClass, TestClass>.Enumerator enumer = dictionary.GetEnumerator();
+ IEnumerator iEnumer = (IEnumerator)enumer;
+ while(iEnumer.MoveNext())
+ {
+ object objCurrent = iEnumer.Current;
+ KeyValuePair<TestClass, TestClass> keyVal = new KeyValuePair<TestClass, TestClass>(Tkey1, TVal1);
+ if (!objCurrent.Equals(keyVal))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The enumerator is positioned before the first element of the collection");
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("str1", "helloworld");
+ Dictionary<string, string>.Enumerator enumer = dictionary.GetEnumerator();
+ IEnumerator iEnumer = (IEnumerator)enumer;
+ object objCurrent = iEnumer.Current;
+ TestLibrary.TestFramework.LogError("N001", "The enumerator is positioned before the first element of the collection but not throw exception");
+ retVal = false;
+ }
+ catch (InvalidOperationException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:The enumerator is positioned after the last element of the collection");
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("str1", "helloworld");
+ Dictionary<string, string>.Enumerator enumer = dictionary.GetEnumerator();
+ IEnumerator iEnumer = (IEnumerator)enumer;
+ while (iEnumer.MoveNext()) { }
+ object objCurrent = iEnumer.Current;
+ TestLibrary.TestFramework.LogError("N003", "The enumerator is positioned after the last element of the collection but not throw exception");
+ retVal = false;
+ }
+ catch (InvalidOperationException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass
+ {
+
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratorienumeratorreset.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratorienumeratorreset.cs
new file mode 100644
index 0000000000..24e7a4166d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratorienumeratorreset.cs
@@ -0,0 +1,124 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Collections;
+/// <summary>
+/// DictionaryEnumerator.IEnumerator.Reset()
+/// </summary>
+public class DictionaryEnumeratorIEnumeratorReset
+{
+ public static int Main()
+ {
+ DictionaryEnumeratorIEnumeratorReset dicEnumIEnumReset = new DictionaryEnumeratorIEnumeratorReset();
+ TestLibrary.TestFramework.BeginTestCase("DictionaryEnumeratorIEnumeratorReset");
+ if (dicEnumIEnumReset.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Invoke the method Reset in the IEnumerator 1");
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("str1", "helloworld");
+ dictionary.Add("str2", "goodluck");
+ Dictionary<string, string>.Enumerator enumer = dictionary.GetEnumerator();
+ IEnumerator iEnumer = (IEnumerator)enumer;
+ while (iEnumer.MoveNext()) { }
+ iEnumer.Reset();
+ if (iEnumer.MoveNext())
+ {
+ KeyValuePair<string, string> keyVal3 = (KeyValuePair<string, string>)iEnumer.Current;
+ if (keyVal3.Key != "str1" || keyVal3.Value != "helloworld")
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Invoke the method Reset in the IEnumerator 2");
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("str1", "helloworld");
+ Dictionary<string, string>.Enumerator enumer = dictionary.GetEnumerator();
+ IEnumerator iEnumer = (IEnumerator)enumer;
+ while (iEnumer.MoveNext()) { }
+ iEnumer.Reset();
+ while (iEnumer.MoveNext())
+ {
+ KeyValuePair<string, string> keyVal1 = (KeyValuePair<string, string>)iEnumer.Current;
+ if (keyVal1.Key != "str1" || keyVal1.Value != "helloworld")
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The collection was modified after the enumerator was created");
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ Dictionary<string, string>.Enumerator enumer = dictionary.GetEnumerator();
+ IEnumerator iEnumer = (IEnumerator)enumer;
+ dictionary.Add("str1", "helloworld");
+ iEnumer.Reset();
+ TestLibrary.TestFramework.LogError("N001", "The collection was modified after the enumerator was created but not throw exception");
+ retVal = false;
+ }
+ catch (InvalidOperationException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratormovenext.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratormovenext.cs
new file mode 100644
index 0000000000..0258514fb4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryenumerator/dictionaryenumeratormovenext.cs
@@ -0,0 +1,145 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+/// <summary>
+/// Dictionary.Enumerator.MoveNext()
+/// </summary>
+public class DictionaryEnumeratorMoveNext
+{
+ public static int Main()
+ {
+ DictionaryEnumeratorMoveNext dicEnumMoveNext = new DictionaryEnumeratorMoveNext();
+ TestLibrary.TestFramework.BeginTestCase("DictionaryEnumeratorMoveNext");
+ if (dicEnumMoveNext.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Invoke the MoveNext method of in the Dictionary Enumerator 1");
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("str1", "helloworld");
+ Dictionary<string, string>.Enumerator enumer = dictionary.GetEnumerator();
+ bool boolVal = enumer.MoveNext();
+ if (!boolVal)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Invoke the MoveNext method of in the Dictionary Enumerator 2");
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("str1", "helloworld");
+ Dictionary<string, string>.Enumerator enumer = dictionary.GetEnumerator();
+ bool boolVal1 = enumer.MoveNext();
+ bool boolVal2 = enumer.MoveNext();
+ if (boolVal1 != true || boolVal2 != false)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Invoke the MoveNext method of in the Dictionary Enumerator 3");
+ try
+ {
+ Dictionary<TestClass,TestClass> dictionary = new Dictionary<TestClass,TestClass>();
+ TestClass TKey1 = new TestClass();
+ TestClass TVal1 = new TestClass();
+ dictionary.Add(TKey1,TVal1);
+ Dictionary<TestClass,TestClass>.Enumerator enumer = dictionary.GetEnumerator();
+ bool boolVal1 = enumer.MoveNext();
+ bool boolVal2 = enumer.MoveNext();
+ if (boolVal1 != true || boolVal2 != false)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("The collection was modified after the enumerator was created");
+ try
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary.Add("str1", "helloworld");
+ Dictionary<string, string>.Enumerator enumer = dictionary.GetEnumerator();
+ bool boolVal1 = enumer.MoveNext();
+ dictionary.Add("str2", "goodluck");
+ bool boolVal2 = enumer.MoveNext();
+ TestLibrary.TestFramework.LogError("N001", "The collection was modified after the enumerator was created but not throw exception");
+ retVal = false;
+ }
+ catch (InvalidOperationException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass
+ {
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/GenericICollectionRemove.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/GenericICollectionRemove.csproj
new file mode 100644
index 0000000000..f992de3e66
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/GenericICollectionRemove.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="systemcollectionsgenericicollectionremove.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/ICollectionIsSynchronized.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/ICollectionIsSynchronized.csproj
new file mode 100644
index 0000000000..74eb50bf0d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/ICollectionIsSynchronized.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="systemcollectionsicollectionissynchronized.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/ICollectionSyncRoot.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/ICollectionSyncRoot.csproj
new file mode 100644
index 0000000000..12b77ae097
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/ICollectionSyncRoot.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="systemcollectionsicollectionsyncroot.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/IEnumerableGetEnumerator.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/IEnumerableGetEnumerator.csproj
new file mode 100644
index 0000000000..43cec70bca
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/IEnumerableGetEnumerator.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="systemcollectionsienumerablegetenumerator.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/KeyCollectionCopyTo.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/KeyCollectionCopyTo.csproj
new file mode 100644
index 0000000000..25e2cf3788
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/KeyCollectionCopyTo.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="keycollectioncopyto.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/KeyCollectionCount.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/KeyCollectionCount.csproj
new file mode 100644
index 0000000000..ff271ee0b4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/KeyCollectionCount.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="keycollectioncount.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/KeyCollectionCtor.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/KeyCollectionCtor.csproj
new file mode 100644
index 0000000000..3038b56c5a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/KeyCollectionCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="keycollectionctor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/KeyCollectionGetEnumerator.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/KeyCollectionGetEnumerator.csproj
new file mode 100644
index 0000000000..3e3537bd27
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/KeyCollectionGetEnumerator.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="keycollectiongetenumerator.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollGenICollIsReadOnly.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollGenICollIsReadOnly.csproj
new file mode 100644
index 0000000000..7a0536dd6e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollGenICollIsReadOnly.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="systemcollectionsgenericicollectionisreadonly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollGenIEnumGetEnumerator.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollGenIEnumGetEnumerator.csproj
new file mode 100644
index 0000000000..6a2ed5c0ed
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollGenIEnumGetEnumerator.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="systemcollectionsgenericienumerablegetenumerator.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollGenericICollClear.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollGenericICollClear.csproj
new file mode 100644
index 0000000000..ede45295eb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollGenericICollClear.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="systemcollectionsgenericicollectionclear.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollGenericICollContains.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollGenericICollContains.csproj
new file mode 100644
index 0000000000..69ecdfbd71
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollGenericICollContains.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="systemcollectionsgenericicollectioncontains.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollGenericICollectionAdd.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollGenericICollectionAdd.csproj
new file mode 100644
index 0000000000..4fc3d55087
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollGenericICollectionAdd.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="systemcollectionsgenericicollectionadd.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollectionsICollectionCopyTo.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollectionsICollectionCopyTo.csproj
new file mode 100644
index 0000000000..72038f9a6f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/SystemCollectionsICollectionCopyTo.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="systemcollectionsicollectioncopyto.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/keycollectioncopyto.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/keycollectioncopyto.cs
new file mode 100644
index 0000000000..f8bdfe20a3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/keycollectioncopyto.cs
@@ -0,0 +1,229 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// Dictionary.KeyCollection.CopyTo(TKey[],Int32)
+/// </summary>
+public class KeyCollectionCopyTo
+{
+ private const int SIZE = 10;
+ public static int Main()
+ {
+ KeyCollectionCopyTo keycollectCopyTo = new KeyCollectionCopyTo();
+ TestLibrary.TestFramework.BeginTestCase("KeyCollectionCopyTo");
+ if (keycollectCopyTo.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method CopyTo in the KeyCollection 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str2", "Test2");
+ Dictionary<string, string>.KeyCollection keys = new Dictionary<string, string>.KeyCollection(dic);
+ string[] TKeys = new string[SIZE];
+ keys.CopyTo(TKeys, 0);
+ string strKeys = null;
+ for (int i = 0; i < TKeys.Length; i++)
+ {
+ if (TKeys[i] != null)
+ {
+ strKeys += TKeys[i].ToString();
+ }
+ }
+ if (TKeys[0].ToString() != "str1" || TKeys[1].ToString() != "str2" || strKeys != "str1str2")
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the method CopyTo in the KeyCollection 2");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str2", "Test2");
+ Dictionary<string, string>.KeyCollection keys = new Dictionary<string, string>.KeyCollection(dic);
+ string[] TKeys = new string[SIZE];
+ keys.CopyTo(TKeys, 5);
+ string strKeys = null;
+ for (int i = 0; i < TKeys.Length; i++)
+ {
+ if (TKeys[i] != null)
+ {
+ strKeys += TKeys[i].ToString();
+ }
+ }
+ if (TKeys[5].ToString() != "str1" || TKeys[6].ToString() != "str2" || strKeys != "str1str2")
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke the method CopyTo in the KeyCollection 3");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ Dictionary<string, string>.KeyCollection keys = new Dictionary<string, string>.KeyCollection(dic);
+ string[] TKeys = new string[SIZE];
+ keys.CopyTo(TKeys, 0);
+ for (int i = 0; i < TKeys.Length; i++)
+ {
+ if (TKeys[i] != null)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The argument array is null");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ Dictionary<string, string>.KeyCollection keys = new Dictionary<string, string>.KeyCollection(dic);
+ string[] TKeys = null;
+ keys.CopyTo(TKeys, 0);
+ TestLibrary.TestFramework.LogError("N001", "The argument array is null but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:The argument index is less than zero");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ Dictionary<string, string>.KeyCollection keys = new Dictionary<string, string>.KeyCollection(dic);
+ string[] TKeys = new string[SIZE];
+ int index = -1;
+ keys.CopyTo(TKeys, index);
+ TestLibrary.TestFramework.LogError("N003", "The argument index is less than zero but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3:The argument index is larger than array length");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ Dictionary<string, string>.KeyCollection keys = new Dictionary<string, string>.KeyCollection(dic);
+ string[] TKeys = new string[SIZE];
+ int index = SIZE + 1;
+ keys.CopyTo(TKeys, index);
+ TestLibrary.TestFramework.LogError("N005", "The argument index is larger than array length but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4:The number of elements in the source Dictionary.KeyCollection is greater than the available space from index to the end of the destination array");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str1", "Test1");
+ Dictionary<string, string>.KeyCollection keys = new Dictionary<string, string>.KeyCollection(dic);
+ string[] TKeys = new string[SIZE];
+ int index = SIZE - 1;
+ keys.CopyTo(TKeys, index);
+ TestLibrary.TestFramework.LogError("N007", "The ExpectResult should throw exception but the ActualResult not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/keycollectioncount.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/keycollectioncount.cs
new file mode 100644
index 0000000000..ba8bffa827
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/keycollectioncount.cs
@@ -0,0 +1,84 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// Dictionary.KeyCollection.Count
+/// </summary>
+public class KeyCollectionCount
+{
+ public static int Main()
+ {
+ KeyCollectionCount keycollectCount = new KeyCollectionCount();
+ TestLibrary.TestFramework.BeginTestCase("KeyCollectionCount");
+ if (keycollectCount.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the property Count of KeyCollection 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str2", "Test2");
+ Dictionary<string, string>.KeyCollection keys = new Dictionary<string, string>.KeyCollection(dic);
+ int intCount = keys.Count;
+ if (intCount != dic.Count)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the property Count of KeyCollection 2");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ Dictionary<string, string>.KeyCollection keys = new Dictionary<string, string>.KeyCollection(dic);
+ int intCount = keys.Count;
+ if (intCount != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/keycollectionctor.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/keycollectionctor.cs
new file mode 100644
index 0000000000..47eafb04d0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/keycollectionctor.cs
@@ -0,0 +1,107 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// Dictionary.KeyCollection.ctor(Dictionary<TKey,TValue>)
+/// </summary>
+public class KeyCollectionCtor
+{
+ public static int Main()
+ {
+ KeyCollectionCtor keycollectCtor = new KeyCollectionCtor();
+ TestLibrary.TestFramework.BeginTestCase("KeyCollectionCtor");
+ if (keycollectCtor.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Initialize the generic class KeyCollection 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ Dictionary<string,string>.KeyCollection keyCollect = new Dictionary<string,string>.KeyCollection(dic);
+ if (keyCollect == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Initialize the generic class KeyCollection 2");
+ try
+ {
+ Dictionary<TestClass,TestClass> dic = new Dictionary<TestClass,TestClass>();
+ Dictionary<TestClass,TestClass>.KeyCollection keyCollect = new Dictionary<TestClass,TestClass>.KeyCollection(dic);
+ if (keyCollect == null)
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:the argument dictionary is null");
+ try
+ {
+ Dictionary<object, object>.KeyCollection keyCollect = new Dictionary<object, object>.KeyCollection(null);
+ TestLibrary.TestFramework.LogError("N001", "the argument dictionary is null but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass
+ {
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/keycollectiongetenumerator.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/keycollectiongetenumerator.cs
new file mode 100644
index 0000000000..eb259a922b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/keycollectiongetenumerator.cs
@@ -0,0 +1,101 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// Dictionary.KeyCollection.GetEnumerator()
+/// </summary>
+public class KeyCollectionGetEnumerator
+{
+ public static int Main()
+ {
+ KeyCollectionGetEnumerator keycollectGetEnum = new KeyCollectionGetEnumerator();
+ TestLibrary.TestFramework.BeginTestCase("KeyCollectionGetEnumerator");
+ if (keycollectGetEnum.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method GetEnumerator in KeyCollection 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str2", "Test2");
+ Dictionary<string, string>.KeyCollection keys = new Dictionary<string, string>.KeyCollection(dic);
+ Dictionary<string, string>.KeyCollection.Enumerator enumer = keys.GetEnumerator();
+ Dictionary<string, string>.Enumerator dicEnumer = dic.GetEnumerator();
+ while (enumer.MoveNext() && dicEnumer.MoveNext())
+ {
+ if (!enumer.Current.Equals(dicEnumer.Current.Key))
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the method GetEnumerator in KeyCollection 2");
+ try
+ {
+ Dictionary<TestClass,TestClass> dic = new Dictionary<TestClass,TestClass>();
+ TestClass TKey1 = new TestClass();
+ TestClass TVal1 = new TestClass();
+ TestClass TKey2 = new TestClass();
+ TestClass TVal2 = new TestClass();
+ dic.Add(TKey1,TVal1);
+ dic.Add(TKey2,TVal2);
+ Dictionary<TestClass, TestClass>.KeyCollection keys = new Dictionary<TestClass, TestClass>.KeyCollection(dic);
+ Dictionary<TestClass, TestClass>.KeyCollection.Enumerator enumer = keys.GetEnumerator();
+ Dictionary<TestClass,TestClass>.Enumerator dicEnumer = dic.GetEnumerator();
+ while (enumer.MoveNext() && dicEnumer.MoveNext())
+ {
+ if (!enumer.Current.Equals(dicEnumer.Current.Key))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass { }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericicollectionadd.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericicollectionadd.cs
new file mode 100644
index 0000000000..f4fa731118
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericicollectionadd.cs
@@ -0,0 +1,58 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// Dictionary.KeyCollection.System.Collections.Generic.ICollection.Add(TKey)
+/// </summary>
+public class SystemCollectionsGenericICollectionAdd
+{
+ public static int Main()
+ {
+ SystemCollectionsGenericICollectionAdd keycollectICollectionAdd = new SystemCollectionsGenericICollectionAdd();
+ TestLibrary.TestFramework.BeginTestCase("SystemCollectionsGenericICollectionAdd");
+ if (keycollectICollectionAdd.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Invoke the method Add in ICollection");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ Dictionary<string, string>.KeyCollection keyCollect = new Dictionary<string, string>.KeyCollection(dic);
+ ICollection<string> icollect = (ICollection<string>)keyCollect;
+ icollect.Add("str1");
+ TestLibrary.TestFramework.LogError("N001", "The ExpectResult should throw exception but the ActualResult not throw exception");
+ retVal = false;
+ }
+ catch (NotSupportedException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericicollectionclear.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericicollectionclear.cs
new file mode 100644
index 0000000000..d7c4f75467
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericicollectionclear.cs
@@ -0,0 +1,60 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// Dictionary.KeyCollection.System.Collections.Generic.ICollection.Clear()
+/// </summary>
+public class SystemCollectionsGenericICollectionClear
+{
+ public static int Main()
+ {
+ SystemCollectionsGenericICollectionClear keycollectICollectionClear = new SystemCollectionsGenericICollectionClear();
+ TestLibrary.TestFramework.BeginTestCase("SystemCollectionsGenericICollectionClear");
+ if (keycollectICollectionClear.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Invoke the method Clear in ICollection");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str2", "Test2");
+ Dictionary<string, string>.KeyCollection keyCollect = new Dictionary<string, string>.KeyCollection(dic);
+ ICollection<string> icollect = (ICollection<string>)keyCollect;
+ icollect.Clear();
+ TestLibrary.TestFramework.LogError("N001", "The ExpectResult should throw exception but the ActualResult not throw exception");
+ retVal = false;
+ }
+ catch (NotSupportedException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericicollectioncontains.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericicollectioncontains.cs
new file mode 100644
index 0000000000..c16b5af83f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericicollectioncontains.cs
@@ -0,0 +1,90 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// Dictionary.KeyCollection.System.Collections.Generic.ICollection.Contains()
+/// </summary>
+public class SystemCollectionsGenericICollectionContains
+{
+ public static int Main()
+ {
+ SystemCollectionsGenericICollectionContains keycollectICollectionContains = new SystemCollectionsGenericICollectionContains();
+ TestLibrary.TestFramework.BeginTestCase("SystemCollectionsGenericICollectionContains");
+ if (keycollectICollectionContains.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method Contains in ICollection 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str2", "Test2");
+ Dictionary<string, string>.KeyCollection keyCollect = new Dictionary<string, string>.KeyCollection(dic);
+ ICollection<string> icollect = (ICollection<string>)keyCollect;
+ if (!icollect.Contains("str1") || !icollect.Contains("str2") || icollect.Contains("str3"))
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the method Contains in ICollection 2");
+ try
+ {
+ Dictionary<TestClass, TestClass> dic = new Dictionary<TestClass, TestClass>();
+ TestClass Tkey1 = new TestClass();
+ TestClass Tval1 = new TestClass();
+ dic.Add(Tkey1,Tval1);
+ Dictionary<TestClass, TestClass>.KeyCollection keyCollect = new Dictionary<TestClass, TestClass>.KeyCollection(dic);
+ ICollection<TestClass> icollect = (ICollection<TestClass>)keyCollect;
+ if (!icollect.Contains(Tkey1) || icollect.Contains(Tval1))
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass { }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericicollectionisreadonly.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericicollectionisreadonly.cs
new file mode 100644
index 0000000000..53002964d4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericicollectionisreadonly.cs
@@ -0,0 +1,84 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// Dictionary.KeyCollection.System.Collections.Generic.ICollection.IsReadOnly
+/// </summary>
+public class SystemCollectionsGenericICollectionIsReadOnly
+{
+ public static int Main()
+ {
+ SystemCollectionsGenericICollectionIsReadOnly keycollectICollectionIsReadOnly = new SystemCollectionsGenericICollectionIsReadOnly();
+ TestLibrary.TestFramework.BeginTestCase("SystemCollectionsGenericICollectionIsReadOnly");
+ if (keycollectICollectionIsReadOnly.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the property IsReadOnly in the Generic ICollection 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ ICollection<string> icollect = (ICollection<string>)new Dictionary<string, string>.KeyCollection(dic);
+ if (!icollect.IsReadOnly)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the property IsReadOnly in the Generic ICollection 2");
+ try
+ {
+ Dictionary<TestClass, TestClass> dic = new Dictionary<TestClass, TestClass>();
+ ICollection<TestClass> icollect = (ICollection<TestClass>)new Dictionary<TestClass, TestClass>.KeyCollection(dic);
+ if (!icollect.IsReadOnly)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass { }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericicollectionremove.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericicollectionremove.cs
new file mode 100644
index 0000000000..e45329a7fa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericicollectionremove.cs
@@ -0,0 +1,59 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// Dictionary.KeyCollection.System.Collections.Generic.ICollection.Remove(TKey)
+/// </summary>
+public class SystemCollectionsGenericICollectionRemove
+{
+ public static int Main()
+ {
+ SystemCollectionsGenericICollectionRemove keycollectICollectionRemove = new SystemCollectionsGenericICollectionRemove();
+ TestLibrary.TestFramework.BeginTestCase("SystemCollectionsGenericICollectionRemove");
+ if (keycollectICollectionRemove.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Invoke the method Remove in ICollection 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ Dictionary<string, string>.KeyCollection keyCollect = new Dictionary<string, string>.KeyCollection(dic);
+ ICollection<string> icollect = (ICollection<string>)keyCollect;
+ bool boolVal = icollect.Remove("str1");
+ TestLibrary.TestFramework.LogError("N001", "The ExpectResult should throw exception but the ActualResult not throw exception");
+ retVal = false;
+ }
+ catch (NotSupportedException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericienumerablegetenumerator.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericienumerablegetenumerator.cs
new file mode 100644
index 0000000000..70ca0120fc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsgenericienumerablegetenumerator.cs
@@ -0,0 +1,101 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// Dictionary.KeyCollection.System.Collections.Generic.IEnumerable.GetEnumerator()
+/// </summary>
+public class SystemCollectionsGenericIEnumerableGetEnumerator
+{
+ public static int Main()
+ {
+ SystemCollectionsGenericIEnumerableGetEnumerator keycollectGenericIEnumerableGetEnumerator = new SystemCollectionsGenericIEnumerableGetEnumerator();
+ TestLibrary.TestFramework.BeginTestCase("SystemCollectionsGenericIEnumerableGetEnumerator");
+ if (keycollectGenericIEnumerableGetEnumerator.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method GetEnumerator in Generic IEnumerable 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str2", "Test2");
+ IEnumerable<string> ienumer = (IEnumerable<string>)new Dictionary<string, string>.KeyCollection(dic);
+ IEnumerator<string> ienumerator = ienumer.GetEnumerator();
+ Dictionary<string, string>.Enumerator dicEnumer = dic.GetEnumerator();
+ while (ienumerator.MoveNext() && dicEnumer.MoveNext())
+ {
+ if (!ienumerator.Current.Equals(dicEnumer.Current.Key))
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the method GetEnumerator in Generic IEnumerable 2");
+ try
+ {
+ Dictionary<TestClass, TestClass> dic = new Dictionary<TestClass, TestClass>();
+ TestClass TKey1 = new TestClass();
+ TestClass TVal1 = new TestClass();
+ TestClass TKey2 = new TestClass();
+ TestClass TVal2 = new TestClass();
+ dic.Add(TKey1, TVal1);
+ dic.Add(TKey2, TVal2);
+ IEnumerable<TestClass> ienumer = (IEnumerable<TestClass>)new Dictionary<TestClass, TestClass>.KeyCollection(dic);
+ IEnumerator<TestClass> ienumerator = ienumer.GetEnumerator();
+ Dictionary<TestClass, TestClass>.Enumerator dicEnumer = dic.GetEnumerator();
+ while (ienumerator.MoveNext() && dicEnumer.MoveNext())
+ {
+ if (!ienumerator.Current.Equals(dicEnumer.Current.Key))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass { }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsicollectioncopyto.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsicollectioncopyto.cs
new file mode 100644
index 0000000000..dc94d07940
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsicollectioncopyto.cs
@@ -0,0 +1,276 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Collections;
+/// <summary>
+/// Dictionary.KeyCollection.System.Collections.ICollection.CopyTo(Array,Int32)
+/// </summary>
+public class SystemCollectionsICollectionCopyTo
+{
+ private const int SIZE = 10;
+ public static int Main()
+ {
+ SystemCollectionsICollectionCopyTo keycollectICollectionCopyTo = new SystemCollectionsICollectionCopyTo();
+ TestLibrary.TestFramework.BeginTestCase("SystemCollectionsICollectionCopyTo");
+ if (keycollectICollectionCopyTo.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method CopyTo in the ICollection 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str2", "Test2");
+ ICollection icollect = (ICollection)new Dictionary<string, string>.KeyCollection(dic);
+ string[] TKeys = new string[SIZE];
+ icollect.CopyTo(TKeys, 0);
+ string strKeys = null;
+ for (int i = 0; i < TKeys.Length; i++)
+ {
+ if (TKeys[i] != null)
+ {
+ strKeys += TKeys[i].ToString();
+ }
+ }
+ if (TKeys[0].ToString() != "str1" || TKeys[1].ToString() != "str2" || strKeys != "str1str2")
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the method CopyTo in the ICollection 2");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str2", "Test2");
+ ICollection icollect = (ICollection)new Dictionary<string, string>.KeyCollection(dic);
+ string[] TKeys = new string[SIZE];
+ icollect.CopyTo(TKeys, 5);
+ string strKeys = null;
+ for (int i = 0; i < TKeys.Length; i++)
+ {
+ if (TKeys[i] != null)
+ {
+ strKeys += TKeys[i].ToString();
+ }
+ }
+ if (TKeys[5].ToString() != "str1" || TKeys[6].ToString() != "str2" || strKeys != "str1str2")
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke the method CopyTo in the ICollection 3");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ ICollection icollect = (ICollection)new Dictionary<string, string>.KeyCollection(dic);
+ string[] TKeys = new string[SIZE];
+ icollect.CopyTo(TKeys, 0);
+ for (int i = 0; i < TKeys.Length; i++)
+ {
+ if (TKeys[i] != null)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The argument array is null");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ ICollection icollect = (ICollection)new Dictionary<string, string>.KeyCollection(dic);
+ string[] TKeys = null;
+ icollect.CopyTo(TKeys, 0);
+ TestLibrary.TestFramework.LogError("N001", "The argument array is null but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:The argument index is less than zero");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ ICollection icollect = (ICollection)new Dictionary<string, string>.KeyCollection(dic);
+ string[] TKeys = new string[SIZE];
+ int index = -1;
+ icollect.CopyTo(TKeys, index);
+ TestLibrary.TestFramework.LogError("N003", "The argument index is less than zero but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3:The argument index is larger than array length");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ ICollection icollect = (ICollection)new Dictionary<string, string>.KeyCollection(dic);
+ string[] TKeys = new string[SIZE];
+ int index = SIZE + 1;
+ icollect.CopyTo(TKeys, index);
+ TestLibrary.TestFramework.LogError("N005", "The argument index is larger than array length but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4:The number of elements in the source ICollection is greater than the available space from index to the end of the destination array");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str1", "Test1");
+ ICollection icollect = (ICollection)new Dictionary<string, string>.KeyCollection(dic);
+ string[] TKeys = new string[SIZE];
+ int index = SIZE - 1;
+ icollect.CopyTo(TKeys, index);
+ TestLibrary.TestFramework.LogError("N007", "The ExpectResult should throw exception but the ActualResult not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest5:The type of ICollection not cast automatically to the type of array");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ ICollection icollect = (ICollection)new Dictionary<string, string>.KeyCollection(dic);
+ int[] TKeys = new int[SIZE];
+ icollect.CopyTo(TKeys, 0);
+ TestLibrary.TestFramework.LogError("N009", "The type of ICollection not cast automatically to the type of array but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest6:The array is multidimentional");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ ICollection icollect = (ICollection)new Dictionary<string, string>.KeyCollection(dic);
+ int[,] TKeys = new int[1,2];
+ icollect.CopyTo(TKeys, 0);
+ TestLibrary.TestFramework.LogError("N011", "The array is multidimentional but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N012", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsicollectionissynchronized.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsicollectionissynchronized.cs
new file mode 100644
index 0000000000..e3433b1189
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsicollectionissynchronized.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Collections;
+/// <summary>
+/// Dictionary.KeyCollection.System.Collections.ICollection.IsSynchronized
+/// </summary>
+public class SystemCollectionsICollectionIsSynchronized
+{
+ public static int Main()
+ {
+ SystemCollectionsICollectionIsSynchronized keycollectICollectionIsSynchronized = new SystemCollectionsICollectionIsSynchronized();
+ TestLibrary.TestFramework.BeginTestCase("SystemCollectionsICollectionIsSynchronized");
+ if (keycollectICollectionIsSynchronized.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true; ;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the property IsSynchronized in the ICollection 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ ICollection icollect = (ICollection)new Dictionary<string, string>.KeyCollection(dic);
+ if (icollect.IsSynchronized)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the property IsSynchronized in the ICollection 2");
+ try
+ {
+ Dictionary<TestClass,TestClass> dic = new Dictionary<TestClass,TestClass>();
+ ICollection icollect = (ICollection)new Dictionary<TestClass,TestClass>.KeyCollection(dic);
+ if (icollect.IsSynchronized)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass { }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsicollectionsyncroot.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsicollectionsyncroot.cs
new file mode 100644
index 0000000000..93b4e28c98
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsicollectionsyncroot.cs
@@ -0,0 +1,87 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Collections;
+/// <summary>
+/// Dictionary.KeyCollection.System.Collections.ICollection.SyncRoot
+/// </summary>
+public class SystemCollectionsICollectionSyncRoot
+{
+ public static int Main()
+ {
+ SystemCollectionsICollectionSyncRoot keycollectICollectionSyncRoot = new SystemCollectionsICollectionSyncRoot();
+ TestLibrary.TestFramework.BeginTestCase("SystemCollectionsICollectionSyncRoot");
+ if (keycollectICollectionSyncRoot.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the property SyncRoot in the ICollection 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ ICollection icollect = (ICollection)new Dictionary<string, string>.KeyCollection(dic);
+ object objVal = icollect.SyncRoot;
+ if (objVal == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the property SyncRoot in the ICollection 2");
+ try
+ {
+ Dictionary<TestClass, TestClass> dic = new Dictionary<TestClass, TestClass>();
+ ICollection icollect = (ICollection)new Dictionary<TestClass, TestClass>.KeyCollection(dic);
+ object objVal = icollect.SyncRoot;
+ if (objVal == null)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass { }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsienumerablegetenumerator.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsienumerablegetenumerator.cs
new file mode 100644
index 0000000000..60ca284027
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionarykeycollection/systemcollectionsienumerablegetenumerator.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Collections;
+/// <summary>
+/// Dictionary.KeyCollection.System.Collections.IEnumerable.GetEnumerator()
+/// </summary>
+public class SystemCollectionsIEnumerableGetEnumerator
+{
+ public static int Main()
+ {
+ SystemCollectionsIEnumerableGetEnumerator keycollectIEnumerableGetEnumerator = new SystemCollectionsIEnumerableGetEnumerator();
+ TestLibrary.TestFramework.BeginTestCase("SystemCollectionsIEnumerableGetEnumerator");
+ if (keycollectIEnumerableGetEnumerator.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method GetEnumerator in IEnumerable 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str2", "Test2");
+ IEnumerable ienumer = (IEnumerable)new Dictionary<string, string>.KeyCollection(dic);
+ IEnumerator ienumerator = ienumer.GetEnumerator();
+ Dictionary<string, string>.Enumerator dicEnumer = dic.GetEnumerator();
+ while (ienumerator.MoveNext() && dicEnumer.MoveNext())
+ {
+ if (!ienumerator.Current.Equals(dicEnumer.Current.Key))
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the method GetEnumerator in IEnumerable 2");
+ try
+ {
+ Dictionary<TestClass, TestClass> dic = new Dictionary<TestClass, TestClass>();
+ TestClass TKey1 = new TestClass();
+ TestClass TVal1 = new TestClass();
+ TestClass TKey2 = new TestClass();
+ TestClass TVal2 = new TestClass();
+ dic.Add(TKey1, TVal1);
+ dic.Add(TKey2, TVal2);
+ IEnumerable ienumer = (IEnumerable)new Dictionary<TestClass, TestClass>.KeyCollection(dic);
+ IEnumerator ienumerator = ienumer.GetEnumerator();
+ Dictionary<TestClass, TestClass>.Enumerator dicEnumer = dic.GetEnumerator();
+ while (ienumerator.MoveNext() && dicEnumer.MoveNext())
+ {
+ if (!ienumerator.Current.Equals(dicEnumer.Current.Key))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass { }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/DictionaryValueCollectionCopyTo.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/DictionaryValueCollectionCopyTo.csproj
new file mode 100644
index 0000000000..f7e9aee460
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/DictionaryValueCollectionCopyTo.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryvaluecollectioncopyto.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/DictionaryValueCollectionCount.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/DictionaryValueCollectionCount.csproj
new file mode 100644
index 0000000000..f60269eef9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/DictionaryValueCollectionCount.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryvaluecollectioncount.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/DictionaryValueCollectionctor.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/DictionaryValueCollectionctor.csproj
new file mode 100644
index 0000000000..18b810bc53
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/DictionaryValueCollectionctor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryvaluecollectionctor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/GenericICollectionIsReadOnly.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/GenericICollectionIsReadOnly.csproj
new file mode 100644
index 0000000000..91375cb26b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/GenericICollectionIsReadOnly.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="valuecollectiongenericicollectionisreadonly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/GenericICollectionRemove.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/GenericICollectionRemove.csproj
new file mode 100644
index 0000000000..addb9b5780
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/GenericICollectionRemove.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="valuecollectiongenericicollectionremove.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/GetEnumerator.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/GetEnumerator.csproj
new file mode 100644
index 0000000000..0b22ba7832
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/GetEnumerator.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryvaluecollectiongetenumerator.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/ICollectionIsSynchronized.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/ICollectionIsSynchronized.csproj
new file mode 100644
index 0000000000..74eb50bf0d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/ICollectionIsSynchronized.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="systemcollectionsicollectionissynchronized.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/IEnumerableGetEnumerator.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/IEnumerableGetEnumerator.csproj
new file mode 100644
index 0000000000..02184f615a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/IEnumerableGetEnumerator.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="valuecollectionienumerablegetenumerator.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/SystemCollICollectionSyncRoot.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/SystemCollICollectionSyncRoot.csproj
new file mode 100644
index 0000000000..12b77ae097
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/SystemCollICollectionSyncRoot.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="systemcollectionsicollectionsyncroot.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/SystemCollectionsICollectionCopyTo.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/SystemCollectionsICollectionCopyTo.csproj
new file mode 100644
index 0000000000..72038f9a6f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/SystemCollectionsICollectionCopyTo.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="systemcollectionsicollectioncopyto.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/ValueCollGenericICollAdd.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/ValueCollGenericICollAdd.csproj
new file mode 100644
index 0000000000..dda53540e5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/ValueCollGenericICollAdd.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="valuecollectiongenericicollectionadd.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/ValueCollGenericICollClear.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/ValueCollGenericICollClear.csproj
new file mode 100644
index 0000000000..5fce9a4036
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/ValueCollGenericICollClear.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="valuecollectiongenericicollectionclear.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/ValueCollGenericICollContains.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/ValueCollGenericICollContains.csproj
new file mode 100644
index 0000000000..2e3a79d993
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/ValueCollGenericICollContains.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="valuecollectiongenericicollectioncontains.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/ValueCollGenericIEnumGetEnumerator.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/ValueCollGenericIEnumGetEnumerator.csproj
new file mode 100644
index 0000000000..bb9d8ad56d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/ValueCollGenericIEnumGetEnumerator.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="valuecollectiongenericienumerablegetenumerator.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/dictionaryvaluecollectioncopyto.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/dictionaryvaluecollectioncopyto.cs
new file mode 100644
index 0000000000..dfea5fd775
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/dictionaryvaluecollectioncopyto.cs
@@ -0,0 +1,229 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// Dictionary.ValueCollection.CopyTo(Array,Int32)
+/// </summary>
+public class DictionaryValueCollectionCopyTo
+{
+ private const int SIZE = 10;
+ public static int Main()
+ {
+ DictionaryValueCollectionCopyTo valuecollectCopyTo = new DictionaryValueCollectionCopyTo();
+ TestLibrary.TestFramework.BeginTestCase("DictionaryValueCollectionCopyTo");
+ if (valuecollectCopyTo.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method CopyTo in the ValueCollection 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str2", "Test2");
+ Dictionary<string, string>.ValueCollection values = new Dictionary<string, string>.ValueCollection(dic);
+ string[] TVals = new string[SIZE];
+ values.CopyTo(TVals, 0);
+ string strVals = null;
+ for (int i = 0; i < TVals.Length; i++)
+ {
+ if (TVals[i] != null)
+ {
+ strVals += TVals[i].ToString();
+ }
+ }
+ if (TVals[0].ToString() != "Test1" || TVals[1].ToString() != "Test2" || strVals != "Test1Test2")
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the method CopyTo in the ValueCollection 2");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str2", "Test2");
+ Dictionary<string, string>.ValueCollection values = new Dictionary<string, string>.ValueCollection(dic);
+ string[] TVals = new string[SIZE];
+ values.CopyTo(TVals, 5);
+ string strVals = null;
+ for (int i = 0; i < TVals.Length; i++)
+ {
+ if (TVals[i] != null)
+ {
+ strVals += TVals[i].ToString();
+ }
+ }
+ if (TVals[5].ToString() != "Test1" || TVals[6].ToString() != "Test2" || strVals != "Test1Test2")
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke the method CopyTo in the ValueCollection 3");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ Dictionary<string, string>.ValueCollection values = new Dictionary<string, string>.ValueCollection(dic);
+ string[] TVals = new string[SIZE];
+ values.CopyTo(TVals, 0);
+ for (int i = 0; i < TVals.Length; i++)
+ {
+ if (TVals[i] != null)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The argument array is null");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ Dictionary<string, string>.ValueCollection values = new Dictionary<string, string>.ValueCollection(dic);
+ string[] TVals = null;
+ values.CopyTo(TVals, 0);
+ TestLibrary.TestFramework.LogError("N001", "The argument array is null but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:The argument index is less than zero");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ Dictionary<string, string>.ValueCollection values = new Dictionary<string, string>.ValueCollection(dic);
+ string[] TVals = new string[SIZE];
+ int index = -1;
+ values.CopyTo(TVals, index);
+ TestLibrary.TestFramework.LogError("N003", "The argument index is less than zero but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3:The argument index is larger than array length");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ Dictionary<string, string>.ValueCollection values = new Dictionary<string, string>.ValueCollection(dic);
+ string[] TVals = new string[SIZE];
+ int index = SIZE + 1;
+ values.CopyTo(TVals, index);
+ TestLibrary.TestFramework.LogError("N005", "The argument index is larger than array length but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4:The number of elements in the source Dictionary.ValueCollection is greater than the available space from index to the end of the destination array");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str1", "Test1");
+ Dictionary<string, string>.ValueCollection values = new Dictionary<string, string>.ValueCollection(dic);
+ string[] TVals = new string[SIZE];
+ int index = SIZE - 1;
+ values.CopyTo(TVals, index);
+ TestLibrary.TestFramework.LogError("N007", "The ExpectResult should throw exception but the ActualResult not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/dictionaryvaluecollectioncount.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/dictionaryvaluecollectioncount.cs
new file mode 100644
index 0000000000..774e29570b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/dictionaryvaluecollectioncount.cs
@@ -0,0 +1,84 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// Dictionary.ValueCollection.Count
+/// </summary>
+public class DictionaryValueCollectionCount
+{
+ public static int Main()
+ {
+ DictionaryValueCollectionCount valueCollectCount = new DictionaryValueCollectionCount();
+ TestLibrary.TestFramework.BeginTestCase("DictionaryValueCollectionCount");
+ if (valueCollectCount.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the property Count of ValueCollection 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str2", "Test2");
+ Dictionary<string, string>.ValueCollection values = new Dictionary<string, string>.ValueCollection(dic);
+ int intCount = values.Count;
+ if (intCount != dic.Count)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the property Count of ValueCollection 2");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ Dictionary<string, string>.ValueCollection values = new Dictionary<string, string>.ValueCollection(dic);
+ int intCount = values.Count;
+ if (intCount != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/dictionaryvaluecollectionctor.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/dictionaryvaluecollectionctor.cs
new file mode 100644
index 0000000000..5795f81bd3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/dictionaryvaluecollectionctor.cs
@@ -0,0 +1,107 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// Dictionary.ValueCollection.ctor(Dictionay<TKey,TValue>)
+/// </summary>
+public class DictionaryValueCollectionctor
+{
+ public static int Main()
+ {
+ DictionaryValueCollectionctor valueCollectCtor = new DictionaryValueCollectionctor();
+ TestLibrary.TestFramework.BeginTestCase("DictionaryValueCollectionctor");
+ if (valueCollectCtor.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Initialize the generic class ValueCollection 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ Dictionary<string, string>.ValueCollection valueCollect = new Dictionary<string, string>.ValueCollection(dic);
+ if (valueCollect == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Initialize the generic class ValueCollection 2");
+ try
+ {
+ Dictionary<TestClass, TestClass> dic = new Dictionary<TestClass, TestClass>();
+ Dictionary<TestClass, TestClass>.ValueCollection valueCollect = new Dictionary<TestClass, TestClass>.ValueCollection(dic);
+ if (valueCollect == null)
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:the argument dictionary is null");
+ try
+ {
+ Dictionary<object, object>.ValueCollection valueCollect = new Dictionary<object, object>.ValueCollection(null);
+ TestLibrary.TestFramework.LogError("N001", "the argument dictionary is null but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass
+ {
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/dictionaryvaluecollectiongetenumerator.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/dictionaryvaluecollectiongetenumerator.cs
new file mode 100644
index 0000000000..62c0b623ca
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/dictionaryvaluecollectiongetenumerator.cs
@@ -0,0 +1,101 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// Dictionary.ValueCollection.GetEnumerator()
+/// </summary>
+public class DictionaryValueCollectionGetEnumerator
+{
+ public static int Main()
+ {
+ DictionaryValueCollectionGetEnumerator valuecollectGetEnum = new DictionaryValueCollectionGetEnumerator();
+ TestLibrary.TestFramework.BeginTestCase("DictionaryValueCollectionGetEnumerator");
+ if (valuecollectGetEnum.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method GetEnumerator in ValueCollection 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str2", "Test2");
+ Dictionary<string, string>.ValueCollection values = new Dictionary<string, string>.ValueCollection(dic);
+ Dictionary<string, string>.ValueCollection.Enumerator enumer = values.GetEnumerator();
+ Dictionary<string, string>.Enumerator dicEnumer = dic.GetEnumerator();
+ while (enumer.MoveNext() && dicEnumer.MoveNext())
+ {
+ if (!enumer.Current.Equals(dicEnumer.Current.Value))
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the method GetEnumerator in ValueCollection 2");
+ try
+ {
+ Dictionary<TestClass, TestClass> dic = new Dictionary<TestClass, TestClass>();
+ TestClass TKey1 = new TestClass();
+ TestClass TVal1 = new TestClass();
+ TestClass TKey2 = new TestClass();
+ TestClass TVal2 = new TestClass();
+ dic.Add(TKey1, TVal1);
+ dic.Add(TKey2, TVal2);
+ Dictionary<TestClass, TestClass>.ValueCollection values = new Dictionary<TestClass, TestClass>.ValueCollection(dic);
+ Dictionary<TestClass, TestClass>.ValueCollection.Enumerator enumer = values.GetEnumerator();
+ Dictionary<TestClass, TestClass>.Enumerator dicEnumer = dic.GetEnumerator();
+ while (enumer.MoveNext() && dicEnumer.MoveNext())
+ {
+ if (!enumer.Current.Equals(dicEnumer.Current.Value))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass { }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/systemcollectionsicollectioncopyto.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/systemcollectionsicollectioncopyto.cs
new file mode 100644
index 0000000000..15e227c2be
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/systemcollectionsicollectioncopyto.cs
@@ -0,0 +1,276 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Collections;
+/// <summary>
+/// ValueCollection.System.Collections.ICollection.CopyTo(Array,Int32)
+/// </summary>
+public class ValueCollectionICollectionCopyTo
+{
+ private const int SIZE = 10;
+ public static int Main()
+ {
+ ValueCollectionICollectionCopyTo valCollectICollectCopyTo = new ValueCollectionICollectionCopyTo();
+ TestLibrary.TestFramework.BeginTestCase("ValueCollectionICollectionCopyTo");
+ if (valCollectICollectCopyTo.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method CopyTo in ValueCollection ICollection 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str2", "Test2");
+ ICollection icollect = (ICollection)new Dictionary<string, string>.ValueCollection(dic);
+ string[] TVals = new string[SIZE];
+ icollect.CopyTo(TVals, 0);
+ string strVals = null;
+ for (int i = 0; i < TVals.Length; i++)
+ {
+ if (TVals[i] != null)
+ {
+ strVals += TVals[i].ToString();
+ }
+ }
+ if (TVals[0].ToString() != "Test1" || TVals[1].ToString() != "Test2" || strVals != "Test1Test2")
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the method CopyTo in ValueCollection ICollection 2");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str2", "Test2");
+ ICollection icollect = (ICollection)new Dictionary<string, string>.ValueCollection(dic);
+ string[] TVals = new string[SIZE];
+ icollect.CopyTo(TVals, 5);
+ string strVals = null;
+ for (int i = 0; i < TVals.Length; i++)
+ {
+ if (TVals[i] != null)
+ {
+ strVals += TVals[i].ToString();
+ }
+ }
+ if (TVals[5].ToString() != "Test1" || TVals[6].ToString() != "Test2" || strVals != "Test1Test2")
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke the method CopyTo in ValueCollection ICollection 3");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ ICollection icollect = (ICollection)new Dictionary<string, string>.ValueCollection(dic);
+ string[] TVals = new string[SIZE];
+ icollect.CopyTo(TVals, 0);
+ for (int i = 0; i < TVals.Length; i++)
+ {
+ if (TVals[i] != null)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The argument array is null");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ ICollection icollect = (ICollection)new Dictionary<string, string>.ValueCollection(dic);
+ string[] TVals = null;
+ icollect.CopyTo(TVals, 0);
+ TestLibrary.TestFramework.LogError("N001", "The argument array is null but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:The argument index is less than zero");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ ICollection icollect = (ICollection)new Dictionary<string, string>.ValueCollection(dic);
+ string[] TVals = new string[SIZE];
+ int index = -1;
+ icollect.CopyTo(TVals, index);
+ TestLibrary.TestFramework.LogError("N003", "The argument index is less than zero but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3:The argument index is larger than array length");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ ICollection icollect = (ICollection)new Dictionary<string, string>.ValueCollection(dic);
+ string[] TVals = new string[SIZE];
+ int index = SIZE + 1;
+ icollect.CopyTo(TVals, index);
+ TestLibrary.TestFramework.LogError("N005", "The argument index is larger than array length but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4:The number of elements in the source ICollection is greater than the available space from index to the end of the destination array");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str1", "Test1");
+ ICollection icollect = (ICollection)new Dictionary<string, string>.ValueCollection(dic);
+ string[] TVals = new string[SIZE];
+ int index = SIZE - 1;
+ icollect.CopyTo(TVals, index);
+ TestLibrary.TestFramework.LogError("N007", "The ExpectResult should throw exception but the ActualResult not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest5:The type of ICollection not cast automatically to the type of array");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ ICollection icollect = (ICollection)new Dictionary<string, string>.ValueCollection(dic);
+ int[] TVals = new int[SIZE];
+ icollect.CopyTo(TVals, 0);
+ TestLibrary.TestFramework.LogError("N009", "The type of ICollection not cast automatically to the type of array but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest6:The array is multidimentional");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ ICollection icollect = (ICollection)new Dictionary<string, string>.ValueCollection(dic);
+ int[,] TVals = new int[1, 2];
+ icollect.CopyTo(TVals, 0);
+ TestLibrary.TestFramework.LogError("N011", "The array is multidimentional but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N012", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/systemcollectionsicollectionissynchronized.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/systemcollectionsicollectionissynchronized.cs
new file mode 100644
index 0000000000..f4915cfe6a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/systemcollectionsicollectionissynchronized.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Collections;
+/// <summary>
+/// Dictionary.ValueCollection.System.Collections.ICollection.IsSynchronized
+/// </summary>
+public class ValueCollectionICollectionIsSynchronized
+{
+ public static int Main()
+ {
+ ValueCollectionICollectionIsSynchronized valCollectIsSynchronized = new ValueCollectionICollectionIsSynchronized();
+ TestLibrary.TestFramework.BeginTestCase("ValueCollectionICollectionIsSynchronized");
+ if (valCollectIsSynchronized.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true; ;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the property IsSynchronized in the ValueCollection ICollection 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ ICollection icollect = (ICollection)new Dictionary<string, string>.ValueCollection(dic);
+ if (icollect.IsSynchronized)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the property IsSynchronized in the ValueCollection ICollection 2");
+ try
+ {
+ Dictionary<TestClass, TestClass> dic = new Dictionary<TestClass, TestClass>();
+ ICollection icollect = (ICollection)new Dictionary<TestClass, TestClass>.ValueCollection(dic);
+ if (icollect.IsSynchronized)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass { }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/systemcollectionsicollectionsyncroot.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/systemcollectionsicollectionsyncroot.cs
new file mode 100644
index 0000000000..d383a58aa2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/systemcollectionsicollectionsyncroot.cs
@@ -0,0 +1,87 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Collections;
+/// <summary>
+/// Dictionary.ValueCollection.System.Collections.ICollection.SyncRoot
+/// </summary>
+public class ValueCollectionICollectionSyncRoot
+{
+ public static int Main()
+ {
+ ValueCollectionICollectionSyncRoot valCollectSyncRoot = new ValueCollectionICollectionSyncRoot();
+ TestLibrary.TestFramework.BeginTestCase("ValueCollectionICollectionSyncRoot");
+ if (valCollectSyncRoot.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the property SyncRoot in the ValueCollection ICollection 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ ICollection icollect = (ICollection)new Dictionary<string, string>.ValueCollection(dic);
+ object objVal = icollect.SyncRoot;
+ if (objVal == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the property SyncRoot in the ValueCollection ICollection 2");
+ try
+ {
+ Dictionary<TestClass, TestClass> dic = new Dictionary<TestClass, TestClass>();
+ ICollection icollect = (ICollection)new Dictionary<TestClass, TestClass>.ValueCollection(dic);
+ object objVal = icollect.SyncRoot;
+ if (objVal == null)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass { }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericicollectionadd.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericicollectionadd.cs
new file mode 100644
index 0000000000..0d6329ec0b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericicollectionadd.cs
@@ -0,0 +1,58 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// ValueCollection.System.Collections.Generic.ICollection.Add(TValue)
+/// </summary>
+public class ValueCollectionGenericICollectionAdd
+{
+ public static int Main()
+ {
+ ValueCollectionGenericICollectionAdd valCollectGenericAdd = new ValueCollectionGenericICollectionAdd();
+ TestLibrary.TestFramework.BeginTestCase("ValueCollectionGenericICollectionAdd");
+ if (valCollectGenericAdd.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Invoke the method Add in ValueCollection ICollection");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ Dictionary<string, string>.ValueCollection valueCollect = new Dictionary<string, string>.ValueCollection(dic);
+ ICollection<string> icollect = (ICollection<string>)valueCollect;
+ icollect.Add("str1");
+ TestLibrary.TestFramework.LogError("N001", "The ExpectResult should throw exception but the ActualResult not throw exception");
+ retVal = false;
+ }
+ catch (NotSupportedException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericicollectionclear.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericicollectionclear.cs
new file mode 100644
index 0000000000..d852450f46
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericicollectionclear.cs
@@ -0,0 +1,60 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// ValueCollection.System.Collections.Generic.ICollection.Clear()
+/// </summary>
+public class ValueCollectionGenericICollectionClear
+{
+ public static int Main()
+ {
+ ValueCollectionGenericICollectionClear valCollectGenericClear = new ValueCollectionGenericICollectionClear();
+ TestLibrary.TestFramework.BeginTestCase("ValueCollectionGenericICollectionClear");
+ if (valCollectGenericClear.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Invoke the method Clear in ValueCollection ICollection");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str2", "Test2");
+ Dictionary<string, string>.ValueCollection valueCollect = new Dictionary<string, string>.ValueCollection(dic);
+ ICollection<string> icollect = (ICollection<string>)valueCollect;
+ icollect.Clear();
+ TestLibrary.TestFramework.LogError("N001", "The ExpectResult should throw exception but the ActualResult not throw exception");
+ retVal = false;
+ }
+ catch (NotSupportedException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericicollectioncontains.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericicollectioncontains.cs
new file mode 100644
index 0000000000..726b5a5c7f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericicollectioncontains.cs
@@ -0,0 +1,90 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// ValueCollection.System.Collections.Generic.ICollection.Contains()
+/// </summary>
+public class ValueCollectionGenericICollectionContains
+{
+ public static int Main()
+ {
+ ValueCollectionGenericICollectionContains valCollectGenericContains = new ValueCollectionGenericICollectionContains();
+ TestLibrary.TestFramework.BeginTestCase("ValueCollectionGenericICollectionContains");
+ if (valCollectGenericContains.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method Contains in ValueCollection ICollection 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str2", "Test2");
+ Dictionary<string, string>.ValueCollection valueCollect = new Dictionary<string, string>.ValueCollection(dic);
+ ICollection<string> icollect = (ICollection<string>)valueCollect;
+ if (!icollect.Contains("Test1") || !icollect.Contains("Test2") || icollect.Contains("Test3"))
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the method Contains in ValueCollection ICollection 2");
+ try
+ {
+ Dictionary<TestClass, TestClass> dic = new Dictionary<TestClass, TestClass>();
+ TestClass Tkey1 = new TestClass();
+ TestClass Tval1 = new TestClass();
+ dic.Add(Tkey1, Tval1);
+ Dictionary<TestClass, TestClass>.ValueCollection valueCollect = new Dictionary<TestClass, TestClass>.ValueCollection(dic);
+ ICollection<TestClass> icollect = (ICollection<TestClass>)valueCollect;
+ if (icollect.Contains(Tkey1) || !icollect.Contains(Tval1))
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass { }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericicollectionisreadonly.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericicollectionisreadonly.cs
new file mode 100644
index 0000000000..7df3966dbd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericicollectionisreadonly.cs
@@ -0,0 +1,84 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// ValueCollection.System.Collections.Generic.ICollection.IsReadOnly
+/// </summary>
+public class ValueCollectionGenericICollectionIsReadOnly
+{
+ public static int Main()
+ {
+ ValueCollectionGenericICollectionIsReadOnly valCollectGenericIsReadOnly = new ValueCollectionGenericICollectionIsReadOnly();
+ TestLibrary.TestFramework.BeginTestCase("ValueCollectionGenericICollectionIsReadOnly");
+ if (valCollectGenericIsReadOnly.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the property IsReadOnly in the ValueCollection Generic ICollection 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ ICollection<string> icollect = (ICollection<string>)new Dictionary<string, string>.ValueCollection(dic);
+ if (!icollect.IsReadOnly)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the property IsReadOnly in the ValueCollection Generic ICollection 2");
+ try
+ {
+ Dictionary<TestClass, TestClass> dic = new Dictionary<TestClass, TestClass>();
+ ICollection<TestClass> icollect = (ICollection<TestClass>)new Dictionary<TestClass, TestClass>.ValueCollection(dic);
+ if (!icollect.IsReadOnly)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass { }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericicollectionremove.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericicollectionremove.cs
new file mode 100644
index 0000000000..a55b4284cb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericicollectionremove.cs
@@ -0,0 +1,59 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// ValueCollection.System.Collections.Generic.ICollection.Remove()
+/// </summary>
+public class ValueCollectionGenericICollectionRemove
+{
+ public static int Main()
+ {
+ ValueCollectionGenericICollectionRemove valCollectGenericRemove = new ValueCollectionGenericICollectionRemove();
+ TestLibrary.TestFramework.BeginTestCase("ValueCollectionGenericICollectionRemove");
+ if (valCollectGenericRemove.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Invoke the method Remove in ValueCollection ICollection 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ Dictionary<string, string>.ValueCollection valueCollect = new Dictionary<string, string>.ValueCollection(dic);
+ ICollection<string> icollect = (ICollection<string>)valueCollect;
+ bool boolVal = icollect.Remove("str1");
+ TestLibrary.TestFramework.LogError("N001", "The ExpectResult should throw exception but the ActualResult not throw exception");
+ retVal = false;
+ }
+ catch (NotSupportedException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericienumerablegetenumerator.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericienumerablegetenumerator.cs
new file mode 100644
index 0000000000..57696a13cc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectiongenericienumerablegetenumerator.cs
@@ -0,0 +1,101 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// ValueCollection.System.Collections.Generic.IEnumerator.GetEnumerator
+/// </summary>
+public class ValueCollectionGenericIEnumerableGetEnumerator
+{
+ public static int Main()
+ {
+ ValueCollectionGenericIEnumerableGetEnumerator valCollectGenericIEnumerableGetEnumerator = new ValueCollectionGenericIEnumerableGetEnumerator();
+ TestLibrary.TestFramework.BeginTestCase("ValueCollectionGenericIEnumerableGetEnumerator");
+ if (valCollectGenericIEnumerableGetEnumerator.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method GetEnumerator in ValueCollection Generic IEnumerable 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str2", "Test2");
+ IEnumerable<string> ienumer = (IEnumerable<string>)new Dictionary<string, string>.ValueCollection(dic);
+ IEnumerator<string> ienumerator = ienumer.GetEnumerator();
+ Dictionary<string, string>.Enumerator dicEnumer = dic.GetEnumerator();
+ while (ienumerator.MoveNext() && dicEnumer.MoveNext())
+ {
+ if (!ienumerator.Current.Equals(dicEnumer.Current.Value))
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the method GetEnumerator in ValueCollection Generic IEnumerable 2");
+ try
+ {
+ Dictionary<TestClass, TestClass> dic = new Dictionary<TestClass, TestClass>();
+ TestClass TKey1 = new TestClass();
+ TestClass TVal1 = new TestClass();
+ TestClass TKey2 = new TestClass();
+ TestClass TVal2 = new TestClass();
+ dic.Add(TKey1, TVal1);
+ dic.Add(TKey2, TVal2);
+ IEnumerable<TestClass> ienumer = (IEnumerable<TestClass>)new Dictionary<TestClass, TestClass>.ValueCollection(dic);
+ IEnumerator<TestClass> ienumerator = ienumer.GetEnumerator();
+ Dictionary<TestClass, TestClass>.Enumerator dicEnumer = dic.GetEnumerator();
+ while (ienumerator.MoveNext() && dicEnumer.MoveNext())
+ {
+ if (!ienumerator.Current.Equals(dicEnumer.Current.Value))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass { }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectionienumerablegetenumerator.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectionienumerablegetenumerator.cs
new file mode 100644
index 0000000000..790cdb2203
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictionaryvaluecollection/valuecollectionienumerablegetenumerator.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Collections;
+/// <summary>
+/// ValueCollection.System.Collections.IEnumerator.GetEnumerator
+/// </summary>
+public class ValueCollectionIEnumerableGetEnumerator
+{
+ public static int Main()
+ {
+ ValueCollectionIEnumerableGetEnumerator valCollectIEnumerableGetEnumerator = new ValueCollectionIEnumerableGetEnumerator();
+ TestLibrary.TestFramework.BeginTestCase("ValueCollectionIEnumerableGetEnumerator");
+ if (valCollectIEnumerableGetEnumerator.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method GetEnumerator in ValueCollection IEnumerable 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("str1", "Test1");
+ dic.Add("str2", "Test2");
+ IEnumerable ienumer = (IEnumerable)new Dictionary<string, string>.ValueCollection(dic);
+ IEnumerator ienumerator = ienumer.GetEnumerator();
+ Dictionary<string, string>.Enumerator dicEnumer = dic.GetEnumerator();
+ while (ienumerator.MoveNext() && dicEnumer.MoveNext())
+ {
+ if (!ienumerator.Current.Equals(dicEnumer.Current.Value))
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the method GetEnumerator in ValueCollection IEnumerable 2");
+ try
+ {
+ Dictionary<TestClass, TestClass> dic = new Dictionary<TestClass, TestClass>();
+ TestClass TKey1 = new TestClass();
+ TestClass TVal1 = new TestClass();
+ TestClass TKey2 = new TestClass();
+ TestClass TVal2 = new TestClass();
+ dic.Add(TKey1, TVal1);
+ dic.Add(TKey2, TVal2);
+ IEnumerable ienumer = (IEnumerable)new Dictionary<TestClass, TestClass>.ValueCollection(dic);
+ IEnumerator ienumerator = ienumer.GetEnumerator();
+ Dictionary<TestClass, TestClass>.Enumerator dicEnumer = dic.GetEnumerator();
+ while (ienumerator.MoveNext() && dicEnumer.MoveNext())
+ {
+ if (!ienumerator.Current.Equals(dicEnumer.Current.Value))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpecResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass { }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryKeyCollectionEnumeratorCurrent.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryKeyCollectionEnumeratorCurrent.csproj
new file mode 100644
index 0000000000..a270561f50
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryKeyCollectionEnumeratorCurrent.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionarykeycollectionenumeratorcurrent.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryKeyCollectionEnumeratorDispose.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryKeyCollectionEnumeratorDispose.csproj
new file mode 100644
index 0000000000..b18309fc53
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryKeyCollectionEnumeratorDispose.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionarykeycollectionenumeratordispose.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryKeyCollectionEnumeratorMoveNext.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryKeyCollectionEnumeratorMoveNext.csproj
new file mode 100644
index 0000000000..e2b38198d2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryKeyCollectionEnumeratorMoveNext.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionarykeycollectionenumeratormovenext.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryValueCollectionEnumeratorCurrent.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryValueCollectionEnumeratorCurrent.csproj
new file mode 100644
index 0000000000..984120057d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryValueCollectionEnumeratorCurrent.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryvaluecollectionenumeratorcurrent.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryValueCollectionEnumeratorDispose.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryValueCollectionEnumeratorDispose.csproj
new file mode 100644
index 0000000000..a00ea05a0c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryValueCollectionEnumeratorDispose.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryvaluecollectionenumeratordispose.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryValueCollectionEnumeratorMoveNext.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryValueCollectionEnumeratorMoveNext.csproj
new file mode 100644
index 0000000000..5e2e88b11f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/DictionaryValueCollectionEnumeratorMoveNext.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryvaluecollectionenumeratormovenext.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/KeyCollectionEnumeratorIEnumeratorCurrent.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/KeyCollectionEnumeratorIEnumeratorCurrent.csproj
new file mode 100644
index 0000000000..63d9a4b134
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/KeyCollectionEnumeratorIEnumeratorCurrent.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="keycollectionenumeratorienumeratorcurrent.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/KeyCollectionEnumeratorIEnumeratorReset.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/KeyCollectionEnumeratorIEnumeratorReset.csproj
new file mode 100644
index 0000000000..55cf2498f9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/KeyCollectionEnumeratorIEnumeratorReset.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="keycollectionenumeratorienumeratorreset.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/ValueCollectionEnumeratorIEnumeratorCurrent.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/ValueCollectionEnumeratorIEnumeratorCurrent.csproj
new file mode 100644
index 0000000000..40e5200dd0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/ValueCollectionEnumeratorIEnumeratorCurrent.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="valuecollectionenumeratorienumeratorcurrent.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/ValueCollectionEnumeratorIEnumeratorReset.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/ValueCollectionEnumeratorIEnumeratorReset.csproj
new file mode 100644
index 0000000000..ff1a3e39a8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/ValueCollectionEnumeratorIEnumeratorReset.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="valuecollectionenumeratorienumeratorreset.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionarykeycollectionenumeratorcurrent.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionarykeycollectionenumeratorcurrent.cs
new file mode 100644
index 0000000000..fe411ebc7f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionarykeycollectionenumeratorcurrent.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// System.Collections.Generic.Dictionary.KeyCollection.Enumerator.Current
+/// </summary>
+public class DictionaryKeyCollectionEnumeratorCurrent
+{
+ public static int Main()
+ {
+ DictionaryKeyCollectionEnumeratorCurrent dicKeyCollectEnumCurrent = new DictionaryKeyCollectionEnumeratorCurrent();
+ TestLibrary.TestFramework.BeginTestCase("DictionaryKeyCollectionEnumeratorCurrent");
+ if (dicKeyCollectEnumCurrent.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the property Current in Dictionary KeyCollection Enumerator 1");
+ try
+ {
+ Dictionary<string, string>.KeyCollection.Enumerator keyEnumer = new Dictionary<string, string>.KeyCollection.Enumerator();
+ if (keyEnumer.Current != null)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ keyEnumer.Dispose();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the property Current in Dictionary KeyCollection Enumerator 2");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("1", "test1");
+ Dictionary<string, string>.KeyCollection.Enumerator keyEnumer = new Dictionary<string, string>.KeyCollection(dic).GetEnumerator();
+ while (keyEnumer.MoveNext())
+ {
+ if (keyEnumer.Current != "1")
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ keyEnumer.Dispose();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionarykeycollectionenumeratordispose.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionarykeycollectionenumeratordispose.cs
new file mode 100644
index 0000000000..1762f8d3f4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionarykeycollectionenumeratordispose.cs
@@ -0,0 +1,58 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// System.Collections.Generic.Dictionary.KeyCollection.Enumerator.Dispose()
+/// </summary>
+public class DictionaryKeyCollectionEnumeratorDispose
+{
+ public static int Main()
+ {
+ DictionaryKeyCollectionEnumeratorDispose dicKeyCollectEnumDis = new DictionaryKeyCollectionEnumeratorDispose();
+ TestLibrary.TestFramework.BeginTestCase("DictionaryKeyCollectionEnumeratorDispose");
+ if (dicKeyCollectEnumDis.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the Dispose method in Dictionary KeyCollection Enumerator 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("1", "test1");
+ dic.Add("2", "test2");
+ Dictionary<string, string>.KeyCollection.Enumerator keyEnumer1 = new Dictionary<string, string>.KeyCollection.Enumerator();
+ Dictionary<string, string>.KeyCollection.Enumerator keyEnumer2 = new Dictionary<string,string>.KeyCollection(dic).GetEnumerator();
+ keyEnumer2.Dispose();
+ keyEnumer1.Dispose();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionarykeycollectionenumeratormovenext.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionarykeycollectionenumeratormovenext.cs
new file mode 100644
index 0000000000..8884910caa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionarykeycollectionenumeratormovenext.cs
@@ -0,0 +1,90 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// System.Collections.Generic.Dictionary.KeyCollection.Enumerator.MoveNext()
+/// </summary>
+public class DictionaryKeyCollectionEnumeratorMoveNext
+{
+ public static int Main()
+ {
+ DictionaryKeyCollectionEnumeratorMoveNext dicKeyCollectEnumMoveNext = new DictionaryKeyCollectionEnumeratorMoveNext();
+ TestLibrary.TestFramework.BeginTestCase("DictionaryKeyCollectionEnumeratorMoveNext");
+ if (dicKeyCollectEnumMoveNext.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the MoveNext method in Dictionary KeyCollection Enumerator");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("1", "test1");
+ Dictionary<string, string>.KeyCollection.Enumerator keyEnumer1 = new Dictionary<string, string>.KeyCollection(dic).GetEnumerator();
+ if (keyEnumer1.Current != null || keyEnumer1.MoveNext() != true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ if (keyEnumer1.MoveNext())
+ {
+ TestLibrary.TestFramework.LogError("001.2", "The method MoveNext should return false but it did not");
+ }
+ keyEnumer1.Dispose();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The collection was modified after the enumerator was created");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("1", "test1");
+ Dictionary<string, string>.KeyCollection.Enumerator keyEnumer = new Dictionary<string, string>.KeyCollection(dic).GetEnumerator();
+ dic.Add("2", "test2");
+ bool boolVal = keyEnumer.MoveNext();
+ TestLibrary.TestFramework.LogError("N001", "The collection was modified after the enumerator was created but not throw exception");
+ retVal = false;
+ }
+ catch (InvalidOperationException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionaryvaluecollectionenumeratorcurrent.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionaryvaluecollectionenumeratorcurrent.cs
new file mode 100644
index 0000000000..294ab11d0e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionaryvaluecollectionenumeratorcurrent.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// System.Collections.Generic.Dictionary.ValueCollection.Enumerator.Current
+/// </summary>
+public class DictionaryValueCollectionEnumeratorCurrent
+{
+ public static int Main()
+ {
+ DictionaryValueCollectionEnumeratorCurrent dicValCollectEnumCurrent = new DictionaryValueCollectionEnumeratorCurrent();
+ TestLibrary.TestFramework.BeginTestCase("DictionaryValueCollectionEnumeratorCurrent");
+ if (dicValCollectEnumCurrent.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the property Current in Dictionary ValueCollection Enumerator 1");
+ try
+ {
+ Dictionary<string, string>.ValueCollection.Enumerator valEnumer = new Dictionary<string, string>.ValueCollection.Enumerator();
+ if (valEnumer.Current != null)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ valEnumer.Dispose();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the property Current in Dictionary ValueCollection Enumerator 2");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("1", "test1");
+ Dictionary<string, string>.ValueCollection.Enumerator valEnumer = new Dictionary<string, string>.ValueCollection(dic).GetEnumerator();
+ while (valEnumer.MoveNext())
+ {
+ if (valEnumer.Current != "test1")
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ valEnumer.Dispose();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionaryvaluecollectionenumeratordispose.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionaryvaluecollectionenumeratordispose.cs
new file mode 100644
index 0000000000..e4f8cf99bb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionaryvaluecollectionenumeratordispose.cs
@@ -0,0 +1,58 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// System.Collections.Generic.Dictionary.ValueCollection.Enumerator.Dispose()
+/// </summary>
+public class DictionaryValueCollectionEnumeratorDispose
+{
+ public static int Main()
+ {
+ DictionaryValueCollectionEnumeratorDispose dicValCollectEnumDis = new DictionaryValueCollectionEnumeratorDispose();
+ TestLibrary.TestFramework.BeginTestCase("DictionaryValueCollectionEnumeratorDispose");
+ if (dicValCollectEnumDis.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the Dispose method in Dictionary ValueCollection Enumerator 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("1", "test1");
+ dic.Add("2", "test2");
+ Dictionary<string, string>.ValueCollection.Enumerator ValEnumer1 = new Dictionary<string, string>.ValueCollection.Enumerator();
+ Dictionary<string, string>.ValueCollection.Enumerator ValEnumer2 = new Dictionary<string, string>.ValueCollection(dic).GetEnumerator();
+ ValEnumer2.Dispose();
+ ValEnumer1.Dispose();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionaryvaluecollectionenumeratormovenext.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionaryvaluecollectionenumeratormovenext.cs
new file mode 100644
index 0000000000..ef12d1e137
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/dictionaryvaluecollectionenumeratormovenext.cs
@@ -0,0 +1,90 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// System.Collections.Generic.Dictionary.ValueCollection.Enumerator.MoveNext()
+/// </summary>
+public class DictionaryValueCollectionEnumeratorMoveNext
+{
+ public static int Main()
+ {
+ DictionaryValueCollectionEnumeratorMoveNext dicValCollectEnumMoveNext = new DictionaryValueCollectionEnumeratorMoveNext();
+ TestLibrary.TestFramework.BeginTestCase("DictionaryValueCollectionEnumeratorMoveNext");
+ if (dicValCollectEnumMoveNext.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the MoveNext method in Dictionary ValueCollection Enumerator");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("1", "test1");
+ Dictionary<string, string>.ValueCollection.Enumerator ValEnumer1 = new Dictionary<string, string>.ValueCollection(dic).GetEnumerator();
+ if (ValEnumer1.Current != null || ValEnumer1.MoveNext() != true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ if (ValEnumer1.MoveNext())
+ {
+ TestLibrary.TestFramework.LogError("001.2", "The method MoveNext should return false but it did not");
+ }
+ ValEnumer1.Dispose();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The collection was modified after the enumerator was created");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("1", "test1");
+ Dictionary<string, string>.ValueCollection.Enumerator ValEnumer = new Dictionary<string, string>.ValueCollection(dic).GetEnumerator();
+ dic.Add("2", "test2");
+ bool boolVal = ValEnumer.MoveNext();
+ TestLibrary.TestFramework.LogError("N001", "The collection was modified after the enumerator was created but not throw exception");
+ retVal = false;
+ }
+ catch (InvalidOperationException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/keycollectionenumeratorienumeratorcurrent.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/keycollectionenumeratorienumeratorcurrent.cs
new file mode 100644
index 0000000000..57500d5889
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/keycollectionenumeratorienumeratorcurrent.cs
@@ -0,0 +1,94 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Collections;
+/// <summary>
+/// Dictionary.KeyCollection.Enumerator.System.Collections.IEnumerator.Current
+/// </summary>
+public class KeyCollectionEnumeratorIEnumeratorCurrent
+{
+ public static int Main()
+ {
+ KeyCollectionEnumeratorIEnumeratorCurrent keyCollectEnumerIEnumerCurrent = new KeyCollectionEnumeratorIEnumeratorCurrent();
+ TestLibrary.TestFramework.BeginTestCase("KeyCollectionEnumeratorIEnumeratorCurrent");
+ if (keyCollectEnumerIEnumerCurrent.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the property Current in Collections IEnumerator 1");
+ try
+ {
+ Dictionary<TestClass, TestClass> dic = new Dictionary<TestClass, TestClass>();
+ TestClass Tkey1 = new TestClass();
+ TestClass TVal1 = new TestClass();
+ dic.Add(Tkey1, TVal1);
+ IEnumerator keyEnumerIEnumer = (IEnumerator)new Dictionary<TestClass,TestClass>.KeyCollection(dic).GetEnumerator();
+ while (keyEnumerIEnumer.MoveNext())
+ {
+ if (!keyEnumerIEnumer.Current.Equals(Tkey1))
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the property Current in Collections IEnumerator 2");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("1", "test1");
+ IEnumerator keyEnumerIEnumer = (IEnumerator)new Dictionary<string, string>.KeyCollection(dic).GetEnumerator();
+ while (keyEnumerIEnumer.MoveNext())
+ {
+ if (keyEnumerIEnumer.Current.ToString() != "1")
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass { }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/keycollectionenumeratorienumeratorreset.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/keycollectionenumeratorienumeratorreset.cs
new file mode 100644
index 0000000000..4e84185573
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/keycollectionenumeratorienumeratorreset.cs
@@ -0,0 +1,124 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Collections;
+/// <summary>
+/// Dictionary.KeyCollection.Enumerator.System.Collections.IEnumerator.Reset()
+/// </summary>
+public class KeyCollectionEnumeratorIEnumeratorReset
+{
+ public static int Main()
+ {
+ KeyCollectionEnumeratorIEnumeratorReset keyCollectEnumerIEnumerReset = new KeyCollectionEnumeratorIEnumeratorReset();
+ TestLibrary.TestFramework.BeginTestCase("KeyCollectionEnumeratorIEnumeratorReset");
+ if (keyCollectEnumerIEnumerReset.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Invoke the method Reset in the KeyCollection IEnumerator 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("1", "test1");
+ dic.Add("2", "test2");
+ IEnumerator keycollectIEnumer = (IEnumerator)new Dictionary<string, string>.KeyCollection(dic).GetEnumerator();
+ while (keycollectIEnumer.MoveNext()) { }
+ keycollectIEnumer.Reset();
+ if (keycollectIEnumer.MoveNext())
+ {
+ if (keycollectIEnumer.Current.ToString() != "1")
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Invoke the method Reset in the KeyCollection IEnumerator 2");
+ try
+ {
+ Dictionary<TestClass, TestClass> dic = new Dictionary<TestClass, TestClass>();
+ TestClass Tkey1 = new TestClass();
+ TestClass TVal1 = new TestClass();
+ dic.Add(Tkey1,TVal1);
+ IEnumerator keycollectIEnumer = (IEnumerator)new Dictionary<TestClass, TestClass>.KeyCollection(dic).GetEnumerator();
+ while (keycollectIEnumer.MoveNext()) { }
+ keycollectIEnumer.Reset();
+ if (keycollectIEnumer.MoveNext())
+ {
+ if (!keycollectIEnumer.Current.Equals(Tkey1))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The collection was modified after the enumerator was created");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ IEnumerator keycollectIEnumer = (IEnumerator)new Dictionary<string, string>.KeyCollection(dic).GetEnumerator();
+ dic.Add("str1", "helloworld");
+ keycollectIEnumer.Reset();
+ TestLibrary.TestFramework.LogError("N001", "The collection was modified after the enumerator was created but not throw exception");
+ retVal = false;
+ }
+ catch (InvalidOperationException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass { }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/valuecollectionenumeratorienumeratorcurrent.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/valuecollectionenumeratorienumeratorcurrent.cs
new file mode 100644
index 0000000000..7029bb5006
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/valuecollectionenumeratorienumeratorcurrent.cs
@@ -0,0 +1,94 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+/// <summary>
+/// Dictionary.ValueCollection.Enumerator.System.Collections.IEnumerator.Current
+/// </summary>
+public class ValueCollectionEnumeratorIEnumeratorCurrent
+{
+ public static int Main()
+ {
+ ValueCollectionEnumeratorIEnumeratorCurrent valCollectEnumerIEnumerCurrent = new ValueCollectionEnumeratorIEnumeratorCurrent();
+ TestLibrary.TestFramework.BeginTestCase("ValueCollectionEnumeratorIEnumeratorCurrent");
+ if (valCollectEnumerIEnumerCurrent.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the property Current in ValueCollection IEnumerator 1");
+ try
+ {
+ Dictionary<TestClass, TestClass> dic = new Dictionary<TestClass, TestClass>();
+ TestClass Tkey1 = new TestClass();
+ TestClass TVal1 = new TestClass();
+ dic.Add(Tkey1, TVal1);
+ IEnumerator valEnumerIEnumer = (IEnumerator)new Dictionary<TestClass, TestClass>.ValueCollection(dic).GetEnumerator();
+ while (valEnumerIEnumer.MoveNext())
+ {
+ if (!valEnumerIEnumer.Current.Equals(TVal1))
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the property Current in ValueCollection IEnumerator 2");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("1", "test1");
+ IEnumerator valEnumerIEnumer = (IEnumerator)new Dictionary<string, string>.ValueCollection(dic).GetEnumerator();
+ while (valEnumerIEnumer.MoveNext())
+ {
+ if (valEnumerIEnumer.Current.ToString() != "test1")
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass { }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/valuecollectionenumeratorienumeratorreset.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/valuecollectionenumeratorienumeratorreset.cs
new file mode 100644
index 0000000000..d742edc810
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictkeycollenum/valuecollectionenumeratorienumeratorreset.cs
@@ -0,0 +1,124 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Collections;
+/// <summary>
+///
+/// </summary>
+public class ValueCollectionEnumeratorIEnumeratorReset
+{
+ public static int Main()
+ {
+ ValueCollectionEnumeratorIEnumeratorReset valCollectEnumerIEnumerReset = new ValueCollectionEnumeratorIEnumeratorReset();
+ TestLibrary.TestFramework.BeginTestCase("ValueCollectionEnumeratorIEnumeratorReset");
+ if (valCollectEnumerIEnumerReset.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Invoke the method Reset in the ValueCollection IEnumerator 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("1", "test1");
+ dic.Add("2", "test2");
+ IEnumerator valcollectIEnumer = (IEnumerator)new Dictionary<string, string>.ValueCollection(dic).GetEnumerator();
+ while (valcollectIEnumer.MoveNext()) { }
+ valcollectIEnumer.Reset();
+ if (valcollectIEnumer.MoveNext())
+ {
+ if (valcollectIEnumer.Current.ToString() != "test1")
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Invoke the method Reset in the ValueCollection IEnumerator 2");
+ try
+ {
+ Dictionary<TestClass, TestClass> dic = new Dictionary<TestClass, TestClass>();
+ TestClass Tkey1 = new TestClass();
+ TestClass TVal1 = new TestClass();
+ dic.Add(Tkey1, TVal1);
+ IEnumerator valcollectIEnumer = (IEnumerator)new Dictionary<TestClass, TestClass>.ValueCollection(dic).GetEnumerator();
+ while (valcollectIEnumer.MoveNext()) { }
+ valcollectIEnumer.Reset();
+ if (valcollectIEnumer.MoveNext())
+ {
+ if (!valcollectIEnumer.Current.Equals(TVal1))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The collection was modified after the enumerator was created");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ IEnumerator valcollectIEnumer = (IEnumerator)new Dictionary<string, string>.ValueCollection(dic).GetEnumerator();
+ dic.Add("str1", "helloworld");
+ valcollectIEnumer.Reset();
+ TestLibrary.TestFramework.LogError("N001", "The collection was modified after the enumerator was created but not throw exception");
+ retVal = false;
+ }
+ catch (InvalidOperationException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass { }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/DictionaryValueCollectionEnumeratorCurrent.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/DictionaryValueCollectionEnumeratorCurrent.csproj
new file mode 100644
index 0000000000..984120057d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/DictionaryValueCollectionEnumeratorCurrent.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryvaluecollectionenumeratorcurrent.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/DictionaryValueCollectionEnumeratorDispose.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/DictionaryValueCollectionEnumeratorDispose.csproj
new file mode 100644
index 0000000000..a00ea05a0c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/DictionaryValueCollectionEnumeratorDispose.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryvaluecollectionenumeratordispose.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/DictionaryValueCollectionEnumeratorMoveNext.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/DictionaryValueCollectionEnumeratorMoveNext.csproj
new file mode 100644
index 0000000000..5e2e88b11f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/DictionaryValueCollectionEnumeratorMoveNext.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dictionaryvaluecollectionenumeratormovenext.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/ValueCollectionEnumeratorIEnumeratorCurrent.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/ValueCollectionEnumeratorIEnumeratorCurrent.csproj
new file mode 100644
index 0000000000..40e5200dd0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/ValueCollectionEnumeratorIEnumeratorCurrent.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="valuecollectionenumeratorienumeratorcurrent.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/ValueCollectionEnumeratorIEnumeratorReset.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/ValueCollectionEnumeratorIEnumeratorReset.csproj
new file mode 100644
index 0000000000..ff1a3e39a8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/ValueCollectionEnumeratorIEnumeratorReset.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="valuecollectionenumeratorienumeratorreset.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/dictionaryvaluecollectionenumeratorcurrent.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/dictionaryvaluecollectionenumeratorcurrent.cs
new file mode 100644
index 0000000000..294ab11d0e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/dictionaryvaluecollectionenumeratorcurrent.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// System.Collections.Generic.Dictionary.ValueCollection.Enumerator.Current
+/// </summary>
+public class DictionaryValueCollectionEnumeratorCurrent
+{
+ public static int Main()
+ {
+ DictionaryValueCollectionEnumeratorCurrent dicValCollectEnumCurrent = new DictionaryValueCollectionEnumeratorCurrent();
+ TestLibrary.TestFramework.BeginTestCase("DictionaryValueCollectionEnumeratorCurrent");
+ if (dicValCollectEnumCurrent.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the property Current in Dictionary ValueCollection Enumerator 1");
+ try
+ {
+ Dictionary<string, string>.ValueCollection.Enumerator valEnumer = new Dictionary<string, string>.ValueCollection.Enumerator();
+ if (valEnumer.Current != null)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ valEnumer.Dispose();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the property Current in Dictionary ValueCollection Enumerator 2");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("1", "test1");
+ Dictionary<string, string>.ValueCollection.Enumerator valEnumer = new Dictionary<string, string>.ValueCollection(dic).GetEnumerator();
+ while (valEnumer.MoveNext())
+ {
+ if (valEnumer.Current != "test1")
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ valEnumer.Dispose();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/dictionaryvaluecollectionenumeratordispose.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/dictionaryvaluecollectionenumeratordispose.cs
new file mode 100644
index 0000000000..e4f8cf99bb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/dictionaryvaluecollectionenumeratordispose.cs
@@ -0,0 +1,58 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// System.Collections.Generic.Dictionary.ValueCollection.Enumerator.Dispose()
+/// </summary>
+public class DictionaryValueCollectionEnumeratorDispose
+{
+ public static int Main()
+ {
+ DictionaryValueCollectionEnumeratorDispose dicValCollectEnumDis = new DictionaryValueCollectionEnumeratorDispose();
+ TestLibrary.TestFramework.BeginTestCase("DictionaryValueCollectionEnumeratorDispose");
+ if (dicValCollectEnumDis.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the Dispose method in Dictionary ValueCollection Enumerator 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("1", "test1");
+ dic.Add("2", "test2");
+ Dictionary<string, string>.ValueCollection.Enumerator ValEnumer1 = new Dictionary<string, string>.ValueCollection.Enumerator();
+ Dictionary<string, string>.ValueCollection.Enumerator ValEnumer2 = new Dictionary<string, string>.ValueCollection(dic).GetEnumerator();
+ ValEnumer2.Dispose();
+ ValEnumer1.Dispose();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/dictionaryvaluecollectionenumeratormovenext.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/dictionaryvaluecollectionenumeratormovenext.cs
new file mode 100644
index 0000000000..ef12d1e137
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/dictionaryvaluecollectionenumeratormovenext.cs
@@ -0,0 +1,90 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+/// <summary>
+/// System.Collections.Generic.Dictionary.ValueCollection.Enumerator.MoveNext()
+/// </summary>
+public class DictionaryValueCollectionEnumeratorMoveNext
+{
+ public static int Main()
+ {
+ DictionaryValueCollectionEnumeratorMoveNext dicValCollectEnumMoveNext = new DictionaryValueCollectionEnumeratorMoveNext();
+ TestLibrary.TestFramework.BeginTestCase("DictionaryValueCollectionEnumeratorMoveNext");
+ if (dicValCollectEnumMoveNext.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the MoveNext method in Dictionary ValueCollection Enumerator");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("1", "test1");
+ Dictionary<string, string>.ValueCollection.Enumerator ValEnumer1 = new Dictionary<string, string>.ValueCollection(dic).GetEnumerator();
+ if (ValEnumer1.Current != null || ValEnumer1.MoveNext() != true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ if (ValEnumer1.MoveNext())
+ {
+ TestLibrary.TestFramework.LogError("001.2", "The method MoveNext should return false but it did not");
+ }
+ ValEnumer1.Dispose();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The collection was modified after the enumerator was created");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("1", "test1");
+ Dictionary<string, string>.ValueCollection.Enumerator ValEnumer = new Dictionary<string, string>.ValueCollection(dic).GetEnumerator();
+ dic.Add("2", "test2");
+ bool boolVal = ValEnumer.MoveNext();
+ TestLibrary.TestFramework.LogError("N001", "The collection was modified after the enumerator was created but not throw exception");
+ retVal = false;
+ }
+ catch (InvalidOperationException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/valuecollectionenumeratorienumeratorcurrent.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/valuecollectionenumeratorienumeratorcurrent.cs
new file mode 100644
index 0000000000..7029bb5006
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/valuecollectionenumeratorienumeratorcurrent.cs
@@ -0,0 +1,94 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+/// <summary>
+/// Dictionary.ValueCollection.Enumerator.System.Collections.IEnumerator.Current
+/// </summary>
+public class ValueCollectionEnumeratorIEnumeratorCurrent
+{
+ public static int Main()
+ {
+ ValueCollectionEnumeratorIEnumeratorCurrent valCollectEnumerIEnumerCurrent = new ValueCollectionEnumeratorIEnumeratorCurrent();
+ TestLibrary.TestFramework.BeginTestCase("ValueCollectionEnumeratorIEnumeratorCurrent");
+ if (valCollectEnumerIEnumerCurrent.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the property Current in ValueCollection IEnumerator 1");
+ try
+ {
+ Dictionary<TestClass, TestClass> dic = new Dictionary<TestClass, TestClass>();
+ TestClass Tkey1 = new TestClass();
+ TestClass TVal1 = new TestClass();
+ dic.Add(Tkey1, TVal1);
+ IEnumerator valEnumerIEnumer = (IEnumerator)new Dictionary<TestClass, TestClass>.ValueCollection(dic).GetEnumerator();
+ while (valEnumerIEnumer.MoveNext())
+ {
+ if (!valEnumerIEnumer.Current.Equals(TVal1))
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the property Current in ValueCollection IEnumerator 2");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("1", "test1");
+ IEnumerator valEnumerIEnumer = (IEnumerator)new Dictionary<string, string>.ValueCollection(dic).GetEnumerator();
+ while (valEnumerIEnumer.MoveNext())
+ {
+ if (valEnumerIEnumer.Current.ToString() != "test1")
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass { }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/valuecollectionenumeratorienumeratorreset.cs b/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/valuecollectionenumeratorienumeratorreset.cs
new file mode 100644
index 0000000000..d742edc810
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/dictvalcollenum/valuecollectionenumeratorienumeratorreset.cs
@@ -0,0 +1,124 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Collections;
+/// <summary>
+///
+/// </summary>
+public class ValueCollectionEnumeratorIEnumeratorReset
+{
+ public static int Main()
+ {
+ ValueCollectionEnumeratorIEnumeratorReset valCollectEnumerIEnumerReset = new ValueCollectionEnumeratorIEnumeratorReset();
+ TestLibrary.TestFramework.BeginTestCase("ValueCollectionEnumeratorIEnumeratorReset");
+ if (valCollectEnumerIEnumerReset.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Invoke the method Reset in the ValueCollection IEnumerator 1");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ dic.Add("1", "test1");
+ dic.Add("2", "test2");
+ IEnumerator valcollectIEnumer = (IEnumerator)new Dictionary<string, string>.ValueCollection(dic).GetEnumerator();
+ while (valcollectIEnumer.MoveNext()) { }
+ valcollectIEnumer.Reset();
+ if (valcollectIEnumer.MoveNext())
+ {
+ if (valcollectIEnumer.Current.ToString() != "test1")
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Invoke the method Reset in the ValueCollection IEnumerator 2");
+ try
+ {
+ Dictionary<TestClass, TestClass> dic = new Dictionary<TestClass, TestClass>();
+ TestClass Tkey1 = new TestClass();
+ TestClass TVal1 = new TestClass();
+ dic.Add(Tkey1, TVal1);
+ IEnumerator valcollectIEnumer = (IEnumerator)new Dictionary<TestClass, TestClass>.ValueCollection(dic).GetEnumerator();
+ while (valcollectIEnumer.MoveNext()) { }
+ valcollectIEnumer.Reset();
+ if (valcollectIEnumer.MoveNext())
+ {
+ if (!valcollectIEnumer.Current.Equals(TVal1))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The collection was modified after the enumerator was created");
+ try
+ {
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ IEnumerator valcollectIEnumer = (IEnumerator)new Dictionary<string, string>.ValueCollection(dic).GetEnumerator();
+ dic.Add("str1", "helloworld");
+ valcollectIEnumer.Reset();
+ TestLibrary.TestFramework.LogError("N001", "The collection was modified after the enumerator was created but not throw exception");
+ retVal = false;
+ }
+ catch (InvalidOperationException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass { }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/EqualityComparerEquals.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/EqualityComparerEquals.csproj
new file mode 100644
index 0000000000..3354790e92
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/EqualityComparerEquals.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="equalitycomparerequals.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/EqualityComparerGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/EqualityComparerGetHashCode.csproj
new file mode 100644
index 0000000000..eb40f68a98
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/EqualityComparerGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="equalitycomparergethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/EqulityComparerDefault.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/EqulityComparerDefault.csproj
new file mode 100644
index 0000000000..a2e9070de5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/EqulityComparerDefault.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="equlitycomparerdefault.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/equalitycomparerequals.cs b/tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/equalitycomparerequals.cs
new file mode 100644
index 0000000000..6c402f16cb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/equalitycomparerequals.cs
@@ -0,0 +1,233 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+
+/// <summary>
+/// System.Collections.Generic.EqualityComparer.Equals(T,T)
+/// </summary>
+public class GenericEqualityComparerEquals
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ public static int Main(string[] args)
+ {
+ GenericEqualityComparerEquals testObj = new GenericEqualityComparerEquals();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Methord: System.Collections.Generic.EqualityComparer.Equals(T,T)");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify EqualityCompare.Equals(T,T) when Type is int...";
+ const string c_TEST_ID = "P001";
+
+ MyEqualityComparer<int> myEC = new MyEqualityComparer<int>();
+ int x = TestLibrary.Generator.GetInt32(-55);
+ int y = x;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (!myEC.Equals(x, y))
+ {
+ string errorDesc = "result should be true when two int both is 1";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Verify the EqualityComparer.Equals(T,T) when T is reference type... ";
+ const string c_TEST_ID = "P002";
+
+ String str1 = TestLibrary.Generator.GetString(-55, false,c_MINI_STRING_LENGTH,c_MAX_STRING_LENGTH);
+ String str2 = str1;
+ MyEqualityComparer<String> myEC = new MyEqualityComparer<String>();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (!myEC.Equals(str1, str2))
+ {
+ string errorDesc = "result should be true when two String object is the same reference";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: Verify EqualityCompare.Equals(T,T) when Type is user-defined class... ";
+ const string c_TEST_ID = "P003";
+
+ MyEqualityComparer<MyClass> myEC = new MyEqualityComparer<MyClass>();
+ MyClass myClass1 = new MyClass();
+ MyClass myClass2 = myClass1;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (!myEC.Equals(myClass1, myClass2))
+ {
+ string errorDesc = "result should be true when two MyClass object is the same reference";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest4: Verify EqualityCompare.Equals(T,T) when two parameters are null reference... ";
+ const string c_TEST_ID = "P004";
+
+ MyEqualityComparer<String> myEC = new MyEqualityComparer<String>();
+ String str1 = null;
+ String str2 = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (!myEC.Equals(str2, str1))
+ {
+ string errorDesc = "result should be true when two DateTime object is null reference";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest5: Verify EqualityCompare.Equals(T,T) when a parameters is a null reference and another is not... ";
+ const string c_TEST_ID = "P005";
+
+ MyEqualityComparer<String> myEC = new MyEqualityComparer<String>();
+ String str1 = null;
+ String str2 = TestLibrary.Generator.GetString(-55, false,c_MINI_STRING_LENGTH,c_MAX_STRING_LENGTH);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (myEC.Equals(str1, str2))
+ {
+ string errorDesc = "result should be false when a String is null and another is not";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Help Class
+ public class MyEqualityComparer<T> : EqualityComparer<T>
+ {
+
+ public override bool Equals(T x, T y)
+ {
+ if (x != null)
+ {
+ if (y != null) return x.Equals(y);
+ return false;
+ }
+ if (y != null) return false;
+ return true;
+ }
+
+ public override int GetHashCode(T obj)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ }
+
+ public class MyClass
+ {
+
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/equalitycomparergethashcode.cs b/tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/equalitycomparergethashcode.cs
new file mode 100644
index 0000000000..965373285e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/equalitycomparergethashcode.cs
@@ -0,0 +1,201 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+
+/// <summary>
+/// System.Collections.Generic.EqualityComparer.GetHashCode(T)
+/// </summary>
+public class GenericEqualityComparerGetHashCode
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ public static int Main(string[] args)
+ {
+ GenericEqualityComparerGetHashCode testObj = new GenericEqualityComparerGetHashCode();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Methord: System.Collections.Generic.EqualityComparer.GetHashCode(T)");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Netativ]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify EqualityCompare.Equals(T,T) when Type is int...";
+ const string c_TEST_ID = "P001";
+
+ MyEqualityComparer<int> myEC = new MyEqualityComparer<int>();
+ int x = TestLibrary.Generator.GetInt32(-55);
+
+ int expectedValue = x.GetHashCode();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int actualValue = myEC.GetHashCode(x);
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + actualValue + " as expected: Actual(" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Verify EqualityCompare.Equals(T,T) when Type is a reference type...";
+ const string c_TEST_ID = "P002";
+
+ MyEqualityComparer<String> myEC = new MyEqualityComparer<String>();
+ string str = TestLibrary.Generator.GetString(-55, false,c_MINI_STRING_LENGTH,c_MAX_STRING_LENGTH);
+
+ int expectedValue = str.GetHashCode();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int actualValue = myEC.GetHashCode(str);
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + actualValue + " as expected: Actual(" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: Verify EqualityCompare.Equals(T,T) when Type is a reference type...";
+ const string c_TEST_ID = "P003";
+
+ MyEqualityComparer<MyClass> myEC = new MyEqualityComparer<MyClass>();
+ MyClass myclass1 = new MyClass();
+
+ int expectedValue = myclass1.GetHashCode();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int actualValue = myEC.GetHashCode(myclass1);
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + actualValue + " as expected: Actual(" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: object is a null reference";
+ const string c_TEST_ID = "N001";
+
+ MyEqualityComparer<MyClass> myEC = new MyEqualityComparer<MyClass>();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ myEC.GetHashCode(null);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, "ArgumentNullException is not thrown as expected." );
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e );
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Help Class
+ public class MyEqualityComparer<T> : EqualityComparer<T>
+ {
+
+ public override bool Equals(T x, T y)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public override int GetHashCode(T obj)
+ {
+ if (obj == null)
+ throw new ArgumentNullException();
+ return obj.GetHashCode();
+ }
+ }
+
+ public class MyClass
+ {
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/equlitycomparerdefault.cs b/tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/equlitycomparerdefault.cs
new file mode 100644
index 0000000000..b114c1f616
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/equalitycomparer/equlitycomparerdefault.cs
@@ -0,0 +1,186 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+
+/// <summary>
+/// System.Collections.Generic.EqualityComparer.Default
+/// </summary>
+public class GenericEqualityComparerDefault
+{
+
+ public static int Main(string[] args)
+ {
+ GenericEqualityComparerDefault testObj = new GenericEqualityComparerDefault();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Property: System.Collections.Generic.EqualityComparer.Default)");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify EqualityComparer.Defalut when Type is int ...";
+ const string c_TEST_ID = "P001";
+
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ EqualityComparer<int> defaultEC = EqualityComparer<int>.Default;
+
+ if (defaultEC == null)
+ {
+ string errorDesc = "Value should be not null";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Verify EqualityComparer.Defalut when Type is byte ...";
+ const string c_TEST_ID = "P002";
+
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ EqualityComparer<byte> defaultEC = EqualityComparer<byte>.Default;
+ if (defaultEC == null)
+ {
+ string errorDesc = "Value is not EqualityComparer<byte>";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: Verify EqualityComparer.Defalut when Type is reference type ...";
+ const string c_TEST_ID = "P003";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ EqualityComparer<Random> defaultEC = EqualityComparer<Random>.Default;
+ if (defaultEC == null)
+ {
+ string errorDesc = "Value should be not null";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest4: Verify EqualityComparer.Defalut when Type is a user-defined type ...";
+ const string c_TEST_ID = "P004";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ EqualityComparer<MyClass> defaultEC = EqualityComparer<MyClass>.Default;
+ if (defaultEC == null)
+ {
+ string errorDesc = "Value should be not null";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Help Class
+ public class MyEqualityComparer<T> : EqualityComparer<T>
+ {
+
+ public override bool Equals(T x, T y)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public override int GetHashCode(T obj)
+ {
+ if (obj == null)
+ throw new ArgumentNullException();
+ return obj.GetHashCode();
+ }
+
+ }
+ public class MyClass
+ {
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionAdd.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionAdd.csproj
new file mode 100644
index 0000000000..9dbe8f4c48
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionAdd.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="icollectionadd.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionClear.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionClear.csproj
new file mode 100644
index 0000000000..bf70d0fdc6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionClear.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="icollectionclear.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionContains.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionContains.csproj
new file mode 100644
index 0000000000..6edb71211f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionContains.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="icollectioncontains.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionCopyTo.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionCopyTo.csproj
new file mode 100644
index 0000000000..bf1365484c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionCopyTo.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="icollectioncopyto.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionCount.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionCount.csproj
new file mode 100644
index 0000000000..0103f9f135
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionCount.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="icollectioncount.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionIsReadOnly.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionIsReadOnly.csproj
new file mode 100644
index 0000000000..45de3a4f3e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionIsReadOnly.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="icollectionisreadonly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionRemove.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionRemove.csproj
new file mode 100644
index 0000000000..13dffce182
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/ICollectionRemove.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="icollectionremove.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectionadd.cs b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectionadd.cs
new file mode 100644
index 0000000000..0cbc468cdb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectionadd.cs
@@ -0,0 +1,253 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+
+/// <summary>
+/// System.Collections.Generic.ICollection.Add(T)
+/// </summary>
+public class ICollectionAdd
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ public static int Main(string[] args)
+ {
+ ICollectionAdd testObj = new ICollectionAdd();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Methord: System.Collections.Generic.ICollection.Add(T)");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Netativ]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Using List<T> which implemented the add method in ICollection<T> and Type is int...";
+ const string c_TEST_ID = "P001";
+
+ List<int> list = new List<int>();
+ int item1 = TestLibrary.Generator.GetInt32(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ((ICollection<int>)list).Add(item1);
+ if (list[0] != item1)
+ {
+ string errorDesc = "Value is not " + list[0] + " as expected: Actual(" + item1 + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Using List<T> which implemented the add method in ICollection<T> and Type is a reference type...";
+ const string c_TEST_ID = "P002";
+
+ List<String> list = new List<String>();
+ String item1 = TestLibrary.Generator.GetString(-55, false,c_MINI_STRING_LENGTH,c_MAX_STRING_LENGTH);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ((ICollection<String>)list).Add(item1);
+ if (list[0] != item1)
+ {
+ string errorDesc = "Value is not " + list[0] + " as expected: Actual(" + item1 + ")";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: Using List<T> which implemented the add method in ICollection<T> and Type is a reference type...";
+ const string c_TEST_ID = "P003";
+
+ MyCollection<int> myC = new MyCollection<int>();
+ int item1 = TestLibrary.Generator.GetInt32(-55);
+ int count = 1;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ((ICollection<int>)myC).Add(item1);
+ if (myC.Count != count)
+ {
+ string errorDesc = "Value have not been add to ICollection<T>";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Using user-defined type which is readonly");
+
+ MyCollection<int> myC = new MyCollection<int>();
+ myC.isReadOnly = true;
+ int item1 = TestLibrary.Generator.GetInt32(-55);
+
+ try
+ {
+ ((ICollection<int>)myC).Add(item1);
+ TestLibrary.TestFramework.LogError("007", "The NotSupportedException was not thrown as expected");
+ retVal = false;
+ }
+ catch (NotSupportedException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Help Class
+ public class MyCollection<T> : ICollection<T>
+ {
+ public T[] value;
+ protected int length;
+ public bool isReadOnly = false;
+
+ public MyCollection()
+ {
+ value =new T[10];
+ length = 0;
+ }
+
+ #region ICollection<T> Members
+ public void Add(T item)
+ {
+ if (isReadOnly)
+ {
+ throw new NotSupportedException();
+ }
+ else
+ {
+ value[length] = item;
+ length++;
+ }
+ }
+
+ public void Clear()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool Contains(T item)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public void CopyTo(T[] array, int arrayIndex)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int Count
+ {
+ get { return length;}
+ }
+
+ public bool IsReadOnly
+ {
+ get { return isReadOnly; }
+ }
+
+ public bool Remove(T item)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ #region IEnumerable<T> Members
+
+ public IEnumerator<T> GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ #region IEnumerable Members
+
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectionclear.cs b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectionclear.cs
new file mode 100644
index 0000000000..4f0e41d7c5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectionclear.cs
@@ -0,0 +1,318 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+
+/// <summary>
+/// System.Collections.Generic.ICollection<T>.Clear()
+/// </summary>
+public class ICollectionClear
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ public static int Main(string[] args)
+ {
+ ICollectionClear testObj = new ICollectionClear();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Methord: System.Collections.Generic.ICollection<T>.Clear())");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Netativ]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Using List<T> which implemented the Clear method in ICollection<T> and Type is Byte...";
+ const string c_TEST_ID = "P001";
+
+ Byte[] byteValue = new Byte[10];
+ TestLibrary.Generator.GetBytes(-55, byteValue);
+
+ List<Byte> list = new List<Byte>(byteValue);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ((ICollection<Byte>)list).Clear();
+ if (list.Count != 0)
+ {
+ string errorDesc = "ICollection.Count is not " + list.Count.ToString() + " as expected: Actual(0)";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Using List<T> which implemented the Clear method in ICollection<T> and Type is a reference type...";
+ const string c_TEST_ID = "P002";
+
+ String[] strValue = new String[10];
+ for (int i = 0; i < 10; i++)
+ {
+ strValue[i] = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ }
+ List<String> list = new List<String>(strValue);
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ((ICollection<String>)list).Clear();
+ if (list.Count != 0)
+ {
+ string errorDesc = "ICollection.Count is not 0 as expected: Actual(" + list.Count.ToString() + ")";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: Using List<T> which implemented the Clear method in ICollection<T> and Type is a user-defined type...";
+ const string c_TEST_ID = "P003";
+
+ MyClass[] mcValue = new MyClass[10];
+ for (int i = 0; i < 10; i++)
+ {
+ mcValue[i] = new MyClass();
+ }
+ List<MyClass> list = new List<MyClass>(mcValue);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ((ICollection<MyClass>)list).Clear();
+ if (list.Count != 0)
+ {
+ string errorDesc = "ICollection.Count is not 0 as expected: Actual(" + list.Count.ToString() + ")";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest4: Using customer class which implemented the Clear method in ICollection<T> and Type is int...";
+ const string c_TEST_ID = "P004";
+
+ MyCollection<int> myC = new MyCollection<int>();
+ for (int i = 0; i < 10; i++)
+ {
+ myC.Add(TestLibrary.Generator.GetInt32(-55));
+ }
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ((ICollection<int>)myC).Clear();
+ if (myC.Count != 0)
+ {
+ string errorDesc = "ICollection.Count is not 0 as expected: Actual(" + myC.Count.ToString() + ")";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Using user-defined type which is readonly");
+
+ MyCollection<int> myC = new MyCollection<int>();
+ myC.isReadOnly = true;
+
+ try
+ {
+ ((ICollection<int>)myC).Clear();
+ TestLibrary.TestFramework.LogError("009", "The NotSupportedException was not thrown as expected");
+ retVal = false;
+ }
+ catch (NotSupportedException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Help Class
+ public class MyCollection<T> : ICollection<T>
+ {
+ public T[] _items;
+ protected int length;
+ public bool isReadOnly = false;
+
+ public MyCollection()
+ {
+ _items = new T[10];
+ length = 0;
+ }
+
+ public T this[int index]
+ {
+ get
+ {
+ // Fllowing trick can reduce the range check by one
+ if ((uint)index >= (uint)length)
+ {
+ throw new ArgumentOutOfRangeException();
+ }
+ return _items[index];
+ }
+
+ }
+
+ #region ICollection<T> Members
+ public void Add(T item)
+ {
+ if (isReadOnly)
+ {
+ throw new NotSupportedException();
+ }
+ else
+ {
+ _items[length] = item;
+ length++;
+ }
+ }
+
+ public void Clear()
+ {
+ if (isReadOnly)
+ {
+ throw new NotSupportedException();
+ }
+ else
+ {
+ Array.Clear(_items, 0, length);
+ length = 0;
+ }
+ }
+
+ public bool Contains(T item)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public void CopyTo(T[] array, int arrayIndex)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int Count
+ {
+ get { return length; }
+ }
+
+ public bool IsReadOnly
+ {
+ get { return isReadOnly; }
+ }
+
+ public bool Remove(T item)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ #region IEnumerable<T> Members
+
+ public IEnumerator<T> GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ #region IEnumerable Members
+
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+ }
+ public class MyClass
+ {}
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectioncontains.cs b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectioncontains.cs
new file mode 100644
index 0000000000..da876359c1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectioncontains.cs
@@ -0,0 +1,376 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+
+/// <summary>
+/// System.Collections.Generic.ICollection<T>.Contains(T)
+/// </summary>
+public class ICollectionContains
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ public static int Main(string[] args)
+ {
+ ICollectionContains testObj = new ICollectionContains();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Methord: System.Collections.Generic.ICollection<T>.Contains(T)");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Using List<T> which implemented the Contanins method in ICollection<T> and Type is Byte...";
+ const string c_TEST_ID = "P001";
+
+ Byte[] byteValue = new Byte[10];
+ TestLibrary.Generator.GetBytes(-55, byteValue);
+
+ List<Byte> list = new List<Byte>(byteValue);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ bool contains = ((ICollection<Byte>)list).Contains(byteValue[1]);
+ if (!contains)
+ {
+ string errorDesc = "Value is not false as expected: Actual is true";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Using List<T> which implemented the Contanins method in ICollection<T> and Type is a reference type...";
+ const string c_TEST_ID = "P002";
+
+ String[] strValue = new String[10];
+ for (int i = 0; i < 10; i++)
+ {
+ strValue[i] = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ }
+ List<String> list = new List<String>(strValue);
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ bool contains = ((ICollection<String>)list).Contains(strValue[1]);
+ if (!contains)
+ {
+ string errorDesc = "Value is not false as expected: Actual is true";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: Using List<T> which implemented the Contanins method in ICollection<T> and Type is a user-defined type...";
+ const string c_TEST_ID = "P003";
+
+ MyClass[] mcValue = new MyClass[10];
+ for (int i = 0; i < 10; i++)
+ {
+ mcValue[i] = new MyClass();
+ }
+ List<MyClass> list = new List<MyClass>(mcValue);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ bool contains = ((ICollection<MyClass>)list).Contains(mcValue[1]);
+ if (!contains)
+ {
+ string errorDesc = "Value is not false as expected: Actual is true";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest4: Verify the List<T> doesn't contain a null object...";
+ const string c_TEST_ID = "P004";
+
+ String[] strValue = new String[10];
+ for (int i = 0; i < 10; i++)
+ {
+ strValue[i] = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ }
+ List<String> list = new List<String>(strValue);
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ bool contains = ((ICollection<String>)list).Contains(null);
+ if (contains)
+ {
+ string errorDesc = "Value is not true as expected: Actual is false";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest5: Verify the List<T> contains a null object...";
+ const string c_TEST_ID = "P005";
+
+ String[] strValue = new String[10];
+ for (int i = 0; i < 9; i++)
+ {
+ strValue[i] = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ }
+ strValue[9] = null;
+ List<String> list = new List<String>(strValue);
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ bool contains = ((ICollection<String>)list).Contains(null);
+ if (!contains)
+ {
+ string errorDesc = "Value is not false as expected: Actual is true";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest6: Using customer class which implemented the Contanins method in ICollection<T> and Type is int...";
+ const string c_TEST_ID = "P006";
+
+ int value = TestLibrary.Generator.GetInt32(-55);
+ MyCollection<int> myC = new MyCollection<int>();
+ for (int i = 0; i < 10; i++)
+ {
+ value = TestLibrary.Generator.GetInt32(-55);
+ myC.Add(value);
+ }
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ bool contains = ((ICollection<int>)myC).Contains(value);
+ if (!contains)
+ {
+ string errorDesc = "Value is not false as expected: Actual is true";
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+
+ #region Help Class
+ public class MyCollection<T> : ICollection<T>
+ {
+ public T[] _items;
+ protected int length;
+ public bool isReadOnly = false;
+
+ public MyCollection()
+ {
+ _items = new T[10];
+ length = 0;
+ }
+
+ public T this[int index]
+ {
+ get
+ {
+ // Fllowing trick can reduce the range check by one
+ if ((uint)index >= (uint)length)
+ {
+ throw new ArgumentOutOfRangeException();
+ }
+ return _items[index];
+ }
+
+ }
+
+ #region ICollection<T> Members
+ public void Add(T item)
+ {
+ if (isReadOnly)
+ {
+ throw new NotSupportedException();
+ }
+ else
+ {
+ _items[length] = item;
+ length++;
+ }
+ }
+
+ public void Clear()
+ {
+ if (isReadOnly)
+ {
+ throw new NotSupportedException();
+ }
+ else
+ {
+ Array.Clear(_items, 0, length);
+ length = 0;
+ }
+ }
+
+ public bool Contains(T item)
+ {
+ if ((Object)item == null)
+ {
+ for (int i = 0; i < length; i++)
+ if ((Object)_items[i] == null)
+ return true;
+ return false;
+ }
+ else
+ {
+ EqualityComparer<T> c = EqualityComparer<T>.Default;
+ for (int i = 0; i < length; i++)
+ {
+ if (c.Equals(_items[i], item)) return true;
+ }
+ return false;
+ }
+ }
+
+ public void CopyTo(T[] array, int arrayIndex)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int Count
+ {
+ get { return length; }
+ }
+
+ public bool IsReadOnly
+ {
+ get { return isReadOnly; }
+ }
+
+ public bool Remove(T item)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ #region IEnumerable<T> Members
+
+ public IEnumerator<T> GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ #region IEnumerable Members
+
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+ }
+ public class MyClass
+ { }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectioncopyto.cs b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectioncopyto.cs
new file mode 100644
index 0000000000..b7c3c8589e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectioncopyto.cs
@@ -0,0 +1,527 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+
+/// <summary>
+/// System.Collections.Generic.ICollection<T>.CopyTo(T[],System.Int32)
+/// </summary>
+public class ICollectionCopyTo
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ public static int Main(string[] args)
+ {
+ ICollectionCopyTo testObj = new ICollectionCopyTo();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Methord: System.Collections.Generic.ICollection<T>.CopyTo(T[],System.Int32)");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Netativ]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Using List<T> which implemented the CopyTo method in ICollection<T> and Type is Byte...";
+ const string c_TEST_ID = "P001";
+
+ int capacity = 10;
+ Byte[] byteValue = new Byte[capacity];
+ TestLibrary.Generator.GetBytes(-55, byteValue);
+ List<Byte> list = new List<Byte>(byteValue);
+
+ Byte[] array = new Byte[capacity];
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ((ICollection<Byte>)list).CopyTo(array,0);
+ for(int i=0;i<capacity;i++)
+ {
+ if (list[i] != array[i])
+ {
+ string errorDesc = "Value is not " + list[i].ToString() + " as expected: Actual(" + array[i].ToString() + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Using List<T> which implemented the CopyTo method in ICollection<T> and Type is a reference type...";
+ const string c_TEST_ID = "P002";
+
+ int capacity = 10;
+ String[] strValue = new String[capacity];
+ for (int i = 0; i < capacity; i++)
+ {
+ strValue[i] = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ }
+ List<String> list = new List<String>(strValue);
+
+ String[] array = new String[capacity];
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ((ICollection<String>)list).CopyTo(array,0);
+ for(int i=0;i<capacity;i++)
+ {
+ if (list[i] != array[i])
+ {
+ string errorDesc = "Value is not " + list[i] + " as expected: Actual(" + array[i]+ ")";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: Using List<T> which implemented the CopyTo method in ICollection<T> and Type is a user-defined type...";
+ const string c_TEST_ID = "P003";
+
+ int capacity = 10;
+ List<MyClass> list = new List<MyClass>();
+ for (int i = 0; i < capacity; i++)
+ {
+ list.Add(new MyClass());
+ }
+
+ MyClass[] array = new MyClass[10];
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ((ICollection<MyClass>)list).CopyTo(array,0);
+ for(int i=0;i<capacity;i++)
+ {
+ if (list[i] != array[i])
+ {
+ string errorDesc = "Value is not " + list[i].ToString() + " as expected: Actual(" + array[i].ToString()+ ")";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest4: Using customer class which implemented the CopyTo method in ICollection<T> and Type is int...";
+ const string c_TEST_ID = "P004";
+
+ int capacity = 10;
+ MyCollection<int> myC = new MyCollection<int>();
+ for (int i = 0; i < capacity; i++)
+ {
+ myC.Add(TestLibrary.Generator.GetInt32(-55));
+ }
+
+ int[] array = new int[capacity];
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ((ICollection<int>)myC).CopyTo(array, 0);
+ for (int i = 0; i < capacity; i++)
+ {
+ if (myC[i] != array[i])
+ {
+ string errorDesc = "Value is not " + myC[i].ToString() + " as expected: Actual(" + array[i].ToString() + ")";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest5: Using List<T> which implemented the CopyTo method in ICollection<T> and Index is greater than zero...";
+ const string c_TEST_ID = "P005";
+
+ int capacity = 10;
+ Byte[] byteValue = new Byte[capacity];
+ TestLibrary.Generator.GetBytes(-55, byteValue);
+ List<Byte> list = new List<Byte>(byteValue);
+
+ Random rand = new Random(-55);
+ int index = rand.Next(1, 100);
+ Byte[] array = new Byte[capacity+index];
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ((ICollection<Byte>)list).CopyTo(array, index);
+ for (int i = 0; i < capacity; i++)
+ {
+ if (list[i] != array[i+index])
+ {
+ string errorDesc = "Value is not " + list[i].ToString() + " as expected: Actual(" + array[i+index].ToString() + ")";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest1: Using List<T> which implemented the CopyTo method in ICollection<T> and Array is a null reference...";
+ const string c_TEST_ID = "N001";
+
+ int capacity = 10;
+ Byte[] byteValue = new Byte[capacity];
+ TestLibrary.Generator.GetBytes(-55, byteValue);
+ List<Byte> list = new List<Byte>(byteValue);
+
+ Byte[] array = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ((ICollection<Byte>)list).CopyTo(array, 0);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest2: Using List<T> which implemented the CopyTo method in ICollection<T> and arrayIndex is less than zero...";
+ const string c_TEST_ID = "N002";
+
+ int capacity = 10;
+ Byte[] byteValue = new Byte[capacity];
+ TestLibrary.Generator.GetBytes(-55, byteValue);
+ List<Byte> list = new List<Byte>(byteValue);
+
+ Byte[] array = new Byte[capacity];
+ int index =TestLibrary.Generator.GetInt32(-55);
+ index = -index;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ((ICollection<Byte>)list).CopyTo(array, index);
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, "The ArgumentOutOfRangeException was not thrown as expected when arrayindex is " + index.ToString());
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest3: Using List<T> which implemented the CopyTo method in ICollection<T> and arrayIndex is equal length of array...";
+ const string c_TEST_ID = "N003";
+
+ int capacity = 10;
+ Byte[] byteValue = new Byte[capacity];
+ TestLibrary.Generator.GetBytes(-55, byteValue);
+ List<Byte> list = new List<Byte>(byteValue);
+
+ Byte[] array = new Byte[capacity];
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ((ICollection<Byte>)list).CopyTo(array, capacity);
+ TestLibrary.TestFramework.LogError("015" + " TestId-" + c_TEST_ID, "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest4: Using List<T> which implemented the CopyTo method in ICollection<T> and arrayIndex is grater than length of array...";
+ const string c_TEST_ID = "N004";
+
+ int capacity = 10;
+ Byte[] byteValue = new Byte[capacity];
+ TestLibrary.Generator.GetBytes(-55, byteValue);
+ List<Byte> list = new List<Byte>(byteValue);
+
+ Random rand = new Random(-55);
+ int index = rand.Next(capacity, 100);
+ Byte[] array = new Byte[capacity];
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ((ICollection<Byte>)list).CopyTo(array, index);
+ TestLibrary.TestFramework.LogError("017" + " TestId-" + c_TEST_ID, "The ArgumentException was not thrown as expected when arrayindex is " + index.ToString());
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest5: Using List<T> which implemented the CopyTo method in ICollection<T> and The number of elements in the list<T> is greater than the available space from arrayIndex to the end of array...";
+ const string c_TEST_ID = "N005";
+
+ int capacity = 10;
+ Byte[] byteValue = new Byte[capacity];
+ TestLibrary.Generator.GetBytes(-55, byteValue);
+ List<Byte> list = new List<Byte>(byteValue);
+
+ Random rand = new Random(-55);
+ int index = rand.Next(1, 10);
+ Byte[] array = new Byte[capacity];
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ((ICollection<Byte>)list).CopyTo(array, index);
+ TestLibrary.TestFramework.LogError("019" + " TestId-" + c_TEST_ID, "The ArgumentException was not thrown as expected when arrayindex is " + index.ToString());
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Help Class
+ public class MyCollection<T> : ICollection<T>
+ {
+ public T[] _items;
+ protected int length;
+ public bool isReadOnly = false;
+
+ public MyCollection()
+ {
+ _items = new T[10];
+ length = 0;
+ }
+
+ public T this[int index]
+ {
+ get
+ {
+ // Fllowing trick can reduce the range check by one
+ if ((uint)index >= (uint)length)
+ {
+ throw new ArgumentOutOfRangeException();
+ }
+ return _items[index];
+ }
+
+ }
+
+ #region ICollection<T> Members
+ public void Add(T item)
+ {
+ if (isReadOnly)
+ {
+ throw new NotSupportedException();
+ }
+ else
+ {
+ _items[length] = item;
+ length++;
+ }
+ }
+
+ public void Clear()
+ {
+ if (isReadOnly)
+ {
+ throw new NotSupportedException();
+ }
+ else
+ {
+ Array.Clear(_items, 0, length);
+ length = 0;
+ }
+ }
+
+ public bool Contains(T item)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public void CopyTo(T[] array, int arrayIndex)
+ {
+ Array.Copy(_items, 0, array, arrayIndex, length);
+ }
+
+ public int Count
+ {
+ get { return length; }
+ }
+
+ public bool IsReadOnly
+ {
+ get { return isReadOnly; }
+ }
+
+ public bool Remove(T item)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ #region IEnumerable<T> Members
+
+ public IEnumerator<T> GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ #region IEnumerable Members
+
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+ }
+ public class MyClass
+ { }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectioncount.cs b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectioncount.cs
new file mode 100644
index 0000000000..a70e541128
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectioncount.cs
@@ -0,0 +1,273 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+
+/// <summary>
+/// System.Collections.Generic.ICollection.Count
+/// </summary>
+public class ICollectionCount
+{
+ public static int Main(string[] args)
+ {
+ ICollectionCount testObj = new ICollectionCount();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Property: System.Collections.Generic.ICollection.Count");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify the Count of empty List<T> which implemented the Count property in ICollection<T> is 0...";
+ const string c_TEST_ID = "P001";
+
+ List<int> list = new List<int>();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (((ICollection<int>)list).Count != 0)
+ {
+ string errorDesc = "Count is not 0 as expected: Actual is "+list.Count;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Using List<T> which implemented the Count property in ICollection<T> and Type is a reference type...";
+ const string c_TEST_ID = "P002";
+
+ List<String> list = new List<String>();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (((ICollection<String>)list).Count != 0)
+ {
+ string errorDesc = "Count is not 0 as expected: Actual is " + list.Count;
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: Using List<T> which implemented the Count property in ICollection<T> and count is not zero...";
+ const string c_TEST_ID = "P003";
+
+ List<int> list = new List<int>();
+ int count = 10;
+ for (int i = 0; i < count; i++)
+ {
+ list.Add(TestLibrary.Generator.GetInt32(-55));
+ }
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (((ICollection<int>)list).Count != 10)
+ {
+ string errorDesc = "Count is not 10 as expected: Actual is " + list.Count;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest4: Using custome class which implemented the Count property in ICollection<T>...";
+ const string c_TEST_ID = "P004";
+
+ MyCollection<int> myC = new MyCollection<int>();
+ int count = 10;
+ for (int i = 0; i <count; i++)
+ {
+ myC.Add(TestLibrary.Generator.GetInt32(-55));
+ }
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (((ICollection<int>)myC).Count != 10)
+ {
+ string errorDesc = "Count is not 10 as expected: Actual is " + myC.Count;
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Help Class
+ public class MyCollection<T> : ICollection<T>
+ {
+ public T[] _items;
+ protected int length;
+ public bool isReadOnly = false;
+
+ public MyCollection()
+ {
+ _items = new T[10];
+ length = 0;
+ }
+
+ #region ICollection<T> Members
+ public void Add(T item)
+ {
+ if (isReadOnly)
+ {
+ throw new NotSupportedException();
+ }
+ else
+ {
+ _items[length] = item;
+ length++;
+ }
+ }
+
+ public void Clear()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool Contains(T item)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public void CopyTo(T[] array, int arrayIndex)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int Count
+ {
+ get { return length; }
+ }
+
+ public bool IsReadOnly
+ {
+ get { return isReadOnly; }
+ }
+
+ public bool Remove(T item)
+ {
+ if (isReadOnly)
+ {
+ throw new NotSupportedException();
+ }
+ int index = Array.IndexOf(_items, item, 0, length);
+ if (index < 0)
+ {
+ return false;
+ }
+ else
+ {
+ if ((uint)index >= (uint)length)
+ {
+ throw new ArgumentOutOfRangeException(); ;
+ }
+ length--;
+ if (index < length)
+ {
+ Array.Copy(_items, index + 1, _items, index, length - index);
+ }
+ _items[length] = default(T);
+
+ return true;
+ }
+ }
+
+ #endregion
+
+ #region IEnumerable<T> Members
+
+ public IEnumerator<T> GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ #region IEnumerable Members
+
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectionisreadonly.cs b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectionisreadonly.cs
new file mode 100644
index 0000000000..31a48d8dbd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectionisreadonly.cs
@@ -0,0 +1,235 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+
+/// <summary>
+/// System.Collections.Generic.ICollection.IsReadOnly
+/// </summary>
+public class ICollectionIsReadOnly
+{
+
+ public static int Main(string[] args)
+ {
+ ICollectionIsReadOnly testObj = new ICollectionIsReadOnly();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Property: System.Collections.Generic.ICollection.IsReadOnly");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify the IsReadOnly property of List<T> which implemented the IsReadOnly property in ICollection<T> is false...";
+ const string c_TEST_ID = "P001";
+
+ List<int> list = new List<int>();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (((ICollection<int>)list).IsReadOnly)
+ {
+ string errorDesc = "the IsReadOnly property of List<T> should be false";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Verify the IsReadOnly property of List<T> which implemented the IsReadOnly property in ICollection<T> and Type is reference Type is false...";
+ const string c_TEST_ID = "P002";
+
+ List<String> list = new List<String>();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (((ICollection<String>)list).IsReadOnly)
+ {
+ string errorDesc = "the IsReadOnly property of List<T> should be false";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: Using custome class which implemented the IsReadOnly property in ICollection<T>...";
+ const string c_TEST_ID = "P003";
+
+ MyCollection<int> myC = new MyCollection<int>();
+ myC.isReadOnly = true;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (!((ICollection<int>)myC).IsReadOnly)
+ {
+ string errorDesc = "the IsReadOnly property of MyCollection<int> should be true";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Help Class
+ public class MyCollection<T> : ICollection<T>
+ {
+ public T[] _items;
+ protected int length;
+ public bool isReadOnly = false;
+
+ public MyCollection()
+ {
+ _items = new T[10];
+ length = 0;
+ }
+
+ #region ICollection<T> Members
+ public void Add(T item)
+ {
+ if (isReadOnly)
+ {
+ throw new NotSupportedException();
+ }
+ else
+ {
+ _items[length] = item;
+ length++;
+ }
+ }
+
+ public void Clear()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool Contains(T item)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public void CopyTo(T[] array, int arrayIndex)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int Count
+ {
+ get { return length; }
+ }
+
+ public bool IsReadOnly
+ {
+ get { return isReadOnly; }
+ }
+
+ public bool Remove(T item)
+ {
+ if (isReadOnly)
+ {
+ throw new NotSupportedException();
+ }
+ int index = Array.IndexOf(_items, item, 0, length);
+ if (index < 0)
+ {
+ return false;
+ }
+ else
+ {
+ if ((uint)index >= (uint)length)
+ {
+ throw new ArgumentOutOfRangeException(); ;
+ }
+ length--;
+ if (index < length)
+ {
+ Array.Copy(_items, index + 1, _items, index, length - index);
+ }
+ _items[length] = default(T);
+
+ return true;
+ }
+ }
+
+ #endregion
+
+ #region IEnumerable<T> Members
+
+ public IEnumerator<T> GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ #region IEnumerable Members
+
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectionremove.cs b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectionremove.cs
new file mode 100644
index 0000000000..44ea554e79
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/icollection/icollectionremove.cs
@@ -0,0 +1,351 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+
+/// <summary>
+/// System.Collections.Generic.ICollection.Remove(T)
+/// </summary>
+public class ICollectionRemove
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ public static int Main(string[] args)
+ {
+ ICollectionRemove testObj = new ICollectionRemove();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Methord: System.Collections.Generic.ICollection.Remove(T)");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Netativ]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Using List<T> which implemented the Remove method in ICollection<T> and Type is int...";
+ const string c_TEST_ID = "P001";
+
+ List<int> list = new List<int>();
+ int item1 = TestLibrary.Generator.GetInt32(-55);
+ list.Add(item1);
+ for (int i = 1; i < 10; i++)
+ {
+ list.Add(TestLibrary.Generator.GetInt32(-55));
+ }
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (!((ICollection<int>)list).Remove(item1))
+ {
+ string errorDesc = "result is not true as expected: Actual is false";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (list.Count != 9)
+ {
+ string errorDesc = "List<T>.Count is not 9 as expected: Actual is "+list.Count;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Using List<T> which implemented the Remove method in ICollection<T> and Type is a reference type...";
+ const string c_TEST_ID = "P002";
+
+ List<String> list = new List<String>();
+ String item1 = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ list.Add(item1);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (!((ICollection<String>)list).Remove(item1))
+ {
+ string errorDesc = "result is not true as expected: Actual is false";
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (list.Count != 0)
+ {
+ string errorDesc = "List<T>.Count is not 0 as expected: Actual is " + list.Count;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: Using List<T> which implemented the Remove method in ICollection<T> and the List<T> doesn't contain this item...";
+ const string c_TEST_ID = "P003";
+
+ List<int> list = new List<int>();
+ Random rand = new Random(-55);
+ for (int i = 0; i < 10; i++)
+ {
+ list.Add(rand.Next(10, 20));
+ }
+
+ int item1 = 1;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (((ICollection<int>)list).Remove(item1))
+ {
+ string errorDesc = "result is not true as expected: Actual is false";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (list.Count != 10)
+ {
+ string errorDesc = "List<T>.Count is not 10 as expected: Actual is " + list.Count;
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest4: Using custome class which implemented the Remove method in ICollection<T>...";
+ const string c_TEST_ID = "P004";
+
+ MyCollection<int> myC = new MyCollection<int>();
+ int item1 = TestLibrary.Generator.GetInt32(-55);
+ myC.Add(item1);
+ for (int i = 1;i<10; i++)
+ {
+ myC.Add(TestLibrary.Generator.GetInt32(-55));
+ }
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (!((ICollection<int>)myC).Remove(item1))
+ {
+ string errorDesc = "result is not true as expected: Actual is false";
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (myC.Count != 9)
+ {
+ string errorDesc = "MyCollection<int>.Count is not 9 as expected: Actual is " + myC.Count;
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Using custome class which implemented the Remove method in ICollection<T> and is readonly");
+
+ MyCollection<int> myC = new MyCollection<int>();
+ int item1 = TestLibrary.Generator.GetInt32(-55);
+ myC.Add(item1);
+ myC.isReadOnly = true;
+
+ try
+ {
+ ((ICollection<int>)myC).Remove(item1);
+ TestLibrary.TestFramework.LogError("013", "The NotSupportedException was not thrown as expected");
+ retVal = false;
+ }
+ catch (NotSupportedException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Help Class
+ public class MyCollection<T> : ICollection<T>
+ {
+ public T[] _items;
+ protected int length;
+ public bool isReadOnly = false;
+
+ public MyCollection()
+ {
+ _items = new T[10];
+ length = 0;
+ }
+
+ #region ICollection<T> Members
+ public void Add(T item)
+ {
+ if (isReadOnly)
+ {
+ throw new NotSupportedException();
+ }
+ else
+ {
+ _items[length] = item;
+ length++;
+ }
+ }
+
+ public void Clear()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool Contains(T item)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public void CopyTo(T[] array, int arrayIndex)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int Count
+ {
+ get { return length; }
+ }
+
+ public bool IsReadOnly
+ {
+ get { return isReadOnly; }
+ }
+
+ public bool Remove(T item)
+ {
+ if (isReadOnly)
+ {
+ throw new NotSupportedException();
+ }
+ int index = Array.IndexOf(_items, item, 0, length);
+ if (index < 0)
+ {
+ return false;
+ }
+ else
+ {
+ if ((uint)index >= (uint)length)
+ {
+ throw new ArgumentOutOfRangeException(); ;
+ }
+ length--;
+ if (index < length)
+ {
+ Array.Copy(_items, index + 1, _items, index, length - index);
+ }
+ _items[length] = default(T);
+
+ return true;
+ }
+ }
+
+ #endregion
+
+ #region IEnumerable<T> Members
+
+ public IEnumerator<T> GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ #region IEnumerable Members
+
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/IDictionaryContainsKey.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/IDictionaryContainsKey.csproj
new file mode 100644
index 0000000000..cb669dd79c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/IDictionaryContainsKey.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="idictionarycontainskey.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/IDictionaryItem.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/IDictionaryItem.csproj
new file mode 100644
index 0000000000..d10b114dc1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/IDictionaryItem.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="idictionaryitem.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/IDictionaryKeys.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/IDictionaryKeys.csproj
new file mode 100644
index 0000000000..d342e32241
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/IDictionaryKeys.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="idictionarykeys.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/IDictionaryTryGetValue.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/IDictionaryTryGetValue.csproj
new file mode 100644
index 0000000000..a2e1c0a1c8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/IDictionaryTryGetValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="idictionarytrygetvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/IDictionaryValues.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/IDictionaryValues.csproj
new file mode 100644
index 0000000000..82c91c9c6a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/IDictionaryValues.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="idictionaryvalues.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/idictionarycontainskey.cs b/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/idictionarycontainskey.cs
new file mode 100644
index 0000000000..563dceb603
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/idictionarycontainskey.cs
@@ -0,0 +1,435 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+
+/// <summary>
+/// System.Collections.Generic.IDictionary.ContainsKey(TKey)
+/// </summary>
+public class IDictionaryContainsKey
+{
+ private int c_MINI_STRING_LENGTH = 1;
+ private int c_MAX_STRING_LENGTH = 20;
+
+ public static int Main(string[] args)
+ {
+ IDictionaryContainsKey testObj = new IDictionaryContainsKey();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Methord: System.Collections.Generic.IDictionary.ContainsKey(TKey)");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Netativ]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Using Dictionary<TKey,TValue> which implemented the ContainsKey method in IDictionay<TKey,TValue> and TKey is int...";
+ const string c_TEST_ID = "P001";
+
+ Dictionary<int, int> dictionary = new Dictionary<int, int>();
+ int key = TestLibrary.Generator.GetInt32(-55);
+ int value = TestLibrary.Generator.GetInt32(-55);
+ ((IDictionary<int, int>)dictionary).Add(key, value);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (!((IDictionary<int, int>)dictionary).ContainsKey(key))
+ {
+ string errorDesc = "Value is not false as expected: Actual is true";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Using Dictionary<TKey,TValue> which implemented the ContainsKey method in IDictionay<TKey,TValue> and TKey is String...";
+ const string c_TEST_ID = "P002";
+
+ Dictionary<String, String> dictionary = new Dictionary<String, String>();
+ String key = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ String value = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ dictionary.Add(key, value);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (!((IDictionary<String, String>)dictionary).ContainsKey(key))
+ {
+ string errorDesc = "Value is not false as expected: Actual is true";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: Using Dictionary<TKey,TValue> which implemented the ContainsKey method in IDictionay<TKey,TValue> and TKey is customer class...";
+ const string c_TEST_ID = "P003";
+
+ Dictionary<MyClass, MyClass> dictionary = new Dictionary<MyClass, MyClass>();
+ MyClass key = new MyClass();
+ MyClass value = new MyClass();
+ dictionary.Add(key, value);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (!((IDictionary<MyClass, MyClass>)dictionary).ContainsKey(key))
+ {
+ string errorDesc = "Value is not false as expected: Actual is true";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest4: Using Dictionary<TKey,TValue> which implemented the ContainsKey method in IDictionay<TKey,TValue> and TKey isn't contained in IDictionary...";
+ const string c_TEST_ID = "P004";
+
+ Dictionary<String, String> dictionary = new Dictionary<String, String>();
+ String key = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (((IDictionary<String, String>)dictionary).ContainsKey(key))
+ {
+ string errorDesc = "Value is not true as expected: Actual is false";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest5: Using customer class which implemented the ContainsKey method in IDictionay<TKey,TValue>...";
+ const string c_TEST_ID = "P005";
+
+ MyDictionary<int, int> dictionary = new MyDictionary<int, int>();
+ int key = TestLibrary.Generator.GetInt32(-55);
+ int value = TestLibrary.Generator.GetInt32(-55);
+ dictionary.Add(key, value);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (!((IDictionary<int, int>)dictionary).ContainsKey(key))
+ {
+ string errorDesc = "Value is not false as expected: Actual is true";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest1: Using Dictionary<TKey,TValue> which implemented the ContainsKey method in IDictionay<TKey,TValue> and Key is a null reference...";
+ const string c_TEST_ID = "N001";
+
+
+ Dictionary<String, int> dictionary = new Dictionary<String, int>();
+ String key = null;
+ int value = TestLibrary.Generator.GetInt32(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ((IDictionary<String, int>)dictionary).ContainsKey(key);
+ TestLibrary.TestFramework.LogError("011" + "TestId-" + c_TEST_ID, "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Help Class
+ public class MyDictionary<TKey, TValue> : IDictionary<TKey, TValue>
+ {
+ private int count;
+ private int capacity = 10;
+ public bool readOnly = false;
+ private KeyValuePair<TKey, TValue>[] keyvaluePair;
+
+ public MyDictionary()
+ {
+ count = 0;
+ keyvaluePair = new KeyValuePair<TKey, TValue>[capacity];
+ }
+ #region IDictionary<TKey,TValue> Members
+
+ public void Add(TKey key, TValue value)
+ {
+ if (readOnly)
+ throw new NotSupportedException();
+
+ if (ContainsKey(key))
+ throw new ArgumentException();
+ try
+ {
+ KeyValuePair<TKey, TValue> pair = new KeyValuePair<TKey, TValue>(key, value);
+ keyvaluePair[count] = pair;
+ count++;
+ }
+ catch (Exception en)
+ {
+ throw en;
+ }
+ }
+
+ public bool ContainsKey(TKey key)
+ {
+ bool exist = false;
+
+ if (key == null)
+ throw new ArgumentNullException();
+
+ foreach (KeyValuePair<TKey, TValue> pair in keyvaluePair)
+ {
+ if (pair.Key != null && pair.Key.Equals(key))
+ {
+ exist = true;
+ }
+ }
+
+ return exist;
+ }
+
+ public ICollection<TKey> Keys
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public bool Remove(TKey key)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool TryGetValue(TKey key, out TValue value)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ICollection<TValue> Values
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public TValue this[TKey key]
+ {
+ get
+ {
+ if (!ContainsKey(key))
+
+ throw new KeyNotFoundException();
+
+
+ int index = -1;
+ for (int j = 0; j < count; j++)
+ {
+ KeyValuePair<TKey, TValue> pair = keyvaluePair[j];
+ if (pair.Key.Equals(key))
+ {
+ index = j;
+ break;
+ }
+ }
+
+ return keyvaluePair[index].Value;
+
+ }
+ set
+ {
+ if (readOnly)
+ throw new NotSupportedException();
+
+ if (ContainsKey(key))
+ {
+ int index = -1;
+ for (int j = 0; j < count; j++)
+ {
+ KeyValuePair<TKey, TValue> pair = keyvaluePair[j];
+ if (pair.Key.Equals(key))
+ {
+ index = j;
+ break;
+ }
+ }
+
+ KeyValuePair<TKey, TValue> newpair = new KeyValuePair<TKey, TValue>(key, value);
+ keyvaluePair[index] = newpair;
+
+ }
+ else
+ {
+ KeyValuePair<TKey, TValue> pair = new KeyValuePair<TKey, TValue>(key, value);
+ keyvaluePair[count] = pair;
+ count++;
+ }
+ }
+ }
+
+ #endregion
+
+ #region ICollection<KeyValuePair<TKey,TValue>> Members
+
+ public void Add(KeyValuePair<TKey, TValue> item)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public void Clear()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool Contains(KeyValuePair<TKey, TValue> item)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int Count
+ {
+ get { return count; }
+ }
+
+ public bool IsReadOnly
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public bool Remove(KeyValuePair<TKey, TValue> item)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ #region IEnumerable<KeyValuePair<TKey,TValue>> Members
+
+ public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ #region IEnumerable Members
+
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+ }
+ public class MyClass
+ { }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/idictionaryitem.cs b/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/idictionaryitem.cs
new file mode 100644
index 0000000000..98100a604c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/idictionaryitem.cs
@@ -0,0 +1,505 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+
+/// <summary>
+/// System.Collections.Generic.IDictionary.Item(TKey)
+/// </summary>
+public class IDictionaryItem
+{
+ private int c_MINI_STRING_LENGTH = 1;
+ private int c_MAX_STRING_LENGTH = 20;
+
+ public static int Main(string[] args)
+ {
+ IDictionaryItem testObj = new IDictionaryItem();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Property: System.Collections.Generic.IDictionary.Item(TKey)");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Netativ]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Using Dictionary<TKey,TValue> which implemented the item property in IDictionay<TKey,TValue> and TKey is int...";
+ const string c_TEST_ID = "P001";
+
+ Dictionary<int, int> dictionary = new Dictionary<int, int>();
+ int key = TestLibrary.Generator.GetInt32(-55);
+ int value = TestLibrary.Generator.GetInt32(-55);
+ int newValue = TestLibrary.Generator.GetInt32(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ((IDictionary<int, int>)dictionary)[key] = value;
+ if (((IDictionary<int, int>)dictionary)[key] != value)
+ {
+ string errorDesc = "Value is not " + value + " as expected: Actual(" + dictionary[key] + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ ((IDictionary<int, int>)dictionary)[key] = newValue;
+ if (((IDictionary<int, int>)dictionary)[key] != newValue)
+ {
+ string errorDesc = "Value is not " + newValue + " as expected: Actual(" + dictionary[key] + ")";
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Using Dictionary<TKey,TValue> which implemented the item property in IDictionay<TKey,TValue> and TKey is String...";
+ const string c_TEST_ID = "P002";
+
+ Dictionary<String, String> dictionary = new Dictionary<String, String>();
+ String key = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ String value = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ dictionary.Add(key, value);
+
+ String newValue = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (((IDictionary<String, String>)dictionary)[key] != value)
+ {
+ string errorDesc = "Value is not " + value + " as expected: Actual(" + dictionary[key] + ")";
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ ((IDictionary<String, String>)dictionary)[key] = newValue;
+ if (((IDictionary<String, String>)dictionary)[key] != newValue)
+ {
+ string errorDesc = "Value is not " + newValue + " as expected: Actual(" + dictionary[key] + ")";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: Using Dictionary<TKey,TValue> which implemented the item property in IDictionay<TKey,TValue> and TKey is customer class...";
+ const string c_TEST_ID = "P003";
+
+ Dictionary<MyClass, int> dictionary = new Dictionary<MyClass, int>();
+ MyClass key = new MyClass();
+ int value = TestLibrary.Generator.GetInt32(-55);
+ dictionary.Add(key, value);
+
+ int newValue = TestLibrary.Generator.GetInt32(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (((IDictionary<MyClass, int>)dictionary)[key] != value)
+ {
+ string errorDesc = "Value is not " + value + " as expected: Actual(" + dictionary[key] + ")";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ ((IDictionary<MyClass, int>)dictionary)[key] = newValue;
+ if (((IDictionary<MyClass, int>)dictionary)[key] != newValue)
+ {
+ string errorDesc = "Value is not " + newValue + " as expected: Actual(" + dictionary[key] + ")";
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest4: Using customer class which implemented the item property in IDictionay<TKey,TValue>...";
+ const string c_TEST_ID = "P004";
+
+ MyDictionary<int, int> dictionary = new MyDictionary<int, int>();
+ int key = TestLibrary.Generator.GetInt32(-55);
+ int value = TestLibrary.Generator.GetInt32(-55);
+ int newValue = TestLibrary.Generator.GetInt32(-55);
+ dictionary.Add(key, value);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (((IDictionary<int, int>)dictionary)[key] != value)
+ {
+ string errorDesc = "Value is not " + value + " as expected: Actual(" + dictionary[key] + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ ((IDictionary<int, int>)dictionary)[key] = newValue;
+ if (((IDictionary<int, int>)dictionary)[key] != newValue)
+ {
+ string errorDesc = "Value is not " + newValue + " as expected: Actual(" + dictionary[key] + ")";
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest1: Using Dictionary<TKey,TValue> which implemented the item property in IDictionay<TKey,TValue> and Key is a null reference...";
+ const string c_TEST_ID = "N001";
+
+
+ Dictionary<String, int> dictionary = new Dictionary<String, int>();
+ String key = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int value = ((IDictionary<String, int>)dictionary)[key];
+ TestLibrary.TestFramework.LogError("013" + "TestId-" + c_TEST_ID, "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest2: Using Dictionary<TKey,TValue> which implemented the item property in IDictionay<TKey,TValue> and Key is a null reference...";
+ const string c_TEST_ID = "N002";
+
+
+ Dictionary<String, int> dictionary = new Dictionary<String, int>();
+ String key = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int value = ((IDictionary<String, int>)dictionary)[key];
+ TestLibrary.TestFramework.LogError("015" + "TestId-" + c_TEST_ID, "The KeyNotFoundException was not thrown as expected");
+ retVal = false;
+ }
+ catch (KeyNotFoundException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest3: Using user-defined class which implemented the add method in IDictionay<TKey,TValue> and ReadOnly is true";
+ const string c_TEST_ID = "N003";
+
+ MyDictionary<String, int> dictionary = new MyDictionary<String, int>();
+ String key = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ int value = TestLibrary.Generator.GetInt32(-55);
+ int newValue = TestLibrary.Generator.GetInt32(-55);
+ dictionary.Add(key, value);
+
+ dictionary.readOnly = true;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ((IDictionary<String, int>)dictionary)[key] = newValue;
+ TestLibrary.TestFramework.LogError("017" + " TestId-" + c_TEST_ID, "The NotSupportedException was not thrown as expected");
+ retVal = false;
+ }
+ catch (NotSupportedException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Help Class
+ public class MyDictionary<TKey, TValue> : IDictionary<TKey, TValue>
+ {
+ private int count;
+ private int capacity = 10;
+ public bool readOnly = false;
+ private KeyValuePair<TKey, TValue>[] keyvaluePair;
+
+ public MyDictionary()
+ {
+ count = 0;
+ keyvaluePair = new KeyValuePair<TKey, TValue>[capacity];
+ }
+ #region IDictionary<TKey,TValue> Members
+
+ public void Add(TKey key, TValue value)
+ {
+ if (readOnly)
+ throw new NotSupportedException();
+
+ if (ContainsKey(key))
+ throw new ArgumentException();
+ try
+ {
+ KeyValuePair<TKey, TValue> pair = new KeyValuePair<TKey, TValue>(key, value);
+ keyvaluePair[count] = pair;
+ count++;
+ }
+ catch (Exception en)
+ {
+ throw en;
+ }
+ }
+
+ public bool ContainsKey(TKey key)
+ {
+ bool exist = false;
+
+ if (key == null)
+ throw new ArgumentNullException();
+
+ foreach (KeyValuePair<TKey, TValue> pair in keyvaluePair)
+ {
+ if (pair.Key != null && pair.Key.Equals(key))
+ {
+ exist = true;
+ }
+ }
+
+ return exist;
+ }
+
+ public ICollection<TKey> Keys
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public bool Remove(TKey key)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool TryGetValue(TKey key, out TValue value)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ICollection<TValue> Values
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public TValue this[TKey key]
+ {
+ get
+ {
+ if (!ContainsKey(key))
+
+ throw new KeyNotFoundException();
+
+
+ int index = -1;
+ for (int j = 0; j < count; j++)
+ {
+ KeyValuePair<TKey, TValue> pair = keyvaluePair[j];
+ if (pair.Key.Equals(key))
+ {
+ index = j;
+ break;
+ }
+ }
+
+ return keyvaluePair[index].Value;
+
+ }
+ set
+ {
+ if (readOnly)
+ throw new NotSupportedException();
+
+ if (ContainsKey(key))
+ {
+ int index = -1;
+ for (int j = 0; j < count; j++)
+ {
+ KeyValuePair<TKey, TValue> pair = keyvaluePair[j];
+ if (pair.Key.Equals(key))
+ {
+ index = j;
+ break;
+ }
+ }
+
+ KeyValuePair<TKey, TValue> newpair = new KeyValuePair<TKey, TValue>(key, value);
+ keyvaluePair[index] = newpair;
+
+ }
+ else
+ {
+ KeyValuePair<TKey, TValue> pair = new KeyValuePair<TKey, TValue>(key, value);
+ keyvaluePair[count] = pair;
+ count++;
+ }
+ }
+ }
+
+ #endregion
+
+ #region ICollection<KeyValuePair<TKey,TValue>> Members
+
+ public void Add(KeyValuePair<TKey, TValue> item)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public void Clear()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool Contains(KeyValuePair<TKey, TValue> item)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int Count
+ {
+ get { return count; }
+ }
+
+ public bool IsReadOnly
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public bool Remove(KeyValuePair<TKey, TValue> item)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ #region IEnumerable<KeyValuePair<TKey,TValue>> Members
+
+ public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ #region IEnumerable Members
+
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+ }
+ public class MyClass
+ { }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/idictionarykeys.cs b/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/idictionarykeys.cs
new file mode 100644
index 0000000000..babfbc788f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/idictionarykeys.cs
@@ -0,0 +1,215 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+
+/// <summary>
+/// System.Collections.Generic.IDictionary.Keys
+/// </summary>
+public class IDictionaryKeys
+{
+ private int c_MINI_STRING_LENGTH = 1;
+ private int c_MAX_STRING_LENGTH = 20;
+
+ public static int Main(string[] args)
+ {
+ IDictionaryKeys testObj = new IDictionaryKeys();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Property: System.Collections.Generic.IDictionary.Keys");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Using Dictionary<TKey,TValue> which implemented the Keys property in IDictionay<TKey,TValue> and TKey is int...";
+ const string c_TEST_ID = "P001";
+
+ Dictionary<int, int> dictionary = new Dictionary<int, int>();
+ int key = TestLibrary.Generator.GetInt32(-55);
+ int value = TestLibrary.Generator.GetInt32(-55);
+ dictionary.Add(key, value);
+ key = key + 1;
+ dictionary.Add(key,value);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ICollection<int> keys = ((IDictionary<int, int>)dictionary).Keys;
+ if (keys.Count != 2)
+ {
+ string errorDesc = "( the count of IDictionary<int, int>.Keys 2 as expected: Actual(" + keys.Count + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (!keys.Contains(key))
+ {
+ string errorDesc = key + "should exist in (IDictionary<int, int>.Keys";
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Using Dictionary<TKey,TValue> which implemented the Keys property in IDictionay<TKey,TValue> and TKey is String...";
+ const string c_TEST_ID = "P002";
+
+ Dictionary<String, String> dictionary = new Dictionary<String, String>();
+ String key = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ String value = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ dictionary.Add(key, value);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ICollection<String> keys = ((IDictionary<String, String>)dictionary).Keys;
+ if (keys.Count != 1)
+ {
+ string errorDesc = "( the count of IDictionary<int, int>.Keys 1 as expected: Actual(" + keys.Count + ")";
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (!keys.Contains(key))
+ {
+ string errorDesc = key + "should exist in (IDictionary<String, String>.Keys";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: Using Dictionary<TKey,TValue> which implemented the Keys property in IDictionay<TKey,TValue> and TKey is customer class...";
+ const string c_TEST_ID = "P003";
+
+ Dictionary<MyClass, int> dictionary = new Dictionary<MyClass, int>();
+ MyClass key = new MyClass();
+ int value = TestLibrary.Generator.GetInt32(-55);
+ dictionary.Add(key, value);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ICollection<MyClass> keys = ((IDictionary<MyClass, int>)dictionary).Keys;
+ if (keys.Count != 1)
+ {
+ string errorDesc = "( the count of IDictionary<int, int>.Keys 1 as expected: Actual(" + keys.Count + ")";
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (!keys.Contains(key))
+ {
+ string errorDesc = "MyClass object should exist in (IDictionary<String, String>.Keys";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest4: Using Dictionary<TKey,TValue> which implemented the Keys property in IDictionay<TKey,TValue> and Keys is empty...";
+ const string c_TEST_ID = "P004";
+
+ Dictionary<int, int> dictionary = new Dictionary<int, int>();
+ int key = TestLibrary.Generator.GetInt32(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ICollection<int> keys = ((IDictionary<int, int>)dictionary).Keys;
+ if (keys.Count != 0)
+ {
+ string errorDesc = "( the count of IDictionary<int, int>.Keys 0 as expected: Actual(" + keys.Count + ")";
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (keys.Contains(key))
+ {
+ string errorDesc = key + "should not exist in (IDictionary<int, int>.Keys";
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ #endregion
+
+ #region Help Class
+ public class MyClass
+ { }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/idictionarytrygetvalue.cs b/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/idictionarytrygetvalue.cs
new file mode 100644
index 0000000000..a3b999deb9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/idictionarytrygetvalue.cs
@@ -0,0 +1,530 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+
+/// <summary>
+/// System.Collections.Generic.IDictionary.TryGetValue(TKey,out TValue)
+/// </summary>
+public class IDictionaryTryGetValue
+{
+ private int c_MINI_STRING_LENGTH = 1;
+ private int c_MAX_STRING_LENGTH = 20;
+
+ public static int Main(string[] args)
+ {
+ IDictionaryTryGetValue testObj = new IDictionaryTryGetValue();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Methord: System.Collections.Generic.IDictionary.TryGetValue(TKey,out TValue)");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Netativ]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Using Dictionary<TKey,TValue> which implemented the TryGetValue method in IDictionay<TKey,TValue> and TKey is int...";
+ const string c_TEST_ID = "P001";
+
+ Dictionary<int, int> dictionary = new Dictionary<int, int>();
+ int key = TestLibrary.Generator.GetInt32(-55);
+ int value = TestLibrary.Generator.GetInt32(-55);
+ dictionary.Add(key, value);
+
+ int outValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ bool result = ((IDictionary<int, int>)dictionary).TryGetValue(key, out outValue);
+ if (outValue != value)
+ {
+ string errorDesc = "Value is not " + outValue + " as expected: Actual(" + value + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (!result)
+ {
+ string errorDesc = "Value is not false as expected: Actual is true";
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Using Dictionary<TKey,TValue> which implemented the TryGetValue method in IDictionay<TKey,TValue> and TKey is String...";
+ const string c_TEST_ID = "P002";
+
+ Dictionary<String, String> dictionary = new Dictionary<String, String>();
+ String key = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ String value = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ dictionary.Add(key, value);
+
+ String outValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ bool result = ((IDictionary<String, String>)dictionary).TryGetValue(key, out outValue);
+ if (outValue != value)
+ {
+ string errorDesc = "Value is not " + outValue + " as expected: Actual(" + value + ")";
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (!result)
+ {
+ string errorDesc = "Value is not false as expected: Actual is true";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: Using Dictionary<TKey,TValue> which implemented the TryGetValue method in IDictionay<TKey,TValue> and TKey is customer class...";
+ const string c_TEST_ID = "P003";
+
+ Dictionary<MyClass, MyClass> dictionary = new Dictionary<MyClass, MyClass>();
+ MyClass key = new MyClass();
+ MyClass value = new MyClass();
+ dictionary.Add(key, value);
+
+ MyClass outValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ bool result = ((IDictionary<MyClass, MyClass>)dictionary).TryGetValue(key, out outValue);
+ if (!outValue.Equals(value))
+ {
+ string errorDesc = "Value is not object as expected";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (!result)
+ {
+ string errorDesc = "Value is not false as expected: Actual is true";
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest4: Using Dictionary<TKey,TValue> which implemented the TryGetValue method in IDictionay<TKey,TValue> and TKey isn't exists in Dictionayr...";
+ const string c_TEST_ID = "P004";
+
+ Dictionary<String, String> dictionary = new Dictionary<String, String>();
+ String key = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ String outValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ bool result = ((IDictionary<String, String>)dictionary).TryGetValue(key, out outValue);
+ if (outValue != null)
+ {
+ string errorDesc = "Value is not null as expected: Actual(" + outValue + ")";
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (result)
+ {
+ string errorDesc = "Value is not false as expected: Actual is true";
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest5: Using user-defined class which implemented the add method in IDictionay<TKey,TValue>...";
+ const string c_TEST_ID = "P005";
+
+ MyDictionary<int, int> dictionary = new MyDictionary<int, int>();
+ int key = TestLibrary.Generator.GetInt32(-55);
+ int value = TestLibrary.Generator.GetInt32(-55);
+ dictionary.Add(key, value);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int outValue = 0;
+ bool result = ((IDictionary<int, int>)dictionary).TryGetValue(key, out outValue);
+ if (outValue != value)
+ {
+ string errorDesc = "Value is not null as expected: Actual(" + outValue + ")";
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (!result)
+ {
+ string errorDesc = "Value is not false as expected: Actual is true";
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("015", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest1: Using Dictionary<TKey,TValue> which implemented the TryGetValue method in IDictionay<TKey,TValue> and Key is a null reference...";
+ const string c_TEST_ID = "N001";
+
+
+ Dictionary<String, int> dictionary = new Dictionary<String, int>();
+ String key = null;
+ int value;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ((IDictionary<String, int>)dictionary).TryGetValue(key, out value);
+ TestLibrary.TestFramework.LogError("016" + "TestId-" + c_TEST_ID, "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("017", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Help Class
+ public class MyDictionary<TKey, TValue> : IDictionary<TKey, TValue>
+ {
+ private int count;
+ private int capacity = 10;
+ public bool readOnly = false;
+ private KeyValuePair<TKey, TValue>[] keyvaluePair;
+
+ public MyDictionary()
+ {
+ count = 0;
+ keyvaluePair = new KeyValuePair<TKey, TValue>[capacity];
+ }
+ #region IDictionary<TKey,TValue> Members
+
+ public void Add(TKey key, TValue value)
+ {
+ if (readOnly)
+ throw new NotSupportedException();
+
+ if (ContainsKey(key))
+ throw new ArgumentException();
+ try
+ {
+ KeyValuePair<TKey, TValue> pair = new KeyValuePair<TKey, TValue>(key, value);
+ keyvaluePair[count] = pair;
+ count++;
+ }
+ catch (Exception en)
+ {
+ throw en;
+ }
+ }
+
+ public bool ContainsKey(TKey key)
+ {
+ bool exist = false;
+
+ if (key == null)
+ throw new ArgumentNullException();
+
+ foreach (KeyValuePair<TKey, TValue> pair in keyvaluePair)
+ {
+ if (pair.Key != null && pair.Key.Equals(key))
+ {
+ exist = true;
+ }
+ }
+
+ return exist;
+ }
+
+ public ICollection<TKey> Keys
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public bool Remove(TKey key)
+ {
+ if (readOnly)
+ {
+ throw new NotSupportedException();
+ }
+ bool contains = ContainsKey(key);
+
+ if (!contains)
+ {
+ return false;
+ }
+ else
+ {
+ int index = -1;
+ for (int j = 0; j < count; j++)
+ {
+ KeyValuePair<TKey, TValue> pair = keyvaluePair[j];
+ if (pair.Key.Equals(key))
+ {
+ index = j;
+ break;
+ }
+ }
+
+ count--;
+
+ if (index < count)
+ {
+ Array.Copy(keyvaluePair, index + 1, keyvaluePair, index, count - index);
+ }
+ keyvaluePair[count] = new KeyValuePair<TKey, TValue>(default(TKey), default(TValue));
+
+ return true;
+ }
+ }
+
+ public bool TryGetValue(TKey key, out TValue value)
+ {
+ bool result = false;
+ value = default(TValue);
+
+ if (ContainsKey(key))
+ {
+ for (int j = 0; j < count; j++)
+ {
+ KeyValuePair<TKey, TValue> pair = keyvaluePair[j];
+ if (pair.Key.Equals(key))
+ {
+ result = true;
+ value = pair.Value;
+ break;
+ }
+ }
+ }
+
+ return result;
+
+ }
+
+ public ICollection<TValue> Values
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public TValue this[TKey key]
+ {
+ get
+ {
+ if (!ContainsKey(key))
+
+ throw new KeyNotFoundException();
+
+
+ int index = -1;
+ for (int j = 0; j < count; j++)
+ {
+ KeyValuePair<TKey, TValue> pair = keyvaluePair[j];
+ if (pair.Key.Equals(key))
+ {
+ index = j;
+ break;
+ }
+ }
+
+ return keyvaluePair[index].Value;
+
+ }
+ set
+ {
+ if (readOnly)
+ throw new NotSupportedException();
+
+ if (ContainsKey(key))
+ {
+ int index = -1;
+ for (int j = 0; j < count; j++)
+ {
+ KeyValuePair<TKey, TValue> pair = keyvaluePair[j];
+ if (pair.Key.Equals(key))
+ {
+ index = j;
+ break;
+ }
+ }
+
+ KeyValuePair<TKey, TValue> newpair = new KeyValuePair<TKey, TValue>(key, value);
+ keyvaluePair[index] = newpair;
+
+ }
+ else
+ {
+ KeyValuePair<TKey, TValue> pair = new KeyValuePair<TKey, TValue>(key, value);
+ keyvaluePair[count] = pair;
+ count++;
+ }
+ }
+ }
+
+ #endregion
+
+ #region ICollection<KeyValuePair<TKey,TValue>> Members
+
+ public void Add(KeyValuePair<TKey, TValue> item)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public void Clear()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool Contains(KeyValuePair<TKey, TValue> item)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int Count
+ {
+ get { return count; }
+ }
+
+ public bool IsReadOnly
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public bool Remove(KeyValuePair<TKey, TValue> item)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ #region IEnumerable<KeyValuePair<TKey,TValue>> Members
+
+ public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ #region IEnumerable Members
+
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+ }
+ public class MyClass
+ { }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/idictionaryvalues.cs b/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/idictionaryvalues.cs
new file mode 100644
index 0000000000..ff7f553a6e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/idictionary/idictionaryvalues.cs
@@ -0,0 +1,214 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+
+/// <summary>
+/// System.Collections.Generic.IDictionary.Values
+/// </summary>
+public class IDictionaryValues
+{
+ private int c_MINI_STRING_LENGTH = 1;
+ private int c_MAX_STRING_LENGTH = 20;
+
+ public static int Main(string[] args)
+ {
+ IDictionaryValues testObj = new IDictionaryValues();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Property: System.Collections.Generic.IDictionary.Values");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Using Dictionary<TKey,TValue> which implemented the Values property in IDictionay<TKey,TValue> and TValue is int...";
+ const string c_TEST_ID = "P001";
+
+ Dictionary<int, int> dictionary = new Dictionary<int, int>();
+ int key = TestLibrary.Generator.GetInt32(-55);
+ int value = TestLibrary.Generator.GetInt32(-55);
+ dictionary.Add(key, value);
+ key = key + 1;
+ value = value + 1;
+ dictionary.Add(key, value);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ICollection<int> values = ((IDictionary<int, int>)dictionary).Values;
+ if (values.Count != 2)
+ {
+ string errorDesc = "( the count of IDictionary<int, int>.Values 2 as expected: Actual(" + values.Count + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (!values.Contains(value))
+ {
+ string errorDesc = value + "should exist in (IDictionary<int, int>.Values";
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Using Dictionary<TKey,TValue> which implemented the Values property in IDictionay<TKey,TValue> and TValue is String...";
+ const string c_TEST_ID = "P002";
+
+ Dictionary<String, String> dictionary = new Dictionary<String, String>();
+ String key = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ String value = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ dictionary.Add(key, value);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ICollection<String> values = ((IDictionary<String, String>)dictionary).Values;
+ if (values.Count != 1)
+ {
+ string errorDesc = "( the count of IDictionary<int, int>.Values 1 as expected: Actual(" + values.Count + ")";
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (!values.Contains(value))
+ {
+ string errorDesc = value + "should exist in (IDictionary<String, String>.Values";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: Using Dictionary<TKey,TValue> which implemented the Values property in IDictionay<TKey,TValue> and TKey is customer class...";
+ const string c_TEST_ID = "P003";
+
+ Dictionary<MyClass, MyClass> dictionary = new Dictionary<MyClass, MyClass>();
+ MyClass key = new MyClass();
+ MyClass value = new MyClass();
+ dictionary.Add(key, value);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ICollection<MyClass> values = ((IDictionary<MyClass, MyClass>)dictionary).Values;
+ if (values.Count != 1)
+ {
+ string errorDesc = "( the count of IDictionary<int, int>.Values 1 as expected: Actual(" + values.Count + ")";
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (!values.Contains(value))
+ {
+ string errorDesc = "MyClass object should exist in (IDictionary<String, String>.Values";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest4: Using Dictionary<TKey,TValue> which implemented the Values property in IDictionay<TKey,TValue> and Values is empty...";
+ const string c_TEST_ID = "P004";
+
+ Dictionary<int, int> dictionary = new Dictionary<int, int>();
+ int value = TestLibrary.Generator.GetInt32(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ICollection<int> values = ((IDictionary<int, int>)dictionary).Values;
+ if (values.Count != 0)
+ {
+ string errorDesc = "( the count of IDictionary<int, int>.Values 0 as expected: Actual(" + values.Count + ")";
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (values.Contains(value))
+ {
+ string errorDesc = value + "should not exist in (IDictionary<int, int>.Values";
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Help Class
+ public class MyClass
+ { }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/ienumerable/IEnumerableGetEnumerator.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/ienumerable/IEnumerableGetEnumerator.csproj
new file mode 100644
index 0000000000..b818982066
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/ienumerable/IEnumerableGetEnumerator.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="ienumerablegetenumerator.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/ienumerable/ienumerablegetenumerator.cs b/tests/src/CoreMangLib/cti/system/collections/generic/ienumerable/ienumerablegetenumerator.cs
new file mode 100644
index 0000000000..3df2eb615a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/ienumerable/ienumerablegetenumerator.cs
@@ -0,0 +1,332 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+
+/// <summary>
+/// System.Collections.Generic.IEnumerable<T>.GetEnumerator()
+/// </summary>
+public class IEnumerableGetEnumerator
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 20;
+
+ public static int Main()
+ {
+ IEnumerableGetEnumerator testObj = new IEnumerableGetEnumerator();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Methord: System.Collections.Generic.IEnumerable<T>.GetEnumerator()");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Using List<T> which implemented the GetEnumerator method in IEnumerable<T> and Type is string...";
+ const string c_TEST_ID = "P001";
+
+ List<String> list = new List<String>();
+ String x = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ String y = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ list.Add(x);
+ list.Add(y);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ IEnumerator<String> enumerator = ((IEnumerable<String>)list).GetEnumerator();
+
+ enumerator.MoveNext();
+
+ if (enumerator.Current != x)
+ {
+ string errorDesc = "Value is not " + x + " as expected: Actual(" + enumerator.Current + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ enumerator.MoveNext();
+ if (enumerator.Current != y)
+ {
+ string errorDesc = "Value is not " + y + " as expected: Actual(" + enumerator.Current + ")";
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Using List<T> which implemented the GetEnumerator method in IEnumerable<T> and Type is int...";
+ const string c_TEST_ID = "P002";
+
+ List<int> list = new List<int>();
+ int x = TestLibrary.Generator.GetInt32(-55);
+ int y = TestLibrary.Generator.GetInt32(-55);
+ list.Add(x);
+ list.Add(y);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ IEnumerator<int> enumerator = ((IEnumerable<int>)list).GetEnumerator();
+
+ enumerator.MoveNext();
+
+ if (enumerator.Current != x)
+ {
+ string errorDesc = "Value is not " + x + " as expected: Actual(" + enumerator.Current + ")";
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ enumerator.MoveNext();
+ if (enumerator.Current != y)
+ {
+ string errorDesc = "Value is not " + y + " as expected: Actual(" + enumerator.Current + ")";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: Useing customer class which implemented the GetEnumerator method in IEnumerable<T>... ";
+ const string c_TEST_ID = "P003";
+
+ int[] pArray = new int[2];
+ pArray[0] = TestLibrary.Generator.GetInt32(-55);
+ pArray[1] = TestLibrary.Generator.GetInt32(-55);
+
+ MyEnumerable<int> myEnumerable = new MyEnumerable<int>(pArray);
+ MyEnumerator<int> myEnumerator = new MyEnumerator<int>(pArray);
+ ((IEnumerator<int>)myEnumerator).MoveNext();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ IEnumerator<int> enumerator = ((IEnumerable<int>)myEnumerable).GetEnumerator();
+ enumerator.MoveNext();
+
+ if (enumerator.Current != ((IEnumerator<int>)myEnumerator).Current)
+ {
+ string errorDesc = "Value is not " + myEnumerator.Current + " as expected: Actual(" + enumerator.Current + ")";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ enumerator.MoveNext();
+ ((IEnumerator<int>)myEnumerator).MoveNext();
+
+ if (enumerator.Current != ((IEnumerator<int>)myEnumerator).Current)
+ {
+ string errorDesc = "Value is not " + myEnumerator.Current + " as expected: Actual(" + enumerator.Current + ")";
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Help Class
+ public class MyEnumerable<T> : IEnumerable<T>
+ {
+ public T[] _item;
+ public MyEnumerable(T[] pArray)
+ {
+ _item = new T[pArray.Length];
+
+ for (int i = 0; i < pArray.Length; i++)
+ {
+ _item[i] = pArray[i];
+ }
+ }
+
+
+ #region IEnumerable<T> Members
+
+ IEnumerator<T> IEnumerable<T>.GetEnumerator()
+ {
+ return new MyEnumerator<T>(_item);
+ }
+
+ #endregion
+
+ #region IEnumerable Members
+
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ {
+ return new MyEnumerator<T>(_item);
+ }
+
+ #endregion
+ }
+
+ public class MyEnumerator<T> : IEnumerator<T>
+ {
+ public T[] _item;
+
+ // Enumerators are positioned before the first element
+ // until the first MoveNext() call.
+ int position = -1;
+
+ public MyEnumerator(T[] list)
+ {
+ _item = list;
+ }
+
+ public bool MoveNext()
+ {
+ position++;
+ return (position < _item.Length);
+ }
+
+ public void Reset()
+ {
+ position = -1;
+ }
+
+ public object Current
+ {
+ get
+ {
+ try
+ {
+ return _item[position];
+ }
+ catch (IndexOutOfRangeException)
+ {
+ throw new InvalidOperationException();
+ }
+ }
+ }
+
+ #region IEnumerator<T> Members
+
+ T IEnumerator<T>.Current
+ {
+ get
+ {
+ try
+ {
+ return _item[position];
+ }
+ catch (IndexOutOfRangeException)
+ {
+ throw new InvalidOperationException();
+ }
+ }
+ }
+
+ #endregion
+
+ #region IDisposable Members
+
+ public void Dispose()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ #region IDisposable Members
+
+ void IDisposable.Dispose()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ #region IEnumerator Members
+
+ object System.Collections.IEnumerator.Current
+ {
+ get
+ {
+ try
+ {
+ return _item[position];
+ }
+ catch (IndexOutOfRangeException)
+ {
+ throw new InvalidOperationException();
+ }
+ }
+ }
+
+ bool System.Collections.IEnumerator.MoveNext()
+ {
+ position++;
+ return (position < _item.Length);
+ }
+
+ void System.Collections.IEnumerator.Reset()
+ {
+ position = -1;
+ }
+
+ #endregion
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/ienumerator/IEnumeratorCurrent.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/ienumerator/IEnumeratorCurrent.csproj
new file mode 100644
index 0000000000..c18e27a7e5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/ienumerator/IEnumeratorCurrent.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="ienumeratorcurrent.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/ienumerator/ienumeratorcurrent.cs b/tests/src/CoreMangLib/cti/system/collections/generic/ienumerator/ienumeratorcurrent.cs
new file mode 100644
index 0000000000..31bd54b7ff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/ienumerator/ienumeratorcurrent.cs
@@ -0,0 +1,283 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+
+/// <summary>
+/// System.Collections.Generic.IEnumerator<T>.Current
+/// </summary>
+public class IEnumeratorCurrent
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 20;
+
+ public static int Main()
+ {
+ IEnumeratorCurrent testObj = new IEnumeratorCurrent();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Property: System.Collections.Generic.IEnumerator<T>.Current");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Using customer class which implemented the GetEnumerator method in IEnumerator<T> and Type is int...";
+ const string c_TEST_ID = "P001";
+
+ int[] intList = new int[2];
+ int x = TestLibrary.Generator.GetInt32(-55);
+ int y = TestLibrary.Generator.GetInt32(-55);
+ intList[0] = x;
+ intList[1] = y;
+
+ MyEnumerator<int> myEnumerator = new MyEnumerator<int>(intList);
+ ((IEnumerator<int>)myEnumerator).MoveNext();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (((IEnumerator<int>)myEnumerator).Current != x)
+ {
+ string errorDesc = "Value is not " + x + " as expected: Actual(" + ((IEnumerator<int>)myEnumerator).Current + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ ((IEnumerator<int>)myEnumerator).MoveNext();
+ if (((IEnumerator<int>)myEnumerator).Current != y)
+ {
+ string errorDesc = "Value is not " + y + " as expected: Actual(" + ((IEnumerator<int>)myEnumerator).Current + ")";
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Using List<T> which implemented the GetEnumerator method in IComparer<T> and Type is String...";
+ const string c_TEST_ID = "P002";
+
+ String[] strList = new String[2];
+ String x = TestLibrary.Generator.GetString(-55, false,c_MINI_STRING_LENGTH,c_MAX_STRING_LENGTH);
+ String y = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ strList[0] = x;
+ strList[1] = y;
+
+ MyEnumerator<String> myEnumerator = new MyEnumerator<String>(strList);
+
+ ((IEnumerator<String>)myEnumerator).MoveNext();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (((IEnumerator<String>)myEnumerator).Current != x)
+ {
+ string errorDesc = "Value is not " + x + " as expected: Actual(" + ((IEnumerator<String>)myEnumerator).Current + ")";
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ ((IEnumerator<String>)myEnumerator).MoveNext();
+ if (((IEnumerator<String>)myEnumerator).Current != y)
+ {
+ string errorDesc = "Value is not " + y + " as expected: Actual(" + ((IEnumerator<String>)myEnumerator).Current + ")";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region NegativeTests
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ int[] intList = new int[0];
+ MyEnumerator<int> myEnumerator = new MyEnumerator<int>(intList);
+ ((IEnumerator<int>)myEnumerator).MoveNext();
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Using user-defined type which is empty");
+
+ try
+ {
+ int i = ((IEnumerator<int>)myEnumerator).Current;
+ TestLibrary.TestFramework.LogError("007", "The InvalidOperationException was not thrown as expected");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Help Class
+ public class MyEnumerator<T> : IEnumerator<T>
+ {
+ public T[] _item;
+
+ // Enumerators are positioned before the first element
+ // until the first MoveNext() call.
+ int position = -1;
+
+ public MyEnumerator(T[] list)
+ {
+ _item = list;
+ }
+
+ public bool MoveNext()
+ {
+ position++;
+ return (position < _item.Length);
+ }
+
+ public void Reset()
+ {
+ position = -1;
+ }
+
+ public object Current
+ {
+ get
+ {
+ try
+ {
+ return _item[position];
+ }
+ catch (IndexOutOfRangeException)
+ {
+ throw new InvalidOperationException();
+ }
+ }
+ }
+
+ #region IEnumerator<T> Members
+
+ T IEnumerator<T>.Current
+ {
+ get
+ {
+ try
+ {
+ return _item[position];
+ }
+ catch (IndexOutOfRangeException)
+ {
+ throw new InvalidOperationException();
+ }
+ }
+ }
+
+ #endregion
+
+ #region IDisposable Members
+
+ public void Dispose()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ #region IDisposable Members
+
+ void IDisposable.Dispose()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ #region IEnumerator Members
+
+ object System.Collections.IEnumerator.Current
+ {
+ get
+ {
+ try
+ {
+ return _item[position];
+ }
+ catch (IndexOutOfRangeException)
+ {
+ throw new InvalidOperationException();
+ }
+ }
+ }
+
+ bool System.Collections.IEnumerator.MoveNext()
+ {
+ position++;
+ return (position < _item.Length);
+ }
+
+ void System.Collections.IEnumerator.Reset()
+ {
+ position = -1;
+ }
+
+ #endregion
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/iequalitycomparer/IEqualityComparerEquals.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/iequalitycomparer/IEqualityComparerEquals.csproj
new file mode 100644
index 0000000000..f5c09113e0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/iequalitycomparer/IEqualityComparerEquals.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="iequalitycomparerequals.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/iequalitycomparer/IEqualityComparerGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/iequalitycomparer/IEqualityComparerGetHashCode.csproj
new file mode 100644
index 0000000000..11a50af7cb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/iequalitycomparer/IEqualityComparerGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="iequalitycomparergethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/iequalitycomparer/iequalitycomparerequals.cs b/tests/src/CoreMangLib/cti/system/collections/generic/iequalitycomparer/iequalitycomparerequals.cs
new file mode 100644
index 0000000000..1b1040ec99
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/iequalitycomparer/iequalitycomparerequals.cs
@@ -0,0 +1,243 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+
+/// <summary>
+/// System.Collections.Generic.IEqualityComparer.Equals(T,T)
+/// </summary>
+public class IEqualityComparerEquals
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ public static int Main(string[] args)
+ {
+ IEqualityComparerEquals testObj = new IEqualityComparerEquals();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Methord: System.Collections.Generic.EqualityComparer.Equals(T,T)");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Using EqualityComparer<T> which implemented the Equals method in IEqualityComparer<T> and Type is int...";
+ const string c_TEST_ID = "P001";
+
+ EqualityComparer<int> equalityComparer = EqualityComparer<int>.Default;
+
+ int x = TestLibrary.Generator.GetInt32(-55);
+ int y = x;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (!((IEqualityComparer<int>)equalityComparer).Equals(x, y))
+ {
+ string errorDesc = "result should be true when two int both are " + x;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Using EqualityComparer<T> which implemented the Equals method in IEqualityComparer<T> and Type is String...";
+ const string c_TEST_ID = "P002";
+
+ String x = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ String y = x;
+ EqualityComparer<String> equalityComparer = EqualityComparer<String>.Default;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (!((IEqualityComparer<String>)equalityComparer).Equals(x, y))
+ {
+ string errorDesc = "result should be true when two String object is the same reference";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: Using EqualityComparer<T> which implemented the Equals method in IEqualityComparer<T> and Type is user-defined class...";
+ const string c_TEST_ID = "P003";
+
+ MyClass x = new MyClass();
+ MyClass y = x;
+
+ EqualityComparer<MyClass> equalityComparer = EqualityComparer<MyClass>.Default;
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (!((IEqualityComparer<MyClass>)equalityComparer).Equals(x, y))
+ {
+ string errorDesc = "result should be true when two MyClass object is the same reference";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest4: Using user-defined class which implemented the Equals method in IEqualityComparer<T>...";
+ const string c_TEST_ID = "P004";
+
+ MyEqualityComparer<String> myEC = new MyEqualityComparer<String>();
+ String str1 = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ String str2 = str1 + TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (((IEqualityComparer<String>)myEC).Equals(str1, str2))
+ {
+ string errorDesc = "result should be true when two string are difference";
+ errorDesc += "\n str1 is " + str1;
+ errorDesc += "\n str2 is " + str2;
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest5: Using user-defined class which implemented the Equals method in IEqualityComparer<T> and two parament are null...";
+ const string c_TEST_ID = "P005";
+
+ MyEqualityComparer<Object> myEC = new MyEqualityComparer<Object>();
+ Object x = null;
+ Object y = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (!((IEqualityComparer<Object>)myEC).Equals(x, y))
+ {
+ string errorDesc = "result should be true when two object are null";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Help Class
+ public class MyEqualityComparer<T> : IEqualityComparer<T>
+ {
+ #region IEqualityComparer<T> Members
+
+ bool IEqualityComparer<T>.Equals(T x, T y)
+ {
+ if (x != null)
+ {
+ if (y != null) return x.Equals(y);
+ return false;
+ }
+ if (y != null) return false;
+ return true;
+ }
+
+ int IEqualityComparer<T>.GetHashCode(T obj)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+ }
+
+ public class MyClass
+ {
+
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/iequalitycomparer/iequalitycomparergethashcode.cs b/tests/src/CoreMangLib/cti/system/collections/generic/iequalitycomparer/iequalitycomparergethashcode.cs
new file mode 100644
index 0000000000..ac9522e45f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/iequalitycomparer/iequalitycomparergethashcode.cs
@@ -0,0 +1,237 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+
+/// <summary>
+/// System.Collections.Generic.IEqualityComparer<T>.GetHashCode(T)
+/// </summary>
+public class IEqualityComparerGetHashCode
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ public static int Main(string[] args)
+ {
+ IEqualityComparerGetHashCode testObj = new IEqualityComparerGetHashCode();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Methord: System.Collections.Generic.IEqualityComparer<T>.GetHashCode(T");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Netativ]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Using EqualityComparer<T> which implemented the GetHashCode method in IEqualityComparer<T> and Type is int...";
+ const string c_TEST_ID = "P001";
+
+ EqualityComparer<int> equalityComparer = EqualityComparer<int>.Default;
+ int x = TestLibrary.Generator.GetInt32(-55);
+ int expectedValue = x.GetHashCode();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int actualValue = ((IEqualityComparer<int>)equalityComparer).GetHashCode(x);
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + actualValue + " as expected: Actual(" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Using EqualityComparer<T> which implemented the GetHashCode method in IEqualityComparer<T> and Type is string...";
+ const string c_TEST_ID = "P002";
+
+ EqualityComparer<String> equalityComparer = EqualityComparer<String>.Default;
+ string str = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ int expectedValue = str.GetHashCode();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int actualValue = ((IEqualityComparer<String>)equalityComparer).GetHashCode(str);
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + actualValue + " as expected: Actual(" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: Using EqualityComparer<T> which implemented the GetHashCode method in IEqualityComparer<T> and Type is user-defined class...";
+ const string c_TEST_ID = "P003";
+
+ EqualityComparer<MyClass> equalityComparer = EqualityComparer<MyClass>.Default;
+ MyClass myclass1 = new MyClass();
+
+ int expectedValue = myclass1.GetHashCode();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int actualValue = ((IEqualityComparer<MyClass>)equalityComparer).GetHashCode(myclass1);
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + actualValue + " as expected: Actual(" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest4: Using user-defined class which implemented the GetHashCode method in IEqualityComparer<T>...";
+ const string c_TEST_ID = "P004";
+
+ MyEqualityComparer<String> myEC = new MyEqualityComparer<String>();
+ String str = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+
+ int expectedValue = str.GetHashCode();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int actualValue = ((IEqualityComparer<String>)myEC).GetHashCode(str);
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + actualValue + " as expected: Actual(" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: object is a null reference";
+ const string c_TEST_ID = "N001";
+
+ MyEqualityComparer<MyClass> myEC = new MyEqualityComparer<MyClass>();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IEqualityComparer<MyClass>)myEC).GetHashCode(null);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, "ArgumentNullException is not thrown as expected.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Help Class
+ public class MyEqualityComparer<T> : IEqualityComparer<T>
+ {
+
+
+ #region IEqualityComparer<T> Members
+
+ bool IEqualityComparer<T>.Equals(T x, T y)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ int IEqualityComparer<T>.GetHashCode(T obj)
+ {
+ if (obj == null)
+ throw new ArgumentNullException();
+ return obj.GetHashCode();
+ }
+
+ #endregion
+ }
+
+ public class MyClass
+ {
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/ilist/IListIndexOf.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/ilist/IListIndexOf.csproj
new file mode 100644
index 0000000000..b1f99aa3b6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/ilist/IListIndexOf.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="ilistindexof.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/ilist/IListInsert.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/ilist/IListInsert.csproj
new file mode 100644
index 0000000000..79ac7d7403
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/ilist/IListInsert.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="ilistinsert.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/ilist/IListItem.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/ilist/IListItem.csproj
new file mode 100644
index 0000000000..e478c715c1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/ilist/IListItem.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="ilistitem.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/ilist/IListRemoveAt.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/ilist/IListRemoveAt.csproj
new file mode 100644
index 0000000000..c5adbe24df
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/ilist/IListRemoveAt.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="ilistremoveat.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/ilist/ilistindexof.cs b/tests/src/CoreMangLib/cti/system/collections/generic/ilist/ilistindexof.cs
new file mode 100644
index 0000000000..db524a32fb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/ilist/ilistindexof.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/ilist/ilistinsert.cs b/tests/src/CoreMangLib/cti/system/collections/generic/ilist/ilistinsert.cs
new file mode 100644
index 0000000000..753a63632e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/ilist/ilistinsert.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/ilist/ilistitem.cs b/tests/src/CoreMangLib/cti/system/collections/generic/ilist/ilistitem.cs
new file mode 100644
index 0000000000..45f3a9440c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/ilist/ilistitem.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/ilist/ilistremoveat.cs b/tests/src/CoreMangLib/cti/system/collections/generic/ilist/ilistremoveat.cs
new file mode 100644
index 0000000000..7fb231b2a6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/ilist/ilistremoveat.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/keynotfoundexception/KeyNotFoundExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/keynotfoundexception/KeyNotFoundExceptionCtor1.csproj
new file mode 100644
index 0000000000..0079e6ebdb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/keynotfoundexception/KeyNotFoundExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="keynotfoundexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/keynotfoundexception/KeyNotFoundExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/keynotfoundexception/KeyNotFoundExceptionCtor2.csproj
new file mode 100644
index 0000000000..3da97953cc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/keynotfoundexception/KeyNotFoundExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="keynotfoundexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/keynotfoundexception/keynotfoundexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/collections/generic/keynotfoundexception/keynotfoundexceptionctor1.cs
new file mode 100644
index 0000000000..2715c28b9c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/keynotfoundexception/keynotfoundexceptionctor1.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/keynotfoundexception/keynotfoundexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/collections/generic/keynotfoundexception/keynotfoundexceptionctor2.cs
new file mode 100644
index 0000000000..221f113e23
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/keynotfoundexception/keynotfoundexceptionctor2.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/KeyValuePairKey.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/KeyValuePairKey.csproj
new file mode 100644
index 0000000000..7410752239
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/KeyValuePairKey.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="keyvaluepairkey.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/KeyValuePairToString.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/KeyValuePairToString.csproj
new file mode 100644
index 0000000000..ad97276cf5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/KeyValuePairToString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="keyvaluepairtostring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/KeyValuePairValue.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/KeyValuePairValue.csproj
new file mode 100644
index 0000000000..4f3040d2da
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/KeyValuePairValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="keyvaluepairvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/KeyValuePairctor.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/KeyValuePairctor.csproj
new file mode 100644
index 0000000000..4a1b81fcba
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/KeyValuePairctor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="keyvaluepairctor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/keyvaluepairctor.cs b/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/keyvaluepairctor.cs
new file mode 100644
index 0000000000..5f549f9701
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/keyvaluepairctor.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/keyvaluepairkey.cs b/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/keyvaluepairkey.cs
new file mode 100644
index 0000000000..607decec60
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/keyvaluepairkey.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/keyvaluepairtostring.cs b/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/keyvaluepairtostring.cs
new file mode 100644
index 0000000000..fe242c604b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/keyvaluepairtostring.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/keyvaluepairvalue.cs b/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/keyvaluepairvalue.cs
new file mode 100644
index 0000000000..1c6cd8cf3d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/keyvaluepair/keyvaluepairvalue.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/BinarySearch1.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/BinarySearch1.csproj
new file mode 100644
index 0000000000..bacf811bda
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/BinarySearch1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="binarysearch1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/BinarySearch2.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/BinarySearch2.csproj
new file mode 100644
index 0000000000..7401c1b207
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/BinarySearch2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="binarysearch2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/BinarySearch3.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/BinarySearch3.csproj
new file mode 100644
index 0000000000..46607e495e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/BinarySearch3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="binarysearch3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/CopyTo1.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/CopyTo1.csproj
new file mode 100644
index 0000000000..6bb7a3a3da
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/CopyTo1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="copyto1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/CopyTo2.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/CopyTo2.csproj
new file mode 100644
index 0000000000..abe3776f9c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/CopyTo2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="copyto2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/CopyTo3.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/CopyTo3.csproj
new file mode 100644
index 0000000000..852ca2812b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/CopyTo3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="copyto3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListAdd.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListAdd.csproj
new file mode 100644
index 0000000000..bbc6e0e568
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListAdd.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listadd.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListAddRange.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListAddRange.csproj
new file mode 100644
index 0000000000..6ba7aeb470
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListAddRange.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listaddrange.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListCapacity.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListCapacity.csproj
new file mode 100644
index 0000000000..63b3b146d9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListCapacity.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listcapacity.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListClear.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListClear.csproj
new file mode 100644
index 0000000000..53acfa4f2f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListClear.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listclear.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListContains.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListContains.csproj
new file mode 100644
index 0000000000..39f89d4350
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListContains.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listcontains.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListCount.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListCount.csproj
new file mode 100644
index 0000000000..161d780df5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListCount.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listcount.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListCtor1.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListCtor1.csproj
new file mode 100644
index 0000000000..34fa2a7ab4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListCtor2.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListCtor2.csproj
new file mode 100644
index 0000000000..0427663141
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListCtor3.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListCtor3.csproj
new file mode 100644
index 0000000000..f04ac8f826
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListForEach.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListForEach.csproj
new file mode 100644
index 0000000000..7b2f84310c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListForEach.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listforeach.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListGetEnumerator.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListGetEnumerator.csproj
new file mode 100644
index 0000000000..0bac79a22f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListGetEnumerator.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listgetenumerator.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListGetRange.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListGetRange.csproj
new file mode 100644
index 0000000000..4dc307e01e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListGetRange.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listgetrange.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListICollectionCopyTo.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListICollectionCopyTo.csproj
new file mode 100644
index 0000000000..9e0bf2698f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListICollectionCopyTo.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listicollectioncopyto.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListICollectionIsReadOnly.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListICollectionIsReadOnly.csproj
new file mode 100644
index 0000000000..2de2d81bad
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListICollectionIsReadOnly.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listicollectionisreadonly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListICollectionIsSynchronized.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListICollectionIsSynchronized.csproj
new file mode 100644
index 0000000000..e91910ee72
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListICollectionIsSynchronized.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listicollectionissynchronized.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListICollectionSyncRoot.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListICollectionSyncRoot.csproj
new file mode 100644
index 0000000000..5826186dcf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListICollectionSyncRoot.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listicollectionsyncroot.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIEnumerableGetEnumerator.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIEnumerableGetEnumerator.csproj
new file mode 100644
index 0000000000..96955024e0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIEnumerableGetEnumerator.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listienumerablegetenumerator.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIEnumerableGetEnumerator2.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIEnumerableGetEnumerator2.csproj
new file mode 100644
index 0000000000..f79a4f9da2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIEnumerableGetEnumerator2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listienumerablegetenumerator2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListAdd.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListAdd.csproj
new file mode 100644
index 0000000000..776c1dfacf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListAdd.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listilistadd.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListContains.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListContains.csproj
new file mode 100644
index 0000000000..04240305b8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListContains.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listilistcontains.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListIndexOf.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListIndexOf.csproj
new file mode 100644
index 0000000000..b9fc79d89d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListIndexOf.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listilistindexof.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListInsert.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListInsert.csproj
new file mode 100644
index 0000000000..442ada9a7c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListInsert.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listilistinsert.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListIsFixedSize.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListIsFixedSize.csproj
new file mode 100644
index 0000000000..e5957232a7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListIsFixedSize.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listilistisfixedsize.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListIsReadOnly.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListIsReadOnly.csproj
new file mode 100644
index 0000000000..beea9cccf4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListIsReadOnly.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listilistisreadonly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListItem.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListItem.csproj
new file mode 100644
index 0000000000..16fb1d7b49
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListItem.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listilistitem.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListRemove.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListRemove.csproj
new file mode 100644
index 0000000000..83c1a7ec50
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIListRemove.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listilistremove.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIndexOf1.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIndexOf1.csproj
new file mode 100644
index 0000000000..04bc7d5b94
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIndexOf1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listindexof1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIndexOf2.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIndexOf2.csproj
new file mode 100644
index 0000000000..799998e1c8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIndexOf2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listindexof2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIndexOf3.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIndexOf3.csproj
new file mode 100644
index 0000000000..323950f28c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListIndexOf3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listindexof3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListInsertRange.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListInsertRange.csproj
new file mode 100644
index 0000000000..2c736b5035
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListInsertRange.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listinsertrange.cs.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListLastIndexOf1.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListLastIndexOf1.csproj
new file mode 100644
index 0000000000..df45362c2d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListLastIndexOf1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listlastindexof1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListLastIndexOf2.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListLastIndexOf2.csproj
new file mode 100644
index 0000000000..940283954b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListLastIndexOf2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listlastindexof2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListLastIndexOf3.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListLastIndexOf3.csproj
new file mode 100644
index 0000000000..e4e8c32558
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListLastIndexOf3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listlastindexof3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListRemoveAt.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListRemoveAt.csproj
new file mode 100644
index 0000000000..61aa45b0ad
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListRemoveAt.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listremoveat.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListRemoveRange.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListRemoveRange.csproj
new file mode 100644
index 0000000000..6a19c4971e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListRemoveRange.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listremoverange.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListReverse.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListReverse.csproj
new file mode 100644
index 0000000000..1540a7a163
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListReverse.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listreverse.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListReverse2.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListReverse2.csproj
new file mode 100644
index 0000000000..06e86832b6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListReverse2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listreverse2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListToArray.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListToArray.csproj
new file mode 100644
index 0000000000..c6795b15d1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListToArray.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listtoarray.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/ListTrimExcess.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListTrimExcess.csproj
new file mode 100644
index 0000000000..93c57c02fb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/ListTrimExcess.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="listtrimexcess.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/binarysearch1.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/binarysearch1.cs
new file mode 100644
index 0000000000..52bbe144e5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/binarysearch1.cs
@@ -0,0 +1,256 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List.binarySearch(T)
+/// </summary>
+public class BinarySearch1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The generic type is int");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ listObject.Sort();
+ int i = this.GetInt32(0, 10);
+ int result = listObject.BinarySearch(i);
+ if (result != i)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,The result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The generic type is a referece type of string");
+
+ try
+ {
+ string[] strArray = { "apple", "banana", "chocolate", "dog", "food" };
+ List<string> listObject = new List<string>(strArray);
+ int result = listObject.BinarySearch("egg");
+ if (result != -5)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,The result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: There are many elements with the same value");
+
+ try
+ {
+ string[] strArray = { "key", "keys", "key", "key", "sky", "key" };
+ List<string> listObject = new List<string>(strArray);
+ int result = listObject.BinarySearch("key");
+ if (result < 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected,The result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: The generic type is custom type");
+
+ try
+ {
+ MyClass myclass1 = new MyClass(10);
+ MyClass myclass2 = new MyClass(20);
+ MyClass myclass3 = new MyClass(30);
+ MyClass[] mc = new MyClass[3] { myclass1, myclass2, myclass3 };
+ List<MyClass> listObject = new List<MyClass>(mc);
+ listObject.Sort();
+ int result = listObject.BinarySearch(new MyClass(20));
+ if (result != 1)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected,The result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: The item to be search is a null reference");
+
+ try
+ {
+ string[] strArray = { "apple", "banana", "chocolate", "dog", "food" };
+ List<string> listObject = new List<string>(strArray);
+ int result = listObject.BinarySearch(null);
+ if (result != -1)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected,The result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: IComparable generic interface was not implemented");
+
+ try
+ {
+ TestClass[] tc = new TestClass[2] { new TestClass(), new TestClass() };
+ List<TestClass> listObject = new List<TestClass>(tc);
+ int result = listObject.BinarySearch(new TestClass());
+ TestLibrary.TestFramework.LogError("101", "The InvalidOperationException was not thrown as expected");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ BinarySearch1 test = new BinarySearch1();
+
+ TestLibrary.TestFramework.BeginTestCase("BinarySearch1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
+public class MyClass : IComparable
+{
+ public int value;
+ public MyClass(int a)
+ {
+ this.value = a;
+ }
+ #region IComparable Members
+
+ public int CompareTo(object obj)
+ {
+ return this.value.CompareTo(((MyClass)obj).value);
+ }
+
+ #endregion
+}
+public class TestClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/binarysearch2.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/binarysearch2.cs
new file mode 100644
index 0000000000..72e7979622
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/binarysearch2.cs
@@ -0,0 +1,378 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Collections;
+
+/// <summary>
+/// System.Collections.Generic.List.binarySearch(T,Collections.Generic.IComparer<T>)
+/// </summary>
+public class BinarySearch2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The generic type is int and using custom IComparer");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ listObject.Sort();
+ IntClass intClass = new IntClass();
+ int i = this.GetInt32(0, 10);
+ int result = listObject.BinarySearch(i, intClass);
+ if (result != i)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,The result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The generic type is a referece type of string and using the custom IComparer");
+
+ try
+ {
+ string[] strArray = { "apple", "banana", "chocolate", "dog", "food" };
+ List<string> listObject = new List<string>(strArray);
+ StrClass strClass = new StrClass();
+ listObject.Sort(strClass);
+ int result = listObject.BinarySearch("egg", strClass);
+ if (result != -2)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,The result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: There are many elements with the same value");
+
+ try
+ {
+ string[] strArray = { "key", "keys", "key", "key", "sky", "key" };
+ List<string> listObject = new List<string>(strArray);
+ StrClass strClass = new StrClass();
+ int result = listObject.BinarySearch("key", strClass);
+ if (result < 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected,The result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: The generic type is custom type");
+
+ try
+ {
+ MyClass myclass1 = new MyClass(10);
+ MyClass myclass2 = new MyClass(20);
+ MyClass myclass3 = new MyClass(30);
+ MyClass[] mc = new MyClass[3] { myclass1, myclass2, myclass3 };
+ List<MyClass> listObject = new List<MyClass>(mc);
+ MyClassIC myclassIC = new MyClassIC();
+ listObject.Sort(myclassIC);
+ int result = listObject.BinarySearch(new MyClass(10), myclassIC);
+ if (result != 2)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected,The result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: The item to be search is a null reference");
+
+ try
+ {
+ string[] strArray = { "apple", "banana", "chocolate", "dog", "food" };
+ List<string> listObject = new List<string>(strArray);
+ listObject.Sort();
+ StrClass strClass = new StrClass();
+ int result = listObject.BinarySearch(null, strClass);
+ if (result != -1)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected,The result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: The IComparer is a null reference");
+
+ try
+ {
+ MyClass myclass1 = new MyClass(10);
+ MyClass myclass2 = new MyClass(20);
+ MyClass myclass3 = new MyClass(30);
+ MyClass[] mc = new MyClass[3] { myclass1, myclass2, myclass3 };
+ List<MyClass> listObject = new List<MyClass>(mc);
+ MyClassIC myclassIC = new MyClassIC();
+ listObject.Sort();
+ int result = listObject.BinarySearch(new MyClass(10), null);
+ if (result != 0)
+ {
+ TestLibrary.TestFramework.LogError("011", "The result is not the value as expected,The result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: IComparable generic interface was not implemented");
+
+ try
+ {
+ TestClass[] tc = new TestClass[2] { new TestClass(), new TestClass() };
+ List<TestClass> listObject = new List<TestClass>(tc);
+ int result = listObject.BinarySearch(new TestClass(), null);
+ TestLibrary.TestFramework.LogError("101", "The InvalidOperationException was not thrown as expected");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ BinarySearch2 test = new BinarySearch2();
+
+ TestLibrary.TestFramework.BeginTestCase("BinarySearch2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
+public class MyClass : IComparable
+{
+ public int value;
+ public MyClass(int a)
+ {
+ this.value = a;
+ }
+ #region IComparable Members
+
+ public int CompareTo(object obj)
+ {
+ return this.value.CompareTo(((MyClass)obj).value);
+ }
+
+ #endregion
+}
+public class TestClass
+{
+}
+public class IntClass : IComparer<int>
+{
+ #region IComparer<int> Members
+
+ public int Compare(int x, int y)
+ {
+ return x.CompareTo(y);
+ }
+
+ #endregion
+}
+public class StrClass : IComparer<string>
+{
+ #region IComparer<string> Members
+
+ public int Compare(string x, string y)
+ {
+ {
+ if (x == null)
+ {
+ if (y == null)
+ {
+ // If x is null and y is null, they're
+ // equal.
+ return 0;
+ }
+ else
+ {
+ // If x is null and y is not null, y
+ // is greater.
+ return -1;
+ }
+ }
+ else
+ {
+ // If x is not null...
+ //
+ if (y == null)
+ // ...and y is null, x is greater.
+ {
+ return 1;
+ }
+ else
+ {
+ // ...and y is not null, compare the
+ // lengths of the two strings.
+ //
+ int retval = x.Length.CompareTo(y.Length);
+
+ if (retval != 0)
+ {
+ // If the strings are not of equal length,
+ // the longer string is greater.
+ //
+ return retval;
+ }
+ else
+ {
+ // If the strings are of equal length,
+ // sort them with ordinary string comparison.
+ //
+ return x.CompareTo(y);
+ }
+ }
+ }
+ }
+ }
+
+ #endregion
+}
+
+public class MyClassIC : IComparer<MyClass>
+{
+ #region IComparer<MyClass> Members
+
+ public int Compare(MyClass x, MyClass y)
+ {
+ return (-1) * (x.value.CompareTo(y.value));
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/binarysearch3.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/binarysearch3.cs
new file mode 100644
index 0000000000..7c6511121e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/binarysearch3.cs
@@ -0,0 +1,471 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Collections;
+
+/// <summary>
+/// System.Collections.Generic.List.binarySearch(int32,int32,T,Collections.Generic.IComparer<T>)
+/// </summary>
+public class BinarySearch3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The generic type is int and using custom IComparer");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ listObject.Sort();
+ IntClass intClass = new IntClass();
+ int i = 7;
+ int result = listObject.BinarySearch(5, 4, i, intClass);
+ if (result != i)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,The result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The generic type is a referece type of string and using the custom IComparer");
+
+ try
+ {
+ string[] strArray = { "apple", "banana", "chocolate", "dog", "food" };
+ List<string> listObject = new List<string>(strArray);
+ StrClass strClass = new StrClass();
+ listObject.Sort(strClass);
+ int result = listObject.BinarySearch(2, 3, "egg", strClass);
+ if (result != -3)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,The result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: There are many elements with the same value");
+
+ try
+ {
+ string[] strArray = { "key", "keys", "key", "key", "sky", "key" };
+ List<string> listObject = new List<string>(strArray);
+ StrClass strClass = new StrClass();
+ int result = listObject.BinarySearch(0, 1, "key", strClass);
+ if (result != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected,The result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: The generic type is custom type");
+
+ try
+ {
+ MyClass myclass1 = new MyClass(10);
+ MyClass myclass2 = new MyClass(20);
+ MyClass myclass3 = new MyClass(30);
+ MyClass[] mc = new MyClass[3] { myclass1, myclass2, myclass3 };
+ List<MyClass> listObject = new List<MyClass>(mc);
+ MyClassIC myclassIC = new MyClassIC();
+ listObject.Sort(myclassIC);
+ int result = listObject.BinarySearch(0, 3, new MyClass(10), myclassIC);
+ if (result != 2)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected,The result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: The item to be search is a null reference");
+
+ try
+ {
+ string[] strArray = { "apple", "banana", "chocolate", "dog", "food" };
+ List<string> listObject = new List<string>(strArray);
+ listObject.Sort();
+ StrClass strClass = new StrClass();
+ int result = listObject.BinarySearch(0, 3, null, strClass);
+ if (result != -1)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected,The result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: The IComparer is a null reference");
+
+ try
+ {
+ MyClass myclass1 = new MyClass(10);
+ MyClass myclass2 = new MyClass(20);
+ MyClass myclass3 = new MyClass(30);
+ MyClass[] mc = new MyClass[3] { myclass1, myclass2, myclass3 };
+ List<MyClass> listObject = new List<MyClass>(mc);
+ MyClassIC myclassIC = new MyClassIC();
+ listObject.Sort();
+ int result = listObject.BinarySearch(0, 3, new MyClass(10), null);
+ if (result != 0)
+ {
+ TestLibrary.TestFramework.LogError("011", "The result is not the value as expected,The result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: IComparable generic interface was not implemented");
+
+ try
+ {
+ TestClass[] tc = new TestClass[2] { new TestClass(), new TestClass() };
+ List<TestClass> listObject = new List<TestClass>(tc);
+ int result = listObject.BinarySearch(0, 2, new TestClass(), null);
+ TestLibrary.TestFramework.LogError("101", "The InvalidOperationException was not thrown as expected");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Index is less than zero");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ listObject.Sort();
+ IntClass intClass = new IntClass();
+ int i = 7;
+ int result = listObject.BinarySearch(-1, 4, i, intClass);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Count is less than zero");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ listObject.Sort();
+ IntClass intClass = new IntClass();
+ int i = 7;
+ int result = listObject.BinarySearch(1, -4, i, intClass);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: index and count do not denote a valid range in the List");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ listObject.Sort();
+ IntClass intClass = new IntClass();
+ int i = 7;
+ int result = listObject.BinarySearch(6, 5, i, intClass);
+ TestLibrary.TestFramework.LogError("107", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ BinarySearch3 test = new BinarySearch3();
+
+ TestLibrary.TestFramework.BeginTestCase("BinarySearch3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
+public class MyClass : IComparable
+{
+ public int value;
+ public MyClass(int a)
+ {
+ this.value = a;
+ }
+ #region IComparable Members
+
+ public int CompareTo(object obj)
+ {
+ return this.value.CompareTo(((MyClass)obj).value);
+ }
+
+ #endregion
+}
+public class TestClass
+{
+}
+public class IntClass : IComparer<int>
+{
+ #region IComparer<int> Members
+
+ public int Compare(int x, int y)
+ {
+ return x.CompareTo(y);
+ }
+
+ #endregion
+}
+public class StrClass : IComparer<string>
+{
+ #region IComparer<string> Members
+
+ public int Compare(string x, string y)
+ {
+ {
+ if (x == null)
+ {
+ if (y == null)
+ {
+ // If x is null and y is null, they're
+ // equal.
+ return 0;
+ }
+ else
+ {
+ // If x is null and y is not null, y
+ // is greater.
+ return -1;
+ }
+ }
+ else
+ {
+ // If x is not null...
+ //
+ if (y == null)
+ // ...and y is null, x is greater.
+ {
+ return 1;
+ }
+ else
+ {
+ // ...and y is not null, compare the
+ // lengths of the two strings.
+ //
+ int retval = x.Length.CompareTo(y.Length);
+
+ if (retval != 0)
+ {
+ // If the strings are not of equal length,
+ // the longer string is greater.
+ //
+ return retval;
+ }
+ else
+ {
+ // If the strings are of equal length,
+ // sort them with ordinary string comparison.
+ //
+ return x.CompareTo(y);
+ }
+ }
+ }
+ }
+ }
+
+ #endregion
+}
+
+public class MyClassIC : IComparer<MyClass>
+{
+ #region IComparer<MyClass> Members
+
+ public int Compare(MyClass x, MyClass y)
+ {
+ return (-1) * (x.value.CompareTo(y.value));
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/copyto1.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/copyto1.cs
new file mode 100644
index 0000000000..25cb1a59b7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/copyto1.cs
@@ -0,0 +1,200 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List<T>.CopyTo(T)
+/// </summary>
+public class CopyTo1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The list is type of int");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ int[] result = new int[10];
+ listObject.CopyTo(result);
+ for (int i = 0; i < 10; i++)
+ {
+ if (listObject[i] != result[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is: " + i);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The list is type of string");
+
+ try
+ {
+ string[] strArray = { "Tom", "Jack", "Mike" };
+ List<string> listObject = new List<string>(strArray);
+ string[] result = new string[3];
+ listObject.CopyTo(result);
+ if ((result[0] != "Tom") || (result[1] != "Jack") || (result[2] != "Mike"))
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The generic type is a custom type");
+
+ try
+ {
+ MyClass myclass1 = new MyClass();
+ MyClass myclass2 = new MyClass();
+ MyClass myclass3 = new MyClass();
+ List<MyClass> listObject = new List<MyClass>();
+ listObject.Add(myclass1);
+ listObject.Add(myclass2);
+ listObject.Add(myclass3);
+ MyClass[] mc = new MyClass[3];
+ listObject.CopyTo(mc);
+ if ((mc[0] != myclass1) || (mc[1] != myclass2) || (mc[2] != myclass3))
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The array is a null reference");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ listObject.CopyTo(null);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The number of elements in the source List is greater than the number of elements that the destination array can contain");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ int[] result = new int[1];
+ listObject.CopyTo(result);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ CopyTo1 test = new CopyTo1();
+
+ TestLibrary.TestFramework.BeginTestCase("CopyTo1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/copyto2.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/copyto2.cs
new file mode 100644
index 0000000000..cf1c1a82b3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/copyto2.cs
@@ -0,0 +1,335 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List<T>.CopyTo(T,Int32)
+/// </summary>
+public class CopyTo2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The list is type of int and get a random index");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ int[] result = new int[100];
+ int t = this.GetInt32(0, 90);
+ listObject.CopyTo(result, t);
+ for (int i = 0; i < 10; i++)
+ {
+ if (listObject[i] != result[i + t])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is: " + i);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The list is type of string and copy the date to the array whose beginning index is zero");
+
+ try
+ {
+ string[] strArray = { "Tom", "Jack", "Mike" };
+ List<string> listObject = new List<string>(strArray);
+ string[] result = new string[3];
+ listObject.CopyTo(result, 0);
+ if ((result[0] != "Tom") || (result[1] != "Jack") || (result[2] != "Mike"))
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The generic type is a custom type");
+
+ try
+ {
+ MyClass myclass1 = new MyClass();
+ MyClass myclass2 = new MyClass();
+ MyClass myclass3 = new MyClass();
+ List<MyClass> listObject = new List<MyClass>();
+ listObject.Add(myclass1);
+ listObject.Add(myclass2);
+ listObject.Add(myclass3);
+ MyClass[] mc = new MyClass[3];
+ listObject.CopyTo(mc, 0);
+ if ((mc[0] != myclass1) || (mc[1] != myclass2) || (mc[2] != myclass3))
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Copy an empty list to the end of an array");
+
+ try
+ {
+ List<MyClass> listObject = new List<MyClass>();
+ MyClass[] mc = new MyClass[3];
+ listObject.CopyTo(mc, 2);
+ for (int i = 0; i < 3; i++)
+ {
+ if (mc[i] != null)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The array is a null reference");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ listObject.CopyTo(null, 0);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The number of elements in the source List is greater than the number of elements that the destination array can contain");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ int[] result = new int[1];
+ listObject.CopyTo(result, 0);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: arrayIndex is equal to the length of array");
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ int[] result = new int[20];
+ listObject.CopyTo(result, 20);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: arrayIndex is greater than the length of array");
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ int[] result = new int[20];
+ listObject.CopyTo(result, 300);
+ TestLibrary.TestFramework.LogError("107", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: arrayIndex is less than 0");
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ int[] result = new int[20];
+ listObject.CopyTo(result, -1);
+ TestLibrary.TestFramework.LogError("109", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("110", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ CopyTo2 test = new CopyTo2();
+
+ TestLibrary.TestFramework.BeginTestCase("CopyTo2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/copyto3.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/copyto3.cs
new file mode 100644
index 0000000000..bd3fcd2c65
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/copyto3.cs
@@ -0,0 +1,391 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List<T>.CopyTo(int32,T,Int32,Int32)
+/// </summary>
+public class CopyTo3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The list is type of int and get a random index");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ int[] result = new int[100];
+ int t = this.GetInt32(0, 90);
+ listObject.CopyTo(0, result, t, 10);
+ for (int i = 0; i < 10; i++)
+ {
+ if (listObject[i] != result[i + t])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is: " + i);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The list is type of string and copy the date to the array whose beginning index is zero");
+
+ try
+ {
+ string[] strArray = { "Tom", "Jack", "Mike" };
+ List<string> listObject = new List<string>(strArray);
+ string[] result = new string[3];
+ listObject.CopyTo(2, result, 0, 1);
+ if (result[0] != "Mike")
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The generic type is a custom type");
+
+ try
+ {
+ MyClass myclass1 = new MyClass();
+ MyClass myclass2 = new MyClass();
+ MyClass myclass3 = new MyClass();
+ List<MyClass> listObject = new List<MyClass>();
+ listObject.Add(myclass1);
+ listObject.Add(myclass2);
+ listObject.Add(myclass3);
+ MyClass[] mc = new MyClass[3];
+ listObject.CopyTo(0, mc, 0, 3);
+ if ((mc[0] != myclass1) || (mc[1] != myclass2) || (mc[2] != myclass3))
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Copy an empty list to the end of an array,the three int32 arguments are zero all");
+
+ try
+ {
+ List<MyClass> listObject = new List<MyClass>();
+ MyClass[] mc = new MyClass[3];
+ listObject.CopyTo(0, mc, 0, 0);
+ for (int i = 0; i < 3; i++)
+ {
+ if (mc[i] != null)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The array is a null reference");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ listObject.CopyTo(0, null, 0, 10);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The number of elements in the source List is greater than the number of elements that the destination array can contain");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ int[] result = new int[1];
+ listObject.CopyTo(0, result, 0, 2);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: arrayIndex is equal to the length of array");
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ int[] result = new int[20];
+ listObject.CopyTo(0, result, 20, 2);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: arrayIndex is greater than the length of array");
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ int[] result = new int[20];
+ listObject.CopyTo(3, result, 300, 6);
+ TestLibrary.TestFramework.LogError("107", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: arrayIndex is less than 0");
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ int[] result = new int[20];
+ listObject.CopyTo(result, -1);
+ TestLibrary.TestFramework.LogError("109", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("110", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: The index of list is less than 0");
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ int[] result = new int[20];
+ listObject.CopyTo(-1, result, 10, 5);
+ TestLibrary.TestFramework.LogError("111", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("112", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest7: The index of list is greater than the Count of the source");
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ int[] result = new int[20];
+ listObject.CopyTo(11, result, 10, 5);
+ TestLibrary.TestFramework.LogError("113", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("114", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ CopyTo3 test = new CopyTo3();
+
+ TestLibrary.TestFramework.BeginTestCase("CopyTo3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listadd.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listadd.cs
new file mode 100644
index 0000000000..208cec4094
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listadd.cs
@@ -0,0 +1,170 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List<T>.add(T)
+/// </summary>
+public class ListAdd
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The item to be added is type of byte");
+
+ try
+ {
+ byte[] byteObject = new byte[1000];
+ TestLibrary.Generator.GetBytes(-55, byteObject);
+ List<byte> listObject = new List<byte>();
+ for (int i = 0; i < 1000; i++)
+ {
+ listObject.Add(byteObject[i]);
+ }
+ for (int i = 0; i < 1000; i++)
+ {
+ if (listObject[i] != byteObject[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is: " + i);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The item to be added is type of string");
+
+ try
+ {
+ string[] strArray = { "Hello" };
+ List<string> listObject = new List<string>(strArray);
+ string str1 = "World";
+ listObject.Add(str1);
+ if (listObject.Count != 2)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ if (listObject[1] != "World")
+ {
+ TestLibrary.TestFramework.LogError("004", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The item to be added is a custom type");
+
+ try
+ {
+ MyClass myClass = new MyClass();
+ List<MyClass> listObject = new List<MyClass>();
+ listObject.Add(myClass);
+ if (listObject[0] != myClass)
+ {
+ TestLibrary.TestFramework.LogError("006", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Add null object to the list");
+
+ try
+ {
+ List<string> listObject = new List<string>(1);
+ listObject.Add(null);
+ if (listObject[0] != null)
+ {
+ TestLibrary.TestFramework.LogError("008", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ListAdd test = new ListAdd();
+
+ TestLibrary.TestFramework.BeginTestCase("ListAdd");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listaddrange.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listaddrange.cs
new file mode 100644
index 0000000000..7374b37f0c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listaddrange.cs
@@ -0,0 +1,174 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List<T>.addRange(IEnumerable)
+/// </summary>
+public class ListAddRange
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The item to be added is type of byte");
+
+ try
+ {
+ byte[] byteObject = new byte[1000];
+ TestLibrary.Generator.GetBytes(-55, byteObject);
+ List<byte> listObject = new List<byte>();
+ listObject.AddRange(byteObject);
+ for (int i = 0; i < 1000; i++)
+ {
+ if (listObject[i] != byteObject[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is: " + i);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The item to be added is type of string");
+
+ try
+ {
+ string[] strArray = { "Hello", "world", "Tom", "school" };
+ List<string> listObject = new List<string>(1);
+ listObject.AddRange(strArray);
+ if (listObject.Count != 4)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ for (int i = 0; i < 4; i++)
+ {
+ if (listObject[i] != strArray[i])
+ {
+ TestLibrary.TestFramework.LogError("004", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The item to be added is a custom type");
+
+ try
+ {
+ MyClass myClass1 = new MyClass();
+ MyClass myClass2 = new MyClass();
+ MyClass[] mc ={ myClass1, myClass2 };
+ List<MyClass> listObject = new List<MyClass>();
+ listObject.AddRange(mc);
+ if (listObject[0] != myClass1 || (listObject[1] != myClass2))
+ {
+ TestLibrary.TestFramework.LogError("006", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The argument is a null reference");
+
+ try
+ {
+ IEnumerable<string> i = null;
+ List<string> listObject = new List<string>(100);
+ listObject.AddRange(i);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ListAddRange test = new ListAddRange();
+
+ TestLibrary.TestFramework.BeginTestCase("ListAddRange");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listcapacity.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listcapacity.cs
new file mode 100644
index 0000000000..763cbd7f45
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listcapacity.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listclear.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listclear.cs
new file mode 100644
index 0000000000..b5b14feeb7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listclear.cs
@@ -0,0 +1,180 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List.Clear()
+/// </summary>
+public class ListClear
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Remove int elements from the list");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ listObject.Clear();
+ if (listObject.Capacity != 10)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ if (listObject.Count != 0)
+ {
+ TestLibrary.TestFramework.LogError("002", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Remove string elements from the list");
+
+ try
+ {
+ string[] strArray = { "apple", "banana", "chocolate", "dog", "food" };
+ List<string> listObject = new List<string>(strArray);
+ listObject.Clear();
+ if (listObject.Capacity != 5)
+ {
+ TestLibrary.TestFramework.LogError("004", "The result is not the value as expected");
+ retVal = false;
+ }
+ if (listObject.Count != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Remove the elements from the list of custom type");
+
+ try
+ {
+ MyClass myclass1 = new MyClass();
+ MyClass myclass2 = new MyClass();
+ MyClass myclass3 = new MyClass();
+ MyClass[] mc = new MyClass[3] { myclass1, myclass2, myclass3 };
+ List<MyClass> listObject = new List<MyClass>(mc);
+ listObject.Clear();
+ if (listObject.Capacity != 3)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ if (listObject.Count != 0)
+ {
+ TestLibrary.TestFramework.LogError("008", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Remove the elements from the empty list");
+
+ try
+ {
+ List<MyClass> listObject = new List<MyClass>(100);
+ listObject.Clear();
+ if (listObject.Capacity != 100)
+ {
+ TestLibrary.TestFramework.LogError("010", "The result is not the value as expected");
+ retVal = false;
+ }
+ if (listObject.Count != 0)
+ {
+ TestLibrary.TestFramework.LogError("011", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ListClear test = new ListClear();
+
+ TestLibrary.TestFramework.BeginTestCase("ListClear");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+public class MyClass
+{
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listcontains.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listcontains.cs
new file mode 100644
index 0000000000..05ecc1cc2f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listcontains.cs
@@ -0,0 +1,204 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List.Contains(T)
+/// </summary>
+public class ListContains
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The generic type is int");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ int i = this.GetInt32(0, 10);
+ if (!listObject.Contains(i))
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,The i is: " + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The generic type is a referece type of string");
+
+ try
+ {
+ string[] strArray = { "apple", "banana", "chocolate", "dog", "food" };
+ List<string> listObject = new List<string>(strArray);
+ if (!listObject.Contains("dog"))
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The generic type is custom type");
+
+ try
+ {
+ MyClass myclass1 = new MyClass();
+ MyClass myclass2 = new MyClass();
+ MyClass myclass3 = new MyClass();
+ MyClass[] mc = new MyClass[3] { myclass1, myclass2, myclass3 };
+ List<MyClass> listObject = new List<MyClass>(mc);
+ if (!listObject.Contains(myclass1))
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: The list does not contain the element");
+
+ try
+ {
+ char[] chArray = { '1', '9', '3', '6', '5', '8', '7', '2', '4' };
+ List<char> listObject = new List<char>(chArray);
+ if (listObject.Contains('t'))
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: The argument is a null reference");
+
+ try
+ {
+ string[] strArray = { "apple", "banana", "chocolate", null, "food" };
+ List<string> listObject = new List<string>(strArray);
+ if (!listObject.Contains(null))
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ListContains test = new ListContains();
+
+ TestLibrary.TestFramework.BeginTestCase("ListContains");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listcount.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listcount.cs
new file mode 100644
index 0000000000..7321b22c46
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listcount.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listctor1.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listctor1.cs
new file mode 100644
index 0000000000..d27b601ff3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listctor1.cs
@@ -0,0 +1,125 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List<T>.Ctor
+/// </summary>
+public class ListCtor1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The genaric type is a value type");
+
+ try
+ {
+ List<int> listObject = new List<int>();
+ if (listObject == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "The constructor does not work well");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The generic type is a reference type");
+
+ try
+ {
+ List<string> listObject = new List<string>();
+ if (listObject == null)
+ {
+ TestLibrary.TestFramework.LogError("003", "The constructor does not work well");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The generic type is a custom type");
+
+ try
+ {
+ List<MyClass> listObject = new List<MyClass>();
+ if (listObject == null)
+ {
+ TestLibrary.TestFramework.LogError("005", "The constructor does not work well");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ListCtor1 test = new ListCtor1();
+
+ TestLibrary.TestFramework.BeginTestCase("ListCtor1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listctor2.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listctor2.cs
new file mode 100644
index 0000000000..418f9231d2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listctor2.cs
@@ -0,0 +1,205 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Collections;
+
+/// <summary>
+/// System.Collections.Generic.List<T>.Ctor(IEnumerable<T>)
+/// </summary>
+public class ListCtor2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The genaric type is a value type");
+
+ try
+ {
+ int[] intArray = new int[5] { 1, 2, 3, 4, 5 };
+ List<int> listObject = new List<int>(intArray);
+ if (listObject == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "The constructor does not work well");
+ retVal = false;
+ }
+ if (listObject.Count != 5)
+ {
+ TestLibrary.TestFramework.LogError("002", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The generic type is a reference type");
+
+ try
+ {
+ string[] stringArray = { "Hello", "world", "thanks", "school" };
+ List<string> listObject = new List<string>(stringArray);
+ if (listObject == null)
+ {
+ TestLibrary.TestFramework.LogError("004", "The constructor does not work well");
+ retVal = false;
+ }
+ if (listObject.Count != 4)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The generic type is a custom type");
+
+ try
+ {
+ int length = TestLibrary.Generator.GetByte(-55);
+ MyClass[] myClass = new MyClass[length];
+ List<MyClass> listObject = new List<MyClass>(myClass);
+ if (listObject == null)
+ {
+ TestLibrary.TestFramework.LogError("007", "The constructor does not work well");
+ retVal = false;
+ }
+ if (listObject.Count != length)
+ {
+ TestLibrary.TestFramework.LogError("008", "The result is not the value as expected,the count is: " + listObject.Count + ",The length is: " + length);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Using a list to construct another list");
+
+ try
+ {
+ int[] iArray = new int[10] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 };
+ List<int> listObject1 = new List<int>(iArray);
+ List<int> listObject2 = new List<int>(listObject1);
+ if (listObject2 == null)
+ {
+ TestLibrary.TestFramework.LogError("010", "The constructor does not work well");
+ retVal = false;
+ }
+ if (listObject2.Count != 10)
+ {
+ TestLibrary.TestFramework.LogError("011", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The argument is a null reference");
+
+ try
+ {
+ IEnumerable<char> i = null;
+ List<char> listObject = new List<char>(i);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ListCtor2 test = new ListCtor2();
+
+ TestLibrary.TestFramework.BeginTestCase("ListCtor2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listctor3.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listctor3.cs
new file mode 100644
index 0000000000..32c29995d3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listctor3.cs
@@ -0,0 +1,170 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List<T>.Ctor(Int32)
+/// </summary>
+public class ListCtor3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The genaric type is a value type");
+
+ try
+ {
+ int i = TestLibrary.Generator.GetInt16(-55);
+ List<int> listObject = new List<int>(i);
+ if (listObject == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "The constructor does not work well");
+ retVal = false;
+ }
+ if (listObject.Capacity != i)
+ {
+ TestLibrary.TestFramework.LogError("002", string.Format("The result is not the value as expected,capacity is {0},i is{1}", listObject.Capacity, i));
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The generic type is a reference type");
+
+ try
+ {
+ int i = TestLibrary.Generator.GetInt16(-55);
+ List<string> listObject = new List<string>(i);
+ if (listObject == null)
+ {
+ TestLibrary.TestFramework.LogError("004", "The constructor does not work well");
+ retVal = false;
+ }
+ if (listObject.Capacity != i)
+ {
+ TestLibrary.TestFramework.LogError("005", string.Format("The result is not the value as expected,capacity is {0},i is{1}", listObject.Capacity, i));
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The generic type is a custom type");
+
+ try
+ {
+ int i = TestLibrary.Generator.GetInt16(-55);
+ List<MyClass> listObject = new List<MyClass>(i);
+ if (listObject == null)
+ {
+ TestLibrary.TestFramework.LogError("007", "The constructor does not work well");
+ retVal = false;
+ }
+ if (listObject.Capacity != i)
+ {
+ TestLibrary.TestFramework.LogError("008", string.Format("The result is not the value as expected,capacity is {0},i is{1}", listObject.Capacity, i));
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The argument is a negative number");
+
+ try
+ {
+ int i = (-1) * (TestLibrary.Generator.GetInt16(-55));
+ List<char> listObject = new List<char>(i);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ListCtor3 test = new ListCtor3();
+
+ TestLibrary.TestFramework.BeginTestCase("ListCtor3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listforeach.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listforeach.cs
new file mode 100644
index 0000000000..534c25bf34
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listforeach.cs
@@ -0,0 +1,195 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List.ForEach(predicate)
+/// </summary>
+public class ListForEach
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The generic type is int");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, -1, 8, 7, 1, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ MyClass myClass = new MyClass();
+ Action<int> action = new Action<int>(myClass.sumcalc);
+ listObject.ForEach(action);
+ if (myClass.sum != 40)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,sum is: " + myClass.sum);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The generic type is type of string");
+
+ try
+ {
+ string[] strArray = { "Hello", "wor", "l", "d" };
+ List<string> listObject = new List<string>(strArray);
+ MyClass myClass = new MyClass();
+ Action<string> action = new Action<string>(myClass.joinstr);
+ listObject.ForEach(action);
+ if (myClass.result != "Helloworld")
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,sum is: " + myClass.sum);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The generic type is custom type");
+
+ try
+ {
+ MyClass2 myclass1 = new MyClass2('h');
+ MyClass2 myclass2 = new MyClass2('=');
+ MyClass2 myclass3 = new MyClass2('&');
+ MyClass2[] mc = new MyClass2[3] { myclass1, myclass2, myclass3 };
+ List<MyClass2> listObject = new List<MyClass2>(mc);
+ MyClass myClass = new MyClass();
+ Action<MyClass2> action = new Action<MyClass2>(myClass.deletevalue);
+ listObject.ForEach(action);
+ for (int i = 0; i < 3; i++)
+ {
+ if (mc[i].value != null)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected,sum is: " + myClass.sum);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The action is a null reference");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, -1, 8, 7, 1, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ Action<int> action = null;
+ listObject.ForEach(action);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ListForEach test = new ListForEach();
+
+ TestLibrary.TestFramework.BeginTestCase("ListForEach");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+public class MyClass
+{
+ public int sum = 0;
+ public string result;
+ public void sumcalc(int a)
+ {
+ sum = sum + a;
+ }
+ public void joinstr(string a)
+ {
+ result = result + a;
+ }
+ public void deletevalue(MyClass2 mc)
+ {
+ mc.value = null;
+ }
+}
+public class MyClass2
+{
+ public char? value;
+ public MyClass2(char c)
+ {
+ this.value = c;
+ }
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listgetenumerator.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listgetenumerator.cs
new file mode 100644
index 0000000000..8c612329fd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listgetenumerator.cs
@@ -0,0 +1,175 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List.GetEnumerator
+/// </summary>
+public class ListGetEnumerator
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The generic type is int");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, -1, 8, 7, 1, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ List<int>.Enumerator enumerator = listObject.GetEnumerator();
+ for (int i = 0; i < 10; i++)
+ {
+ enumerator.MoveNext();
+ if (enumerator.Current != iArray[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is: " + i);
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The generic type is type of string");
+
+ try
+ {
+ string[] strArray = { "apple", "banana", "chocolate", "dog", "food" };
+ List<string> listObject = new List<string>(strArray);
+ List<string>.Enumerator enumerator = listObject.GetEnumerator();
+ int i = 0;
+ while (enumerator.MoveNext())
+ {
+ if (enumerator.Current != strArray[i])
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,The i is: " + i);
+ retVal = false;
+ }
+ i++;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The generic type is a custom type");
+
+ try
+ {
+ MyClass myclass1 = new MyClass();
+ MyClass myclass2 = new MyClass();
+ MyClass myclass3 = new MyClass();
+ MyClass[] mc = new MyClass[3] { myclass1, myclass2, myclass3 };
+ List<MyClass> listObject = new List<MyClass>(mc);
+ List<MyClass>.Enumerator enumerator = listObject.GetEnumerator();
+ int i = 0;
+ while (enumerator.MoveNext())
+ {
+ if (enumerator.Current != mc[i])
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected,The i is: " + i);
+ retVal = false;
+ }
+ i++;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: The List is empty");
+
+ try
+ {
+ List<string> listObject = new List<string>();
+ List<string>.Enumerator enumerator = listObject.GetEnumerator();
+ if (enumerator.MoveNext())
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ListGetEnumerator test = new ListGetEnumerator();
+
+ TestLibrary.TestFramework.BeginTestCase("ListGetEnumerator");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+public class MyClass
+{
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listgetrange.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listgetrange.cs
new file mode 100644
index 0000000000..cddd2ba494
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listgetrange.cs
@@ -0,0 +1,290 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List.GetRange(Int32,Int32)
+/// </summary>
+public class ListGetRange
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The generic type is int");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, -1, 8, 7, 1, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ int startIdx = this.GetInt32(0, 9); //The starting index of the section to make a shallow copy
+ int endIdx = this.GetInt32(startIdx, 10);//The end index of the section to make a shallow copy
+ int count = endIdx - startIdx + 1;
+ List<int> listResult = listObject.GetRange(startIdx, count);
+ for (int i = 0; i < count; i++)
+ {
+ if (listResult[i] != iArray[i + startIdx])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,result is: " + listResult[i] + " expected value is: " + iArray[i + startIdx]);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The generic type is type of string");
+
+ try
+ {
+ string[] strArray = { "apple", "banana", "chocolate", "dog", "food" };
+ List<string> listObject = new List<string>(strArray);
+ int startIdx = this.GetInt32(0, 4); //The starting index of the section to make a shallow copy
+ int endIdx = this.GetInt32(startIdx, 5);//The end index of the section to make a shallow copy
+ int count = endIdx - startIdx + 1;
+ List<string> listResult = listObject.GetRange(startIdx, count);
+ for (int i = 0; i < count; i++)
+ {
+ if (listResult[i] != strArray[i + startIdx])
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,result is: " + listResult[i] + " expected value is: " + strArray[i + startIdx]);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The generic type is a custom type");
+
+ try
+ {
+ MyClass myclass1 = new MyClass();
+ MyClass myclass2 = new MyClass();
+ MyClass myclass3 = new MyClass();
+ MyClass[] mc = new MyClass[3] { myclass1, myclass2, myclass3 };
+ List<MyClass> listObject = new List<MyClass>(mc);
+ int startIdx = this.GetInt32(0, 2); //The starting index of the section to make a shallow copy
+ int endIdx = this.GetInt32(startIdx, 3);//The end index of the section to make a shallow copy
+ int count = endIdx - startIdx + 1;
+ List<MyClass> listResult = listObject.GetRange(startIdx, count);
+ for (int i = 0; i < count; i++)
+ {
+ if (listResult[i] != mc[i + startIdx])
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected,result is: " + listResult[i] + " expected value is: " + mc[i + startIdx]);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Copy no elements to the new list");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, -1, 8, 7, 1, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ List<int> listResult = listObject.GetRange(5, 0);
+ if (listResult == null)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ if (listResult.Count != 0)
+ {
+ TestLibrary.TestFramework.LogError("008", "The result is not the value as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The index is a negative number");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, -1, 8, 7, 1, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ List<int> listResult = listObject.GetRange(-1, 4);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The count is a negative number");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, -1, 8, 7, 1, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ List<int> listResult = listObject.GetRange(6, -4);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: index and count do not denote a valid range of elements in the List");
+
+ try
+ {
+ char[] iArray = { '#', ' ', '&', 'c', '1', '_', 'A' };
+ List<char> listObject = new List<char>(iArray);
+ List<char> listResult = listObject.GetRange(4, 4);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ListGetRange test = new ListGetRange();
+
+ TestLibrary.TestFramework.BeginTestCase("ListGetRange");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listicollectioncopyto.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listicollectioncopyto.cs
new file mode 100644
index 0000000000..cff75ab44b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listicollectioncopyto.cs
@@ -0,0 +1,341 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Collections;
+/// <summary>
+///(System.Array,System.Int32)
+/// </summary>
+public class ListICollectionCopyTo
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The list is type of int and get a random index");
+
+ try
+ {
+ int count = 10;
+ int arraySum = 100;
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ int position = this.GetInt32(0, arraySum-count);
+ int[] result = new int[arraySum];
+ ((ICollection)listObject).CopyTo(result, position);
+ for (int i = 0; i < count; i++)
+ {
+ if (listObject[i] != result[i + position])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is: " + i);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The list is type of string and copy the date to the array whose beginning index is zero");
+
+ try
+ {
+ string[] strArray = { "Tom", "Jack", "Mike" };
+ List<string> listObject = new List<string>(strArray);
+ string[] result = new string[3];
+ ((ICollection)listObject).CopyTo(result, 0);
+ if (result[0] != "Tom" || result[1] != "Jack" || result[2] != "Mike")
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The generic type is a custom type");
+
+ try
+ {
+ MyClass myclass1 = new MyClass();
+ MyClass myclass2 = new MyClass();
+ MyClass myclass3 = new MyClass();
+ List<MyClass> listObject = new List<MyClass>();
+ listObject.Add(myclass1);
+ listObject.Add(myclass2);
+ listObject.Add(myclass3);
+ MyClass[] mc = new MyClass[3];
+ ((ICollection)listObject).CopyTo(mc, 0);
+ if ((mc[0] != myclass1) || (mc[1] != myclass2) || (mc[2] != myclass3))
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Copy an empty list to the end of an array,the three int32 arguments are zero all");
+
+ try
+ {
+ List<MyClass> listObject = new List<MyClass>();
+ MyClass[] mc = new MyClass[3];
+ ((ICollection)listObject).CopyTo(mc, 0);
+ for (int i = 0; i < 3; i++)
+ {
+ if (mc[i] != null)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The array is a null reference");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ ((ICollection)listObject).CopyTo(null, 0);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The number of elements in the source List is greater than the number of elements that the destination array can contain");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ int[] result = new int[1];
+ ((ICollection)listObject).CopyTo(result, 0);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: arrayIndex is equal to the length of array");
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ int[] result = new int[20];
+ ((ICollection)listObject).CopyTo(result, 20);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: arrayIndex is greater than the length of array");
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ int[] result = new int[20];
+ ((ICollection)listObject).CopyTo(result, 300);
+ TestLibrary.TestFramework.LogError("107", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: arrayIndex is less than 0");
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, 5, 8, 7, 2, 4, 0 };
+ List<int> listObject = new List<int>(iArray);
+ int[] result = new int[20];
+ ((ICollection)listObject).CopyTo(result, -1);
+ TestLibrary.TestFramework.LogError("109", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("110", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+
+
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ListICollectionCopyTo test = new ListICollectionCopyTo();
+
+ TestLibrary.TestFramework.BeginTestCase("ListICollectionCopyTo");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listicollectionisreadonly.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listicollectionisreadonly.cs
new file mode 100644
index 0000000000..aa3af10081
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listicollectionisreadonly.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listicollectionissynchronized.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listicollectionissynchronized.cs
new file mode 100644
index 0000000000..26359f181d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listicollectionissynchronized.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listicollectionsyncroot.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listicollectionsyncroot.cs
new file mode 100644
index 0000000000..c25408c21c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listicollectionsyncroot.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listienumerablegetenumerator.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listienumerablegetenumerator.cs
new file mode 100644
index 0000000000..25fbc7bbcb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listienumerablegetenumerator.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listienumerablegetenumerator2.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listienumerablegetenumerator2.cs
new file mode 100644
index 0000000000..b6831281d2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listienumerablegetenumerator2.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistadd.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistadd.cs
new file mode 100644
index 0000000000..559684f9b4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistadd.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistcontains.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistcontains.cs
new file mode 100644
index 0000000000..f94c5fc5c2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistcontains.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistindexof.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistindexof.cs
new file mode 100644
index 0000000000..6134ea6ee2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistindexof.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistinsert.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistinsert.cs
new file mode 100644
index 0000000000..02b685652e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistinsert.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistisfixedsize.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistisfixedsize.cs
new file mode 100644
index 0000000000..45ae0ddb50
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistisfixedsize.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistisreadonly.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistisreadonly.cs
new file mode 100644
index 0000000000..3bb991d9b4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistisreadonly.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistitem.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistitem.cs
new file mode 100644
index 0000000000..d2b0321985
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistitem.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistremove.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistremove.cs
new file mode 100644
index 0000000000..649f0f188d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listilistremove.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listindexof1.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listindexof1.cs
new file mode 100644
index 0000000000..b541be51c6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listindexof1.cs
@@ -0,0 +1,213 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List.IndexOf(T item)
+/// </summary>
+public class ListIndexOf1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The generic type is int");
+
+ try
+ {
+ int[] iArray = new int[1000];
+ for (int i = 0; i < 1000; i++)
+ {
+ iArray[i] = i;
+ }
+ List<int> listObject = new List<int>(iArray);
+ int ob = this.GetInt32(0, 1000);
+ int result = listObject.IndexOf(ob);
+ if (result != ob)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The generic type is type of string");
+
+ try
+ {
+ string[] strArray = { "apple", "banana", "chocolate", "dog", "food" };
+ List<string> listObject = new List<string>(strArray);
+ int result = listObject.IndexOf("dog");
+ if (result != 3)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The generic type is a custom type");
+
+ try
+ {
+ MyClass myclass1 = new MyClass();
+ MyClass myclass2 = new MyClass();
+ MyClass myclass3 = new MyClass();
+ MyClass[] mc = new MyClass[3] { myclass1, myclass2, myclass3 };
+ List<MyClass> listObject = new List<MyClass>(mc);
+ int result = listObject.IndexOf(myclass3);
+ if (result != 2)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: There are many element in the list with the same value");
+
+ try
+ {
+ string[] strArray = { "apple", "banana", "chocolate", "banana", "banana", "dog", "banana", "food" };
+ List<string> listObject = new List<string>(strArray);
+ int result = listObject.IndexOf("banana");
+ if (result != 1)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Do not find the element ");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, -1, 8, 7, 1, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ int result = listObject.IndexOf(-10000);
+ if (result != -1)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ListIndexOf1 test = new ListIndexOf1();
+
+ TestLibrary.TestFramework.BeginTestCase("ListIndexOf1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listindexof2.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listindexof2.cs
new file mode 100644
index 0000000000..ff7602561f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listindexof2.cs
@@ -0,0 +1,270 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List.IndexOf(T item, Int32)
+/// </summary>
+public class ListIndexOf2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The generic type is int");
+
+ try
+ {
+ int[] iArray = new int[1000];
+ for (int i = 0; i < 1000; i++)
+ {
+ iArray[i] = i;
+ }
+ List<int> listObject = new List<int>(iArray);
+ int ob = this.GetInt32(0, 1000);
+ int result = listObject.IndexOf(ob, 0);
+ if (result != ob)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The generic type is type of string");
+
+ try
+ {
+ string[] strArray = { "apple", "dog", "banana", "chocolate", "dog", "food" };
+ List<string> listObject = new List<string>(strArray);
+ int result = listObject.IndexOf("dog", 2);
+ if (result != 4)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The generic type is a custom type");
+
+ try
+ {
+ MyClass myclass1 = new MyClass();
+ MyClass myclass2 = new MyClass();
+ MyClass myclass3 = new MyClass();
+ MyClass[] mc = new MyClass[3] { myclass1, myclass2, myclass3 };
+ List<MyClass> listObject = new List<MyClass>(mc);
+ int result = listObject.IndexOf(myclass3, 2);
+ if (result != 2)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: There are many element in the list with the same value");
+
+ try
+ {
+ string[] strArray = { "apple", "banana", "chocolate", "banana", "banana", "dog", "banana", "food" };
+ List<string> listObject = new List<string>(strArray);
+ int result = listObject.IndexOf("banana", 2);
+ if (result != 3)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Do not find the element ");
+
+ try
+ {
+ int[] iArray = { 1, 9, -11, 3, 6, -1, 8, 7, 1, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ int result = listObject.IndexOf(-11, 4);
+ if (result != -1)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The index is negative");
+
+ try
+ {
+ int[] iArray = { 1, 9, -11, 3, 6, -1, 8, 7, 1, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ int result = listObject.IndexOf(-11, -4);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The index is greater than the last index of the list");
+
+ try
+ {
+ int[] iArray = { 1, 9, -11, 3, 6, -1, 8, 7, 1, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ int result = listObject.IndexOf(-11, 12);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ListIndexOf2 test = new ListIndexOf2();
+
+ TestLibrary.TestFramework.BeginTestCase("ListIndexOf2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listindexof3.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listindexof3.cs
new file mode 100644
index 0000000000..d57b362254
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listindexof3.cs
@@ -0,0 +1,298 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List.IndexOf(T item, Int32,Int32)
+/// </summary>
+public class ListIndexOf3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The generic type is int");
+
+ try
+ {
+ int[] iArray = new int[1000];
+ for (int i = 0; i < 1000; i++)
+ {
+ iArray[i] = i;
+ }
+ List<int> listObject = new List<int>(iArray);
+ int ob = this.GetInt32(0, 1000);
+ int result = listObject.IndexOf(ob, 0, 1000);
+ if (result != ob)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The generic type is type of string");
+
+ try
+ {
+ string[] strArray = { "apple", "dog", "banana", "chocolate", "dog", "food" };
+ List<string> listObject = new List<string>(strArray);
+ int result = listObject.IndexOf("dog", 2, 4);
+ if (result != 4)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The generic type is a custom type");
+
+ try
+ {
+ MyClass myclass1 = new MyClass();
+ MyClass myclass2 = new MyClass();
+ MyClass myclass3 = new MyClass();
+ MyClass[] mc = new MyClass[3] { myclass1, myclass2, myclass3 };
+ List<MyClass> listObject = new List<MyClass>(mc);
+ int result = listObject.IndexOf(myclass3, 2, 1);
+ if (result != 2)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: There are many element in the list with the same value");
+
+ try
+ {
+ string[] strArray = { "apple", "banana", "chocolate", "banana", "banana", "dog", "banana", "food" };
+ List<string> listObject = new List<string>(strArray);
+ int result = listObject.IndexOf("banana", 2, 2);
+ if (result != 3)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Do not find the element ");
+
+ try
+ {
+ int[] iArray = { 1, 9, -11, 3, 6, -1, 8, 7, 1, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ int result = listObject.IndexOf(-11, 4, 6);
+ if (result != -1)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The index is negative");
+
+ try
+ {
+ int[] iArray = { 1, 9, -11, 3, 6, -1, 8, 7, 1, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ int result = listObject.IndexOf(-11, -4, 3);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: index and count do not specify a valid section in the List");
+
+ try
+ {
+ int[] iArray = { 1, 9, -11, 3, 6, -1, 8, 7, 1, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ int result = listObject.IndexOf(-11, 6, 10);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: The count is a negative number");
+
+ try
+ {
+ int[] iArray = { 1, 9, -11, 3, 6, -1, 8, 7, 1, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ int result = listObject.IndexOf(-11, 1, -1);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ListIndexOf3 test = new ListIndexOf3();
+
+ TestLibrary.TestFramework.BeginTestCase("ListIndexOf3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listinsertrange.cs.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listinsertrange.cs.cs
new file mode 100644
index 0000000000..e3e01dba1d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listinsertrange.cs.cs
@@ -0,0 +1,305 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List.InsertRange(Int32,Collection)
+/// </summary>
+public class ListInsertRange
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The generic type is int");
+
+ try
+ {
+ int[] iArray = { 0, 1, 2, 3, 8, 9, 10, 11, 12, 13, 14 };
+ List<int> listObject = new List<int>(iArray);
+ int[] insert = { 4, 5, 6, 7 };
+ listObject.InsertRange(4, insert);
+ for (int i = 0; i < 15; i++)
+ {
+ if (listObject[i] != i)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,listObject is: " + listObject[i]);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Insert the collection to the beginning of the list");
+
+ try
+ {
+ string[] strArray = { "apple", "dog", "banana", "chocolate", "dog", "food" };
+ List<string> listObject = new List<string>(strArray);
+ string[] insert = { "Hello", "World" };
+ listObject.InsertRange(0, insert);
+ if (listObject.Count != 8)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,Count is: " + listObject.Count);
+ retVal = false;
+ }
+ if ((listObject[0] != "Hello") || (listObject[1] != "World"))
+ {
+ TestLibrary.TestFramework.LogError("004", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Insert custom class array to the end of the list");
+
+ try
+ {
+ MyClass myclass1 = new MyClass();
+ MyClass myclass2 = new MyClass();
+ MyClass myclass3 = new MyClass();
+ MyClass myclass4 = new MyClass();
+ MyClass myclass5 = new MyClass();
+ MyClass[] mc = new MyClass[3] { myclass1, myclass2, myclass3 };
+ List<MyClass> listObject = new List<MyClass>(mc);
+ MyClass[] insert = new MyClass[2] { myclass4, myclass5 };
+ listObject.InsertRange(3, insert);
+ for (int i = 0; i < 5; i++)
+ {
+ if (i < 3)
+ {
+ if (listObject[i] != mc[i])
+ {
+ TestLibrary.TestFramework.LogError("006", "The result is not the value as expected,i is: " + i);
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (listObject[i] != insert[i - 3])
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected,i is: " + i);
+ retVal = false;
+ }
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: The collection has null reference element");
+
+ try
+ {
+ string[] strArray = { "apple", "dog", "banana", "food" };
+ List<string> listObject = new List<string>(strArray);
+ string[] insert = new string[2] { null, null };
+ int index = this.GetInt32(0, 4);
+ listObject.InsertRange(index, insert);
+ if (listObject.Count != 6)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected,Count is: " + listObject.Count);
+ retVal = false;
+ }
+ if ((listObject[index] != null) || (listObject[index + 1] != null))
+ {
+ TestLibrary.TestFramework.LogError("010", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("011", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The collection is a null reference");
+
+ try
+ {
+ string[] strArray = { "apple", "dog", "banana", "food" };
+ List<string> listObject = new List<string>(strArray);
+ string[] insert = null;
+ int index = this.GetInt32(0, 4);
+ listObject.InsertRange(index, insert);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The index is negative");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, -1, 8, 7, 1, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ int[] insert = { -0, 90, 100 };
+ listObject.InsertRange(-1, insert);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: The index is greater than the count of the list");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, -1, 8, 7, 1, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ int[] insert = { -0, 90, 100 };
+ listObject.InsertRange(11, insert);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ListInsertRange test = new ListInsertRange();
+
+ TestLibrary.TestFramework.BeginTestCase("ListInsertRange");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listlastindexof1.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listlastindexof1.cs
new file mode 100644
index 0000000000..90d675db42
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listlastindexof1.cs
@@ -0,0 +1,240 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List.LastIndexOf(T item)
+/// </summary>
+public class ListLastIndexOf1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The generic type is int");
+
+ try
+ {
+ int[] iArray = new int[1000];
+ for (int i = 0; i < 1000; i++)
+ {
+ iArray[i] = i;
+ }
+ List<int> listObject = new List<int>(iArray);
+ int ob = this.GetInt32(0, 1000);
+ int result = listObject.LastIndexOf(ob);
+ if (result != ob)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The generic type is type of string");
+
+ try
+ {
+ string[] strArray = { "apple", "banana", "dog", "chocolate", "dog", "food" };
+ List<string> listObject = new List<string>(strArray);
+ int result = listObject.LastIndexOf("dog");
+ if (result != 4)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The generic type is a custom type");
+
+ try
+ {
+ MyClass myclass1 = new MyClass();
+ MyClass myclass2 = new MyClass();
+ MyClass myclass3 = new MyClass();
+ MyClass[] mc = new MyClass[5] { myclass1, myclass2, myclass3, myclass3, myclass2 };
+ List<MyClass> listObject = new List<MyClass>(mc);
+ int result = listObject.LastIndexOf(myclass3);
+ if (result != 3)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: There are many element in the list with the same value");
+
+ try
+ {
+ string[] strArray = { "apple", "banana", "chocolate", "banana", "banana", "dog", "banana", "food" };
+ List<string> listObject = new List<string>(strArray);
+ int result = listObject.LastIndexOf("banana");
+ if (result != 6)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Do not find the element ");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, -1, 8, 7, 1, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ int result = listObject.LastIndexOf(-10000);
+ if (result != -1)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: The argument is a null reference");
+
+ try
+ {
+ string[] strArray = { "apple", "banana", "chocolate" };
+ List<string> listObject = new List<string>(strArray);
+ int result = listObject.LastIndexOf(null);
+ if (result != -1)
+ {
+ TestLibrary.TestFramework.LogError("011", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ListLastIndexOf1 test = new ListLastIndexOf1();
+
+ TestLibrary.TestFramework.BeginTestCase("ListLastIndexOf1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listlastindexof2.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listlastindexof2.cs
new file mode 100644
index 0000000000..fa3ec625b1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listlastindexof2.cs
@@ -0,0 +1,270 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List.LastIndexOf(T item, Int32)
+/// </summary>
+public class ListLastIndexOf2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The generic type is int");
+
+ try
+ {
+ int[] iArray = new int[1000];
+ for (int i = 0; i < 1000; i++)
+ {
+ iArray[i] = i;
+ }
+ List<int> listObject = new List<int>(iArray);
+ int ob = this.GetInt32(0, 1000);
+ int result = listObject.LastIndexOf(ob, 999);
+ if (result != ob)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The generic type is type of string");
+
+ try
+ {
+ string[] strArray = { "apple", "dog", "banana", "chocolate", "dog", "food" };
+ List<string> listObject = new List<string>(strArray);
+ int result = listObject.LastIndexOf("dog", 3);
+ if (result != 1)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The generic type is a custom type");
+
+ try
+ {
+ MyClass myclass1 = new MyClass();
+ MyClass myclass2 = new MyClass();
+ MyClass myclass3 = new MyClass();
+ MyClass[] mc = new MyClass[3] { myclass1, myclass2, myclass3 };
+ List<MyClass> listObject = new List<MyClass>(mc);
+ int result = listObject.LastIndexOf(myclass3, 2);
+ if (result != 2)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: There are many element in the list with the same value");
+
+ try
+ {
+ string[] strArray = { "apple", "banana", "chocolate", "banana", "banana", "dog", "banana", "food" };
+ List<string> listObject = new List<string>(strArray);
+ int result = listObject.LastIndexOf("banana", 5);
+ if (result != 4)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Do not find the element ");
+
+ try
+ {
+ int[] iArray = { 1, 9, -15, 3, 6, -1, 8, 7, -11, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ int result = listObject.LastIndexOf(-11, 6);
+ if (result != -1)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The index is negative");
+
+ try
+ {
+ int[] iArray = { 1, 9, -11, 3, 6, -1, 8, 7, 1, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ int result = listObject.LastIndexOf(-11, -4);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The index is greater than the last index of the list");
+
+ try
+ {
+ int[] iArray = { 1, 9, -11, 3, 6, -1, 8, 7, 1, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ int result = listObject.LastIndexOf(-11, 12);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ListLastIndexOf2 test = new ListLastIndexOf2();
+
+ TestLibrary.TestFramework.BeginTestCase("ListLastIndexOf2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listlastindexof3.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listlastindexof3.cs
new file mode 100644
index 0000000000..44dd55ad95
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listlastindexof3.cs
@@ -0,0 +1,298 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List.LastIndexOf(T item, Int32,Int32)
+/// </summary>
+public class ListLastIndexOf3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The generic type is int");
+
+ try
+ {
+ int[] iArray = new int[1000];
+ for (int i = 0; i < 1000; i++)
+ {
+ iArray[i] = i;
+ }
+ List<int> listObject = new List<int>(iArray);
+ int ob = this.GetInt32(0, 1000);
+ int result = listObject.LastIndexOf(ob, 999, 1000);
+ if (result != ob)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The generic type is type of string");
+
+ try
+ {
+ string[] strArray = { "apple", "dog", "banana", "chocolate", "dog", "food" };
+ List<string> listObject = new List<string>(strArray);
+ int result = listObject.LastIndexOf("dog", 3, 3);
+ if (result != 1)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The generic type is a custom type");
+
+ try
+ {
+ MyClass myclass1 = new MyClass();
+ MyClass myclass2 = new MyClass();
+ MyClass myclass3 = new MyClass();
+ MyClass[] mc = new MyClass[3] { myclass1, myclass2, myclass3 };
+ List<MyClass> listObject = new List<MyClass>(mc);
+ int result = listObject.LastIndexOf(myclass3, 2, 1);
+ if (result != 2)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: There are many element in the list with the same value");
+
+ try
+ {
+ string[] strArray = { "apple", "banana", "chocolate", "banana", "banana", "dog", "banana", "food" };
+ List<string> listObject = new List<string>(strArray);
+ int result = listObject.LastIndexOf("banana", 2, 3);
+ if (result != 1)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Do not find the element ");
+
+ try
+ {
+ int[] iArray = { 1, 9, -8, 3, 6, -1, 8, 7, -11, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ int result = listObject.LastIndexOf(-11, 6, 4);
+ if (result != -1)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected,result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The index is negative");
+
+ try
+ {
+ int[] iArray = { 1, 9, -11, 3, 6, -1, 8, 7, 1, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ int result = listObject.LastIndexOf(-11, -4, 3);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: index and count do not specify a valid section in the List");
+
+ try
+ {
+ int[] iArray = { 1, 9, -11, 3, 6, -1, 8, 7, 1, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ int result = listObject.LastIndexOf(-11, 6, 10);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: The count is a negative number");
+
+ try
+ {
+ int[] iArray = { 1, 9, -11, 3, 6, -1, 8, 7, 1, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ int result = listObject.LastIndexOf(-11, 1, -1);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ListLastIndexOf3 test = new ListLastIndexOf3();
+
+ TestLibrary.TestFramework.BeginTestCase("ListLastIndexOf3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listremoveat.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listremoveat.cs
new file mode 100644
index 0000000000..11993dc550
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listremoveat.cs
@@ -0,0 +1,225 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List.RemoveAt(Int32)
+/// </summary>
+public class ListRemoveAt
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The generic type is int");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, -1, 8, 7, 10, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ int index = this.GetInt32(0, 10);
+ listObject.RemoveAt(index);
+ if (listObject.Contains(iArray[index]))
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The generic type is type of string and the element at the beginning would be removed");
+
+ try
+ {
+ string[] strArray = { "dog", "apple", "joke", "banana", "chocolate", "dog", "food" };
+ List<string> listObject = new List<string>(strArray);
+ listObject.RemoveAt(0);
+ if (listObject.Count != 6)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,count is: " + listObject.Count);
+ retVal = false;
+ }
+ for (int i = 0; i < 6; i++)
+ {
+ if (listObject[i] != strArray[i + 1])
+ {
+ TestLibrary.TestFramework.LogError("004", "The result is not the value as expected,i is: " + i);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The generic type is a custom type and the element to be removed is at the end of the list");
+
+ try
+ {
+ MyClass myclass1 = new MyClass();
+ MyClass myclass2 = new MyClass();
+ MyClass myclass3 = new MyClass();
+ MyClass[] mc = new MyClass[3] { myclass1, myclass2, myclass3 };
+ List<MyClass> listObject = new List<MyClass>(mc);
+ listObject.RemoveAt(2);
+ if (listObject.Count != 2)
+ {
+ TestLibrary.TestFramework.LogError("006", "The result is not the value as expected,count is: " + listObject.Count);
+ retVal = false;
+ }
+ if (listObject.Contains(myclass3))
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The index is negative");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, -1, 8, 7, 10, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ listObject.RemoveAt(-1);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The index is greater than the range of the list");
+
+ try
+ {
+ char?[] chArray = { 'a', 'b', ' ', 'c', null };
+ List<char?> listObject = new List<char?>(chArray);
+ listObject.RemoveAt(10);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ListRemoveAt test = new ListRemoveAt();
+
+ TestLibrary.TestFramework.BeginTestCase("ListRemoveAt");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listremoverange.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listremoverange.cs
new file mode 100644
index 0000000000..f8af16a642
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listremoverange.cs
@@ -0,0 +1,226 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List.RemoveRange(Int32,Int32)
+/// </summary>
+public class ListRemoveRange
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Remove all the elements in the int type list");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, -1, 8, 7, 10, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ listObject.RemoveRange(0, 10);
+ if (listObject.Count != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,count is: " + listObject.Count);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The generic type is type of string");
+
+ try
+ {
+ string[] strArray = { "dog", "apple", "joke", "banana", "chocolate", "dog", "food" };
+ List<string> listObject = new List<string>(strArray);
+ listObject.RemoveRange(3, 3);
+ string[] expected = { "dog", "apple", "joke", "food" };
+ for (int i = 0; i < 4; i++)
+ {
+ if (listObject[i] != expected[i])
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,result is: " + listObject[i]);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The count argument is zero");
+
+ try
+ {
+ MyClass myclass1 = new MyClass();
+ MyClass myclass2 = new MyClass();
+ MyClass myclass3 = new MyClass();
+ MyClass[] mc = new MyClass[3] { myclass1, myclass2, myclass3 };
+ List<MyClass> listObject = new List<MyClass>(mc);
+ listObject.RemoveRange(1, 0);
+ for (int i = 0; i < 3; i++)
+ {
+ if (listObject[i] != mc[i])
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected,result is: " + listObject[i]);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The index is a negative number");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, -1, 8, 7, 10, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ listObject.RemoveRange(-1, 3);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The count is a negative number");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, -1, 8, 7, 10, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ listObject.RemoveRange(3, -2);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: index and count do not denote a valid range of elements in the List");
+
+ try
+ {
+ string[] strArray = { "dog", "apple", "joke", "banana", "chocolate", "dog", "food" };
+ List<string> listObject = new List<string>(strArray);
+ listObject.RemoveRange(3, 10);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ListRemoveRange test = new ListRemoveRange();
+
+ TestLibrary.TestFramework.BeginTestCase("ListRemoveRange");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+public class MyClass
+{
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listreverse.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listreverse.cs
new file mode 100644
index 0000000000..4c513fb196
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listreverse.cs
@@ -0,0 +1,189 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List.Reverse
+/// </summary>
+public class ListReverse
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The generic type is byte");
+
+ try
+ {
+ byte[] byArray = new byte[1000];
+ TestLibrary.Generator.GetBytes(-55, byArray);
+ List<byte> listObject = new List<byte>(byArray);
+ byte[] expected = this.reverse<byte>(byArray);
+ listObject.Reverse();
+ for (int i = 0; i < 1000; i++)
+ {
+ if (listObject[i] != expected[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is: " + i);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The generic type is type of string");
+
+ try
+ {
+ string[] strArray = { "dog", "apple", "joke", "banana", "chocolate", "dog", "food", "Microsoft" };
+ List<string> listObject = new List<string>(strArray);
+ listObject.Reverse();
+ string[] expected = this.reverse<string>(strArray);
+ for (int i = 0; i < 8; i++)
+ {
+ if (listObject[i] != expected[i])
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,i is: " + i);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The generic type is a custom type");
+
+ try
+ {
+ MyClass myclass1 = new MyClass();
+ MyClass myclass2 = new MyClass();
+ MyClass myclass3 = new MyClass();
+ MyClass myclass4 = new MyClass();
+ MyClass[] mc = new MyClass[4] { myclass1, myclass2, myclass3, myclass4 };
+ List<MyClass> listObject = new List<MyClass>(mc);
+ listObject.Reverse();
+ MyClass[] expected = new MyClass[4] { myclass4, myclass3, myclass2, myclass1 };
+ for (int i = 0; i < 4; i++)
+ {
+ if (listObject[i] != expected[i])
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected,i is: " + i);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: The list has no element");
+
+ try
+ {
+ List<int> listObject = new List<int>();
+ listObject.Reverse();
+ if (listObject.Count != 0)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected,count is: " + listObject.Count);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ListReverse test = new ListReverse();
+
+ TestLibrary.TestFramework.BeginTestCase("ListReverse");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region useful method
+ private T[] reverse<T>(T[] arrayT)
+ {
+ T temp;
+ int times = arrayT.Length / 2;
+ for (int i = 0; i < times; i++)
+ {
+ temp = arrayT[i];
+ arrayT[i] = arrayT[arrayT.Length - 1 - i];
+ arrayT[arrayT.Length - 1 - i] = temp;
+ }
+ return arrayT;
+ }
+ #endregion
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listreverse2.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listreverse2.cs
new file mode 100644
index 0000000000..081f30cdc2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listreverse2.cs
@@ -0,0 +1,287 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.Generic.List.Reverse(int32,int32)
+/// </summary>
+public class ListReverse2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The generic type is byte");
+
+ try
+ {
+ byte[] byArray = new byte[100];
+ TestLibrary.Generator.GetBytes(-55, byArray);
+ List<byte> listObject = new List<byte>(byArray);
+ byte[] expected = this.reverse<byte>(byArray);
+ listObject.Reverse(10, 80);
+ for (int i = 0; i < 100; i++)
+ {
+ if ((i < 10) || (i > 89))
+ {
+ if (listObject[i] != byArray[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is: " + i);
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (listObject[i] != expected[i])
+ {
+ TestLibrary.TestFramework.LogError("002", "The result is not the value as expected,i is: " + i);
+ retVal = false;
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The generic type is type of string");
+
+ try
+ {
+ string[] strArray = { "dog", "apple", "joke", "banana", "chocolate", "dog", "food", "Microsoft" };
+ List<string> listObject = new List<string>(strArray);
+ listObject.Reverse(2, 5);
+ string[] expected = { "dog", "apple", "food", "dog", "chocolate", "banana", "joke", "Microsoft" };
+ for (int i = 0; i < 8; i++)
+ {
+ if (listObject[i] != expected[i])
+ {
+ TestLibrary.TestFramework.LogError("004", "The result is not the value as expected,i is: " + i);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The generic type is a custom type");
+
+ try
+ {
+ MyClass myclass1 = new MyClass();
+ MyClass myclass2 = new MyClass();
+ MyClass myclass3 = new MyClass();
+ MyClass myclass4 = new MyClass();
+ MyClass[] mc = new MyClass[4] { myclass1, myclass2, myclass3, myclass4 };
+ List<MyClass> listObject = new List<MyClass>(mc);
+ listObject.Reverse(0, 2);
+ MyClass[] expected = new MyClass[4] { myclass2, myclass1, myclass3, myclass4 };
+ for (int i = 0; i < 4; i++)
+ {
+ if (listObject[i] != expected[i])
+ {
+ TestLibrary.TestFramework.LogError("006", "The result is not the value as expected,i is: " + i);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: The list has no element");
+
+ try
+ {
+ List<int> listObject = new List<int>();
+ listObject.Reverse(0, 0);
+ if (listObject.Count != 0)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected,count is: " + listObject.Count);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The index is a negative number");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, -1, 8, 7, 10, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ listObject.Reverse(-1, 3);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The count is a negative number");
+
+ try
+ {
+ int[] iArray = { 1, 9, 3, 6, -1, 8, 7, 10, 2, 4 };
+ List<int> listObject = new List<int>(iArray);
+ listObject.Reverse(3, -2);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: index and count do not denote a valid range of elements in the List");
+
+ try
+ {
+ string[] strArray = { "dog", "apple", "joke", "banana", "chocolate", "dog", "food" };
+ List<string> listObject = new List<string>(strArray);
+ listObject.Reverse(3, 10);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ListReverse2 test = new ListReverse2();
+
+ TestLibrary.TestFramework.BeginTestCase("ListReverse2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region useful method
+ private T[] reverse<T>(T[] array)
+ {
+ T temp;
+ T[] arrayT = new T[array.Length];
+ array.CopyTo(arrayT, 0);
+ int times = arrayT.Length / 2;
+ for (int i = 0; i < times; i++)
+ {
+ temp = arrayT[i];
+ arrayT[i] = arrayT[arrayT.Length - 1 - i];
+ arrayT[arrayT.Length - 1 - i] = temp;
+ }
+ return arrayT;
+ }
+ #endregion
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listtoarray.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listtoarray.cs
new file mode 100644
index 0000000000..5c789dba03
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listtoarray.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/list/listtrimexcess.cs b/tests/src/CoreMangLib/cti/system/collections/generic/list/listtrimexcess.cs
new file mode 100644
index 0000000000..175fa2c420
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/list/listtrimexcess.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueClear.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueClear.csproj
new file mode 100644
index 0000000000..6c49436887
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueClear.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="queueclear.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueContains.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueContains.csproj
new file mode 100644
index 0000000000..530d0bc70d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueContains.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="queuecontains.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueCopyTo.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueCopyTo.csproj
new file mode 100644
index 0000000000..f0f6c495e7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueCopyTo.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="queuecopyto.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueCount.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueCount.csproj
new file mode 100644
index 0000000000..c1dff6f096
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueCount.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="queuecount.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueCtor1.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueCtor1.csproj
new file mode 100644
index 0000000000..614a862fc0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="queuector1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueCtor2.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueCtor2.csproj
new file mode 100644
index 0000000000..448cf0e7b8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="queuector2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueCtor3.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueCtor3.csproj
new file mode 100644
index 0000000000..96567b12b0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="queuector3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueDequeue.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueDequeue.csproj
new file mode 100644
index 0000000000..b26f618a7d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueDequeue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="queuedequeue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueEnqueue.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueEnqueue.csproj
new file mode 100644
index 0000000000..4e5204f355
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueEnqueue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="queueenqueue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueGetEnumerator.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueGetEnumerator.csproj
new file mode 100644
index 0000000000..05f0372673
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueGetEnumerator.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="queuegetenumerator.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueuePeek.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueuePeek.csproj
new file mode 100644
index 0000000000..0ea8df89bf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueuePeek.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="queuepeek.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueToArray.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueToArray.csproj
new file mode 100644
index 0000000000..08398e89f0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/QueueToArray.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="queuetoarray.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/queueclear.cs b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queueclear.cs
new file mode 100644
index 0000000000..1d1914b75e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queueclear.cs
@@ -0,0 +1,95 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// Clear()
+/// </summary>
+
+public class QueueClear
+{
+ public static int Main()
+ {
+ QueueClear test = new QueueClear();
+
+ TestLibrary.TestFramework.BeginTestCase("QueueClear");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test whether Clear() is successful when the queue is not empty.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ TestQueue.Clear();
+ if (TestQueue.Count != 0)
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "Clear() failed when the queue is not empty!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test whether Clear() is successful when the queue is empty.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Clear();
+ if (TestQueue.Count != 0)
+ {
+ TestLibrary.TestFramework.LogError("P02.1", "Clear() failed when the queue is empty!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P02.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuecontains.cs b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuecontains.cs
new file mode 100644
index 0000000000..34ccb1b93f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuecontains.cs
@@ -0,0 +1,69 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// Contains()
+/// </summary>
+
+public class QueueContains
+{
+ public static int Main()
+ {
+ QueueContains test = new QueueContains();
+
+ TestLibrary.TestFramework.BeginTestCase("QueueContains");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test whether Contains() is successful.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+
+ if (!TestQueue.Contains("one") || !TestQueue.Contains("two") || TestQueue.Contains("three"))
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "Contains() failed!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuecopyto.cs b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuecopyto.cs
new file mode 100644
index 0000000000..bbe1639685
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuecopyto.cs
@@ -0,0 +1,252 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// CopyTo(T[],System.Int32)
+/// </summary>
+
+public class QueueCopyTo
+{
+ public static int Main()
+ {
+ QueueCopyTo test = new QueueCopyTo();
+
+ TestLibrary.TestFramework.BeginTestCase("QueueCopyTo");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test whether CopyTo(T[],System.Int32) is successful when System.Int32 is zero.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ string[] TestArray = { "first", "second", "third", "fourth" };
+ TestQueue.CopyTo(TestArray, 0);
+ if (TestArray[0] != "one" || TestArray[1] != "two" || TestArray[2] != "third"
+ || TestArray[3] != "fourth" || TestArray.GetLength(0) != 4)
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "CopyTo(T[],System.Int32) failed when System.Int32 is zero!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test whether CopyTo(T[],System.Int32) is successful when System.Int32 is greater than zero.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ string[] TestArray = { "first", "second", "", "" };
+ TestQueue.CopyTo(TestArray, 1);
+ if (TestArray.GetLength(0) != 4 || TestArray[0] != "first" || TestArray[1] != "one" || TestArray[2] != "two")
+ {
+ TestLibrary.TestFramework.LogError("P02.1", "CopyTo(T[],System.Int32) failed when System.Int32 is greater than zero!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P02.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException should be thrown when array is a null reference.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ string[] TestArray = null;
+ TestQueue.CopyTo(TestArray, 0);
+ TestLibrary.TestFramework.LogError("N01.1", "ArgumentNullException is not thrown when array is a null reference!");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentOutOfRangeException should be thrown when index is less than zero.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ string[] TestArray = { "first", "second", "", "" };
+ TestQueue.CopyTo(TestArray, -1);
+ TestLibrary.TestFramework.LogError("N02.1", "ArgumentOutOfRangeException is not thrown when index is less than zero!");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N02.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentException should be thrown when index is equal to the length of array.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ string[] TestArray = { "first", "second", "", "" };
+ TestQueue.CopyTo(TestArray, 4);
+ TestLibrary.TestFramework.LogError("N03.1", "ArgumentException is not thrown when index is equal to the length of array!");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N03.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: ArgumentException should be thrown when index is greater than the length of array.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ string[] TestArray = { "first", "second", "", "" };
+ TestQueue.CopyTo(TestArray, 10);
+ TestLibrary.TestFramework.LogError("N04.1", "ArgumentException is not thrown when index is greater than the length of array!");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N04.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest5: ArgumentException should be thrown when the number of elements in the source Queue is greater than the available space from index to the end of the destination array.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ string[] TestArray = { "first", "second", "", "" };
+ TestQueue.CopyTo(TestArray, 3);
+ TestLibrary.TestFramework.LogError("N05.1", "ArgumentException is not thrown when the number of elements in the source Queue is greater than the available space from index to the end of the destination array!");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N05.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuecount.cs b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuecount.cs
new file mode 100644
index 0000000000..75f65f732b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuecount.cs
@@ -0,0 +1,93 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// Count()
+/// </summary>
+
+public class QueueCount
+{
+ public static int Main()
+ {
+ QueueCount test = new QueueCount();
+
+ TestLibrary.TestFramework.BeginTestCase("QueueCount");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test whether Count() is successful when the queue is empty.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ if (TestQueue.Count != 0)
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "Count() failed when the queue is empty!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test whether Count() is successful when the queue is not empty.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ if (TestQueue.Count != 2)
+ {
+ TestLibrary.TestFramework.LogError("P02.1", "Count() failed when the queue is not empty!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P02.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuector1.cs b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuector1.cs
new file mode 100644
index 0000000000..5942b8e877
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuector1.cs
@@ -0,0 +1,66 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// ctor()
+/// </summary>
+
+public class QueueCtor1
+{
+ public static int Main()
+ {
+ QueueCtor1 test = new QueueCtor1();
+
+ TestLibrary.TestFramework.BeginTestCase("QueueCtor1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test whether ctor() is successful.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ if (TestQueue == null || TestQueue.Count != 0)
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "ctor() failed!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuector2.cs b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuector2.cs
new file mode 100644
index 0000000000..253554bf7d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuector2.cs
@@ -0,0 +1,161 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// ctor(System.Collections.Generic.IEnumerable<T>)
+/// </summary>
+
+public class QueueCtor2
+{
+ public static int Main()
+ {
+ QueueCtor2 test = new QueueCtor2();
+
+ TestLibrary.TestFramework.BeginTestCase("QueueCtor2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test whether ctor(IEnumerable<T>) is successful when passing string array.");
+
+ try
+ {
+ string[] TestArray = { "first", "second" };
+ Queue<string> TestQueue = new Queue<string>(TestArray);
+ if (TestQueue == null || TestQueue.Count != 2)
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "ctor(IEnumerable<T>) failed when passing string array!");
+ retVal = false;
+ }
+ string element1 = TestQueue.Dequeue();
+ string element2 = TestQueue.Dequeue();
+ if (element1 != "first" || element2 != "second")
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "ctor(IEnumerable<T>) failed when passing string array!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test whether ctor(IEnumerable<T>) is successful when passing int array.");
+
+ try
+ {
+ int[] TestArray = { 20, 30 };
+ Queue<int> TestQueue = new Queue<int>(TestArray);
+ if (TestQueue == null || TestQueue.Count != 2)
+ {
+ TestLibrary.TestFramework.LogError("P02.1", "ctor(IEnumerable<T>) failed when passing int array!");
+ retVal = false;
+ }
+ int element1 = TestQueue.Dequeue();
+ int element2 = TestQueue.Dequeue();
+ if (element1 != 20 || element2 != 30)
+ {
+ TestLibrary.TestFramework.LogError("P02.2", "ctor(IEnumerable<T>) failed when passing int array!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P02.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Test whether ctor(IEnumerable<T>) is successful when passing an empty array.");
+
+ try
+ {
+ string[] TestArray = { };
+ Queue<string> TestQueue = new Queue<string>(TestArray);
+ if (TestQueue == null || TestQueue.Count != 0)
+ {
+ TestLibrary.TestFramework.LogError("P03.1", "ctor(IEnumerable<T>) failed when passing an empty array!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P03.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException should be thrown when collection is a null reference.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>(null);
+ TestLibrary.TestFramework.LogError("N01.1", "ArgumentNullException is not thrown when collection is a null reference!");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuector3.cs b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuector3.cs
new file mode 100644
index 0000000000..97d88655b6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuector3.cs
@@ -0,0 +1,182 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// ctor(System.Int32)
+/// </summary>
+
+public class QueueCtor3
+{
+ public static int Main()
+ {
+ QueueCtor3 test = new QueueCtor3();
+
+ TestLibrary.TestFramework.BeginTestCase("QueueCtor3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test whether ctor(Int32) is successful when passing 4096.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>(4096);
+ if (TestQueue == null || TestQueue.Count != 0)
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "ctor(Int32) failed when passing 4096!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test whether ctor(Int32) is successful when passing zero value.");
+
+ try
+ {
+ Queue<int> TestQueue = new Queue<int>(0);
+ if (TestQueue == null || TestQueue.Count != 0)
+ {
+ TestLibrary.TestFramework.LogError("P02.1", "ctor(Int32) failed when passing zero value!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P02.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Test whether ctor(Int32) is successful when passing an random positive Int32 value.");
+
+ try
+ {
+ Int32 TestInt32;
+ do
+ {
+ TestInt32 = TestLibrary.Generator.GetInt32(-55) % 8192;
+ }
+ while (TestInt32 <= 0);
+ Queue<string> TestQueue = new Queue<string>(TestInt32);
+ if (TestQueue == null || TestQueue.Count != 0)
+ {
+ TestLibrary.TestFramework.LogError("P03.1", "ctor(Int32) failed when passing an random positive Int32 value!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P03.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentOutOfRangeException should be thrown when capacity is less than zero (random negative Int32 value).");
+
+ try
+ {
+ Int32 TestInt32;
+ do
+ {
+ TestInt32 = TestLibrary.Generator.GetInt32(-55);
+ }
+ while (TestInt32 == 0);
+ Queue<string> TestQueue = new Queue<string>(-TestInt32);
+ TestLibrary.TestFramework.LogError("N01.1", "ArgumentOutOfRangeException is not thrown when capacity is less than zero (random negative Int32 value)!");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentOutOfRangeException should be thrown when capacity is less than zero (mininum Int32 value).");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>(Int32.MinValue);
+ TestLibrary.TestFramework.LogError("N02.1", "ArgumentOutOfRangeException is not thrown when capacity is less than zero (mininum Int32 value)!");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N02.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuedequeue.cs b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuedequeue.cs
new file mode 100644
index 0000000000..c632920925
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuedequeue.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// Dequeue()
+/// </summary>
+
+public class QueueDequeue
+{
+ public static int Main()
+ {
+ QueueDequeue test = new QueueDequeue();
+
+ TestLibrary.TestFramework.BeginTestCase("QueueDequeue");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test whether Dequeue() is successful when the queue is not empty.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ TestQueue.Enqueue("three");
+ string ResultString = TestQueue.Dequeue();
+ if (TestQueue.Count != 2 || TestQueue.Peek() != "two" || ResultString != "one")
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "Dequeue() failed when the queue is not empty!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: InvalidOperationException should be thrown when Dequeue() from an empty queue.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Dequeue();
+ TestLibrary.TestFramework.LogError("N01.1", "InvalidOperationException is not thrown when Dequeue() from an empty queue!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/queueenqueue.cs b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queueenqueue.cs
new file mode 100644
index 0000000000..58a74156b8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queueenqueue.cs
@@ -0,0 +1,69 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// Enqueue(T)
+/// </summary>
+
+public class QueueEnqueue
+{
+ public static int Main()
+ {
+ QueueEnqueue test = new QueueEnqueue();
+
+ TestLibrary.TestFramework.BeginTestCase("QueueEnqueue");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test whether Enqueue(T) is successful.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ TestQueue.Enqueue("three");
+ if (TestQueue.Count != 3 || TestQueue.Peek() != "one" || TestQueue.ToArray()[2] != "three")
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "Enqueue() failed!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuegetenumerator.cs b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuegetenumerator.cs
new file mode 100644
index 0000000000..c03ae396bb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuegetenumerator.cs
@@ -0,0 +1,125 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// GetEnumerator()
+/// </summary>
+
+public class QueueGetEnumerator
+{
+ public static int Main()
+ {
+ QueueGetEnumerator test = new QueueGetEnumerator();
+
+ TestLibrary.TestFramework.BeginTestCase("QueueGetEnumerator");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test whether GetEnumerator() is successful when the queue is not empty.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ TestQueue.Enqueue("three");
+ Queue<string>.Enumerator TestEnumerator;
+ TestEnumerator = TestQueue.GetEnumerator();
+ TestEnumerator.MoveNext();
+ for (int i = 0; i < TestQueue.Count; i++)
+ {
+ if (TestQueue.ToArray()[i] != TestEnumerator.Current)
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "GetEnumerator() failed when the queue is not empty!");
+ retVal = false;
+ }
+ TestEnumerator.MoveNext();
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test whether GetEnumerator() is successful when the queue is empty.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ Queue<string>.Enumerator TestEnumerator;
+ TestEnumerator = TestQueue.GetEnumerator();
+ try
+ {
+ string CurrentElement = TestEnumerator.Current;
+ TestLibrary.TestFramework.LogError("P02.1", "GetEnumerator() failed when the queue is empty!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+
+ }
+ bool b = TestEnumerator.MoveNext();
+ if (b != false)
+ {
+ TestLibrary.TestFramework.LogError("P02.2", "GetEnumerator() failed when the queue is empty!");
+ retVal = false;
+ }
+ try
+ {
+ string CurrentElement = TestEnumerator.Current;
+ TestLibrary.TestFramework.LogError("P02.3", "GetEnumerator() failed when the queue is empty!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P02.4", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuepeek.cs b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuepeek.cs
new file mode 100644
index 0000000000..8fd1891fd9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuepeek.cs
@@ -0,0 +1,98 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// Peek()
+/// </summary>
+
+public class QueuePeek
+{
+ public static int Main()
+ {
+ QueuePeek test = new QueuePeek();
+
+ TestLibrary.TestFramework.BeginTestCase("QueuePeek");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test whether Peek() is successful when the queue is not empty.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ TestQueue.Enqueue("three");
+ string PeekResult = TestQueue.Peek();
+ if (PeekResult != "one")
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "Peek() failed! Expected value is "+"\"one\". But actual value is \""+PeekResult+"\".");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: InvalidOperationException should be thrown when the queue is empty.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Peek();
+ TestLibrary.TestFramework.LogError("N01.1", "InvalidOperationException is not thrown when the queue is empty!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuetoarray.cs b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuetoarray.cs
new file mode 100644
index 0000000000..04f857383b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queue/queuetoarray.cs
@@ -0,0 +1,100 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// ToArray()
+/// </summary>
+
+public class QueueToArray
+{
+ public static int Main()
+ {
+ QueueToArray test = new QueueToArray();
+
+ TestLibrary.TestFramework.BeginTestCase("QueueToArray");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test whether ToArray() is successful when the queue is empty.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ string[] TestArray = TestQueue.ToArray();
+ if (TestArray.Length != 0)
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "ToArray() failed when the queue is empty!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test whether ToArray() is successful when the queue is not empty.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ string[] TestArray = TestQueue.ToArray();
+ if (TestArray.Length != 2)
+ {
+ TestLibrary.TestFramework.LogError("P02.1", "ToArray() failed! Element number in array and queue are not equal!");
+ retVal = false;
+ }
+ if (TestArray[0] != "one" || TestArray[1] != "two")
+ {
+ TestLibrary.TestFramework.LogError("P02.2", "ToArray() failed! Elements in array are not the same as in queue!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P02.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/EnumeratorCurrent.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/EnumeratorCurrent.csproj
new file mode 100644
index 0000000000..d5731131d3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/EnumeratorCurrent.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="enumeratorcurrent.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/EnumeratorDispose.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/EnumeratorDispose.csproj
new file mode 100644
index 0000000000..3c4af24931
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/EnumeratorDispose.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="enumeratordispose.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/EnumeratorMoveNext.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/EnumeratorMoveNext.csproj
new file mode 100644
index 0000000000..40ef122803
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/EnumeratorMoveNext.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="enumeratormovenext.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/enumeratorcurrent.cs b/tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/enumeratorcurrent.cs
new file mode 100644
index 0000000000..21a6c51285
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/enumeratorcurrent.cs
@@ -0,0 +1,228 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// Current()
+/// </summary>
+
+public class EnumeratorCurrent
+{
+ public static int Main()
+ {
+ EnumeratorCurrent test = new EnumeratorCurrent();
+
+ TestLibrary.TestFramework.BeginTestCase("EnumeratorCurrent");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Current() should be successful.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ TestQueue.Enqueue("three");
+ Queue<string>.Enumerator TestEnumerator = TestQueue.GetEnumerator();
+ TestEnumerator.MoveNext();
+ if (TestEnumerator.Current != "one")
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "Current() failed!");
+ retVal = false;
+ }
+ TestEnumerator.MoveNext();
+ if (TestEnumerator.Current != "two")
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Current() failed!");
+ retVal = false;
+ }
+ TestEnumerator.MoveNext();
+ if (TestEnumerator.Current != "three")
+ {
+ TestLibrary.TestFramework.LogError("P01.3", "Current() failed!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.4", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Current() should be successful even if the queue has been modified.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ TestQueue.Enqueue("three");
+ Queue<string>.Enumerator TestEnumerator = TestQueue.GetEnumerator();
+ TestEnumerator.MoveNext();
+ if (TestEnumerator.Current != "one")
+ {
+ TestLibrary.TestFramework.LogError("P02.1", "Current() failed!");
+ retVal = false;
+ }
+ TestEnumerator.MoveNext();
+ TestQueue.Dequeue();
+ if (TestEnumerator.Current != "two")
+ {
+ TestLibrary.TestFramework.LogError("P02.2", "Current() failed!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P02.4", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: InvalidOperationException should be thrown when the enumerator is positioned before the first element of the collection.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ TestQueue.Enqueue("three");
+ Queue<string>.Enumerator TestEnumerator;
+ TestEnumerator = TestQueue.GetEnumerator();
+ string TestString = TestEnumerator.Current;
+ TestLibrary.TestFramework.LogError("N01.1", "InvalidOperationException is not thrown when the enumerator is positioned before the first element of the collection!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: InvalidOperationException should be thrown when the enumerator is positioned after the last element of the collection.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ TestQueue.Enqueue("three");
+ Queue<string>.Enumerator TestEnumerator;
+ TestEnumerator = TestQueue.GetEnumerator();
+ TestEnumerator.MoveNext();
+ TestEnumerator.MoveNext();
+ TestEnumerator.MoveNext();
+ TestEnumerator.MoveNext();
+ string TestString = TestEnumerator.Current;
+ TestLibrary.TestFramework.LogError("N02.1", "InvalidOperationException is not thrown when the enumerator is positioned after the last element of the collection!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N02.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: InvalidOperationException should be thrown when MoveNext after queue has been changed.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ TestQueue.Enqueue("three");
+ Queue<string>.Enumerator TestEnumerator = TestQueue.GetEnumerator();
+ TestEnumerator.MoveNext();
+ if (TestEnumerator.Current != "one")
+ {
+ TestLibrary.TestFramework.LogError("P02.1", "Current() failed!");
+ retVal = false;
+ }
+ TestQueue.Dequeue();
+ TestEnumerator.MoveNext();
+ TestLibrary.TestFramework.LogError("P02.1", "InvalidOperationException not thrown when MoveNext after queue has been changed!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N03.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/enumeratordispose.cs b/tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/enumeratordispose.cs
new file mode 100644
index 0000000000..b78452a7e5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/enumeratordispose.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// Dispose()
+/// </summary>
+
+public class EnumeratorDispose
+{
+ public static int Main()
+ {
+ EnumeratorDispose test = new EnumeratorDispose();
+
+ TestLibrary.TestFramework.BeginTestCase("EnumeratorDispose");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Resource of the Enumerator should be released after Dispose().");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ TestQueue.Enqueue("three");
+ Queue<string>.Enumerator TestEnumerator;
+ TestEnumerator = TestQueue.GetEnumerator();
+ TestEnumerator.MoveNext();
+ TestEnumerator.Dispose();
+ string TestString = TestEnumerator.Current;
+ TestLibrary.TestFramework.LogError("P01.1", "Resource of the Enumerator have not been released after Dispose()!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/enumeratormovenext.cs b/tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/enumeratormovenext.cs
new file mode 100644
index 0000000000..8bd16a71d7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/queueenumerator/enumeratormovenext.cs
@@ -0,0 +1,228 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// MoveNext()
+/// </summary>
+
+public class EnumeratorMoveNext
+{
+ public static int Main()
+ {
+ EnumeratorMoveNext test = new EnumeratorMoveNext();
+
+ TestLibrary.TestFramework.BeginTestCase("EnumeratorMoveNext");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The enumerator should be positioned at the first element in the collection after MoveNext().");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ TestQueue.Enqueue("three");
+ Queue<string>.Enumerator TestEnumerator;
+ TestEnumerator = TestQueue.GetEnumerator();
+ TestEnumerator.MoveNext();
+ string TestString = TestEnumerator.Current;
+ if (TestString != "one")
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "The enumerator is not positioned at the first element in the collection after MoveNext()!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The enumerator should be positioned at the next element in the collection after MoveNext().");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ TestQueue.Enqueue("three");
+ Queue<string>.Enumerator TestEnumerator = TestQueue.GetEnumerator();
+ TestEnumerator.MoveNext();
+ if (TestEnumerator.Current != "one")
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "Current() failed!");
+ retVal = false;
+ }
+ TestEnumerator.MoveNext();
+ if (TestEnumerator.Current != "two")
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Current() failed!");
+ retVal = false;
+ }
+ TestEnumerator.MoveNext();
+ if (TestEnumerator.Current != "three")
+ {
+ TestLibrary.TestFramework.LogError("P01.3", "Current() failed!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P02.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The enumerator should be positioned after the last element in the collection after MoveNext() passed the end of collection.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ TestQueue.Enqueue("three");
+ Queue<string>.Enumerator TestEnumerator;
+ TestEnumerator = TestQueue.GetEnumerator();
+ bool bSuc;
+ bSuc = TestEnumerator.MoveNext();
+ bSuc = TestEnumerator.MoveNext();
+ bSuc = TestEnumerator.MoveNext();
+ bSuc = TestEnumerator.MoveNext();
+ bSuc = TestEnumerator.MoveNext();
+ bSuc = TestEnumerator.MoveNext();
+ if (bSuc)
+ {
+ TestLibrary.TestFramework.LogError("P03.1", "The enumerator is not positioned after the last element in the collection after MoveNext() passed the end of collection!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P03.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: With a Queue that contains three items, MoveNext returns true the first three times and returns false every time it is called after that.");
+
+ try
+ {
+ bool b;
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ TestQueue.Enqueue("three");
+ Queue<string>.Enumerator TestEnumerator;
+ TestEnumerator = TestQueue.GetEnumerator();
+ for (int i = 0; i < 3; i++)
+ {
+ b = TestEnumerator.MoveNext();
+ if (!b)
+ {
+ TestLibrary.TestFramework.LogError("P04.1", "MoveNext() failed!");
+ retVal = false;
+ }
+ }
+ b = TestEnumerator.MoveNext();
+ if (b)
+ {
+ TestLibrary.TestFramework.LogError("P04.1", "MoveNext() failed!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P04.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: InvalidOperationException should be thrown when the collection was modified after the enumerator was created.");
+
+ try
+ {
+ Queue<string> TestQueue = new Queue<string>();
+ TestQueue.Enqueue("one");
+ TestQueue.Enqueue("two");
+ TestQueue.Enqueue("three");
+ Queue<string>.Enumerator TestEnumerator;
+ TestEnumerator = TestQueue.GetEnumerator();
+ TestQueue.Enqueue("four");
+ TestEnumerator.MoveNext();
+ TestLibrary.TestFramework.LogError("N01.1", "InvalidOperationException is not thrown when the collection was modified after the enumerator was created!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogVerbose(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackClear.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackClear.csproj
new file mode 100644
index 0000000000..d386dc6585
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackClear.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackclear.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackContains.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackContains.csproj
new file mode 100644
index 0000000000..a78b99a1e0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackContains.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackcontains.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackCopyTo.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackCopyTo.csproj
new file mode 100644
index 0000000000..918d0da0c6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackCopyTo.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackcopyto.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackCount.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackCount.csproj
new file mode 100644
index 0000000000..a2855ea517
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackCount.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackcount.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackCtor1.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackCtor1.csproj
new file mode 100644
index 0000000000..7362a7410e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackCtor2.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackCtor2.csproj
new file mode 100644
index 0000000000..d6c30d2a21
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackCtor3.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackCtor3.csproj
new file mode 100644
index 0000000000..7fe8f37aa4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackGetEnumerator.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackGetEnumerator.csproj
new file mode 100644
index 0000000000..0f70239cfb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackGetEnumerator.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackgetenumerator.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackPeek.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackPeek.csproj
new file mode 100644
index 0000000000..8202ef66e4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackPeek.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackpeek.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackPop.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackPop.csproj
new file mode 100644
index 0000000000..77950ab10c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackPop.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackpop.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackPush.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackPush.csproj
new file mode 100644
index 0000000000..230510c283
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackPush.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackpush.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackToArray.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackToArray.csproj
new file mode 100644
index 0000000000..4b7e5a01f1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/StackToArray.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stacktoarray.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackclear.cs b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackclear.cs
new file mode 100644
index 0000000000..3f79f71413
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackclear.cs
@@ -0,0 +1,118 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text; //for StringBuilder
+using System.Collections.Generic;
+
+/// <summary>
+/// Stack.Clear() [v-yaduoj]
+/// </summary>
+public class StackClear
+{
+ public static int Main()
+ {
+ StackClear testObj = new StackClear();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Stack.Clear()");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ int[] operands = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ TestLibrary.TestFramework.BeginScenario("PosTest1: remove all the elements from a non-empty stack.");
+ try
+ {
+ Stack<int> operandStack = new Stack<int>((IEnumerable<int>)operands);
+ operandStack.Clear();
+ if (0 != operandStack.Count)
+ {
+ errorDesc = "Failed to clear stack " + this.GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("P001.1", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("P001.2", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ int[] operands = new int[] { };
+ TestLibrary.TestFramework.BeginScenario("PosTest2: remove all the elements from an empty stack.");
+ try
+ {
+ Stack<int> operandStack = new Stack<int>((IEnumerable<int>)operands);
+ operandStack.Clear();
+ if (0 != operandStack.Count)
+ {
+ errorDesc = "Failed to clear stack " + this.GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("P002.1", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("P002.2", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private string GetStackData(Stack<int> values)
+ {
+ if (null == values) return "null reference";
+ int[] tempVals = new int[values.Count];
+ values.CopyTo(tempVals, 0);
+ StringBuilder sb = new StringBuilder();
+ sb.Append("{");
+ for (int i = 0; i < tempVals.Length; ++i)
+ {
+ sb.AppendFormat("{0}, ", tempVals[i]);
+ }
+ sb.Append("}");
+
+ return sb.ToString();
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackcontains.cs b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackcontains.cs
new file mode 100644
index 0000000000..7d37e814b0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackcontains.cs
@@ -0,0 +1,385 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text; //for StringBuilder
+using System.Collections.Generic;
+
+/// <summary>
+/// Stack.Contains(T) [v-yaduoj]
+/// </summary>
+public class StackContains
+{
+ public static int Main()
+ {
+ StackContains testObj = new StackContains();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Stack.Contains(T)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: element exists in the value type stack.";
+ string errorDesc;
+
+ int[] operands = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ Stack<int> operandStack = new Stack<int>((IEnumerable<int>)operands);
+ int item = TestLibrary.Generator.GetInt32(-55) % operands.Length;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ if (!operandStack.Contains(item))
+ {
+ errorDesc = "Cannot find the item " + item
+ + " , which exists in the stack indeed.\n The stack is " + GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe item to locate is " + item + ", the stack is " + GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string c_TEST_DESC = "PosTest2: element does not exist in the value type stack.";
+ string errorDesc;
+
+ int[] operands = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ Stack<int> operandStack = new Stack<int>((IEnumerable<int>)operands);
+ int item = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ if (operandStack.Contains(item))
+ {
+ errorDesc = "The stack should not contain item " + item
+ + ".\nThe stack is " + GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe item to locate is " + item + ", the stack is " + GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ string c_TEST_DESC = "PosTest3: element does not exist in the empty value type stack.";
+ string errorDesc;
+
+ Stack<int> operandStack = new Stack<int>();
+ int item = TestLibrary.Generator.GetInt32(-55);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ if (operandStack.Contains(item))
+ {
+ errorDesc = "The stack should not contain item " + item
+ + ".\nThe stack is empty stack";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe item to locate is " + item + ", the stack is empty stack.";
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P004";
+ string c_TEST_DESC = "PosTest4: element exists in the reference type stack.";
+ string errorDesc;
+
+ string[] words = new string[] { "A", "B", "C", "D", "E", "F", "G", "7", "8", "\n" };
+ Stack<string> wordStack = new Stack<string>((IEnumerable<string>)words);
+ string item = words[TestLibrary.Generator.GetInt32(-55) % words.Length];
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ if (!wordStack.Contains(item))
+ {
+ errorDesc = "Cannot find the item \"" + item
+ + "\", which exists in the stack indeed. The stack is " + GetStackData(wordStack);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe item to locate is \"" + item + "\", the stack is " + GetStackData(wordStack);
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P005";
+ string c_TEST_DESC = "PosTest5: element does not exist in the reference type stack.";
+ string errorDesc;
+
+ string[] words = new string[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" };
+ Stack<string> wordStack = new Stack<string>((IEnumerable<string>)words);
+ string item = "AA";
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ if (wordStack.Contains(item))
+ {
+ errorDesc = "The stack should not contain item \"" + item +
+ "\".The stack is " + GetStackData(wordStack);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe item to locate is \"" + item + "\", the stack is " + GetStackData(wordStack);
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P006";
+ string c_TEST_DESC = "PosTest6: element does not exist in the empty reference type stack.";
+ string errorDesc;
+
+ Stack<string> wordStack = new Stack<string>();
+ string item = TestLibrary.Generator.GetString(-55, false, 1, 5);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ if (wordStack.Contains(item))
+ {
+ errorDesc = "The stack should not contain item \"" + item
+ + "\".The stack is empty stack";
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe item to locate is \"" + item + "\", and the stack is empty stack.";
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P007";
+ string c_TEST_DESC = "PosTest7: null reference exists in the reference type stack.";
+ string errorDesc;
+
+ string[] words = new string[] { null, "1", "2", "3", "4", "5", "6", "7", "8", "9" };
+ Stack<string> wordStack = new Stack<string>((IEnumerable<string>)words);
+ string item = null;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ if (!wordStack.Contains(item))
+ {
+ errorDesc = "Cannot find item (null reference). The stack is" +
+ GetStackData(wordStack);
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe item to locate is null reference. The stack is " + GetStackData(wordStack);
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P008";
+ string c_TEST_DESC = "PosTest8: null reference does not exist in the reference type stack.";
+ string errorDesc;
+
+ string[] words = new string[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" };
+ Stack<string> wordStack = new Stack<string>((IEnumerable<string>)words);
+ string item = null;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ if (wordStack.Contains(item))
+ {
+ errorDesc = "The stack should not contain item (null reference). The stack is" +
+ GetStackData(wordStack);
+ TestLibrary.TestFramework.LogError("015" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe item to locate is null reference. The stack is " + GetStackData(wordStack);
+ TestLibrary.TestFramework.LogError("016" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P009";
+ string c_TEST_DESC = "PosTest9: null reference does not exist in the empty reference type stack.";
+ string errorDesc;
+
+ Stack<string> wordStack = new Stack<string>();
+ string item = null;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ if (wordStack.Contains(item))
+ {
+ errorDesc = "The stack should not contain item (null reference). The stack is empty.";
+ TestLibrary.TestFramework.LogError("017" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe item to locate is null reference. The stack is emtpy";
+ TestLibrary.TestFramework.LogError("018" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for Positive tests
+ private string GetStackData(Stack<int> values)
+ {
+ if (null == values) return "null reference";
+ int[] tempVals = new int[values.Count];
+ values.CopyTo(tempVals, 0);
+ StringBuilder sb = new StringBuilder();
+ sb.Append("{");
+ for (int i = 0; i < tempVals.Length; ++i)
+ {
+ sb.AppendFormat("{0}, ", tempVals[i]);
+ }
+ sb.Append("}");
+
+ return sb.ToString();
+ }
+
+ private string GetStackData(Stack<string> values)
+ {
+ if (null == values) return "null reference";
+ string[] tempVals = new string[values.Count];
+ values.CopyTo(tempVals, 0);
+ StringBuilder sb = new StringBuilder();
+ sb.Append("{");
+ for (int i = 0; i < tempVals.Length; ++i)
+ {
+ if (null == tempVals[i])
+ {
+ sb.AppendFormat("null,");
+ }
+ else
+ {
+ sb.AppendFormat("\"{0}\", ", tempVals[i]);
+ }
+ }
+ sb.Append("}");
+
+ return sb.ToString();
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackcopyto.cs b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackcopyto.cs
new file mode 100644
index 0000000000..bd6858714e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackcopyto.cs
@@ -0,0 +1,318 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text; //for StringBuilder
+using System.Collections.Generic;
+
+/// <summary>
+/// Stack.CopyTo(T[], Int32) [v-yaduoj]
+/// </summary>
+public class StackCopyTo
+{
+ private const int c_MAX_ARRAY_LENGTH = 1000;
+
+ public static int Main()
+ {
+ StackCopyTo testObj = new StackCopyTo();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Stack.CopyTo(T[], Int32)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: copy data from non-empty stack to array.";
+ string errorDesc;
+
+ int[] operands = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ Stack<int> operandStack = new Stack<int>((IEnumerable<int>)operands);
+ int[] expectedValues = new int[] { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
+ int[] actualValues;
+ int startIndex, length;
+ length = operands.Length +
+ TestLibrary.Generator.GetInt32() % (c_MAX_ARRAY_LENGTH - operands.Length + 1);
+ actualValues = new int[length];
+
+ if(actualValues.Length == operands.Length) {
+ startIndex = 0;
+ }
+ else {
+ startIndex = TestLibrary.Generator.GetInt32() % (actualValues.Length - operands.Length);
+ }
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ operandStack.CopyTo(actualValues, startIndex);
+ if (!this.VerifyCopyToResult(actualValues, startIndex, expectedValues))
+ {
+ errorDesc = "Failed to copy data from stack to array." +
+ "\nThe stack is " + this.GetArrayData(expectedValues) +
+ "\nThe start index is " + startIndex + ", and actual array elements is " +
+ this.GetArrayData(actualValues, startIndex, expectedValues.Length);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe stack is " + this.GetArrayData(expectedValues) +
+ "\nThe start index is " + startIndex + ".";
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string c_TEST_DESC = "PosTest2: copy data from empty stack to array.";
+ string errorDesc;
+
+ Stack<int> operandStack = new Stack<int>();
+ int[] actualValues;
+ int startIndex, length;
+ length = (TestLibrary.Generator.GetInt32() % (c_MAX_ARRAY_LENGTH))+1;
+ actualValues = new int[length];
+ int expectedValue = -1;
+
+ startIndex = TestLibrary.Generator.GetInt32() % actualValues.Length;
+ actualValues[startIndex] = expectedValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ operandStack.CopyTo(actualValues, startIndex);
+ if (actualValues[startIndex] != expectedValue)
+ {
+ errorDesc = "Failed to copy data from empty stack to array." +
+ "\nThe start index is " + startIndex + "and values at this postion is " +
+ actualValues[startIndex] + ".";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe stack is empty." +
+ "\nThe start index is " + startIndex + "and values at this postion is " +
+ actualValues[startIndex] + ".";
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for Positive tests
+ private bool VerifyCopyToResult(int[] actualValues, int startIndex, int[] expectedValues)
+ {
+ bool retVal = true;
+
+ if (actualValues.Length - startIndex < expectedValues.Length) return false;
+ for (int i = 0; i < expectedValues.Length; ++i)
+ {
+ if (expectedValues[i] != actualValues[startIndex + i]) return false;
+ }
+
+ return retVal;
+ }
+
+ private string GetArrayData(int[] values)
+ {
+ return this.GetArrayData(values, 0, values.Length);
+ }
+
+ private string GetArrayData(int[] values, int startIndex, int count)
+ {
+ if (null == values) return "null reference";
+ if (startIndex < 0 || startIndex >= values.Length) throw new ArgumentOutOfRangeException("startIndex");
+ if (startIndex + count > values.Length) throw new ArgumentOutOfRangeException("count");
+
+ StringBuilder sb = new StringBuilder();
+ sb.Append("{");
+ for (int i = startIndex; i < count; ++i)
+ {
+ sb.AppendFormat("{0}, ", values[i]);
+ }
+ sb.Append("}");
+
+ return sb.ToString();
+ }
+ #endregion
+
+ #region Negative tests
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ string c_TEST_DESC = "NegTest1: array is a null reference (Nothing in Visual Basic).";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Stack<int> operandStack = new Stack<int>();
+ operandStack.CopyTo(null, 0);
+ errorDesc = "ArgumentNullException is not thrown as expected when array is a null reference (Nothing in Visual Basic).";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\narray is a null reference (Nothing in Visual Basic).";
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ string c_TEST_DESC = "NegTest2: arrayIndex is less than zero.";
+ string errorDesc;
+
+ int[] values = new int[TestLibrary.Generator.GetInt32() % (c_MAX_ARRAY_LENGTH + 1)];
+ int startIndex = -1 * TestLibrary.Generator.GetInt32() - 1;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Stack<int> operandStack = new Stack<int>();
+ operandStack.CopyTo(values, startIndex);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected when arrayIndex is " +
+ startIndex + ".";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\narrayIndex is " + startIndex + ".";
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ string c_TEST_DESC = "NegTest3: The number of elements in the source Stack is greater than the available space from arrayIndex to the end of the destination array.";
+ string errorDesc;
+
+ int[] operands = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ Stack<int> operandStack = new Stack<int>((IEnumerable<int>)operands);
+ int[] values = new int[TestLibrary.Generator.GetInt32() % (operandStack.Count)];
+ int startIndex = 0;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ operandStack.CopyTo(values, startIndex);
+ errorDesc = "ArgumentException is not thrown as expected when arrayIndex is " +
+ startIndex + ", the length of array is " + values.Length;
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\narrayIndex is " + startIndex + ", the length of array is " + values.Length;
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N004";
+ string c_TEST_DESC = "NegTest4: arrayIndex is equal to or greater than the length of array.";
+ string errorDesc;
+
+ int[] operands = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ Stack<int> operandStack = new Stack<int>((IEnumerable<int>)operands);
+ int length = operands.Length +
+ TestLibrary.Generator.GetInt32() % (c_MAX_ARRAY_LENGTH - operands.Length + 1);
+ int[] values = new int[length];
+ int startIndex = values.Length + TestLibrary.Generator.GetInt32() % (int.MaxValue - length + 1);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ operandStack.CopyTo(values, startIndex);
+ errorDesc = "ArgumentException is not thrown as expected when arrayIndex is " +
+ startIndex + ", the length of array is " + values.Length;
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\narrayIndex is " + startIndex + ", the length of array is " + values.Length;
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackcount.cs b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackcount.cs
new file mode 100644
index 0000000000..6d7c1f372e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackcount.cs
@@ -0,0 +1,135 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text; //for StringBuilder
+using System.Collections.Generic;
+
+/// <summary>
+/// Stack.Count [v-yaduoj]
+/// </summary>
+public class StackCount
+{
+ public static int Main()
+ {
+ StackCount testObj = new StackCount();
+
+ TestLibrary.TestFramework.BeginTestCase("for property: Stack.Count");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: get the number of elements of non-empty stack.";
+ string errorDesc;
+
+ int[] operands = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ Stack<int> operandStack = new Stack<int>((IEnumerable<int>)operands);
+ int expectedCount = operands.Length;
+ int actualCount;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualCount = operandStack.Count;
+ if (actualCount != expectedCount)
+ {
+ errorDesc = "The count of elements is not the value " + expectedCount +
+ "as expected, actually(" + actualCount +
+ ").\nThe stack is " + this.GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe stack is " + this.GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string c_TEST_DESC = "PosTest2: get the number of elements of empty stack.";
+ string errorDesc;
+
+ Stack<int> operandStack = new Stack<int>();
+ int expectedCount = 0;
+ int actualCount;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualCount = operandStack.Count;
+ if (actualCount != expectedCount)
+ {
+ errorDesc = "The count of elements is not the value " + expectedCount +
+ "as expected, actually(" + actualCount +
+ ").\nThe stack is " + this.GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe stack is " + this.GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for Positive tests
+ private string GetStackData(Stack<int> values)
+ {
+ if (null == values) return "null reference";
+ int[] tempVals = new int[values.Count];
+ values.CopyTo(tempVals, 0);
+ StringBuilder sb = new StringBuilder();
+ sb.Append("{");
+ for (int i = 0; i < tempVals.Length; ++i)
+ {
+ sb.AppendFormat("{0}, ", tempVals[i]);
+ }
+ sb.Append("}");
+
+ return sb.ToString();
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackctor1.cs b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackctor1.cs
new file mode 100644
index 0000000000..0ecfda37a9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackctor1.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// Stack Constructor() [v-yaduoj]
+/// </summary>
+public class StackCtor1
+{
+ public static int Main()
+ {
+ StackCtor1 testObj = new StackCtor1();
+
+ TestLibrary.TestFramework.BeginTestCase("for constructor: Stack()");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: invoke the default constructor.";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Stack<int> operandStack = new Stack<int>();
+ int actualCount = operandStack.Count;
+ if (0 != actualCount)
+ {
+ errorDesc = "Failed to initialize the new instance of Statck<T> via default constructor."
+ + "\nExpected item count is 0, which differs from actual item count " + actualCount;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackctor2.cs b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackctor2.cs
new file mode 100644
index 0000000000..20ba577813
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackctor2.cs
@@ -0,0 +1,142 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// Stack Constructor(Int32) [v-yaduoj]
+/// </summary>
+public class StackTest
+{
+ public static int Main()
+ {
+ StackTest testObj = new StackTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for constructor: Stack(Int32)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: initialize a new instance of statck<T> using a positive default initial capacity.";
+ string errorDesc;
+
+ int defaultInitialCapacity = 100;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Stack<int> operandStack = new Stack<int>(defaultInitialCapacity);
+ int actualCount = operandStack.Count;
+ if (0 != actualCount)
+ {
+ errorDesc = "The item count of stack is not the value 0 as expected, actually " + actualCount
+ + "\nThe specified default capacity is (" + defaultInitialCapacity + ")";
+ TestLibrary.TestFramework.LogError("P001.1", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe specified default capacity is (" + defaultInitialCapacity + ")";
+ TestLibrary.TestFramework.LogError("P001.2", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: initialize a new instance of statck<T> using a default initial capacity whose value is zero.";
+ string errorDesc;
+
+ int defaultInitialCapacity = 0;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Stack<int> operandStack = new Stack<int>(defaultInitialCapacity);
+ int actualCount = operandStack.Count;
+ if (0 != actualCount)
+ {
+ errorDesc = "The item count of stack is not the value 0 as expected, actually " + actualCount
+ + "\nThe specified default capacity is (" + defaultInitialCapacity + ")";
+ TestLibrary.TestFramework.LogError("P002.1", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe specified default capacity is (" + defaultInitialCapacity + ")";
+ TestLibrary.TestFramework.LogError("P002.2", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: capacity is less than zero.";
+ string errorDesc;
+
+ int defaultInitialCapacity;
+ defaultInitialCapacity = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Stack<int> operandStack = new Stack<int>(defaultInitialCapacity);
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected when the speified default initial capacity is ("
+ + defaultInitialCapacity + ")";
+ TestLibrary.TestFramework.LogError(c_TEST_ID + ".1", errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe specified default capacity is (" + defaultInitialCapacity + ")";
+ TestLibrary.TestFramework.LogError(c_TEST_ID + ".2", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackctor3.cs b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackctor3.cs
new file mode 100644
index 0000000000..741618078e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackctor3.cs
@@ -0,0 +1,205 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text; //for StringBuilder
+using System.Collections.Generic;
+
+/// <summary>
+/// Stack Constructor(IEnumerable<T>) [v-yaduoj]
+/// </summary>
+public class StackTest
+{
+ public static int Main()
+ {
+ StackTest testObj = new StackTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for constructor: Stack(IEnumerable<T>)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: initialize a new instance of statck<T> using a non-empty array.";
+ string errorDesc;
+
+ int[] operands = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Stack<int> operandStack = new Stack<int>((IEnumerable<int>)operands);
+ if (!this.VerifyNewStack(operandStack, operands))
+ {
+ errorDesc = "Failed to initialize the new instance of Statck<T> using specified array." +
+ "\nThe actual items in the stack are " + this.GetStackData(operandStack) +
+ "\nThe expected items in the stack are " + this.GetExpectedItems(operands);
+ TestLibrary.TestFramework.LogError(c_TEST_ID + ".1", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe specified array is " + this.GetArrayData(operands);
+ TestLibrary.TestFramework.LogError(c_TEST_ID + ".2", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string c_TEST_DESC = "PosTest2: initialize a new instance of statck<T> using a zero-length array.";
+ string errorDesc;
+
+ int[] operands = new int[] { };
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Stack<int> operandStack = new Stack<int>((IEnumerable<int>)operands);
+ if (!this.VerifyNewStack(operandStack, operands))
+ {
+ errorDesc = "Failed to initialize the new instance of Statck<T> using specified array." +
+ "\nThe actual items in the stack are " + this.GetStackData(operandStack) +
+ "\nThe expected items in the stack are " + this.GetExpectedItems(operands);
+ TestLibrary.TestFramework.LogError(c_TEST_ID + ".1", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe specified array is " + this.GetArrayData(operands);
+ TestLibrary.TestFramework.LogError(c_TEST_ID + ".2", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for Positive tests
+ private bool VerifyNewStack(Stack<int> operandStack, int[] operands)
+ {
+ bool retVal = true;
+ if (operands.Length != operandStack.Count) return false;
+
+ int[] tempValues = operandStack.ToArray();
+ for (int i = 0; i < tempValues.Length; ++i)
+ {
+ if (operands[i] != tempValues[tempValues.Length - 1 - i]) return false;
+ }
+ return retVal;
+ }
+
+ private string GetArrayData(int[] values)
+ {
+ if (null == values) return "null reference";
+ StringBuilder sb = new StringBuilder();
+ sb.Append("{");
+ for (int i = 0; i < values.Length; ++i)
+ {
+ sb.AppendFormat("{0}, ", values[i]);
+ }
+ sb.Append("}");
+
+ return sb.ToString();
+ }
+
+ private string GetStackData(Stack<int> values)
+ {
+ if (null == values) return "null reference";
+ int[] tempVals = new int[values.Count];
+ values.CopyTo(tempVals, 0);
+ StringBuilder sb = new StringBuilder();
+ sb.Append("{");
+ for (int i = 0; i < tempVals.Length; ++i)
+ {
+ sb.AppendFormat("{0}, ", tempVals[i]);
+ }
+ sb.Append("}");
+
+ return sb.ToString();
+ }
+
+ //Get expected items in stack from the input array,
+ //which is just the reverse of the input.
+ private string GetExpectedItems(int[] inputValues)
+ {
+ if (null == inputValues) return "null reference";
+ StringBuilder sb = new StringBuilder();
+ sb.Append("{");
+ for (int i = inputValues.Length - 1; i >= 0; --i)
+ {
+ sb.AppendFormat("{0}, ", inputValues[i]);
+ }
+ sb.Append("}");
+
+ return sb.ToString();
+ }
+ #endregion
+
+ #region Negative tests
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ string c_TEST_DESC = "NegTest1: collection is a null reference (Nothing in Visual Basic).";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Stack<int> operandStack = new Stack<int>(null as IEnumerable<int>);
+ errorDesc = "ArgumentNullException is not thrown as expected when collection is a null reference (Nothing in Visual Basic).";
+ TestLibrary.TestFramework.LogError(c_TEST_ID + ".1", errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nCollection is a null reference (Nothing in Visual Basic).";
+ TestLibrary.TestFramework.LogError(c_TEST_ID + ".2", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackgetenumerator.cs b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackgetenumerator.cs
new file mode 100644
index 0000000000..d9c9744037
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackgetenumerator.cs
@@ -0,0 +1,142 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text; //for StringBuilder
+using System.Collections.Generic;
+
+/// <summary>
+/// Stack.GetEnumerator() [v-yaduoj]
+/// </summary>
+public class StackGetEnumerator
+{
+ public static int Main()
+ {
+ StackGetEnumerator testObj = new StackGetEnumerator();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Stack.GetEnumerator()");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: Get enumerator from non-empty stack.";
+ string errorDesc;
+
+ Stack<int>.Enumerator enumerator;
+ int[] operands = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ Stack<int> operandStack = new Stack<int>((IEnumerable<int>)operands);
+ int[] expectedValues = new int[] { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ enumerator = operandStack.GetEnumerator();
+ if (!this.VerifyEnumerator(enumerator, expectedValues))
+ {
+ errorDesc = "Faild to get enumerator of stack. The stack is " +
+ this.GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe stack is " + GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string c_TEST_DESC = "PosTest2: Get enumerator from empty stack.";
+ string errorDesc;
+
+ Stack<int>.Enumerator enumerator;
+ Stack<int> operandStack = new Stack<int>();
+ int[] expectedValues = new int[] {};
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ enumerator = operandStack.GetEnumerator();
+ if (!this.VerifyEnumerator(enumerator, expectedValues))
+ {
+ errorDesc = "Faild to get enumerator of stack. The stack is emtpy.";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e + "\nThe stack is empty.";
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for Positive tests
+ private bool VerifyEnumerator(Stack<int>.Enumerator enumerator, int[] expectedValues)
+ {
+ bool retVal = true;
+ int i = 0;
+ while(enumerator.MoveNext())
+ {
+ if (enumerator.Current != expectedValues[i]) return false;
+ ++i;
+ };
+ retVal = i == expectedValues.Length;
+ return retVal;
+ }
+
+ private string GetStackData(Stack<int> values)
+ {
+ if (null == values) return "null reference";
+ int[] tempVals = new int[values.Count];
+ values.CopyTo(tempVals, 0);
+ StringBuilder sb = new StringBuilder();
+ sb.Append("{");
+ for (int i = 0; i < tempVals.Length; ++i)
+ {
+ sb.AppendFormat("{0}, ", tempVals[i]);
+ }
+ sb.Append("}");
+
+ return sb.ToString();
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackpeek.cs b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackpeek.cs
new file mode 100644
index 0000000000..57ff857588
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackpeek.cs
@@ -0,0 +1,142 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text; //for StringBuilder
+using System.Collections.Generic;
+
+/// <summary>
+/// Stack.Peek() [v-yaduoj]
+/// </summary>
+public class StackPeek
+{
+ public static int Main()
+ {
+ StackPeek testObj = new StackPeek();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Stack.Peek()");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: Peek the top item from the non-empty stack.";
+ string errorDesc;
+
+ Stack<int> operandStack = new Stack<int>();
+ int expectedValue = TestLibrary.Generator.GetInt32(-55);
+ int actualValue;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ operandStack.Push(expectedValue);
+ int oldCount = operandStack.Count;
+ actualValue = operandStack.Peek();
+ int newCount = operandStack.Count;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The item at the top of stack is not the value " +
+ expectedValue + " as expected, actually(" + actualValue +
+ "). The stack is " + this.GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ if (newCount != oldCount)
+ {
+ errorDesc = "The number of elements in the stack has changed after peeking." +
+ "\nExpected count is " + oldCount + ", actually(" + newCount +
+ "). \nThe stack is " + this.GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe stack is " + GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for Positive tests
+ private string GetStackData(Stack<int> values)
+ {
+ if (null == values) return "null reference";
+ int[] tempVals = new int[values.Count];
+ values.CopyTo(tempVals, 0);
+ StringBuilder sb = new StringBuilder();
+ sb.Append("{");
+ for (int i = 0; i < tempVals.Length; ++i)
+ {
+ sb.AppendFormat("{0}, ", tempVals[i]);
+ }
+ sb.Append("}");
+
+ return sb.ToString();
+ }
+ #endregion
+
+ #region Negative tests
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ string c_TEST_DESC = "NegTest1: The Stack is empty.";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Stack<int> operandStack = new Stack<int>();
+ operandStack.Peek();
+ errorDesc = "InvalidOperationException is not thrown as expected when the Stack is empty.";
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\narray is a null reference (Nothing in Visual Basic).";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackpop.cs b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackpop.cs
new file mode 100644
index 0000000000..80764f6cee
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackpop.cs
@@ -0,0 +1,141 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text; // for StringBuilder
+using System.Collections.Generic;
+
+/// <summary>
+/// Stack.Pop() [v-yaduoj]
+/// </summary>
+public class StackPop
+{
+ public static int Main()
+ {
+ StackPop testObj = new StackPop();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Stack.Pop()");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: Pop the top item from the non-empty stack.";
+ string errorDesc;
+
+ Stack<int> operandStack = new Stack<int>();
+ int expectedValue = TestLibrary.Generator.GetInt32(-55);
+ int actualValue;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ operandStack.Push(expectedValue);
+ int expectedCount = operandStack.Count - 1;
+ actualValue = operandStack.Pop();
+ int actualCount = operandStack.Count;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The item at the top of stack is not the value " +
+ expectedValue + " as expected, actually(" + actualValue +
+ "). The stack is " + this.GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ if (actualCount != expectedCount)
+ {
+ errorDesc = "The number of elements in the stack after popping is not the value " +
+ expectedCount + " as expected, actually(" + actualCount +
+ ").\nThe stack is " + this.GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe stack is " + GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for Positive tests
+ private string GetStackData(Stack<int> values)
+ {
+ if (null == values) return "null reference";
+ int[] tempVals = new int[values.Count];
+ values.CopyTo(tempVals, 0);
+ StringBuilder sb = new StringBuilder();
+ sb.Append("{");
+ for (int i = 0; i < tempVals.Length; ++i)
+ {
+ sb.AppendFormat("{0}, ", tempVals[i]);
+ }
+ sb.Append("}");
+
+ return sb.ToString();
+ }
+ #endregion
+
+ #region Negative tests
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ string c_TEST_DESC = "NegTest1: The Stack is empty.";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Stack<int> operandStack = new Stack<int>();
+ operandStack.Pop();
+ errorDesc = "InvalidOperationException is not thrown as expected when the stack is empty.";
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e + "\nThe stack is empty.";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackpush.cs b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackpush.cs
new file mode 100644
index 0000000000..d7d1a0df39
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stackpush.cs
@@ -0,0 +1,177 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text; //for StringBuilder
+using System.Collections.Generic;
+
+/// <summary>
+/// Stack.Push(T) [v-yaduoj]
+/// </summary>
+public class StackPush
+{
+ public static int Main()
+ {
+ StackPush testObj = new StackPush();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Stack.Push(T)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: Push an item into the value type stack.";
+ string errorDesc;
+
+ Stack<int> operandStack = new Stack<int>();
+ int expectedValue = TestLibrary.Generator.GetInt32(-55);
+ int actualValue;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ int expectedCount = operandStack.Count + 1;
+ operandStack.Push(expectedValue);
+ actualValue = operandStack.Peek();
+ int actualCount = operandStack.Count;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The item at the top of stack is not the value " +
+ expectedValue + "as expected, actually(" + actualValue +
+ "). The stack is " + this.GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ if (actualCount != expectedCount)
+ {
+ errorDesc = "The number of elements in the stack after pushing is not the value " +
+ expectedCount + " as expected, actually(" + actualCount +
+ ").\nThe stack is " + this.GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe stack is " + GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string c_TEST_DESC = "PosTest2: Push an item into the reference type stack.";
+ string errorDesc;
+
+ Stack<string> operandStack = new Stack<string>();
+ string expectedValue = "Just a test\n\t\r";
+ string actualValue;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ int expectedCount = operandStack.Count + 1;
+ operandStack.Push(expectedValue);
+ actualValue = operandStack.Peek();
+ int actualCount = operandStack.Count;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The item at the top of stack is not the value \"" +
+ expectedValue + "\" as expected, actually(" + actualValue +
+ "). The stack is " + this.GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ if (actualCount != expectedCount)
+ {
+ errorDesc = "The number of elements in the stack after pushing is not the value " +
+ expectedCount + " as expected, actually(" + actualCount +
+ ").\nThe stack is " + this.GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe stack is " + GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for Positive tests
+ private string GetStackData(Stack<int> values)
+ {
+ if (null == values) return "null reference";
+ int[] tempVals = new int[values.Count];
+ values.CopyTo(tempVals, 0);
+ StringBuilder sb = new StringBuilder();
+ sb.Append("{");
+ for (int i = 0; i < tempVals.Length; ++i)
+ {
+ sb.AppendFormat("{0}, ", tempVals[i]);
+ }
+ sb.Append("}");
+
+ return sb.ToString();
+ }
+
+ private string GetStackData(Stack<string> values)
+ {
+ if (null == values) return "null reference";
+ string[] tempVals = new string[values.Count];
+ values.CopyTo(tempVals, 0);
+ StringBuilder sb = new StringBuilder();
+ sb.Append("{");
+ for (int i = 0; i < tempVals.Length; ++i)
+ {
+ if (null == tempVals[i])
+ {
+ sb.AppendFormat("null,");
+ }
+ else
+ {
+ sb.AppendFormat("\"{0}\", ", tempVals[i]);
+ }
+ }
+ sb.Append("}");
+
+ return sb.ToString();
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stack/stacktoarray.cs b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stacktoarray.cs
new file mode 100644
index 0000000000..d50241ef47
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stack/stacktoarray.cs
@@ -0,0 +1,154 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text; //for StringBuilder
+using System.Collections.Generic;
+
+/// <summary>
+/// Stack.ToArray() [v-yaduoj]
+/// </summary>
+public class StackToArray
+{
+ public static int Main()
+ {
+ StackToArray testObj = new StackToArray();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Stack.ToArray()");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: copy data from non-empty stack to array.";
+ string errorDesc;
+
+ int[] operands = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ Stack<int> operandStack = new Stack<int>((IEnumerable<int>)operands);
+ int[] expectedValues = new int[] { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
+ int[] actualValues;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValues = operandStack.ToArray();
+ if (!this.VerifyToArray(actualValues, expectedValues))
+ {
+ errorDesc = "Failed to copy data from stack to array." +
+ "\nThe stack is " + this.GetArrayData(expectedValues) +
+ "\nThe actual array is " + this.GetArrayData(actualValues);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe stack is " + this.GetArrayData(expectedValues);
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string c_TEST_DESC = "PosTest2: copy data from empty stack to array.";
+ string errorDesc;
+
+ Stack<int> operandStack = new Stack<int>();
+ int[] expectedValues = new int[] {};
+ int[] actualValues;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValues = operandStack.ToArray();
+ if (!this.VerifyToArray(actualValues, expectedValues))
+ {
+ errorDesc = "Failed to copy data from stack to array." +
+ "\nThe stack is empty." +
+ "\nThe actual array is " + this.GetArrayData(actualValues);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe stack is " + this.GetArrayData(expectedValues);
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for Positive tests
+ private bool VerifyToArray(int[] actualValues, int[] expectedValues)
+ {
+ if (null == actualValues) return expectedValues == null;
+ if (null == expectedValues) return false;
+ if (actualValues.Length != expectedValues.Length) return false;
+ for (int i = 0; i < actualValues.Length; ++i)
+ {
+ if (actualValues[i] != expectedValues[i]) return false;
+ }
+
+ return true;
+ }
+
+ private string GetArrayData(int[] values)
+ {
+ return this.GetArrayData(values, 0, values.Length);
+ }
+
+ private string GetArrayData(int[] values, int startIndex, int count)
+ {
+ if (null == values) return "null reference";
+ if (startIndex < 0 || startIndex >= values.Length) throw new ArgumentOutOfRangeException("startIndex");
+ if (startIndex + count > values.Length) throw new ArgumentOutOfRangeException("count");
+
+ StringBuilder sb = new StringBuilder();
+ sb.Append("{");
+ for (int i = startIndex; i < count; ++i)
+ {
+ sb.AppendFormat("{0}, ", values[i]);
+ }
+ sb.Append("}");
+
+ return sb.ToString();
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/StackEnumeratorCurrent.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/StackEnumeratorCurrent.csproj
new file mode 100644
index 0000000000..925a2d8abe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/StackEnumeratorCurrent.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackenumeratorcurrent.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/StackEnumeratorDispose.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/StackEnumeratorDispose.csproj
new file mode 100644
index 0000000000..0fe8f7324b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/StackEnumeratorDispose.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackenumeratordispose.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/StackEnumeratorMoveNext.csproj b/tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/StackEnumeratorMoveNext.csproj
new file mode 100644
index 0000000000..7155849401
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/StackEnumeratorMoveNext.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackenumeratormovenext.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/stackenumeratorcurrent.cs b/tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/stackenumeratorcurrent.cs
new file mode 100644
index 0000000000..b3fa3693db
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/stackenumeratorcurrent.cs
@@ -0,0 +1,219 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text; //for StringBuilder
+using System.Collections.Generic;
+
+/// <summary>
+/// Stack.Enumerator.Current [v-yaduoj]
+/// </summary>
+public class StackEnumeratorCurrent
+{
+ public static int Main()
+ {
+ StackEnumeratorCurrent testObj = new StackEnumeratorCurrent();
+
+ TestLibrary.TestFramework.BeginTestCase("for property: Stack.Enumerator.Current");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: Get the element at the current position of the enumerator from non-empty stack.";
+ string errorDesc;
+
+ Stack<int>.Enumerator enumerator;
+ int[] operands = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ Stack<int> operandStack = new Stack<int>((IEnumerable<int>)operands);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ int[] expectedValues = new int[] { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
+ enumerator = operandStack.GetEnumerator();
+ retVal = this.VerifyEnumerator(c_TEST_ID, enumerator, expectedValues);
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe stack is " + GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError(c_TEST_ID + ".3", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string c_TEST_DESC = "PosTest2: Get the element at the current position of the enumerator from empty stack.";
+ string errorDesc;
+
+ Stack<int>.Enumerator enumerator;
+ Stack<int> operandStack = new Stack<int>();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ enumerator = operandStack.GetEnumerator();
+ retVal = this.VerifyEnumerator(c_TEST_ID, enumerator, new int[] { });
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e + "\nThe stack is empty.";
+ TestLibrary.TestFramework.LogError(c_TEST_ID + ".3", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for Positive tests
+ private bool VerifyEnumerator(string testId, Stack<int>.Enumerator enumerator, int[] expectedValues)
+ {
+ string errorInfo;
+ int i = 0;
+ while (enumerator.MoveNext())
+ {
+ if (enumerator.Current != expectedValues[i])
+ {
+ errorInfo = "The element at the current positon [" + i + "] is not the value " +
+ expectedValues[i] + " as expected, actually is " + enumerator.Current + ".";
+ TestLibrary.TestFramework.LogError(testId + ".1", errorInfo);
+ return false;
+ }
+ ++i;
+ };
+
+ if (i != expectedValues.Length)
+ {
+ errorInfo = "The item count of the stack is not the value " +
+ expectedValues.Length + " as expected, actually is " + i + ".";
+ TestLibrary.TestFramework.LogError(testId + ".2", errorInfo);
+ return false;
+ }
+
+ return true;
+ }
+
+ private string GetStackData(Stack<int> values)
+ {
+ if (null == values) return "null reference";
+ int[] tempVals = new int[values.Count];
+ values.CopyTo(tempVals, 0);
+ StringBuilder sb = new StringBuilder();
+ sb.Append("{");
+ for (int i = 0; i < tempVals.Length; ++i)
+ {
+ sb.AppendFormat("{0}, ", tempVals[i]);
+ }
+ sb.Append("}");
+
+ return sb.ToString();
+ }
+ #endregion
+
+ #region Negative tests
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ string c_TEST_DESC = "NegTest1: The enumerator is positioned before the first element of the collection.";
+ string errorDesc;
+
+ Stack<int>.Enumerator enumerator;
+ Stack<int> operandStack = new Stack<int>();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ enumerator = operandStack.GetEnumerator();
+ int val = enumerator.Current;
+ errorDesc = "InvalidOperationException is not thrown as expected when The enumerator is positioned before the first element of the collection.";
+ TestLibrary.TestFramework.LogError(c_TEST_ID + ".1", errorDesc);
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe enumerator is positioned before the first element of the collection.";
+ TestLibrary.TestFramework.LogError(c_TEST_ID + ".2", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ string c_TEST_DESC = "NegTest2: The enumerator is positioned after the last element of the collection.";
+ string errorDesc;
+
+ Stack<int>.Enumerator enumerator;
+ Stack<int> operandStack = new Stack<int>();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ operandStack.Push(1);
+ enumerator = operandStack.GetEnumerator();
+ for (int i = 0; i <= operandStack.Count; ++i)
+ {
+ enumerator.MoveNext();
+ }
+ int val = enumerator.Current;
+ errorDesc = "InvalidOperationException is not thrown as expected when The enumerator is positioned before the last element of the collection.";
+ TestLibrary.TestFramework.LogError(c_TEST_ID + ".1", errorDesc);
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe enumerator is positioned before the last element of the collection.";
+ TestLibrary.TestFramework.LogError(c_TEST_ID + ".2", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/stackenumeratordispose.cs b/tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/stackenumeratordispose.cs
new file mode 100644
index 0000000000..270d5b5ec4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/stackenumeratordispose.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text; //for StringBuilder
+using System.Collections.Generic;
+
+/// <summary>
+/// Stack.Enumerator.Dispose() [v-yaduoj]
+/// </summary>
+public class StackEnumeratorDispose
+{
+ public static int Main()
+ {
+ StackEnumeratorDispose testObj = new StackEnumeratorDispose();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Stack.Enumerator.Dispose()");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: Release resources used by enumerator of non-empty stack.";
+ string errorDesc;
+
+ Stack<int>.Enumerator enumerator;
+ int[] operands = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ Stack<int> operandStack = new Stack<int>((IEnumerable<int>)operands);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ enumerator = operandStack.GetEnumerator();
+ enumerator.Dispose();
+ if (enumerator.MoveNext())
+ {
+ errorDesc = "Failed to release resources used by the stack enumerator. The stack is " +
+ this.GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe stack is " + GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string c_TEST_DESC = "PosTest2: Release resources used by enumerator of empty stack.";
+ string errorDesc;
+
+ Stack<int>.Enumerator enumerator;
+ Stack<int> operandStack = new Stack<int>();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ enumerator = operandStack.GetEnumerator();
+ enumerator.Dispose();
+ if (enumerator.MoveNext())
+ {
+ errorDesc = "Failed to release resources used by the stack enumerator. The stack is emtpy.";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e + "\nThe stack is empty.";
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ string c_TEST_DESC = "PosTest3: Release resources used by enumerator of non-empty stack repeatedly.";
+ string errorDesc;
+
+ Stack<int>.Enumerator enumerator;
+ int[] operands = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ Stack<int> operandStack = new Stack<int>((IEnumerable<int>)operands);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ enumerator = operandStack.GetEnumerator();
+ enumerator.Dispose();
+ enumerator.Dispose();
+ if (enumerator.MoveNext())
+ {
+ errorDesc = "Failed to release resources used by the stack enumerator. The stack is " +
+ this.GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe stack is " + GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for Positive tests
+ private string GetStackData(Stack<int> values)
+ {
+ if (null == values) return "null reference";
+ int[] tempVals = new int[values.Count];
+ values.CopyTo(tempVals, 0);
+ StringBuilder sb = new StringBuilder();
+ sb.Append("{");
+ for (int i = 0; i < tempVals.Length; ++i)
+ {
+ sb.AppendFormat("{0}, ", tempVals[i]);
+ }
+ sb.Append("}");
+
+ return sb.ToString();
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/stackenumeratormovenext.cs b/tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/stackenumeratormovenext.cs
new file mode 100644
index 0000000000..706c86e5c3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/generic/stackenumerator/stackenumeratormovenext.cs
@@ -0,0 +1,183 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text; //for StringBuilder
+using System.Collections.Generic;
+
+/// <summary>
+/// Stack.Enumerator.MoveNext() [v-yaduoj]
+/// </summary>
+public class StackEnumeratorMoveNext
+{
+ public static int Main()
+ {
+ StackEnumeratorMoveNext testObj = new StackEnumeratorMoveNext();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Stack.Enumerator.MoveNext()");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: Move the enumerator of non-empty stack.";
+ string errorDesc;
+
+ Stack<int>.Enumerator enumerator;
+ int[] operands = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ Stack<int> operandStack = new Stack<int>((IEnumerable<int>)operands);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ int[] expectedValues = new int[] { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
+ enumerator = operandStack.GetEnumerator();
+ retVal = this.VerifyEnumerator(c_TEST_ID, enumerator, expectedValues);
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe stack is " + GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError(c_TEST_ID + ".3", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string c_TEST_DESC = "PosTest2: Move the enumerator of empty stack.";
+ string errorDesc;
+
+ Stack<int>.Enumerator enumerator;
+ Stack<int> operandStack = new Stack<int>();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ enumerator = operandStack.GetEnumerator();
+ retVal = this.VerifyEnumerator(c_TEST_ID, enumerator, new int[] { });
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe stack is " + GetStackData(operandStack);
+ TestLibrary.TestFramework.LogError(c_TEST_ID + ".3", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for Positive tests
+ private bool VerifyEnumerator(string testId, Stack<int>.Enumerator enumerator, int[] expectedValues)
+ {
+ string errorInfo;
+ int i = 0;
+ while (enumerator.MoveNext())
+ {
+ if (enumerator.Current != expectedValues[i])
+ {
+ errorInfo = "The element at the current positon [" + i + "] is not the value " +
+ expectedValues[i] + " as expected, actually is " + enumerator.Current + ".";
+ TestLibrary.TestFramework.LogError(testId + ".1", errorInfo);
+ return false;
+ }
+ ++i;
+ };
+
+ if (i != expectedValues.Length)
+ {
+ errorInfo = "The item count of the stack is not the value " +
+ expectedValues.Length + " as expected, actually is " + i + ".";
+ TestLibrary.TestFramework.LogError(testId + ".2", errorInfo);
+ return false;
+ }
+
+ return true;
+ }
+
+ private string GetStackData(Stack<int> values)
+ {
+ if (null == values) return "null reference";
+ int[] tempVals = new int[values.Count];
+ values.CopyTo(tempVals, 0);
+ StringBuilder sb = new StringBuilder();
+ sb.Append("{");
+ for (int i = 0; i < tempVals.Length; ++i)
+ {
+ sb.AppendFormat("{0}, ", tempVals[i]);
+ }
+ sb.Append("}");
+
+ return sb.ToString();
+ }
+ #endregion
+
+ #region Negative tests
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ string c_TEST_DESC = "NegTest1: The collection was modified after the enumerator was created.";
+ string errorDesc;
+
+ Stack<int>.Enumerator enumerator;
+ Stack<int> operandStack = new Stack<int>();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ enumerator = operandStack.GetEnumerator();
+ operandStack.Push(1);
+ enumerator.MoveNext();
+ errorDesc = "InvalidOperationException is not thrown as expected when the collection was modified after the enumerator was created.";
+ TestLibrary.TestFramework.LogError(c_TEST_ID + ".1", errorDesc);
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e +
+ "\nThe collection was modified after the enumerator was created.";
+ TestLibrary.TestFramework.LogError(c_TEST_ID + ".2", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/icollection/ICollectionCopyTo.csproj b/tests/src/CoreMangLib/cti/system/collections/icollection/ICollectionCopyTo.csproj
new file mode 100644
index 0000000000..69b320af9a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/icollection/ICollectionCopyTo.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="icollectioncopyto.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/icollection/ICollectionCount.csproj b/tests/src/CoreMangLib/cti/system/collections/icollection/ICollectionCount.csproj
new file mode 100644
index 0000000000..b06045b50b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/icollection/ICollectionCount.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="icollectioncount.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/icollection/ICollectionIsSynchronized.csproj b/tests/src/CoreMangLib/cti/system/collections/icollection/ICollectionIsSynchronized.csproj
new file mode 100644
index 0000000000..6ae81da9a1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/icollection/ICollectionIsSynchronized.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="icollectionissynchronized.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/icollection/ICollectionSyncRoot.csproj b/tests/src/CoreMangLib/cti/system/collections/icollection/ICollectionSyncRoot.csproj
new file mode 100644
index 0000000000..2bd3da4969
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/icollection/ICollectionSyncRoot.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="icollectionsyncroot.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/icollection/icollectioncopyto.cs b/tests/src/CoreMangLib/cti/system/collections/icollection/icollectioncopyto.cs
new file mode 100644
index 0000000000..673b04413c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/icollection/icollectioncopyto.cs
@@ -0,0 +1,389 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.ICollection.CopyTo(System.Array,System.Int32)
+/// </summary>
+public class ICollectionCopyTo
+{
+ const int Count = 1000;
+ static Random m_rand = new Random(-55);
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ Byte[] byteValue = new byte[Count];
+ TestLibrary.Generator.GetBytes(-55, byteValue);
+ List<object> arrayList = new List<object>();
+ for (int i = 0; i < Count; i++)
+ {
+ arrayList.Add(byteValue[i]);
+ }
+
+ byte[] array = new byte[Count];
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Using Arraylist which implemented the CopyTo method in ICollection ");
+
+ try
+ {
+
+ ((ICollection)arrayList).CopyTo(array, 0);
+
+ for (int i = 0; i < Count; i++)
+ {
+ if ((byte)(arrayList[i]) != array[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ int index =m_rand.Next(1,1000);
+
+ Byte[] byteValue = new byte[Count];
+ TestLibrary.Generator.GetBytes(-55, byteValue);
+ List<object> arrayList = new List<object>();
+ for (int i = 0; i < Count; i++)
+ {
+ arrayList.Add(byteValue[i]);
+ }
+
+ byte[] array = new byte[Count+index];
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify the start index is not zero...");
+
+ try
+ {
+
+ ((ICollection)arrayList).CopyTo(array, index);
+
+ for (int i = 0; i < Count; i++)
+ {
+ if ((byte)(arrayList[i]) != array[i+index])
+ {
+ TestLibrary.TestFramework.LogError("002", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ int index = m_rand.Next(1, 1000);
+
+ Byte[] byteValue = new byte[Count];
+ TestLibrary.Generator.GetBytes(-55, byteValue);
+ List<object> arrayList = new List<object>();
+ for (int i = 0; i < Count; i++)
+ {
+ arrayList.Add(byteValue[i]);
+ }
+
+ byte[] array = null;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Verify the array is a null reference");
+
+ try
+ {
+ ((ICollection)arrayList).CopyTo(array, index);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected when array is a null reference");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ int index = m_rand.Next(1, 1000);
+ byte[] array = new byte[Count];
+
+ Byte[] byteValue = new byte[Count];
+ TestLibrary.Generator.GetBytes(-55, byteValue);
+ List<object> arrayList = new List<object>();
+ for (int i = 0; i < Count; i++)
+ {
+ arrayList.Add(byteValue[i]);
+ }
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Verify the index is less than zero");
+
+ try
+ {
+ index = -index;
+ ((ICollection)arrayList).CopyTo(array, index);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException was not thrown as expected when index is "+index.ToString());
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ byte[] array = new byte[Count];
+ int index = array.Length;
+ Byte[] byteValue = new byte[Count];
+ TestLibrary.Generator.GetBytes(-55, byteValue);
+ List<object> arrayList = new List<object>();
+ for (int i = 0; i < Count; i++)
+ {
+ arrayList.Add(byteValue[i]);
+ }
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Verify the index is equal the length of array");
+
+ try
+ {
+ ((ICollection)arrayList).CopyTo(array, index);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentException was not thrown as expected when index equal length of array");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+
+ byte[] array = new byte[Count];
+ int index = array.Length +m_rand.Next(1, 1000);
+
+ List<object> arrayList = new List<object>();
+ Byte[] byteValue = new byte[Count];
+ TestLibrary.Generator.GetBytes(-55, byteValue);
+
+ for (int i = 0; i < Count; i++)
+ {
+ arrayList.Add(byteValue[i]);
+ }
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: Verify the index is greater than the length of array");
+
+ try
+ {
+ ((ICollection)arrayList).CopyTo(array, index);
+ TestLibrary.TestFramework.LogError("107", "The ArgumentException was not thrown as expected. \n index is " + index.ToString() + "\n array length is " + array.Length.ToString());
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+
+ Array array = new byte[Count,Count];
+ int index = m_rand.Next(1, 1000);
+
+ byte[] byteValue = new byte[Count];
+ TestLibrary.Generator.GetBytes(-55, byteValue);
+ List<object> arrayList = new List<object>();
+ for (int i = 0; i < Count; i++)
+ {
+ arrayList.Add(byteValue[i]);
+ }
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: Verify the array is multidimensional");
+
+ try
+ {
+ ((ICollection)arrayList).CopyTo(array, array.Length);
+ TestLibrary.TestFramework.LogError("109", "The ArgumentException was not thrown as expected when the array is multidimensional");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("110", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ int count = Count + m_rand.Next(1, 1000);
+
+ byte[] array = new byte[Count];
+ int index = m_rand.Next(1,1000);
+
+ byte[] byteValue = new byte[count];
+ TestLibrary.Generator.GetBytes(-55, byteValue);
+ List<object> arrayList = new List<object>();
+ for (int i = 0; i < count; i++)
+ {
+ arrayList.Add(byteValue[i]);
+ }
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: The number of elements in the ICollection is greater than the available space from index to the end of array");
+
+ try
+ {
+ ((ICollection)arrayList).CopyTo(array, array.Length);
+ TestLibrary.TestFramework.LogError("111", "The ArgumentException was not thrown as expecteds");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("112", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ int index = m_rand.Next(1, 1000);
+ byte[] array = new byte[Count+index];
+
+
+ List<object> arrayList = new List<object>();
+ for (int i = 0; i < Count; i++)
+ {
+ arrayList.Add(new object());
+ }
+
+ TestLibrary.TestFramework.BeginScenario("NegTest7: Verify the type of the ICollection cannot be cast automatically to the type of array");
+
+ try
+ {
+ ((ICollection)arrayList).CopyTo(array, index);
+ TestLibrary.TestFramework.LogError("113", "The InvalidCastException was not thrown as expected");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("114", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ICollectionCopyTo test = new ICollectionCopyTo();
+
+ TestLibrary.TestFramework.BeginTestCase("Test for method:System.Collections.ICollection.CopyTo(System.Array,System.Int32)");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/collections/icollection/icollectioncount.cs b/tests/src/CoreMangLib/cti/system/collections/icollection/icollectioncount.cs
new file mode 100644
index 0000000000..cabaf0564f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/icollection/icollectioncount.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Collections.ICollection.Count
+/// </summary>
+public class ICollectionCount
+{
+ static Random m_rand = new Random(-55);
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ int count = m_rand.Next(1, 1000);
+ Array array = new byte[count];
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Using Array which implemented the Count property in ICollection ");
+
+ try
+ {
+ if (((ICollection)array).Count != count)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ Array array = new byte[0];
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify the count of ICollection is zero ");
+
+ try
+ {
+ if (((ICollection)array).Count != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+
+ #endregion
+
+ public static int Main()
+ {
+ ICollectionCount test = new ICollectionCount();
+
+ TestLibrary.TestFramework.BeginTestCase("Test for Property:System.Collections.ICollection.Count");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/collections/icollection/icollectionissynchronized.cs b/tests/src/CoreMangLib/cti/system/collections/icollection/icollectionissynchronized.cs
new file mode 100644
index 0000000000..d12feff3f1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/icollection/icollectionissynchronized.cs
@@ -0,0 +1,172 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.ICollection.IsSynchronized
+/// </summary>
+public class ICollectionIsSynchronized
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestICollectionIsSynchronized test = new TestICollectionIsSynchronized();
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the default value of IsSynchronized property is false");
+
+ try
+ {
+ if (test.IsSynchronized)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestICollectionIsSynchronized test = new TestICollectionIsSynchronized();
+ test.setIsSynchronized(true);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify set the IsSynchronized properyty is true");
+
+ try
+ {
+ if (!test.IsSynchronized)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ List<object> arrayList = new List<object>();
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify the ArrayList's IsSynchronized property");
+
+ try
+ {
+ if (((ICollection)arrayList).IsSynchronized)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+
+ #endregion
+
+ public static int Main()
+ {
+ ICollectionIsSynchronized test = new ICollectionIsSynchronized();
+
+ TestLibrary.TestFramework.BeginTestCase("Test for Property:System.Collections.ICollection.IsSynchronized");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+public class TestICollectionIsSynchronized : ICollection
+{
+ #region ICollection Members
+
+ private bool m_isSynchronized = false;
+
+ public void setIsSynchronized(bool isSyn)
+ {
+ m_isSynchronized = isSyn;
+ }
+
+ public void CopyTo(Array array, int index)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public int Count
+ {
+ get { throw new System.Exception("The method or operation is not implemented."); }
+ }
+
+ public bool IsSynchronized
+ {
+ get { return m_isSynchronized; }
+ }
+
+ public object SyncRoot
+ {
+ get { throw new System.Exception("The method or operation is not implemented."); }
+ }
+
+ #endregion
+
+ #region IEnumerable Members
+
+ public IEnumerator GetEnumerator()
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/collections/icollection/icollectionsyncroot.cs b/tests/src/CoreMangLib/cti/system/collections/icollection/icollectionsyncroot.cs
new file mode 100644
index 0000000000..b873fa9fc6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/icollection/icollectionsyncroot.cs
@@ -0,0 +1,143 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Collections.ICollection.SyncRoot
+/// </summary>
+public class ICollectionSyncRoot
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestICollectionSyncRoot test = new TestICollectionSyncRoot();
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of SyncRoot property is itself");
+
+ try
+ {
+ if (test.SyncRoot != test)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ int count = 2;
+
+ Array array = new int[count];
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify the array of SyncRoot property is itself");
+
+ try
+ {
+ if (((ICollection)array).SyncRoot != array)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+
+ #endregion
+
+ public static int Main()
+ {
+ ICollectionSyncRoot test = new ICollectionSyncRoot();
+
+ TestLibrary.TestFramework.BeginTestCase("Test for Property:System.Collections.ICollection.SyncRoot");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+public class TestICollectionSyncRoot : ICollection
+{
+ #region ICollection Members
+
+ private bool m_isSynchronized = false;
+
+ public void setIsSynchronized(bool isSyn)
+ {
+ m_isSynchronized = isSyn;
+ }
+
+ public void CopyTo(Array array, int index)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public int Count
+ {
+ get { throw new System.Exception("The method or operation is not implemented."); }
+ }
+
+ public bool IsSynchronized
+ {
+ get { throw new System.Exception("The method or operation is not implemented."); }
+ }
+
+ public object SyncRoot
+ {
+ get { return this; }
+ }
+
+ #endregion
+
+ #region IEnumerable Members
+
+ public IEnumerator GetEnumerator()
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/collections/icomparer/IComparerCompare.csproj b/tests/src/CoreMangLib/cti/system/collections/icomparer/IComparerCompare.csproj
new file mode 100644
index 0000000000..61da2d915d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/icomparer/IComparerCompare.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="icomparercompare.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/icomparer/icomparercompare.cs b/tests/src/CoreMangLib/cti/system/collections/icomparer/icomparercompare.cs
new file mode 100644
index 0000000000..0047c7a144
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/icomparer/icomparercompare.cs
@@ -0,0 +1,281 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Globalization;
+
+/// <summary>
+/// System.Collections.IComparer(object,object)
+/// </summary>
+public class IComparerCompare
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Compare two int value");
+
+ try
+ {
+ Comparer<object> comparer = Comparer<object>.Default ;
+ int a = this.GetInt32(0, Int32.MaxValue);
+ int b = this.GetInt32(a + 1, Int32.MaxValue);
+ int result = comparer.Compare(a, b);
+ if (result >= 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,a is:" + a + "b is:" + b);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Compare two string ");
+
+ try
+ {
+ string a = "hello";
+ string b = "aaaaa";
+ CultureInfo cultureInfo = new CultureInfo("en-US");
+ CompareInfo comparer = cultureInfo.CompareInfo;
+ int result = comparer.Compare(b, a);
+ if (result >= 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Compare two char which are equal");
+
+ try
+ {
+ char a = 'z';
+ char b = 'z';
+ Comparer<char> comparer = Comparer<char>.Default;
+ int result = comparer.Compare(b, a);
+ if (result != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Using custom class deriving from the Icomparer to implement the Compare method");
+
+ try
+ {
+ TestClass testClass = new TestClass();
+ MyClass a = new MyClass(-10);
+ MyClass b = new MyClass(100);
+ int result = testClass.Compare(b, a);
+ if (result <= 0)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Neither a nor b implements the IComparable interface");
+
+ try
+ {
+ Comparer<object> comparer = Comparer<object>.Default;
+ MyClassNotCompareTo a = new MyClassNotCompareTo();
+ MyClassNotCompareTo b = new MyClassNotCompareTo();
+ int result = comparer.Compare(b, a);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The objects to be compared are two different types");
+
+ try
+ {
+ Comparer<object> comparer = Comparer<object>.Default;
+ int a = 10;
+ string b = "boy";
+ int result = comparer.Compare(b, a);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ IComparerCompare test = new IComparerCompare();
+
+ TestLibrary.TestFramework.BeginTestCase("IComparerCompare");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
+public class TestClass : IComparer
+{
+ #region IComparer Members
+
+ public int Compare(object x, object y)
+ {
+ return (x as IComparable).CompareTo(y);
+ }
+
+ #endregion
+}
+public class MyClass : IComparable
+{
+ #region IComparable Members
+
+ public int CompareTo(object obj)
+ {
+ if (this.value < ((MyClass)obj).value)
+ return -1;
+ else
+ {
+ if (this.value > ((MyClass)obj).value)
+ return 1;
+ else
+ {
+ return 0;
+ }
+ }
+ }
+
+ #endregion
+ public int value;
+ public MyClass(int a)
+ {
+ value = a;
+ }
+}
+public class MyClassNotCompareTo
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryAdd.csproj b/tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryAdd.csproj
new file mode 100644
index 0000000000..a9aa539432
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryAdd.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="idictionaryadd.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryClear.csproj b/tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryClear.csproj
new file mode 100644
index 0000000000..460331dfd2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryClear.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="idictionaryclear.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryContains.csproj b/tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryContains.csproj
new file mode 100644
index 0000000000..b36f3854fe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryContains.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="idictionarycontains.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryGetEnumerator.csproj b/tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryGetEnumerator.csproj
new file mode 100644
index 0000000000..a55a4964cf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryGetEnumerator.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="idictionarygetenumerator.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryIsFixedSize.csproj b/tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryIsFixedSize.csproj
new file mode 100644
index 0000000000..1435529934
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryIsFixedSize.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="idictionaryisfixedsize.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryIsReadOnly.csproj b/tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryIsReadOnly.csproj
new file mode 100644
index 0000000000..1c12d2bf48
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryIsReadOnly.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="idictionaryisreadonly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryRemove.csproj b/tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryRemove.csproj
new file mode 100644
index 0000000000..93ca10bbc4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/idictionary/IDictionaryRemove.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="idictionaryremove.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/idictionary/idictionaryadd.cs b/tests/src/CoreMangLib/cti/system/collections/idictionary/idictionaryadd.cs
new file mode 100644
index 0000000000..b0d970d010
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/idictionary/idictionaryadd.cs
@@ -0,0 +1,464 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.IDictionary.Add(System.Object,System.Object)
+/// </summary>
+public class IDictionaryAdd
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the add method of Dictionary<K,V> ");
+
+ try
+ {
+ IDictionary iDictionary = new Dictionary<object,object>();
+ string key = "key";
+ int value = TestLibrary.Generator.GetInt32(-55);
+ iDictionary.Add(key, value);
+ if ((int)iDictionary[key] != value)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The key is a custom class and the value is char");
+
+ try
+ {
+ IDictionary iDictionary = new Dictionary<object,object>();
+ MyKey key = new MyKey();
+ char value = TestLibrary.Generator.GetCharLetter(-55);
+ iDictionary.Add(key, value);
+ if ((char)iDictionary[key] != value)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The value is a null reference");
+
+ try
+ {
+ IDictionary iDictionary = new Dictionary<object,object>();
+ string key = "key";
+ object value = null;
+ iDictionary.Add(key, value);
+ if (iDictionary["key"] != null)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The key is a null reference");
+
+ try
+ {
+ IDictionary iDictionary = new Dictionary<object,object>();
+ string key = null;
+ int value = TestLibrary.Generator.GetInt32(-55);
+ iDictionary.Add(key, value);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: An element with the same key already exists in the IDictionary object");
+
+ try
+ {
+ IDictionary iDictionary = new Dictionary<object,object>();
+ string key = "key";
+ int value1 = TestLibrary.Generator.GetInt32(-55);
+ iDictionary.Add(key, value1);
+ int value2 = TestLibrary.Generator.GetInt32(-55);
+ iDictionary.Add(key, value2);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: The Idictionary is readonly");
+
+ try
+ {
+ IDictionary subHash = new SubHash();
+ string key = "key";
+ int value = TestLibrary.Generator.GetInt32(-55);
+ subHash.Add(key, value);
+ TestLibrary.TestFramework.LogError("105", "The NotSupportedException was not thrown as expected");
+ retVal = false;
+ }
+ catch (NotSupportedException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: The Idictionary has a fixed size");
+
+ try
+ {
+ IDictionary subHash = new SubHash2();
+ string key = "key";
+ int value = TestLibrary.Generator.GetInt32(-55);
+ subHash.Add(key, value);
+ TestLibrary.TestFramework.LogError("107", "The NotSupportedException was not thrown as expected");
+ retVal = false;
+ }
+ catch (NotSupportedException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ IDictionaryAdd test = new IDictionaryAdd();
+
+ TestLibrary.TestFramework.BeginTestCase("IDictionaryAdd");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+public class MyKey
+{
+}
+
+public class SubHash : IDictionary
+{
+
+ #region IDictionary Members
+
+ public void Add(object key, object value)
+ {
+ if (IsFixedSize || IsReadOnly)
+ {
+ throw new NotSupportedException("The IDictionary is readonly or has a fixed size");
+ }
+ else
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ }
+
+ public void Clear()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool Contains(object key)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public IDictionaryEnumerator GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool IsFixedSize
+ {
+ get { return true; }
+ }
+
+ public bool IsReadOnly
+ {
+ get { return true; }
+ }
+
+ public ICollection Keys
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public void Remove(object key)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ICollection Values
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public object this[object key]
+ {
+ get
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ set
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ }
+
+ #endregion
+
+ #region ICollection Members
+
+ public void CopyTo(Array array, int index)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int Count
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public bool IsSynchronized
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public object SyncRoot
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ #endregion
+
+ #region IEnumerable Members
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+}
+
+public class SubHash2: IDictionary
+{
+
+ #region IDictionary Members
+
+ public void Add(object key, object value)
+ {
+ if (IsFixedSize || IsReadOnly)
+ {
+ throw new NotSupportedException("The IDictionary is readonly or has a fixed size");
+ }
+ else
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ }
+
+ public void Clear()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool Contains(object key)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public IDictionaryEnumerator GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool IsFixedSize
+ {
+ get { return true; }
+ }
+
+ public bool IsReadOnly
+ {
+ get { return true; }
+ }
+
+ public ICollection Keys
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public void Remove(object key)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ICollection Values
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public object this[object key]
+ {
+ get
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ set
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ }
+
+ #endregion
+
+ #region ICollection Members
+
+ public void CopyTo(Array array, int index)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int Count
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public bool IsSynchronized
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public object SyncRoot
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ #endregion
+
+ #region IEnumerable Members
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/idictionary/idictionaryclear.cs b/tests/src/CoreMangLib/cti/system/collections/idictionary/idictionaryclear.cs
new file mode 100644
index 0000000000..f3e84a5f91
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/idictionary/idictionaryclear.cs
@@ -0,0 +1,258 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+/// <summary>
+/// System.Collections.IDictionary.Clear()
+/// </summary>
+public class IDictionaryClear
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Using Dictionary<string,Byte> to implemented the clear method");
+
+ try
+ {
+ IDictionary iDictionary = new Dictionary<string,Byte>();
+ string[] key = new string[1000];
+ Byte[] value = new Byte[1000];
+ for (int i = 0; i < 1000; i++)
+ {
+ key[i] = TestLibrary.Generator.GetString(-55, false, 1, 100);
+ }
+ TestLibrary.Generator.GetBytes(-55, value);
+ for (int i = 0; i < 1000; i++)
+ {
+ while (iDictionary.Contains(key[i]))
+ {
+ key[i] = TestLibrary.Generator.GetString(false, 1, 100);
+ }
+ iDictionary.Add(key[i], value[i]);
+ }
+ iDictionary.Clear();
+ if (iDictionary.Count != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Using Dictionary<Int32,Byte> to implemented the clear method");
+
+ try
+ {
+ IDictionary iDictionary = new Dictionary<Int32,Byte>();
+ Int32[] key = new Int32[1000];
+ Byte[] value = new Byte[1000];
+ for (int i = 0; i < 1000; i++)
+ {
+ key[i] = i;
+ }
+ TestLibrary.Generator.GetBytes(-55, value);
+ for (int i = 0; i < 1000; i++)
+ {
+ iDictionary.Add(key[i], value[i]);
+ }
+ iDictionary.Clear();
+ if (iDictionary.Count != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The IDictionary is read-only");
+
+ try
+ {
+ IDictionary iDictionary = new MyIDictionary();
+ iDictionary.Clear();
+ TestLibrary.TestFramework.LogError("101", "The NotSupportedException was not thrown as expected");
+ retVal = false;
+ }
+ catch (NotSupportedException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ IDictionaryClear test = new IDictionaryClear();
+
+ TestLibrary.TestFramework.BeginTestCase("IDictionaryClear");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
+public class MyIDictionary : IDictionary
+{
+
+ #region IDictionary Members
+
+ public void Add(object key, object value)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public void Clear()
+ {
+ if (this.IsReadOnly)
+ {
+ throw new NotSupportedException("The IDictionary is read-only");
+ }
+ else
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ }
+
+ public bool Contains(object key)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public IDictionaryEnumerator GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool IsFixedSize
+ {
+ get { return true; }
+ }
+
+ public bool IsReadOnly
+ {
+ get { return true; }
+ }
+
+ public ICollection Keys
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public void Remove(object key)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ICollection Values
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public object this[object key]
+ {
+ get
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ set
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ }
+
+ #endregion
+
+ #region ICollection Members
+
+ public void CopyTo(Array array, int index)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int Count
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public bool IsSynchronized
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public object SyncRoot
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ #endregion
+
+ #region IEnumerable Members
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/idictionary/idictionarycontains.cs b/tests/src/CoreMangLib/cti/system/collections/idictionary/idictionarycontains.cs
new file mode 100644
index 0000000000..60db8f9eb9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/idictionary/idictionarycontains.cs
@@ -0,0 +1,216 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.IDictionary.Contains(object)
+/// </summary>
+public class IDictionaryContains
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The IDictionary contains the key");
+
+ try
+ {
+ IDictionary iDictionary = new Dictionary<object,object>();
+ Int32[] key = new Int32[1000];
+ Byte[] value = new Byte[1000];
+ for (int i = 0; i < 1000; i++)
+ {
+ key[i] = i;
+ }
+ TestLibrary.Generator.GetBytes(-55, value);
+ for (int i = 0; i < 1000; i++)
+ {
+ iDictionary.Add(key[i], value[i]);
+ }
+ int keyValue = this.GetInt32(0, 1000);
+ if (!iDictionary.Contains(keyValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The key is a string of white space");
+
+ try
+ {
+ IDictionary iDictionary = new Dictionary<object,object>();
+ iDictionary.Add(" ", true);
+ if (!iDictionary.Contains(" "))
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The key is a custom class");
+
+ try
+ {
+ IDictionary iDictionary = new Dictionary<object,object>();
+ MyClass mc = new MyClass();
+ iDictionary.Add(mc, true);
+ if (!iDictionary.Contains(mc))
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: The IDictionary did not contain the key");
+
+ try
+ {
+ IDictionary iDictionary = new Dictionary<object,object>();
+ MyClass mc = new MyClass();
+ iDictionary.Add(mc, true);
+ if (iDictionary.Contains(new MyClass()))
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The argument is a null reference");
+
+ try
+ {
+ IDictionary iDictionary = new Dictionary<object,object>();
+ iDictionary.Contains(null);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ IDictionaryContains test = new IDictionaryContains();
+
+ TestLibrary.TestFramework.BeginTestCase("IDictionaryContains");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/idictionary/idictionarygetenumerator.cs b/tests/src/CoreMangLib/cti/system/collections/idictionary/idictionarygetenumerator.cs
new file mode 100644
index 0000000000..fd5bb3cc35
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/idictionary/idictionarygetenumerator.cs
@@ -0,0 +1,100 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.IDictionary.GetEnumerator()
+/// </summary>
+public class IDictionaryGetEnumerator
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test the method in hashtable class");
+
+ try
+ {
+ IDictionary iDictionary = new Dictionary<object,object>();
+ IDictionaryEnumerator iDictionaryEnumerator = iDictionary.GetEnumerator();
+ if (iDictionaryEnumerator == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test the method in List<T> class");
+
+ try
+ {
+ IDictionary iDictionary = new Dictionary<object,object>();
+ IDictionaryEnumerator iDictionaryEnumerator = iDictionary.GetEnumerator();
+ if (iDictionaryEnumerator == null)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ IDictionaryGetEnumerator test = new IDictionaryGetEnumerator();
+
+ TestLibrary.TestFramework.BeginTestCase("IDictionaryGetEnumerator");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/idictionary/idictionaryisfixedsize.cs b/tests/src/CoreMangLib/cti/system/collections/idictionary/idictionaryisfixedsize.cs
new file mode 100644
index 0000000000..96e68a6807
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/idictionary/idictionaryisfixedsize.cs
@@ -0,0 +1,220 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.IDictionary.IsFixedSize
+/// </summary>
+public class IDictionaryIsFixedSize
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The property is false");
+
+ try
+ {
+ IDictionary iDictionary = new Dictionary<object,object>();
+ if (iDictionary.IsFixedSize)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test the property in List<T>");
+
+ try
+ {
+ IDictionary iDictionary = new Dictionary<object, object>();
+ if (iDictionary.IsFixedSize)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check a custom class derived from the interface");
+
+ try
+ {
+ IDictionary iDictionary = new MyIDictionary();
+ if (!iDictionary.IsFixedSize)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ IDictionaryIsFixedSize test = new IDictionaryIsFixedSize();
+
+ TestLibrary.TestFramework.BeginTestCase("IDictionaryIsFixedSize");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+public class MyIDictionary : IDictionary
+{
+
+ #region IDictionary Members
+
+ public void Add(object key, object value)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public void Clear()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool Contains(object key)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public IDictionaryEnumerator GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool IsFixedSize
+ {
+ get { return true; }
+ }
+
+ public bool IsReadOnly
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public ICollection Keys
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public void Remove(object key)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ICollection Values
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public object this[object key]
+ {
+ get
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ set
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ }
+
+ #endregion
+
+ #region ICollection Members
+
+ public void CopyTo(Array array, int index)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int Count
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public bool IsSynchronized
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public object SyncRoot
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ #endregion
+
+ #region IEnumerable Members
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/idictionary/idictionaryisreadonly.cs b/tests/src/CoreMangLib/cti/system/collections/idictionary/idictionaryisreadonly.cs
new file mode 100644
index 0000000000..b49291a0d3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/idictionary/idictionaryisreadonly.cs
@@ -0,0 +1,220 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.IDictionary.IsReadOnly
+/// </summary>
+public class IDictionaryIsReadOnly
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The property is false");
+
+ try
+ {
+ IDictionary iDictionary = new Dictionary<object,object>();
+ if (iDictionary.IsReadOnly)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test the property in List<T>");
+
+ try
+ {
+ IDictionary iDictionary = new Dictionary<object, object>();
+ if (iDictionary.IsReadOnly)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check a custom class derived from the interface");
+
+ try
+ {
+ IDictionary iDictionary = new MyIDictionary();
+ if (!iDictionary.IsReadOnly)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ IDictionaryIsReadOnly test = new IDictionaryIsReadOnly();
+
+ TestLibrary.TestFramework.BeginTestCase("IDictionaryIsReadOnly");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+public class MyIDictionary : IDictionary
+{
+
+ #region IDictionary Members
+
+ public void Add(object key, object value)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public void Clear()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool Contains(object key)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public IDictionaryEnumerator GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool IsFixedSize
+ {
+ get { return true; }
+ }
+
+ public bool IsReadOnly
+ {
+ get { return true; }
+ }
+
+ public ICollection Keys
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public void Remove(object key)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ICollection Values
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public object this[object key]
+ {
+ get
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ set
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ }
+
+ #endregion
+
+ #region ICollection Members
+
+ public void CopyTo(Array array, int index)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int Count
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public bool IsSynchronized
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public object SyncRoot
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ #endregion
+
+ #region IEnumerable Members
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/idictionary/idictionaryremove.cs b/tests/src/CoreMangLib/cti/system/collections/idictionary/idictionaryremove.cs
new file mode 100644
index 0000000000..8fda69ebc3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/idictionary/idictionaryremove.cs
@@ -0,0 +1,318 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.IDictionary.Remove(object)
+/// </summary>
+public class IDictionaryRemove
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Remove all the element in the IDictionary");
+
+ try
+ {
+ IDictionary iDictionary = new Dictionary<object,object>();
+ Int32[] key = new Int32[1000];
+ Byte[] value = new Byte[1000];
+ for (int i = 0; i < 1000; i++)
+ {
+ key[i] = i;
+ }
+ TestLibrary.Generator.GetBytes(-55, value);
+ for (int i = 0; i < 1000; i++)
+ {
+ iDictionary.Add(key[i], value[i]);
+ }
+ for (int i = 0; i < 1000; i++)
+ {
+ iDictionary.Remove(i);
+ }
+ if (iDictionary.Count != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The key to be remove is a custom class");
+
+ try
+ {
+ IDictionary iDictionary = new Dictionary<object,object>();
+ MyClass mc = new MyClass();
+ int value = TestLibrary.Generator.GetInt32(-55);
+ iDictionary.Add(mc, value);
+ iDictionary.Remove(mc);
+ if (iDictionary.Contains(mc))
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: the IDictionary object does not contain an element ");
+
+ try
+ {
+ IDictionary iDictionary = new Dictionary<object,object>();
+ Int32[] key = new Int32[1000];
+ Byte[] value = new Byte[1000];
+ for (int i = 0; i < 1000; i++)
+ {
+ key[i] = i;
+ }
+ TestLibrary.Generator.GetBytes(-55, value);
+ for (int i = 0; i < 1000; i++)
+ {
+ iDictionary.Add(key[i], value[i]);
+ }
+ iDictionary.Remove("hello");
+ if (iDictionary.Count != 1000)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The object is null reference");
+
+ try
+ {
+ IDictionary iDictionary = new Dictionary<object,object>();
+ object ob = null;
+ iDictionary.Remove(ob);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The IDictionary is readonly");
+
+ try
+ {
+ IDictionary iDictionary = new MyIDictionary();
+ iDictionary.Remove(new MyClass());
+ TestLibrary.TestFramework.LogError("103", "The NotSupportedException was not thrown as expected");
+ retVal = false;
+ }
+ catch (NotSupportedException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ IDictionaryRemove test = new IDictionaryRemove();
+
+ TestLibrary.TestFramework.BeginTestCase("IDictionaryRemove");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+public class MyClass
+{
+}
+
+public class MyIDictionary : IDictionary
+{
+
+ #region IDictionary Members
+
+ public void Add(object key, object value)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public void Clear()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool Contains(object key)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public IDictionaryEnumerator GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool IsFixedSize
+ {
+ get { return true; }
+ }
+
+ public bool IsReadOnly
+ {
+ get { return true; }
+ }
+
+ public ICollection Keys
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public void Remove(object key)
+ {
+ if (IsReadOnly || IsFixedSize)
+ {
+ throw new NotSupportedException("The IDictionary is read-only or has a fixed size");
+ }
+ else
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ }
+
+ public ICollection Values
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public object this[object key]
+ {
+ get
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ set
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ }
+
+ #endregion
+
+ #region ICollection Members
+
+ public void CopyTo(Array array, int index)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int Count
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public bool IsSynchronized
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public object SyncRoot
+ {
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ #endregion
+
+ #region IEnumerable Members
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/ienumerator/IEnumeratorCurrent.csproj b/tests/src/CoreMangLib/cti/system/collections/ienumerator/IEnumeratorCurrent.csproj
new file mode 100644
index 0000000000..2c8320e0a4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/ienumerator/IEnumeratorCurrent.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="ienumeratorcurrent.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/ienumerator/IEnumeratorMoveNext.csproj b/tests/src/CoreMangLib/cti/system/collections/ienumerator/IEnumeratorMoveNext.csproj
new file mode 100644
index 0000000000..27d75fd594
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/ienumerator/IEnumeratorMoveNext.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="ienumeratormovenext.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/ienumerator/IEnumeratorReset.csproj b/tests/src/CoreMangLib/cti/system/collections/ienumerator/IEnumeratorReset.csproj
new file mode 100644
index 0000000000..91b56d59e8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/ienumerator/IEnumeratorReset.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="ienumeratorreset.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/ienumerator/ienumeratorcurrent.cs b/tests/src/CoreMangLib/cti/system/collections/ienumerator/ienumeratorcurrent.cs
new file mode 100644
index 0000000000..8e7f57be7f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/ienumerator/ienumeratorcurrent.cs
@@ -0,0 +1,151 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+
+/// <summary>
+/// System.Collections.IEnumerator.Current
+/// </summary>
+public class IEnumeratorCurrent
+{
+ private const int minLength = 1;
+ private const int maxLength = 10;
+ public static int Main(string[] args)
+ {
+ IEnumeratorCurrent current = new IEnumeratorCurrent();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Collections.IEnumerator.Current property...");
+
+ if (current.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("Check the current show the correct element when index is valid...");
+ char[] strCopy = new char[str.Length];
+ str.CopyTo(0, strCopy, 0, str.Length);
+
+ try
+ {
+ IEnumerator iEnum = ((IEnumerable)str).GetEnumerator();
+
+ iEnum.Reset();
+ for (int i = 0; i < str.Length; i++)
+ {
+ iEnum.MoveNext();
+ if (iEnum.Current.ToString() != strCopy[i].ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "Current show the wrong element when index is valid!!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("Check Current element when index is -1...");
+ char[] strCopy = new char[str.Length];
+ str.CopyTo(0, strCopy, 0, str.Length);
+
+ try
+ {
+ IEnumerator iEnum = ((IEnumerable)str).GetEnumerator();
+
+ iEnum.Reset();
+ char charTest = (char)iEnum.Current;
+
+ TestLibrary.TestFramework.LogError("003", "No exception occurs!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("Check Current element when index is length+1...");
+ char[] strCopy = new char[str.Length];
+ str.CopyTo(0, strCopy, 0, str.Length);
+
+ try
+ {
+ IEnumerator iEnum = ((IEnumerable)str).GetEnumerator();
+
+ iEnum.Reset();
+ for (int i = 0; i < str.Length; i++)
+ {
+ iEnum.MoveNext();
+ if (iEnum.Current.ToString() != strCopy[i].ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "Current show the wrong element!");
+ retVal = false;
+ }
+ }
+ iEnum.MoveNext();
+ char charTest = (char)iEnum.Current;
+
+ TestLibrary.TestFramework.LogError("006", "No exception occurs when fetch current out of range!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception occurs: " + e);
+ return retVal;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/ienumerator/ienumeratormovenext.cs b/tests/src/CoreMangLib/cti/system/collections/ienumerator/ienumeratormovenext.cs
new file mode 100644
index 0000000000..f4edc154bf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/ienumerator/ienumeratormovenext.cs
@@ -0,0 +1,147 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Collections.IEnumerator.MoveNext
+/// </summary>
+public class IEnumeratorMoveNext
+{
+ private const int minLength = 1;
+ private const int maxLength = 10;
+
+ public static int Main(string[] args)
+ {
+ IEnumeratorMoveNext moveNext = new IEnumeratorMoveNext();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Collections.IEnumerator.MoveNext()...");
+
+ if (moveNext.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("Check MoveNext method return valid value...");
+
+ try
+ {
+ IEnumerator iEnum = ((IEnumerable)str).GetEnumerator();
+
+ for (int i = 0; i < str.Length; i++)
+ {
+ if (!iEnum.MoveNext())
+ {
+ TestLibrary.TestFramework.LogError("001", "MoveNext method does not return a valid value when index within range!");
+ retVal = false;
+ }
+ }
+
+ if (iEnum.MoveNext())
+ {
+ TestLibrary.TestFramework.LogError("002", "MoveNext should return false when index is out of range!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Check MoveNext method could pass the correct index...");
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ char[] strCopy = new char[str.Length];
+ str.CopyTo(0, strCopy, 0, str.Length);
+
+ try
+ {
+ IEnumerator iEnum = ((IEnumerable)str).GetEnumerator();
+
+ for (int i = 0; i < str.Length; i++)
+ {
+ iEnum.MoveNext();
+ if (iEnum.Current.ToString() != strCopy[i].ToString())
+ {
+ TestLibrary.TestFramework.LogError("004", "MoveNext method does not navigate to correct index!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify Execute MoveNext method for several times after index to to max+1,verify it always return false...");
+
+ try
+ {
+ IEnumerator iEnum = ((IEnumerable)str).GetEnumerator();
+
+ for (int i = 0; i < str.Length; i++)
+ {
+ if (!iEnum.MoveNext())
+ {
+ TestLibrary.TestFramework.LogError("006", "MoveNext method does not return a valid value when index within range!");
+ retVal = false;
+ }
+ }
+
+ for (int j = 0; j < str.Length; j++)
+ {
+ if (iEnum.MoveNext())
+ {
+ TestLibrary.TestFramework.LogError("007", "MoveNext method does not return a valid value when index within range!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/ienumerator/ienumeratorreset.cs b/tests/src/CoreMangLib/cti/system/collections/ienumerator/ienumeratorreset.cs
new file mode 100644
index 0000000000..a515643783
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/ienumerator/ienumeratorreset.cs
@@ -0,0 +1,192 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+
+/// <summary>
+/// System.Collections.IEnumerator.Reset
+/// </summary>
+public class IEnumeratorReset
+{
+ private const int minLength = 1;
+ private const int maxLength = 10;
+ public static int Main(string[] args)
+ {
+ IEnumeratorReset reset = new IEnumeratorReset();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Collections.IEnumerator.Reset interface...");
+
+ if (reset.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("Check the index point to the right position after execute reset method...");
+ char[] strCopy = new char[str.Length];
+ str.CopyTo(0, strCopy, 0, str.Length);
+
+ try
+ {
+ IEnumerator iEnum = ((IEnumerable)str).GetEnumerator();
+ iEnum.Reset();
+ for (int i = 0; i < str.Length; i++)
+ {
+ iEnum.MoveNext();
+ if ((Char)iEnum.Current != strCopy[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "Reset method can't nevigate to the correct position!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("Check the index point to the right position when index is not at beginning and then execute reset method...");
+ char[] strCopy = new char[str.Length];
+ str.CopyTo(0, strCopy, 0, str.Length);
+
+ try
+ {
+ IEnumerator iEnum = ((IEnumerable)str).GetEnumerator();
+
+ for (int i = 0; i < str.Length; i++)
+ {
+ iEnum.MoveNext();
+ if (iEnum.Current.ToString() != ((object)strCopy[i]).ToString())
+ {
+ TestLibrary.TestFramework.LogError("008", "Reset method can't nevigate to the correct position!");
+ retVal = false;
+ }
+ }
+ iEnum.Reset();
+ for (int i = 0; i < str.Length; i++)
+ {
+ iEnum.MoveNext();
+ if (iEnum.Current.ToString() != ((object)strCopy[i]).ToString())
+ {
+ TestLibrary.TestFramework.LogError("009", "Reset method can't nevigate to the correct position!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unecpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("Check the first index after execute reset method...");
+ char[] strCopy = new char[str.Length];
+ str.CopyTo(0, strCopy, 0, str.Length);
+
+ try
+ {
+ IEnumerator iEnum = ((IEnumerable)str).GetEnumerator();
+
+ iEnum.Reset();
+ char charTest = (char)iEnum.Current;
+
+ TestLibrary.TestFramework.LogError("003", "No exception occurs!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ String str = TestLibrary.Generator.GetString(-55, true, minLength, maxLength);
+ TestLibrary.TestFramework.BeginScenario("Check the last index after traverse the whole enumerator...");
+ char[] strCopy = new char[str.Length];
+ str.CopyTo(0, strCopy, 0, str.Length);
+
+ try
+ {
+ IEnumerator iEnum = ((IEnumerable)str).GetEnumerator();
+
+ iEnum.Reset();
+ for (int i = 0; i < str.Length; i++)
+ {
+ iEnum.MoveNext();
+ if ((Char)iEnum.Current != strCopy[i])
+ {
+ TestLibrary.TestFramework.LogError("005", "Reset method can't nevigate to the correct position!");
+ retVal = false;
+ }
+ }
+ iEnum.MoveNext();
+ char charTest = (char)iEnum.Current;
+
+ TestLibrary.TestFramework.LogError("006", "No exception occurs when fetch current out of range!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception occurs: " + e);
+ return retVal;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/ilist/IListIsFixedSize.csproj b/tests/src/CoreMangLib/cti/system/collections/ilist/IListIsFixedSize.csproj
new file mode 100644
index 0000000000..80e758a1ef
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/ilist/IListIsFixedSize.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="ilistisfixedsize.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/ilist/IListItem.csproj b/tests/src/CoreMangLib/cti/system/collections/ilist/IListItem.csproj
new file mode 100644
index 0000000000..38966d29e4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/ilist/IListItem.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="ilistitem.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/collections/ilist/ilistisfixedsize.cs b/tests/src/CoreMangLib/cti/system/collections/ilist/ilistisfixedsize.cs
new file mode 100644
index 0000000000..af687ae8e1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/ilist/ilistisfixedsize.cs
@@ -0,0 +1,98 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.IList.IsFixedSize
+/// </summary>
+public class IListIsFixedSize
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The property is true");
+
+ try
+ {
+ Array array = new byte[1000];
+ if (!(array as IList).IsFixedSize)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The property is false");
+
+ try
+ {
+ List<object> arrayList = new List<object>();
+ if ((arrayList as IList).IsFixedSize)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ IListIsFixedSize test = new IListIsFixedSize();
+
+ TestLibrary.TestFramework.BeginTestCase("IListIsFixedSize");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/collections/ilist/ilistitem.cs b/tests/src/CoreMangLib/cti/system/collections/ilist/ilistitem.cs
new file mode 100644
index 0000000000..e19f8b68c8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/collections/ilist/ilistitem.cs
@@ -0,0 +1,140 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Collections.IList.Item(Int32)
+/// </summary>
+public class IListItem
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Using item property to get the value in IList");
+
+ try
+ {
+ byte[] byteValue = new byte[1000];
+ TestLibrary.Generator.GetBytes(-55, byteValue);
+ List<byte> arrayList = new List<byte>(byteValue);
+ for (int i = 0; i < 1000; i++)
+ {
+ if ((byte)arrayList[i] != (byte)(byteValue as IList)[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected, i is" + i);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Using index to set the property ");
+
+ try
+ {
+ int[] arrayInt = new int[1000];
+ for (int i = 0; i < 1000; i++)
+ {
+ (arrayInt as IList)[i] = i;
+ }
+ for (int i = 0; i < 1000; i++)
+ {
+ if ((int)arrayInt[i] != i)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected, i is" + i);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The index is invalid");
+
+ try
+ {
+ byte[] byteValue = new byte[100];
+ TestLibrary.Generator.GetBytes(-55, byteValue);
+ byte by = (byte)(byteValue as IList)[-1];
+ TestLibrary.TestFramework.LogError("101", "The IndexOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ IListItem test = new IListItem();
+
+ TestLibrary.TestFramework.BeginTestCase("IListItem");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/comparison/ComparisonBeginInvoke.csproj b/tests/src/CoreMangLib/cti/system/comparison/ComparisonBeginInvoke.csproj
new file mode 100644
index 0000000000..ea1f5b0f2e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/comparison/ComparisonBeginInvoke.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="comparisonbegininvoke.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/comparison/ComparisonEndInvoke.csproj b/tests/src/CoreMangLib/cti/system/comparison/ComparisonEndInvoke.csproj
new file mode 100644
index 0000000000..61432bccd4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/comparison/ComparisonEndInvoke.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="comparisonendinvoke.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/comparison/ComparisonInvoke.csproj b/tests/src/CoreMangLib/cti/system/comparison/ComparisonInvoke.csproj
new file mode 100644
index 0000000000..8537618ee2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/comparison/ComparisonInvoke.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="comparisoninvoke.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/comparison/comparisonbegininvoke.cs b/tests/src/CoreMangLib/cti/system/comparison/comparisonbegininvoke.cs
new file mode 100644
index 0000000000..9f2e4e3684
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/comparison/comparisonbegininvoke.cs
@@ -0,0 +1,96 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+///<summary>
+///System.Comparison.BeginInvoke
+///</summary>
+
+public class ComparisonBeginInvoke
+{
+ private const int c_MIN_ARRAY_LENGTH = 0;
+ private const int c_MAX_ARRAY_LENGTH = byte.MaxValue;
+
+ public static int Main()
+ {
+ ComparisonBeginInvoke testObj = new ComparisonBeginInvoke();
+ TestLibrary.TestFramework.BeginTestCase("for method of Comparison.BeginInvoke");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ char[] charsA, charsB;
+
+ charsA = new char[TestLibrary.Generator.GetInt32(-55) % (c_MAX_ARRAY_LENGTH + 1)];
+ charsB = new char[TestLibrary.Generator.GetInt32(-55) % (c_MAX_ARRAY_LENGTH + 1)];
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: call the method BeginInvoke");
+ try
+ {
+ Comparison<Array> comparison = CompareByLength;
+ IAsyncResult asyncResult = comparison.BeginInvoke(charsA, charsB, null, null);
+ comparison.EndInvoke(asyncResult);
+
+ retVal = false;
+ TestLibrary.TestFramework.LogError("101", "NotSupportedException expected");
+ }
+ catch (NotSupportedException)
+ {
+ //expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+
+ #region Helper methods
+ private int CompareByLength(Array arrayA, Array arrayB)
+ {
+ if (null == arrayA)
+ {
+ if (null == arrayB) return 0;
+ else return -1;
+ }
+ else
+ {
+ if (null == arrayB) return 1;
+ else
+ {
+ if (arrayA.Length == arrayB.Length) return 0;
+ else return (arrayA.Length > arrayB.Length) ? 1 : -1;
+ }
+ }
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/comparison/comparisonendinvoke.cs b/tests/src/CoreMangLib/cti/system/comparison/comparisonendinvoke.cs
new file mode 100644
index 0000000000..fb6a6aab4c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/comparison/comparisonendinvoke.cs
@@ -0,0 +1,98 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+///<summary>
+///System.Comparison.EndInvoke
+///</summary>
+
+public class ComparisonEndInvoke
+{
+ private const int c_MIN_ARRAY_LENGTH = 0;
+ private const int c_MAX_ARRAY_LENGTH = byte.MaxValue;
+
+ public static int Main()
+ {
+ ComparisonEndInvoke testObj = new ComparisonEndInvoke();
+ TestLibrary.TestFramework.BeginTestCase("for method of Comparison.EndInvoke");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ char[] charsA, charsB;
+
+ charsA = new char[TestLibrary.Generator.GetInt32(-55) % (c_MAX_ARRAY_LENGTH + 1)];
+ charsB = new char[TestLibrary.Generator.GetInt32(-55) % (c_MAX_ARRAY_LENGTH + 1)];
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: call the method EndInvoke");
+
+ Comparison<Array> comparison = CompareByLength;
+ IAsyncResult asyncResult = null;
+
+
+ try
+ {
+ comparison.EndInvoke(asyncResult);
+
+ retVal = false;
+ TestLibrary.TestFramework.LogError("003", "NotSupportedException expected");
+ }
+ catch (NotSupportedException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #region Helper methods
+ private int CompareByLength(Array arrayA, Array arrayB)
+ {
+ if (null == arrayA)
+ {
+ if (null == arrayB) return 0;
+ else return -1;
+ }
+ else
+ {
+ if (null == arrayB) return 1;
+ else
+ {
+ if (arrayA.Length == arrayB.Length) return 0;
+ else return (arrayA.Length > arrayB.Length) ? 1 : -1;
+ }
+ }
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/comparison/comparisoninvoke.cs b/tests/src/CoreMangLib/cti/system/comparison/comparisoninvoke.cs
new file mode 100644
index 0000000000..eac78ad16e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/comparison/comparisoninvoke.cs
@@ -0,0 +1,186 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+///<summary>
+///System.Comparison.Invoke
+///</summary>
+
+public class ComparisonInvoke
+{
+ private const int c_MIN_ARRAY_LENGTH = 0;
+ private const int c_MAX_ARRAY_LENGTH = byte.MaxValue;
+
+ public static int Main()
+ {
+ ComparisonInvoke testObj = new ComparisonInvoke();
+ TestLibrary.TestFramework.BeginTestCase("for method of Comparison.Invoke");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ char[] charsA, charsB;
+ int actualValue;
+ int expectedValue;
+
+ charsA = new char[TestLibrary.Generator.GetInt32(-55) % (c_MAX_ARRAY_LENGTH + 1)];
+ charsB = new char[TestLibrary.Generator.GetInt32(-55) % (c_MAX_ARRAY_LENGTH + 1)];
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: call the method BeginInvoke");
+ try
+ {
+ if (charsA.Length == charsB.Length) expectedValue = 0;
+ else expectedValue = (charsA.Length > charsB.Length) ? 1 : -1;
+ Comparison<Array> comparison = CompareByLength;
+ actualValue = comparison.Invoke(charsA, charsB);
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") != ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ int actualValue;
+ int expectedValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: call the method BeginInvoke");
+ try
+ {
+ expectedValue = 0;
+ Comparison<Array> comparison = CompareByLength;
+ actualValue = comparison.Invoke(null as Array, null as Array);
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(" + expectedValue + ") != ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ int actualValue;
+ int expectedValue;
+
+ char[] chars = new char[TestLibrary.Generator.GetByte(-55) % (c_MAX_ARRAY_LENGTH + 1)];
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: call the method BeginInvoke");
+ try
+ {
+ expectedValue = -1;
+ Comparison<Array> comparison = CompareByLength;
+ actualValue = comparison.Invoke(null as Array, chars);
+
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "ExpectedValue(" + expectedValue + ") != ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ int actualValue;
+ int expectedValue;
+
+ char[] chars = new char[TestLibrary.Generator.GetByte(-55) % (c_MAX_ARRAY_LENGTH + 1)];
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: call the method BeginInvoke");
+ try
+ {
+ expectedValue = -1;
+ Comparison<Array> comparison = CompareByLength;
+ actualValue = comparison.Invoke(null as Array, chars);
+
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError("007", "ExpectedValue(" + expectedValue + ") != ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods
+ private int CompareByLength(Array arrayA, Array arrayB)
+ {
+ if (null == arrayA)
+ {
+ if (null == arrayB) return 0;
+ else return -1;
+ }
+ else
+ {
+ if (null == arrayB) return 1;
+ else
+ {
+ if (arrayA.Length == arrayB.Length) return 0;
+ else return (arrayA.Length > arrayB.Length) ? 1 : -1;
+ }
+ }
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/console/ConsoleSetOut_PSC.csproj b/tests/src/CoreMangLib/cti/system/console/ConsoleSetOut_PSC.csproj
new file mode 100644
index 0000000000..ec387143db
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/console/ConsoleSetOut_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="consolesetout.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/console/consoleseterror.cs b/tests/src/CoreMangLib/cti/system/console/consoleseterror.cs
new file mode 100644
index 0000000000..5c1de2f70e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/console/consoleseterror.cs
@@ -0,0 +1,125 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.IO;
+
+[SecuritySafeCritical]
+public class ConsoleSetError
+{
+ #region Private Fields
+ private const string c_TEST_TXT_FILE = "ConsoleSetError.txt";
+ private const int c_MIN_STRING_LENGTH = 1;
+ private const int c_MAX_STRING_LENGTH = 256;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TextWriter saved = Console.Error;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call SetError to set a new standard output");
+
+ try
+ {
+ string randValue = TestLibrary.Generator.GetString(-55, true, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+
+ using (TextWriter reader = new StreamWriter(new FileStream(c_TEST_TXT_FILE, FileMode.Create, FileAccess.Write, FileShare.Read)))
+ {
+ Console.SetError(reader);
+
+ Console.Error.WriteLine(randValue);
+ }
+
+ using (TextReader verifyReader = new StreamReader(new FileStream(c_TEST_TXT_FILE, FileMode.Open, FileAccess.Read, FileShare.Read)))
+ {
+ string actual = verifyReader.ReadLine();
+
+ if (actual != randValue)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Call SetError failed to set a new standard output");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", randValue = " + randValue);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ finally
+ {
+ Console.SetError(saved);
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException should be thrown when newOut is a null reference");
+
+ try
+ {
+ Console.SetError(null);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown when newOut is a null reference");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConsoleSetError test = new ConsoleSetError();
+
+ TestLibrary.TestFramework.BeginTestCase("ConsoleSetError");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/console/consoleseterror_PSC.csproj b/tests/src/CoreMangLib/cti/system/console/consoleseterror_PSC.csproj
new file mode 100644
index 0000000000..4ac1275608
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/console/consoleseterror_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="consoleseterror.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/console/consolesetout.cs b/tests/src/CoreMangLib/cti/system/console/consolesetout.cs
new file mode 100644
index 0000000000..82f9536380
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/console/consolesetout.cs
@@ -0,0 +1,125 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.IO;
+
+[SecuritySafeCritical]
+public class ConsoleSetOut
+{
+ #region Private Fields
+ private const string c_TEST_TXT_FILE = "ConsoleSetOut.txt";
+ private const int c_MIN_STRING_LENGTH = 1;
+ private const int c_MAX_STRING_LENGTH = 256;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TextWriter saved = Console.Out;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call SetOut to set a new standard output");
+
+ try
+ {
+ string randValue = TestLibrary.Generator.GetString(-55, true, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+
+ using (TextWriter reader = new StreamWriter(new FileStream(c_TEST_TXT_FILE, FileMode.Create, FileAccess.Write, FileShare.Read)))
+ {
+ Console.SetOut(reader);
+
+ Console.WriteLine(randValue);
+ }
+
+ using (TextReader verifyReader = new StreamReader(new FileStream(c_TEST_TXT_FILE, FileMode.Open, FileAccess.Read, FileShare.Read)))
+ {
+ string actual = verifyReader.ReadLine();
+
+ if (actual != randValue)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Call SetOut failed to set a new standard output");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", randValue = " + randValue);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ finally
+ {
+ Console.SetOut(saved);
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException should be thrown when newOut is a null reference");
+
+ try
+ {
+ Console.SetOut(null);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown when newOut is a null reference");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConsoleSetOut test = new ConsoleSetOut();
+
+ TestLibrary.TestFramework.BeginTestCase("ConsoleSetOut");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertChangeType2.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertChangeType2.csproj
new file mode 100644
index 0000000000..b1165d4a58
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertChangeType2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="convertchangetype2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertFromBase64CharArray.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertFromBase64CharArray.csproj
new file mode 100644
index 0000000000..9d3468bf17
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertFromBase64CharArray.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="convertfrombase64chararray.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertFromBase64String.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertFromBase64String.csproj
new file mode 100644
index 0000000000..266f8a2de0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertFromBase64String.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="convertfrombase64string.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToBase64CharArray.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToBase64CharArray.csproj
new file mode 100644
index 0000000000..4ddcf79cdb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToBase64CharArray.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttobase64chararray.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToBase64String1.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToBase64String1.csproj
new file mode 100644
index 0000000000..31d6264327
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToBase64String1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttobase64string1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToBase64String2.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToBase64String2.csproj
new file mode 100644
index 0000000000..70339f48b6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToBase64String2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttobase64string2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean.csproj
new file mode 100644
index 0000000000..20991a9651
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoboolean.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean2.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean2.csproj
new file mode 100644
index 0000000000..06bdee1bd4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoboolean2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean4.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean4.csproj
new file mode 100644
index 0000000000..16e31fee69
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoboolean4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean5.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean5.csproj
new file mode 100644
index 0000000000..79118bd26a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoboolean5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean6.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean6.csproj
new file mode 100644
index 0000000000..1ef974f1e7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoboolean6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean7.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean7.csproj
new file mode 100644
index 0000000000..c024a53537
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean7.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoboolean7.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean8.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean8.csproj
new file mode 100644
index 0000000000..b637a91cd8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToBoolean8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoboolean8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToByte.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToByte.csproj
new file mode 100644
index 0000000000..414444f237
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttobyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToByte1.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToByte1.csproj
new file mode 100644
index 0000000000..aabaaa79b4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToByte1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttobyte1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToByte2.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToByte2.csproj
new file mode 100644
index 0000000000..2b636f1389
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToByte2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttobyte2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToByte3.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToByte3.csproj
new file mode 100644
index 0000000000..afcee18894
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToByte3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttobyte3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToByte4.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToByte4.csproj
new file mode 100644
index 0000000000..2941d54b88
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToByte4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttobyte4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToByte6.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToByte6.csproj
new file mode 100644
index 0000000000..45771d9233
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToByte6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttobyte6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToByte7.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToByte7.csproj
new file mode 100644
index 0000000000..be6a1b4b85
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToByte7.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttobyte7.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToByte8.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToByte8.csproj
new file mode 100644
index 0000000000..0d3f4e671c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToByte8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttobyte8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToChar.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar.csproj
new file mode 100644
index 0000000000..eff7080006
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttochar.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToChar10.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar10.csproj
new file mode 100644
index 0000000000..5416e04196
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar10.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttochar10.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToChar11.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar11.csproj
new file mode 100644
index 0000000000..38233a725f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar11.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttochar11.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToChar12.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar12.csproj
new file mode 100644
index 0000000000..4633c90654
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar12.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttochar12.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToChar13.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar13.csproj
new file mode 100644
index 0000000000..2ae3180f01
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar13.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttochar13.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToChar14.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar14.csproj
new file mode 100644
index 0000000000..e6eb313cf3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar14.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttochar14.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToChar15.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar15.csproj
new file mode 100644
index 0000000000..584f2d87e5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar15.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttochar15.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToChar16.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar16.csproj
new file mode 100644
index 0000000000..6aa563a637
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttochar16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToChar5.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar5.csproj
new file mode 100644
index 0000000000..a1d4580be0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttochar5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToChar6.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar6.csproj
new file mode 100644
index 0000000000..4dc807d903
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttochar6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToChar7.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar7.csproj
new file mode 100644
index 0000000000..846e62a268
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar7.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttochar7.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToChar8.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar8.csproj
new file mode 100644
index 0000000000..0c879950bb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttochar8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToChar9.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar9.csproj
new file mode 100644
index 0000000000..38f04395c7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToChar9.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttochar9.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDateTime.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDateTime.csproj
new file mode 100644
index 0000000000..e1745202d6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDateTime.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodatetime.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal.csproj
new file mode 100644
index 0000000000..e9018d71f1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodecimal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal1.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal1.csproj
new file mode 100644
index 0000000000..dab0cb4a54
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodecimal1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal10.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal10.csproj
new file mode 100644
index 0000000000..4475946855
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal10.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodecimal10.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal11.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal11.csproj
new file mode 100644
index 0000000000..1cb7f40864
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal11.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodecimal11.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal12.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal12.csproj
new file mode 100644
index 0000000000..14b642cc71
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal12.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodecimal12.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal13.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal13.csproj
new file mode 100644
index 0000000000..6500853340
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal13.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodecimal13.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal14.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal14.csproj
new file mode 100644
index 0000000000..57fbe35d82
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal14.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodecimal14.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal15.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal15.csproj
new file mode 100644
index 0000000000..4dd42c7c2d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal15.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodecimal15.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal16.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal16.csproj
new file mode 100644
index 0000000000..35c1de872c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodecimal16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal17.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal17.csproj
new file mode 100644
index 0000000000..493e1328be
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal17.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodecimal17.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal18.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal18.csproj
new file mode 100644
index 0000000000..6384fb6b5c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal18.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodecimal18.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal2.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal2.csproj
new file mode 100644
index 0000000000..dda9b1bfb7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodecimal2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal5.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal5.csproj
new file mode 100644
index 0000000000..70078fd209
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodecimal5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal6.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal6.csproj
new file mode 100644
index 0000000000..fff6dbc9ed
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodecimal6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal8.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal8.csproj
new file mode 100644
index 0000000000..b8cf9350c8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodecimal8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal9.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal9.csproj
new file mode 100644
index 0000000000..d8ef79e380
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDecimal9.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodecimal9.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble.csproj
new file mode 100644
index 0000000000..f381e9d1dc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodouble.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble10.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble10.csproj
new file mode 100644
index 0000000000..556ac117f4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble10.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodouble10.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble11.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble11.csproj
new file mode 100644
index 0000000000..b4a8db4608
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble11.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodouble11.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble12.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble12.csproj
new file mode 100644
index 0000000000..58d6adcbd1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble12.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodouble12.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble13.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble13.csproj
new file mode 100644
index 0000000000..8d40685aad
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble13.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodouble13.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble14.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble14.csproj
new file mode 100644
index 0000000000..28928dd6f5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble14.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodouble14.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble15.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble15.csproj
new file mode 100644
index 0000000000..53646f0cfe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble15.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodouble15.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble16.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble16.csproj
new file mode 100644
index 0000000000..df9e21c035
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodouble16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble17.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble17.csproj
new file mode 100644
index 0000000000..71d170a0e6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble17.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodouble17.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble5.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble5.csproj
new file mode 100644
index 0000000000..763d7b5ac8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodouble5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble6.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble6.csproj
new file mode 100644
index 0000000000..20512dff0b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodouble6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble7.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble7.csproj
new file mode 100644
index 0000000000..22a570b2ed
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble7.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodouble7.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble8.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble8.csproj
new file mode 100644
index 0000000000..252538643d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodouble8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble9.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble9.csproj
new file mode 100644
index 0000000000..1d2215e774
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToDouble9.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttodouble9.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16.csproj
new file mode 100644
index 0000000000..a232e3f326
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_1.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_1.csproj
new file mode 100644
index 0000000000..2f59978c30
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint16_1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_10.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_10.csproj
new file mode 100644
index 0000000000..b188ebe6fb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_10.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint16_10.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_11.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_11.csproj
new file mode 100644
index 0000000000..2bee678d42
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_11.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint16_11.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_16.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_16.csproj
new file mode 100644
index 0000000000..c3632380c6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint16_16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_17.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_17.csproj
new file mode 100644
index 0000000000..5e861334b0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_17.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint16_17.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_18.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_18.csproj
new file mode 100644
index 0000000000..db52e2c587
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_18.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint16_18.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_2.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_2.csproj
new file mode 100644
index 0000000000..50001eb01a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint16_2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_3.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_3.csproj
new file mode 100644
index 0000000000..34ace3325f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint16_3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_4.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_4.csproj
new file mode 100644
index 0000000000..3bfe98012a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint16_4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_5.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_5.csproj
new file mode 100644
index 0000000000..8c78f29f60
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint16_5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_6.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_6.csproj
new file mode 100644
index 0000000000..f20cf253e0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint16_6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_7.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_7.csproj
new file mode 100644
index 0000000000..b05546f907
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_7.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint16_7.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_8.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_8.csproj
new file mode 100644
index 0000000000..bbebc045b7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint16_8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_9.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_9.csproj
new file mode 100644
index 0000000000..499a7b3da8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt16_9.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint16_9.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32.csproj
new file mode 100644
index 0000000000..20fc6c6e79
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_1.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_1.csproj
new file mode 100644
index 0000000000..42af6c08bb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint32_1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_10.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_10.csproj
new file mode 100644
index 0000000000..a6272aaa53
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_10.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint32_10.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_11.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_11.csproj
new file mode 100644
index 0000000000..282220fa2b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_11.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint32_11.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_16.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_16.csproj
new file mode 100644
index 0000000000..7d509f278c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint32_16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_17.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_17.csproj
new file mode 100644
index 0000000000..66ef0534f3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_17.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint32_17.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_18.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_18.csproj
new file mode 100644
index 0000000000..85bc030df5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_18.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint32_18.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_2.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_2.csproj
new file mode 100644
index 0000000000..5f669a98ac
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint32_2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_3.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_3.csproj
new file mode 100644
index 0000000000..8c844dcdc2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint32_3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_4.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_4.csproj
new file mode 100644
index 0000000000..7e747e2bdf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint32_4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_5.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_5.csproj
new file mode 100644
index 0000000000..91f6f13f7a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint32_5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_6.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_6.csproj
new file mode 100644
index 0000000000..7d40225b9f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint32_6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_7.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_7.csproj
new file mode 100644
index 0000000000..3ba795096d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_7.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint32_7.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_8.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_8.csproj
new file mode 100644
index 0000000000..59d5b4781e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint32_8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_9.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_9.csproj
new file mode 100644
index 0000000000..47010c0853
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt32_9.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint32_9.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64.csproj
new file mode 100644
index 0000000000..a6d87ef51a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_1.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_1.csproj
new file mode 100644
index 0000000000..b4e1c36214
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint64_1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_10.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_10.csproj
new file mode 100644
index 0000000000..e27072e002
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_10.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint64_10.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_11.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_11.csproj
new file mode 100644
index 0000000000..65bf32dfae
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_11.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint64_11.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_16.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_16.csproj
new file mode 100644
index 0000000000..3b67d0001d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint64_16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_17.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_17.csproj
new file mode 100644
index 0000000000..7376a039d2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_17.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint64_17.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_18.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_18.csproj
new file mode 100644
index 0000000000..5bf26c6cab
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_18.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint64_18.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_2.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_2.csproj
new file mode 100644
index 0000000000..10fe6e30c9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint64_2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_3.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_3.csproj
new file mode 100644
index 0000000000..4708f36c19
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint64_3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_4.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_4.csproj
new file mode 100644
index 0000000000..c852b1ff7d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint64_4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_5.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_5.csproj
new file mode 100644
index 0000000000..41442f6ac1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint64_5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_6.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_6.csproj
new file mode 100644
index 0000000000..b043682eda
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint64_6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_7.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_7.csproj
new file mode 100644
index 0000000000..9b64d58cb4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_7.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint64_7.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_8.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_8.csproj
new file mode 100644
index 0000000000..ea3e6e45b0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint64_8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_9.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_9.csproj
new file mode 100644
index 0000000000..7edd303c93
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToInt64_9.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttoint64_9.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte.csproj
new file mode 100644
index 0000000000..2e6190a557
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttosbyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte1.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte1.csproj
new file mode 100644
index 0000000000..9114e86453
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttosbyte1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte10.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte10.csproj
new file mode 100644
index 0000000000..c1074c1ba7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte10.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttosbyte10.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte11.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte11.csproj
new file mode 100644
index 0000000000..d6e033509e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte11.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttosbyte11.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte16.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte16.csproj
new file mode 100644
index 0000000000..e208a341db
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttosbyte16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte2.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte2.csproj
new file mode 100644
index 0000000000..550437ab73
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttosbyte2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte3.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte3.csproj
new file mode 100644
index 0000000000..0e2dcf73ef
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttosbyte3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte4.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte4.csproj
new file mode 100644
index 0000000000..a2aadfb43e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttosbyte4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte5.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte5.csproj
new file mode 100644
index 0000000000..db6810769f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttosbyte5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte6.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte6.csproj
new file mode 100644
index 0000000000..d93fdab8a1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttosbyte6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte7.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte7.csproj
new file mode 100644
index 0000000000..b876afb018
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte7.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttosbyte7.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte8.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte8.csproj
new file mode 100644
index 0000000000..d2e6010dc2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttosbyte8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte9.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte9.csproj
new file mode 100644
index 0000000000..19af44613f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToSByte9.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttosbyte9.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToSingle.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToSingle.csproj
new file mode 100644
index 0000000000..b517c47ee0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToSingle.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttosingle.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToSingle13.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToSingle13.csproj
new file mode 100644
index 0000000000..c46022278b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToSingle13.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttosingle13.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToSingle14.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToSingle14.csproj
new file mode 100644
index 0000000000..7aef5196fd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToSingle14.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttosingle14.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToSingle15.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToSingle15.csproj
new file mode 100644
index 0000000000..b77e584a8c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToSingle15.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttosingle15.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToSingle16.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToSingle16.csproj
new file mode 100644
index 0000000000..21360f011c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToSingle16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttosingle16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToSingle17.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToSingle17.csproj
new file mode 100644
index 0000000000..aba92daa97
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToSingle17.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttosingle17.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString1.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString1.csproj
new file mode 100644
index 0000000000..7757676a97
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString10.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString10.csproj
new file mode 100644
index 0000000000..4e89780038
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString10.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring10.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString11.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString11.csproj
new file mode 100644
index 0000000000..79b7e2ef0a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString11.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring11.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString12.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString12.csproj
new file mode 100644
index 0000000000..e99c33670d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString12.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring12.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString13.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString13.csproj
new file mode 100644
index 0000000000..b404178b44
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString13.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring13.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString14.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString14.csproj
new file mode 100644
index 0000000000..7155bf2599
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString14.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring14.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString15.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString15.csproj
new file mode 100644
index 0000000000..5bf898643b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString15.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring15.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString16.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString16.csproj
new file mode 100644
index 0000000000..1f63170796
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString17.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString17.csproj
new file mode 100644
index 0000000000..2b8bf2bde7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString17.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring17.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString18.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString18.csproj
new file mode 100644
index 0000000000..e2d556c1e7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString18.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring18.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString19.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString19.csproj
new file mode 100644
index 0000000000..e754a1b7cf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString19.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring19.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString2.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString2.csproj
new file mode 100644
index 0000000000..48768228ba
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString20.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString20.csproj
new file mode 100644
index 0000000000..0e1010fa1d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString20.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring20.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString21.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString21.csproj
new file mode 100644
index 0000000000..ba66942baa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString21.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring21.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString22.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString22.csproj
new file mode 100644
index 0000000000..7d4486ecda
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString22.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring22.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString23.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString23.csproj
new file mode 100644
index 0000000000..06d559f209
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString23.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring23.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString24.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString24.csproj
new file mode 100644
index 0000000000..c5f45926ca
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString24.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring24.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString25.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString25.csproj
new file mode 100644
index 0000000000..70ed585080
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString25.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring25.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString28.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString28.csproj
new file mode 100644
index 0000000000..b0fbab18ec
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString28.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring28.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString29.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString29.csproj
new file mode 100644
index 0000000000..72c72cb36d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString29.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring29.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString30.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString30.csproj
new file mode 100644
index 0000000000..bb4f3e7861
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString30.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring30.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString31.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString31.csproj
new file mode 100644
index 0000000000..1bade83290
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString31.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring31.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString32.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString32.csproj
new file mode 100644
index 0000000000..6cf546ede2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString33.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString33.csproj
new file mode 100644
index 0000000000..52ada24bd3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString33.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring33.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString4.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString4.csproj
new file mode 100644
index 0000000000..164ac5ae59
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString5.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString5.csproj
new file mode 100644
index 0000000000..986dd222d9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString6.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString6.csproj
new file mode 100644
index 0000000000..42f9baa67c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString7.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString7.csproj
new file mode 100644
index 0000000000..d1d53d1749
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString7.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring7.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString8.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString8.csproj
new file mode 100644
index 0000000000..3e03dc98e7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToString9.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToString9.csproj
new file mode 100644
index 0000000000..dc23314636
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToString9.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttostring9.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt16.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt16.csproj
new file mode 100644
index 0000000000..c8ac29b659
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt161.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt161.csproj
new file mode 100644
index 0000000000..f2bf11b816
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt161.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint161.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1610.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1610.csproj
new file mode 100644
index 0000000000..0e3ac497a3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1610.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint1610.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1611.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1611.csproj
new file mode 100644
index 0000000000..bd17bb5495
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1611.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint1611.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1612.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1612.csproj
new file mode 100644
index 0000000000..89e030f454
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1612.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint1612.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1613.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1613.csproj
new file mode 100644
index 0000000000..6910e15b0c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1613.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint1613.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1614.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1614.csproj
new file mode 100644
index 0000000000..4503212cb9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1614.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint1614.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1615.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1615.csproj
new file mode 100644
index 0000000000..10818801f5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1615.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint1615.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1616.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1616.csproj
new file mode 100644
index 0000000000..77a0d2aaeb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1616.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint1616.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1617.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1617.csproj
new file mode 100644
index 0000000000..1c0efa22f9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1617.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint1617.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1618.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1618.csproj
new file mode 100644
index 0000000000..6ef431c2af
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt1618.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint1618.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt162.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt162.csproj
new file mode 100644
index 0000000000..0e8f278f39
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt162.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint162.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt163.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt163.csproj
new file mode 100644
index 0000000000..dd6d6ec25e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt163.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint163.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt164.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt164.csproj
new file mode 100644
index 0000000000..85e6a3b6e6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt164.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint164.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt165.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt165.csproj
new file mode 100644
index 0000000000..80291e8386
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt165.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint165.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt166.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt166.csproj
new file mode 100644
index 0000000000..c8bc382e7b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt166.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint166.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt167.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt167.csproj
new file mode 100644
index 0000000000..eabc4e1929
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt167.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint167.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt168.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt168.csproj
new file mode 100644
index 0000000000..9658880226
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt168.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint168.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt169.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt169.csproj
new file mode 100644
index 0000000000..b367fa4ee5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt169.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint169.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt32.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt32.csproj
new file mode 100644
index 0000000000..f8cbb357a3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt321.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt321.csproj
new file mode 100644
index 0000000000..9864fe1e54
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt321.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint321.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3210.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3210.csproj
new file mode 100644
index 0000000000..00f85c5101
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3210.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint3210.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3211.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3211.csproj
new file mode 100644
index 0000000000..64637b7bed
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3211.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint3211.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3212.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3212.csproj
new file mode 100644
index 0000000000..99739996ab
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3212.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint3212.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3213.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3213.csproj
new file mode 100644
index 0000000000..465c4b43c1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3213.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint3213.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3215.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3215.csproj
new file mode 100644
index 0000000000..864fb40482
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3215.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint3215.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3216.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3216.csproj
new file mode 100644
index 0000000000..381885101f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3216.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint3216.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3217.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3217.csproj
new file mode 100644
index 0000000000..a107a42906
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3217.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint3217.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3218.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3218.csproj
new file mode 100644
index 0000000000..463b6a7dce
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3218.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint3218.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3219.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3219.csproj
new file mode 100644
index 0000000000..95879ed5f2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt3219.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint3219.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt322.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt322.csproj
new file mode 100644
index 0000000000..1a79813174
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt322.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint322.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt323.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt323.csproj
new file mode 100644
index 0000000000..bdef8502b5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt323.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint323.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt324.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt324.csproj
new file mode 100644
index 0000000000..1720a61f4e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt324.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint324.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt325.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt325.csproj
new file mode 100644
index 0000000000..d4afe6d155
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt325.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint325.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt326.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt326.csproj
new file mode 100644
index 0000000000..82648ac04a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt326.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint326.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt327.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt327.csproj
new file mode 100644
index 0000000000..443a6ab628
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt327.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint327.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt328.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt328.csproj
new file mode 100644
index 0000000000..f217236e4d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt328.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint328.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt329.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt329.csproj
new file mode 100644
index 0000000000..bea5f034ad
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt329.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint329.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt64.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt64.csproj
new file mode 100644
index 0000000000..eab1d65dd1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt641.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt641.csproj
new file mode 100644
index 0000000000..6b6627344d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt641.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint641.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6410.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6410.csproj
new file mode 100644
index 0000000000..d2a2025e56
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6410.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint6410.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6411.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6411.csproj
new file mode 100644
index 0000000000..da16daf7ff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6411.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint6411.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6412.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6412.csproj
new file mode 100644
index 0000000000..826b178841
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6412.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint6412.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6413.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6413.csproj
new file mode 100644
index 0000000000..b94253e7e9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6413.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint6413.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6414.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6414.csproj
new file mode 100644
index 0000000000..0067e9b2f9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6414.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint6414.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6415.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6415.csproj
new file mode 100644
index 0000000000..0e70ae3039
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6415.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint6415.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6416.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6416.csproj
new file mode 100644
index 0000000000..be7b7c120f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6416.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint6416.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6417.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6417.csproj
new file mode 100644
index 0000000000..6f947ad531
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6417.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint6417.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6418.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6418.csproj
new file mode 100644
index 0000000000..32c8be804b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt6418.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint6418.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt642.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt642.csproj
new file mode 100644
index 0000000000..03bb77d2f1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt642.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint642.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt643.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt643.csproj
new file mode 100644
index 0000000000..6f58f05545
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt643.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint643.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt644.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt644.csproj
new file mode 100644
index 0000000000..8af74ffe0c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt644.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint644.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt645.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt645.csproj
new file mode 100644
index 0000000000..a22fcc1472
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt645.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint645.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt646.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt646.csproj
new file mode 100644
index 0000000000..e4a858760e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt646.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint646.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt647.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt647.csproj
new file mode 100644
index 0000000000..1962400557
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt647.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint647.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt648.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt648.csproj
new file mode 100644
index 0000000000..bd99d27585
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt648.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint648.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt649.csproj b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt649.csproj
new file mode 100644
index 0000000000..7dc6f687be
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/ConvertToUInt649.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="converttouint649.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/convertchangetype2.cs b/tests/src/CoreMangLib/cti/system/convert/convertchangetype2.cs
new file mode 100644
index 0000000000..f3897a3557
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/convertchangetype2.cs
@@ -0,0 +1,293 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ConvertChangeType1
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ConvertChangeType1 ac = new ConvertChangeType1();
+
+ TestLibrary.TestFramework.BeginTestCase("Convert.ChangeType(Object, Type, IFormatProvider)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+ retVal = PosTest12() && retVal;
+ retVal = PosTest13() && retVal;
+ retVal = PosTest14() && retVal;
+ retVal = PosTest15() && retVal;
+ retVal = PosTest16() && retVal;
+ retVal = PosTest17() && retVal;
+ retVal = PosTest18() && retVal;
+ retVal = PosTest19() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1() { return PosTest(1, true, typeof(Boolean)); }
+ public bool PosTest2() { return PosTest(2, false, typeof(Boolean)); }
+ public bool PosTest3() { return PosTest(3, TestLibrary.Generator.GetByte(-55), typeof(Byte)); }
+ public bool PosTest4() { return PosTest(4, TestLibrary.Generator.GetChar(-55), typeof(Char)); }
+ public bool PosTest5() { return PosTest(5, DateTime.Now, typeof(DateTime)); }
+ public bool PosTest6() { return PosTest(6, new Decimal(TestLibrary.Generator.GetDouble(-55)), typeof(Decimal)); }
+ public bool PosTest7() { return PosTest(7, TestLibrary.Generator.GetDouble(-55), typeof(Double)); }
+ public bool PosTest9() { return PosTest(9, TestLibrary.Generator.GetInt16(-55), typeof(Int16)); }
+ public bool PosTest10() { return PosTest(10, TestLibrary.Generator.GetInt32(-55), typeof(Int32)); }
+ public bool PosTest11() { return PosTest(11, TestLibrary.Generator.GetInt64(-55), typeof(Int64)); }
+ public bool PosTest12() { return PosTest(12, new MyConvertible(), typeof(Object)); }
+ public bool PosTest13() { return PosTest(13, (SByte)TestLibrary.Generator.GetByte(-55), typeof(SByte)); }
+ public bool PosTest14() { return PosTest(14, TestLibrary.Generator.GetSingle(-55), typeof(Single)); }
+ public bool PosTest15() { return PosTest(15, TestLibrary.Generator.GetString(-55, false, c_MIN_STRLEN, c_MAX_STRLEN), typeof(String)); }
+ public bool PosTest16() { return PosTest(16, (UInt16)TestLibrary.Generator.GetInt16(-55), typeof(UInt16)); }
+ public bool PosTest17() { return PosTest(17, (UInt32)TestLibrary.Generator.GetInt32(-55), typeof(UInt32)); }
+ public bool PosTest18() { return PosTest(18, (UInt64)TestLibrary.Generator.GetInt64(-55), typeof(UInt64)); }
+ public bool PosTest19() { return PosTest(19, new object(), typeof(object)); }
+
+ public bool NegTest1() { return NegTest(1, null, typeof(String)); }
+ public bool NegTest2() { return NegTest(2, null, typeof(Object)); }
+ public bool NegTest3() { return NegTest2(3, null, typeof(MyStruct)); }
+ public bool NegTest4() { return NegTest2(4, this, typeof(object)); }
+ public bool NegTest5() { return NegTest3(5, new object(), null); }
+
+ public bool PosTest(int id, object curObject, Type type)
+ {
+ bool retVal = true;
+ Object newObject;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ChangeType(Object, Type, IFormatProvider) (type:"+GetType(curObject)+" "+GetType(type)+")");
+
+ try
+ {
+ newObject = Convert.ChangeType(curObject, type, null);
+
+ // check type
+ switch(type.ToString())
+ {
+ case "System.Boolean":
+ retVal = (typeof(System.Boolean) == GetType(newObject)) && retVal;
+ break;
+ case "System.Byte":
+ retVal = (typeof(System.Byte) == GetType(newObject)) && retVal;
+ break;
+ case "System.Char":
+ retVal = (typeof(System.Char) == GetType(newObject)) && retVal;
+ break;
+ case "System.DateTime":
+ retVal = (typeof(System.DateTime) == GetType(newObject)) && retVal;
+ break;
+ case "System.Decimal":
+ retVal = (typeof(System.Decimal) == GetType(newObject)) && retVal;
+ break;
+ case "System.Double":
+ retVal = (typeof(System.Double) == GetType(newObject)) && retVal;
+ break;
+ case "System.Int16":
+ retVal = (typeof(System.Int16) == GetType(newObject)) && retVal;
+ break;
+ case "System.Int32":
+ retVal = (typeof(System.Int32) == GetType(newObject)) && retVal;
+ break;
+ case "System.Int64":
+ retVal = (typeof(System.Int64) == GetType(newObject)) && retVal;
+ break;
+ case "System.Object":
+ break;
+ case "System.SByte":
+ retVal = (typeof(System.SByte) == GetType(newObject)) && retVal;
+ break;
+ case "System.Single":
+ retVal = (typeof(System.Single) == GetType(newObject)) && retVal;
+ break;
+ case "System.String":
+ retVal = (typeof(System.String) == GetType(newObject)) && retVal;
+ break;
+ case "System.UInt16":
+ retVal = (typeof(System.UInt16) == GetType(newObject)) && retVal;
+ break;
+ case "System.UInt32":
+ retVal = (typeof(System.UInt32) == GetType(newObject)) && retVal;
+ break;
+ case "System.UInt64":
+ retVal = (typeof(System.UInt64) == GetType(newObject)) && retVal;
+ break;
+ default:
+ retVal = false;
+ break;
+ }
+
+ if (!retVal)
+ {
+ TestLibrary.TestFramework.LogError("000", "Type mismatch: Expected(" + type.ToString() + ") Actual(" + GetType(newObject) + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest(int id, object curObject, Type type)
+ {
+ bool retVal = true;
+ IFormatProvider myfp;
+ object newType;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Convert.ChangeType(Object, Type, IFormatProvider) (type:"+GetType(curObject)+" "+GetType(type)+")");
+
+ try
+ {
+ myfp = null;
+ newType = Convert.ChangeType(curObject, type, myfp);
+
+ if (null != newType)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected value: Expected(null) Actual(" + newType + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2(int id, object curObject, Type type)
+ {
+ bool retVal = true;
+ IFormatProvider myfp;
+ object newType;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Convert.ChangeType(Object, Type, IFormatProvider) (type:"+GetType(curObject)+" "+GetType(type)+")");
+
+ try
+ {
+ myfp = null;
+ newType = Convert.ChangeType(curObject, type, myfp);
+
+ TestLibrary.TestFramework.LogError("004", "Exception expected");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3(int id, object curObject, Type type)
+ {
+ bool retVal = true;
+ IFormatProvider myfp;
+ object newType;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Convert.ChangeType(Object, Type, IFormatProvider) (type:"+GetType(curObject)+" "+GetType(type)+")");
+
+ try
+ {
+ myfp = null;
+ newType = Convert.ChangeType(curObject, type, myfp);
+
+ TestLibrary.TestFramework.LogError("006", "Exception expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public Type GetType(object o)
+ {
+ if (null != o) return o.GetType();
+
+ return null;
+ }
+
+ public struct MyStruct {}
+
+ public class MyConvertible : IConvertible
+ {
+ public TypeCode GetTypeCode() { return TypeCode.Empty; }
+ public Boolean ToBoolean(System.IFormatProvider f) { return true; }
+ public Char ToChar(System.IFormatProvider f) { return ' '; }
+ public SByte ToSByte(System.IFormatProvider f) { return 1; }
+ public Byte ToByte(System.IFormatProvider f) { return 1; }
+ public Int16 ToInt16(System.IFormatProvider f) { return 1; }
+ public UInt16 ToUInt16(System.IFormatProvider f) { return 1; }
+ public Int32 ToInt32(System.IFormatProvider f) { return 1; }
+ public UInt32 ToUInt32(System.IFormatProvider f) { return 1; }
+ public Int64 ToInt64(System.IFormatProvider f) { return 1; }
+ public UInt64 ToUInt64(System.IFormatProvider f) { return 1; }
+ public Single ToSingle(System.IFormatProvider f) { return 1; }
+ public Double ToDouble(System.IFormatProvider f) { return 1; }
+ public Decimal ToDecimal(System.IFormatProvider f) { return 1; }
+ public DateTime ToDateTime(System.IFormatProvider f) { return DateTime.Now; }
+ public String ToString(System.IFormatProvider f) { return ""; }
+ public object ToType(System.Type t, System.IFormatProvider f) { return new object(); }
+
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/convert/convertfrombase64chararray.cs b/tests/src/CoreMangLib/cti/system/convert/convertfrombase64chararray.cs
new file mode 100644
index 0000000000..b33e33c38b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/convertfrombase64chararray.cs
@@ -0,0 +1,310 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// FromBase64CharArray(System.Char[],System.Int32,System.Int32)
+/// </summary>
+
+public class ConvertFromBase64CharArray
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest2b() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method FromBase64CharArray .");
+
+ try
+ {
+ byte[] byteArray1 = new byte[256];
+ byte[] byteArray2 = new byte[256];
+ char[] charArray = new char[352];
+ int charArrayLength;
+
+ for (int x = 0; x < byteArray1.Length; x++)
+ byteArray1[x] = (byte)x;
+
+ charArrayLength = Convert.ToBase64CharArray(
+ byteArray1,
+ 0,
+ byteArray1.Length,
+ charArray,
+ 0);
+
+ byteArray2 = Convert.FromBase64CharArray(charArray, 0, charArrayLength);
+
+ if (!ArraysAreEqual(byteArray1,byteArray2))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ChangeType Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: inArray is a null reference.");
+
+ try
+ {
+ byte[] byteArray1 = new byte[256];
+ byte[] byteArray2 = new byte[256];
+ char[] charArray = new char[352];
+ int charArrayLength;
+
+ for (int x = 0; x < byteArray1.Length; x++)
+ byteArray1[x] = (byte)x;
+
+ charArrayLength = Convert.ToBase64CharArray(
+ byteArray1,
+ 0,
+ byteArray1.Length,
+ charArray,
+ 0);
+
+ charArray = null;
+ byteArray2 = Convert.FromBase64CharArray(charArray, 0, charArrayLength);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: offset is less than 0.");
+
+ try
+ {
+ byte[] byteArray1 = new byte[256];
+ byte[] byteArray2 = new byte[256];
+ char[] charArray = new char[352];
+ int charArrayLength;
+
+ for (int x = 0; x < byteArray1.Length; x++)
+ byteArray1[x] = (byte)x;
+
+ charArrayLength = Convert.ToBase64CharArray(
+ byteArray1,
+ 0,
+ byteArray1.Length,
+ charArray,
+ 0);
+
+ byteArray2 = Convert.FromBase64CharArray(charArray, -1, charArrayLength);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentOutOfRangeException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2b()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2b: length is less than 0.");
+
+ try
+ {
+ byte[] byteArray1 = new byte[256];
+ byte[] byteArray2 = new byte[256];
+ char[] charArray = new char[352];
+ int charArrayLength;
+
+ for (int x = 0; x < byteArray1.Length; x++)
+ byteArray1[x] = (byte)x;
+
+ charArrayLength = Convert.ToBase64CharArray(
+ byteArray1,
+ 0,
+ byteArray1.Length,
+ charArray,
+ 0);
+
+ byteArray2 = Convert.FromBase64CharArray(charArray, 0, -1);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentOutOfRangeException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: offset plus length indicates a position not within inArray.");
+
+ try
+ {
+ byte[] byteArray1 = new byte[256];
+ byte[] byteArray2 = new byte[256];
+ char[] charArray = new char[352];
+ int charArrayLength;
+
+ for (int x = 0; x < byteArray1.Length; x++)
+ byteArray1[x] = (byte)x;
+
+ charArrayLength = Convert.ToBase64CharArray(
+ byteArray1,
+ 0,
+ byteArray1.Length,
+ charArray,
+ 0);
+
+ byteArray2 = Convert.FromBase64CharArray(charArray, 0, charArrayLength + 10);
+
+ TestLibrary.TestFramework.LogError("103.1", "ArgumentOutOfRangeException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: The format of inArray is invalid. inArray contains a non-base 64 "+
+ "character, more than two padding characters, or a non-white space character "+
+ "among the padding characters.");
+
+ try
+ {
+ byte[] byteArray1 = new byte[256];
+ byte[] byteArray2 = new byte[256];
+ char[] charArray = new char[352];
+ int charArrayLength;
+
+ for (int x = 0; x < byteArray1.Length; x++)
+ byteArray1[x] = (byte)x;
+
+ charArrayLength = Convert.ToBase64CharArray(
+ byteArray1,
+ 0,
+ byteArray1.Length,
+ charArray,
+ 0);
+
+ charArray = new char[352 + 1];
+ byteArray2 = Convert.FromBase64CharArray(charArray, 0, charArrayLength);
+
+ TestLibrary.TestFramework.LogError("104.1", "FormatException is not thrown.");
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertFromBase64CharArray test = new ConvertFromBase64CharArray();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertFromBase64CharArray");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Method
+ private bool ArraysAreEqual(byte[] a1, byte[] a2)
+ {
+ if (a1.Length != a2.Length) return false;
+ for (int i = 0; i < a1.Length; i++)
+ if (a1[i] != a2[i]) return false;
+ return true;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/convertfrombase64string.cs b/tests/src/CoreMangLib/cti/system/convert/convertfrombase64string.cs
new file mode 100644
index 0000000000..f6b3927147
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/convertfrombase64string.cs
@@ -0,0 +1,123 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using TestLibrary;
+
+public class ConvertFromBase64String
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+
+ public static int Main()
+ {
+ ConvertFromBase64String ac = new ConvertFromBase64String();
+
+ TestLibrary.TestFramework.BeginTestCase("FromBase64String(string)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+ //id inArray length offsetIn exception
+ public bool PosTest1() { return PosTest("TEST", new byte[] { 76, 68, 147 }, "00A"); }
+ public bool PosTest2()
+ {
+ Random numGen = new Random(-55);
+ bool ret = true;
+ for (int i = 0; i < 1000; i++)
+ {
+ int byteLen = numGen.Next(c_MIN_SIZE, c_MAX_SIZE);
+ byte[] expected = new byte[byteLen];
+ Generator.GetBytes(-55, expected);
+ string testStr = Convert.ToBase64String(expected);
+ ret &= PosTest(testStr, expected, "00B");
+ }
+ return ret;
+ }
+ public bool PosTest3() { return PosTest("", new byte[0], "00C"); }
+ public bool PosTest4() { return PosTest(" ", new byte[0], "00D"); }
+ public bool PosTest5() { return PosTest(" T E ST", new byte[] { 76, 68, 147 }, "00E"); }
+
+ public bool NegTest1() { return NegTest(null, typeof(ArgumentNullException), "00F"); }
+ public bool NegTest2() { return NegTest("Tes", typeof(FormatException), "00G"); }
+ public bool NegTest3() { return NegTest("Tes\u00C0", typeof(FormatException), "00H"); }
+
+ public bool PosTest(string input, byte[] expected, string id)
+ {
+ bool retVal = true;
+ TestFramework.BeginScenario("\nPosTest " + id + ": FromBase64String");
+ try
+ {
+ byte[] output = Convert.FromBase64String(input);
+ if (!Utilities.CompareBytes(output, expected))
+ {
+ TestFramework.LogInformation("Input string: " + input);
+ TestFramework.LogError("001", "Conversion not correct. Expect: " + Utilities.ByteArrayToString(expected) + ", Actual: " + Utilities.ByteArrayToString(output));
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e.ToString());
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool NegTest(string input, Type exception, string id)
+ {
+ bool retVal = true;
+ TestFramework.BeginScenario("NegTest " + id + ": FromBase64String()");
+ try
+ {
+ byte[] output = Convert.FromBase64String(input);
+ TestFramework.LogError("003", "Expected exception not thrown!");
+ retVal = false;
+ }
+ catch (Exception e)
+ {
+ if (e.GetType() != exception)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e.ToString());
+ retVal = false;
+ }
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttobase64chararray.cs b/tests/src/CoreMangLib/cti/system/convert/converttobase64chararray.cs
new file mode 100644
index 0000000000..b071c18033
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttobase64chararray.cs
@@ -0,0 +1,148 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ConvertToBase64CharArray
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+
+ public static int Main()
+ {
+ ConvertToBase64CharArray ac = new ConvertToBase64CharArray();
+
+ TestLibrary.TestFramework.BeginTestCase("ToBase64CharArray(byte[], int, int, char[], int)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+
+ return retVal;
+ }
+
+ //id inArray outArray length offsetIn offsetOut exception
+ public bool NegTest1() { return NegTest(1, null, null, 0, 0, 0, typeof(System.ArgumentNullException)); }
+ public bool NegTest2() { return NegTest(2, new byte[0], null, 0, 0, 0, typeof(System.ArgumentNullException)); }
+ public bool NegTest3() { return NegTest(3, new byte[0], new char[0], -1, 0, 0, typeof(System.ArgumentOutOfRangeException)); }
+ public bool NegTest4() { return NegTest(4, new byte[0], new char[0], 0, -1, 0, typeof(System.ArgumentOutOfRangeException)); }
+ public bool NegTest5() { return NegTest(5, new byte[0], new char[0], 0, 0, -1, typeof(System.ArgumentOutOfRangeException)); }
+ public bool NegTest6() { return NegTest(6, new byte[0], new char[0], 0, 10, 0, typeof(System.ArgumentOutOfRangeException)); }
+ public bool NegTest7() { return NegTest(7, new byte[1], new char[1], 10, 0, 10, typeof(System.ArgumentOutOfRangeException)); }
+ public bool NegTest8() { return NegTest(8, new byte[1], new char[1], 1, 0, 10, typeof(System.ArgumentOutOfRangeException)); }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ byte[] array;
+ char[] outArray;
+ int numBytes;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ToBase64CharArray(byte[], int, int, char[], int)");
+
+ try
+ {
+ array = new byte[ (TestLibrary.Generator.GetInt32(-55) % c_MAX_SIZE) + c_MIN_SIZE ];
+ outArray = new char[ array.Length*3 ];
+
+ // fill the array
+ TestLibrary.Generator.GetBytes(-55, array);
+
+ numBytes = Convert.ToBase64CharArray(array, 0, array.Length, outArray, 0);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ byte[] array;
+ char[] outArray;
+ int numBytes;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: ToBase64CharArray(byte[], int, int, char[], int) zero length");
+
+ try
+ {
+ array = new byte[ 0 ];
+ outArray = new char[ array.Length ];
+
+ numBytes = Convert.ToBase64CharArray(array, 0, array.Length, outArray, 0);
+
+ if (numBytes != array.Length)
+ {
+ TestLibrary.TestFramework.LogError("001", "In array length mismatch: Expected(" + array.Length + ") Actual(" + numBytes + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest(int id, byte[] inArray, char[] outArray, int length, int offsetIn, int offsetOut, Type exception)
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": ToBase64CharArray(byte[], int, int, char[], int) (len:"+length+" in:"+offsetIn+" out:"+offsetOut+" ex:"+exception+")");
+
+ try
+ {
+ Convert.ToBase64CharArray(inArray, offsetIn, length, outArray, offsetOut);
+
+ TestLibrary.TestFramework.LogError("003", "Exception expected");
+ retVal = false;
+ }
+ catch (Exception e)
+ {
+ if (exception != e.GetType())
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttobase64string1.cs b/tests/src/CoreMangLib/cti/system/convert/converttobase64string1.cs
new file mode 100644
index 0000000000..cc08a8e83f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttobase64string1.cs
@@ -0,0 +1,136 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ConvertToBase64String1
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+
+ public static int Main()
+ {
+ ConvertToBase64String1 ac = new ConvertToBase64String1();
+
+ TestLibrary.TestFramework.BeginTestCase("ToBase64String(byte[], int, int)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+ //id inArray length offsetIn exception
+ public bool NegTest1() { return NegTest(1, null, 0, 0, typeof(System.ArgumentNullException)); }
+ public bool NegTest2() { return NegTest(2, new byte[0], -1, 0, typeof(System.ArgumentOutOfRangeException)); }
+ public bool NegTest3() { return NegTest(3, new byte[0], 0, -1, typeof(System.ArgumentOutOfRangeException)); }
+ public bool NegTest4() { return NegTest(4, new byte[0], 0, 1, typeof(System.ArgumentOutOfRangeException)); }
+ public bool NegTest5() { return NegTest(5, new byte[0], 1, 0, typeof(System.ArgumentOutOfRangeException)); }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ byte[] array;
+ string str;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ToBase64String(byte[], int, int)");
+
+ try
+ {
+ array = new byte[ (TestLibrary.Generator.GetInt32(-55) % c_MAX_SIZE) + c_MIN_SIZE ];
+
+ // fill the array
+ TestLibrary.Generator.GetBytes(-55, array);
+
+ str = Convert.ToBase64String(array, 0, array.Length);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ byte[] array;
+ string str;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: ToBase64String(byte[], int, int) zero length");
+
+ try
+ {
+ array = new byte[ 0 ];
+ str = Convert.ToBase64String(array, 0, array.Length);
+
+ if (String.Empty != str)
+ {
+ TestLibrary.TestFramework.LogError("001", "In array length mismatch: Expected(String.Empty) Actual(" + str + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest(int id, byte[] inArray, int length, int offsetIn, Type exception)
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": ToBase64String(byte[], int, int) (len:"+length+" in:"+offsetIn+" ex:"+exception+")");
+
+ try
+ {
+ Convert.ToBase64String(inArray, offsetIn, length);
+
+ TestLibrary.TestFramework.LogError("003", "Exception expected");
+ retVal = false;
+ }
+ catch (Exception e)
+ {
+ if (exception != e.GetType())
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttobase64string2.cs b/tests/src/CoreMangLib/cti/system/convert/converttobase64string2.cs
new file mode 100644
index 0000000000..d6dcd0aab9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttobase64string2.cs
@@ -0,0 +1,128 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ConvertToBase64String2
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+
+ public static int Main()
+ {
+ ConvertToBase64String2 ac = new ConvertToBase64String2();
+
+ TestLibrary.TestFramework.BeginTestCase("ToBase64String(byte[])");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+ //id inArray exception
+ public bool NegTest1() { return NegTest(1, null, typeof(System.ArgumentNullException)); }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ byte[] array;
+ string str;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ToBase64String(byte[])");
+
+ try
+ {
+ array = new byte[ (TestLibrary.Generator.GetInt32(-55) % c_MAX_SIZE) + c_MIN_SIZE ];
+
+ // fill the array
+ TestLibrary.Generator.GetBytes(-55, array);
+
+ str = Convert.ToBase64String(array);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("000", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ byte[] array;
+ string str;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: ToBase64String(byte[]) zero length");
+
+ try
+ {
+ array = new byte[ 0 ];
+ str = Convert.ToBase64String(array);
+
+ if (String.Empty != str)
+ {
+ TestLibrary.TestFramework.LogError("001", "In array length mismatch: Expected(String.Empty) Actual(" + str + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest(int id, byte[] inArray, Type exception)
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": ToBase64String(byte[]) (ex:"+exception+")");
+
+ try
+ {
+ Convert.ToBase64String(inArray);
+
+ TestLibrary.TestFramework.LogError("003", "Exception expected");
+ retVal = false;
+ }
+ catch (Exception e)
+ {
+ if (exception != e.GetType())
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoboolean.cs b/tests/src/CoreMangLib/cti/system/convert/converttoboolean.cs
new file mode 100644
index 0000000000..fcf7629fab
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoboolean.cs
@@ -0,0 +1,127 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ConvertBoolean
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ConvertBoolean ac = new ConvertBoolean();
+
+ TestLibrary.TestFramework.BeginTestCase("Convert.ToBoolean(...)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ // public static bool ToBoolean(Object value)
+ public bool PosTest1() { return PosTest<object>(1, (object)true, true); }
+ public bool PosTest2() { return PosTest<object>(2, (object)false, false); }
+ public bool PosTest3() { return PosTest<object>(3, (object)null, false); }
+
+ // public static bool ToBoolean(String value) {
+ public bool PosTest4() { return PosTest<string>(4, "True", true); }
+ public bool PosTest5() { return PosTest<string>(5, "False", false); }
+ public bool PosTest6() { return PosTest<string>(6, null, false); }
+
+ public bool NegTest1() { return NegTest<char>(1, 'c', typeof(System.InvalidCastException)); }
+
+ public bool PosTest<T>(int id, T curValue, Boolean expValue)
+ {
+ bool retVal = true;
+ Boolean newValue;
+ IFormatProvider fp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToBoolean(...) (curValue:"+typeof(T)+ " " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToBoolean(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("000", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ fp = null;
+ newValue = Convert.ToBoolean(curValue, fp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest<T>(int id, T curValue, Type exception)
+ {
+ bool retVal = true;
+ Boolean newValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Convert.ToBoolean(...) (curValue:"+typeof(T)+ " " +curValue+")");
+
+ try
+ {
+ newValue = Convert.ToBoolean(curValue);
+
+ TestLibrary.TestFramework.LogError("003", "Exception expected");
+ retVal = false;
+ }
+ catch (Exception e)
+ {
+ if (e.GetType() != exception)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoboolean2.cs b/tests/src/CoreMangLib/cti/system/convert/converttoboolean2.cs
new file mode 100644
index 0000000000..79be8a3db3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoboolean2.cs
@@ -0,0 +1,149 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToBoolean(Byte)
+/// Converts the value of the specified 8-bit unsigned integer to an equivalent Boolean value.
+/// </summary>
+public class ConvertToBoolean
+{
+ public static int Main()
+ {
+ ConvertToBoolean testObj = new ConvertToBoolean();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToBoolean(Byte)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ byte b;
+ bool expectedValue;
+ bool actualValue;
+
+ b = TestLibrary.Generator.GetByte(-55);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Random byte value between 0 and byte.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToBoolean(b);
+ expectedValue = 0 != b;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of byte value " + b + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe byte value is " + b;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ byte b;
+ bool expectedValue;
+ bool actualValue;
+
+ b = byte.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: value is byte.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToBoolean(b);
+ expectedValue = 0 != b;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of byte value " + b + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe byte value is " + b;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ byte b;
+ bool expectedValue;
+ bool actualValue;
+
+ b = byte.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: value is byte.MinValue.");
+ try
+ {
+ actualValue = Convert.ToBoolean(b);
+ expectedValue = 0 != b;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of byte integer " + b + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe byte value is " + b;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoboolean4.cs b/tests/src/CoreMangLib/cti/system/convert/converttoboolean4.cs
new file mode 100644
index 0000000000..d0f71b737c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoboolean4.cs
@@ -0,0 +1,221 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToBoolean(Decimal)
+/// Converts the value of the specified decimal value to an equivalent Boolean value.
+/// </summary>
+public class ConvertToBoolean
+{
+ public static int Main()
+ {
+ ConvertToBoolean testObj = new ConvertToBoolean();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToBoolean(Decimal)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ decimal d;
+ bool expectedValue;
+ bool actualValue;
+
+ d = (decimal)TestLibrary.Generator.GetSingle(-55);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Random decimal value between 0.0 and 1.0.");
+ try
+ {
+ actualValue = Convert.ToBoolean(d);
+ expectedValue = 0 != d;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of decimal value " + d + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe decimal value is " + d;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ decimal d;
+ bool expectedValue;
+ bool actualValue;
+
+ d = decimal.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: value is decimal.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToBoolean(d);
+ expectedValue = 0 != d;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of decimal value " + d + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe decimal value is " + d;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ decimal d;
+ bool expectedValue;
+ bool actualValue;
+
+ d = decimal.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: value is decimal.MinValue.");
+ try
+ {
+ actualValue = Convert.ToBoolean(d);
+ expectedValue = 0 != d;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of decimal integer " + d + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe decimal value is " + d;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ decimal d;
+ bool expectedValue;
+ bool actualValue;
+
+ d = decimal.Zero;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: value is decimal.Zero.");
+ try
+ {
+ actualValue = Convert.ToBoolean(d);
+ expectedValue = 0 != d;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of decimal integer " + d + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("007", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe decimal value is " + d;
+ TestLibrary.TestFramework.LogError("008", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ decimal d;
+ bool expectedValue;
+ bool actualValue;
+
+ d = -1 * (decimal)TestLibrary.Generator.GetSingle(-55);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Random decimal value between -0.0 and -1.0.");
+ try
+ {
+ actualValue = Convert.ToBoolean(d);
+ expectedValue = 0 != d;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of decimal integer " + d + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("009", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe decimal value is " + d;
+ TestLibrary.TestFramework.LogError("010", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoboolean5.cs b/tests/src/CoreMangLib/cti/system/convert/converttoboolean5.cs
new file mode 100644
index 0000000000..8b9af8adc7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoboolean5.cs
@@ -0,0 +1,365 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToBoolean(Double)
+/// Converts the value of the specified double float value to an equivalent Boolean value.
+/// </summary>
+public class ConvertToBoolean
+{
+ public static int Main()
+ {
+ ConvertToBoolean testObj = new ConvertToBoolean();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToBoolean(Double)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ double d;
+ bool expectedValue;
+ bool actualValue;
+
+ d = TestLibrary.Generator.GetDouble(-55);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Random double value between 0.0 and 1.0.");
+ try
+ {
+ actualValue = Convert.ToBoolean(d);
+ expectedValue = 0 != d;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of double value " + d + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe double value is " + d;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ double d;
+ bool expectedValue;
+ bool actualValue;
+
+ d = double.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: value is double.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToBoolean(d);
+ expectedValue = 0 != d;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of double value " + d + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe double value is " + d;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ double d;
+ bool expectedValue;
+ bool actualValue;
+
+ d = double.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: value is double.MinValue.");
+ try
+ {
+ actualValue = Convert.ToBoolean(d);
+ expectedValue = 0 != d;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of double value " + d + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe double value is " + d;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ double d;
+ bool expectedValue;
+ bool actualValue;
+
+ d = double.Epsilon;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: value is double.Epsilon.");
+ try
+ {
+ actualValue = Convert.ToBoolean(d);
+ expectedValue = 0 != d;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of double value " + d + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("007", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe double value is " + d;
+ TestLibrary.TestFramework.LogError("008", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ double d;
+ bool expectedValue;
+ bool actualValue;
+
+ d = -1 * TestLibrary.Generator.GetDouble(-55);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Random double value between -0.0 and -1.0.");
+ try
+ {
+ actualValue = Convert.ToBoolean(d);
+ expectedValue = 0 != d;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of double value " + d + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("009", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe double value is " + d;
+ TestLibrary.TestFramework.LogError("010", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ double d;
+ bool expectedValue;
+ bool actualValue;
+
+ d = double.NaN;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: value is double.NaN.");
+ try
+ {
+ actualValue = Convert.ToBoolean(d);
+ expectedValue = 0 != d;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of double value " + d + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("011", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe double value is " + d;
+ TestLibrary.TestFramework.LogError("012", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ double d;
+ bool expectedValue;
+ bool actualValue;
+
+ d = double.NegativeInfinity;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7: value is double.NegativeInfinity.");
+ try
+ {
+ actualValue = Convert.ToBoolean(d);
+ expectedValue = 0 != d;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of double value " + d + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("013", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe double value is " + d;
+ TestLibrary.TestFramework.LogError("014", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ double d;
+ bool expectedValue;
+ bool actualValue;
+
+ d = double.PositiveInfinity;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest8: value is double.PositiveInfinity.");
+ try
+ {
+ actualValue = Convert.ToBoolean(d);
+ expectedValue = 0 != d;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of double value " + d + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("015", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe double value is " + d;
+ TestLibrary.TestFramework.LogError("016", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ double d;
+ bool expectedValue;
+ bool actualValue;
+
+ d = -1 * double.Epsilon;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest9: value is negative double.Epsilon.");
+ try
+ {
+ actualValue = Convert.ToBoolean(d);
+ expectedValue = 0 != d;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of double value " + d + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("017", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe double value is " + d;
+ TestLibrary.TestFramework.LogError("018", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoboolean6.cs b/tests/src/CoreMangLib/cti/system/convert/converttoboolean6.cs
new file mode 100644
index 0000000000..c84eb2591e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoboolean6.cs
@@ -0,0 +1,222 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToBoolean(Int16)
+/// Converts the value of the specified 16-bit signed integer to an equivalent Boolean value.
+/// </summary>
+public class ConvertToBoolean
+{
+ public static int Main()
+ {
+ ConvertToBoolean testObj = new ConvertToBoolean();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToBoolean(Int16)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int16 b;
+ bool expectedValue;
+ bool actualValue;
+
+ b = TestLibrary.Generator.GetInt16(-55);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Random Int16 value between 0 and Int16.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToBoolean(b);
+ expectedValue = 0 != b;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of Int16 value " + b + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe Int16 value is " + b;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int16 b;
+ bool expectedValue;
+ bool actualValue;
+
+ b = Int16.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: value is Int16.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToBoolean(b);
+ expectedValue = 0 != b;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of Int16 value " + b + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe byte value is " + b;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int16 b;
+ bool expectedValue;
+ bool actualValue;
+
+ b = Int16.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: value is Int16.MinValue.");
+ try
+ {
+ actualValue = Convert.ToBoolean(b);
+ expectedValue = 0 != b;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of Int16 integer " + b + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe Int16 value is " + b;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int16 b;
+ bool expectedValue;
+ bool actualValue;
+
+ b = (Int16)(-1 * TestLibrary.Generator.GetInt16(-55) - 1);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Random Int16 value between Int16.MinValue and -1.");
+ try
+ {
+ actualValue = Convert.ToBoolean(b);
+ expectedValue = 0 != b;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of Int16 value " + b + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("007", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe Int16 value is " + b;
+ TestLibrary.TestFramework.LogError("008", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int16 b;
+ bool expectedValue;
+ bool actualValue;
+
+ b = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Int16 value is zero.");
+ try
+ {
+ actualValue = Convert.ToBoolean(b);
+ expectedValue = 0 != b;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of Int16 value " + b + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("009", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe Int16 value is " + b;
+ TestLibrary.TestFramework.LogError("010", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoboolean7.cs b/tests/src/CoreMangLib/cti/system/convert/converttoboolean7.cs
new file mode 100644
index 0000000000..9f5bba23c8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoboolean7.cs
@@ -0,0 +1,221 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToBoolean(Int32)
+/// Converts the value of the specified 32-bit signed integer to an equivalent Boolean value.
+/// </summary>
+public class ConvertToBoolean
+{
+ public static int Main()
+ {
+ ConvertToBoolean testObj = new ConvertToBoolean();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToBoolean(Int32)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int32 b;
+ bool expectedValue;
+ bool actualValue;
+
+ b = TestLibrary.Generator.GetInt32(-55);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Random Int32 value between 0 and Int32.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToBoolean(b);
+ expectedValue = 0 != b;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of Int32 value " + b + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe Int32 value is " + b;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int32 b;
+ bool expectedValue;
+ bool actualValue;
+
+ b = Int32.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: value is Int32.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToBoolean(b);
+ expectedValue = 0 != b;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of Int32 value " + b + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe byte value is " + b;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int32 b;
+ bool expectedValue;
+ bool actualValue;
+
+ b = Int32.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: value is Int32.MinValue.");
+ try
+ {
+ actualValue = Convert.ToBoolean(b);
+ expectedValue = 0 != b;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of Int32 integer " + b + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe Int32 value is " + b;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int32 b;
+ bool expectedValue;
+ bool actualValue;
+
+ b = (Int32)(-1 * TestLibrary.Generator.GetInt32(-55) - 1);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Random Int32 value between Int32.MinValue and -1.");
+ try
+ {
+ actualValue = Convert.ToBoolean(b);
+ expectedValue = 0 != b;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of Int32 value " + b + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("007", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe Int32 value is " + b;
+ TestLibrary.TestFramework.LogError("008", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int32 b;
+ bool expectedValue;
+ bool actualValue;
+
+ b = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Int32 value is zero.");
+ try
+ {
+ actualValue = Convert.ToBoolean(b);
+ expectedValue = 0 != b;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of Int32 value " + b + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("009", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe Int32 value is " + b;
+ TestLibrary.TestFramework.LogError("010", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoboolean8.cs b/tests/src/CoreMangLib/cti/system/convert/converttoboolean8.cs
new file mode 100644
index 0000000000..ba5faa146c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoboolean8.cs
@@ -0,0 +1,221 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToBoolean(Int64)
+/// Converts the value of the specified 64-bit signed integer to an equivalent Boolean value.
+/// </summary>
+public class ConvertToBoolean
+{
+ public static int Main()
+ {
+ ConvertToBoolean testObj = new ConvertToBoolean();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToBoolean(Int64)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int64 b;
+ bool expectedValue;
+ bool actualValue;
+
+ b = TestLibrary.Generator.GetInt64(-55);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Random Int64 value between 0 and Int64.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToBoolean(b);
+ expectedValue = 0 != b;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of Int64 value " + b + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe Int64 value is " + b;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int64 b;
+ bool expectedValue;
+ bool actualValue;
+
+ b = Int64.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: value is Int64.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToBoolean(b);
+ expectedValue = 0 != b;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of Int64 value " + b + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe byte value is " + b;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int64 b;
+ bool expectedValue;
+ bool actualValue;
+
+ b = Int64.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: value is Int64.MinValue.");
+ try
+ {
+ actualValue = Convert.ToBoolean(b);
+ expectedValue = 0 != b;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of Int64 integer " + b + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe Int64 value is " + b;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int64 b;
+ bool expectedValue;
+ bool actualValue;
+
+ b = (Int64)(-1 * TestLibrary.Generator.GetInt64(-55) - 1);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Random Int64 value between Int64.MinValue and -1.");
+ try
+ {
+ actualValue = Convert.ToBoolean(b);
+ expectedValue = 0 != b;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of Int64 value " + b + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("007", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe Int64 value is " + b;
+ TestLibrary.TestFramework.LogError("008", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int64 b;
+ bool expectedValue;
+ bool actualValue;
+
+ b = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Int64 value is zero.");
+ try
+ {
+ actualValue = Convert.ToBoolean(b);
+ expectedValue = 0 != b;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of Int64 value " + b + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("009", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe Int64 value is " + b;
+ TestLibrary.TestFramework.LogError("010", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttobyte.cs b/tests/src/CoreMangLib/cti/system/convert/converttobyte.cs
new file mode 100644
index 0000000000..b06c343cee
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttobyte.cs
@@ -0,0 +1,197 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ConvertToByte
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ConvertToByte ac = new ConvertToByte();
+
+ TestLibrary.TestFramework.BeginTestCase("Convert.ToByte(...)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+ retVal = NegTest9() && retVal;
+
+ return retVal;
+ }
+
+ // public static byte ToByte (String value, int fromBase)
+ public bool PosTest1() { return PosTest1(1, Byte.MaxValue.ToString(), Byte.MaxValue, 10); }
+ public bool PosTest2() { return PosTest1(2, Byte.MinValue.ToString(), Byte.MinValue, 10); }
+ public bool PosTest3() { return PosTest1(3, "101", 5, 2); }
+ public bool PosTest4() { return PosTest1(4, "75", 61, 8); }
+ public bool PosTest5() { return PosTest1(5, "a5", 165, 16); }
+ public bool PosTest6() { return PosTest1(6, null, 0, 10); }
+
+ // public static byte ToByte(object value) {
+ public bool PosTest7() { return PosTest2(7, null, 0); }
+ public bool PosTest8() { return PosTest2(8, "34", 34); }
+
+ //id string base exception
+ public bool NegTest1() { return NegTest1(1, "", 1, typeof(System.ArgumentException)); }
+ public bool NegTest2() { return NegTest1(2, "", 3, typeof(System.ArgumentException)); }
+ public bool NegTest3() { return NegTest1(3, "", 100, typeof(System.ArgumentException)); }
+ public bool NegTest4() { return NegTest1(4, Int32.MaxValue.ToString(), 10, typeof(System.OverflowException)); }
+ public bool NegTest5() { return NegTest1(5, Int32.MinValue.ToString(), 10, typeof(System.OverflowException)); }
+ public bool NegTest6() { return NegTest1(6, "2", 2, typeof(System.FormatException)); }
+ public bool NegTest7() { return NegTest1(7, "8", 8, typeof(System.FormatException)); }
+ public bool NegTest8() { return NegTest1(8, "a", 10, typeof(System.FormatException)); }
+ public bool NegTest9() { return NegTest1(9, "g", 16, typeof(System.FormatException)); }
+
+ public bool PosTest1(int id, string curValue, Byte expValue, int fromBase)
+ {
+ bool retVal = true;
+ Byte newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToByte(...) (curValue:string " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToByte(curValue, fromBase);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("000", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ if (10 == fromBase)
+ {
+ newValue = Convert.ToByte(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToByte(curValue, myfp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("002", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2(int id, object curValue, Byte expValue)
+ {
+ bool retVal = true;
+ Byte newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToByte(...) (curValue:object " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToByte(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("004", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToByte(curValue, myfp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("005", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1(int id, string curValue, int fromBase, Type exception)
+ {
+ bool retVal = true;
+ Byte newValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Convert.ToByte(...) (curValue:string " +curValue+" base:"+fromBase+")");
+
+ try
+ {
+ newValue = Convert.ToByte(curValue, fromBase);
+
+ TestLibrary.TestFramework.LogError("007", "Exception expected");
+ retVal = false;
+ }
+ catch (Exception e)
+ {
+ if (e.GetType() != exception)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttobyte1.cs b/tests/src/CoreMangLib/cti/system/convert/converttobyte1.cs
new file mode 100644
index 0000000000..bc255f6fa3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttobyte1.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToByte(System.Boolean)
+/// </summary>
+public class ConvertToByte1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ToByte should return 1 when value is true");
+
+ try
+ {
+ byte actual = Convert.ToByte(true);
+
+ if (actual != 1)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToByte does not return 1 when value is true");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: ToByte should return 0 when value is false");
+
+ try
+ {
+ byte actual = Convert.ToByte(false);
+
+ if (actual != 0)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToByte does not return 0 when value is false");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToByte1 test = new ConvertToByte1();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToByte1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttobyte2.cs b/tests/src/CoreMangLib/cti/system/convert/converttobyte2.cs
new file mode 100644
index 0000000000..1efaea5708
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttobyte2.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToByte(System.Byte)
+/// </summary>
+public class ConvertToByte2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ToByte should return correct value for any byte");
+
+ try
+ {
+ byte expected = TestLibrary.Generator.GetByte(-55);
+ byte actual = Convert.ToByte(expected);
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToByte does not return correct value for any byte");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToByte2 test = new ConvertToByte2();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToByte2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttobyte3.cs b/tests/src/CoreMangLib/cti/system/convert/converttobyte3.cs
new file mode 100644
index 0000000000..937c0792b7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttobyte3.cs
@@ -0,0 +1,110 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToByte(System.Char)
+/// </summary>
+public class ConvertToByte3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ToByte should Converts the value of the specified Unicode character to the equivalent 8-bit unsigned integer");
+
+ try
+ {
+ short mask = 0x00FF;
+ char c = TestLibrary.Generator.GetChar(-55);
+
+ c = (char)(c & mask);
+ byte expected = (byte)(c & mask);
+ byte actual = Convert.ToByte(c);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToByte can not Converts the value of the specified Unicode character to the equivalent 8-bit unsigned integer");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected + ", c = " + c);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException should be thrown when value is greater than Byte.MaxValue");
+
+ try
+ {
+ char c = '\x01FF';
+
+ byte actual = Convert.ToByte(c);
+
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException is not thrown when value is greater than Byte.MaxValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToByte3 test = new ConvertToByte3();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToByte3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttobyte4.cs b/tests/src/CoreMangLib/cti/system/convert/converttobyte4.cs
new file mode 100644
index 0000000000..e487f5e233
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttobyte4.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToByte(System.Decimal)
+/// </summary>
+public class ConvertToByte4
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ToByte should Converts the value of a decimal to a equivlent byte");
+
+ try
+ {
+ decimal d = 123;
+ byte expected = 123;
+ byte actual = Convert.ToByte(d);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToByte can not Converts the value of a decimal to a equivlent byte");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected + ", d = " + d);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: ToByte should Converts the value of a decimal to a equivlent byte with 0");
+
+ try
+ {
+ decimal d = 0;
+ byte expected = 0;
+ byte actual = Convert.ToByte(d);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToByte can not Converts the value of a decimal to a equivlent byte with 0");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected + ", d = " + d);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException should be thrown when value is greater than Byte.MaxValue");
+
+ try
+ {
+ decimal d = 257;
+ byte actual = Convert.ToByte(d);
+
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException is not thrown when value is greater than Byte.MaxValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: OverflowException should be thrown when value is less than Byte.MinValue");
+
+ try
+ {
+ decimal d = -1;
+ byte actual = Convert.ToByte(d);
+
+ TestLibrary.TestFramework.LogError("102.1", "OverflowException is not thrown value is less than Byte.MinValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToByte4 test = new ConvertToByte4();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToByte4");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttobyte6.cs b/tests/src/CoreMangLib/cti/system/convert/converttobyte6.cs
new file mode 100644
index 0000000000..927ca4bf46
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttobyte6.cs
@@ -0,0 +1,140 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToByte(System.Int16)
+/// </summary>
+public class ConvertToByte6
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ToByte should Converts the value of an short to the equivalent byte");
+
+ try
+ {
+ short mask = 0x00FF;
+ short s = TestLibrary.Generator.GetInt16(-55);
+
+ s = (short)(s & mask);
+ byte expected = (byte)(s & mask);
+ byte actual = Convert.ToByte(s);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToByte can not Converts the value of an short to the equivalent byte");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected + ", s = " + s);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException should be thrown when value is greater than Byte.MaxValue");
+
+ try
+ {
+ short c = 0x0100;
+
+ byte actual = Convert.ToByte(c);
+
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException is not thrown when value is greater than Byte.MaxValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: OverflowException should be thrown when value is less than Byte.MinValue");
+
+ try
+ {
+ short c = -1;
+
+ byte actual = Convert.ToByte(c);
+
+ TestLibrary.TestFramework.LogError("102.1", "OverflowException is not thrown when value is less than Byte.MinValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToByte6 test = new ConvertToByte6();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToByte6");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttobyte7.cs b/tests/src/CoreMangLib/cti/system/convert/converttobyte7.cs
new file mode 100644
index 0000000000..0d48147c42
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttobyte7.cs
@@ -0,0 +1,140 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToByte(System.Int32)
+/// </summary>
+public class ConvertToByte7
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ToByte should Converts the value of an int to the equivalent byte");
+
+ try
+ {
+ int mask = 0x00FF;
+ int s = TestLibrary.Generator.GetInt32(-55);
+
+ s = s & mask;
+ byte expected = (byte)(s & mask);
+ byte actual = Convert.ToByte(s);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToByte can not Converts the value of an int to the equivalent byte");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected + ", s = " + s);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException should be thrown when value is greater than Byte.MaxValue");
+
+ try
+ {
+ int c = 0x0100;
+
+ byte actual = Convert.ToByte(c);
+
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException is not thrown when value is greater than Byte.MaxValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: OverflowException should be thrown when value is less than Byte.MinValue");
+
+ try
+ {
+ int c = -1;
+
+ byte actual = Convert.ToByte(c);
+
+ TestLibrary.TestFramework.LogError("102.1", "OverflowException is not thrown when value is less than Byte.MinValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToByte7 test = new ConvertToByte7();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToByte7");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttobyte8.cs b/tests/src/CoreMangLib/cti/system/convert/converttobyte8.cs
new file mode 100644
index 0000000000..7ad6d4ab49
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttobyte8.cs
@@ -0,0 +1,140 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToByte(System.Int64)
+/// </summary>
+public class ConvertToByte8
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ToByte should Converts the value of an long to the equivalent byte");
+
+ try
+ {
+ long mask = 0x00FF;
+ long s = TestLibrary.Generator.GetInt64(-55);
+
+ s = (long)(s & mask);
+ byte expected = (byte)(s & mask);
+ byte actual = Convert.ToByte(s);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToByte can not Converts the value of an long to the equivalent byte");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected + ", s = " + s);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException should be thrown when value is greater than Byte.MaxValue");
+
+ try
+ {
+ long c = 0x0100;
+
+ byte actual = Convert.ToByte(c);
+
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException is not thrown when value is greater than Byte.MaxValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: OverflowException should be thrown when value is less than Byte.MinValue");
+
+ try
+ {
+ long c = -1;
+
+ byte actual = Convert.ToByte(c);
+
+ TestLibrary.TestFramework.LogError("102.1", "OverflowException is not thrown when value is less than Byte.MinValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToByte8 test = new ConvertToByte8();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToByte8");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttochar.cs b/tests/src/CoreMangLib/cti/system/convert/converttochar.cs
new file mode 100644
index 0000000000..4be23ba8db
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttochar.cs
@@ -0,0 +1,125 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ConvertToChar
+{
+ public static int Main()
+ {
+ ConvertToChar ac = new ConvertToChar();
+
+ TestLibrary.TestFramework.BeginTestCase("Convert.ToChar(...)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+
+ return retVal;
+ }
+
+ // public static char ToChar(object value)
+ public bool PosTest1() { return PosTest<object>(1, Char.MaxValue.ToString(), Char.MaxValue); }
+ public bool PosTest2() { return PosTest<object>(2, Char.MinValue.ToString(), Char.MinValue); }
+ public bool PosTest3() { return PosTest<object>(3, (object)null, (char)0); }
+
+ // public static char ToChar(float value)
+ public bool NegTest1() { return NegTest<float>(1, Single.MinValue, typeof(System.InvalidCastException)); }
+ public bool NegTest2() { return NegTest<float>(2, Single.MaxValue, typeof(System.InvalidCastException)); }
+ public bool NegTest3() { return NegTest<double>(3, Double.MinValue, typeof(System.InvalidCastException)); }
+ public bool NegTest4() { return NegTest<double>(4, Double.MaxValue, typeof(System.InvalidCastException)); }
+ public bool NegTest5() { return NegTest<decimal>(5, Decimal.MinValue, typeof(System.InvalidCastException)); }
+ public bool NegTest6() { return NegTest<decimal>(6, Decimal.MaxValue, typeof(System.InvalidCastException)); }
+
+ public bool PosTest<T>(int id, T curValue, char expValue)
+ {
+ bool retVal = true;
+ char newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToChar(...) (curValue:string " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToChar(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("000", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToChar(curValue, myfp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest<T>(int id, T curValue, Type exception)
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Convert.ToChar(...) (curValue:"+typeof(T)+" " +curValue+"");
+
+ try
+ {
+ Convert.ToChar(curValue);
+
+ TestLibrary.TestFramework.LogError("003", "Exception expected");
+ retVal = false;
+ }
+ catch (Exception e)
+ {
+ if (e.GetType() != exception)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttochar10.cs b/tests/src/CoreMangLib/cti/system/convert/converttochar10.cs
new file mode 100644
index 0000000000..8583a687b1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttochar10.cs
@@ -0,0 +1,189 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToChar(SByte)
+/// Converts the value of the specified 8-bit signed integer to its equivalent Unicode character.
+/// </summary>
+public class ConvertTochar
+{
+ public static int Main()
+ {
+ ConvertTochar testObj = new ConvertTochar();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToChar(SByte)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ SByte i;
+ char expectedValue;
+ char actualValue;
+
+ i = (SByte)(TestLibrary.Generator.GetByte(-55) % (SByte.MaxValue + 1));
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: SByte value between 0 and SByte.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToChar(i);
+ expectedValue = (char)i;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format(
+ "The character corresponding to SByte value {0} is not \\u{1:x} as expected: actual(\\u{2:x})",
+ i, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe SByte value is " + i;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ SByte i;
+ char expectedValue;
+ char actualValue;
+
+ i = SByte.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: SByte value is SByte.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToChar(i);
+ expectedValue = (char)i;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format(
+ "The character corresponding to SByte value {0} is not \\u{1:x} as expected: actual(\\u{2:x})",
+ i, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe SByte value is " + i;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ SByte i;
+ char expectedValue;
+ char actualValue;
+
+ i = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: SByte value is zero.");
+ try
+ {
+ actualValue = Convert.ToChar(i);
+ expectedValue = (char)i;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format(
+ "The character corresponding to SByte value {0} is not \\u{1:x} as expected: actual(\\u{2:x})",
+ i, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe SByte value is " + i;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //OverflowException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: SByte value is a negative integer between SByte.MinValue and -1.";
+ string errorDesc;
+
+ SByte i = (SByte)(-1 * TestLibrary.Generator.GetByte(-55) % (SByte.MaxValue + 1) - 1);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(i);
+
+ errorDesc = "OverflowException is not thrown as expected.";
+ errorDesc += string.Format("\nThe SByte value is {0}", i);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe SByte value is {0}", i);
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttochar11.cs b/tests/src/CoreMangLib/cti/system/convert/converttochar11.cs
new file mode 100644
index 0000000000..42bdef4d47
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttochar11.cs
@@ -0,0 +1,77 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToChar(Single)
+/// Calling this method always throws InvalidCastException.
+/// </summary>
+public class ConvertTochar
+{
+ public static int Main()
+ {
+ ConvertTochar testObj = new ConvertTochar();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToChar(Single)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Negative tests
+ //InvalidCastException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: Random Single float point value";
+ string errorDesc;
+
+ Single d = TestLibrary.Generator.GetSingle(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(d);
+
+ errorDesc = "InvalidCastException is not thrown as expected.";
+ errorDesc += string.Format("\nThe Single value is {0}", d);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (InvalidCastException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe Single value is {0}", d);
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttochar12.cs b/tests/src/CoreMangLib/cti/system/convert/converttochar12.cs
new file mode 100644
index 0000000000..c31a4dcbfc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttochar12.cs
@@ -0,0 +1,190 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToChar(string)
+/// </summary>
+public class ConvertTochar
+{
+ public static int Main()
+ {
+ ConvertTochar testObj = new ConvertTochar();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToChar(string)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ char ch;
+ string str;
+ char expectedValue;
+ char actualValue;
+
+ ch = TestLibrary.Generator.GetChar(-55);
+ str = new string(ch, 1);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: String whose length euquals 1 character.");
+ try
+ {
+ actualValue = Convert.ToChar(str);
+ expectedValue = str[0];
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format(
+ "The character corresponding to string {0} is not \\u{1:x} as expected: actual(\\u{2:x})",
+ str, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe string is \"" + str + "\"";
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //FormatException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: The length of string is longer than 1 character. ";
+ string errorDesc;
+
+ string str = TestLibrary.Generator.GetString(-55, false, 2, 256);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(str);
+
+ errorDesc = "FormatException is not thrown as expected.";
+ errorDesc += string.Format("\nThe string value is \"{0}\"", str);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe string value is \"{0}\"", str);
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //ArgumentNullException
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: String is null reference.";
+ string errorDesc;
+
+ string str = TestLibrary.Generator.GetString(-55, false, 2, 256);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(null);
+
+ errorDesc = "ArgumentNullException is not thrown as expected.";
+ errorDesc += "\nThe string value is null reference.";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nThe string value is null reference.";
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //FormatException
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: String is String.Empty.";
+ string errorDesc;
+
+ string str = TestLibrary.Generator.GetString(-55, false, 2, 256);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(string.Empty);
+
+ errorDesc = "FormatException is not thrown as expected.";
+ errorDesc += "\nThe string value is string.Empty.";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nThe string value is string.Empty.";
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttochar13.cs b/tests/src/CoreMangLib/cti/system/convert/converttochar13.cs
new file mode 100644
index 0000000000..c42fcce789
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttochar13.cs
@@ -0,0 +1,190 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToChar(string, IFormatProvider)
+/// </summary>
+public class ConvertTochar
+{
+ public static int Main()
+ {
+ ConvertTochar testObj = new ConvertTochar();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToChar(string, IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ char ch;
+ string str;
+ char expectedValue;
+ char actualValue;
+
+ ch = TestLibrary.Generator.GetChar(-55);
+ str = new string(ch, 1);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: String whose length euquals 1 character.");
+ try
+ {
+ actualValue = Convert.ToChar(str, null);
+ expectedValue = str[0];
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format(
+ "The character corresponding to string {0} is not \\u{1:x} as expected: actual(\\u{2:x})",
+ str, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe string is \"" + str + "\"";
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //FormatException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: The length of string is longer than 1 character. ";
+ string errorDesc;
+
+ string str = TestLibrary.Generator.GetString(-55, false, 2, 256);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(str, null);
+
+ errorDesc = "FormatException is not thrown as expected.";
+ errorDesc += string.Format("\nThe string value is \"{0}\"", str);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe string value is \"{0}\"", str);
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //ArgumentNullException
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: String is null reference.";
+ string errorDesc;
+
+ string str = TestLibrary.Generator.GetString(-55, false, 2, 256);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(null, null);
+
+ errorDesc = "ArgumentNullException is not thrown as expected.";
+ errorDesc += "\nThe string value is null reference.";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nThe string value is null reference.";
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //FormatException
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: String is String.Empty.";
+ string errorDesc;
+
+ string str = TestLibrary.Generator.GetString(-55, false, 2, 256);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(string.Empty, null);
+
+ errorDesc = "FormatException is not thrown as expected.";
+ errorDesc += "\nThe string value is string.Empty.";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nThe string value is string.Empty.";
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttochar14.cs b/tests/src/CoreMangLib/cti/system/convert/converttochar14.cs
new file mode 100644
index 0000000000..1c05767d8b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttochar14.cs
@@ -0,0 +1,149 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToChar(UInt16)
+/// Converts the value of the specified 16-bit unsigned integer to its equivalent Unicode character.
+/// </summary>
+public class ConvertTochar
+{
+ public static int Main()
+ {
+ ConvertTochar testObj = new ConvertTochar();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToChar(UInt16)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 i;
+ char expectedValue;
+ char actualValue;
+
+ i = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: UInt16 value between 0 and UInt16.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToChar(i);
+ expectedValue = (char)i;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format(
+ "The character corresponding to UInt16 value {0} is not \\u{1:x} as expected: actual(\\u{2:x})",
+ i, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe UInt16 value is " + i;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 i;
+ char expectedValue;
+ char actualValue;
+
+ i = UInt16.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: UInt16 value is UInt16.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToChar(i);
+ expectedValue = (char)i;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format(
+ "The character corresponding to UInt16 value {0} is not \\u{1:x} as expected: actual(\\u{2:x})",
+ i, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe UInt16 value is " + i;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 i;
+ char expectedValue;
+ char actualValue;
+
+ i = UInt16.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Value is UInt16.MinValue.");
+ try
+ {
+ actualValue = Convert.ToChar(i);
+ expectedValue = (char)i;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format(
+ "The character corresponding to UInt16 value {0} is not \\u{1:x} as expected: actual(\\u{2:x})",
+ i, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe UInt16 value is " + i;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttochar15.cs b/tests/src/CoreMangLib/cti/system/convert/converttochar15.cs
new file mode 100644
index 0000000000..64bd84d605
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttochar15.cs
@@ -0,0 +1,190 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToChar(UInt32)
+/// Converts the value of the specified 32-bit unsigned integer to its equivalent Unicode character.
+/// </summary>
+public class ConvertTochar
+{
+ public static int Main()
+ {
+ ConvertTochar testObj = new ConvertTochar();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToChar(UInt32)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt32 i;
+ char expectedValue;
+ char actualValue;
+
+ i = (UInt32)(TestLibrary.Generator.GetInt64(-55) % (UInt16.MaxValue + 1));
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: UInt32 value between 0 and UInt16.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToChar(i);
+ expectedValue = (char)i;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format(
+ "The character corresponding to UInt32 value {0} is not \\u{1:x} as expected: actual(\\u{2:x})",
+ i, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe UInt32 value is " + i;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt32 i;
+ char expectedValue;
+ char actualValue;
+
+ i = UInt16.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: UInt32 value is UInt16.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToChar(i);
+ expectedValue = (char)i;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format(
+ "The character corresponding to UInt32 value {0} is not \\u{1:x} as expected: actual(\\u{2:x})",
+ i, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe UInt32 value is " + i;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt32 i;
+ char expectedValue;
+ char actualValue;
+
+ i = UInt32.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: value is UInt32.MinValue.");
+ try
+ {
+ actualValue = Convert.ToChar(i);
+ expectedValue = (char)i;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format(
+ "The character corresponding to UInt32 value {0} is not \\u{1:x} as expected: actual(\\u{2:x})",
+ i, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe UInt32 value is " + i;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //OverflowException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: UInt32 value is a integer between UInt16.MaxValue and UInt32.MaxValue.";
+ string errorDesc;
+
+ UInt32 i = (UInt32)(TestLibrary.Generator.GetInt64(-55) % (UInt32.MaxValue - UInt16.MaxValue) +
+ UInt16.MaxValue + 1);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(i);
+
+ errorDesc = "OverflowException is not thrown as expected.";
+ errorDesc += string.Format("\nThe UInt32 value is {0}", i);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe UInt32 value is {0}", i);
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttochar16.cs b/tests/src/CoreMangLib/cti/system/convert/converttochar16.cs
new file mode 100644
index 0000000000..2da58fb989
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttochar16.cs
@@ -0,0 +1,210 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToChar(UInt64)
+/// Converts the value of the specified 64-bit unsigned integer to its equivalent Unicode character.
+/// </summary>
+public class ConvertTochar
+{
+ public static int Main()
+ {
+ ConvertTochar testObj = new ConvertTochar();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToChar(UInt64)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt64 i;
+ char expectedValue;
+ char actualValue;
+
+ i = GetUInt64() % (UInt16.MaxValue + 1);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: UInt64 value between 0 and UInt16.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToChar(i);
+ expectedValue = (char)i;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format(
+ "The character corresponding to UInt64 value {0} is not \\u{1:x} as expected: actual(\\u{2:x})",
+ i, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe UInt64 value is " + i;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt64 i;
+ char expectedValue;
+ char actualValue;
+
+ i = UInt16.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: UInt64 value is UInt16.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToChar(i);
+ expectedValue = (char)i;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format(
+ "The character corresponding to UInt64 value {0} is not \\u{1:x} as expected: actual(\\u{2:x})",
+ i, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe UInt64 value is " + i;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt64 i;
+ char expectedValue;
+ char actualValue;
+
+ i = UInt64.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: value is UInt64.MinValue.");
+ try
+ {
+ actualValue = Convert.ToChar(i);
+ expectedValue = (char)i;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format(
+ "The character corresponding to UInt64 value {0} is not \\u{1:x} as expected: actual(\\u{2:x})",
+ i, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe UInt64 value is " + i;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //OverflowException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: UInt64 value is a integer between UInt16.MaxValue and UInt64.MaxValue.";
+ string errorDesc;
+
+ UInt64 i = (UInt64)(GetUInt64() % (UInt64.MaxValue - UInt16.MaxValue) + UInt16.MaxValue + 1);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(i);
+
+ errorDesc = "OverflowException is not thrown as expected.";
+ errorDesc += string.Format("\nThe UInt64 value is {0}", i);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe UInt64 value is {0}", i);
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region helper method
+ // returns a non-negative UInt64 between 0 and UInt64.MaxValue
+ private static UInt64 GetUInt64()
+ {
+ byte[] buffer = new byte[8];
+ UInt64 iVal;
+
+ TestLibrary.Generator.GetBytes(-55, buffer);
+
+ // convert to Int64
+ iVal = 0;
+ for (int i = 0; i < buffer.Length; i++)
+ {
+ iVal |= ((UInt64)buffer[i] << (i * 8));
+ }
+
+ TestLibrary.TestFramework.LogInformation("Random Int64 produced: " + iVal.ToString());
+ return iVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttochar5.cs b/tests/src/CoreMangLib/cti/system/convert/converttochar5.cs
new file mode 100644
index 0000000000..51c1d7f339
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttochar5.cs
@@ -0,0 +1,189 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToChar(Int16)
+/// Converts the value of the specified 16-bit signed integer to its equivalent Unicode character.
+/// </summary>
+public class ConvertTochar
+{
+ public static int Main()
+ {
+ ConvertTochar testObj = new ConvertTochar();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToChar(Int16)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int16 i;
+ char expectedValue;
+ char actualValue;
+
+ i = TestLibrary.Generator.GetInt16(-55);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Int16 value between 0 and Int16.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToChar(i);
+ expectedValue = (char)i;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format(
+ "The character corresponding to Int16 value {0} is not \\u{1:x} as expected: actual(\\u{2:x})",
+ i, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe Int16 value is " + i;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int16 i;
+ char expectedValue;
+ char actualValue;
+
+ i = Int16.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Int16 value is Int16.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToChar(i);
+ expectedValue = (char)i;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format(
+ "The character corresponding to Int16 value {0} is not \\u{1:x} as expected: actual(\\u{2:x})",
+ i, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe Int16 value is " + i;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int16 i;
+ char expectedValue;
+ char actualValue;
+
+ i = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Int16 value is zero.");
+ try
+ {
+ actualValue = Convert.ToChar(i);
+ expectedValue = (char)i;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format(
+ "The character corresponding to Int16 value {0} is not \\u{1:x} as expected: actual(\\u{2:x})",
+ i, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe Int16 value is " + i;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //OverflowException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: Int16 value is a negative integer between Int16.MinValue and -1.";
+ string errorDesc;
+
+ Int16 i = (Int16)(-1 * TestLibrary.Generator.GetInt16(-55) - 1);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(i);
+
+ errorDesc = "OverflowException is not thrown as expected.";
+ errorDesc += string.Format("\nThe Int16 value is {0}", i);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe Int16 value is {0}", i);
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttochar6.cs b/tests/src/CoreMangLib/cti/system/convert/converttochar6.cs
new file mode 100644
index 0000000000..3df3fb221c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttochar6.cs
@@ -0,0 +1,225 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToChar(Int32)
+/// Converts the value of the specified 32-bit signed integer to its equivalent Unicode character.
+/// </summary>
+public class ConvertTochar
+{
+ public static int Main()
+ {
+ ConvertTochar testObj = new ConvertTochar();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToChar(Int32)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int32 i;
+ char expectedValue;
+ char actualValue;
+
+ i = TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Int32 value between 0 and UInt16.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToChar(i);
+ expectedValue = (char)i;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format(
+ "The character corresponding to Int32 value {0} is not \\u{1:x} as expected: actual(\\u{2:x})",
+ i, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe Int32 value is " + i;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int32 i;
+ char expectedValue;
+ char actualValue;
+
+ i = UInt16.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Int32 value is UInt16.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToChar(i);
+ expectedValue = (char)i;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format(
+ "The character corresponding to Int32 value {0} is not \\u{1:x} as expected: actual(\\u{2:x})",
+ i, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe Int32 value is " + i;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int32 i;
+ char expectedValue;
+ char actualValue;
+
+ i = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Int32 value is zero.");
+ try
+ {
+ actualValue = Convert.ToChar(i);
+ expectedValue = (char)i;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format(
+ "The character corresponding to Int32 value {0} is not \\u{1:x} as expected: actual(\\u{2:x})",
+ i, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe Int32 value is " + i;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //OverflowException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: Int32 value is a negative integer between Int32.MinValue and -1.";
+ string errorDesc;
+
+ Int32 i = (Int32)(-1 * TestLibrary.Generator.GetInt32(-55) - 1);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(i);
+
+ errorDesc = "OverflowException is not thrown as expected.";
+ errorDesc += string.Format("\nThe Int32 value is {0}", i);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe Int32 value is {0}", i);
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: Int32 value is a integer between UInt16.MaxValue and Int32.MaxValue.";
+ string errorDesc;
+
+ Int32 i = TestLibrary.Generator.GetInt32(-55) % (Int32.MaxValue - UInt16.MaxValue) +
+ UInt16.MaxValue + 1;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(i);
+
+ errorDesc = "OverflowException is not thrown as expected.";
+ errorDesc += string.Format("\nThe Int32 value is {0}", i);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe Int32 value is {0}", i);
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttochar7.cs b/tests/src/CoreMangLib/cti/system/convert/converttochar7.cs
new file mode 100644
index 0000000000..bf50977dd4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttochar7.cs
@@ -0,0 +1,225 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToChar(Int64)
+/// Converts the value of the specified 64-bit signed integer to its equivalent Unicode character.
+/// </summary>
+public class ConvertTochar
+{
+ public static int Main()
+ {
+ ConvertTochar testObj = new ConvertTochar();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToChar(Int64)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int64 i;
+ char expectedValue;
+ char actualValue;
+
+ i = TestLibrary.Generator.GetInt64(-55) % (UInt16.MaxValue + 1);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Int64 value between 0 and UInt16.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToChar(i);
+ expectedValue = (char)i;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format(
+ "The character corresponding to Int64 value {0} is not \\u{1:x} as expected: actual(\\u{2:x})",
+ i, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe Int64 value is " + i;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int64 i;
+ char expectedValue;
+ char actualValue;
+
+ i = UInt16.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Int64 value is UInt16.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToChar(i);
+ expectedValue = (char)i;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format(
+ "The character corresponding to Int64 value {0} is not \\u{1:x} as expected: actual(\\u{2:x})",
+ i, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe Int64 value is " + i;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Int64 i;
+ char expectedValue;
+ char actualValue;
+
+ i = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Int64 value is zero.");
+ try
+ {
+ actualValue = Convert.ToChar(i);
+ expectedValue = (char)i;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format(
+ "The character corresponding to Int64 value {0} is not \\u{1:x} as expected: actual(\\u{2:x})",
+ i, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe Int64 value is " + i;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //OverflowException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: Int64 value is a negative integer between Int64.MinValue and -1.";
+ string errorDesc;
+
+ Int64 i = (Int64)(-1 * TestLibrary.Generator.GetInt64(-55) - 1);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(i);
+
+ errorDesc = "OverflowException is not thrown as expected.";
+ errorDesc += string.Format("\nThe Int64 value is {0}", i);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe Int64 value is {0}", i);
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: Int64 value is a integer between UInt16.MaxValue and Int64.MaxValue.";
+ string errorDesc;
+
+ Int64 i = TestLibrary.Generator.GetInt64(-55) % (Int64.MaxValue - UInt16.MaxValue) +
+ UInt16.MaxValue + 1;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(i);
+
+ errorDesc = "OverflowException is not thrown as expected.";
+ errorDesc += string.Format("\nThe Int64 value is {0}", i);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe Int64 value is {0}", i);
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttochar8.cs b/tests/src/CoreMangLib/cti/system/convert/converttochar8.cs
new file mode 100644
index 0000000000..95cfb95381
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttochar8.cs
@@ -0,0 +1,399 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToChar(Object)
+/// Converts the value of the specified Object to a Unicode character.
+/// </summary>
+public class ConvertTochar
+{
+ public static int Main()
+ {
+ ConvertTochar testObj = new ConvertTochar();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToChar(Object)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ object obj;
+ char expectedValue;
+ char actualValue;
+
+ Int64 i = TestLibrary.Generator.GetInt64(-55) % (UInt16.MaxValue + 1);
+ obj = i;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Object is Int64 value between 0 and UInt16.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToChar(obj);
+ expectedValue = (char)i;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format("The character of Int64 value " +
+ obj + " is not the value \\u{0:x}" +
+ " as expected: actual(\\u{1:x})", (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe Int64 value is " + obj;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ object obj;
+ char expectedValue;
+ char actualValue;
+
+ byte b = TestLibrary.Generator.GetByte(-55);
+ obj = b;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Object is byte value");
+ try
+ {
+ actualValue = Convert.ToChar(obj);
+ expectedValue = (char)b;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format("The character of byte value " +
+ obj + " is not the value \\u{0:x}" +
+ " as expected: actual(\\u{1:x})", (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe byte value is " + obj;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ object obj;
+ char expectedValue;
+ char actualValue;
+
+ expectedValue = TestLibrary.Generator.GetChar(-55);
+ obj = new string(expectedValue, 1);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Object instance is string");
+ try
+ {
+ actualValue = Convert.ToChar(obj);
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format("The character of \"" +
+ obj + "\" is not the value \\u{0:x}" +
+ " as expected: actual(\\u{1:x})", (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe string is " + obj;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ object obj;
+ char expectedValue;
+ char actualValue;
+
+ obj = TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Object instance is character.");
+ try
+ {
+ actualValue = Convert.ToChar(obj);
+ expectedValue = (char)obj;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format("The character of \"" +
+ obj + "\" is not the value \\u{0:x}" +
+ " as expected: actual(\\u{1:x})", (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("007", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe string is \"" + obj + "\"";
+ TestLibrary.TestFramework.LogError("008", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //OverflowException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: Object instance is a negative Int32 value between Int32.MinValue and -1.";
+ string errorDesc;
+
+ Int32 i = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+ object obj = i;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(obj);
+
+ errorDesc = "OverflowException is not thrown as expected.";
+ errorDesc += string.Format("\nThe Int32 value is {0}", i);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe Int32 value is {0}", i);
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: Object instance is a Int64 value between UInt16.MaxValue and Int64.MaxValue.";
+ string errorDesc;
+
+ Int64 i = TestLibrary.Generator.GetInt64(-55) % (Int64.MaxValue - UInt16.MaxValue) +
+ UInt16.MaxValue + 1;
+ object obj = i;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(obj);
+ errorDesc = "OverflowException is not thrown as expected.";
+ errorDesc += string.Format("\nThe Int64 value is {0}", i);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe Int64 value is {0}", i);
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //InvalidCastException
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTes3: Object instance does not implement the IConvertible interface. ";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(new MyFoo());
+ errorDesc = "InvalidCastException is not thrown as expected.";
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ //FormatException
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N004";
+ const string c_TEST_DESC = "NegTest4: Object instance is a string whose length is longer than 1 characters.";
+ string errorDesc;
+
+ string str = TestLibrary.Generator.GetString(-55, false, 2, 256);
+ object obj = str;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(obj);
+ errorDesc = "FormatException is not thrown as expected.";
+ errorDesc += "\nThe string is \"" + str + "\"";
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nThe string is \"" + str + "\"";
+ TestLibrary.TestFramework.LogError("015" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ //ArgumentNullException
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N005";
+ const string c_TEST_DESC = "NegTes5: Object instance is a null reference.";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(null);
+ errorDesc = "ArgumentNullException is not thrown as expected.";
+ errorDesc += "\nThe string is <null>";
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nThe object is a null reference";
+ TestLibrary.TestFramework.LogError("016" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ //InvalidCastException
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N006";
+ const string c_TEST_DESC = "NegTes6: Object instance is double value.";
+ string errorDesc;
+
+ double d = TestLibrary.Generator.GetDouble(-55);
+ object obj = d;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(obj);
+ errorDesc = "InvalidCastException is not thrown as expected.";
+ errorDesc += "\nThe string is \"" + obj.ToString() + "\"";
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nThe object is a null reference";
+ TestLibrary.TestFramework.LogError("016" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Helper type
+ //A class which does not implement the interface IConvertible
+ internal class MyFoo
+ {}
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttochar9.cs b/tests/src/CoreMangLib/cti/system/convert/converttochar9.cs
new file mode 100644
index 0000000000..48614d65b5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttochar9.cs
@@ -0,0 +1,407 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Convert.ToChar(Object, IFormatProvider)
+/// </summary>
+public class ConvertTochar
+{
+ public static int Main()
+ {
+ ConvertTochar testObj = new ConvertTochar();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToChar(Object, IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ object obj;
+ IFormatProvider provider;
+ char expectedValue;
+ char actualValue;
+
+ Int64 i = TestLibrary.Generator.GetInt64(-55) % (UInt16.MaxValue + 1);
+ obj = i;
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Object is Int64 value between 0 and UInt16.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToChar(obj, provider);
+ expectedValue = (char)i;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format("The character of Int64 value " +
+ obj + " is not the value \\u{0:x}" +
+ " as expected: actual(\\u{1:x})", (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe Int64 value is " + obj;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ object obj;
+ IFormatProvider provider;
+ char expectedValue;
+ char actualValue;
+
+ byte b = TestLibrary.Generator.GetByte(-55);
+ obj = b;
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Object is byte value");
+ try
+ {
+ actualValue = Convert.ToChar(obj, provider);
+ expectedValue = (char)b;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format("The character of byte value " +
+ obj + " is not the value \\u{0:x}" +
+ " as expected: actual(\\u{1:x})", (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe byte value is " + obj;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ object obj;
+ IFormatProvider provider;
+ char expectedValue;
+ char actualValue;
+
+ expectedValue = TestLibrary.Generator.GetChar(-55);
+ obj = new string(expectedValue, 1);
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Object instance is string");
+ try
+ {
+ actualValue = Convert.ToChar(obj, provider);
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format("The character of \"" +
+ obj + "\" is not the value \\u{0:x}" +
+ " as expected: actual(\\u{1:x})", (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe string is " + obj;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ object obj;
+ IFormatProvider provider;
+ char expectedValue;
+ char actualValue;
+
+ obj = TestLibrary.Generator.GetChar(-55);
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Object instance is character.");
+ try
+ {
+ actualValue = Convert.ToChar(obj, provider);
+ expectedValue = (char)obj;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = string.Format("The character of \"" +
+ obj + "\" is not the value \\u{0:x}" +
+ " as expected: actual(\\u{1:x})", (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("007", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe string is \"" + obj + "\"";
+ TestLibrary.TestFramework.LogError("008", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //OverflowException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: Object instance is a negative Int32 value between Int32.MinValue and -1.";
+ string errorDesc;
+
+ Int32 i = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+ object obj = i;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(obj, null);
+
+ errorDesc = "OverflowException is not thrown as expected.";
+ errorDesc += string.Format("\nThe Int32 value is {0}", i);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe Int32 value is {0}", i);
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: Object instance is a Int64 value between UInt16.MaxValue and Int64.MaxValue.";
+ string errorDesc;
+
+ Int64 i = TestLibrary.Generator.GetInt64(-55) % (Int64.MaxValue - UInt16.MaxValue) +
+ UInt16.MaxValue + 1;
+ object obj = i;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(obj, null);
+ errorDesc = "OverflowException is not thrown as expected.";
+ errorDesc += string.Format("\nThe Int64 value is {0}", i);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe Int64 value is {0}", i);
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //InvalidCastException
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTes3: Object instance does not implement the IConvertible interface. ";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(new MyFoo());
+ errorDesc = "InvalidCastException is not thrown as expected.";
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ //FormatException
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N004";
+ const string c_TEST_DESC = "NegTest4: Object instance is a string whose length is longer than 1 characters.";
+ string errorDesc;
+
+ string str = TestLibrary.Generator.GetString(-55, false, 2, 256);
+ object obj = str;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(obj, null);
+ errorDesc = "FormatException is not thrown as expected.";
+ errorDesc += "\nThe string is \"" + str + "\"";
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nThe string is \"" + str + "\"";
+ TestLibrary.TestFramework.LogError("015" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ //ArgumentNullException
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N005";
+ const string c_TEST_DESC = "NegTes5: Object instance is a null reference.";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(null);
+ errorDesc = "ArgumentNullException is not thrown as expected.";
+ errorDesc += "\nThe string is <null>";
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nThe object is a null reference";
+ TestLibrary.TestFramework.LogError("016" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ //InvalidCastException
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N006";
+ const string c_TEST_DESC = "NegTes6: Object instance is double value.";
+ string errorDesc;
+
+ double d = TestLibrary.Generator.GetDouble(-55);
+ object obj = d;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToChar(obj, null);
+ errorDesc = "InvalidCastException is not thrown as expected.";
+ errorDesc += "\nThe string is \"" + obj.ToString() + "\"";
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nThe object is a null reference";
+ TestLibrary.TestFramework.LogError("016" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Helper type
+ //A class which does not implement the interface IConvertible
+ internal class MyFoo
+ {}
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodatetime.cs b/tests/src/CoreMangLib/cti/system/convert/converttodatetime.cs
new file mode 100644
index 0000000000..156775ec12
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodatetime.cs
@@ -0,0 +1,128 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Globalization;
+
+public class ConvertToDateTime
+{
+ public static int Main()
+ {
+ ConvertToDateTime ac = new ConvertToDateTime();
+
+ TestLibrary.TestFramework.BeginTestCase("Convert.ToDateTime(...)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ return retVal;
+ }
+
+ // public static DateTime ToDateTime(object value)
+ public bool PosTest1() { DateTime now=DateTime.Now; return PosTest<object>(1, now.ToString(), now); }
+ public bool PosTest2() { return PosTest<object>(2, DateTime.MinValue, DateTime.MinValue); }
+ public bool PosTest3() { return PosTest<object>(3, CultureInfo.CurrentCulture.Calendar.MaxSupportedDateTime, CultureInfo.CurrentCulture.Calendar.MaxSupportedDateTime); }
+ public bool PosTest4() { return PosTest<object>(4, (object)null, DateTime.MinValue); }
+
+ // public static DateTime ToDateTime(String value, IFormatProvider provider) {
+
+ public bool PosTest5() { return PosTest2(5, null, new DateTime(0)); }
+ public bool PosTest6() { DateTime now=DateTime.Now; return PosTest2(6, now.ToString(), now); }
+
+ public bool PosTest<T>(int id, T curValue, DateTime expValue)
+ {
+ bool retVal = true;
+ DateTime newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToDateTime(...) (curValue:"+typeof(T)+" " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToDateTime(curValue);
+
+ if (9999999 <= Math.Abs(newValue.Subtract(expValue).Ticks))
+ {
+ TestLibrary.TestFramework.LogError("000", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ") Diff("+newValue.Subtract(expValue).Ticks+")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToDateTime(curValue, myfp);
+
+ if (9999999 <= Math.Abs(newValue.Subtract(expValue).Ticks))
+ {
+ TestLibrary.TestFramework.LogError("001", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ") Diff("+newValue.Subtract(expValue).Ticks+")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2(int id, string curValue, DateTime expValue)
+ {
+ bool retVal = true;
+ DateTime newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToDateTime(...) (curValue:string " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToDateTime(curValue);
+
+ if (9999999 <= Math.Abs(newValue.Subtract(expValue).Ticks))
+ {
+ TestLibrary.TestFramework.LogError("003", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ") Diff("+newValue.Subtract(expValue).Ticks+")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToDateTime(curValue, myfp);
+
+ if (9999999 <= Math.Abs(newValue.Subtract(expValue).Ticks))
+ {
+ TestLibrary.TestFramework.LogError("004", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ") Diff("+newValue.Subtract(expValue).Ticks+")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodecimal.cs b/tests/src/CoreMangLib/cti/system/convert/converttodecimal.cs
new file mode 100644
index 0000000000..253c631b7f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodecimal.cs
@@ -0,0 +1,174 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ConvertToDecimal
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ConvertToDecimal ac = new ConvertToDecimal();
+
+ TestLibrary.TestFramework.BeginTestCase("Convert.ToDecimal(...)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ // public static decimal ToDecimal(object value)
+ public bool PosTest1() { return PosTest<object>(1, Decimal.MaxValue.ToString(), Decimal.MaxValue); }
+ public bool PosTest2() { return PosTest<object>(2, Decimal.MinValue.ToString(), Decimal.MinValue); }
+ public bool PosTest3() { return PosTest<object>(3, null, 0); }
+
+ public bool PosTest4() { return PosTest<Boolean>(4, true, 1m); }
+ public bool PosTest5() { return PosTest<Boolean>(5, false, 0m); }
+
+ public bool PosTest6() { return PosTest2(6, null, 0m); }
+ public bool PosTest7() { return PosTest2(7, "90384230390" + TestLibrary.Utilities.CurrentCulture.NumberFormat.NumberDecimalSeparator + "0384", 90384230390.0384m); }
+
+ // public static byte ToByte(object value) {
+ public bool PosTest8() { return PosTest2(8, null, 0); }
+ public bool PosTest9() { return PosTest2(9, "34", 34); }
+
+ public bool NegTest1() { return NegTest<char>(1, ' ', typeof(System.InvalidCastException)); }
+ public bool NegTest2() { return NegTest<DateTime>(2, DateTime.Now, typeof(System.InvalidCastException)); }
+
+ public bool PosTest<T>(int id, T curValue, Decimal expValue)
+ {
+ bool retVal = true;
+ Decimal newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToDecimal(...) (curValue:"+typeof(T)+" " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToDecimal(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("000", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToDecimal(curValue, myfp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2(int id, String curValue, Decimal expValue)
+ {
+ bool retVal = true;
+ Decimal newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToDecimal(...) (curValue:string " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToDecimal(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("003", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToDecimal(curValue, myfp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("004", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest<T>(int id, T curValue, Type exception)
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Convert.ToDecimal(...) (curValue:"+typeof(T)+" " +curValue+"");
+
+ try
+ {
+ Convert.ToDecimal(curValue);
+
+ TestLibrary.TestFramework.LogError("006", "Exception expected");
+ retVal = false;
+ }
+ catch (Exception e)
+ {
+ if (e.GetType() != exception)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodecimal1.cs b/tests/src/CoreMangLib/cti/system/convert/converttodecimal1.cs
new file mode 100644
index 0000000000..bb61282edb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodecimal1.cs
@@ -0,0 +1,145 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToDecimal(System.UInt16)
+/// </summary>
+public class ConvertToDecimal1
+{
+ public static int Main()
+ {
+ ConvertToDecimal1 testObj = new ConvertToDecimal1();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToDecimal(System.UInt16)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ System.UInt16 b;
+
+ Decimal actualValue;
+
+ b = Convert.ToUInt16(TestLibrary.Generator.GetInt32(-55) % System.UInt16.MaxValue);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Verify the parameter is a Random System.UInt16 ");
+ try
+ {
+ actualValue = Convert.ToDecimal(b);
+
+ if (actualValue != b)
+ {
+ errorDesc = "The Decimal value " + b + " is not the value " + b +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\n The System.UInt16 value is " + b;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ System.UInt16 b;
+
+ Decimal actualValue;
+
+ b = System.UInt16.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: value is USystem.UInt16.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToDecimal(b);
+
+ if (actualValue != b)
+ {
+ errorDesc = "The Decimal value " + b + " is not the value " + b +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe byte value is " + b;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ System.UInt16 b;
+
+ Decimal actualValue;
+
+ b = System.UInt16.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: value is System.UInt16.MinValue.");
+ try
+ {
+ actualValue = Convert.ToDecimal(b);
+
+ if (actualValue != b)
+ {
+ errorDesc = "The Decimal value " + b + " is not the value " + b +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe System.UInt16 value is " + b;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodecimal10.cs b/tests/src/CoreMangLib/cti/system/convert/converttodecimal10.cs
new file mode 100644
index 0000000000..04654f8e80
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodecimal10.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToDecimal(Double)
+/// </summary>
+public class ConvertToDecimal10
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random double value to decimal");
+
+ try
+ {
+ double doubleValue = TestLibrary.Generator.GetDouble(-55);
+ decimal decimalValue = Convert.ToDecimal(doubleValue);
+ if (decimalValue != (decimal)doubleValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert zero to decimal");
+
+ try
+ {
+ double doubleValue = 0;
+ decimal decimalValue = Convert.ToDecimal(doubleValue);
+ if (decimalValue != (decimal)doubleValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The numeric value of value is greater than DecimalMaxValue");
+
+ try
+ {
+ double doubleValue = double.MaxValue;
+ decimal decimalValue = Convert.ToDecimal(doubleValue);
+ TestLibrary.TestFramework.LogError("101", "The OverflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The numeric value of value is greater than DecimalMinvalue");
+
+ try
+ {
+ double doubleValue = double.MinValue;
+ decimal decimalValue = Convert.ToDecimal(doubleValue);
+ TestLibrary.TestFramework.LogError("103", "The OverflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToDecimal10 test = new ConvertToDecimal10();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToDecimal10");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodecimal11.cs b/tests/src/CoreMangLib/cti/system/convert/converttodecimal11.cs
new file mode 100644
index 0000000000..58b03c22ef
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodecimal11.cs
@@ -0,0 +1,144 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToDecimal(Int32)
+/// </summary>
+public class ConvertToDecimal11
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random int32 to decimal");
+
+ try
+ {
+ Int32 i = this.GetInt32(Int32.MinValue, Int32.MaxValue);
+ decimal decimalValue = Convert.ToDecimal(i);
+ if (decimalValue != i)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert Int32MaxValue to decimal");
+
+ try
+ {
+ Int32 i = Int32.MaxValue;
+ decimal decimalValue = Convert.ToDecimal(i);
+ if (decimalValue != i)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert Int32MinValue to decimal");
+
+ try
+ {
+ Int32 i = Int32.MinValue;
+ decimal decimalValue = Convert.ToDecimal(i);
+ if (decimalValue != i)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToDecimal11 test = new ConvertToDecimal11();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToDecimal11");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodecimal12.cs b/tests/src/CoreMangLib/cti/system/convert/converttodecimal12.cs
new file mode 100644
index 0000000000..6b8c3a79c7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodecimal12.cs
@@ -0,0 +1,144 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToDecimal(Int16)
+/// </summary>
+public class ConvertToDecimal12
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random int16 to decimal");
+
+ try
+ {
+ Int16 i = this.GetInt16(Int16.MinValue, Int16.MaxValue);
+ decimal decimalValue = Convert.ToDecimal(i);
+ if (decimalValue != i)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is:" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert Int16MaxValue to decimal");
+
+ try
+ {
+ Int16 i = Int16.MaxValue;
+ decimal decimalValue = Convert.ToDecimal(i);
+ if (decimalValue != i)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert Int16MinValue to decimal");
+
+ try
+ {
+ Int16 i = Int16.MinValue;
+ decimal decimalValue = Convert.ToDecimal(i);
+ if (decimalValue != i)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToDecimal12 test = new ConvertToDecimal12();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToDecimal12");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int16 GetInt16(Int16 minValue, Int16 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return (Int16)(minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodecimal13.cs b/tests/src/CoreMangLib/cti/system/convert/converttodecimal13.cs
new file mode 100644
index 0000000000..6555a9d2bc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodecimal13.cs
@@ -0,0 +1,144 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToDecimal(Int64)
+/// </summary>
+public class ConvertToDecimal13
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random int64 to decimal");
+
+ try
+ {
+ Int64 i = this.GetInt64(Int64.MinValue, Int64.MaxValue);
+ decimal decimalValue = Convert.ToDecimal(i);
+ if (decimalValue != i)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is:" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert Int64MaxValue to decimal");
+
+ try
+ {
+ Int64 i = Int64.MaxValue;
+ decimal decimalValue = Convert.ToDecimal(i);
+ if (decimalValue != i)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert Int64MinValue to decimal");
+
+ try
+ {
+ Int64 i = Int64.MinValue;
+ decimal decimalValue = Convert.ToDecimal(i);
+ if (decimalValue != i)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToDecimal13 test = new ConvertToDecimal13();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToDecimal13");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int64 GetInt64(Int64 minValue, Int64 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return (Int64)(minValue + TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodecimal14.cs b/tests/src/CoreMangLib/cti/system/convert/converttodecimal14.cs
new file mode 100644
index 0000000000..d64f5c9ed1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodecimal14.cs
@@ -0,0 +1,301 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToDecimal(Object)
+/// </summary>
+public class ConvertToDecimal14
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The object is a byte");
+
+ try
+ {
+ byte i = TestLibrary.Generator.GetByte(-55);
+ object ob = i;
+ decimal decimalValue = Convert.ToDecimal(ob);
+ if (decimalValue != i)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The object is an int32");
+
+ try
+ {
+ Int32 i = TestLibrary.Generator.GetInt32(-55);
+ object ob = i;
+ decimal decimalValue = Convert.ToDecimal(ob);
+ if (decimalValue != i)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,i is" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The object is a double");
+
+ try
+ {
+ double i = TestLibrary.Generator.GetDouble(-55);
+ object ob = i;
+ decimal decimalValue = Convert.ToDecimal(ob);
+ if (decimalValue != (i as IConvertible).ToDecimal(null))
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected,i is" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: The object is a string");
+
+ try
+ {
+ string i = "-10001";
+ object ob = i;
+ decimal decimalValue = Convert.ToDecimal(ob);
+ if (decimalValue != -10001)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected,i is" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: The object is a custom class which implement the iconvertible interface");
+
+ try
+ {
+ MyClass myClass = new MyClass();
+ object ob = myClass;
+ decimal decimalValue = Convert.ToDecimal(ob);
+ if (decimalValue != -1)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The conversion is invalid");
+
+ try
+ {
+ char i = '1';
+ object ob = i;
+ decimal decimalValue = Convert.ToDecimal(ob);
+ TestLibrary.TestFramework.LogError("101", "The InvalidCastException was not thrown as expected");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToDecimal14 test = new ConvertToDecimal14();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToDecimal14");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+public class MyClass : IConvertible
+{
+ #region IConvertible Members
+
+ public TypeCode GetTypeCode()
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public bool ToBoolean(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public byte ToByte(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public char ToChar(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public DateTime ToDateTime(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public decimal ToDecimal(IFormatProvider provider)
+ {
+ return -1;
+ }
+
+ public double ToDouble(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public short ToInt16(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public int ToInt32(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public long ToInt64(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public sbyte ToSByte(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public float ToSingle(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public string ToString(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public object ToType(Type conversionType, IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public ushort ToUInt16(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public uint ToUInt32(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public ulong ToUInt64(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodecimal15.cs b/tests/src/CoreMangLib/cti/system/convert/converttodecimal15.cs
new file mode 100644
index 0000000000..5aed44bc45
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodecimal15.cs
@@ -0,0 +1,344 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// System.Convert.ToDecimal(Object,IFormatProvider)
+/// </summary>
+public class ConvertToDecimal15
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The object is a byte");
+
+ try
+ {
+ byte i = TestLibrary.Generator.GetByte(-55);
+ object ob = i;
+ IFormatProvider iFormatProvider = new CultureInfo("en-US");
+ decimal decimalValue = Convert.ToDecimal(ob, iFormatProvider);
+ if (decimalValue != i)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The object is an int32");
+
+ try
+ {
+ Int32 i = TestLibrary.Generator.GetInt32(-55);
+ object ob = i;
+ IFormatProvider iFormatProvider = new CultureInfo("fr-FR");
+ decimal decimalValue = Convert.ToDecimal(ob, iFormatProvider);
+ if (decimalValue != i)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,i is" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The object is a double and the Iformatprovider is a null reference");
+
+ try
+ {
+ double i = TestLibrary.Generator.GetDouble(-55);
+ object ob = i;
+ IFormatProvider iFormatProvider = null;
+ decimal decimalValue = Convert.ToDecimal(ob, iFormatProvider);
+ if (decimalValue != (i as IConvertible).ToDecimal(null))
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected,i is" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: The object is a string and the cultureinfo is fr-FR");
+
+ try
+ {
+ string i = "-100 123 456";
+ object ob = i;
+ IFormatProvider iFormatProvider = new CultureInfo("fr-FR");
+ decimal decimalValue = Convert.ToDecimal(ob, iFormatProvider);
+ if (decimalValue != -100123456)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected,i is" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: The object is a string and the cultureinfo is en-US");
+
+ try
+ {
+ string i = "-100,123,456.12345";
+ object ob = i;
+ IFormatProvider iFormatProvider = new CultureInfo("en-US");
+ decimal decimalValue = Convert.ToDecimal(ob, iFormatProvider);
+ if (decimalValue != -100123456.12345M)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected,i is" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: The object is a custom class which implement the iconvertible interface");
+
+ try
+ {
+ MyClass myClass = new MyClass();
+ object ob = myClass;
+ IFormatProvider iFormatProvider = new CultureInfo("en-US");
+ decimal decimalValue = Convert.ToDecimal(ob, iFormatProvider);
+ if (decimalValue != -1)
+ {
+ TestLibrary.TestFramework.LogError("011", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The conversion is invalid");
+
+ try
+ {
+ char i = '1';
+ object ob = i;
+ IFormatProvider iFormatProvider = new CultureInfo("en-US");
+ decimal decimalValue = Convert.ToDecimal(ob, iFormatProvider);
+ TestLibrary.TestFramework.LogError("101", "The InvalidCastException was not thrown as expected");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToDecimal15 test = new ConvertToDecimal15();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToDecimal15");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+public class MyClass : IConvertible
+{
+ #region IConvertible Members
+
+ public TypeCode GetTypeCode()
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public bool ToBoolean(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public byte ToByte(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public char ToChar(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public DateTime ToDateTime(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public decimal ToDecimal(IFormatProvider provider)
+ {
+ if (((CultureInfo)provider).Equals(new CultureInfo("en-US")))
+ {
+ return -1;
+ }
+ if (((CultureInfo)provider).Equals(new CultureInfo("fr-FR")))
+ {
+ return 1;
+ }
+ return 0;
+ }
+
+ public double ToDouble(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public short ToInt16(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public int ToInt32(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public long ToInt64(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public sbyte ToSByte(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public float ToSingle(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public string ToString(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public object ToType(Type conversionType, IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public ushort ToUInt16(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public uint ToUInt32(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ public ulong ToUInt64(IFormatProvider provider)
+ {
+ throw new System.Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodecimal16.cs b/tests/src/CoreMangLib/cti/system/convert/converttodecimal16.cs
new file mode 100644
index 0000000000..af59f24f38
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodecimal16.cs
@@ -0,0 +1,144 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToDecimal(Sbyte)
+/// </summary>
+public class ConvertToDecimal16
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random sbyte to decimal");
+
+ try
+ {
+ sbyte i = this.GetSByte(sbyte.MinValue, sbyte.MaxValue);
+ decimal decimalValue = Convert.ToDecimal(i);
+ if (decimalValue != i)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is:"+i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert sbyteMaxValue to decimal");
+
+ try
+ {
+ SByte i = SByte.MaxValue;
+ decimal decimalValue = Convert.ToDecimal(i);
+ if (decimalValue != i)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert SByteMinValue to decimal");
+
+ try
+ {
+ SByte i = SByte.MinValue;
+ decimal decimalValue = Convert.ToDecimal(i);
+ if (decimalValue != i)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToDecimal16 test = new ConvertToDecimal16();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToDecimal16");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private sbyte GetSByte(sbyte minValue, sbyte maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return (sbyte)(minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodecimal17.cs b/tests/src/CoreMangLib/cti/system/convert/converttodecimal17.cs
new file mode 100644
index 0000000000..df09b7ac8a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodecimal17.cs
@@ -0,0 +1,124 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToDecimal(Single)
+/// </summary>
+public class ConvertToDecimal17
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random Single to decimal");
+
+ try
+ {
+ Single i = TestLibrary.Generator.GetSingle(-55);
+ decimal decimalValue = Convert.ToDecimal(i);
+ if (decimalValue != (i as IConvertible).ToDecimal(null))
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is:" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check a single which is -.123");
+
+ try
+ {
+ Single i = -.123f;
+ decimal decimalValue = Convert.ToDecimal(i);
+ if (decimalValue != -0.123m)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check a single which is +.123");
+
+ try
+ {
+ Single i = (Single)(+.123);
+ decimal decimalValue = Convert.ToDecimal(i);
+ if (decimalValue != 0.123m)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToDecimal17 test = new ConvertToDecimal17();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToDecimal17");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodecimal18.cs b/tests/src/CoreMangLib/cti/system/convert/converttodecimal18.cs
new file mode 100644
index 0000000000..bf9219e6eb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodecimal18.cs
@@ -0,0 +1,142 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToDecimal()
+/// </summary>
+public class ConvertToDecimal18
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ //retVal = PosTest2() && retVal;
+ //retVal = PosTest3() && retVal;
+ //retVal = PosTest4() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+ // retVal = NegTest2() && retVal;
+ // retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ");
+
+ try
+ {
+ //
+ // Add your test logic here
+ //
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //public bool PosTest2()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("PosTest2: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+
+ //public bool PosTest3()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("PosTest3: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToDecimal18 test = new ConvertToDecimal18();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToDecimal18");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodecimal2.cs b/tests/src/CoreMangLib/cti/system/convert/converttodecimal2.cs
new file mode 100644
index 0000000000..608db285f3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodecimal2.cs
@@ -0,0 +1,145 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToDecimal(System.UInt32)
+/// </summary>
+public class ConvertToDecimal2
+{
+ public static int Main()
+ {
+ ConvertToDecimal2 testObj = new ConvertToDecimal2();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToDecimal(System.UInt32)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ System.UInt32 b;
+
+ Decimal actualValue;
+
+ b = Convert.ToUInt32(TestLibrary.Generator.GetInt64(-55) % System.UInt32.MaxValue);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Verify the parameter is a Random System.UInt32 ");
+ try
+ {
+ actualValue = Convert.ToDecimal(b);
+
+ if (actualValue != b)
+ {
+ errorDesc = "The Decimal value " + b + " is not the value " + b +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\n The System.UInt32 value is " + b;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ System.UInt32 b;
+
+ Decimal actualValue;
+
+ b = System.UInt32.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: value is USystem.UInt32.MaxValue.");
+ try
+ {
+ actualValue = Convert.ToDecimal(b);
+
+ if (actualValue != b)
+ {
+ errorDesc = "The Decimal value value " + b + " is not the value " + b +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe byte value is " + b;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ System.UInt32 b;
+
+ Decimal actualValue;
+
+ b = System.UInt32.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: value is System.UInt32.MinValue.");
+ try
+ {
+ actualValue = Convert.ToDecimal(b);
+
+ if (actualValue != b)
+ {
+ errorDesc = "The Decimal value integer " + b + " is not the value " + b +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe System.UInt32 value is " + b;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodecimal5.cs b/tests/src/CoreMangLib/cti/system/convert/converttodecimal5.cs
new file mode 100644
index 0000000000..aa529292d4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodecimal5.cs
@@ -0,0 +1,98 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToDecimal(boolean)
+/// </summary>
+public class ConvertToDecimal5
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The bool value is true");
+
+ try
+ {
+ bool boolValue = true;
+ decimal decimalValue = Convert.ToDecimal(boolValue);
+ if (decimalValue != 1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The bool value is false");
+
+ try
+ {
+ bool boolValue = false;
+ decimal decimalValue = Convert.ToDecimal(boolValue);
+ if (decimalValue != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToDecimal5 test = new ConvertToDecimal5();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToDecimal5");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodecimal6.cs b/tests/src/CoreMangLib/cti/system/convert/converttodecimal6.cs
new file mode 100644
index 0000000000..23563b06c5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodecimal6.cs
@@ -0,0 +1,144 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToDecimal(Byte)
+/// </summary>
+public class ConvertToDecimal6
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random byte value to decimal");
+
+ try
+ {
+ Byte ByteValue = this.GetByte(byte.MinValue, byte.MaxValue);
+ decimal decimalValue = Convert.ToDecimal(ByteValue);
+ if (decimalValue != ByteValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert byteMaxValue to decimal");
+
+ try
+ {
+ Byte ByteValue = byte.MaxValue;
+ decimal decimalValue = Convert.ToDecimal(ByteValue);
+ if (decimalValue != byte.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert byteMinValue to decimal");
+
+ try
+ {
+ Byte ByteValue = byte.MinValue;
+ decimal decimalValue = Convert.ToDecimal(ByteValue);
+ if (decimalValue != byte.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToDecimal6 test = new ConvertToDecimal6();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToDecimal6");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Byte GetByte(byte minValue, byte maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return (minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return (byte)(minValue + TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodecimal8.cs b/tests/src/CoreMangLib/cti/system/convert/converttodecimal8.cs
new file mode 100644
index 0000000000..7dabe08d36
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodecimal8.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToDecimal(DateTime)
+/// </summary>
+public class ConvertToDecimal8
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Call this method always throws InvalidCastException");
+
+ try
+ {
+ DateTime dateTime = new DateTime();
+ decimal decimalValue = Convert.ToDecimal(dateTime);
+ TestLibrary.TestFramework.LogError("101", "The InvalidCastException was not thrown as expected");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToDecimal8 test = new ConvertToDecimal8();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToDecimal8");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodecimal9.cs b/tests/src/CoreMangLib/cti/system/convert/converttodecimal9.cs
new file mode 100644
index 0000000000..47baed0dd0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodecimal9.cs
@@ -0,0 +1,156 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToDecimal(Decimal)
+/// </summary>
+public class ConvertToDecimal9
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Construct a random decimal");
+
+ int low = TestLibrary.Generator.GetInt32(-55);
+ int mid = TestLibrary.Generator.GetInt32(-55);
+ int hi = TestLibrary.Generator.GetInt32(-55);
+ int flags = 0x1C0000;
+ int[] arrInt ={ low, mid, hi, flags };
+
+ try
+ {
+ decimal decimalSource = new decimal(arrInt);
+ decimal decimalValue = Convert.ToDecimal(decimalSource);
+ if (decimalValue != decimalSource)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The decimal is zero");
+
+ try
+ {
+ decimal decimalSource = new decimal(0);
+ decimal decimalValue = Convert.ToDecimal(decimalSource);
+ if (decimalValue != decimalSource)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert decimalMaxValue to decimal");
+
+ try
+ {
+ decimal decimalSource = Decimal.MaxValue;
+ decimal decimalValue = Convert.ToDecimal(decimalSource);
+ if (decimalValue != decimalSource)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert decimalMinValue to decimal");
+
+ try
+ {
+ decimal decimalSource = Decimal.MinValue;
+ decimal decimalValue = Convert.ToDecimal(decimalSource);
+ if (decimalValue != decimalSource)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToDecimal9 test = new ConvertToDecimal9();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToDecimal9");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodouble.cs b/tests/src/CoreMangLib/cti/system/convert/converttodouble.cs
new file mode 100644
index 0000000000..0e55ca207b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodouble.cs
@@ -0,0 +1,181 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ConvertToDouble
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ConvertToDouble ac = new ConvertToDouble();
+
+ TestLibrary.TestFramework.BeginTestCase("Convert.ToDouble(...)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+ retVal = PosTest12() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ // public static Double ToDouble(object value)
+ public bool PosTest1() { return PosTest<object>(1, (object)Double.MaxValue, Double.MaxValue); }
+ public bool PosTest2() { return PosTest<object>(2, (object)Double.MinValue, Double.MinValue); }
+ public bool PosTest3() { return PosTest<object>(3, null, 0); }
+
+ public bool PosTest4() { return PosTest<Boolean>(4, true, 1d); }
+ public bool PosTest5() { return PosTest<Boolean>(5, false, 0d); }
+
+ public bool PosTest6() { return PosTest2(6, null, 0d); }
+ public bool PosTest7() { return PosTest2(7, "90384230390" + System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator + "0384", 90384230390.0384d); }
+
+ // public static byte ToByte(object value) {
+ public bool PosTest8() { return PosTest2(8, null, 0); }
+ public bool PosTest9() { return PosTest2(9, "34", 34); }
+
+ public bool PosTest10() { return PosTest<object>(10, (object)Double.PositiveInfinity, Double.PositiveInfinity); }
+ public bool PosTest11() { return PosTest<object>(11, (object)Double.NegativeInfinity, Double.NegativeInfinity); }
+ public bool PosTest12() { return PosTest<object>(12, (object)Double.NaN, Double.NaN); }
+
+ public bool NegTest1() { return NegTest<char>(1, ' ', typeof(System.InvalidCastException)); }
+ public bool NegTest2() { return NegTest<DateTime>(2, DateTime.Now, typeof(System.InvalidCastException)); }
+
+ public bool PosTest<T>(int id, T curValue, Double expValue)
+ {
+ bool retVal = true;
+ Double newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToDouble(...) (curValue:"+typeof(T)+" " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToDouble(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("000", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToDouble(curValue, myfp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2(int id, String curValue, Double expValue)
+ {
+ bool retVal = true;
+ Double newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToDouble(...) (curValue:string " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToDouble(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("003", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToDouble(curValue, myfp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("004", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest<T>(int id, T curValue, Type exception)
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Convert.ToDouble(...) (curValue:"+typeof(T)+" " +curValue+"");
+
+ try
+ {
+ Convert.ToDouble(curValue);
+
+ TestLibrary.TestFramework.LogError("006", "Exception expected");
+ retVal = false;
+ }
+ catch (Exception e)
+ {
+ if (e.GetType() != exception)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodouble10.cs b/tests/src/CoreMangLib/cti/system/convert/converttodouble10.cs
new file mode 100644
index 0000000000..5bab01f19f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodouble10.cs
@@ -0,0 +1,305 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Convert.ToDouble(Object)
+/// </summary>
+public class ConvertToDouble10
+{
+ public static int Main()
+ {
+ ConvertToDouble10 testObj = new ConvertToDouble10();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToDouble(Object)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1();
+ retVal = NegTest2();
+ retVal = NegTest3();
+ retVal = NegTest4();
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verfify value is a vaild string and IFormatProvider is a null reference... ";
+ string c_TEST_ID = "P001";
+
+ string actualValue = "62356.123";
+ IFormatProvider provider = null;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ Double resValue = Convert.ToDouble((Object)actualValue, provider);
+ if (Double.Parse(actualValue) != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verfify value is a valid double and IFormatProvider is a null reference... ";
+ string c_TEST_ID = "P002";
+
+ Double actualValue = TestLibrary.Generator.GetDouble(-55);
+ IFormatProvider provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble((Object)actualValue,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verfify value is a formated string... ";
+ string c_TEST_ID = "P003";
+
+ string actualValue = "365,982.123";
+ NumberFormatInfo provider = new NumberFormatInfo();
+
+ provider.NumberDecimalSeparator = ".";
+ provider.NumberGroupSeparator = ",";
+ provider.NumberGroupSizes = new int[] { 3 };
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble((Object)actualValue);
+ if (Double.Parse(actualValue,provider) != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest4: Verfify value is a null reference and IFormatProvider is a null reference ... ";
+ string c_TEST_ID = "P004";
+
+ Object actualValue = null;
+ IFormatProvider provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue,provider);
+ if (0 != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is 0";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region NegativeTesting
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: value does not implement IConvertible interface and IFormatProvider is a null reference...";
+ const string c_TEST_ID = "N001";
+
+
+ Object actualValue = new Object();
+ IFormatProvider provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToDouble(actualValue,provider);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, "InvalidCastException is not thrown as expected.");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: value is a string to double overflowed and IFormatProvider is a null reference...";
+ const string c_TEST_ID = "N002";
+
+
+ string actualValue = "2.7976931348623157E+308";
+ IFormatProvider provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToDouble((Object)actualValue, provider);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, "OverflowException is not thrown as expected.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest3: value is a string cantains invalid chars and IFormatProvider is a null reference...";
+ const string c_TEST_ID = "N003";
+
+
+ string actualValue = "3222.79asd";
+ IFormatProvider provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToDouble((Object)actualValue,provider);
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, "FormatException is not thrown as expected.");
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest4: value is a string that don't supply given IFormatProvider...";
+ const string c_TEST_ID = "N004";
+
+
+ string actualValue = "3,652,658.123";
+ NumberFormatInfo provider = new NumberFormatInfo();
+
+ provider.NumberDecimalSeparator = ",";
+ provider.NumberGroupSeparator = ".";
+ provider.NumberGroupSizes = new int[] { 3 };
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToDouble((Object)actualValue,provider);
+ TestLibrary.TestFramework.LogError("015" + " TestId-" + c_TEST_ID, "FormatException is not thrown as expected.");
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodouble11.cs b/tests/src/CoreMangLib/cti/system/convert/converttodouble11.cs
new file mode 100644
index 0000000000..f560ab37c9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodouble11.cs
@@ -0,0 +1,177 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToDouble(System.SByte)
+/// </summary>
+public class ConvertToDouble11
+{
+ public static int Main()
+ {
+ ConvertToDouble11 testObj = new ConvertToDouble11();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToDouble(System.SByte)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verfify value is a random SByte... ";
+ string c_TEST_ID = "P001";
+
+ SByte actualValue = GetSByte();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verfify value is SByte.MaxValue... ";
+ string c_TEST_ID = "P002";
+
+ SByte actualValue = SByte.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verfify value is SByte.MinValue... ";
+ string c_TEST_ID = "P003";
+
+ SByte actualValue = SByte.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest4: Verfify value is zero... ";
+ string c_TEST_ID = "P004";
+
+ SByte actualValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region HelpClass
+ // returns a non-negative Byte between 0 and SByte.MaxValue
+ private SByte GetSByte()
+ {
+ Random rand = new Random(-55);
+ SByte i = Convert.ToSByte(rand.Next() % (1 + SByte.MaxValue));
+ return i;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodouble12.cs b/tests/src/CoreMangLib/cti/system/convert/converttodouble12.cs
new file mode 100644
index 0000000000..72b95bebc3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodouble12.cs
@@ -0,0 +1,168 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToDouble(System.Single)
+/// </summary>
+public class ConvertToDouble12
+{
+ public static int Main()
+ {
+ ConvertToDouble12 testObj = new ConvertToDouble12();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToDouble(System.Single)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verfify value is a random Single... ";
+ string c_TEST_ID = "P001";
+
+ Single actualValue = TestLibrary.Generator.GetSingle(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verfify value is Single.MaxValue... ";
+ string c_TEST_ID = "P002";
+
+ Single actualValue = Single.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verfify value is Single.MinValue... ";
+ string c_TEST_ID = "P003";
+
+ Single actualValue = Single.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest4: Verfify value is zero... ";
+ string c_TEST_ID = "P004";
+
+ Single actualValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodouble13.cs b/tests/src/CoreMangLib/cti/system/convert/converttodouble13.cs
new file mode 100644
index 0000000000..d3d3370bc7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodouble13.cs
@@ -0,0 +1,290 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToDouble(String)
+/// </summary>
+public class ConvertToDouble13
+{
+ public static int Main()
+ {
+ ConvertToDouble13 testObj = new ConvertToDouble13();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToDouble(String)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1();
+ retVal = NegTest2();
+ retVal = NegTest3();
+ retVal = NegTest4();
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verfify value is a vaild string ... ";
+ string c_TEST_ID = "P001";
+
+ string actualValue = "62356.123";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ Double resValue = Convert.ToDouble(actualValue);
+ if (Double.Parse(actualValue) != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verfify value is a null reference... ";
+ string c_TEST_ID = "P002";
+
+ String actualValue = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (0 != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is 0";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verfify value is a string end with a radix point... ";
+ string c_TEST_ID = "P003";
+
+ String actualValue = "7923.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ Double realValue = Double.Parse(actualValue);
+ if (realValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is"+ realValue;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest4: Verfify value is a string started with a radix point... ";
+ string c_TEST_ID = "P003";
+
+ String actualValue= ".7923";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ Double realValue = Double.Parse(actualValue);
+
+ if (realValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + realValue;
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region NegativeTesting
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: Value represents a number greater than Double.MaxValue ";
+ const string c_TEST_ID = "N001";
+
+
+ string actualValue = "2.7976931348623157E+308";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToDouble(actualValue);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, "OverflowException is not thrown as expected.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: Value represents a number less than Double.MaxValue ";
+ const string c_TEST_ID = "N002";
+
+
+ string actualValue = "-1.7976931348623159E+308";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToDouble(actualValue);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, "OverflowException is not thrown as expected.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest3: value is a string cantains invalid chars ";
+ const string c_TEST_ID = "N003";
+
+
+ string actualValue = "3222.79asd";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToDouble(actualValue);
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, "FormatException is not thrown as expected.");
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest4: value is a empty string ";
+ const string c_TEST_ID = "N004";
+
+
+ string actualValue = "";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToDouble(actualValue);
+ TestLibrary.TestFramework.LogError("015" + " TestId-" + c_TEST_ID, "FormatException is not thrown as expected.");
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodouble14.cs b/tests/src/CoreMangLib/cti/system/convert/converttodouble14.cs
new file mode 100644
index 0000000000..17db6f5320
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodouble14.cs
@@ -0,0 +1,336 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Convert.ToDouble(System.String,System.IFormatProvider)
+/// </summary>
+public class ConvertToDouble14
+{
+ public static int Main()
+ {
+ ConvertToDouble14 testObj = new ConvertToDouble14();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToDouble(System.String,System.IFormatProvider)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ private CultureInfo CurrentCulture = CultureInfo.CurrentCulture;
+ private CultureInfo customCulture = null;
+ private CultureInfo CustomCulture
+ {
+ get
+ {
+ if (null == customCulture)
+ {
+ customCulture = new CultureInfo(CultureInfo.CurrentCulture.Name);
+ NumberFormatInfo customNFI = new NumberFormatInfo();
+
+ customNFI.NumberDecimalSeparator = ".";
+ customNFI.NumberGroupSeparator = ",";
+ customNFI.NumberGroupSizes = new int[] { 3 };
+
+ customCulture.NumberFormat = customNFI;
+ }
+ return customCulture;
+ }
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Double actualValue;
+ string strDouble = "3,265.12358";
+ Double expVal = Double.Parse(strDouble, CustomCulture.NumberFormat);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Verify the string value is valid Double value");
+
+ try
+ {
+ actualValue = Convert.ToDouble(strDouble, CustomCulture.NumberFormat);
+
+ if (actualValue != expVal)
+ {
+ errorDesc = "The Double value " + strDouble + " is not the value " +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\n The string is " + strDouble;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+ // if provider null then currentculture is used
+ TestLibrary.Utilities.CurrentCulture = CustomCulture;
+ NumberFormatInfo provider = null;
+
+ Double actualValue;
+ string strDouble = "3265.12358";
+ Double expVal = Double.Parse(strDouble);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Verify the IFormatProvider is a null reference");
+
+ try
+ {
+ actualValue = Convert.ToDouble(strDouble, provider);
+
+ if (actualValue != expVal)
+ {
+ errorDesc = "The Double value " + strDouble + " is not the value " +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\n The string is " + strDouble;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ TestLibrary.Utilities.CurrentCulture = CurrentCulture;
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Double actualValue;
+ string strDouble = "3265.";
+ Double expVal = Double.Parse(strDouble, CustomCulture.NumberFormat);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Verify the string end with radix point");
+
+ try
+ {
+ actualValue = Convert.ToDouble(strDouble, CustomCulture.NumberFormat);
+
+ if (actualValue != expVal)
+ {
+ errorDesc = "The Double value " + strDouble + " is not the value " +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\n The string is " + strDouble;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Double actualValue;
+ string strDouble = ".3265";
+ Double expVal = Double.Parse(strDouble, CustomCulture.NumberFormat);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Verify the string start with radix point");
+
+ try
+ {
+ actualValue = Convert.ToDouble(strDouble, CustomCulture.NumberFormat);
+
+ if (actualValue != expVal)
+ {
+ errorDesc = "The Double value " + strDouble + " is not the value " +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("007", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\n The string is " + strDouble;
+ TestLibrary.TestFramework.LogError("008", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region NegativeTesting
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Verify the parameter is a random char...");
+
+ string strDouble = "3,265.123c58";
+
+ try
+ {
+ Convert.ToDouble(strDouble, CustomCulture.NumberFormat);
+ TestLibrary.TestFramework.LogError("009", "FormatException is not thrown as expected ." + "\n string is " + strDouble);
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:Verify the parameter represents a number less than MinValue...");
+
+ string strDouble = "-1.7976931348623159E+308";
+
+ try
+ {
+ Convert.ToDouble(strDouble, CustomCulture.NumberFormat);
+ TestLibrary.TestFramework.LogError("011", "OverflowException is not thrown as expected ." + "\n string is " + strDouble);
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3:Verify the parameter represents a number greater than MaxValue...");
+
+ string strDouble = "1.7976931348623159E+308";
+
+ try
+ {
+ Convert.ToDouble(strDouble, CustomCulture.NumberFormat);
+ TestLibrary.TestFramework.LogError("013", "OverflowException is not thrown as expected ." + "\n string is " + strDouble);
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4:Verify the parameter does not supply IFormatProvider...");
+
+ string strDouble = "1.485.355.146,79769";
+
+ try
+ {
+ Convert.ToDouble(strDouble, CustomCulture.NumberFormat);
+ TestLibrary.TestFramework.LogError("015", "FormatException is not thrown as expected ." + "\n string is " + strDouble);
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest5:Verify the string is empty");
+
+ string strDouble = "";
+
+ try
+ {
+ Convert.ToDouble(strDouble, CustomCulture.NumberFormat);
+ TestLibrary.TestFramework.LogError("017", "FormatException is not thrown as expected ." + "\n string is empty ");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodouble15.cs b/tests/src/CoreMangLib/cti/system/convert/converttodouble15.cs
new file mode 100644
index 0000000000..25a472981b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodouble15.cs
@@ -0,0 +1,136 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToDouble(System.UInt16)
+/// </summary>
+public class ConvertToDouble15
+{
+ public static int Main()
+ {
+ ConvertToDouble15 testObj = new ConvertToDouble15();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToDouble(System.UInt16)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verfify value is a random UInt16... ";
+ string c_TEST_ID = "P001";
+
+ UInt16 actualValue = Convert.ToUInt16(TestLibrary.Generator.GetInt32(-55) % System.UInt16.MaxValue);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify value is UInt16.MaxValue... ";
+ string c_TEST_ID = "P002";
+
+ UInt16 actualValue = UInt16.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify value is UInt16.MinValue... ";
+ string c_TEST_ID = "P003";
+
+ UInt16 actualValue = UInt16.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodouble16.cs b/tests/src/CoreMangLib/cti/system/convert/converttodouble16.cs
new file mode 100644
index 0000000000..579516c250
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodouble16.cs
@@ -0,0 +1,136 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToDouble(System.UInt32)
+/// </summary>
+public class ConvertToDouble16
+{
+ public static int Main()
+ {
+ ConvertToDouble16 testObj = new ConvertToDouble16();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToDouble(System.UInt32)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verify value is a random UInt32... ";
+ string c_TEST_ID = "P001";
+
+ UInt32 actualValue = Convert.ToUInt32(TestLibrary.Generator.GetInt64(-55) % System.UInt32.MaxValue);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify value is UInt32.MaxValue... ";
+ string c_TEST_ID = "P002";
+
+ UInt32 actualValue = UInt32.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify value is UInt32.MinValue... ";
+ string c_TEST_ID = "P003";
+
+ UInt32 actualValue = UInt32.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodouble17.cs b/tests/src/CoreMangLib/cti/system/convert/converttodouble17.cs
new file mode 100644
index 0000000000..cff04af69e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodouble17.cs
@@ -0,0 +1,157 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToDouble(System.UInt64)
+/// </summary>
+public class ConvertToDouble17
+{
+ public static int Main()
+ {
+ ConvertToDouble17 testObj = new ConvertToDouble17();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToDouble(System.UInt64)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verify value is a random UInt64... ";
+ string c_TEST_ID = "P001";
+
+ UInt64 actualValue = GetInta64();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify value is UInt64.MaxValue... ";
+ string c_TEST_ID = "P002";
+
+ UInt64 actualValue = UInt64.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify value is UInt64.MinValue... ";
+ string c_TEST_ID = "P003";
+
+ UInt64 actualValue = UInt64.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region HelpMethod
+ private UInt64 GetInta64()
+ {
+ byte[] buffer = new byte[8];
+ UInt64 iVal;
+ Random rand = new Random(-55);
+
+ rand.NextBytes(buffer);
+
+ // convert to UInt64
+ iVal = 0;
+ for (int i = 0; i < buffer.Length; i++)
+ {
+ iVal |= ((UInt64)buffer[i] << (i * 8));
+ }
+
+
+ return iVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodouble5.cs b/tests/src/CoreMangLib/cti/system/convert/converttodouble5.cs
new file mode 100644
index 0000000000..beb37c7279
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodouble5.cs
@@ -0,0 +1,264 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToDouble(System.Double)
+/// </summary>
+public class ConvertToDouble5
+{
+ public static int Main()
+ {
+ ConvertToDouble5 testObj = new ConvertToDouble5();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToDouble(System.Double)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verfify value is a random double... ";
+ string c_TEST_ID = "P001";
+
+ Double actualValue = TestLibrary.Generator.GetDouble(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verfify value is Double.MaxValue... ";
+ string c_TEST_ID = "P002";
+
+ Double actualValue = Double.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verfify value is Double.MinValue... ";
+ string c_TEST_ID = "P003";
+
+ Double actualValue = Double.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest4: Verfify value is zero... ";
+ string c_TEST_ID = "P004";
+
+ Double actualValue =0.00;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest5: Verfify value is Double.NaN... ";
+ string c_TEST_ID = "P005";
+
+ Double actualValue = Double.NaN;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (!Double.IsNaN(resValue))
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest6: Verfify value is Double.NegativeInfinity... ";
+ string c_TEST_ID = "P006";
+
+ Double actualValue = Double.NegativeInfinity;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest7: Verfify value is Double.PositiveInfinity... ";
+ string c_TEST_ID = "P007";
+
+ Double actualValue = Double.PositiveInfinity;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodouble6.cs b/tests/src/CoreMangLib/cti/system/convert/converttodouble6.cs
new file mode 100644
index 0000000000..77a94196e4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodouble6.cs
@@ -0,0 +1,168 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToDouble(System.Int16)
+/// </summary>
+public class ConvertToDouble6
+{
+ public static int Main()
+ {
+ ConvertToDouble6 testObj = new ConvertToDouble6();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToDouble(System.Int16)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verfify value is a random Int16... ";
+ string c_TEST_ID = "P001";
+
+ Int16 actualValue = TestLibrary.Generator.GetInt16(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verfify value is Int16.MaxValue... ";
+ string c_TEST_ID = "P002";
+
+ Int16 actualValue = Int16.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verfify value is Int16.MinValue... ";
+ string c_TEST_ID = "P003";
+
+ Int16 actualValue = Int16.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest4: Verfify value is zero... ";
+ string c_TEST_ID = "P004";
+
+ Int16 actualValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodouble7.cs b/tests/src/CoreMangLib/cti/system/convert/converttodouble7.cs
new file mode 100644
index 0000000000..bbf484311d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodouble7.cs
@@ -0,0 +1,168 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToDouble(System.Int32)
+/// </summary>
+public class ConvertToDouble7
+{
+ public static int Main()
+ {
+ ConvertToDouble7 testObj = new ConvertToDouble7();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToDouble(System.Int32)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verfify value is a random Int32... ";
+ string c_TEST_ID = "P001";
+
+ Int32 actualValue = TestLibrary.Generator.GetInt32(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verfify value is Int32.MaxValue... ";
+ string c_TEST_ID = "P002";
+
+ Int32 actualValue = Int32.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verfify value is Int32.MinValue... ";
+ string c_TEST_ID = "P003";
+
+ Int32 actualValue = Int32.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest4: Verfify value is zero... ";
+ string c_TEST_ID = "P004";
+
+ Int32 actualValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodouble8.cs b/tests/src/CoreMangLib/cti/system/convert/converttodouble8.cs
new file mode 100644
index 0000000000..890e9e3e57
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodouble8.cs
@@ -0,0 +1,168 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToDouble(System.Int64)
+/// </summary>
+public class ConvertToDouble8
+{
+ public static int Main()
+ {
+ ConvertToDouble8 testObj = new ConvertToDouble8();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToDouble(System.Int64)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verfify value is a random Int64... ";
+ string c_TEST_ID = "P001";
+
+ Int64 actualValue = TestLibrary.Generator.GetInt64(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verfify value is Int64.MaxValue... ";
+ string c_TEST_ID = "P002";
+
+ Int64 actualValue = Int64.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verfify value is Int64.MinValue... ";
+ string c_TEST_ID = "P003";
+
+ Int64 actualValue = Int64.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest4: Verfify value is zero... ";
+ string c_TEST_ID = "P004";
+
+ Int64 actualValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttodouble9.cs b/tests/src/CoreMangLib/cti/system/convert/converttodouble9.cs
new file mode 100644
index 0000000000..5134be4c17
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttodouble9.cs
@@ -0,0 +1,259 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToDouble(Object)
+/// </summary>
+public class ConvertToDouble9
+{
+ public static int Main()
+ {
+ ConvertToDouble9 testObj = new ConvertToDouble9();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToDouble(Object)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1();
+ retVal = NegTest2();
+ retVal = NegTest3();
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verfify value is a vaild string ... ";
+ string c_TEST_ID = "P001";
+
+ string actualValue = "62356.123";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ Double resValue = Convert.ToDouble((Object)actualValue);
+ if (Double.Parse(actualValue) != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verfify value is a valid double... ";
+ string c_TEST_ID = "P002";
+
+ Double actualValue = TestLibrary.Generator.GetDouble(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble((Object)actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verfify value is a valid Int32... ";
+ string c_TEST_ID = "P003";
+
+ Int32 actualValue = TestLibrary.Generator.GetInt32(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble((Object)actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest4: Verfify value is a null reference... ";
+ string c_TEST_ID = "P004";
+
+ Object actualValue = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Double resValue = Convert.ToDouble(actualValue);
+ if (0 != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is 0";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region NegativeTesting
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: value does not implement IConvertible interface";
+ const string c_TEST_ID = "N001";
+
+
+ Object actualValue = new Object();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToDouble(actualValue);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, "InvalidCastException is not thrown as expected.");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: value is a string to double overflowed ";
+ const string c_TEST_ID = "N002";
+
+
+ string actualValue = "2.7976931348623157E+308";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToDouble((Object)actualValue);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, "OverflowException is not thrown as expected.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest3: value is a string cantains invalid chars ";
+ const string c_TEST_ID = "N003";
+
+
+ string actualValue = "3222.79asd";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToDouble((Object)actualValue);
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, "FormatException is not thrown as expected.");
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint16.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint16.cs
new file mode 100644
index 0000000000..89401a7aae
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint16.cs
@@ -0,0 +1,199 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ConvertToInt16
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ConvertToInt16 ac = new ConvertToInt16();
+
+ TestLibrary.TestFramework.BeginTestCase("Convert.ToInt16(...)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ // public static Int16 ToInt16(object value)
+ public bool PosTest1() { return PosTest<object>(1, (object)Int16.MaxValue, Int16.MaxValue); }
+ public bool PosTest2() { return PosTest<object>(2, (object)Int16.MinValue, Int16.MinValue); }
+ public bool PosTest3() { return PosTest<object>(3, null, 0); }
+
+ public bool PosTest4() { return PosTest<Boolean>(4, true, 1); }
+ public bool PosTest5() { return PosTest<Boolean>(5, false, 0); }
+
+ public bool PosTest6() { return PosTest2(6, null, 0); }
+ public bool PosTest7() { return PosTest2(7, "1034", 1034); }
+
+ // public static byte ToByte(object value) {
+ public bool PosTest8() { return PosTest2(8, null, 0); }
+ public bool PosTest9() { return PosTest2(9, "34", 34); }
+
+ public bool NegTest1() { return NegTest2(1, Int32.MaxValue.ToString(), 10, typeof(System.OverflowException)); }
+ public bool NegTest2() { return NegTest2(2, Int32.MinValue.ToString(), 10, typeof(System.OverflowException)); }
+
+ public bool PosTest<T>(int id, T curValue, Int16 expValue)
+ {
+ bool retVal = true;
+ Int16 newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToInt16(...) (curValue:"+typeof(T)+" " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToInt16(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("000", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToInt16(curValue, myfp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2(int id, String curValue, Int16 expValue)
+ {
+ bool retVal = true;
+ Int16 newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToInt16(...) (curValue:string " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToInt16(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("003", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToInt16(curValue, myfp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("004", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest<T>(int id, T curValue, Type exception)
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Convert.ToInt16(...) (curValue:"+typeof(T)+" " +curValue+"");
+
+ try
+ {
+ Convert.ToInt16(curValue);
+
+ TestLibrary.TestFramework.LogError("006", "Exception expected");
+ retVal = false;
+ }
+ catch (Exception e)
+ {
+ if (e.GetType() != exception)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2(int id, string curValue, int formBase, Type exception)
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Convert.ToInt16(...) (curValue:string " +curValue+"");
+
+ try
+ {
+ Convert.ToInt16(curValue, formBase);
+
+ TestLibrary.TestFramework.LogError("008", "Exception expected");
+ retVal = false;
+ }
+ catch (Exception e)
+ {
+ if (e.GetType() != exception)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint16_1.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint16_1.cs
new file mode 100644
index 0000000000..d5a3646d59
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint16_1.cs
@@ -0,0 +1,138 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt16(System.Boolean)
+/// </summary>
+
+public class ConvertToInt16_1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt16(true) .");
+
+ try
+ {
+ Int16 actual = Convert.ToInt16(true);
+ Int16 expected = 1;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling Convert.ToByte returns unexpected value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt16(false) .");
+
+ try
+ {
+ Int16 actual = Convert.ToInt16(false);
+ Int16 expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling Convert.ToByte returns unexpected value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt16_1 test = new ConvertToInt16_1();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt16_1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint16_10.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint16_10.cs
new file mode 100644
index 0000000000..e4777a7ab4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint16_10.cs
@@ -0,0 +1,282 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class TestClass
+{
+}
+
+public class TestFormatProvider : IFormatProvider
+{
+ public bool ToInt16MaxValue = true;
+
+ #region IFormatProvider Members
+
+ public object GetFormat(Type formatType)
+ {
+ if (formatType.Equals(typeof(TestFormatProvider)))
+ {
+ return this;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ #endregion
+}
+
+public class TestConvertableClass : IConvertible
+{
+ #region IConvertible Members
+
+ public TypeCode GetTypeCode()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool ToBoolean(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public short ToInt16(IFormatProvider provider)
+ {
+ bool toMinValue = true;
+
+ if (provider != null)
+ {
+ TestFormatProvider format = provider.GetFormat(typeof(TestFormatProvider)) as TestFormatProvider;
+ if ((format != null) && format.ToInt16MaxValue)
+ {
+ toMinValue = false;
+ }
+ }
+
+ if (toMinValue)
+ {
+ return Int16.MinValue;
+ }
+ else
+ {
+ return Int16.MaxValue;
+ }
+ }
+
+ public char ToChar(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public DateTime ToDateTime(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public decimal ToDecimal(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public double ToDouble(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public byte ToByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int ToInt32(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public long ToInt64(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public sbyte ToSByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public float ToSingle(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public string ToString(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public object ToType(Type conversionType, IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ushort ToUInt16(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public uint ToUInt32(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ulong ToUInt64(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+}
+
+/// <summary>
+/// ToInt16(System.Object,System.IFormatProvider)
+/// </summary>
+
+public class ConvertToInt16_10
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Convert.ToByte when value implements IConvertible");
+
+ try
+ {
+ retVal = VerificationHelper(true, null, 1, "001.1") && retVal;
+ retVal = VerificationHelper(1, null, 1, "001.2") && retVal;
+ retVal = VerificationHelper(0, null, 0, "001.3") && retVal;
+ retVal = VerificationHelper(new TestConvertableClass(), null, Int16.MinValue, "001.4") && retVal;
+
+ retVal = VerificationHelper(true, new TestFormatProvider(), 1, "001.5") && retVal;
+ retVal = VerificationHelper(1, new TestFormatProvider(), 1, "001.6") && retVal;
+ retVal = VerificationHelper(0, new TestFormatProvider(), 0, "001.7") && retVal;
+ retVal = VerificationHelper(new TestConvertableClass(), new TestFormatProvider(), Int16.MaxValue, "001.8") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Convert.ToByte when value is null");
+
+ try
+ {
+ retVal = VerificationHelper(null, null, 0, "002.1") && retVal;
+ retVal = VerificationHelper(null, new TestFormatProvider(), 0, "002.2") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: InvalidCastException should be thrown when value does not implement IConvertible. ");
+
+ try
+ {
+ Int16 actual = Convert.ToInt16(new TestClass());
+
+ TestLibrary.TestFramework.LogError("101.1", "InvalidCastException is not thrown when value does not implement IConvertible. ");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt16_10 test = new ConvertToInt16_10();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt16_10");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(object obj, IFormatProvider provider, Int16 desired, string errorno)
+ {
+ bool retVal = true;
+
+ Int16 actual = Convert.ToInt16(obj, provider);
+ if (actual != desired)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Convert.ToInt16 returns unexpected values");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", desired = " + desired + ", obj = " + obj);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint16_11.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint16_11.cs
new file mode 100644
index 0000000000..08c3e2a5c6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint16_11.cs
@@ -0,0 +1,113 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt16(System.SByte)
+/// </summary>
+
+public class ConvertToInt16_11
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt16(System.SByte) .");
+
+ try
+ {
+ sbyte b = 0;
+ byte expected = 0;
+
+ do
+ {
+ expected = TestLibrary.Generator.GetByte(-55);
+ } while ((expected < Byte.MinValue) || (expected > SByte.MaxValue));
+
+ b = (sbyte)expected;
+
+ Int16 actual = Convert.ToInt16(b);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt16_11 test = new ConvertToInt16_11();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt16_11");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint16_16.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint16_16.cs
new file mode 100644
index 0000000000..ac209b7d5b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint16_16.cs
@@ -0,0 +1,111 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt16(System.UInt16)
+/// </summary>
+
+public class ConvertToInt16_16
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ToInt16 should Converts the value of an ushort to the equivalent short.");
+
+ try
+ {
+ short expected = TestLibrary.Generator.GetInt16(-55);
+ ushort u = (ushort)expected;
+ short actual = Convert.ToInt16(u);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToInt16 can not Converts the value of an ushort to the equivalent byte");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException should be thrown when value is greater than Int16.MaxValue");
+
+ try
+ {
+ ushort c = ushort.MaxValue;
+
+ short actual = Convert.ToInt16(c);
+
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException is not thrown when value is greater than Byte.MaxValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt16_16 test = new ConvertToInt16_16();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt16_16");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint16_17.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint16_17.cs
new file mode 100644
index 0000000000..cff6ffe732
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint16_17.cs
@@ -0,0 +1,111 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt16(System.UInt32)
+/// </summary>
+
+public class ConvertToInt16_17
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ToInt16 should Converts the value of an uint to the equivalent short.");
+
+ try
+ {
+ uint expected = (uint)TestLibrary.Generator.GetInt16(-55);
+
+ short actual = Convert.ToInt16(expected);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToInt16 can not Converts the value of an ushort to the equivalent byte");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException should be thrown when value is greater than Int16.MaxValue");
+
+ try
+ {
+ uint c = uint.MaxValue;
+
+ short actual = Convert.ToInt16(c);
+
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException is not thrown when value is greater than Byte.MaxValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt16_17 test = new ConvertToInt16_17();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt16_17");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint16_18.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint16_18.cs
new file mode 100644
index 0000000000..53db630e76
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint16_18.cs
@@ -0,0 +1,142 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt16(System.UInt64)
+/// </summary>
+
+public class ConvertToInt16_18
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ToInt16 should Converts the value of an uint to the equivalent short.");
+
+ try
+ {
+ long expected = (long)TestLibrary.Generator.GetInt16(-55);
+
+ short actual = Convert.ToInt16(expected);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToInt16 can not Converts the value of an ushort to the equivalent byte");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException should be thrown when value is greater than Int16.MaxValue");
+
+ try
+ {
+ long l = (long)short.MaxValue + 1;
+
+ short actual = Convert.ToInt16(l);
+
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException is not thrown when value is greater than Int16.MaxValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: OverflowException should be thrown when value is less than Int16.MinValue");
+
+ try
+ {
+ long l = (long)short.MinValue - 1;
+
+ short actual = Convert.ToInt16(l);
+
+ TestLibrary.TestFramework.LogError("102.1", "OverflowException is not thrown when value is less than Int16..MinValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt16_18 test = new ConvertToInt16_18();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt16_18");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint16_2.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint16_2.cs
new file mode 100644
index 0000000000..97003e70c2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint16_2.cs
@@ -0,0 +1,167 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt16(System.Byte)
+/// </summary>
+
+public class ConvertToInt16_2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt16(byte) with random byte.");
+
+ try
+ {
+ byte b = TestLibrary.Generator.GetByte(-55);
+ Int16 actual = Convert.ToInt16(b);
+ Int16 expected = (Int16)b;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt16(byte) with byte = MinValue.");
+
+ try
+ {
+ byte b = byte.MinValue;
+ Int16 actual = Convert.ToInt16(b);
+ Int16 expected = (Int16)b;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method ToInt16(byte) with byte = MaxValue.");
+
+ try
+ {
+ byte b = byte.MaxValue;
+ Int16 actual = Convert.ToInt16(b);
+ Int16 expected = (Int16)b;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt16_2 test = new ConvertToInt16_2();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt16_2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint16_3.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint16_3.cs
new file mode 100644
index 0000000000..3df58f66e8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint16_3.cs
@@ -0,0 +1,177 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt16(System.Char)
+/// </summary>
+
+public class ConvertToInt16_3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt16(CharLetter) .");
+
+ try
+ {
+ char c = TestLibrary.Generator.GetCharLetter(-55);
+ Int16 expected = (Int16)c;
+
+ Int16 actual = Convert.ToInt16(c);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Verify method ToInt16(CharLetter) .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt16(char(0)) .");
+
+ try
+ {
+ char c = '\x0000';
+ Int16 expected = (Int16)c;
+
+ Int16 actual = Convert.ToInt16(c);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Verify method ToInt16(CharLetter) .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method ToInt16(int16.max) .");
+
+ try
+ {
+ char c = '\x7FFF';
+ Int16 expected = (Int16)c;
+
+ Int16 actual = Convert.ToInt16(c);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Verify method ToInt16(CharLetter) .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException is not thrown.");
+
+ try
+ {
+ char c = '\x8000';
+ Int16 expected = (Int16)c;
+
+ Int16 actual = Convert.ToInt16(c);
+
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException is not thrown.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt16_3 test = new ConvertToInt16_3();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt16_3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint16_4.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint16_4.cs
new file mode 100644
index 0000000000..761526d385
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint16_4.cs
@@ -0,0 +1,277 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt16(System.Decimal)
+/// </summary>
+
+public class ConvertToInt16_4
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt16(0<decimal<0.5)");
+
+ try
+ {
+ double random;
+ do
+ random = TestLibrary.Generator.GetDouble(-55);
+ while (random >= 0.5);
+
+ decimal d = decimal.Parse(random.ToString());
+
+ Int16 actual = Convert.ToInt16(d);
+ Int16 expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt16(1>decimal>=0.5)");
+
+ try
+ {
+ double random;
+ do
+ random = TestLibrary.Generator.GetDouble(-55);
+ while (random < 0.5);
+
+ decimal d = decimal.Parse(random.ToString());
+
+ Int16 actual = Convert.ToInt16(d);
+ Int16 expected = 1;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method ToInt16(0)");
+
+ try
+ {
+ decimal d = 0m;
+
+ Int16 actual = Convert.ToInt16(d);
+ Int16 expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify method ToInt16(int16.max)");
+
+ try
+ {
+ decimal d = Int16.MaxValue;
+
+ Int16 actual = Convert.ToInt16(d);
+ Int16 expected = Int16.MaxValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify method ToInt16(int16.min)");
+
+ try
+ {
+ decimal d = Int16.MinValue;
+
+ Int16 actual = Convert.ToInt16(d);
+ Int16 expected = Int16.MinValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException is not thrown.");
+
+ try
+ {
+ decimal d = Int16.MaxValue + 1;
+
+ Int16 i = Convert.ToInt16(d);
+
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException is not thrown.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: OverflowException is not thrown.");
+
+ try
+ {
+ decimal d = Int16.MinValue - 1;
+
+ Int16 i = Convert.ToInt16(d);
+
+ TestLibrary.TestFramework.LogError("102.1", "OverflowException is not thrown.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt16_4 test = new ConvertToInt16_4();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt16_4");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint16_5.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint16_5.cs
new file mode 100644
index 0000000000..6df28084ad
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint16_5.cs
@@ -0,0 +1,267 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt16(System.Double)
+/// </summary>
+
+public class ConvertToInt16_5
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt16(0<double<0.5)");
+
+ try
+ {
+ double d;
+ do
+ d = TestLibrary.Generator.GetDouble(-55);
+ while (d >= 0.5);
+
+ Int16 actual = Convert.ToInt16(d);
+ Int16 expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt16(1>double>=0.5)");
+
+ try
+ {
+ double d;
+ do
+ d = TestLibrary.Generator.GetDouble(-55);
+ while (d < 0.5);
+
+ Int16 actual = Convert.ToInt16(d);
+ Int16 expected = 1;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method ToInt16(0)");
+
+ try
+ {
+ double d = 0d;
+
+ Int16 actual = Convert.ToInt16(d);
+ Int16 expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify method ToInt16(int16.max)");
+
+ try
+ {
+ double d = Int16.MaxValue;
+
+ Int16 actual = Convert.ToInt16(d);
+ Int16 expected = Int16.MaxValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify method ToInt16(int16.min)");
+
+ try
+ {
+ double d = Int16.MinValue;
+
+ Int16 actual = Convert.ToInt16(d);
+ Int16 expected = Int16.MinValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException is not thrown.");
+
+ try
+ {
+ double d = Int16.MaxValue + 1;
+
+ Int16 i = Convert.ToInt16(d);
+
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException is not thrown.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: OverflowException is not thrown.");
+
+ try
+ {
+ double d = Int16.MinValue - 1;
+
+ Int16 i = Convert.ToInt16(d);
+
+ TestLibrary.TestFramework.LogError("102.1", "OverflowException is not thrown.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt16_5 test = new ConvertToInt16_5();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt16_5");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint16_6.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint16_6.cs
new file mode 100644
index 0000000000..da621cc2f0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint16_6.cs
@@ -0,0 +1,176 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt16(System.Int16)
+/// </summary>
+
+public class ConvertToInt16_6
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify methos ToInt16(random).");
+
+ try
+ {
+
+ Int16 random = TestLibrary.Generator.GetInt16(-55);
+
+ Int16 actual = Convert.ToInt16(random);
+ Int16 expected = random;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt16(0)");
+
+ try
+ {
+ Int16 i = 0;
+
+ Int16 actual = Convert.ToInt16(i);
+ Int16 expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method ToInt16(int16.max)");
+
+ try
+ {
+ Int16 i = Int16.MaxValue;
+
+ Int16 actual = Convert.ToInt16(i);
+ Int16 expected = Int16.MaxValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify method ToInt16(int16.min)");
+
+ try
+ {
+ Int16 i = Int16.MinValue;
+
+ Int16 actual = Convert.ToInt16(i);
+ Int16 expected = Int16.MinValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt16_6 test = new ConvertToInt16_6();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt16_6");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint16_7.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint16_7.cs
new file mode 100644
index 0000000000..55557fb91a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint16_7.cs
@@ -0,0 +1,232 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt16(System.Int32)
+/// </summary>
+
+public class ConvertToInt16_7
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify methos ToInt16(random).");
+
+ try
+ {
+
+ Int16 random = TestLibrary.Generator.GetInt16(-55);
+
+ Int16 actual = Convert.ToInt16((Int32)random);
+ Int16 expected = random;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt16(0)");
+
+ try
+ {
+ Int32 i = 0;
+
+ Int16 actual = Convert.ToInt16(i);
+ Int16 expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method ToInt16(int16.max)");
+
+ try
+ {
+ Int32 i = Int16.MaxValue;
+
+ Int16 actual = Convert.ToInt16(i);
+ Int16 expected = Int16.MaxValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify method ToInt16(int16.min)");
+
+ try
+ {
+ Int32 i = Int16.MinValue;
+
+ Int16 actual = Convert.ToInt16(i);
+ Int16 expected = Int16.MinValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException is not thrown.");
+
+ try
+ {
+ Int32 i = Int16.MaxValue + 1;
+
+ Int16 r = Convert.ToInt16(i);
+
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException is not thrown.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: OverflowException is not thrown.");
+
+ try
+ {
+ Int32 i = Int16.MinValue - 1;
+
+ Int16 r = Convert.ToInt16(i);
+
+ TestLibrary.TestFramework.LogError("102.1", "OverflowException is not thrown.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt16_7 test = new ConvertToInt16_7();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt16_7");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint16_8.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint16_8.cs
new file mode 100644
index 0000000000..6e5d6d7632
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint16_8.cs
@@ -0,0 +1,232 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt16(System.Int64)
+/// </summary>
+
+public class ConvertToInt16_8
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify methos ToInt16(random).");
+
+ try
+ {
+
+ Int16 random = TestLibrary.Generator.GetInt16(-55);
+
+ Int16 actual = Convert.ToInt16((Int64)random);
+ Int16 expected = random;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt16(0)");
+
+ try
+ {
+ Int64 i = 0;
+
+ Int16 actual = Convert.ToInt16(i);
+ Int16 expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method ToInt16(int16.max)");
+
+ try
+ {
+ Int64 i = Int16.MaxValue;
+
+ Int16 actual = Convert.ToInt16(i);
+ Int16 expected = Int16.MaxValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify method ToInt16(int16.min)");
+
+ try
+ {
+ Int64 i = Int16.MinValue;
+
+ Int16 actual = Convert.ToInt16(i);
+ Int16 expected = Int16.MinValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException is not thrown.");
+
+ try
+ {
+ Int64 i = Int16.MaxValue + 1;
+
+ Int16 r = Convert.ToInt16(i);
+
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException is not thrown.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: OverflowException is not thrown.");
+
+ try
+ {
+ Int64 i = Int16.MinValue - 1;
+
+ Int16 r = Convert.ToInt16(i);
+
+ TestLibrary.TestFramework.LogError("102.1", "OverflowException is not thrown.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt16_8 test = new ConvertToInt16_8();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt16_8");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint16_9.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint16_9.cs
new file mode 100644
index 0000000000..e662fea690
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint16_9.cs
@@ -0,0 +1,304 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt16(System.Object)
+/// </summary>
+
+public class ConvertToInt16_9
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify methos ToInt16((object)random).");
+
+ try
+ {
+
+ object random = TestLibrary.Generator.GetInt16(-55);
+
+ Int16 actual = Convert.ToInt16(random);
+ Int16 expected = (Int16)random;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt16((object)0)");
+
+ try
+ {
+ object obj = 0;
+
+ Int16 actual = Convert.ToInt16(obj);
+ Int16 expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method ToInt16((object)int16.max)");
+
+ try
+ {
+ object obj = Int16.MaxValue;
+
+ Int16 actual = Convert.ToInt16(obj);
+ Int16 expected = Int16.MaxValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify method ToInt16((object)int16.min)");
+
+ try
+ {
+ object obj = Int16.MinValue;
+
+ Int16 actual = Convert.ToInt16(obj);
+ Int16 expected = Int16.MinValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify method ToInt16(true)");
+
+ try
+ {
+ object obj = true;
+
+ Int16 actual = Convert.ToInt16(obj);
+ Int16 expected = 1;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Verify method ToInt16(false)");
+
+ try
+ {
+ object obj = false;
+
+ Int16 actual = Convert.ToInt16(obj);
+ Int16 expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("006.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Verify method ToInt16(null)");
+
+ try
+ {
+ object obj = null;
+
+ Int16 actual = Convert.ToInt16(obj);
+ Int16 expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("007.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: InvalidCastException is not thrown.");
+
+ try
+ {
+ object obj = new object();
+
+ Int16 r = Convert.ToInt16(obj);
+
+ TestLibrary.TestFramework.LogError("101.1", "InvalidCastException is not thrown.");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt16_9 test = new ConvertToInt16_9();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt16_9");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint32.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint32.cs
new file mode 100644
index 0000000000..74fcd470e9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint32.cs
@@ -0,0 +1,144 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ConvertToInt32
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ConvertToInt32 ac = new ConvertToInt32();
+
+ TestLibrary.TestFramework.BeginTestCase("Convert.ToInt32(...)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ return retVal;
+ }
+
+ public bool PosTest1() { return PosTest<object>(1, (object)Int32.MaxValue, Int32.MaxValue); }
+ public bool PosTest2() { return PosTest<object>(2, (object)Int32.MinValue, Int32.MinValue); }
+ public bool PosTest3() { return PosTest<object>(3, null, 0); }
+
+ public bool PosTest4() { return PosTest<Boolean>(4, true, 1); }
+ public bool PosTest5() { return PosTest<Boolean>(5, false, 0); }
+
+ public bool PosTest6() { return PosTest2(6, null, 0); }
+ public bool PosTest7() { return PosTest2(7, "1034", 1034); }
+
+ public bool PosTest8() { return PosTest2(8, null, 0); }
+ public bool PosTest9() { return PosTest2(9, "34", 34); }
+
+ public bool PosTest10() { return PosTest<double>(10, -2147483647.5d, -2147483648); }
+
+ public bool PosTest<T>(int id, T curValue, Int32 expValue)
+ {
+ bool retVal = true;
+ Int32 newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToInt32(...) (curValue:"+typeof(T)+" " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToInt32(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("000", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToInt32(curValue, myfp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2(int id, String curValue, Int32 expValue)
+ {
+ bool retVal = true;
+ Int32 newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToInt32(...) (curValue:string " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToInt32(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("003", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToInt32(curValue, myfp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("004", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint32_1.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint32_1.cs
new file mode 100644
index 0000000000..425f4e87fe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint32_1.cs
@@ -0,0 +1,138 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt32(System.Boolean)
+/// </summary>
+
+public class ConvertToInt32_1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt32(true) .");
+
+ try
+ {
+ int actual = Convert.ToInt32(true);
+ int expected = 1;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt16(false) .");
+
+ try
+ {
+ int actual = Convert.ToInt32(false);
+ int expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt32_1 test = new ConvertToInt32_1();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt32_1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint32_10.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint32_10.cs
new file mode 100644
index 0000000000..8217c3745c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint32_10.cs
@@ -0,0 +1,281 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class TestClass
+{
+}
+
+public class TestFormatProvider : IFormatProvider
+{
+ public bool ToInt16MaxValue = true;
+
+ #region IFormatProvider Members
+
+ public object GetFormat(Type formatType)
+ {
+ if (formatType.Equals(typeof(TestFormatProvider)))
+ {
+ return this;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ #endregion
+}
+
+public class TestConvertableClass : IConvertible
+{
+ #region IConvertible Members
+
+ public TypeCode GetTypeCode()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool ToBoolean(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int ToInt32(IFormatProvider provider)
+ {
+ bool toMinValue = true;
+
+ if (provider != null)
+ {
+ TestFormatProvider format = provider.GetFormat(typeof(TestFormatProvider)) as TestFormatProvider;
+ if ((format != null) && format.ToInt16MaxValue)
+ {
+ toMinValue = false;
+ }
+ }
+
+ if (toMinValue)
+ {
+ return Int32.MinValue;
+ }
+ else
+ {
+ return Int32.MaxValue;
+ }
+ }
+
+ public char ToChar(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public DateTime ToDateTime(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public decimal ToDecimal(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public double ToDouble(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public byte ToByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public short ToInt16(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public long ToInt64(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public sbyte ToSByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public float ToSingle(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public string ToString(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public object ToType(Type conversionType, IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ushort ToUInt16(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public uint ToUInt32(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ulong ToUInt64(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+}
+
+/// <summary>
+/// ToInt32(System.Object,System.IFormatProvider)
+/// </summary>
+
+public class ConvertToInt32_10
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Convert.ToInt32 when value implements IConvertible");
+
+ try
+ {
+ retVal = VerificationHelper(true, null, 1, "001.1") && retVal;
+ retVal = VerificationHelper(1, null, 1, "001.2") && retVal;
+ retVal = VerificationHelper(0, null, 0, "001.3") && retVal;
+ retVal = VerificationHelper(new TestConvertableClass(), null, Int32.MinValue, "001.4") && retVal;
+
+ retVal = VerificationHelper(true, new TestFormatProvider(), 1, "001.5") && retVal;
+ retVal = VerificationHelper(1, new TestFormatProvider(), 1, "001.6") && retVal;
+ retVal = VerificationHelper(0, new TestFormatProvider(), 0, "001.7") && retVal;
+ retVal = VerificationHelper(new TestConvertableClass(), new TestFormatProvider(), Int32.MaxValue, "001.8") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Convert.ToInt32 when value is null");
+
+ try
+ {
+ retVal = VerificationHelper(null, null, 0, "002.1") && retVal;
+ retVal = VerificationHelper(null, new TestFormatProvider(), 0, "002.2") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: InvalidCastException should be thrown when value does not implement IConvertible. ");
+
+ try
+ {
+ int actual = Convert.ToInt32(new TestClass());
+
+ TestLibrary.TestFramework.LogError("101.1", "InvalidCastException is not thrown when value does not implement IConvertible. ");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt32_10 test = new ConvertToInt32_10();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt32_10");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(object obj, IFormatProvider provider, int desired, string errorno)
+ {
+ bool retVal = true;
+
+ int actual = Convert.ToInt32(obj, provider);
+ if (actual != desired)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Convert.ToInt32 returns unexpected values");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", desired = " + desired + ", obj = " + obj);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint32_11.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint32_11.cs
new file mode 100644
index 0000000000..05a6c37934
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint32_11.cs
@@ -0,0 +1,113 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt32(System.SByte)
+/// </summary>
+
+public class ConvertToInt32_11
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt32(System.SByte) .");
+
+ try
+ {
+ sbyte b = 0;
+ byte expected = 0;
+
+ do
+ {
+ expected = TestLibrary.Generator.GetByte(-55);
+ } while ((expected < Byte.MinValue) || (expected > SByte.MaxValue));
+
+ b = (sbyte)expected;
+
+ int actual = Convert.ToInt32(b);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt32_11 test = new ConvertToInt32_11();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt32_11");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint32_16.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint32_16.cs
new file mode 100644
index 0000000000..9c02cf506c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint32_16.cs
@@ -0,0 +1,81 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt32(System.UInt16)
+/// </summary>
+
+public class ConvertToInt32_16
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ToInt32 should Converts the value of an ushort to the equivalent int.");
+
+ try
+ {
+ int expected = TestLibrary.Generator.GetInt16(-55);
+ ushort u = (ushort)expected;
+ int actual = Convert.ToInt32(u);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToInt32 can not Converts the value of an ushort to the equivalent int");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt32_16 test = new ConvertToInt32_16();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt32_16");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint32_17.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint32_17.cs
new file mode 100644
index 0000000000..9fad3d3242
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint32_17.cs
@@ -0,0 +1,111 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt32(System.UInt32)
+/// </summary>
+
+public class ConvertToInt32_17
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ToInt32 should Converts the value of an uint to the equivalent int.");
+
+ try
+ {
+ uint expected = (uint)TestLibrary.Generator.GetInt16(-55);
+
+ int actual = Convert.ToInt32(expected);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToInt32 can not Converts the value of an ushort to the equivalent int");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException should be thrown when value is greater than Int32.MaxValue");
+
+ try
+ {
+ uint c = uint.MaxValue;
+
+ int actual = Convert.ToInt32(c);
+
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException is not thrown when value is greater than uint.MaxValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt32_17 test = new ConvertToInt32_17();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt32_17");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint32_18.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint32_18.cs
new file mode 100644
index 0000000000..19cbc24799
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint32_18.cs
@@ -0,0 +1,112 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt32(System.UInt64)
+/// </summary>
+
+public class ConvertToInt32_18
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ToInt32 should Converts the value of an uint to the equivalent int.");
+
+ try
+ {
+ int expected = TestLibrary.Generator.GetInt16(-55);
+
+ int actual = Convert.ToInt32((ulong)expected);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToInt32 can not Converts the value of an ushort to the equivalent int");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException should be thrown when value is greater than Int32.MaxValue");
+
+ try
+ {
+ uint c = uint.MaxValue;
+
+ int actual = Convert.ToInt32(c);
+
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException is not thrown when value is greater than uint.MaxValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt32_18 test = new ConvertToInt32_18();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt32_18");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint32_2.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint32_2.cs
new file mode 100644
index 0000000000..6ab9968182
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint32_2.cs
@@ -0,0 +1,167 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt32(System.Byte)
+/// </summary>
+
+public class ConvertToInt32_2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt32(byte) with random byte.");
+
+ try
+ {
+ byte b = TestLibrary.Generator.GetByte(-55);
+ int actual = Convert.ToInt32(b);
+ int expected = (int)b;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt32(byte) with byte = MinValue.");
+
+ try
+ {
+ byte b = byte.MinValue;
+ int actual = Convert.ToInt32(b);
+ int expected = (int)b;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method ToInt32(byte) with byte = MaxValue.");
+
+ try
+ {
+ byte b = byte.MaxValue;
+ int actual = Convert.ToInt32(b);
+ int expected = (int)b;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt32_2 test = new ConvertToInt32_2();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt32_2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint32_3.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint32_3.cs
new file mode 100644
index 0000000000..0d6b724e25
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint32_3.cs
@@ -0,0 +1,170 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt32(System.Char)
+/// </summary>
+
+public class ConvertToInt32_3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt32(CharLetter) .");
+
+ try
+ {
+ char c = TestLibrary.Generator.GetCharLetter(-55);
+ int expected = (int)c;
+
+ int actual = Convert.ToInt32(c);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Verify method ToInt32(CharLetter) .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt32(char(0)) .");
+
+ try
+ {
+ char c = '\x0000';
+ int expected = (int)c;
+
+ int actual = Convert.ToInt32(c);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Verify method ToInt32(CharLetter) .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method ToInt32(int32.max) .");
+
+ try
+ {
+ char c = '\xFFFF';
+ int expected = (int)c;
+
+ int actual = Convert.ToInt32(c);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Verify method ToInt32(CharLetter) .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt32_3 test = new ConvertToInt32_3();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt32_3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint32_4.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint32_4.cs
new file mode 100644
index 0000000000..393db60cbe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint32_4.cs
@@ -0,0 +1,278 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt32(System.Decimal)
+/// </summary>
+
+public class ConvertToInt32_4
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt32(0<decimal<0.5)");
+
+ try
+ {
+ double random;
+ do
+ random = TestLibrary.Generator.GetDouble(-55);
+ while (random >= 0.5);
+
+ decimal d = decimal.Parse(random.ToString());
+
+ int actual = Convert.ToInt32(d);
+ int expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt32(1>decimal>=0.5)");
+
+ try
+ {
+ double random;
+ do
+ random = TestLibrary.Generator.GetDouble(-55);
+ while (random < 0.5);
+
+ decimal d = decimal.Parse(random.ToString());
+
+ int actual = Convert.ToInt32(d);
+ int expected = 1;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method ToInt32(0)");
+
+ try
+ {
+ decimal d = 0m;
+
+ int actual = Convert.ToInt32(d);
+ int expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify method ToInt32(int16.max)");
+
+ try
+ {
+ decimal d = Int32.MaxValue;
+
+ int actual = Convert.ToInt32(d);
+ int expected = Int32.MaxValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify method ToInt32(int32.min)");
+
+ try
+ {
+ decimal d = Int32.MinValue;
+
+ int actual = Convert.ToInt32(d);
+ int expected = Int32.MinValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException is not thrown.");
+
+ try
+ {
+ decimal d = (decimal)Int32.MaxValue + 1;
+
+ int i = Convert.ToInt32(d);
+
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException is not thrown.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: OverflowException is not thrown.");
+
+ try
+ {
+ decimal d = (decimal)Int32.MinValue - 1;
+
+ int i = Convert.ToInt32(d);
+
+ TestLibrary.TestFramework.LogError("102.1", "OverflowException is not thrown.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt32_4 test = new ConvertToInt32_4();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt32_4");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint32_5.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint32_5.cs
new file mode 100644
index 0000000000..41ba612ab7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint32_5.cs
@@ -0,0 +1,273 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt64(System.Double)
+/// </summary>
+
+public class ConvertToInt32_5
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt32(0<double<0.5)");
+
+ try
+ {
+ double d;
+ do
+ d = TestLibrary.Generator.GetDouble(-55);
+ while (d >= 0.5);
+
+ int actual = Convert.ToInt32(d);
+ int expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt32(1>double>=0.5)");
+
+ try
+ {
+ double d;
+ do
+ d = TestLibrary.Generator.GetDouble(-55);
+ while (d < 0.5);
+
+ int actual = Convert.ToInt32(d);
+ int expected = 1;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method ToInt32(0)");
+
+ try
+ {
+ double d = 0d;
+
+ int actual = Convert.ToInt32(d);
+ Int16 expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify method ToInt32(int32.max)");
+
+ try
+ {
+ double d = Int32.MaxValue;
+
+ int actual = Convert.ToInt32(d);
+ int expected = Int32.MaxValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify method ToInt32(int32.min)");
+
+ try
+ {
+ double d = Int32.MinValue;
+
+ int actual = Convert.ToInt32(d);
+ int expected = Int32.MinValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException is not thrown.");
+
+ try
+ {
+ double d = (double)Int32.MaxValue + 1;
+
+ int i = Convert.ToInt32(d);
+
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException is not thrown.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: OverflowException is not thrown.");
+
+ try
+ {
+ double d = (double)Int32.MinValue - 1;
+
+ int i = Convert.ToInt32(d);
+
+ TestLibrary.TestFramework.LogError("102.1", "OverflowException is not thrown.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt32_5 test = new ConvertToInt32_5();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt32_5");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint32_6.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint32_6.cs
new file mode 100644
index 0000000000..e1732909d7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint32_6.cs
@@ -0,0 +1,203 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt32(System.Int16)
+/// </summary>
+
+public class ConvertToInt32_6
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify methos ToInt32(random).");
+
+ try
+ {
+
+ short random = TestLibrary.Generator.GetInt16(-55);
+
+ int actual = Convert.ToInt32(random);
+ int expected = (int)random;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt32(0)");
+
+ try
+ {
+ Int16 i = 0;
+
+ int actual = Convert.ToInt32(i);
+ int expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method ToInt32(int16.max)");
+
+ try
+ {
+ Int16 i = Int16.MaxValue;
+
+ int actual = Convert.ToInt32(i);
+ int expected = (int)Int16.MaxValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify method ToInt32(int16.min)");
+
+ try
+ {
+ Int16 i = Int16.MinValue;
+
+ int actual = Convert.ToInt32(i);
+ int expected = (int)Int16.MinValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt32_6 test = new ConvertToInt32_6();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt32_6");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint32_7.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint32_7.cs
new file mode 100644
index 0000000000..1188cda38f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint32_7.cs
@@ -0,0 +1,118 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt32(System.Int32)
+/// </summary>
+
+public class ConvertToInt32_7
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt32 .");
+
+ try
+ {
+ retVal = VerificationHelper(0, 0, "001.1") && retVal;
+ retVal = VerificationHelper(int.MaxValue, int.MaxValue, "001.2") && retVal;
+ retVal = VerificationHelper(int.MinValue, int.MinValue, "001.3") && retVal;
+
+ int i = TestLibrary.Generator.GetInt32(-55);
+ retVal = VerificationHelper(i, i, "001.4");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt32_7 test = new ConvertToInt32_7();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt32_7");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(int value, int desired, string errorno)
+ {
+ bool retVal = true;
+
+ int actual = Convert.ToInt32(value);
+ if (actual != desired)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Convert.ToInt32 returns unexpected values");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", desired = " + desired + ", value = " + value);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint32_8.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint32_8.cs
new file mode 100644
index 0000000000..c645afc54b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint32_8.cs
@@ -0,0 +1,151 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt32(System.Int64)
+/// </summary>
+
+public class ConvertToInt32_8
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt32 .");
+
+ try
+ {
+ retVal = VerificationHelper(0L, 0, "001.1") && retVal;
+ retVal = VerificationHelper((long)int.MaxValue, int.MaxValue, "001.2") && retVal;
+ retVal = VerificationHelper((long)int.MinValue, int.MinValue, "001.3") && retVal;
+
+ long l = TestLibrary.Generator.GetInt32(-55);
+ retVal = VerificationHelper(l, (int)l, "001.4");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException is not thrown.");
+
+ try
+ {
+ long i = (long)Int32.MaxValue + 1;
+
+ Int32 r = Convert.ToInt32(i);
+
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException is not thrown.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: OverflowException is not thrown.");
+
+ try
+ {
+ long i = (long)Int32.MinValue - 1;
+
+ Int32 r = Convert.ToInt32(i);
+
+ TestLibrary.TestFramework.LogError("102.1", "OverflowException is not thrown.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt32_8 test = new ConvertToInt32_8();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt32_8");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(long value, int desired, string errorno)
+ {
+ bool retVal = true;
+
+ int actual = Convert.ToInt32(value);
+ if (actual != desired)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Convert.ToInt32 returns unexpected values");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", desired = " + desired + ", value = " + value);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint32_9.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint32_9.cs
new file mode 100644
index 0000000000..2182431e75
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint32_9.cs
@@ -0,0 +1,304 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt32(System.Object)
+/// </summary>
+
+public class ConvertToInt32_9
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify methos ToInt32((object)random).");
+
+ try
+ {
+
+ object random = TestLibrary.Generator.GetInt32(-55);
+
+ int actual = Convert.ToInt32(random);
+ int expected = (int)random;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt32((object)0)");
+
+ try
+ {
+ object obj = 0;
+
+ int actual = Convert.ToInt32(obj);
+ int expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method ToInt32((object)int32.max)");
+
+ try
+ {
+ object obj = Int32.MaxValue;
+
+ int actual = Convert.ToInt32(obj);
+ int expected = Int32.MaxValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify method ToInt32((object)int32.min)");
+
+ try
+ {
+ object obj = Int32.MinValue;
+
+ int actual = Convert.ToInt32(obj);
+ int expected = Int32.MinValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify method ToInt32(true)");
+
+ try
+ {
+ object obj = true;
+
+ int actual = Convert.ToInt32(obj);
+ int expected = 1;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Verify method ToInt32(false)");
+
+ try
+ {
+ object obj = false;
+
+ int actual = Convert.ToInt32(obj);
+ int expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("006.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Verify method ToInt32(null)");
+
+ try
+ {
+ object obj = null;
+
+ int actual = Convert.ToInt32(obj);
+ int expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("007.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: InvalidCastException is not thrown.");
+
+ try
+ {
+ object obj = new object();
+
+ int r = Convert.ToInt32(obj);
+
+ TestLibrary.TestFramework.LogError("101.1", "InvalidCastException is not thrown.");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt32_9 test = new ConvertToInt32_9();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt32_9");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint64.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint64.cs
new file mode 100644
index 0000000000..cd58a20b45
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint64.cs
@@ -0,0 +1,131 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ConvertToInt64
+{
+ private const int c_MIN_SIZE = 64;
+ private const int c_MAX_SIZE = 1024;
+ private const int c_MIN_STRLEN = 1;
+ private const int c_MAX_STRLEN = 1024;
+
+ public static int Main()
+ {
+ ConvertToInt64 ac = new ConvertToInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("Convert.ToInt64(...)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ return retVal;
+ }
+
+ public bool PosTest1() { return PosTest<object>(1, (object)Int64.MaxValue, Int64.MaxValue); }
+ public bool PosTest2() { return PosTest<object>(2, (object)Int64.MinValue, Int64.MinValue); }
+ public bool PosTest3() { return PosTest<object>(3, null, 0); }
+
+ public bool PosTest4() { return PosTest2(4, null, 0); }
+ public bool PosTest5() { return PosTest2(5, "1034", 1034); }
+
+ public bool PosTest<T>(int id, T curValue, Int64 expValue)
+ {
+ bool retVal = true;
+ Int64 newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToInt64(...) (curValue:"+typeof(T)+" " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToInt64(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("000", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToInt64(curValue, myfp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2(int id, String curValue, Int64 expValue)
+ {
+ bool retVal = true;
+ Int64 newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToInt64(...) (curValue:string " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToInt64(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("003", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToInt64(curValue, myfp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("004", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint64_1.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint64_1.cs
new file mode 100644
index 0000000000..e4000e363f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint64_1.cs
@@ -0,0 +1,134 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class ConvertToInt64_1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt64(true) .");
+
+ try
+ {
+ long actual = Convert.ToInt64(true);
+ long expected = 1;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt64(false) .");
+
+ try
+ {
+ long actual = Convert.ToInt64(false);
+ long expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt64_1 test = new ConvertToInt64_1();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt64_1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint64_10.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint64_10.cs
new file mode 100644
index 0000000000..d02a575658
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint64_10.cs
@@ -0,0 +1,281 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class TestClass
+{
+}
+
+public class TestFormatProvider : IFormatProvider
+{
+ public bool ToInt16MaxValue = true;
+
+ #region IFormatProvider Members
+
+ public object GetFormat(Type formatType)
+ {
+ if (formatType.Equals(typeof(TestFormatProvider)))
+ {
+ return this;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ #endregion
+}
+
+public class TestConvertableClass : IConvertible
+{
+ #region IConvertible Members
+
+ public TypeCode GetTypeCode()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool ToBoolean(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public long ToInt64(IFormatProvider provider)
+ {
+ bool toMinValue = true;
+
+ if (provider != null)
+ {
+ TestFormatProvider format = provider.GetFormat(typeof(TestFormatProvider)) as TestFormatProvider;
+ if ((format != null) && format.ToInt16MaxValue)
+ {
+ toMinValue = false;
+ }
+ }
+
+ if (toMinValue)
+ {
+ return Int64.MinValue;
+ }
+ else
+ {
+ return Int64.MaxValue;
+ }
+ }
+
+ public char ToChar(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public DateTime ToDateTime(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public decimal ToDecimal(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public double ToDouble(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public byte ToByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public short ToInt16(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int ToInt32(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public sbyte ToSByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public float ToSingle(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public string ToString(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public object ToType(Type conversionType, IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ushort ToUInt16(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public uint ToUInt32(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ulong ToUInt64(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+}
+
+/// <summary>
+/// ToInt64(System.Object,System.IFormatProvider)
+/// </summary>
+
+public class ConvertToInt64_10
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Convert.ToInt64 when value implements IConvertible");
+
+ try
+ {
+ retVal = VerificationHelper(true, null, 1L, "001.1") && retVal;
+ retVal = VerificationHelper(1, null, 1L, "001.2") && retVal;
+ retVal = VerificationHelper(0, null, 0L, "001.3") && retVal;
+ retVal = VerificationHelper(new TestConvertableClass(), null, Int64.MinValue, "001.4") && retVal;
+
+ retVal = VerificationHelper(true, new TestFormatProvider(), 1L, "001.5") && retVal;
+ retVal = VerificationHelper(1, new TestFormatProvider(), 1L, "001.6") && retVal;
+ retVal = VerificationHelper(0, new TestFormatProvider(), 0L, "001.7") && retVal;
+ retVal = VerificationHelper(new TestConvertableClass(), new TestFormatProvider(), Int64.MaxValue, "001.8") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Convert.ToInt64 when value is null");
+
+ try
+ {
+ retVal = VerificationHelper(null, null, 0L, "002.1") && retVal;
+ retVal = VerificationHelper(null, new TestFormatProvider(), 0L, "002.2") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: InvalidCastException should be thrown when value does not implement IConvertible. ");
+
+ try
+ {
+ long actual = Convert.ToInt64(new TestClass());
+
+ TestLibrary.TestFramework.LogError("101.1", "InvalidCastException is not thrown when value does not implement IConvertible. ");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt64_10 test = new ConvertToInt64_10();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt64_10");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(object obj, IFormatProvider provider, long desired, string errorno)
+ {
+ bool retVal = true;
+
+ long actual = Convert.ToInt64(obj, provider);
+ if (actual != desired)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Convert.ToInt64 returns unexpected values");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", desired = " + desired + ", obj = " + obj);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint64_11.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint64_11.cs
new file mode 100644
index 0000000000..e63981e1b3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint64_11.cs
@@ -0,0 +1,113 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt64(System.SByte)
+/// </summary>
+
+public class ConvertToInt64_11
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt64(System.SByte) .");
+
+ try
+ {
+ sbyte b = 0;
+ byte expected = 0;
+
+ do
+ {
+ expected = TestLibrary.Generator.GetByte(-55);
+ } while ((expected < Byte.MinValue) || (expected > SByte.MaxValue));
+
+ b = (sbyte)expected;
+
+ long actual = Convert.ToInt64(b);
+
+ if (actual != (long)expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt64_11 test = new ConvertToInt64_11();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt64_11");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint64_16.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint64_16.cs
new file mode 100644
index 0000000000..008baf4e70
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint64_16.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt64(System.UInt16)
+/// </summary>
+
+public class ConvertToInt64_16
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ToInt64 should Converts the value of an ushort to the equivalent long.");
+
+ try
+ {
+ int expected = TestLibrary.Generator.GetInt16(-55);
+ ushort u = (ushort)expected;
+ long actual = Convert.ToInt64(u);
+
+ if (actual != (long)expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToInt64 can not Converts the value of an ushort to the equivalent int");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt64_16 test = new ConvertToInt64_16();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt64_16");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint64_17.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint64_17.cs
new file mode 100644
index 0000000000..292f542989
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint64_17.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt64(System.UInt32)
+/// </summary>
+
+public class ConvertToInt64_17
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ToInt64 should Converts the value of an uint to the equivalent long.");
+
+ try
+ {
+ uint expected = (uint)TestLibrary.Generator.GetInt16(-55);
+
+ long actual = Convert.ToInt64(expected);
+
+ if (actual != (long)expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToInt64 can not Converts the value of an uint to the equivalent long");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt64_17 test = new ConvertToInt64_17();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt64_17");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint64_18.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint64_18.cs
new file mode 100644
index 0000000000..3014c7487c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint64_18.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt64(System.UInt64)
+/// </summary>
+
+public class ConvertToInt64_18
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ToInt64 should Converts the value of an ulong to the equivalent long.");
+
+ try
+ {
+ int expected = TestLibrary.Generator.GetInt16(-55);
+
+ long actual = Convert.ToInt64((ulong)expected);
+
+ if (actual != (long)expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToInt64 can not Converts the value of an ushort to the equivalent long. ");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt64_18 test = new ConvertToInt64_18();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt64_18");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint64_2.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint64_2.cs
new file mode 100644
index 0000000000..2351d17afe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint64_2.cs
@@ -0,0 +1,167 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt64(System.Byte)
+/// </summary>
+
+public class ConvertToInt64_2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt64(byte) with random byte.");
+
+ try
+ {
+ byte b = TestLibrary.Generator.GetByte(-55);
+ long actual = Convert.ToInt64(b);
+ long expected = (long)b;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt64(byte) with byte = MinValue.");
+
+ try
+ {
+ byte b = byte.MinValue;
+ long actual = Convert.ToInt64(b);
+ long expected = (long)b;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method ToInt64(byte) with byte = MaxValue.");
+
+ try
+ {
+ byte b = byte.MaxValue;
+ long actual = Convert.ToInt64(b);
+ long expected = (long)b;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt64_2 test = new ConvertToInt64_2();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt64_2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint64_3.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint64_3.cs
new file mode 100644
index 0000000000..9558e6438e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint64_3.cs
@@ -0,0 +1,139 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt64(System.Char)
+/// </summary>
+
+public class ConvertToInt64_3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt64(CharLetter) .");
+
+ try
+ {
+ char c = TestLibrary.Generator.GetCharLetter(-55);
+ long expected = (long)c;
+
+ long actual = Convert.ToInt64(c);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Verify method ToInt64(CharLetter) .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt64(char(0)) .");
+
+ try
+ {
+ char c = '\x0000';
+ long expected = (long)c;
+
+ long actual = Convert.ToInt64(c);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Verify method ToInt64(CharLetter) .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt64_3 test = new ConvertToInt64_3();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt64_3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint64_4.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint64_4.cs
new file mode 100644
index 0000000000..2a74014dfc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint64_4.cs
@@ -0,0 +1,277 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt64(System.Decimal)
+/// </summary>
+
+public class ConvertToInt64_4
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt64(0<decimal<0.5)");
+
+ try
+ {
+ double random;
+ do
+ random = TestLibrary.Generator.GetDouble(-55);
+ while (random >= 0.5);
+
+ decimal d = decimal.Parse(random.ToString());
+
+ long actual = Convert.ToInt64(d);
+ long expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt64(1>decimal>=0.5)");
+
+ try
+ {
+ double random;
+ do
+ random = TestLibrary.Generator.GetDouble(-55);
+ while (random < 0.5);
+
+ decimal d = decimal.Parse(random.ToString());
+
+ long actual = Convert.ToInt64(d);
+ long expected = 1;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method ToInt64(0)");
+
+ try
+ {
+ decimal d = 0m;
+
+ long actual = Convert.ToInt64(d);
+ long expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify method ToInt64(int64.max)");
+
+ try
+ {
+ decimal d = Int64.MaxValue;
+
+ long actual = Convert.ToInt64(d);
+ long expected = Int64.MaxValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify method ToInt64(int64.min)");
+
+ try
+ {
+ decimal d = Int64.MinValue;
+
+ long actual = Convert.ToInt64(d);
+ long expected = Int64.MinValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException is not thrown.");
+
+ try
+ {
+ decimal d = (decimal)Int64.MaxValue + 1;
+
+ long i = Convert.ToInt64(d);
+
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException is not thrown.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: OverflowException is not thrown.");
+
+ try
+ {
+ decimal d = (decimal)Int64.MinValue - 1;
+
+ long i = Convert.ToInt64(d);
+
+ TestLibrary.TestFramework.LogError("102.1", "OverflowException is not thrown.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt64_4 test = new ConvertToInt64_4();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt64_4");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint64_5.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint64_5.cs
new file mode 100644
index 0000000000..9a4c026670
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint64_5.cs
@@ -0,0 +1,274 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt64(System.Double)
+/// </summary>
+
+public class ConvertToInt64_5
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt64(0<double<0.5)");
+
+ try
+ {
+ double d;
+ do
+ d = TestLibrary.Generator.GetDouble(-55);
+ while (d >= 0.5);
+
+ long actual = Convert.ToInt64(d);
+ long expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt64(1>double>=0.5)");
+
+ try
+ {
+ double d;
+ do
+ d = TestLibrary.Generator.GetDouble(-55);
+ while (d < 0.5);
+
+ long actual = Convert.ToInt64(d);
+ long expected = 1;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method ToInt64(0)");
+
+ try
+ {
+ double d = 0d;
+
+ long actual = Convert.ToInt64(d);
+ long expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify method ToInt64(int64.max)");
+
+ try
+ {
+ long actual = Convert.ToInt64(Int64.MaxValue);
+ long expected = Int64.MaxValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify method ToInt64(int64.min)");
+
+ try
+ {
+ long actual = Convert.ToInt64(Int64.MinValue);
+ long expected = Int64.MinValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "Method ToInt32 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException is thrown for value > Int64.MaxValue.");
+
+ try
+ {
+ double d = (double)Int64.MaxValue + 1;
+
+ long i = Convert.ToInt64(d);
+
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException is thrown.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: OverflowException is thrown for value < Int64.MinValue");
+
+ try
+ {
+ // with the length of the min value being around 17 digits and the double going out to 15 or 16 digits
+ // before rounding, then subtracting one simply isn't enough to force the value to be less than Int64.MaxValue.
+ // If it is possible that the last two or 3 digits can get dropped and rounding can occur on the thousands, then
+ // subtracting 10000 is safe bet to be lower
+ double d = (double)Int64.MinValue - 10000;
+
+ long i = Convert.ToInt64(d);
+
+ TestLibrary.TestFramework.LogError("102.1", "OverflowException is not thrown.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt64_5 test = new ConvertToInt64_5();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt64_5");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint64_6.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint64_6.cs
new file mode 100644
index 0000000000..03af85cd8e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint64_6.cs
@@ -0,0 +1,203 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt64(System.Int16)
+/// </summary>
+
+public class ConvertToInt64_6
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify methos ToInt64(random).");
+
+ try
+ {
+
+ short random = TestLibrary.Generator.GetInt16(-55);
+
+ long actual = Convert.ToInt64(random);
+ long expected = (long)random;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt64(0)");
+
+ try
+ {
+ short i = 0;
+
+ long actual = Convert.ToInt64(i);
+ long expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method ToInt64(int16.max)");
+
+ try
+ {
+ Int16 i = Int16.MaxValue;
+
+ long actual = Convert.ToInt64(i);
+ long expected = (long)Int16.MaxValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify method ToInt64(int16.min)");
+
+ try
+ {
+ Int16 i = Int16.MinValue;
+
+ long actual = Convert.ToInt64(i);
+ long expected = (long)Int16.MinValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt64_6 test = new ConvertToInt64_6();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt64_6");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint64_7.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint64_7.cs
new file mode 100644
index 0000000000..22faa6a943
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint64_7.cs
@@ -0,0 +1,118 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt64(System.Int32)
+/// </summary>
+
+public class ConvertToInt64_7
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt64 .");
+
+ try
+ {
+ retVal = VerificationHelper(0, 0L, "001.1") && retVal;
+ retVal = VerificationHelper(int.MaxValue, (long)int.MaxValue, "001.2") && retVal;
+ retVal = VerificationHelper(int.MinValue, (long)int.MinValue, "001.3") && retVal;
+
+ int i = TestLibrary.Generator.GetInt32(-55);
+ retVal = VerificationHelper(i, (long)i, "001.4") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt64_7 test = new ConvertToInt64_7();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt64_7");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(int value, long desired, string errorno)
+ {
+ bool retVal = true;
+
+ long actual = Convert.ToInt64(value);
+ if (actual != desired)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Convert.ToInt64 returns unexpected values");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", desired = " + desired + ", value = " + value);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint64_8.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint64_8.cs
new file mode 100644
index 0000000000..e173854202
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint64_8.cs
@@ -0,0 +1,118 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt64(System.Int64)
+/// </summary>
+
+public class ConvertToInt64_8
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt64 .");
+
+ try
+ {
+ retVal = VerificationHelper(0L, 0L, "001.1") && retVal;
+ retVal = VerificationHelper((long)int.MaxValue, (long)int.MaxValue, "001.2") && retVal;
+ retVal = VerificationHelper((long)int.MinValue, (long)int.MinValue, "001.3") && retVal;
+
+ long l = TestLibrary.Generator.GetInt64(-55);
+ retVal = VerificationHelper(l, l, "001.4") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt64_8 test = new ConvertToInt64_8();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt64_8");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(long value, long desired, string errorno)
+ {
+ bool retVal = true;
+
+ long actual = Convert.ToInt64(value);
+ if (actual != desired)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Convert.ToInt32 returns unexpected values");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", desired = " + desired + ", value = " + value);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttoint64_9.cs b/tests/src/CoreMangLib/cti/system/convert/converttoint64_9.cs
new file mode 100644
index 0000000000..571063ecdc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttoint64_9.cs
@@ -0,0 +1,304 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt64(System.Object)
+/// </summary>
+
+public class ConvertToInt64_9
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify methos ToInt64((object)random).");
+
+ try
+ {
+
+ object random = TestLibrary.Generator.GetInt64(-55);
+
+ long actual = Convert.ToInt64(random);
+ long expected = (long)random;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt64((object)0)");
+
+ try
+ {
+ object obj = 0;
+
+ long actual = Convert.ToInt64(obj);
+ long expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method ToInt64((object)int64.max)");
+
+ try
+ {
+ object obj = Int64.MaxValue;
+
+ long actual = Convert.ToInt64(obj);
+ long expected = Int64.MaxValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify method ToInt64((object)int64.min)");
+
+ try
+ {
+ object obj = Int64.MinValue;
+
+ long actual = Convert.ToInt64(obj);
+ long expected = Int64.MinValue;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify method ToInt64(true)");
+
+ try
+ {
+ object obj = true;
+
+ long actual = Convert.ToInt64(obj);
+ long expected = 1;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Verify method ToInt64(false)");
+
+ try
+ {
+ object obj = false;
+
+ long actual = Convert.ToInt64(obj);
+ long expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("006.1", "Method ToInt64 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Verify method ToInt64(null)");
+
+ try
+ {
+ object obj = null;
+
+ long actual = Convert.ToInt64(obj);
+ long expected = 0;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("007.1", "Method ToInt16 Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: InvalidCastException is not thrown.");
+
+ try
+ {
+ object obj = new object();
+
+ long r = Convert.ToInt64(obj);
+
+ TestLibrary.TestFramework.LogError("101.1", "InvalidCastException is not thrown.");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToInt64_9 test = new ConvertToInt64_9();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToInt64_9");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttosbyte.cs b/tests/src/CoreMangLib/cti/system/convert/converttosbyte.cs
new file mode 100644
index 0000000000..644e3849b8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttosbyte.cs
@@ -0,0 +1,186 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ConvertToSByte
+{
+ public static int Main()
+ {
+ ConvertToSByte ac = new ConvertToSByte();
+
+ TestLibrary.TestFramework.BeginTestCase("Convert.ToSByte(...)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1() { return PosTest<object>(1, (object)SByte.MaxValue, SByte.MaxValue); }
+ public bool PosTest2() { return PosTest<object>(2, (object)SByte.MinValue, SByte.MinValue); }
+ public bool PosTest3() { return PosTest<object>(3, null, 0); }
+
+ public bool PosTest4() { return PosTest2(4, "27", 27); }
+
+ public bool NegTest1() { return NegTest1(1, Int16.MaxValue.ToString(), 10, typeof(System.OverflowException)); }
+ public bool NegTest2() { return NegTest1(2, Int16.MinValue.ToString(), 10, typeof(System.OverflowException)); }
+ public bool NegTest3() { return NegTest2(3, null, 10, typeof(System.ArgumentNullException)); }
+
+ public bool PosTest<T>(int id, T curValue, SByte expValue)
+ {
+ bool retVal = true;
+ SByte newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToSByte(...) (curValue:"+typeof(T)+" " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToSByte(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("000", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToSByte(curValue, myfp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2(int id, String curValue, SByte expValue)
+ {
+ bool retVal = true;
+ SByte newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToSByte(...) (curValue:string " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToSByte(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("003", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToSByte(curValue, myfp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("004", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1(int id, string curValue, int fromBase, Type exception)
+ {
+ bool retVal = true;
+ SByte newValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Convert.ToSByte(...) (curValue:string " +curValue+" base:"+fromBase+")");
+
+ try
+ {
+ newValue = Convert.ToSByte(curValue, fromBase);
+
+ TestLibrary.TestFramework.LogError("006", "Exception expected");
+ retVal = false;
+ }
+ catch (Exception e)
+ {
+ if (e.GetType() != exception)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2(int id, string curValue, int fromBase, Type exception)
+ {
+ bool retVal = true;
+ SByte newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Convert.ToSByte(...) (curValue:string " +curValue+" base:"+fromBase+")");
+
+ try
+ {
+ myfp = null;
+ newValue = Convert.ToSByte(curValue, myfp);
+
+ TestLibrary.TestFramework.LogError("008", "Exception expected");
+ retVal = false;
+ }
+ catch (Exception e)
+ {
+ if (e.GetType() != exception)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttosbyte1.cs b/tests/src/CoreMangLib/cti/system/convert/converttosbyte1.cs
new file mode 100644
index 0000000000..dd1f49ce0f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttosbyte1.cs
@@ -0,0 +1,98 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToSByte(boolean)
+/// </summary>
+public class ConvertToSByte1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The boolean is true");
+
+ try
+ {
+ bool boolValue = true;
+ SByte sByte = Convert.ToSByte(boolValue);
+ if (sByte != 1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The boolean is false");
+
+ try
+ {
+ bool boolValue = false;
+ SByte sByte = Convert.ToSByte(boolValue);
+ if (sByte != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToSByte1 test = new ConvertToSByte1();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToSByte1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttosbyte10.cs b/tests/src/CoreMangLib/cti/system/convert/converttosbyte10.cs
new file mode 100644
index 0000000000..752f9abfb0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttosbyte10.cs
@@ -0,0 +1,277 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class TestClass
+{
+}
+
+public class TestFormatProvider : IFormatProvider
+{
+ public bool ToSByteMaxValue = true;
+
+ #region IFormatProvider Members
+
+ public object GetFormat(Type formatType)
+ {
+ if (formatType.Equals(typeof(TestFormatProvider)))
+ {
+ return this;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ #endregion
+}
+
+public class TestConvertableClass : IConvertible
+{
+ #region IConvertible Members
+
+ public TypeCode GetTypeCode()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool ToBoolean(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public byte ToByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public char ToChar(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public DateTime ToDateTime(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public decimal ToDecimal(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public double ToDouble(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public short ToInt16(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int ToInt32(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public long ToInt64(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public sbyte ToSByte(IFormatProvider provider)
+ {
+ bool toMinValue = true;
+
+ if (provider != null)
+ {
+ TestFormatProvider format = provider.GetFormat(typeof(TestFormatProvider)) as TestFormatProvider;
+ if ((format != null) && format.ToSByteMaxValue)
+ {
+ toMinValue = false;
+ }
+ }
+
+ if (toMinValue)
+ {
+ return SByte.MinValue;
+ }
+ else
+ {
+ return SByte.MaxValue;
+ }
+ }
+
+ public float ToSingle(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public string ToString(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public object ToType(Type conversionType, IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ushort ToUInt16(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public uint ToUInt32(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ulong ToUInt64(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+}
+
+/// <summary>
+/// ToSByte(System.Object,System.IFormatProvider)
+/// </summary>
+public class ConvertToSByte10
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Convert.ToSByte when value implements IConvertible");
+
+ try
+ {
+ retVal = VerificationHelper(true, null, 1, "001.1") && retVal;
+ retVal = VerificationHelper(1, null, 1, "001.2") && retVal;
+ retVal = VerificationHelper(0, null, 0, "001.3") && retVal;
+ retVal = VerificationHelper(new TestConvertableClass(), null, SByte.MinValue, "001.4") && retVal;
+
+ retVal = VerificationHelper(true, new TestFormatProvider(), 1, "001.5") && retVal;
+ retVal = VerificationHelper(1, new TestFormatProvider(), 1, "001.6") && retVal;
+ retVal = VerificationHelper(0, new TestFormatProvider(), 0, "001.7") && retVal;
+ retVal = VerificationHelper(new TestConvertableClass(), new TestFormatProvider(), SByte.MaxValue, "001.8") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Convert.ToSByte when value is null");
+
+ try
+ {
+ retVal = VerificationHelper(null, null, 0, "002.1") && retVal;
+ retVal = VerificationHelper(null, new TestFormatProvider(), 0, "002.2") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: InvalidCastException should be thrown when value does not implement IConvertible. ");
+
+ try
+ {
+ sbyte actual = Convert.ToSByte(new TestClass());
+
+ TestLibrary.TestFramework.LogError("101.1", "InvalidCastException is not thrown when value does not implement IConvertible. ");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToSByte10 test = new ConvertToSByte10();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToSByte10");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(object obj, IFormatProvider provider, sbyte desired, string errorno)
+ {
+ bool retVal = true;
+
+ sbyte actual = Convert.ToSByte(obj, provider);
+ if (actual != desired)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Convert.ToSByte returns unexpected values");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", desired = " + desired + ", obj = " + obj);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttosbyte11.cs b/tests/src/CoreMangLib/cti/system/convert/converttosbyte11.cs
new file mode 100644
index 0000000000..c81e9248fe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttosbyte11.cs
@@ -0,0 +1,143 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToSByte(SByte)
+/// </summary>
+public class ConvertToSByte11
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random sbyte to sbyte");
+
+ try
+ {
+ SByte i = this.GetSByte(SByte.MinValue, SByte.MaxValue);
+ SByte sByte = Convert.ToSByte(i);
+ if (sByte != i)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is:" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert sbyteMaxValue to sbyte");
+
+ try
+ {
+ SByte i = sbyte.MaxValue;
+ SByte sByte = Convert.ToSByte(i);
+ if (sByte != i)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,i is:" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert sbyteMinValue to SByte");
+
+ try
+ {
+ SByte i = sbyte.MinValue;
+ SByte sByte = Convert.ToSByte(i);
+ if (sByte != i)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected,i is:" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToSByte11 test = new ConvertToSByte11();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToSByte11");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private SByte GetSByte(sbyte minValue, sbyte maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return (minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return (sbyte)(minValue + TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttosbyte16.cs b/tests/src/CoreMangLib/cti/system/convert/converttosbyte16.cs
new file mode 100644
index 0000000000..6851958c40
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttosbyte16.cs
@@ -0,0 +1,172 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToSByte(UInt16)
+/// </summary>
+public class ConvertToSByte11
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random sbyte to sbyte");
+
+ try
+ {
+ UInt16 i = this.GetUInt16(0, SByte.MaxValue);
+ SByte sByte = Convert.ToSByte(i);
+ if (sByte != i)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is:" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert sbyteMaxValue to sbyte");
+
+ try
+ {
+ UInt16 i = (UInt16)sbyte.MaxValue;
+ SByte sByte = Convert.ToSByte(i);
+ if (sByte != i)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,i is:" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert UInt16MinValue to SByte");
+
+ try
+ {
+ UInt16 i = UInt16.MinValue;
+ SByte sByte = Convert.ToSByte(i);
+ if (sByte != i)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected,i is:" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Test the overflow exception");
+
+ try
+ {
+ UInt16 i = this.GetUInt16(sbyte.MaxValue + 1, UInt16.MaxValue);
+ SByte sByte = Convert.ToSByte(i);
+ TestLibrary.TestFramework.LogError("101", "The OverflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToSByte11 test = new ConvertToSByte11();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToSByte11");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private UInt16 GetUInt16(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return (UInt16)minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return (UInt16)(minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return (UInt16)minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttosbyte2.cs b/tests/src/CoreMangLib/cti/system/convert/converttosbyte2.cs
new file mode 100644
index 0000000000..c895c145f9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttosbyte2.cs
@@ -0,0 +1,172 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToSByte(byte)
+/// <summary>
+public class ConvertToSByte2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random byte value to sbyte");
+
+ try
+ {
+ byte i = this.GetByte(0, (byte)sbyte.MaxValue);
+ sbyte sByte = Convert.ToSByte(i);
+ if (sByte != i)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is:" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert sbyteMinValue to sbyte");
+
+ try
+ {
+ byte i = byte.MinValue;
+ sbyte sByte = Convert.ToSByte(i);
+ if (sByte != i)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert a byte indicating sbyteMaxValue to sbyte");
+
+ try
+ {
+ byte i = (byte)sbyte.MaxValue;
+ sbyte sByte = Convert.ToSByte(i);
+ if (sByte != i)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The argument is greater than SByte.MaxValue");
+
+ try
+ {
+ byte i = this.GetByte(sbyte.MaxValue + 1, byte.MaxValue);
+ sbyte sByte = Convert.ToSByte(i);
+ TestLibrary.TestFramework.LogError("101", "The OverflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToSByte2 test = new ConvertToSByte2();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToSByte2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ private Byte GetByte(byte minValue, byte maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return (minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return (byte)(minValue + TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttosbyte3.cs b/tests/src/CoreMangLib/cti/system/convert/converttosbyte3.cs
new file mode 100644
index 0000000000..5c8edb4cb9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttosbyte3.cs
@@ -0,0 +1,172 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToSByte(char)
+/// <summary>
+public class ConvertToSByte3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random char to sbyte");
+
+ try
+ {
+ sbyte i = this.GetSByte(0, sbyte.MaxValue);
+ char ch = Convert.ToChar(i);
+ sbyte sByte = Convert.ToSByte(ch);
+ if (sByte != i)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is:" + i + "sbyte is" + sByte);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert a char indicating sbyte.maxvalue to sbyte");
+
+ try
+ {
+ char ch = Convert.ToChar(sbyte.MaxValue);
+ sbyte sByte = Convert.ToSByte(ch);
+ if (sByte != 127)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert a char indicating zero to sbyte");
+
+ try
+ {
+ char ch = '\0';
+ sbyte sByte = Convert.ToSByte(ch);
+ if (sByte != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The argument is greater than SByte.MaxValue");
+
+ try
+ {
+ char ch = Convert.ToChar(128);
+ sbyte sByte = Convert.ToSByte(ch);
+ TestLibrary.TestFramework.LogError("101", "The OverflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToSByte3 test = new ConvertToSByte3();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToSByte3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private SByte GetSByte(sbyte minValue, sbyte maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return (minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return (sbyte)(minValue + TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttosbyte4.cs b/tests/src/CoreMangLib/cti/system/convert/converttosbyte4.cs
new file mode 100644
index 0000000000..de0520039a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttosbyte4.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToSByte(decimal)
+/// <summary>
+public class ConvertToSByte4
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ToSByte should Converts the value of a decimal to a equivlent sbyte");
+
+ try
+ {
+ decimal de = 123;
+ sbyte sByte = Convert.ToSByte(de);
+ if (sByte != 123)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: ToSByte should Converts the value of a decimal to a equivlent sbyte with 0");
+
+ try
+ {
+ decimal de = 0;
+ sbyte sByte = Convert.ToSByte(de);
+ if (sByte != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The argument is greater than SByte.MaxValue");
+
+ try
+ {
+ decimal de = 130;
+ sbyte sByte = Convert.ToSByte(de);
+ TestLibrary.TestFramework.LogError("101", "The OverflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The argument is less than SByte.MinValue");
+
+ try
+ {
+ decimal de = -129;
+ sbyte sByte = Convert.ToSByte(de);
+ TestLibrary.TestFramework.LogError("103", "The OverflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToSByte4 test = new ConvertToSByte4();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToSByte4");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttosbyte5.cs b/tests/src/CoreMangLib/cti/system/convert/converttosbyte5.cs
new file mode 100644
index 0000000000..e065c11a6e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttosbyte5.cs
@@ -0,0 +1,288 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToSByte(double)
+/// <summary>
+public class ConvertToSByte5
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random Double greater than 0.5 to sbyte");
+
+ try
+ {
+ double i;
+ do
+ {
+ i = TestLibrary.Generator.GetDouble(-55);
+ }
+ while (i < 0.5D);
+ SByte sByte = Convert.ToSByte(i);
+ if (sByte != 1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is:"+i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert a random Double less than 0.5 to sbyte");
+
+ try
+ {
+ double i;
+ do
+ {
+ i = TestLibrary.Generator.GetDouble(-55);
+ }
+ while (i > 0.5D);
+ SByte sByte = Convert.ToSByte(i);
+ if (sByte != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,i is: "+i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert zero to sbyte");
+
+ try
+ {
+ double i = 0;
+ SByte sByte = Convert.ToSByte(i);
+ if (sByte != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert a double whose decimal part is equal to 0.5 exactly");
+
+ try
+ {
+ double integral = (double)(this.GetSByte(-50, 0) * 2 + 1);
+ double i = integral - 0.5d;
+ SByte sByte = Convert.ToSByte(i);
+ if (sByte != (integral - 1))
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected,SByte is:"+sByte+"i is: "+i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Convert a double indicating SbyteMaxValue to sbyte");
+
+ try
+ {
+ double i = (double)SByte.MaxValue;
+ SByte sByte = Convert.ToSByte(i);
+ if (sByte != sbyte.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Convert a double indicating SbyteMinValue to sbyte");
+
+ try
+ {
+ double i = (double)SByte.MinValue;
+ SByte sByte = Convert.ToSByte(i);
+ if (sByte != sbyte.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("011", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Value is greater than SByte.MaxValue");
+
+ try
+ {
+ double i = 128.5d;
+ SByte sByte = Convert.ToSByte(i);
+ TestLibrary.TestFramework.LogError("101", "The OverflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Value is less than SByte.MinValue");
+
+ try
+ {
+ double i = -150d;
+ SByte sByte = Convert.ToSByte(i);
+ TestLibrary.TestFramework.LogError("103", "The OverflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToSByte5 test = new ConvertToSByte5();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToSByte5");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ private SByte GetSByte(sbyte minValue, sbyte maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return (minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return (sbyte)(minValue + TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttosbyte6.cs b/tests/src/CoreMangLib/cti/system/convert/converttosbyte6.cs
new file mode 100644
index 0000000000..b8d9c2eddf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttosbyte6.cs
@@ -0,0 +1,199 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToSByte(int16)
+/// </summary>
+public class ConvertToSByte6
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert an random int16 number to sbyte");
+
+ try
+ {
+ Int16 i = this.GetInt16(sbyte.MinValue, sbyte.MaxValue);
+ SByte sByte = Convert.ToSByte(i);
+ if (sByte != i)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is: " + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert an int16 indicating SByteMaxValue number to sbyte");
+
+ try
+ {
+ Int16 i = (Int16)SByte.MaxValue;
+ SByte sByte = Convert.ToSByte(i);
+ if (sByte != SByte.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert an int16 indicating SByteMinValue number to sbyte");
+
+ try
+ {
+ Int16 i = (Int16)SByte.MinValue;
+ SByte sByte = Convert.ToSByte(i);
+ if (sByte != SByte.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The argument is greater than SByte.MaxValue");
+
+ try
+ {
+ Int16 i = this.GetInt16(128, Int16.MaxValue);
+ SByte sByte = Convert.ToSByte(i);
+ TestLibrary.TestFramework.LogError("101", "The OverflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The argument is less than SByte.MinValue");
+
+ try
+ {
+ Int16 i = this.GetInt16(Int16.MinValue, -128);
+ SByte sByte = Convert.ToSByte(i);
+ TestLibrary.TestFramework.LogError("103", "The OverflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToSByte6 test = new ConvertToSByte6();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToSByte6");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int16 GetInt16(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return (Int16)minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return (Int16)(minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return (Int16)minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttosbyte7.cs b/tests/src/CoreMangLib/cti/system/convert/converttosbyte7.cs
new file mode 100644
index 0000000000..4033a2ab13
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttosbyte7.cs
@@ -0,0 +1,199 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToSByte(int32)
+/// </summary>
+public class ConvertToSByte7
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert an random int32 number to sbyte");
+
+ try
+ {
+ Int32 i = this.GetInt32(sbyte.MinValue, sbyte.MaxValue);
+ SByte sByte = Convert.ToSByte(i);
+ if (sByte != i)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is: " + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert an int32 indicating SByteMaxValue number to sbyte");
+
+ try
+ {
+ Int32 i = (Int32)SByte.MaxValue;
+ SByte sByte = Convert.ToSByte(i);
+ if (sByte != SByte.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert an int32 indicating SByteMinValue number to sbyte");
+
+ try
+ {
+ Int32 i = (Int32)SByte.MinValue;
+ SByte sByte = Convert.ToSByte(i);
+ if (sByte != SByte.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The argument is greater than SByte.MaxValue");
+
+ try
+ {
+ Int32 i = this.GetInt32(128, Int32.MaxValue);
+ SByte sByte = Convert.ToSByte(i);
+ TestLibrary.TestFramework.LogError("101", "The OverflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The argument is less than SByte.MinValue");
+
+ try
+ {
+ Int32 i = this.GetInt32(Int32.MinValue, -128);
+ SByte sByte = Convert.ToSByte(i);
+ TestLibrary.TestFramework.LogError("103", "The OverflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToSByte7 test = new ConvertToSByte7();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToSByte7");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return (minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttosbyte8.cs b/tests/src/CoreMangLib/cti/system/convert/converttosbyte8.cs
new file mode 100644
index 0000000000..12421d74f5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttosbyte8.cs
@@ -0,0 +1,200 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToSByte(int64)
+/// </summary>
+public class ConvertToSByte8
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert an random int64 number to sbyte");
+
+ try
+ {
+ Int64 i = this.GetInt64(sbyte.MinValue, sbyte.MaxValue);
+ SByte sByte = Convert.ToSByte(i);
+ if (sByte != i)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is: " + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert an int64 indicating SByteMaxValue number to sbyte");
+
+ try
+ {
+ Int64 i = (Int64)SByte.MaxValue;
+ SByte sByte = Convert.ToSByte(i);
+ if (sByte != SByte.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert an int64 indicating SByteMinValue number to sbyte");
+
+ try
+ {
+ Int64 i = (Int64)SByte.MinValue;
+ SByte sByte = Convert.ToSByte(i);
+ if (sByte != SByte.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The argument is greater than SByte.MaxValue");
+
+ try
+ {
+ Int64 i = this.GetInt64(128, Int64.MaxValue);
+ SByte sByte = Convert.ToSByte(i);
+ TestLibrary.TestFramework.LogError("101", "The OverflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The argument is less than SByte.MinValue");
+
+ try
+ {
+ Int64 i = this.GetInt64(Int64.MinValue, -128);
+ SByte sByte = Convert.ToSByte(i);
+ TestLibrary.TestFramework.LogError("103", "The OverflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToSByte8 test = new ConvertToSByte8();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToSByte8");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ private Int64 GetInt64(Int64 minValue, Int64 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + (Int64)TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttosbyte9.cs b/tests/src/CoreMangLib/cti/system/convert/converttosbyte9.cs
new file mode 100644
index 0000000000..fd77d1b9b9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttosbyte9.cs
@@ -0,0 +1,232 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class TestClass
+{
+}
+
+public class TestConvertableClass : IConvertible
+{
+ #region IConvertible Members
+
+ public TypeCode GetTypeCode()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool ToBoolean(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public byte ToByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public char ToChar(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public DateTime ToDateTime(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public decimal ToDecimal(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public double ToDouble(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public short ToInt16(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int ToInt32(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public long ToInt64(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public sbyte ToSByte(IFormatProvider provider)
+ {
+ return sbyte.MaxValue;
+ }
+
+ public float ToSingle(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public string ToString(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public object ToType(Type conversionType, IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ushort ToUInt16(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public uint ToUInt32(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ulong ToUInt64(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+}
+
+/// <summary>
+/// ToSByte(System.Object)
+/// </summary>
+public class ConvertToSByte9
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Convert.ToSByte when value implements IConvertible");
+
+ try
+ {
+ retVal = VerificationHelper(true, 1, "001.1") && retVal;
+ retVal = VerificationHelper(1, 1, "001.2") && retVal;
+ retVal = VerificationHelper(0, 0, "001.3") && retVal;
+ retVal = VerificationHelper(new TestConvertableClass(), SByte.MaxValue, "001.4") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Convert.ToSByte when value is null");
+
+ try
+ {
+ retVal = VerificationHelper(null, 0, "002.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: InvalidCastException should be thrown when value does not implement IConvertible. ");
+
+ try
+ {
+ sbyte actual = Convert.ToSByte(new TestClass());
+
+ TestLibrary.TestFramework.LogError("101.1", "InvalidCastException is not thrown when value does not implement IConvertible. ");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToSByte9 test = new ConvertToSByte9();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToSByte9");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(object obj, sbyte desired, string errorno)
+ {
+ bool retVal = true;
+
+ sbyte actual = Convert.ToSByte(obj);
+ if (actual != desired)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Convert.ToSByte returns unexpected values");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", desired = " + desired + ", obj = " + obj);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttosingle.cs b/tests/src/CoreMangLib/cti/system/convert/converttosingle.cs
new file mode 100644
index 0000000000..aaeaa992be
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttosingle.cs
@@ -0,0 +1,168 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ConvertToSingle
+{
+ public static int Main()
+ {
+ ConvertToSingle ac = new ConvertToSingle();
+
+ TestLibrary.TestFramework.BeginTestCase("Convert.ToSingle(...)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1() { return PosTest<object>(1, (object)Single.MaxValue, Single.MaxValue); }
+ public bool PosTest2() { return PosTest<object>(2, (object)Single.MinValue, Single.MinValue); }
+ public bool PosTest3() { return PosTest<object>(3, null, 0); }
+
+ public bool PosTest4() { return PosTest<Boolean>(4, true, 1f); }
+ public bool PosTest5() { return PosTest<Boolean>(5, false, 0f); }
+
+ public bool PosTest6() { return PosTest2(6, null, 0f); }
+ public bool PosTest7() { return PosTest2(7, "28098" + System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator + "23", 28098.23f); }
+
+ public bool PosTest8() { return PosTest<object>(8, (object)Single.PositiveInfinity, Single.PositiveInfinity); }
+ public bool PosTest9() { return PosTest<object>(9, (object)Single.NegativeInfinity, Single.NegativeInfinity); }
+ public bool PosTest10() { return PosTest<object>(10, (object)Single.NaN, Single.NaN); }
+
+ public bool NegTest1() { return NegTest<char>(1, ' ', typeof(System.InvalidCastException)); }
+
+ public bool PosTest<T>(int id, T curValue, Single expValue)
+ {
+ bool retVal = true;
+ Single newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToSingle(...) (curValue:"+typeof(T)+" " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToSingle(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("000", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToSingle(curValue, myfp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2(int id, String curValue, Single expValue)
+ {
+ bool retVal = true;
+ Single newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToSingle(...) (curValue:string " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToSingle(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("003", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToSingle(curValue, myfp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("004", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest<T>(int id, T curValue, Type exception)
+ {
+ bool retVal = true;
+ Single newValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Convert.ToSingle(...) (curValue:string " +curValue+")");
+
+ try
+ {
+ newValue = Convert.ToSingle(curValue);
+
+ TestLibrary.TestFramework.LogError("006", "Exception expected");
+ retVal = false;
+ }
+ catch (Exception e)
+ {
+ if (e.GetType() != exception)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttosingle13.cs b/tests/src/CoreMangLib/cti/system/convert/converttosingle13.cs
new file mode 100644
index 0000000000..c769db75f1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttosingle13.cs
@@ -0,0 +1,356 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToSingle(String)
+/// </summary>
+public class ConvertToSingle13
+{
+ public static int Main()
+ {
+ ConvertToSingle13 testObj = new ConvertToSingle13();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToSingle(String)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1();
+ retVal = NegTest2();
+ retVal = NegTest3();
+ retVal = NegTest4();
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verfify value is a vaild string ... ";
+ string c_TEST_ID = "P001";
+
+ string actualValue = TestLibrary.Generator.GetSingle(-55).ToString();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ Single resValue = Convert.ToSingle(actualValue);
+ if (Single.Parse(actualValue) != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verfify value is a null reference... ";
+ string c_TEST_ID = "P002";
+
+ String actualValue = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Single resValue = Convert.ToSingle(actualValue);
+ if (0 != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is 0";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verfify value is a string end with a radix point... ";
+ string c_TEST_ID = "P003";
+
+ String actualValue = "7923.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Single resValue = Convert.ToSingle(actualValue);
+ Single realValue = Single.Parse(actualValue);
+ if (realValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is" + realValue;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest4: Verfify value is a string started with a radix point... ";
+ string c_TEST_ID = "P004";
+
+ String actualValue = ".7923";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Single resValue = Convert.ToSingle(actualValue);
+ Single realValue = Single.Parse(actualValue);
+
+ if (realValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + realValue;
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest5: Verfify value is Single.NaN... ";
+ string c_TEST_ID = "P005";
+
+ String actualValue = Single.NaN.ToString();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Single resValue = Convert.ToSingle(actualValue);
+
+ if (!Single.IsNaN(resValue))
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + Single.NaN;
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest6: Verfify value is Single.NegativeInfinity... ";
+ string c_TEST_ID = "P006";
+
+ String actualValue = Single.NegativeInfinity.ToString();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Single resValue = Convert.ToSingle(actualValue);
+
+ if (!Single.IsNegativeInfinity(resValue))
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + Single.NegativeInfinity;
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region NegativeTesting
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: Value represents a number greater than Single.MaxValue ";
+ const string c_TEST_ID = "N001";
+
+
+ string actualValue = "3.40292349638528859e+38";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToSingle(actualValue);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, "OverflowException is not thrown as expected.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: Value represents a number less than Single.MinValue ";
+ const string c_TEST_ID = "N002";
+
+
+ string actualValue = "-3.40362346638528859e+38";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToSingle(actualValue);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, "OverflowException is not thrown as expected.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest3: value is a string cantains invalid chars ";
+ const string c_TEST_ID = "N003";
+
+
+ string actualValue = "1622.7sd23";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToSingle(actualValue);
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, "FormatException is not thrown as expected.");
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest4: value is a empty string ";
+ const string c_TEST_ID = "N004";
+
+
+ string actualValue = "";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ Convert.ToSingle(actualValue);
+ TestLibrary.TestFramework.LogError("015" + " TestId-" + c_TEST_ID, "FormatException is not thrown as expected.");
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttosingle14.cs b/tests/src/CoreMangLib/cti/system/convert/converttosingle14.cs
new file mode 100644
index 0000000000..fda6743fea
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttosingle14.cs
@@ -0,0 +1,337 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Convert.ToSingle(System.String,System.IFormatProvider)
+/// </summary>
+public class ConvertToSingle14
+{
+ public static int Main()
+ {
+ ConvertToSingle14 testObj = new ConvertToSingle14();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToSingle(System.String,System.IFormatProvider)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ private CultureInfo CurrentCulture = CultureInfo.CurrentCulture;
+ private CultureInfo customCulture = null;
+ private CultureInfo CustomCulture
+ {
+ get
+ {
+ if (null == customCulture)
+ {
+ customCulture = new CultureInfo(CultureInfo.CurrentCulture.Name);
+ NumberFormatInfo customNFI = new NumberFormatInfo();
+
+ customNFI.NumberDecimalSeparator = ".";
+ customNFI.NumberGroupSeparator = ",";
+ customNFI.NumberGroupSizes = new int[] { 3 };
+
+ customCulture.NumberFormat = customNFI;
+ }
+ return customCulture;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Single actualValue;
+ string strSingle = "3,265.12358";
+ Single expVal = Single.Parse(strSingle, CustomCulture.NumberFormat);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Verify the string value is valid Single value");
+
+ try
+ {
+ actualValue = Convert.ToSingle(strSingle, CustomCulture.NumberFormat);
+
+ if (actualValue != expVal)
+ {
+ errorDesc = "The Single value " + strSingle + " is not the value " +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\n The string is " + strSingle;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+ // if provider null then currentculture is used
+ TestLibrary.Utilities.CurrentCulture = CustomCulture;
+ NumberFormatInfo provider = null;
+
+ Single actualValue;
+ string strSingle = "3265.12358";
+ Single expVal = Single.Parse(strSingle);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Verify the IFormatProvider is a null reference");
+
+ try
+ {
+ actualValue = Convert.ToSingle(strSingle, provider);
+
+ if (actualValue != expVal)
+ {
+ errorDesc = "The Single value " + strSingle + " is not the value " +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\n The string is " + strSingle;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+
+ TestLibrary.Utilities.CurrentCulture = CurrentCulture;
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Single actualValue;
+ string strSingle = "3265.";
+ Single expVal = Single.Parse(strSingle, CustomCulture.NumberFormat);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Verify the string end with radix point");
+
+ try
+ {
+ actualValue = Convert.ToSingle(strSingle, CustomCulture.NumberFormat);
+
+ if (actualValue != expVal)
+ {
+ errorDesc = "The Single value " + strSingle + " is not the value " +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\n The string is " + strSingle;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ Single actualValue;
+ string strSingle = ".3265";
+ Single expVal = Single.Parse(strSingle, CustomCulture.NumberFormat);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Verify the string start with radix point");
+
+ try
+ {
+ actualValue = Convert.ToSingle(strSingle, CustomCulture.NumberFormat);
+
+ if (actualValue != expVal)
+ {
+ errorDesc = "The Single value " + strSingle + " is not the value " +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("007", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\n The string is " + strSingle;
+ TestLibrary.TestFramework.LogError("008", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region NegativeTesting
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Verify the parameter contains a invalid char...");
+
+ string strSingle = "3,265.13c5";
+
+ try
+ {
+ Convert.ToSingle(strSingle, CustomCulture.NumberFormat);
+ TestLibrary.TestFramework.LogError("009", "FormatException is not thrown as expected ." + "\n string is " + strSingle);
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:Verify the parameter represents a number less than MinValue...");
+
+ string strSingle = "-3.40362346638528859e+38";
+
+ try
+ {
+ Convert.ToSingle(strSingle, CustomCulture.NumberFormat);
+ TestLibrary.TestFramework.LogError("011", "OverflowException is not thrown as expected ." + "\n string is " + strSingle);
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3:Verify the parameter represents a number greater than MaxValue...");
+
+ string strSingle = "3.40292349638528859e+38";
+
+ try
+ {
+ Convert.ToSingle(strSingle, CustomCulture.NumberFormat);
+ TestLibrary.TestFramework.LogError("013", "OverflowException is not thrown as expected ." + "\n string is " + strSingle);
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4:Verify the parameter does not supply IFormatProvider...");
+
+ string strSingle = "1.485.355.146,79769";
+
+ try
+ {
+ Convert.ToSingle(strSingle, CustomCulture.NumberFormat);
+ TestLibrary.TestFramework.LogError("015", "FormatException is not thrown as expected ." + "\n string is " + strSingle);
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest5:Verify the string is empty");
+
+ string strSingle = "";
+
+ try
+ {
+ Convert.ToSingle(strSingle, CustomCulture.NumberFormat);
+ TestLibrary.TestFramework.LogError("017", "FormatException is not thrown as expected ." + "\n string is empty ");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttosingle15.cs b/tests/src/CoreMangLib/cti/system/convert/converttosingle15.cs
new file mode 100644
index 0000000000..2ab585952f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttosingle15.cs
@@ -0,0 +1,191 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToSingle(System.UInt16)
+/// </summary>
+public class ConvertToSingle15
+{
+ public static int Main()
+ {
+ ConvertToSingle15 testObj = new ConvertToSingle15();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToSingle(System.UInt16)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verfify value is a random UInt16... ";
+ string c_TEST_ID = "P001";
+
+ UInt16 actualValue = GetUInt16(UInt16.MinValue,UInt16.MaxValue);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Single resValue = Convert.ToSingle(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verfify value is UInt16.MaxValue... ";
+ string c_TEST_ID = "P002";
+
+ UInt16 actualValue = UInt16.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Single resValue = Convert.ToSingle(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify value is UInt16.MinValue... ";
+ string c_TEST_ID = "P003";
+
+ UInt16 actualValue = UInt16.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Single resValue = Convert.ToSingle(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest4: Verfify value is zero... ";
+ string c_TEST_ID = "P004";
+
+ UInt16 actualValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Single resValue = Convert.ToSingle(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Help Method
+ private UInt16 GetUInt16(UInt16 minValue, UInt16 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return (UInt16)(minValue + TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttosingle16.cs b/tests/src/CoreMangLib/cti/system/convert/converttosingle16.cs
new file mode 100644
index 0000000000..c2c5f8cab1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttosingle16.cs
@@ -0,0 +1,191 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToSingle(System.UInt32)
+/// </summary>
+public class ConvertToSingle16
+{
+ public static int Main()
+ {
+ ConvertToSingle16 testObj = new ConvertToSingle16();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToSingle(System.UInt32)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verfify value is a random UInt32... ";
+ string c_TEST_ID = "P001";
+
+ UInt32 actualValue = GetUInt32(UInt32.MinValue, UInt32.MaxValue);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Single resValue = Convert.ToSingle(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verfify value is UInt32.MaxValue... ";
+ string c_TEST_ID = "P002";
+
+ UInt32 actualValue = UInt32.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Single resValue = Convert.ToSingle(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify value is UInt32.MinValue... ";
+ string c_TEST_ID = "P003";
+
+ UInt32 actualValue = UInt32.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Single resValue = Convert.ToSingle(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest4: Verfify value is zero... ";
+ string c_TEST_ID = "P004";
+
+ UInt32 actualValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Single resValue = Convert.ToSingle(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Help Method
+ private UInt32 GetUInt32(UInt32 minValue, UInt32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return (UInt32)(minValue + TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttosingle17.cs b/tests/src/CoreMangLib/cti/system/convert/converttosingle17.cs
new file mode 100644
index 0000000000..320082f3ae
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttosingle17.cs
@@ -0,0 +1,193 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToSingle(System.UInt64)
+/// </summary>
+public class ConvertToSingle17
+{
+ public static int Main()
+ {
+ ConvertToSingle17 testObj = new ConvertToSingle17();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToSingle(System.UInt64)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verfify value is a random UInt64... ";
+ string c_TEST_ID = "P001";
+
+ UInt64 actualValue = GetUInt64(UInt64.MinValue, UInt64.MaxValue);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Single resValue = Convert.ToSingle(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verfify value is UInt64.MaxValue... ";
+ string c_TEST_ID = "P002";
+
+ UInt64 actualValue = UInt64.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Single resValue = Convert.ToSingle(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify value is UInt64.MinValue... ";
+ string c_TEST_ID = "P003";
+
+ UInt64 actualValue = UInt64.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Single resValue = Convert.ToSingle(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest4: Verfify value is zero... ";
+ string c_TEST_ID = "P004";
+
+ UInt64 actualValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Single resValue = Convert.ToSingle(actualValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Help Method
+ private UInt64 GetUInt64(UInt64 minValue, UInt64 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ Random rand = new Random(-55);
+ int i = rand.Next(0, 2);
+ return minValue + ((UInt64)(TestLibrary.Generator.GetInt64(-55)*2+i))%(maxValue -minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring1.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring1.cs
new file mode 100644
index 0000000000..76d5fe7207
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring1.cs
@@ -0,0 +1,139 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToString(System.Byte)
+/// </summary>
+public class ConvertToString1
+{
+ public static int Main()
+ {
+ ConvertToString1 testObj = new ConvertToString1();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToString(System.Byte)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verify value is a random Byte... ";
+ string c_TEST_ID = "P001";
+
+
+ Byte byteValue = TestLibrary.Generator.GetByte(-55);
+ String actualValue = byteValue.ToString();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(byteValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify value is Byte.MaxValue... ";
+ string c_TEST_ID = "P002";
+
+ Byte byteValue = Byte.MaxValue;
+ String actualValue = "255";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(byteValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify value is Byte.MinValue... ";
+ string c_TEST_ID = "P003";
+
+ Byte byteValue = Byte.MinValue;
+ String actualValue = "0";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(byteValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring10.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring10.cs
new file mode 100644
index 0000000000..87100f2b1f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring10.cs
@@ -0,0 +1,355 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Convert.ToString(System.Decimal,System.IFormatProvider)
+/// </summary>
+public class ConvertToString10
+{
+ public static int Main()
+ {
+ ConvertToString10 testObj = new ConvertToString10();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToString(System.Decimal)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verify value is a random positive Decimal and IFormatProvider is en-US CultureInfo ... ";
+ string c_TEST_ID = "P001";
+
+ Random rand = new Random(-55);
+ int low = TestLibrary.Generator.GetInt32(-55);
+ int mid = TestLibrary.Generator.GetInt32(-55);
+ int hi = TestLibrary.Generator.GetInt32(-55);
+ bool isNagetive = true;
+ Byte scale = (byte)rand.Next(0, 27);
+ Decimal decimalValue = new Decimal(low, mid, hi, isNagetive, scale);
+
+ IFormatProvider provider = new CultureInfo("en-US");
+
+ String actualValue = decimalValue.ToString(provider);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(decimalValue,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += "\n decimal value is " + decimalValue ;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify value is a random negative Decimal... ";
+ string c_TEST_ID = "P002";
+
+ Random rand = new Random(-55);
+ int low = TestLibrary.Generator.GetInt32(-55);
+ int mid = TestLibrary.Generator.GetInt32(-55);
+ int hi = TestLibrary.Generator.GetInt32(-55);
+ bool isNagetive = false;
+ Byte scale = (byte)rand.Next(0, 27);
+ Decimal decimalValue = new Decimal(low, mid, hi, isNagetive, scale);
+
+ IFormatProvider provider = new CultureInfo("en-US");
+
+ String actualValue = decimalValue.ToString(provider);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(decimalValue,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += "\n decimal value is " + decimalValue;
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify value is Decimal.MaxValue... ";
+ string c_TEST_ID = "P003";
+
+
+ Decimal decimalValue = Decimal.MaxValue;
+ IFormatProvider provider = new CultureInfo("en-US");
+
+ String actualValue = decimalValue.ToString(provider);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(decimalValue,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += "\n decimal value is " + decimalValue;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest4: Verify value is Decimal.MinValue... ";
+ string c_TEST_ID = "P004";
+
+
+ Decimal decimalValue = Decimal.MinValue;
+ IFormatProvider provider = new CultureInfo("en-US");
+
+ String actualValue = decimalValue.ToString(provider);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(decimalValue,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += "\n decimal value is " + decimalValue;
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest5: Verify value is 0... ";
+ string c_TEST_ID = "P005";
+
+
+ Decimal decimalValue = Decimal.Zero;
+ IFormatProvider provider = new CultureInfo("en-US");
+
+ String actualValue = decimalValue.ToString(provider);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(decimalValue,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += "\n decimal value is " + decimalValue;
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest6: Verify value is a random Decimal and IFormatProvider is fr-FR CultureInfo ... ";
+ string c_TEST_ID = "P006";
+
+ Random rand = new Random(-55);
+ int low = TestLibrary.Generator.GetInt32(-55);
+ int mid = TestLibrary.Generator.GetInt32(-55);
+ int hi = TestLibrary.Generator.GetInt32(-55);
+ bool isNagetive = true;
+ Byte scale = (byte)rand.Next(0, 27);
+ Decimal decimalValue = new Decimal(low, mid, hi, isNagetive, scale);
+
+ IFormatProvider provider = new CultureInfo("fr-FR");
+
+ String actualValue = decimalValue.ToString(provider);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(decimalValue,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += "\n decimal value is " + decimalValue;
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest7: Verify value is a random Decimal and IFormatProvider is nl-NL CultureInfo ... ";
+ string c_TEST_ID = "P007";
+
+ Random rand = new Random(-55);
+ int low = TestLibrary.Generator.GetInt32(-55);
+ int mid = TestLibrary.Generator.GetInt32(-55);
+ int hi = TestLibrary.Generator.GetInt32(-55);
+ bool isNagetive = true;
+ Byte scale = (byte)rand.Next(0, 27);
+ Decimal decimalValue = new Decimal(low, mid, hi, isNagetive, scale);
+
+ IFormatProvider provider = new CultureInfo("nl-NL");
+
+ String actualValue = decimalValue.ToString(provider);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(decimalValue, provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += "\n decimal value is " + decimalValue;
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest8: Verify value is a random positive Decimal and IFormatProvider is a null reference... ";
+ string c_TEST_ID = "P008";
+
+ Random rand = new Random(-55);
+ int low = TestLibrary.Generator.GetInt32(-55);
+ int mid = TestLibrary.Generator.GetInt32(-55);
+ int hi = TestLibrary.Generator.GetInt32(-55);
+ bool isNagetive = true;
+ Byte scale = (byte)rand.Next(0, 27);
+ Decimal decimalValue = new Decimal(low, mid, hi, isNagetive, scale);
+
+ IFormatProvider provider = null;
+
+ String actualValue = decimalValue.ToString(provider);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(decimalValue, provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += "\n decimal value is " + decimalValue;
+ TestLibrary.TestFramework.LogError("015" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring11.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring11.cs
new file mode 100644
index 0000000000..a55a9c10ba
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring11.cs
@@ -0,0 +1,318 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToString(System.Double)
+/// </summary>
+public class ConvertToString11
+{
+ public static int Main()
+ {
+ ConvertToString11 testObj = new ConvertToString11();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToString(System.Double)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verify value is a random Double... ";
+ string c_TEST_ID = "P001";
+
+
+ Double doubleValue = TestLibrary.Generator.GetDouble(-55);
+
+ String actualValue = doubleValue.ToString();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(doubleValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += "\n double value is " + doubleValue;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify value is a random negative Double... ";
+ string c_TEST_ID = "P002";
+
+
+ Double doubleValue = TestLibrary.Generator.GetDouble(-55);
+ doubleValue = -doubleValue;
+
+ String actualValue = doubleValue.ToString();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(doubleValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += "\n double value is " + doubleValue;
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify value is Double.MaxValue... ";
+ string c_TEST_ID = "P003";
+
+
+ Double doubleValue = Double.MaxValue;
+
+ String actualValue = doubleValue.ToString();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(doubleValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += "\n double value is " + doubleValue;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest4: Verify value is Double.MinValue... ";
+ string c_TEST_ID = "P004";
+
+
+ Double doubleValue = Double.MinValue;
+
+ String actualValue = doubleValue.ToString();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(doubleValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += "\n double value is " + doubleValue;
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest5: Verify value is Double.Epsilon... ";
+ string c_TEST_ID = "P005";
+
+
+ Double doubleValue = Double.Epsilon;
+
+ String actualValue = doubleValue.ToString();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(doubleValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += "\n double value is " + doubleValue;
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest6: Verify value is 0... ";
+ string c_TEST_ID = "P006";
+
+
+ Double doubleValue = 0;
+
+ String actualValue = doubleValue.ToString();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(doubleValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += "\n double value is " + doubleValue;
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest7: Verify value is Double.NaN... ";
+ string c_TEST_ID = "P007";
+
+
+ Double doubleValue = Double.NaN;
+
+ String actualValue = doubleValue.ToString();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(doubleValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += "\n double value is " + doubleValue;
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest8: Verify value is Double.NaN... ";
+ string c_TEST_ID = "P008";
+
+
+ Double doubleValue = Double.NegativeInfinity;
+
+ String actualValue = doubleValue.ToString();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(doubleValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += "\n double value is " + doubleValue;
+ TestLibrary.TestFramework.LogError("015" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring12.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring12.cs
new file mode 100644
index 0000000000..890300b2c1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring12.cs
@@ -0,0 +1,316 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Convert.ToString(System.Double,System.IFormatProvider)
+/// </summary>
+public class ConvertToString12
+{
+ public static int Main()
+ {
+ ConvertToString12 testObj = new ConvertToString12();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToString(System.Double,System.IFormatProvider)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verify value is a random Double and IFormatProvider is a null reference... ";
+ string c_TEST_ID = "P001";
+
+
+ Double doubleValue = TestLibrary.Generator.GetDouble(-55);
+ IFormatProvider provider = null;
+ String actualValue = doubleValue.ToString(provider);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(doubleValue,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ errorDesc += "\n double value is " + doubleValue;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify value is a random negative Double and IFormatProvider is en-US CultureInfo... ";
+ string c_TEST_ID = "P002";
+
+
+ Double doubleValue = TestLibrary.Generator.GetDouble(-55);
+ doubleValue = -doubleValue;
+ IFormatProvider provider = new CultureInfo("en-US");
+
+ String actualValue = doubleValue.ToString(provider);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(doubleValue,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ errorDesc += "\n double value is " + doubleValue;
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify value is a random Double and IFormatProvider is fr_FR CultureInfo... ";
+ string c_TEST_ID = "P003";
+
+ Double doubleValue = TestLibrary.Generator.GetDouble(-55);
+ IFormatProvider provider = new CultureInfo("fr-FR");
+ String actualValue = doubleValue.ToString(provider);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(doubleValue, provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ errorDesc += "\n double value is " + doubleValue;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest4: Verify value is -61680.3855 and IFormatProvider is user-defined NumberFormatInfo... ";
+ string c_TEST_ID = "P004";
+
+ Double doubleValue = -61680.3855;
+ NumberFormatInfo numberFormatInfo = new NumberFormatInfo();
+ numberFormatInfo.NegativeSign = "minus ";
+ numberFormatInfo.NumberDecimalSeparator = " point ";
+
+ String actualValue = "minus 61680 point 3855";
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(doubleValue,numberFormatInfo);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ errorDesc += "\n double value is " + doubleValue;
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest5: Verify value is Double.Epsilon and IFormatProvider is fr-FR CultureInfo... ";
+ string c_TEST_ID = "P005";
+
+ Double doubleValue = Double.Epsilon;
+ IFormatProvider provider = new CultureInfo("fr-FR");
+ String actualValue = "4,94065645841247E-324";
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(doubleValue,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ errorDesc += "\n double value is " + doubleValue;
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest6: Verify value is 0 and IFormatProvider is IFormatProvider is fr-FR CultureInfo... ";
+ string c_TEST_ID = "P006";
+
+ Double doubleValue = 0.00;
+ IFormatProvider provider = new CultureInfo("fr-FR");
+ String actualValue = doubleValue.ToString(provider);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(doubleValue,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ errorDesc += "\n double value is " + doubleValue;
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest7: Verify value is Double.NaN and IFormatProvider is fr-FR CultureInfo... ";
+ string c_TEST_ID = "P007";
+
+ Double doubleValue = Double.NaN;
+ IFormatProvider provider = new CultureInfo("fr-FR");
+ String actualValue = doubleValue.ToString(provider);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(doubleValue,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ errorDesc += "\n double value is " + doubleValue;
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest8: Verify value is Double.NegativeInfinity and IFormatProvider is fr-FR CultureInfo... ";
+ string c_TEST_ID = "P008";
+
+ Double doubleValue = Double.NegativeInfinity;
+ IFormatProvider provider = new CultureInfo("fr-FR");
+ String actualValue = doubleValue.ToString(provider);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(doubleValue,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ errorDesc += "\n double value is " + doubleValue;
+ TestLibrary.TestFramework.LogError("015" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring13.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring13.cs
new file mode 100644
index 0000000000..6406e9b106
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring13.cs
@@ -0,0 +1,164 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToString(System.Int16)
+/// </summary>
+public class ConvertToString13
+{
+ public static int Main()
+ {
+ ConvertToString13 testObj = new ConvertToString13();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToString(System.Int16)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verify value is a random Int16... ";
+ string c_TEST_ID = "P001";
+
+ Int16 intValue = GetInt16(Int16.MinValue,Int16.MaxValue);
+
+ String actualValue = intValue.ToString();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ errorDesc += "\n Int32 value is " + intValue;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify value is Int16.MaxValue... ";
+ string c_TEST_ID = "P002";
+
+
+ Int16 intValue = Int16.MaxValue;
+
+ String actualValue = "32767";
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify value is Int16.MinValue... ";
+ string c_TEST_ID = "P003";
+
+
+ Int16 intValue = Int16.MinValue;
+
+ String actualValue = "-32768";
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region HelpMethod
+ private Int16 GetInt16(Int16 minValue, Int16 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return (minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return (Int16)(minValue + TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring14.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring14.cs
new file mode 100644
index 0000000000..ce61a3e7de
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring14.cs
@@ -0,0 +1,278 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Convert.ToString(System.Int16,System.IFormatProvider)
+/// </summary>
+public class ConvertToString14
+{
+ public static int Main()
+ {
+ ConvertToString14 testObj = new ConvertToString14();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToString(System.Int16,System.IFormatProvider)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verify value is a random Int16 and IFormatProvider is a null reference... ";
+ string c_TEST_ID = "P001";
+
+
+ Int16 intValue = GetInt16(Int16.MinValue, Int16.MaxValue);
+ IFormatProvider provider = null;
+
+ String actualValue = intValue.ToString(provider);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ errorDesc += "\n Int16 value is " + intValue;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify value is a random Int16 and IFormatProvider is en-US CultureInfo... ";
+ string c_TEST_ID = "P002";
+
+
+ Int16 intValue = GetInt16(Int16.MinValue, Int16.MaxValue);
+ IFormatProvider provider = new CultureInfo("en-US");
+
+ String actualValue = intValue.ToString(provider);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ errorDesc += "\n Int16 value is " + intValue;
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify value is a random Int16 and IFormatProvider is fr-FR CultureInfo... ";
+ string c_TEST_ID = "P003";
+
+
+ Int16 intValue = GetInt16(Int16.MinValue, Int16.MaxValue);
+ IFormatProvider provider = new CultureInfo("fr-FR");
+
+ String actualValue = intValue.ToString(provider);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue, provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ errorDesc += "\n Int16 value is " + intValue;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest4: Verify value is -3246 and IFormatProvider is user-defined NumberFormatInfo... ";
+ string c_TEST_ID = "P004";
+
+
+ Int16 intValue = -3246;
+
+ NumberFormatInfo numberFormatInfo = new NumberFormatInfo();
+ numberFormatInfo.NegativeSign = "minus ";
+ numberFormatInfo.NumberDecimalSeparator = " point ";
+
+ String actualValue = "minus 3246";
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue, numberFormatInfo);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ errorDesc += "\n Int16 value is " + intValue;
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest5: Verify value is Int16.MaxValue and IFormatProvider is fr-FR CultureInfo... ";
+ string c_TEST_ID = "P005";
+
+
+ Int16 intValue = Int16.MaxValue;
+ IFormatProvider provider = new CultureInfo("fr-FR");
+
+ String actualValue = "32767";
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest4: Verify value is Int16.MinValue and IFormatProvider is fr-FR CultureInfo... ";
+ string c_TEST_ID = "P004";
+
+
+ Int16 intValue = Int16.MinValue;
+ IFormatProvider provider = new CultureInfo("fr-FR");
+
+ String actualValue = "-32768";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region HelpMethod
+ private Int16 GetInt16(Int16 minValue, Int16 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return (minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return (Int16)(minValue + TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring15.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring15.cs
new file mode 100644
index 0000000000..bb27084248
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring15.cs
@@ -0,0 +1,323 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using System.Runtime.CompilerServices;
+
+/// <summary>
+/// Convert.ToString(System.Int16,System.Int32)
+/// </summary>
+public class ConvertToString14
+{
+ public static int Main()
+ {
+ ConvertToString14 testObj = new ConvertToString14();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToString(System.Int16,System.Int32)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verify value is 323 and radix is 2,8,10 or 16... ";
+ string c_TEST_ID = "P001";
+
+
+ Int16 int16Value =-123;
+ int radix;
+ String actualValue;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ actualValue = "1111111110000101";
+ radix = 2;
+ String resValue = Convert.ToString(int16Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int16Value, radix);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 8;
+ actualValue = "177605";
+ errorDesc = "";
+ resValue = Convert.ToString(int16Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int16Value, radix);
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 10;
+ actualValue = "-123";
+ errorDesc = "";
+ resValue = Convert.ToString(int16Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int16Value, radix);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 16;
+ actualValue = "ff85";
+ errorDesc = "";
+ resValue = Convert.ToString(int16Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int16Value, radix);
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify value is Int16.MaxValue and radix is 2,8,10 or 16... ";
+ string c_TEST_ID = "P002";
+
+ Int16 int16Value = Int16.MaxValue;
+ int radix;
+ String actualValue;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ actualValue = "111111111111111";
+ radix = 2;
+ String resValue = Convert.ToString(int16Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int16Value, radix);
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 8;
+ actualValue = "77777";
+ errorDesc = "";
+ resValue = Convert.ToString(int16Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int16Value, radix);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 10;
+ actualValue = "32767";
+ errorDesc = "";
+ resValue = Convert.ToString(int16Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int16Value, radix);
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 16;
+ actualValue = "7fff";
+ errorDesc = "";
+ resValue = Convert.ToString(int16Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int16Value, radix);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify value is Int16.MinValue and radix is 2,8,10 or 16... ";
+ string c_TEST_ID = "P003";
+
+ Int16 int16Value = Int16.MinValue;
+ int radix;
+ String actualValue;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ actualValue = "1000000000000000";
+ radix = 2;
+ String resValue = Convert.ToString(int16Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int16Value, radix);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 8;
+ actualValue = "100000";
+ errorDesc = "";
+ resValue = Convert.ToString(int16Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int16Value, radix);
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 10;
+ actualValue = "-32768";
+ errorDesc = "";
+ resValue = Convert.ToString(int16Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int16Value, radix);
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 16;
+ actualValue = "8000";
+ errorDesc = "";
+ resValue = Convert.ToString(int16Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int16Value, radix);
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("015", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region NegativeTesting
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest1: the radix is 32...";
+ const string c_TEST_ID = "N001";
+
+ Int16 int16Value = TestLibrary.Generator.GetInt16(-55);
+ int radix = 32;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+
+
+ try
+ {
+ Convert.ToString(int16Value, radix);
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, "ArgumentException is not thrown as expected ." + DataString(int16Value, radix));
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + DataString(int16Value, radix));
+ retVal = false;
+ }
+
+ return retVal;
+
+ }
+ #endregion
+
+ #region Help Methods
+ private string DataString(Int16 int16Value, int radix)
+ {
+ string str;
+
+ str = string.Format("\n[int16Value value]\n \"{0}\"", int16Value);
+ str += string.Format("\n[radix value ]\n {0}", radix);
+
+ return str;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring16.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring16.cs
new file mode 100644
index 0000000000..26f2e739ad
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring16.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToString(System.Int32)
+/// </summary>
+public class ConvertToString13
+{
+ public static int Main()
+ {
+ ConvertToString13 testObj = new ConvertToString13();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToString(System.Int32)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verify value is a random Int32... ";
+ string c_TEST_ID = "P001";
+
+
+ Int32 intValue = TestLibrary.Generator.GetInt32(-55);
+
+ String actualValue = intValue.ToString();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ errorDesc += "\n Int32 value is " + intValue;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify value is Int32.MaxValue... ";
+ string c_TEST_ID = "P002";
+
+
+ Int32 intValue = Int32.MaxValue;
+
+ String actualValue = "2147483647";
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify value is Int32.MinValue... ";
+ string c_TEST_ID = "P003";
+
+
+ Int32 intValue = Int32.MinValue;
+
+ String actualValue = "-2147483648";
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return (minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return (Int16)(minValue + TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring17.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring17.cs
new file mode 100644
index 0000000000..1576daeef4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring17.cs
@@ -0,0 +1,273 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Convert.ToString(System.Int32,System.IFormatProvider)
+/// </summary>
+public class ConvertToString14
+{
+ public static int Main()
+ {
+ ConvertToString14 testObj = new ConvertToString14();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToString(System.Int32,System.IFormatProvider)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verify value is a random Int32 and IFormatProvider is a null reference... ";
+ string c_TEST_ID = "P001";
+
+ Int32 intValue = GetInt32(Int32.MinValue, Int32.MaxValue);
+ IFormatProvider provider = null;
+
+ String actualValue = intValue.ToString(provider);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue, provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ errorDesc += "\n Int32 value is " + intValue;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify value is a random Int32 and IFormatProvider is en-US CultureInfo... ";
+ string c_TEST_ID = "P002";
+
+ Int32 intValue = GetInt32(Int32.MinValue, Int32.MaxValue);
+ IFormatProvider provider = new CultureInfo("en-US");
+
+ String actualValue = intValue.ToString(provider);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue, provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ errorDesc += "\n Int32 value is " + intValue;
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify value is a random Int32 and IFormatProvider is fr-FR CultureInfo... ";
+ string c_TEST_ID = "P003";
+
+
+ Int32 intValue = GetInt32(Int32.MinValue, Int32.MaxValue);
+ IFormatProvider provider = new CultureInfo("fr-FR");
+
+ String actualValue = intValue.ToString(provider);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue, provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ errorDesc += "\n Int32 value is " + intValue;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest4: Verify value is -32465641235 and IFormatProvider is user-defined NumberFormatInfo... ";
+ string c_TEST_ID = "P004";
+
+ Int32 intValue = -465641235;
+
+ NumberFormatInfo numberFormatInfo = new NumberFormatInfo();
+ numberFormatInfo.NegativeSign = "minus ";
+ numberFormatInfo.NumberDecimalSeparator = " point ";
+
+ String actualValue = "minus 465641235";
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue, numberFormatInfo);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ errorDesc += "\n Int32 value is " + intValue;
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest5: Verify value is Int32.MaxValue and IFormatProvider is fr-FR CultureInfo... ";
+ string c_TEST_ID = "P005";
+
+ Int32 intValue = Int32.MaxValue;
+ IFormatProvider provider = new CultureInfo("fr-FR");
+
+ String actualValue = "2147483647";
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue, provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest6: Verify value is Int32.MinValue and IFormatProvider is fr-FR CultureInfo... ";
+ string c_TEST_ID = "P006";
+
+ Int32 intValue = Int32.MinValue;
+ IFormatProvider provider = new CultureInfo("fr-FR");
+
+ String actualValue = "-2147483648";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue, provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return (minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return (Int32)(minValue + TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring18.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring18.cs
new file mode 100644
index 0000000000..c053cb339d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring18.cs
@@ -0,0 +1,320 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using System.Runtime.CompilerServices;
+
+/// <summary>
+/// Convert.ToString(System.Int32,System.Int32)
+/// </summary>
+public class ConvertToString18
+{
+ public static int Main()
+ {
+ ConvertToString18 testObj = new ConvertToString18();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToString(System.Int32,System.Int32)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verify value is 323 and radix is 2,8,10 or 16... ";
+ string c_TEST_ID = "P001";
+
+
+ Int32 int32Value = -123;
+ int radix;
+ String actualValue;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ actualValue = "11111111111111111111111110000101";
+ radix = 2;
+ String resValue = Convert.ToString(int32Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int32Value, radix);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 8;
+ actualValue = "37777777605";
+ errorDesc = "";
+ resValue = Convert.ToString(int32Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int32Value, radix);
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 10;
+ actualValue = "-123";
+ errorDesc = "";
+ resValue = Convert.ToString(int32Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int32Value, radix);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 16;
+ actualValue = "ffffff85";
+ errorDesc = "";
+ resValue = Convert.ToString(int32Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int32Value, radix);
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify value is Int32.MaxValue and radix is 2,8,10 or 16... ";
+ string c_TEST_ID = "P002";
+
+ Int32 int32Value = Int32.MaxValue;
+ int radix;
+ String actualValue;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ actualValue = "1111111111111111111111111111111";
+ radix = 2;
+ String resValue = Convert.ToString(int32Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int32Value, radix);
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 8;
+ actualValue = "17777777777";
+ errorDesc = "";
+ resValue = Convert.ToString(int32Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int32Value, radix);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 10;
+ actualValue = "2147483647";
+ errorDesc = "";
+ resValue = Convert.ToString(int32Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int32Value, radix);
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 16;
+ actualValue = "7fffffff";
+ errorDesc = "";
+ resValue = Convert.ToString(int32Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int32Value, radix);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify value is Int32.MinValue and radix is 2,8,10 or 16... ";
+ string c_TEST_ID = "P003";
+
+ Int32 int32Value = Int32.MinValue;
+ int radix;
+ String actualValue;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ actualValue = "10000000000000000000000000000000";
+ radix = 2;
+ String resValue = Convert.ToString(int32Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int32Value, radix);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 8;
+ actualValue = "20000000000";
+ errorDesc = "";
+ resValue = Convert.ToString(int32Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int32Value, radix);
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 10;
+ actualValue = "-2147483648";
+ errorDesc = "";
+ resValue = Convert.ToString(int32Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int32Value, radix);
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 16;
+ actualValue = "80000000";
+ errorDesc = "";
+ resValue = Convert.ToString(int32Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int32Value, radix);
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("015", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region NegativeTesting
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest1: the radix is 32...";
+ const string c_TEST_ID = "N001";
+
+ Int32 int32Value = TestLibrary.Generator.GetInt32(-55);
+ int radix = 32;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Convert.ToString(int32Value, radix);
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, "ArgumentException is not thrown as expected ." + DataString(int32Value, radix));
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + DataString(int32Value, radix));
+ retVal = false;
+ }
+
+ return retVal;
+
+ }
+ #endregion
+
+ #region Help Methods
+ private string DataString(Int32 int32Value, int radix)
+ {
+ string str;
+
+ str = string.Format("\n[int32Value value]\n \"{0}\"", int32Value);
+ str += string.Format("\n[radix value ]\n {0}", radix);
+
+ return str;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring19.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring19.cs
new file mode 100644
index 0000000000..7e954e4ec0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring19.cs
@@ -0,0 +1,144 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToString(System.Int64)
+/// </summary>
+public class ConvertToString19
+{
+ public static int Main()
+ {
+ ConvertToString19 testObj = new ConvertToString19();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToString(System.Int64)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verify value is a random Int64... ";
+ string c_TEST_ID = "P001";
+
+
+ Int64 intValue = TestLibrary.Generator.GetInt64(-55);
+
+ String actualValue = intValue.ToString();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ errorDesc += "\n Int64 value is " + intValue;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify value is Int64.MaxValue... ";
+ string c_TEST_ID = "P002";
+
+
+ Int64 intValue = Int64.MaxValue;
+
+ String actualValue = "9223372036854775807";
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify value is Int64.MinValue... ";
+ string c_TEST_ID = "P003";
+
+
+ Int64 intValue = Int64.MinValue;
+
+ String actualValue = "-9223372036854775808";
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring2.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring2.cs
new file mode 100644
index 0000000000..1c5955ccb1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring2.cs
@@ -0,0 +1,177 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Convert.ToString(System.Byte,System.IFormatProvider)
+/// </summary>
+public class ConvertToString2
+{
+ public static int Main()
+ {
+ ConvertToString2 testObj = new ConvertToString2();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToString(System.Byte,System.IFormatProvider)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verify value is a random Byte... ";
+ string c_TEST_ID = "P001";
+
+
+ Byte byteValue = TestLibrary.Generator.GetByte(-55);
+ IFormatProvider provider = null;
+ String actualValue = byteValue.ToString(provider);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(byteValue,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify value is Byte.MaxValue... ";
+ string c_TEST_ID = "P002";
+
+ Byte byteValue = Byte.MaxValue;
+ IFormatProvider provider = null;
+ String actualValue = byteValue.ToString(provider);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(byteValue,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify value is Byte.MinValue... ";
+ string c_TEST_ID = "P003";
+
+ Byte byteValue = Byte.MinValue;
+ IFormatProvider provider = null;
+ String actualValue = byteValue.ToString(provider);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(byteValue,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest4: Verify the IFormatProvider is fr-FR CultureInfo... ";
+ string c_TEST_ID = "P004";
+
+
+ Byte byteValue = TestLibrary.Generator.GetByte(-55);
+ IFormatProvider provider = (IFormatProvider)new CultureInfo("fr-FR");
+ String actualValue = byteValue.ToString(provider);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(byteValue, provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring20.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring20.cs
new file mode 100644
index 0000000000..d0d84dd162
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring20.cs
@@ -0,0 +1,250 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Convert.ToString(System.Int64,System.IFormatProvider)
+/// </summary>
+public class ConvertToString20
+{
+ public static int Main()
+ {
+ ConvertToString20 testObj = new ConvertToString20();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToString(System.Int64,System.IFormatProvider)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verify value is a random Int64 and IFormatProvider is a null reference... ";
+ string c_TEST_ID = "P001";
+
+ Int64 intValue = TestLibrary.Generator.GetInt64(-55);
+ IFormatProvider provider = null;
+
+ String actualValue = intValue.ToString(provider);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue, provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ errorDesc += "\n Int64 value is " + intValue;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify value is a random Int64 and IFormatProvider is en-US CultureInfo... ";
+ string c_TEST_ID = "P002";
+
+ Int64 intValue = TestLibrary.Generator.GetInt64(-55);
+ IFormatProvider provider = new CultureInfo("en-US");
+
+ String actualValue = intValue.ToString(provider);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue, provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ errorDesc += "\n Int64 value is " + intValue;
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify value is a random Int64 and IFormatProvider is fr-FR CultureInfo... ";
+ string c_TEST_ID = "P003";
+
+
+ Int64 intValue = TestLibrary.Generator.GetInt64(-55);
+ IFormatProvider provider = new CultureInfo("fr-FR");
+
+ String actualValue = intValue.ToString(provider);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue, provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ errorDesc += "\n Int64 value is " + intValue;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest4: Verify value is -64465641235 and IFormatProvider is user-defined NumberFormatInfo... ";
+ string c_TEST_ID = "P004";
+
+ Int64 intValue = -465641235;
+
+ NumberFormatInfo numberFormatInfo = new NumberFormatInfo();
+ numberFormatInfo.NegativeSign = "minus ";
+ numberFormatInfo.NumberDecimalSeparator = " point ";
+
+ String actualValue = "minus 465641235";
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue, numberFormatInfo);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ errorDesc += "\n Int64 value is " + intValue;
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest5: Verify value is Int64.MaxValue and IFormatProvider is fr-FR CultureInfo... ";
+ string c_TEST_ID = "P005";
+
+ Int64 intValue = Int64.MaxValue;
+ IFormatProvider provider = new CultureInfo("fr-FR");
+
+ String actualValue = "9223372036854775807";
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue, provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest6: Verify value is Int64.MinValue and IFormatProvider is fr-FR CultureInfo... ";
+ string c_TEST_ID = "P006";
+
+ Int64 intValue = Int64.MinValue;
+ IFormatProvider provider = new CultureInfo("fr-FR");
+
+ String actualValue = "-9223372036854775808";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(intValue, provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue + " as expected: Actual is " + actualValue;
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring21.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring21.cs
new file mode 100644
index 0000000000..ab0e341a50
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring21.cs
@@ -0,0 +1,320 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using System.Runtime.CompilerServices;
+
+/// <summary>
+/// Convert.ToString(System.Int64,System.Int32)
+/// </summary>
+public class ConvertToString21
+{
+ public static int Main()
+ {
+ ConvertToString21 testObj = new ConvertToString21();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToString(System.Int64,System.Int32)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verify value is -123 and radix is 2,8,10 or 16... ";
+ string c_TEST_ID = "P001";
+
+
+ Int64 int64Value = -123;
+ int radix;
+ String actualValue;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ actualValue = "1111111111111111111111111111111111111111111111111111111110000101";
+ radix = 2;
+ String resValue = Convert.ToString(int64Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int64Value, radix);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 8;
+ actualValue = "1777777777777777777605";
+ errorDesc = "";
+ resValue = Convert.ToString(int64Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int64Value, radix);
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 10;
+ actualValue = "-123";
+ errorDesc = "";
+ resValue = Convert.ToString(int64Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int64Value, radix);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 16;
+ actualValue = "ffffffffffffff85";
+ errorDesc = "";
+ resValue = Convert.ToString(int64Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int64Value, radix);
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify value is Int64.MaxValue and radix is 2,8,10 or 16... ";
+ string c_TEST_ID = "P002";
+
+ Int64 int64Value = Int64.MaxValue;
+ int radix;
+ String actualValue;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ actualValue = "111111111111111111111111111111111111111111111111111111111111111";
+ radix = 2;
+ String resValue = Convert.ToString(int64Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int64Value, radix);
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 8;
+ actualValue = "777777777777777777777";
+ errorDesc = "";
+ resValue = Convert.ToString(int64Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int64Value, radix);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 10;
+ actualValue = "9223372036854775807";
+ errorDesc = "";
+ resValue = Convert.ToString(int64Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int64Value, radix);
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 16;
+ actualValue = "7fffffffffffffff";
+ errorDesc = "";
+ resValue = Convert.ToString(int64Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int64Value, radix);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify value is Int64.MinValue and radix is 2,8,10 or 16... ";
+ string c_TEST_ID = "P003";
+
+ Int64 int64Value = Int64.MinValue;
+ int radix;
+ String actualValue;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ actualValue = "1000000000000000000000000000000000000000000000000000000000000000";
+ radix = 2;
+ String resValue = Convert.ToString(int64Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int64Value, radix);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 8;
+ actualValue = "1000000000000000000000";
+ errorDesc = "";
+ resValue = Convert.ToString(int64Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int64Value, radix);
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 10;
+ actualValue = "-9223372036854775808";
+ errorDesc = "";
+ resValue = Convert.ToString(int64Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int64Value, radix);
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 16;
+ actualValue = "8000000000000000";
+ errorDesc = "";
+ resValue = Convert.ToString(int64Value, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(int64Value, radix);
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("015", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region NegativeTesting
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest1: the radix is 32...";
+ const string c_TEST_ID = "N001";
+
+ Int32 int32Value = TestLibrary.Generator.GetInt32(-55);
+ int radix = 32;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Convert.ToString(int32Value, radix);
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, "ArgumentException is not thrown as expected ." + DataString(int32Value, radix));
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + DataString(int32Value, radix));
+ retVal = false;
+ }
+
+ return retVal;
+
+ }
+ #endregion
+
+ #region Help Methods
+ private string DataString(Int64 int64Value, int radix)
+ {
+ string str;
+
+ str = string.Format("\n[int64Value value]\n \"{0}\"", int64Value);
+ str += string.Format("\n[radix value ]\n {0}", radix);
+
+ return str;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring22.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring22.cs
new file mode 100644
index 0000000000..c7c4dcceac
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring22.cs
@@ -0,0 +1,205 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToString(System.Object)
+/// </summary>
+public class ConvertToString22
+{
+ public static int Main()
+ {
+ ConvertToString22 testObj = new ConvertToString22();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToString(System.Object)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Call Convert.ToString when value implements IConvertible... ";
+ string c_TEST_ID = "P001";
+
+
+ TestConvertableClass tcc = new TestConvertableClass();
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ object myObject = tcc;
+ if (tcc.ToString(null) != Convert.ToString(myObject))
+ {
+ string errorDesc = "value is not " + Convert.ToString((object)tcc) + " as expected: Actual is " + tcc.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify object is a null reference... ";
+ string c_TEST_ID = "P002";
+
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ object obj = null;
+ String resValue = Convert.ToString(obj);
+ if (resValue !=String.Empty)
+ {
+ string errorDesc = "value is not \""+ resValue +"\" as expected: Actual is empty";
+ errorDesc += "\n when object is a null reference";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ #endregion
+
+ #region HelpMethod
+ public class TestConvertableClass : IConvertible
+ {
+ #region IConvertible Members
+
+ public TypeCode GetTypeCode()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool ToBoolean(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public byte ToByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public char ToChar(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public DateTime ToDateTime(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public decimal ToDecimal(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public double ToDouble(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public short ToInt16(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int ToInt32(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public long ToInt64(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public sbyte ToSByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public float ToSingle(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public string ToString(IFormatProvider provider)
+ {
+ return "this is user-defined class";
+ }
+
+ public object ToType(Type conversionType, IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ushort ToUInt16(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public uint ToUInt32(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ulong ToUInt64(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring23.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring23.cs
new file mode 100644
index 0000000000..72e113dc05
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring23.cs
@@ -0,0 +1,202 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToString(System.Object,System.IFormatProvider)
+/// </summary>
+public class ConvertToString23
+{
+ public static int Main()
+ {
+ ConvertToString23 testObj = new ConvertToString23();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToString(System.Object,System.IFormatProvider)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Call Convert.ToString when value implements IConvertible... ";
+ string c_TEST_ID = "P001";
+
+
+ TestConvertableClass tcc = new TestConvertableClass();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (tcc.ToString(null) != Convert.ToString((object)tcc,null))
+ {
+ string errorDesc = "value is not " + Convert.ToString((object)tcc) + " as expected: Actual is " + tcc.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify object is a null reference... ";
+ string c_TEST_ID = "P002";
+
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ object obj = null;
+ String resValue = Convert.ToString(obj, null);
+ if (resValue != String.Empty)
+ {
+ string errorDesc = "value is not \"" + resValue + "\" as expected: Actual is empty";
+ errorDesc += "\n when object is a null reference";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ #endregion
+
+ #region HelpMethod
+ public class TestConvertableClass : IConvertible
+ {
+ #region IConvertible Members
+
+ public TypeCode GetTypeCode()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool ToBoolean(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public byte ToByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public char ToChar(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public DateTime ToDateTime(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public decimal ToDecimal(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public double ToDouble(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public short ToInt16(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int ToInt32(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public long ToInt64(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public sbyte ToSByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public float ToSingle(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public string ToString(IFormatProvider provider)
+ {
+ return "this is formatted string";
+ }
+
+ public object ToType(Type conversionType, IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ushort ToUInt16(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public uint ToUInt32(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ulong ToUInt64(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring24.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring24.cs
new file mode 100644
index 0000000000..78818d16fd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring24.cs
@@ -0,0 +1,144 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToString(SByte)
+/// </summary>
+public class ConvertToString24
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random sbyte to string");
+
+ try
+ {
+ sbyte sByte = this.GetSByte(sbyte.MinValue, sbyte.MaxValue);
+ string str = Convert.ToString(sByte);
+ if (str != sByte.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,sbyte is:" + sByte);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert sbyteMaxValue to string");
+
+ try
+ {
+ sbyte sByte = SByte.MaxValue;
+ string str = Convert.ToString(sByte);
+ if (str != sByte.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert sbyteMinValue to string");
+
+ try
+ {
+ sbyte sByte = SByte.MinValue;
+ string str = Convert.ToString(sByte);
+ if (str != sByte.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToString24 test = new ConvertToString24();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToString24");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private SByte GetSByte(sbyte minValue, sbyte maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return (minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return (sbyte)(minValue + TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring25.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring25.cs
new file mode 100644
index 0000000000..3240ca1eeb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring25.cs
@@ -0,0 +1,177 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Convert.ToString(SByte,IFormatProvider)
+/// </summary>
+public class ConvertToString25
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random sbyte to string and the iformatprovider is null");
+
+ try
+ {
+ sbyte sByte = this.GetSByte(sbyte.MinValue, sbyte.MaxValue);
+ IFormatProvider iFormatProvider = null;
+ string str = Convert.ToString(sByte, iFormatProvider);
+ if (str != sByte.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,sbyte is:" + sByte);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert sbyteMaxValue to string and the cultureinfo is \"en-US\"");
+
+ try
+ {
+ sbyte sByte = SByte.MaxValue;
+ IFormatProvider iFormatProvider = new CultureInfo("en-US");
+ string str = Convert.ToString(sByte, iFormatProvider);
+ if (str != sByte.ToString(iFormatProvider))
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert sbyteMinValue to string and the cultureinfo is \"fr-FR\"");
+
+ try
+ {
+ sbyte sByte = SByte.MinValue;
+ IFormatProvider iFormatProvider = new CultureInfo("fr-FR");
+ string str = Convert.ToString(sByte, iFormatProvider);
+ if (str != sByte.ToString(iFormatProvider))
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Using numberstyle to affect the string");
+
+ try
+ {
+ sbyte sByte = -123;
+ NumberFormatInfo numberFormatInfo = new NumberFormatInfo();
+ numberFormatInfo.NegativeSign = "$";
+ string str = Convert.ToString(sByte, numberFormatInfo);
+ if (str != "$123")
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToString25 test = new ConvertToString25();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToString25");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private SByte GetSByte(sbyte minValue, sbyte maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return (minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return (sbyte)(minValue + TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring28.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring28.cs
new file mode 100644
index 0000000000..7d3ef72b6c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring28.cs
@@ -0,0 +1,144 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToString(uint16)
+/// </summary>
+public class ConvertToString28
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random UInt16 to string");
+
+ try
+ {
+ UInt16 i = this.GetUInt16(UInt16.MinValue, UInt16.MaxValue);
+ string str = Convert.ToString(i);
+ if (str != i.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,sbyte is:" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert UInt16MaxValue to string");
+
+ try
+ {
+ UInt16 i = UInt16.MaxValue;
+ string str = Convert.ToString(i);
+ if (str != i.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert UInt16MinValue to string");
+
+ try
+ {
+ UInt16 i = UInt16.MinValue;
+ string str = Convert.ToString(i);
+ if (str != i.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToString28 test = new ConvertToString28();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToString28");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private UInt16 GetUInt16(UInt16 minValue, UInt16 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return (minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return (UInt16)(minValue + TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring29.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring29.cs
new file mode 100644
index 0000000000..2e5acf4f30
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring29.cs
@@ -0,0 +1,148 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Convert.ToString(uint16,IFormatProvider)
+/// </summary>
+public class ConvertToString29
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random UInt16 to string");
+
+ try
+ {
+ UInt16 i = this.GetUInt16(UInt16.MinValue, UInt16.MaxValue);
+ IFormatProvider iFormatProvider = null;
+ string str = Convert.ToString(i, iFormatProvider);
+ if (str != i.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,sbyte is:" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert UInt16MaxValue to string");
+
+ try
+ {
+ UInt16 i = UInt16.MaxValue;
+ IFormatProvider iFormatProvider = new CultureInfo("en-US");
+ string str = Convert.ToString(i, iFormatProvider);
+ if (str != i.ToString(iFormatProvider))
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert UInt16MinValue to string");
+
+ try
+ {
+ UInt16 i = UInt16.MinValue;
+ IFormatProvider iFormatProvider = new CultureInfo("fr-FR");
+ string str = Convert.ToString(i, iFormatProvider);
+ if (str != i.ToString(iFormatProvider))
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToString29 test = new ConvertToString29();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToString29");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private UInt16 GetUInt16(UInt16 minValue, UInt16 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return (minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return (UInt16)(minValue + TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring30.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring30.cs
new file mode 100644
index 0000000000..47f529fa39
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring30.cs
@@ -0,0 +1,144 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToString(uInt32)
+/// </summary>
+public class ConvertToString30
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random UInt32 to string");
+
+ try
+ {
+ UInt32 i = this.GetUInt32(UInt32.MinValue, UInt32.MaxValue);
+ string str = Convert.ToString(i);
+ if (str != i.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is:" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert UInt32MaxValue to string");
+
+ try
+ {
+ UInt32 i = UInt32.MaxValue;
+ string str = Convert.ToString(i);
+ if (str != i.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert UInt32MinValue to string");
+
+ try
+ {
+ UInt32 i = UInt32.MinValue;
+ string str = Convert.ToString(i);
+ if (str != i.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToString30 test = new ConvertToString30();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToString30");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private UInt32 GetUInt32(UInt32 minValue, UInt32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return (minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return (UInt32)(minValue + TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring31.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring31.cs
new file mode 100644
index 0000000000..9745a99031
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring31.cs
@@ -0,0 +1,149 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// System.Convert.ToString(uInt32,IFormatProvider)
+/// </summary>
+public class ConvertToString31
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random UInt32 to string");
+
+ try
+ {
+ UInt32 i = this.GetUInt32(UInt32.MinValue, UInt32.MaxValue);
+ IFormatProvider iFormatProvider = null;
+ string str = Convert.ToString(i, iFormatProvider);
+ if (str != i.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is:" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert UInt32MaxValue to string");
+
+ try
+ {
+ UInt32 i = UInt32.MaxValue;
+ IFormatProvider iFormatProvider = new CultureInfo("en-US");
+ string str = Convert.ToString(i, iFormatProvider);
+ if (str != i.ToString(iFormatProvider))
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert UInt32MinValue to string");
+
+ try
+ {
+ UInt32 i = UInt32.MinValue;
+ IFormatProvider iFormatProvider = new CultureInfo("fr-FR");
+ string str = Convert.ToString(i, iFormatProvider);
+ if (str != i.ToString(iFormatProvider))
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToString31 test = new ConvertToString31();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToString31");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ private UInt32 GetUInt32(UInt32 minValue, UInt32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return (minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return (UInt32)(minValue + TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring32.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring32.cs
new file mode 100644
index 0000000000..38c22f8582
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring32.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Convert.ToString(uInt64)
+/// </summary>
+public class ConvertToString32
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random UInt64 to string");
+
+ try
+ {
+ UInt64 i = this.GetUInt64(UInt64.MinValue, UInt64.MaxValue);
+ string str = Convert.ToString(i);
+ if (str != i.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is:" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert UInt64MaxValue to string");
+
+ try
+ {
+ UInt64 i = UInt64.MaxValue;
+ string str = Convert.ToString(i);
+ if (str != i.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert UInt64MinValue to string");
+
+ try
+ {
+ UInt64 i = UInt64.MinValue;
+ string str = Convert.ToString(i);
+ if (str != i.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToString32 test = new ConvertToString32();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToString32");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private UInt64 GetUInt64(UInt64 minValue, UInt64 maxValue)
+ {
+ try
+ {
+ int i = this.GetInt32(0, 2);
+ if (minValue == maxValue)
+ {
+ return (minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return (UInt64)(minValue + (ulong)TestLibrary.Generator.GetInt64(-55) * 2 - (ulong)i);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring33.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring33.cs
new file mode 100644
index 0000000000..d50f95564f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring33.cs
@@ -0,0 +1,168 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// System.Convert.ToString(uInt64,IFormatProvider)
+/// </summary>
+public class ConvertToString33
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random UInt64 to string");
+
+ try
+ {
+ UInt64 i = this.GetUInt64(UInt64.MinValue, UInt64.MaxValue);
+ IFormatProvider iFormatProvider = null;
+ string str = Convert.ToString(i, iFormatProvider);
+ if (str != i.ToString(iFormatProvider))
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,i is:" + i);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert UInt64MaxValue to string");
+
+ try
+ {
+ UInt64 i = UInt64.MaxValue;
+ IFormatProvider iFormatProvider = new CultureInfo("en-US");
+ string str = Convert.ToString(i, iFormatProvider);
+ if (str != i.ToString(iFormatProvider))
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert UInt64MinValue to string");
+
+ try
+ {
+ UInt64 i = UInt64.MinValue;
+ IFormatProvider iFormatProvider = new CultureInfo("fr-FR");
+ string str = Convert.ToString(i, iFormatProvider);
+ if (str != i.ToString(iFormatProvider))
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConvertToString33 test = new ConvertToString33();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToString33");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private UInt64 GetUInt64(UInt64 minValue, UInt64 maxValue)
+ {
+ try
+ {
+ int i = this.GetInt32(0, 2);
+ if (minValue == maxValue)
+ {
+ return (minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return (UInt64)(minValue + (ulong)TestLibrary.Generator.GetInt64(-55) * 2 - (ulong)i);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring4.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring4.cs
new file mode 100644
index 0000000000..dc78b6f3b4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring4.cs
@@ -0,0 +1,287 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using System.Runtime.CompilerServices;
+
+/// <summary>
+/// Convert.ToString(System.Byte,System.Int32)
+/// </summary>
+public class ConvertToString4
+{
+ const int flags =0x40;
+ const int width = -1;
+ const char paddingChar = ' ';
+
+ public static int Main()
+ {
+ ConvertToString4 testObj = new ConvertToString4();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToString(System.Byte,System.Int32)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verify value is 15 and radix is 2,8,10 or 16... ";
+ string c_TEST_ID = "P001";
+
+
+ Byte byteValue = 15;
+ int radix ;
+ String actualValue;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ actualValue = "1111";
+ radix = 2;
+ String resValue = Convert.ToString(byteValue, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(byteValue, radix);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 8;
+ actualValue = "17";
+ errorDesc = "";
+ resValue = Convert.ToString(byteValue, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(byteValue, radix);
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 10;
+ actualValue = "15";
+ errorDesc = "";
+ resValue = Convert.ToString(byteValue, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(byteValue, radix);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 16;
+ actualValue = "f";
+ errorDesc = "";
+ resValue = Convert.ToString(byteValue, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(byteValue, radix);
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify value is Byte.MaxValue and radix is 2,8,10 or 16... ";
+ string c_TEST_ID = "P002";
+
+ Byte byteValue = Byte.MaxValue;
+ int radix;
+ String actualValue;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ actualValue = "11111111";
+ radix = 2;
+ String resValue = Convert.ToString(byteValue, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(byteValue, radix);
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 8;
+ actualValue = "377";
+ errorDesc = "";
+ resValue = Convert.ToString(byteValue, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(byteValue, radix);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 10;
+ actualValue = "255";
+ errorDesc = "";
+ resValue = Convert.ToString(byteValue, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(byteValue, radix);
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ radix = 16;
+ actualValue = "ff";
+ errorDesc = "";
+ resValue = Convert.ToString(byteValue, radix);
+
+ if (actualValue != resValue)
+ {
+ errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(byteValue, radix);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify value is Byte.MinValue and radix is 2,8,10 or 16... ";
+ string c_TEST_ID = "P003";
+
+ Byte byteValue = Byte.MinValue;
+ int[] radices ={ 2, 8, 10, 16 };
+ String actualValue ="0";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ foreach (int radix in radices)
+ {
+ String resValue = Convert.ToString(byteValue, radix);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += DataString(byteValue, radix);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "unexpected exception occurs :" + e );
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region NegativeTesting
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest1: the radix is 32...";
+ const string c_TEST_ID = "N001";
+
+ Byte byteValue = TestLibrary.Generator.GetByte(-55);
+ int radix =32;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+
+
+ try
+ {
+ Convert.ToString(byteValue, radix);
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, "ArgumentException is not thrown as expected ." + DataString(byteValue,radix));
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + DataString(byteValue, radix));
+ retVal = false;
+ }
+
+ return retVal;
+
+ }
+ #endregion
+
+ #region Help Methods
+ private string DataString(Byte byteValue, int radix)
+ {
+ string str;
+
+ str = string.Format("\n[byteValue value]\n \"{0}\"", byteValue);
+ str += string.Format("\n[radix value ]\n {0}", radix);
+
+ return str;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring5.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring5.cs
new file mode 100644
index 0000000000..fff021d0bf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring5.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToString(System.Char)
+/// </summary>
+public class ConvertToString5
+{
+ public static int Main()
+ {
+ ConvertToString5 testObj = new ConvertToString5();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToString(System.Char)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verify value is a random Char... ";
+ string c_TEST_ID = "P001";
+
+
+ Char charValue = TestLibrary.Generator.GetChar(-55);
+ String actualValue = new String(charValue, 1);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(charValue);
+ if (actualValue != resValue)
+ {
+ String errorDesc = String.Format("String representation of character \\u{0:x} is not the value ", (int)charValue);
+ errorDesc += String.Format("{0} as expected: actual({1})", actualValue, resValue);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring6.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring6.cs
new file mode 100644
index 0000000000..df5271a766
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring6.cs
@@ -0,0 +1,149 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Convert.ToString(System.Char,System.IFormatProvider)
+/// </summary>
+public class ConvertToString6
+{
+ public static int Main()
+ {
+ ConvertToString6 testObj = new ConvertToString6();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToString(System.Char,System.IFormatProvider)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verify value is a random Char and IFormatProvider is a null reference... ";
+ string c_TEST_ID = "P001";
+
+
+ Char charValue = TestLibrary.Generator.GetChar(-55);
+ String actualValue = new String(charValue, 1);
+ IFormatProvider provider = null;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(charValue,provider);
+ if (actualValue != resValue)
+ {
+ String errorDesc = String.Format("String representation of character \\u{0:x} is not the value ", (int)charValue);
+ errorDesc += String.Format("{0} as expected: actual({1})", actualValue, resValue);
+ errorDesc += "\n IFormatProvider is a nll reference";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify value is a random Char and en-US CultureInfo... ";
+ string c_TEST_ID = "P002";
+
+
+ Char charValue = TestLibrary.Generator.GetChar(-55);
+ String actualValue = new String(charValue, 1);
+ IFormatProvider provider = new CultureInfo("en-US");
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(charValue, provider);
+ if (actualValue != resValue)
+ {
+ String errorDesc = String.Format("String representation of character \\u{0:x} is not the value ", (int)charValue);
+ errorDesc += String.Format("{0} as expected: actual({1})", actualValue, resValue);
+ errorDesc += "\n IFormatProvider is en-US CultureInfo";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify value is a random Char and fr-FR CultureInfo... ";
+ string c_TEST_ID = "P003";
+
+
+ Char charValue = TestLibrary.Generator.GetChar(-55);
+ String actualValue = new String(charValue, 1);
+ IFormatProvider provider = new CultureInfo("fr-FR");
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(charValue, provider);
+ if (actualValue != resValue)
+ {
+ String errorDesc = String.Format("String representation of character \\u{0:x} is not the value ", (int)charValue);
+ errorDesc += String.Format("{0} as expected: actual({1})", actualValue, resValue);
+ errorDesc += "\n IFormatProvider is fr-FR CultureInfo";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring7.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring7.cs
new file mode 100644
index 0000000000..9cf3cecf8b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring7.cs
@@ -0,0 +1,141 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Convert.ToString(System.DateTime)
+/// </summary>
+public class ConvertToString7
+{
+ public static int Main()
+ {
+ ConvertToString7 testObj = new ConvertToString7();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToString(System.DateTime)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verify the DateTime is now... ";
+ string c_TEST_ID = "P001";
+
+
+ DateTime dt = DateTime.Now;
+ String actualValue = dt.ToString();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(dt);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify DateTime instance is MinSupportedDateTime ";
+ string c_TEST_ID = "P002";
+
+ DateTime dt = CultureInfo.CurrentCulture.Calendar.MinSupportedDateTime;
+
+ String actualValue = dt.ToString();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(dt);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify DateTime instance is MaxSupportedDateTime";
+ string c_TEST_ID = "P003";
+
+ DateTime dt = CultureInfo.CurrentCulture.Calendar.MaxSupportedDateTime;
+
+ String actualValue = dt.ToString();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(dt);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring8.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring8.cs
new file mode 100644
index 0000000000..7e8f6155d1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring8.cs
@@ -0,0 +1,240 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Convert.ToString(System.DateTime,System.IFormatProvider)
+/// </summary>
+public class ConvertToString8
+{
+ public static int Main()
+ {
+ ConvertToString8 testObj = new ConvertToString8();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToString(System.DateTime,System.IFormatProvider)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ //ur-PK doesn't exist in telesto
+ // retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verify the DateTime is now and IFormatProvider is en-US CultureInfo... ";
+ string c_TEST_ID = "P001";
+
+
+ DateTime dt = DateTime.Now;
+ IFormatProvider provider = new CultureInfo("en-US");
+ String actualValue = dt.ToString(provider);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(dt,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc = "\n IFormatProvider is en-US CultureInfo.";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify the DateTime is now and IFormatProvider is fr-FR CultureInfo... ";
+ string c_TEST_ID = "P002";
+
+
+ DateTime dt = DateTime.Now;
+ IFormatProvider provider = new CultureInfo("fr-FR");
+ String actualValue = dt.ToString(provider);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(dt,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc = "\n IFormatProvider is fr-FR CultureInfo.";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify DateTime instance is created by ctor(int year,int month,int day) and IFormatProvider is ur-PK... ";
+ string c_TEST_ID = "P003";
+
+ Random rand = new Random(-55);
+ int year = rand.Next(1900, 2050);
+ int month = rand.Next(1, 12);
+ int day = rand.Next(1, 28);
+ DateTime dt = new DateTime(year, month, day);
+
+ IFormatProvider provider = new CultureInfo("ur-PK");
+ String actualValue = dt.ToString(provider);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(dt,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc = "\n IFormatProvider is ur-PK CultureInfo.";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest4: Verify DateTime instance is created by ctor(int year,int month,int day,int hour,int minute,int second) and IFormatProvider is ru-RU CultureInfo...... ";
+ string c_TEST_ID = "P004";
+
+
+ Random rand = new Random(-55);
+ int year = rand.Next(1900, 2050);
+ int month = rand.Next(1, 12);
+ int day = rand.Next(1, 28);
+ int hour = rand.Next(0, 23);
+ int minute = rand.Next(0, 59);
+ int second = rand.Next(0, 59);
+ DateTime dt = new DateTime(year, month, day);
+
+ IFormatProvider provider = new CultureInfo("ru-RU");
+ String actualValue = dt.ToString(provider);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(dt,provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc = "\n IFormatProvider is ur-PK CultureInfo.";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest5: Verify DateTime instance is created by ctor(int year,int month,int day,int hour,int minute,int second) and IFormatProvider is a null reference... ";
+ string c_TEST_ID = "P005";
+
+
+ Random rand = new Random(-55);
+ int year = rand.Next(1900, 2050);
+ int month = rand.Next(1, 12);
+ int day = rand.Next(1, 28);
+ int hour = rand.Next(0, 23);
+ int minute = rand.Next(0, 59);
+ int second = rand.Next(0, 59);
+ DateTime dt = new DateTime(year, month, day);
+
+ IFormatProvider provider = null;
+ String actualValue = dt.ToString(provider);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(dt, provider);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc = "\n IFormatProvider is a null reference.";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttostring9.cs b/tests/src/CoreMangLib/cti/system/convert/converttostring9.cs
new file mode 100644
index 0000000000..f8868f9b9a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttostring9.cs
@@ -0,0 +1,223 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Convert.ToString(System.Decimal)
+/// </summary>
+public class ConvertToString9
+{
+ public static int Main()
+ {
+ ConvertToString9 testObj = new ConvertToString9();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Convert.ToString(System.Decimal)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verify value is a random positive Decimal... ";
+ string c_TEST_ID = "P001";
+
+ Random rand = new Random(-55);
+ int low = TestLibrary.Generator.GetInt32(-55);
+ int mid = TestLibrary.Generator.GetInt32(-55);
+ int hi = TestLibrary.Generator.GetInt32(-55);
+ bool isNagetive = true;
+ Byte scale = (byte)rand.Next(0,27);
+ Decimal decimalValue = new Decimal(low,mid,hi,isNagetive,scale);
+
+ String actualValue = decimalValue.ToString();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(decimalValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += "\n decimal value is "+decimalValue;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verify value is a random negative Decimal... ";
+ string c_TEST_ID = "P002";
+
+ Random rand = new Random(-55);
+ int low = TestLibrary.Generator.GetInt32(-55);
+ int mid = TestLibrary.Generator.GetInt32(-55);
+ int hi = TestLibrary.Generator.GetInt32(-55);
+ bool isNagetive = false;
+ Byte scale = (byte)rand.Next(0, 27);
+ Decimal decimalValue = new Decimal(low, mid, hi, isNagetive, scale);
+
+ String actualValue = decimalValue.ToString();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(decimalValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += "\n decimal value is " + decimalValue;
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verify value is Decimal.MaxValue... ";
+ string c_TEST_ID = "P003";
+
+
+ Decimal decimalValue = Decimal.MaxValue;
+
+ String actualValue = decimalValue.ToString();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(decimalValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += "\n decimal value is " + decimalValue;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest4: Verify value is Decimal.MinValue... ";
+ string c_TEST_ID = "P004";
+
+
+ Decimal decimalValue = Decimal.MinValue;
+
+ String actualValue = decimalValue.ToString();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(decimalValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += "\n decimal value is " + decimalValue;
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest5: Verify value is 0... ";
+ string c_TEST_ID = "P005";
+
+
+ Decimal decimalValue = Decimal.Zero;
+
+ String actualValue = decimalValue.ToString();
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ String resValue = Convert.ToString(decimalValue);
+ if (actualValue != resValue)
+ {
+ string errorDesc = "value is not " + resValue.ToString() + " as expected: Actual is " + actualValue.ToString();
+ errorDesc += "\n decimal value is " + decimalValue;
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint16.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint16.cs
new file mode 100644
index 0000000000..325c26f380
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint16.cs
@@ -0,0 +1,194 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ConvertToUInt16
+{
+ public static int Main()
+ {
+ ConvertToUInt16 ac = new ConvertToUInt16();
+
+ TestLibrary.TestFramework.BeginTestCase("Convert.ToUInt16(...)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ // public static UInt16 ToUInt16(object value)
+ public bool PosTest1() { return PosTest<object>(1, (object)UInt16.MaxValue, UInt16.MaxValue); }
+ public bool PosTest2() { return PosTest<object>(2, (object)UInt16.MinValue, UInt16.MinValue); }
+ public bool PosTest3() { return PosTest<object>(3, null, 0); }
+
+ public bool PosTest4() { return PosTest<Boolean>(4, true, 1); }
+ public bool PosTest5() { return PosTest<Boolean>(5, false, 0); }
+
+ public bool PosTest6() { return PosTest2(6, null, 0); }
+ public bool PosTest7() { return PosTest2(7, "1034", 1034); }
+
+ // public static byte ToByte(object value) {
+ public bool PosTest8() { return PosTest2(8, null, 0); }
+ public bool PosTest9() { return PosTest2(9, "34", 34); }
+
+ public bool NegTest1() { return NegTest2(1, Int32.MaxValue.ToString(), 10, typeof(System.OverflowException)); }
+ public bool NegTest2() { return NegTest2(2, Int32.MinValue.ToString(), 10, typeof(System.OverflowException)); }
+
+ public bool PosTest<T>(int id, T curValue, UInt16 expValue)
+ {
+ bool retVal = true;
+ UInt16 newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToUInt16(...) (curValue:"+typeof(T)+" " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToUInt16(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("000", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToUInt16(curValue, myfp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2(int id, String curValue, UInt16 expValue)
+ {
+ bool retVal = true;
+ UInt16 newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToUInt16(...) (curValue:string " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToUInt16(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("003", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToUInt16(curValue, myfp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("004", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest<T>(int id, T curValue, Type exception)
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Convert.ToUInt16(...) (curValue:"+typeof(T)+" " +curValue+"");
+
+ try
+ {
+ Convert.ToUInt16(curValue);
+
+ TestLibrary.TestFramework.LogError("006", "Exception expected");
+ retVal = false;
+ }
+ catch (Exception e)
+ {
+ if (e.GetType() != exception)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2(int id, string curValue, int formBase, Type exception)
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest"+id+": Convert.ToUInt16(...) (curValue:string " +curValue+"");
+
+ try
+ {
+ Convert.ToUInt16(curValue, formBase);
+
+ TestLibrary.TestFramework.LogError("008", "Exception expected");
+ retVal = false;
+ }
+ catch (Exception e)
+ {
+ if (e.GetType() != exception)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint161.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint161.cs
new file mode 100644
index 0000000000..21fa1c0a4a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint161.cs
@@ -0,0 +1,79 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt16(Boolean)
+/// </summary>
+public class ConvertToUInt161
+{
+ public static int Main()
+ {
+ ConvertToUInt161 convertToUInt161 = new ConvertToUInt161();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt161");
+ if (convertToUInt161.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt16 from Boolean 1");
+ try
+ {
+ ushort ushortVal = Convert.ToUInt16(true);
+ if (ushortVal != 1)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt16 from Boolean 2");
+ try
+ {
+ ushort ushortVal = Convert.ToUInt16(false);
+ if (ushortVal != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint1610.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint1610.cs
new file mode 100644
index 0000000000..a9fd455bb9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint1610.cs
@@ -0,0 +1,125 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt16(UInt32)
+/// </summary>
+public class ConvertToUInt1610
+{
+ public static int Main()
+ {
+ ConvertToUInt1610 convertToUInt1610 = new ConvertToUInt1610();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt1610");
+ if (convertToUInt1610.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt16 from UInt32 1");
+ try
+ {
+ UInt32 UInt32Val = (UInt32)(UInt16.MaxValue);
+ ushort ushortVal = Convert.ToUInt16(UInt32Val);
+ if (ushortVal != UInt16.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt16 from UInt32 2");
+ try
+ {
+ UInt32 UInt32Val = (UInt32)(this.GetInt32(0, (int)UInt16.MaxValue));
+ ushort ushortVal = Convert.ToUInt16(UInt32Val);
+ if (ushortVal != (UInt16)UInt32Val)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the UInt32 larger than UInt16 maxValue");
+ try
+ {
+ UInt32 UInt32Val = (UInt32)(this.GetInt32((int)UInt16.MaxValue + 1, Int32.MaxValue));
+ ushort ushortVal = Convert.ToUInt16(UInt32Val);
+ TestLibrary.TestFramework.LogError("N001", "the UInt32 larger than UInt16 maxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint1611.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint1611.cs
new file mode 100644
index 0000000000..9b2f7dd926
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint1611.cs
@@ -0,0 +1,125 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt16(UInt64)
+/// </summary>
+public class ConvertToUInt1611
+{
+ public static int Main()
+ {
+ ConvertToUInt1611 convertToUInt1611 = new ConvertToUInt1611();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt1611");
+ if (convertToUInt1611.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt16 from UInt64 1");
+ try
+ {
+ UInt64 UInt64Val = (UInt64)(UInt16.MaxValue);
+ ushort ushortVal = Convert.ToUInt16(UInt64Val);
+ if (ushortVal != UInt16.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt16 from UInt64 2");
+ try
+ {
+ UInt64 UInt64Val = (UInt64)(this.GetInt32(0, (int)UInt16.MaxValue));
+ ushort ushortVal = Convert.ToUInt16(UInt64Val);
+ if (ushortVal != (UInt16)UInt64Val)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the UInt64 larger than UInt16 maxValue");
+ try
+ {
+ UInt64 UInt64Val = (UInt64)(this.GetInt32((int)UInt16.MaxValue + 1, Int32.MaxValue)) + (UInt64)(this.GetInt32(0, Int32.MaxValue));
+ ushort ushortVal = Convert.ToUInt16(UInt64Val);
+ TestLibrary.TestFramework.LogError("N001", "the UInt64 larger than UInt16 maxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint1612.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint1612.cs
new file mode 100644
index 0000000000..2883abe3ec
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint1612.cs
@@ -0,0 +1,125 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt16(SByte)
+/// </summary>
+public class ConvertToUInt1612
+{
+ public static int Main()
+ {
+ ConvertToUInt1612 convertToUInt1612 = new ConvertToUInt1612();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt1612");
+ if (convertToUInt1612.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt16 from SByte 1");
+ try
+ {
+ SByte sbyteVal = SByte.MaxValue;
+ ushort ushortVal = Convert.ToUInt16(sbyteVal);
+ if (ushortVal != (UInt16)(SByte.MaxValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt16 from SByte 2");
+ try
+ {
+ SByte sbyteVal = (SByte)(this.GetInt32(0, (int)(SByte.MaxValue)));
+ ushort ushortVal = Convert.ToUInt16(sbyteVal);
+ if (ushortVal != (UInt16)(sbyteVal))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the sbyte is less than the UInt16 minValue");
+ try
+ {
+ SByte sbyteVal = (SByte)((this.GetInt32(1, (int)(SByte.MaxValue) + 2)) * (-1));
+ ushort ushortVal = Convert.ToUInt16(sbyteVal);
+ TestLibrary.TestFramework.LogError("N001", "the sbyte is less than the UInt16 minValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint1613.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint1613.cs
new file mode 100644
index 0000000000..3f2bfae56f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint1613.cs
@@ -0,0 +1,263 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt16(object)
+/// </summary>
+public class ConvertToUInt1613
+{
+ public static int Main()
+ {
+ ConvertToUInt1613 convertToUInt1613 = new ConvertToUInt1613();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt1613");
+ if (convertToUInt1613.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Convert to UInt16 from object 1");
+ try
+ {
+ TestClass2 objVal = new TestClass2();
+ ushort unshortVal = Convert.ToUInt16(objVal);
+ if (unshortVal != UInt16.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Convert to UInt16 from object 2");
+ try
+ {
+ object objVal = true;
+ ushort unshortVal = Convert.ToUInt16(objVal);
+ if (unshortVal != 1)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Convert to UInt16 from object 3");
+ try
+ {
+ object objVal = false;
+ ushort unshortVal = Convert.ToUInt16(objVal);
+ if (unshortVal != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Convert to UInt16 from object 4");
+ try
+ {
+ object objVal = null;
+ ushort unshortVal = Convert.ToUInt16(objVal);
+ if (unshortVal != 0)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The object does not implement IConvertible");
+ try
+ {
+ TestClass1 objVal = new TestClass1();
+ ushort unshortVal = Convert.ToUInt16(objVal);
+ TestLibrary.TestFramework.LogError("N001", "The object does not implement IConvertible but not throw exception");
+ retVal = false;
+ }
+ catch (InvalidCastException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass1 { }
+ public class TestClass2 : IConvertible
+ {
+ public TypeCode GetTypeCode()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool ToBoolean(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public byte ToByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public char ToChar(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public DateTime ToDateTime(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public decimal ToDecimal(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public double ToDouble(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public short ToInt16(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int ToInt32(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public long ToInt64(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public sbyte ToSByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public float ToSingle(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public string ToString(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public object ToType(Type conversionType, IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ushort ToUInt16(IFormatProvider provider)
+ {
+ return UInt16.MaxValue;
+ }
+
+ public uint ToUInt32(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ulong ToUInt64(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint1614.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint1614.cs
new file mode 100644
index 0000000000..93cce5acbd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint1614.cs
@@ -0,0 +1,282 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt16(object,IFormatProvider)
+/// </summary>
+public class ConvertToUInt1614
+{
+ public static int Main()
+ {
+ ConvertToUInt1614 convertToUInt1614 = new ConvertToUInt1614();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt1614");
+ if (convertToUInt1614.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Convert to UInt16 from object 1");
+ try
+ {
+ TestClass2 objVal = new TestClass2();
+ TestIFormat iformat = new TestIFormat();
+ ushort unshortVal1 = Convert.ToUInt16(objVal,iformat);
+ ushort unshortVal2 = Convert.ToUInt16(objVal, null);
+ if (unshortVal1 != UInt16.MaxValue || unshortVal2 != UInt16.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Convert to UInt16 from object 2");
+ try
+ {
+ object objVal = true;
+ TestIFormat iformat = new TestIFormat();
+ ushort unshortVal1 = Convert.ToUInt16(objVal, iformat);
+ ushort unshortVal2 = Convert.ToUInt16(objVal, null);
+ if (unshortVal1 != 1 || unshortVal2 != 1)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Convert to UInt16 from object 3");
+ try
+ {
+ object objVal = false;
+ TestIFormat iformat = new TestIFormat();
+ ushort unshortVal1 = Convert.ToUInt16(objVal, iformat);
+ ushort unshortVal2 = Convert.ToUInt16(objVal, null);
+ if (unshortVal1 != 0 || unshortVal2 != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Convert to UInt16 from object 4");
+ try
+ {
+ object objVal = null;
+ TestIFormat iformat = new TestIFormat();
+ ushort unshortVal1 = Convert.ToUInt16(objVal, iformat);
+ ushort unshortVal2 = Convert.ToUInt16(objVal, null);
+ if (unshortVal1 != 0 || unshortVal2 != 0)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The object does not implement IConvertible");
+ try
+ {
+ TestClass1 objVal = new TestClass1();
+ ushort unshortVal = Convert.ToUInt16(objVal,null);
+ TestLibrary.TestFramework.LogError("N001", "The object does not implement IConvertible but not throw exception");
+ retVal = false;
+ }
+ catch (InvalidCastException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass1 { }
+ public class TestIFormat : IFormatProvider
+ {
+ public bool IsUInt16MaxValue = true;
+ public object GetFormat(Type argType)
+ {
+ if (argType == typeof(TestIFormat))
+ return this;
+ else
+ return null;
+ }
+ }
+ public class TestClass2 : IConvertible
+ {
+ public TypeCode GetTypeCode()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public bool ToBoolean(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public byte ToByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public char ToChar(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public DateTime ToDateTime(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public decimal ToDecimal(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public double ToDouble(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public short ToInt16(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public int ToInt32(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public long ToInt64(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public sbyte ToSByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public float ToSingle(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public string ToString(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public object ToType(Type conversionType, IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public ushort ToUInt16(IFormatProvider provider)
+ {
+ bool IsUInt16MinValue = true;
+ if (provider != null)
+ {
+ TestIFormat iformat = (TestIFormat)provider.GetFormat(typeof(TestIFormat));
+ if (iformat != null && iformat.IsUInt16MaxValue)
+ {
+ IsUInt16MinValue = false;
+ }
+ }
+ if (IsUInt16MinValue)
+ {
+ return UInt16.MinValue;
+ }
+ else
+ {
+ return UInt16.MaxValue;
+ }
+ }
+ public uint ToUInt32(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public ulong ToUInt64(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint1615.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint1615.cs
new file mode 100644
index 0000000000..40800ab0ea
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint1615.cs
@@ -0,0 +1,175 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt16(Single)
+/// </summary>
+public class ConvertToUInt1615
+{
+ public static int Main()
+ {
+ ConvertToUInt1615 convertToUInt1615 = new ConvertToUInt1615();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt1615");
+ if (convertToUInt1615.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Convert To UInt16 from Single 1");
+ try
+ {
+ float singleVal = (float)this.GetInt32(0, (int)UInt16.MaxValue + 1);
+ ushort ushortVal = Convert.ToUInt16(singleVal);
+ if (ushortVal != (UInt16)singleVal)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Convert To UInt16 from Single 2");
+ try
+ {
+ float singleVal1 = 1.5F;
+ float singleVal2 = 1.1F;
+ float singleVal3 = 1.9F;
+ ushort ushortVal1 = Convert.ToUInt16(singleVal1);
+ ushort ushortVal2 = Convert.ToUInt16(singleVal2);
+ ushort ushortVal3 = Convert.ToUInt16(singleVal3);
+ if (ushortVal1 != 2 || ushortVal2 != 1 || ushortVal3 != 2)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Convert To UInt16 from Single 3");
+ try
+ {
+ float singleVal1 = 2.5F;
+ float singleVal2 = 2.1F;
+ float singleVal3 = 2.9F;
+ ushort ushortVal1 = Convert.ToUInt16(singleVal1);
+ ushort ushortVal2 = Convert.ToUInt16(singleVal2);
+ ushort ushortVal3 = Convert.ToUInt16(singleVal3);
+ if (ushortVal1 != 2 || ushortVal2 != 2 || ushortVal3 != 3)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The Single is out of the range of UInt16 1");
+ try
+ {
+ float singleVal = (float)this.GetInt32((int)UInt16.MaxValue + 1, Int32.MaxValue);
+ ushort ushortVal = Convert.ToUInt16(singleVal);
+ TestLibrary.TestFramework.LogError("N001", "The Single is out of the range of UInt16 but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:The Single is out of the range of UInt16 2");
+ try
+ {
+ float singleVal = (float)this.GetInt32(1, (int)UInt16.MaxValue + 1)*(-1);
+ ushort ushortVal = Convert.ToUInt16(singleVal);
+ TestLibrary.TestFramework.LogError("N003", "The Single is out of the range of UInt16 but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint1616.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint1616.cs
new file mode 100644
index 0000000000..37c33c6c23
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint1616.cs
@@ -0,0 +1,254 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt16(String)
+/// </summary>
+public class ConvertToUInt1616
+{
+ public static int Main()
+ {
+ ConvertToUInt1616 convertToUInt1616 = new ConvertToUInt1616();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt1616");
+ if (convertToUInt1616.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt16 from string 1");
+ try
+ {
+ string strVal = UInt16.MaxValue.ToString();
+ ushort ushortVal = Convert.ToUInt16(strVal);
+ if (ushortVal != UInt16.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt16 from string 2");
+ try
+ {
+ string strVal = UInt16.MinValue.ToString();
+ ushort ushortVal = Convert.ToUInt16(strVal);
+ if (ushortVal != UInt16.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt16 from string 3");
+ try
+ {
+ string strVal = "-" + UInt16.MinValue.ToString();
+ ushort ushortVal = Convert.ToUInt16(strVal);
+ if (ushortVal != UInt16.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert to UInt16 from string 4");
+ try
+ {
+ int intVal = this.GetInt32(0, (int)UInt16.MaxValue);
+ string strVal = "+" + intVal.ToString();
+ ushort ushortVal = Convert.ToUInt16(strVal);
+ if (ushortVal != (UInt16)intVal)
+ {
+ TestLibrary.TestFramework.LogError("007", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Convert to UInt16 from string 5");
+ try
+ {
+ string strVal = null;
+ ushort ushortVal = Convert.ToUInt16(strVal);
+ if (ushortVal != 0)
+ {
+ TestLibrary.TestFramework.LogError("009", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the string represents a number less than MinValue");
+ try
+ {
+ int intVal = this.GetInt32(1, Int32.MaxValue);
+ string strVal = "-" + intVal.ToString();
+ ushort ushortVal = Convert.ToUInt16(strVal);
+ TestLibrary.TestFramework.LogError("N001", "the string represents a number less than MinValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the string represents a number greater than MaxValue");
+ try
+ {
+ int intVal = this.GetInt32((int)UInt16.MaxValue + 1, Int32.MaxValue);
+ string strVal = intVal.ToString();
+ ushort ushortVal = Convert.ToUInt16(strVal);
+ TestLibrary.TestFramework.LogError("N003", "the string represents a number greater than MaxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: the string does not consist of an optional sign followed by a sequence of digits ");
+ try
+ {
+ string strVal = "helloworld";
+ ushort ushortVal = Convert.ToUInt16(strVal);
+ TestLibrary.TestFramework.LogError("N005", "the string does not consist of an optional sign followed by a sequence of digits but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: the string is empty string");
+ try
+ {
+ string strVal = string.Empty;
+ ushort ushortVal = Convert.ToUInt16(strVal);
+ TestLibrary.TestFramework.LogError("N007", "the string is empty string but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint1617.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint1617.cs
new file mode 100644
index 0000000000..2f6cf3da77
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint1617.cs
@@ -0,0 +1,322 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt16(string,int32)
+/// </summary>
+public class ConvertToUInt1617
+{
+ public static int Main()
+ {
+ ConvertToUInt1617 convertToUInt1617 = new ConvertToUInt1617();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt1617");
+ if (convertToUInt1617.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt16 from string 1");
+ try
+ {
+ string strVal = "1111";
+ ushort ushortVal1 = Convert.ToUInt16(strVal, 2);
+ ushort ushortVal2 = Convert.ToUInt16(strVal, 8);
+ ushort ushortVal3 = Convert.ToUInt16(strVal, 10);
+ ushort ushortVal4 = Convert.ToUInt16(strVal, 16);
+ if (ushortVal1 != (UInt16)(1*Math.Pow(2,3) + 1*Math.Pow(2,2) + 1*Math.Pow(2,1) + 1*Math.Pow(2,0)) ||
+ ushortVal2 != (UInt16)(1 * Math.Pow(8, 3) + 1 * Math.Pow(8, 2) + 1 * Math.Pow(8, 1) + 1 * Math.Pow(8, 0)) ||
+ ushortVal3 != (UInt16)(1 * Math.Pow(10, 3) + 1 * Math.Pow(10, 2) + 1 * Math.Pow(10, 1) + 1 * Math.Pow(10, 0)) ||
+ ushortVal4 != (UInt16)(1 * Math.Pow(16, 3) + 1 * Math.Pow(16, 2) + 1 * Math.Pow(16, 1) + 1 * Math.Pow(16, 0))
+ )
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt16 from string 2");
+ try
+ {
+ int intVal = this.GetInt32(0, (int)UInt16.MaxValue);
+ string strVal = "+" + intVal.ToString();
+ ushort ushortVal = Convert.ToUInt16(strVal, 10);
+ if (ushortVal != (UInt16)intVal)
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt16 from string 3");
+ try
+ {
+ string strVal = null;
+ ushort ushortVal1 = Convert.ToUInt16(strVal, 2);
+ ushort ushortVal2 = Convert.ToUInt16(strVal, 8);
+ ushort ushortVal3 = Convert.ToUInt16(strVal, 10);
+ ushort ushortVal4 = Convert.ToUInt16(strVal, 16);
+ if (ushortVal1 != 0 || ushortVal2 != 0 || ushortVal3 != 0 || ushortVal4 != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert to UInt16 from string 4");
+ try
+ {
+ string strVal = "0xff";
+ ushort ushortVal = Convert.ToUInt16(strVal, 16);
+ if (ushortVal != (UInt16)(15 * Math.Pow(16, 1) + 15 * Math.Pow(16, 0)))
+ {
+ TestLibrary.TestFramework.LogError("007", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the parameter of fromBase is not 2, 8, 10, or 16");
+ try
+ {
+ string strVal = "1111";
+ ushort ushortVal = Convert.ToUInt16(strVal, 100);
+ TestLibrary.TestFramework.LogError("N001", "the parameter of fromBase is not 2, 8, 10, or 16 but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the string represents a non-base 10 signed number and is prefixed with a negative sign");
+ try
+ {
+ string strVal = "-0";
+ ushort ushortVal = Convert.ToUInt16(strVal, 2);
+ TestLibrary.TestFramework.LogError("N003", "the string represents a non-base 10 signed number and is prefixed with a negative sign but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: the string contains a character that is not a valid digit in the base specified by fromBase param 1");
+ try
+ {
+ string strVal = "1234";
+ ushort ushortVal = Convert.ToUInt16(strVal, 2);
+ TestLibrary.TestFramework.LogError("N005", "the string contains a character that is not a valid digit in the base specified by fromBase param but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: the string contains a character that is not a valid digit in the base specified by fromBase param 2");
+ try
+ {
+ string strVal = "9999";
+ ushort ushortVal = Convert.ToUInt16(strVal, 8);
+ TestLibrary.TestFramework.LogError("N007", "the string contains a character that is not a valid digit in the base specified by fromBase param but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest5: the string contains a character that is not a valid digit in the base specified by fromBase param 3");
+ try
+ {
+ string strVal = "abcd";
+ ushort ushortVal = Convert.ToUInt16(strVal, 10);
+ TestLibrary.TestFramework.LogError("N009", "the string contains a character that is not a valid digit in the base specified by fromBase param but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest6: the string contains a character that is not a valid digit in the base specified by fromBase param 4");
+ try
+ {
+ string strVal = "gh";
+ ushort ushortVal = Convert.ToUInt16(strVal, 16);
+ TestLibrary.TestFramework.LogError("N011", "the string contains a character that is not a valid digit in the base specified by fromBase param but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N012", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest7: the string represents base 10 number is less than UInt16.minValue");
+ try
+ {
+ int intVal = this.GetInt32(1, Int32.MaxValue);
+ string strVal = "-" + intVal.ToString();
+ ushort ushortVal = Convert.ToUInt16(strVal, 10);
+ TestLibrary.TestFramework.LogError("N013", "the string represent base 10 number is less than UInt16.minValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N014", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest8()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest8: the string represents base 10 number is greater than UInt16.maxValue");
+ try
+ {
+ int intVal = this.GetInt32((int)UInt16.MaxValue + 1, Int32.MaxValue);
+ string strVal = intVal.ToString();
+ ushort ushortVal = Convert.ToUInt16(strVal, 10);
+ TestLibrary.TestFramework.LogError("N015", "the string represent base 10 number is greater than UInt16.maxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N016", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint1618.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint1618.cs
new file mode 100644
index 0000000000..8df58604af
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint1618.cs
@@ -0,0 +1,279 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Convert.ToUInt16(string,IFormatProvider)
+/// </summary>
+public class ConvertToUInt1618
+{
+ public static int Main()
+ {
+ ConvertToUInt1618 convertToUInt1618 = new ConvertToUInt1618();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt1618");
+ if (convertToUInt1618.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt16 from string 1");
+ try
+ {
+ string strVal = UInt16.MaxValue.ToString();
+ ushort ushortVal = Convert.ToUInt16(strVal, null);
+ if (ushortVal != UInt16.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt16 from string 2");
+ try
+ {
+ string strVal = UInt16.MaxValue.ToString();
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ ushort ushortVal = Convert.ToUInt16(strVal, provider);
+ if (ushortVal != UInt16.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt16 from string 3");
+ try
+ {
+ string strVal = UInt16.MinValue.ToString();
+ ushort ushortVal = Convert.ToUInt16(strVal, null);
+ if (ushortVal != UInt16.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert to UInt16 from string 4");
+ try
+ {
+ string strVal = "-" + UInt16.MinValue.ToString();
+ ushort ushortVal = Convert.ToUInt16(strVal, null);
+ if (ushortVal != UInt16.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("007", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Convert to UInt16 from string 5");
+ try
+ {
+ int intVal = this.GetInt32(0, (int)UInt16.MaxValue);
+ string strVal = "+" + intVal.ToString();
+ ushort ushortVal = Convert.ToUInt16(strVal, null);
+ if (ushortVal != (UInt16)intVal)
+ {
+ TestLibrary.TestFramework.LogError("009", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Convert to UInt16 from string 6");
+ try
+ {
+ string strVal = null;
+ ushort ushortVal = Convert.ToUInt16(strVal, null);
+ if (ushortVal != 0)
+ {
+ TestLibrary.TestFramework.LogError("011", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the string represents a number less than MinValue");
+ try
+ {
+ int intVal = this.GetInt32(1, Int32.MaxValue);
+ string strVal = "-" + intVal.ToString();
+ ushort ushortVal = Convert.ToUInt16(strVal, null);
+ TestLibrary.TestFramework.LogError("N001", "the string represents a number less than MinValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the string represents a number greater than MaxValue");
+ try
+ {
+ int intVal = this.GetInt32((int)UInt16.MaxValue + 1, Int32.MaxValue);
+ string strVal = intVal.ToString();
+ ushort ushortVal = Convert.ToUInt16(strVal, null);
+ TestLibrary.TestFramework.LogError("N003", "the string represents a number greater than MaxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: the string does not consist of an optional sign followed by a sequence of digits ");
+ try
+ {
+ string strVal = "helloworld";
+ ushort ushortVal = Convert.ToUInt16(strVal, null);
+ TestLibrary.TestFramework.LogError("N005", "the string does not consist of an optional sign followed by a sequence of digits but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: the string is empty string");
+ try
+ {
+ string strVal = string.Empty;
+ ushort ushortVal = Convert.ToUInt16(strVal, null);
+ TestLibrary.TestFramework.LogError("N007", "the string is empty string but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint162.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint162.cs
new file mode 100644
index 0000000000..4192f31c47
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint162.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt16(Byte)
+/// </summary>
+public class ConvertToUInt162
+{
+ public static int Main()
+ {
+ ConvertToUInt162 convertToUInt162 = new ConvertToUInt162();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt162");
+ if (convertToUInt162.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt16 from Byte 1");
+ try
+ {
+ byte byteVal = byte.MaxValue;
+ ushort ushortVal = Convert.ToUInt16(byteVal);
+ if (ushortVal != (ushort)(byteVal))
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt16 from Byte 2");
+ try
+ {
+ byte byteVal = byte.MinValue;
+ ushort ushortVal = Convert.ToUInt16(byteVal);
+ if (ushortVal != (ushort)(byteVal))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt16 from Byte 3");
+ try
+ {
+ byte byteVal = TestLibrary.Generator.GetByte(-55);
+ ushort ushortVal = Convert.ToUInt16(byteVal);
+ if (ushortVal != (ushort)(byteVal))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint163.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint163.cs
new file mode 100644
index 0000000000..fdf21807ad
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint163.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt16(Char)
+/// </summary>
+public class ConvertToUInt163
+{
+ public static int Main()
+ {
+ ConvertToUInt163 convertToUInt163 = new ConvertToUInt163();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt163");
+ if (convertToUInt163.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt16 from Char 1");
+ try
+ {
+ char charVal = char.MaxValue;
+ ushort ushortVal = Convert.ToUInt16(charVal);
+ if (ushortVal != (ushort)(charVal))
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt16 from Char 2");
+ try
+ {
+ char charVal = char.MinValue;
+ ushort ushortVal = Convert.ToUInt16(charVal);
+ if (ushortVal != (ushort)(charVal))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt16 from Char 3");
+ try
+ {
+ char charVal = TestLibrary.Generator.GetChar(-55);
+ ushort ushortVal = Convert.ToUInt16(charVal);
+ if (ushortVal != (ushort)(charVal))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint164.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint164.cs
new file mode 100644
index 0000000000..6efcde4edd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint164.cs
@@ -0,0 +1,167 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt164(Decimal)
+/// </summary>
+public class ConvertToUInt164
+{
+ public static int Main()
+ {
+ ConvertToUInt164 convertToUInt164 = new ConvertToUInt164();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt164");
+ if (convertToUInt164.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt16 from Decimal 1");
+ try
+ {
+ decimal decimalVal = (decimal)(UInt16.MaxValue);
+ ushort ushortVal = Convert.ToUInt16(decimalVal);
+ if (ushortVal != UInt16.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt16 from Decimal 2");
+ try
+ {
+ decimal decimalVal = (decimal)(UInt16.MinValue);
+ ushort ushortVal = Convert.ToUInt16(decimalVal);
+ if (ushortVal != UInt16.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt16 from Decimal 3");
+ try
+ {
+ decimal decimalVal = (decimal)(this.GetInt32(0, (int)(UInt16.MaxValue)));
+ ushort ushortVal = Convert.ToUInt16(decimalVal);
+ if (ushortVal != (ushort)(decimalVal))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the decimal is larger than UInt16 maxValue");
+ try
+ {
+ decimal decimalVal = (decimal)(this.GetInt32((int)(UInt16.MaxValue) + 1, Int32.MaxValue));
+ ushort ushortVal = Convert.ToUInt16(decimalVal);
+ TestLibrary.TestFramework.LogError("N001", "the decimal is larger than UInt16 maxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the decimal is less than UInt16 minValue");
+ try
+ {
+ decimal decimalVal = (decimal)(this.GetInt32(1, Int32.MaxValue) * (-1));
+ ushort ushortVal = Convert.ToUInt16(decimalVal);
+ TestLibrary.TestFramework.LogError("N003", "the decimal is larger than UInt16 maxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint165.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint165.cs
new file mode 100644
index 0000000000..19398f809c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint165.cs
@@ -0,0 +1,167 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt16(Double)
+/// </summary>
+public class ConvertToUInt165
+{
+ public static int Main()
+ {
+ ConvertToUInt165 convertToUInt165 = new ConvertToUInt165();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt165");
+ if (convertToUInt165.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PostiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt16 from double 1");
+ try
+ {
+ double doubleVal = (double)(UInt16.MaxValue);
+ ushort ushortVal = Convert.ToUInt16(doubleVal);
+ if (ushortVal != UInt16.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt16 from double 2");
+ try
+ {
+ double doubleVal = (double)(UInt16.MinValue);
+ ushort ushortVal = Convert.ToUInt16(doubleVal);
+ if (ushortVal != UInt16.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt16 from double 3");
+ try
+ {
+ double doubleVal = (double)(this.GetInt32(0, (int)(UInt16.MaxValue)));
+ ushort ushortVal = Convert.ToUInt16(doubleVal);
+ if (ushortVal != (ushort)(doubleVal))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the double is larger than UInt16 maxValue");
+ try
+ {
+ double doubleVal = (double)(this.GetInt32((int)(UInt16.MaxValue) + 1, Int32.MaxValue));
+ ushort ushortVal = Convert.ToUInt16(doubleVal);
+ TestLibrary.TestFramework.LogError("N001", "the double is larger than UInt16 maxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the double is less than UInt16 minValue");
+ try
+ {
+ double doubleVal = (double)(this.GetInt32(1, Int32.MaxValue) * (-1));
+ ushort ushortVal = Convert.ToUInt16(doubleVal);
+ TestLibrary.TestFramework.LogError("N003", "the double is larger than UInt16 maxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint166.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint166.cs
new file mode 100644
index 0000000000..e180261edf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint166.cs
@@ -0,0 +1,125 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt16(Int16)
+/// </summary>
+public class ConvertToUInt166
+{
+ public static int Main()
+ {
+ ConvertToUInt166 convertToUInt166 = new ConvertToUInt166();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt166");
+ if (convertToUInt166.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt16 from int16 1");
+ try
+ {
+ Int16 Int16Val = Int16.MaxValue;
+ ushort ushortVal = Convert.ToUInt16(Int16Val);
+ if (ushortVal != (ushort)Int16Val)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt16 from int16 2");
+ try
+ {
+ Int16 Int16Val = (Int16)this.GetInt32(0, (int)Int16.MaxValue);
+ ushort ushortVal = Convert.ToUInt16(Int16Val);
+ if (ushortVal != (ushort)Int16Val)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the int16 is less than UInt16 minValue");
+ try
+ {
+ Int16 Int16Val = (Int16)(this.GetInt32(1, (int)Int16.MaxValue + 2) * (-1));
+ ushort ushortVal = Convert.ToUInt16(Int16Val);
+ TestLibrary.TestFramework.LogError("N001", "the int16 is less than UInt16 minValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint167.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint167.cs
new file mode 100644
index 0000000000..5d4260c9cd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint167.cs
@@ -0,0 +1,145 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt16(Int32)
+/// </summary>
+public class ConvertToUInt167
+{
+ public static int Main()
+ {
+ ConvertToUInt167 convertToUInt167 = new ConvertToUInt167();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt167");
+ if (convertToUInt167.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt16 from int32 1");
+ try
+ {
+ Int32 Int32Val = (Int32)UInt16.MaxValue;
+ ushort ushortVal = Convert.ToUInt16(Int32Val);
+ if (ushortVal != UInt16.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt16 from int32 2");
+ try
+ {
+ Int32 Int32Val = this.GetInt32(0, (int)UInt16.MaxValue);
+ ushort ushortVal = Convert.ToUInt16(Int32Val);
+ if (ushortVal != (ushort)Int32Val)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the int32 is larger than UInt16 maxValue");
+ try
+ {
+ Int32 Int32Val = this.GetInt32((int)UInt16.MaxValue + 1, Int32.MaxValue);
+ ushort ushortVal = Convert.ToUInt16(Int32Val);
+ TestLibrary.TestFramework.LogError("N001", "the int32 is larger than UInt16 maxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the int32 is less than UInt16 minValue");
+ try
+ {
+ Int32 Int32Val = this.GetInt32(1, Int32.MaxValue) * (-1);
+ ushort ushortVal = Convert.ToUInt16(Int32Val);
+ TestLibrary.TestFramework.LogError("N003", "the int32 is less than UInt16 minValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint168.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint168.cs
new file mode 100644
index 0000000000..b5adff8203
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint168.cs
@@ -0,0 +1,145 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt16(Int64)
+/// </summary>
+public class ConvertToUInt168
+{
+ public static int Main()
+ {
+ ConvertToUInt168 convertToUInt168 = new ConvertToUInt168();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt168");
+ if (convertToUInt168.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt16 from Int64 1");
+ try
+ {
+ Int64 Int64Val = (Int64)UInt16.MaxValue;
+ ushort ushortVal = Convert.ToUInt16(Int64Val);
+ if (ushortVal != UInt16.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt16 from Int64 2");
+ try
+ {
+ Int64 Int64Val = (Int64)this.GetInt32(0, (int)UInt16.MaxValue);
+ ushort ushortVal = Convert.ToUInt16(Int64Val);
+ if (ushortVal != (ushort)Int64Val)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the Int64 is larger than UInt16 maxValue");
+ try
+ {
+ Int64 Int64Val = (Int64)this.GetInt32((int)UInt16.MaxValue + 1, Int32.MaxValue) + (Int64)this.GetInt32(0, Int32.MaxValue);
+ ushort ushortVal = Convert.ToUInt16(Int64Val);
+ TestLibrary.TestFramework.LogError("N001", "the Int64 is larger than UInt16 maxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the Int64 is less than UInt16 minValue");
+ try
+ {
+ Int64 Int64Val = ((Int64)(this.GetInt32(1, Int32.MaxValue)) + (Int64)(this.GetInt32(0, Int32.MaxValue))) * (-1);
+ ushort ushortVal = Convert.ToUInt16(Int64Val);
+ TestLibrary.TestFramework.LogError("N003", "the Int64 is less than UInt16 minValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint169.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint169.cs
new file mode 100644
index 0000000000..b1a4ec9e30
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint169.cs
@@ -0,0 +1,124 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt16(UInt16)
+/// </summary>
+public class ConvertToUInt169
+{
+ public static int Main()
+ {
+ ConvertToUInt169 convertToUInt169 = new ConvertToUInt169();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt169");
+ if (convertToUInt169.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt16 from UInt16 1");
+ try
+ {
+ UInt16 UInt16Val = UInt16.MaxValue;
+ ushort ushortVal = Convert.ToUInt16(UInt16Val);
+ if (ushortVal != UInt16Val)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt16 from UInt16 2");
+ try
+ {
+ UInt16 UInt16Val = UInt16.MinValue;
+ ushort ushortVal = Convert.ToUInt16(UInt16Val);
+ if (ushortVal != UInt16Val)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt16 from UInt16 3");
+ try
+ {
+ UInt16 UInt16Val = (UInt16)(this.GetInt32(0, (int)UInt16.MaxValue));
+ ushort ushortVal = Convert.ToUInt16(UInt16Val);
+ if (ushortVal != UInt16Val)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint32.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint32.cs
new file mode 100644
index 0000000000..3121338a33
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint32.cs
@@ -0,0 +1,139 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ConvertToUInt32
+{
+ public static int Main()
+ {
+ ConvertToUInt32 ac = new ConvertToUInt32();
+
+ TestLibrary.TestFramework.BeginTestCase("Convert.ToUInt32(...)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ return retVal;
+ }
+
+ public bool PosTest1() { return PosTest<object>(1, (object)UInt32.MaxValue, UInt32.MaxValue); }
+ public bool PosTest2() { return PosTest<object>(2, (object)UInt32.MinValue, UInt32.MinValue); }
+ public bool PosTest3() { return PosTest<object>(3, null, 0); }
+
+ public bool PosTest4() { return PosTest<Boolean>(4, true, 1); }
+ public bool PosTest5() { return PosTest<Boolean>(5, false, 0); }
+
+ public bool PosTest6() { return PosTest2(6, null, 0); }
+ public bool PosTest7() { return PosTest2(7, "1034", 1034); }
+
+ public bool PosTest8() { return PosTest2(8, null, 0); }
+ public bool PosTest9() { return PosTest2(9, "34", 34); }
+
+ public bool PosTest10() { return PosTest<double>(10, 4294967294.5d, 4294967294); }
+
+ public bool PosTest<T>(int id, T curValue, UInt32 expValue)
+ {
+ bool retVal = true;
+ UInt32 newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToUInt32(...) (curValue:"+typeof(T)+" " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToUInt32(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("000", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToUInt32(curValue, myfp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2(int id, String curValue, UInt32 expValue)
+ {
+ bool retVal = true;
+ UInt32 newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToUInt32(...) (curValue:string " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToUInt32(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("003", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToUInt32(curValue, myfp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("004", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint321.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint321.cs
new file mode 100644
index 0000000000..a9002798c6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint321.cs
@@ -0,0 +1,78 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt32(Boolean)
+/// </summary>
+public class ConvertToUInt321
+{
+ public static int Main()
+ {
+ ConvertToUInt321 convertToUInt321 = new ConvertToUInt321();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt321");
+ if (convertToUInt321.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt32 from Boolean 1");
+ try
+ {
+ uint uintVal = Convert.ToUInt32(true);
+ if (uintVal != 1)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt32 from Boolean 2");
+ try
+ {
+ uint uintVal = Convert.ToUInt32(false);
+ if (uintVal != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint3210.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint3210.cs
new file mode 100644
index 0000000000..3e1dd7da46
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint3210.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt32(UInt16)
+/// </summary>
+public class ConvertToUInt3210
+{
+ public static int Main()
+ {
+ ConvertToUInt3210 convertToUInt3210 = new ConvertToUInt3210();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt3210");
+ if (convertToUInt3210.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt32 from UInt16 1");
+ try
+ {
+ UInt16 UInt16Val = UInt16.MaxValue;
+ uint uintVal = Convert.ToUInt32(UInt16Val);
+ if (uintVal != (UInt32)UInt16Val)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt32 from UInt16 2");
+ try
+ {
+ UInt16 UInt16Val = (UInt16)this.GetInt32(0, (int)UInt16.MaxValue);
+ uint uintVal = Convert.ToUInt32(UInt16Val);
+ if (uintVal != (UInt32)UInt16Val)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint3211.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint3211.cs
new file mode 100644
index 0000000000..4a53698267
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint3211.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt32(UInt32)
+/// </summary>
+public class ConvertToUInt3211
+{
+ public static int Main()
+ {
+ ConvertToUInt3211 convertToUInt3211 = new ConvertToUInt3211();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt3211");
+ if (convertToUInt3211.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt32 from UInt32 1");
+ try
+ {
+ UInt32 UInt32Val = UInt32.MaxValue;
+ uint uintVal = Convert.ToUInt32(UInt32Val);
+ if (uintVal != UInt32Val)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt32 from UInt32 2");
+ try
+ {
+ UInt32 UInt32Val = (UInt32)this.GetInt32(0, Int32.MaxValue) + (UInt32)(this.GetInt32(0, Int32.MaxValue));
+ uint uintVal = Convert.ToUInt32(UInt32Val);
+ if (uintVal != UInt32Val)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint3212.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint3212.cs
new file mode 100644
index 0000000000..a7c088a72c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint3212.cs
@@ -0,0 +1,125 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt32(UInt64)
+/// </summary>
+public class ConvertToUInt3212
+{
+ public static int Main()
+ {
+ ConvertToUInt3212 convertToUInt3212 = new ConvertToUInt3212();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt3212");
+ if (convertToUInt3212.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt32 from UInt64 1");
+ try
+ {
+ UInt64 UInt64Val = (UInt64)UInt32.MaxValue;
+ uint uintVal = Convert.ToUInt32(UInt64Val);
+ if (uintVal != (UInt32)UInt64Val)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt32 from UInt64 2");
+ try
+ {
+ UInt64 UInt64Val = (UInt64)this.GetInt32(0, Int32.MaxValue) + (UInt64)(this.GetInt32(0, Int32.MaxValue));
+ uint uintVal = Convert.ToUInt32(UInt64Val);
+ if (uintVal != (UInt64)UInt64Val)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the UInt64 is larger than UInt32 maxValue");
+ try
+ {
+ UInt64 UInt64Val = (UInt64)UInt32.MaxValue + (UInt64)this.GetInt32(1, Int32.MaxValue);
+ uint uintVal = Convert.ToUInt32(UInt64Val);
+ TestLibrary.TestFramework.LogError("N001", "the UInt64 is greater than UInt32 maxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint3213.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint3213.cs
new file mode 100644
index 0000000000..7f5ea6f001
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint3213.cs
@@ -0,0 +1,125 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt32(Sbyte)
+/// </summary>
+public class ConvertToUInt3213
+{
+ public static int Main()
+ {
+ ConvertToUInt3213 convertToUInt3213 = new ConvertToUInt3213();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt3213");
+ if (convertToUInt3213.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt32 from sbyte 1");
+ try
+ {
+ sbyte sbyteVal = sbyte.MaxValue;
+ uint uintVal = Convert.ToUInt32(sbyteVal);
+ if (uintVal != (UInt32)sbyteVal)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt32 from sbyte 2");
+ try
+ {
+ sbyte sbyteVal = (sbyte)this.GetInt32(0, (int)sbyte.MaxValue);
+ uint uintVal = Convert.ToUInt32(sbyteVal);
+ if (uintVal != (sbyte)sbyteVal)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the sbyte is less than UInt32 minValue");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(1, (int)sbyte.MaxValue + 2) * (-1));
+ uint uintVal = Convert.ToUInt32(sbyteVal);
+ TestLibrary.TestFramework.LogError("N001", "the sbyte is less than UInt32 minValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint3215.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint3215.cs
new file mode 100644
index 0000000000..bd93a982ca
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint3215.cs
@@ -0,0 +1,263 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt32(Object)
+/// </summary>
+public class ConvertToUInt3215
+{
+ public static int Main()
+ {
+ ConvertToUInt3215 convertToUInt3215 = new ConvertToUInt3215();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt3215");
+ if (convertToUInt3215.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Convert to UInt32 from object 1");
+ try
+ {
+ TestClass2 objVal = new TestClass2();
+ uint uintVal = Convert.ToUInt32(objVal);
+ if (uintVal != UInt32.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Convert to UInt32 from object 2");
+ try
+ {
+ object objVal = true;
+ uint uintVal = Convert.ToUInt32(objVal);
+ if (uintVal != 1)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Convert to UInt32 from object 3");
+ try
+ {
+ object objVal = false;
+ uint uintVal = Convert.ToUInt32(objVal);
+ if (uintVal != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Convert to UInt32 from object 4");
+ try
+ {
+ object objVal = null;
+ uint uintVal = Convert.ToUInt32(objVal);
+ if (uintVal != 0)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The object does not implement IConvertible");
+ try
+ {
+ TestClass1 objVal = new TestClass1();
+ uint uintVal = Convert.ToUInt32(objVal);
+ TestLibrary.TestFramework.LogError("N001", "The object does not implement IConvertible but not throw exception");
+ retVal = false;
+ }
+ catch (InvalidCastException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region ForTestClass
+ public class TestClass1 { }
+ public class TestClass2 : IConvertible
+ {
+ public TypeCode GetTypeCode()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public bool ToBoolean(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public byte ToByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public char ToChar(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public DateTime ToDateTime(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public decimal ToDecimal(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public double ToDouble(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public short ToInt16(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int ToInt32(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public long ToInt64(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public sbyte ToSByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public float ToSingle(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public string ToString(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public object ToType(Type conversionType, IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public ushort ToUInt16(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public uint ToUInt32(IFormatProvider provider)
+ {
+ return UInt32.MaxValue;
+ }
+
+ public ulong ToUInt64(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint3216.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint3216.cs
new file mode 100644
index 0000000000..9ed8bc0a8c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint3216.cs
@@ -0,0 +1,282 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt32(Object,IFormatProvider)
+/// </summary>
+public class ConvertToUInt3216
+{
+ public static int Main()
+ {
+ ConvertToUInt3216 convertToUInt3216 = new ConvertToUInt3216();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt3216");
+ if (convertToUInt3216.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Convert to UInt32 from object 1");
+ try
+ {
+ TestClass2 objVal = new TestClass2();
+ TestIFormat iformat = new TestIFormat();
+ uint uintVal1 = Convert.ToUInt32(objVal, iformat);
+ uint uintVal2 = Convert.ToUInt32(objVal, null);
+ if (uintVal1 != UInt32.MaxValue || uintVal2 != UInt32.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Convert to UInt32 from object 2");
+ try
+ {
+ object objVal = true;
+ TestIFormat iformat = new TestIFormat();
+ uint uintVal1 = Convert.ToUInt32(objVal, iformat);
+ uint uintVal2 = Convert.ToUInt32(objVal, null);
+ if (uintVal1 != 1 || uintVal2 != 1)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Convert to UInt32 from object 3");
+ try
+ {
+ object objVal = false;
+ TestIFormat iformat = new TestIFormat();
+ uint uintVal1 = Convert.ToUInt32(objVal, iformat);
+ uint uintVal2 = Convert.ToUInt32(objVal, null);
+ if (uintVal1 != 0 || uintVal2 != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Convert to UInt32 from object 4");
+ try
+ {
+ object objVal = null;
+ TestIFormat iformat = new TestIFormat();
+ uint uintVal1 = Convert.ToUInt32(objVal, iformat);
+ uint uintVal2 = Convert.ToUInt32(objVal, null);
+ if (uintVal1 != 0 || uintVal2 != 0)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The object does not implement IConvertible");
+ try
+ {
+ TestClass1 objVal = new TestClass1();
+ uint uintVal = Convert.ToUInt32(objVal, null);
+ TestLibrary.TestFramework.LogError("N001", "The object does not implement IConvertible but not throw exception");
+ retVal = false;
+ }
+ catch (InvalidCastException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass1 { }
+ public class TestIFormat : IFormatProvider
+ {
+ public bool IsUInt32MaxValue = true;
+ public object GetFormat(Type argType)
+ {
+ if (argType == typeof(TestIFormat))
+ return this;
+ else
+ return null;
+ }
+ }
+ public class TestClass2 : IConvertible
+ {
+ public TypeCode GetTypeCode()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public bool ToBoolean(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public byte ToByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public char ToChar(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public DateTime ToDateTime(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public decimal ToDecimal(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public double ToDouble(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public short ToInt16(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public int ToInt32(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public long ToInt64(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public sbyte ToSByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public float ToSingle(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public string ToString(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public object ToType(Type conversionType, IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public ushort ToUInt16(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public uint ToUInt32(IFormatProvider provider)
+ {
+ bool IsUInt32MinValue = true;
+ if (provider != null)
+ {
+ TestIFormat iformat = (TestIFormat)provider.GetFormat(typeof(TestIFormat));
+ if (iformat != null && iformat.IsUInt32MaxValue)
+ {
+ IsUInt32MinValue = false;
+ }
+ }
+ if (IsUInt32MinValue)
+ {
+ return UInt32.MinValue;
+ }
+ else
+ {
+ return UInt32.MaxValue;
+ }
+ }
+ public ulong ToUInt64(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint3217.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint3217.cs
new file mode 100644
index 0000000000..7484f6b14f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint3217.cs
@@ -0,0 +1,253 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt32(String)
+/// </summary>
+public class ConvertToUInt3217
+{
+ public static int Main()
+ {
+ ConvertToUInt3217 convertToUInt3217 = new ConvertToUInt3217();
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt3217");
+ if (convertToUInt3217.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt32 from string 1");
+ try
+ {
+ string strVal = UInt32.MaxValue.ToString();
+ uint uintVal = Convert.ToUInt32(strVal);
+ if (uintVal != UInt32.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt32 from string 2");
+ try
+ {
+ string strVal = UInt32.MinValue.ToString();
+ uint uintVal = Convert.ToUInt32(strVal);
+ if (uintVal != UInt32.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt32 from string 3");
+ try
+ {
+ string strVal = "-" + UInt32.MinValue.ToString();
+ uint uintVal = Convert.ToUInt32(strVal);
+ if (uintVal != UInt32.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert to UInt32 from string 4");
+ try
+ {
+ uint intVal = (UInt32)this.GetInt32(0, Int32.MaxValue) + (UInt32)this.GetInt32(0, Int32.MaxValue);
+ string strVal = "+" + intVal.ToString();
+ uint uintVal = Convert.ToUInt32(strVal);
+ if (uintVal != intVal)
+ {
+ TestLibrary.TestFramework.LogError("007", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Convert to UInt32 from string 5");
+ try
+ {
+ string strVal = null;
+ uint uintVal = Convert.ToUInt32(strVal);
+ if (uintVal != 0)
+ {
+ TestLibrary.TestFramework.LogError("009", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the string represents a number less than MinValue");
+ try
+ {
+ int intVal = this.GetInt32(1, Int32.MaxValue);
+ string strVal = "-" + intVal.ToString();
+ uint uintVal = Convert.ToUInt32(strVal);
+ TestLibrary.TestFramework.LogError("N001", "the string represents a number less than MinValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the string represents a number greater than MaxValue");
+ try
+ {
+ UInt64 sourceVal = (UInt64)UInt32.MaxValue + (UInt64)this.GetInt32(1, Int32.MaxValue);
+ string strVal = sourceVal.ToString();
+ uint uintVal = Convert.ToUInt32(strVal);
+ TestLibrary.TestFramework.LogError("N003", "the string represents a number greater than MaxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: the string does not consist of an optional sign followed by a sequence of digits ");
+ try
+ {
+ string strVal = "helloworld";
+ uint uintVal = Convert.ToUInt32(strVal);
+ TestLibrary.TestFramework.LogError("N005", "the string does not consist of an optional sign followed by a sequence of digits but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: the string is empty string");
+ try
+ {
+ string strVal = string.Empty;
+ uint uintVal = Convert.ToUInt32(strVal);
+ TestLibrary.TestFramework.LogError("N007", "the string is empty string but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint3218.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint3218.cs
new file mode 100644
index 0000000000..84a4d6b248
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint3218.cs
@@ -0,0 +1,278 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Convert.ToUInt32(String,IFormatProvider)
+/// </summary>
+public class ConvertToUInt3218
+{
+ public static int Main()
+ {
+ ConvertToUInt3218 convertToUInt3218 = new ConvertToUInt3218();
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt3218");
+ if (convertToUInt3218.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt32 from string 1");
+ try
+ {
+ string strVal = UInt32.MaxValue.ToString();
+ uint uintVal = Convert.ToUInt32(strVal, null);
+ if (uintVal != UInt32.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt32 from string 2");
+ try
+ {
+ string strVal = UInt32.MaxValue.ToString();
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ uint uintVal = Convert.ToUInt32(strVal, provider);
+ if (uintVal != UInt32.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt32 from string 3");
+ try
+ {
+ string strVal = UInt32.MinValue.ToString();
+ uint uintVal = Convert.ToUInt32(strVal, null);
+ if (uintVal != UInt32.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert to UInt32 from string 4");
+ try
+ {
+ string strVal = "-" + UInt32.MinValue.ToString();
+ uint uintVal = Convert.ToUInt32(strVal, null);
+ if (uintVal != UInt32.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("007", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Convert to UInt32 from string 5");
+ try
+ {
+ uint sourceVal = (UInt32)this.GetInt32(0, Int32.MaxValue) + (UInt32)this.GetInt32(0, Int32.MaxValue);
+ string strVal = "+" + sourceVal.ToString();
+ uint uintVal = Convert.ToUInt32(strVal, null);
+ if (uintVal != sourceVal)
+ {
+ TestLibrary.TestFramework.LogError("009", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Convert to UInt32 from string 6");
+ try
+ {
+ string strVal = null;
+ uint uintVal = Convert.ToUInt32(strVal, null);
+ if (uintVal != 0)
+ {
+ TestLibrary.TestFramework.LogError("011", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the string represents a number less than MinValue");
+ try
+ {
+ int intVal = this.GetInt32(1, Int32.MaxValue);
+ string strVal = "-" + intVal.ToString();
+ uint uintVal = Convert.ToUInt32(strVal, null);
+ TestLibrary.TestFramework.LogError("N001", "the string represents a number less than MinValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the string represents a number greater than MaxValue");
+ try
+ {
+ UInt64 intVal = (UInt64)UInt32.MaxValue + (UInt64)this.GetInt32(1, Int32.MaxValue);
+ string strVal = intVal.ToString();
+ uint uintVal = Convert.ToUInt32(strVal, null);
+ TestLibrary.TestFramework.LogError("N003", "the string represents a number greater than MaxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: the string does not consist of an optional sign followed by a sequence of digits ");
+ try
+ {
+ string strVal = "helloworld";
+ uint uintVal = Convert.ToUInt32(strVal, null);
+ TestLibrary.TestFramework.LogError("N005", "the string does not consist of an optional sign followed by a sequence of digits but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: the string is empty string");
+ try
+ {
+ string strVal = string.Empty;
+ uint uintVal = Convert.ToUInt32(strVal, null);
+ TestLibrary.TestFramework.LogError("N007", "the string is empty string but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint3219.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint3219.cs
new file mode 100644
index 0000000000..580c3f9984
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint3219.cs
@@ -0,0 +1,321 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt32(String,Int32)
+/// </summary>
+public class ConvertToUInt3219
+{
+ public static int Main()
+ {
+ ConvertToUInt3219 convertToUInt3219 = new ConvertToUInt3219();
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt3219");
+ if (convertToUInt3219.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt32 from string 1");
+ try
+ {
+ string strVal = "1111";
+ uint uintVal1 = Convert.ToUInt32(strVal, 2);
+ uint uintVal2 = Convert.ToUInt32(strVal, 8);
+ uint uintVal3 = Convert.ToUInt32(strVal, 10);
+ uint uintVal4 = Convert.ToUInt32(strVal, 16);
+ if (uintVal1 != (UInt32)(1 * Math.Pow(2, 3) + 1 * Math.Pow(2, 2) + 1 * Math.Pow(2, 1) + 1 * Math.Pow(2, 0)) ||
+ uintVal2 != (UInt32)(1 * Math.Pow(8, 3) + 1 * Math.Pow(8, 2) + 1 * Math.Pow(8, 1) + 1 * Math.Pow(8, 0)) ||
+ uintVal3 != (UInt32)(1 * Math.Pow(10, 3) + 1 * Math.Pow(10, 2) + 1 * Math.Pow(10, 1) + 1 * Math.Pow(10, 0)) ||
+ uintVal4 != (UInt32)(1 * Math.Pow(16, 3) + 1 * Math.Pow(16, 2) + 1 * Math.Pow(16, 1) + 1 * Math.Pow(16, 0))
+ )
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt32 from string 2");
+ try
+ {
+ uint intVal = (UInt32)this.GetInt32(0, Int32.MaxValue) + (UInt32)this.GetInt32(0, Int32.MaxValue);
+ string strVal = "+" + intVal.ToString();
+ uint uintVal = Convert.ToUInt32(strVal, 10);
+ if (uintVal != intVal)
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt32 from string 3");
+ try
+ {
+ string strVal = null;
+ uint uintVal1 = Convert.ToUInt32(strVal, 2);
+ uint uintVal2 = Convert.ToUInt32(strVal, 8);
+ uint uintVal3 = Convert.ToUInt32(strVal, 10);
+ uint uintVal4 = Convert.ToUInt32(strVal, 16);
+ if (uintVal1 != 0 || uintVal2 != 0 || uintVal3 != 0 || uintVal4 != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert to UInt32 from string 4");
+ try
+ {
+ string strVal = "0xff";
+ uint uintVal = Convert.ToUInt32(strVal, 16);
+ if (uintVal != (UInt32)(15 * Math.Pow(16, 1) + 15 * Math.Pow(16, 0)))
+ {
+ TestLibrary.TestFramework.LogError("007", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the parameter of fromBase is not 2, 8, 10, or 16");
+ try
+ {
+ string strVal = "1111";
+ uint uintVal = Convert.ToUInt32(strVal, 100);
+ TestLibrary.TestFramework.LogError("N001", "the parameter of fromBase is not 2, 8, 10, or 16 but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the string represents a non-base 10 signed number and is prefixed with a negative sign");
+ try
+ {
+ string strVal = "-0";
+ uint uintVal = Convert.ToUInt32(strVal, 2);
+ TestLibrary.TestFramework.LogError("N003", "the string represents a non-base 10 signed number and is prefixed with a negative sign but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: the string contains a character that is not a valid digit in the base specified by fromBase param 1");
+ try
+ {
+ string strVal = "1234";
+ uint uintVal = Convert.ToUInt32(strVal, 2);
+ TestLibrary.TestFramework.LogError("N005", "the string contains a character that is not a valid digit in the base specified by fromBase param but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: the string contains a character that is not a valid digit in the base specified by fromBase param 2");
+ try
+ {
+ string strVal = "9999";
+ uint uintVal = Convert.ToUInt32(strVal, 8);
+ TestLibrary.TestFramework.LogError("N007", "the string contains a character that is not a valid digit in the base specified by fromBase param but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest5: the string contains a character that is not a valid digit in the base specified by fromBase param 3");
+ try
+ {
+ string strVal = "abcd";
+ uint uintVal = Convert.ToUInt32(strVal, 10);
+ TestLibrary.TestFramework.LogError("N009", "the string contains a character that is not a valid digit in the base specified by fromBase param but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest6: the string contains a character that is not a valid digit in the base specified by fromBase param 4");
+ try
+ {
+ string strVal = "gh";
+ uint uintVal = Convert.ToUInt32(strVal, 16);
+ TestLibrary.TestFramework.LogError("N011", "the string contains a character that is not a valid digit in the base specified by fromBase param but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N012", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest7: the string represents base 10 number is less than UInt32.minValue");
+ try
+ {
+ int intVal = this.GetInt32(1, Int32.MaxValue);
+ string strVal = "-" + intVal.ToString();
+ uint uintVal = Convert.ToUInt32(strVal, 10);
+ TestLibrary.TestFramework.LogError("N013", "the string represent base 10 number is less than UInt32.minValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N014", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest8()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest8: the string represents base 10 number is greater than UInt32.maxValue");
+ try
+ {
+ UInt64 intVal = (UInt64)UInt32.MaxValue + (UInt64)this.GetInt32(1, Int32.MaxValue);
+ string strVal = intVal.ToString();
+ uint uintVal = Convert.ToUInt32(strVal, 10);
+ TestLibrary.TestFramework.LogError("N015", "the string represent base 10 number is greater than UInt32.maxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N016", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint322.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint322.cs
new file mode 100644
index 0000000000..8e32e5a1df
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint322.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt32(Byte)
+/// </summary>
+public class ConvertToUInt322
+{
+ public static int Main()
+ {
+ ConvertToUInt322 convertToUInt322 = new ConvertToUInt322();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt322");
+ if (convertToUInt322.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt32 from Byte 1");
+ try
+ {
+ byte byteVal = byte.MaxValue;
+ uint uintVal = Convert.ToUInt32(byteVal);
+ if (uintVal != (uint)(byteVal))
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt32 from Byte 2");
+ try
+ {
+ byte byteVal = byte.MinValue;
+ uint uintVal = Convert.ToUInt32(byteVal);
+ if (uintVal != (uint)(byteVal))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt32 from Byte 3");
+ try
+ {
+ byte byteVal = TestLibrary.Generator.GetByte(-55);
+ uint uintVal = Convert.ToUInt32(byteVal);
+ if (uintVal != (uint)(byteVal))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint323.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint323.cs
new file mode 100644
index 0000000000..476b57443d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint323.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt32(Char)
+/// </summary>
+public class ConvertToUInt323
+{
+ public static int Main()
+ {
+ ConvertToUInt323 convertToUInt323 = new ConvertToUInt323();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt323");
+ if (convertToUInt323.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt32 from Char 1");
+ try
+ {
+ char charVal = char.MaxValue;
+ uint uintVal = Convert.ToUInt32(charVal);
+ if (uintVal != (uint)(charVal))
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt32 from Char 2");
+ try
+ {
+ char charVal = char.MinValue;
+ uint uintVal = Convert.ToUInt32(charVal);
+ if (uintVal != (uint)(charVal))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt32 from Char 3");
+ try
+ {
+ char charVal = TestLibrary.Generator.GetChar(-55);
+ uint uintVal = Convert.ToUInt32(charVal);
+ if (uintVal != (uint)(charVal))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint324.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint324.cs
new file mode 100644
index 0000000000..218dcaf74e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint324.cs
@@ -0,0 +1,167 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt32(Decimal)
+/// </summary>
+public class ConvertToUInt324
+{
+ public static int Main()
+ {
+ ConvertToUInt324 convertToUInt324 = new ConvertToUInt324();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt324");
+ if (convertToUInt324.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt32 from Decimal 1");
+ try
+ {
+ decimal decimalVal = (decimal)(UInt32.MaxValue);
+ uint uintVal = Convert.ToUInt32(decimalVal);
+ if (uintVal != UInt32.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt32 from Decimal 2");
+ try
+ {
+ decimal decimalVal = (decimal)(UInt32.MinValue);
+ uint uintVal = Convert.ToUInt32(decimalVal);
+ if (uintVal != UInt32.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt32 from Decimal 3");
+ try
+ {
+ decimal decimalVal = (decimal)(this.GetInt32(0, Int32.MaxValue)) + (decimal)(this.GetInt32(0, Int32.MaxValue));
+ uint uintVal = Convert.ToUInt32(decimalVal);
+ if (uintVal != (uint)(decimalVal))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the decimal is larger than UInt32 maxValue");
+ try
+ {
+ decimal decimalVal = (decimal)UInt32.MaxValue + (decimal)(this.GetInt32(1, Int32.MaxValue));
+ uint uintVal = Convert.ToUInt32(decimalVal);
+ TestLibrary.TestFramework.LogError("N001", "the decimal is larger than UInt32 maxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the decimal is less than UInt32 minValue");
+ try
+ {
+ decimal decimalVal = (decimal)(this.GetInt32(1, Int32.MaxValue) * (-1));
+ uint uintVal = Convert.ToUInt32(decimalVal);
+ TestLibrary.TestFramework.LogError("N003", "the decimal is larger than UInt32 maxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint325.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint325.cs
new file mode 100644
index 0000000000..de2a31dff4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint325.cs
@@ -0,0 +1,167 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt32(Double)
+/// </summary>
+public class ConvertToUInt325
+{
+ public static int Main()
+ {
+ ConvertToUInt325 convertToUInt325 = new ConvertToUInt325();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt325");
+ if (convertToUInt325.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt32 from double 1");
+ try
+ {
+ double doubleVal = (double)(UInt32.MaxValue);
+ uint uintVal = Convert.ToUInt32(doubleVal);
+ if (uintVal != UInt32.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt32 from double 2");
+ try
+ {
+ double doubleVal = (double)(UInt32.MinValue);
+ uint uintVal = Convert.ToUInt32(doubleVal);
+ if (uintVal != UInt32.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt16 from double 3");
+ try
+ {
+ double doubleVal = (double)(this.GetInt32(0, Int32.MaxValue)) + (double)(this.GetInt32(0, Int32.MaxValue));
+ uint uintVal = Convert.ToUInt32(doubleVal);
+ if (uintVal != (uint)(doubleVal))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the double is larger than UInt32 maxValue");
+ try
+ {
+ double doubleVal = (double)UInt32.MaxValue + (double)(this.GetInt32(1,Int32.MaxValue));
+ uint uintVal = Convert.ToUInt32(doubleVal);
+ TestLibrary.TestFramework.LogError("N001", "the double is larger than UInt32 maxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the double is less than UInt32 minValue");
+ try
+ {
+ double doubleVal = (double)(this.GetInt32(1, Int32.MaxValue) * (-1));
+ uint uintVal = Convert.ToUInt32(doubleVal);
+ TestLibrary.TestFramework.LogError("N003", "the double is larger than UInt32 maxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint326.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint326.cs
new file mode 100644
index 0000000000..9651ca4c58
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint326.cs
@@ -0,0 +1,56 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt32(DateTime)
+/// </summary>
+public class ConvertToUInt326
+{
+ public static int Main()
+ {
+ ConvertToUInt326 convertToUInt326 = new ConvertToUInt326();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt326");
+ if (convertToUInt326.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Convert to UInt32 from DateTime");
+ try
+ {
+ DateTime dtVal = DateTime.Now;
+ uint uintVal = Convert.ToUInt32(dtVal);
+ TestLibrary.TestFramework.LogError("N001", "Convert to UInt32 from DateTime but not throw exception");
+ retVal = false;
+ }
+ catch (InvalidCastException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint327.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint327.cs
new file mode 100644
index 0000000000..a13b149780
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint327.cs
@@ -0,0 +1,125 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt32(Int16)
+/// </summary>
+public class ConvertToUInt327
+{
+ public static int Main()
+ {
+ ConvertToUInt327 convertToUInt327 = new ConvertToUInt327();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt327");
+ if (convertToUInt327.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt32 from int16 1");
+ try
+ {
+ Int16 Int16Val = Int16.MaxValue;
+ uint uintVal = Convert.ToUInt32(Int16Val);
+ if (uintVal != (uint)Int16Val)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt32 from int16 2");
+ try
+ {
+ Int16 Int16Val = (Int16)this.GetInt32(0, (int)Int16.MaxValue);
+ uint uintVal = Convert.ToUInt32(Int16Val);
+ if (uintVal != (uint)Int16Val)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the int16 is less than UInt32 minValue");
+ try
+ {
+ Int16 Int16Val = (Int16)(this.GetInt32(1, (int)Int16.MaxValue + 2) * (-1));
+ uint uintVal = Convert.ToUInt32(Int16Val);
+ TestLibrary.TestFramework.LogError("N001", "the int16 is less than UInt32 minValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint328.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint328.cs
new file mode 100644
index 0000000000..3b9bb96c1b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint328.cs
@@ -0,0 +1,125 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt32(Int32)
+/// </summary>
+public class ConvertToUInt328
+{
+ public static int Main()
+ {
+ ConvertToUInt328 convertToUInt328 = new ConvertToUInt328();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt328");
+ if (convertToUInt328.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt32 from int32 1");
+ try
+ {
+ Int32 Int32Val = Int32.MaxValue;
+ uint uintVal = Convert.ToUInt32(Int32Val);
+ if (uintVal != (uint)Int32Val)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt32 from int32 2");
+ try
+ {
+ Int32 Int32Val = this.GetInt32(0, Int32.MaxValue);
+ uint uintVal = Convert.ToUInt32(Int32Val);
+ if (uintVal != (uint)Int32Val)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the int32 is less than UInt32 minValue");
+ try
+ {
+ Int32 Int32Val = this.GetInt32(1, Int32.MaxValue) * (-1);
+ uint uintVal = Convert.ToUInt32(Int32Val);
+ TestLibrary.TestFramework.LogError("N001", "the int32 is less than UInt32 minValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint329.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint329.cs
new file mode 100644
index 0000000000..9505bbec4d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint329.cs
@@ -0,0 +1,145 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt32(Int64)
+/// </summary>
+public class ConvertToUInt329
+{
+ public static int Main()
+ {
+ ConvertToUInt329 convertToUInt329 = new ConvertToUInt329();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt329");
+ if (convertToUInt329.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt32 from int64 1");
+ try
+ {
+ Int64 Int64Val = (Int64)UInt32.MaxValue;
+ uint uintVal = Convert.ToUInt32(Int64Val);
+ if (uintVal != UInt32.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt32 from int64 2");
+ try
+ {
+ Int64 Int64Val = (Int64)this.GetInt32(0, Int32.MaxValue) + (Int64)this.GetInt32(0, Int32.MaxValue);
+ uint uintVal = Convert.ToUInt32(Int64Val);
+ if (uintVal != (uint)Int64Val)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the int64 is less than UInt32 minValue");
+ try
+ {
+ Int64 Int64Val = this.GetInt32(1, Int32.MaxValue) * (-1);
+ uint uintVal = Convert.ToUInt32(Int64Val);
+ TestLibrary.TestFramework.LogError("N001", "the int64 is less than UInt32 minValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the int64 is larger than UInt32 maxValue");
+ try
+ {
+ Int64 Int64Val = (Int64)UInt32.MaxValue + (Int64)this.GetInt32(1, Int32.MaxValue);
+ uint uintVal = Convert.ToUInt32(Int64Val);
+ TestLibrary.TestFramework.LogError("N003", "the int64 is greater than UInt32 maxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint64.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint64.cs
new file mode 100644
index 0000000000..f21c3140df
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint64.cs
@@ -0,0 +1,126 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class ConvertToUInt64
+{
+ public static int Main()
+ {
+ ConvertToUInt64 ac = new ConvertToUInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("Convert.ToUInt64(...)");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ return retVal;
+ }
+
+ public bool PosTest1() { return PosTest<object>(1, (object)UInt64.MaxValue, UInt64.MaxValue); }
+ public bool PosTest2() { return PosTest<object>(2, (object)UInt64.MinValue, UInt64.MinValue); }
+ public bool PosTest3() { return PosTest<object>(3, null, 0); }
+
+ public bool PosTest4() { return PosTest2(4, null, 0); }
+ public bool PosTest5() { return PosTest2(5, "1034", 1034); }
+
+ public bool PosTest<T>(int id, T curValue, UInt64 expValue)
+ {
+ bool retVal = true;
+ UInt64 newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToUInt64(...) (curValue:"+typeof(T)+" " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToUInt64(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("000", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToUInt64(curValue, myfp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2(int id, String curValue, UInt64 expValue)
+ {
+ bool retVal = true;
+ UInt64 newValue;
+ IFormatProvider myfp;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest"+id+": Convert.ToUInt64(...) (curValue:string " +curValue+" newType:"+expValue.GetType()+")");
+
+ try
+ {
+ newValue = Convert.ToUInt64(curValue);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("003", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ myfp = null;
+ newValue = Convert.ToUInt64(curValue, myfp);
+
+ if (!newValue.Equals(expValue))
+ {
+ TestLibrary.TestFramework.LogError("004", "Value mismatch: Expected(" + expValue + ") Actual(" +newValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint641.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint641.cs
new file mode 100644
index 0000000000..f4c30dd107
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint641.cs
@@ -0,0 +1,78 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt64(Boolean)
+/// </summary>
+public class ConvertToUInt641
+{
+ public static int Main()
+ {
+ ConvertToUInt641 convertToUInt641 = new ConvertToUInt641();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt641");
+ if (convertToUInt641.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt64 from Boolean 1");
+ try
+ {
+ ulong ulongVal = Convert.ToUInt64(true);
+ if (ulongVal != 1)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt64 from Boolean 2");
+ try
+ {
+ ulong ulongVal = Convert.ToUInt64(false);
+ if (ulongVal != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint6410.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint6410.cs
new file mode 100644
index 0000000000..400c131d50
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint6410.cs
@@ -0,0 +1,125 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt64(Int32)
+/// </summary>
+public class ConvertToUInt6410
+{
+ public static int Main()
+ {
+ ConvertToUInt6410 convertToUInt6410 = new ConvertToUInt6410();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt6410");
+ if (convertToUInt6410.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt64 from int32 1");
+ try
+ {
+ Int32 Int32Val = Int32.MaxValue;
+ ulong ulongVal = Convert.ToUInt64(Int32Val);
+ if (ulongVal != (ulong)Int32Val)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt64 from int32 2");
+ try
+ {
+ Int32 Int32Val = this.GetInt32(0, Int32.MaxValue);
+ ulong ulongVal = Convert.ToUInt64(Int32Val);
+ if (ulongVal != (ulong)Int32Val)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the int32 is less than UInt64 minValue");
+ try
+ {
+ Int32 Int32Val = this.GetInt32(1, Int32.MaxValue) * (-1);
+ ulong ulongVal = Convert.ToUInt64(Int32Val);
+ TestLibrary.TestFramework.LogError("N001", "the int32 is less than UInt64 minValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint6411.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint6411.cs
new file mode 100644
index 0000000000..a9c0427c95
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint6411.cs
@@ -0,0 +1,124 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt64(Int64)
+/// </summary>
+public class ConvertToUInt6411
+{
+ public static int Main()
+ {
+ ConvertToUInt6411 convertToUInt6411 = new ConvertToUInt6411();
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt6411");
+ if (convertToUInt6411.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt64 from int64 1");
+ try
+ {
+ Int64 Int64Val = Int64.MaxValue;
+ ulong ulongVal = Convert.ToUInt64(Int64Val);
+ if (ulongVal != (ulong)Int64Val)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt64 from int64 2");
+ try
+ {
+ Int64 Int64Val = TestLibrary.Generator.GetInt64(-55);
+ ulong ulongVal = Convert.ToUInt64(Int64Val);
+ if (ulongVal != (ulong)Int64Val)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the int64 is less than UInt64 minValue");
+ try
+ {
+ Int64 Int64Val = (Int64)this.GetInt32(1, Int32.MaxValue) * (-1);
+ ulong ulongVal = Convert.ToUInt64(Int64Val);
+ TestLibrary.TestFramework.LogError("N001", "the int32 is less than UInt64 minValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint6412.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint6412.cs
new file mode 100644
index 0000000000..cc645b8bce
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint6412.cs
@@ -0,0 +1,124 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt64(SByte)
+/// </summary>
+public class ConvertToUInt6412
+{
+ public static int Main()
+ {
+ ConvertToUInt6412 convertToUInt6412 = new ConvertToUInt6412();
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt6412");
+ if (convertToUInt6412.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt64 from sbyte 1");
+ try
+ {
+ sbyte sbyteVal = sbyte.MaxValue;
+ ulong ulongVal = Convert.ToUInt64(sbyteVal);
+ if (ulongVal != (ulong)sbyteVal)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt64 from sbyte 2");
+ try
+ {
+ sbyte sbyteVal = (sbyte)this.GetInt32(0, (int)sbyte.MaxValue);
+ ulong ulongVal = Convert.ToUInt64(sbyteVal);
+ if (ulongVal != (ulong)sbyteVal)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the sbyte is less than UInt64 minValue");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(1, (int)sbyte.MaxValue + 2) * (-1));
+ ulong ulongVal = Convert.ToUInt64(sbyteVal);
+ TestLibrary.TestFramework.LogError("N001", "the sbyte is less than UInt64 minValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint6413.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint6413.cs
new file mode 100644
index 0000000000..af4467dce0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint6413.cs
@@ -0,0 +1,174 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt64(Single)
+/// </summary>
+public class ConvertToUInt6413
+{
+ public static int Main()
+ {
+ ConvertToUInt6413 convertToUInt6413 = new ConvertToUInt6413();
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt6413");
+ if (convertToUInt6413.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Convert To UInt64 from Single 1");
+ try
+ {
+ float singleVal = (float)TestLibrary.Generator.GetInt64(-55);
+ ulong ulongVal = Convert.ToUInt64(singleVal);
+ if (ulongVal != (ulong)singleVal)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Convert To UInt64 from Single 2");
+ try
+ {
+ float singleVal1 = 1.5F;
+ float singleVal2 = 1.1F;
+ float singleVal3 = 1.9F;
+ ulong ulongVal1 = Convert.ToUInt64(singleVal1);
+ ulong ulongVal2 = Convert.ToUInt64(singleVal2);
+ ulong ulongVal3 = Convert.ToUInt64(singleVal3);
+ if (ulongVal1 != 2 || ulongVal2 != 1 || ulongVal3 != 2)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Convert To UInt64 from Single 3");
+ try
+ {
+ float singleVal1 = 2.5F;
+ float singleVal2 = 2.1F;
+ float singleVal3 = 2.9F;
+ ulong ulongVal1 = Convert.ToUInt64(singleVal1);
+ ulong ulongVal2 = Convert.ToUInt64(singleVal2);
+ ulong ulongVal3 = Convert.ToUInt64(singleVal3);
+ if (ulongVal1 != 2 || ulongVal2 != 2 || ulongVal3 != 3)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The Single is out of the range of UInt64 1");
+ try
+ {
+ float singleVal = (float)this.GetInt32(1, Int32.MaxValue) + (float)(UInt64.MaxValue);
+ ulong ulongVal = Convert.ToUInt64(singleVal);
+ TestLibrary.TestFramework.LogError("N001", "The Single is out of the range of UInt64 but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:The Single is out of the range of UInt64 2");
+ try
+ {
+ float singleVal = (float)(this.GetInt32(1, Int32.MaxValue) * (-1));
+ ulong ulongVal = Convert.ToUInt64(singleVal);
+ TestLibrary.TestFramework.LogError("N003", "The Single is out of the range of UInt64 but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint6414.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint6414.cs
new file mode 100644
index 0000000000..d239705797
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint6414.cs
@@ -0,0 +1,244 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt64(Object)
+/// </summary>
+public class ConvertToUInt6414
+{
+ public static int Main()
+ {
+ ConvertToUInt6414 convertToUInt6414 = new ConvertToUInt6414();
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt6414");
+
+ if (convertToUInt6414.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Convert to UInt64 from object 1");
+ try
+ {
+ TestClass2 objVal = new TestClass2();
+ ulong ulongVal = Convert.ToUInt64(objVal);
+ if (ulongVal != UInt64.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Convert to UInt64 from object 2");
+ try
+ {
+ object objVal = true;
+ ulong ulongVal = Convert.ToUInt64(objVal);
+ if (ulongVal != 1)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Convert to UInt64 from object 3");
+ try
+ {
+ object objVal = false;
+ ulong ulongVal = Convert.ToUInt64(objVal);
+ if (ulongVal != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Convert to UInt64 from object 4");
+ try
+ {
+ object objVal = null;
+ ulong ulongVal = Convert.ToUInt64(objVal);
+ if (ulongVal != 0)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The object does not implement IConvertible");
+ try
+ {
+ TestClass1 objVal = new TestClass1();
+ ulong ulongVal = Convert.ToUInt64(objVal);
+ TestLibrary.TestFramework.LogError("N001", "The object does not implement IConvertible but not throw exception");
+ retVal = false;
+ }
+ catch (InvalidCastException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region ForTestClass
+ public class TestClass1 { }
+ public class TestClass2 : IConvertible
+ {
+ public TypeCode GetTypeCode()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public bool ToBoolean(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public byte ToByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public char ToChar(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public DateTime ToDateTime(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public decimal ToDecimal(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public double ToDouble(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public short ToInt16(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public int ToInt32(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public long ToInt64(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public sbyte ToSByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public float ToSingle(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public string ToString(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public object ToType(Type conversionType, IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public ushort ToUInt16(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public uint ToUInt32(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public ulong ToUInt64(IFormatProvider provider)
+ {
+ return UInt64.MaxValue;
+ }
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint6415.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint6415.cs
new file mode 100644
index 0000000000..eea22fc867
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint6415.cs
@@ -0,0 +1,281 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt64(Object,IFormatProvider)
+/// </summary>
+public class ConvertToUInt6415
+{
+ public static int Main()
+ {
+ ConvertToUInt6415 convertToUInt6415 = new ConvertToUInt6415();
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt6415");
+ if (convertToUInt6415.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Convert to UInt64 from object 1");
+ try
+ {
+ TestClass2 objVal = new TestClass2();
+ TestIFormat iformat = new TestIFormat();
+ ulong ulongVal1 = Convert.ToUInt64(objVal, iformat);
+ ulong ulongVal2 = Convert.ToUInt64(objVal, null);
+ if (ulongVal1 != UInt64.MaxValue || ulongVal2 != UInt64.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Convert to UInt64 from object 2");
+ try
+ {
+ object objVal = true;
+ TestIFormat iformat = new TestIFormat();
+ ulong ulongVal1 = Convert.ToUInt64(objVal, iformat);
+ ulong ulongVal2 = Convert.ToUInt64(objVal, null);
+ if (ulongVal1 != 1 || ulongVal2 != 1)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Convert to UInt64 from object 3");
+ try
+ {
+ object objVal = false;
+ TestIFormat iformat = new TestIFormat();
+ ulong ulongVal1 = Convert.ToUInt64(objVal, iformat);
+ ulong ulongVal2 = Convert.ToUInt64(objVal, null);
+ if (ulongVal1 != 0 || ulongVal2 != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Convert to UInt64 from object 4");
+ try
+ {
+ object objVal = null;
+ TestIFormat iformat = new TestIFormat();
+ ulong ulongVal1 = Convert.ToUInt32(objVal, iformat);
+ ulong ulongVal2 = Convert.ToUInt32(objVal, null);
+ if (ulongVal1 != 0 || ulongVal2 != 0)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The object does not implement IConvertible");
+ try
+ {
+ TestClass1 objVal = new TestClass1();
+ ulong ulongVal = Convert.ToUInt64(objVal, null);
+ TestLibrary.TestFramework.LogError("N001", "The object does not implement IConvertible but not throw exception");
+ retVal = false;
+ }
+ catch (InvalidCastException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestClass
+ public class TestClass1 { }
+ public class TestIFormat : IFormatProvider
+ {
+ public bool IsUInt64MaxValue = true;
+ public object GetFormat(Type argType)
+ {
+ if (argType == typeof(TestIFormat))
+ return this;
+ else
+ return null;
+ }
+ }
+ public class TestClass2 : IConvertible
+ {
+ public TypeCode GetTypeCode()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public bool ToBoolean(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public byte ToByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public char ToChar(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public DateTime ToDateTime(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public decimal ToDecimal(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public double ToDouble(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public short ToInt16(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public int ToInt32(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public long ToInt64(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public sbyte ToSByte(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public float ToSingle(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public string ToString(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public object ToType(Type conversionType, IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public ushort ToUInt16(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public uint ToUInt32(IFormatProvider provider)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ public ulong ToUInt64(IFormatProvider provider)
+ {
+ bool IsUInt64MinValue = true;
+ if (provider != null)
+ {
+ TestIFormat iformat = (TestIFormat)provider.GetFormat(typeof(TestIFormat));
+ if (iformat != null && iformat.IsUInt64MaxValue)
+ {
+ IsUInt64MinValue = false;
+ }
+ }
+ if (IsUInt64MinValue)
+ {
+ return UInt64.MinValue;
+ }
+ else
+ {
+ return UInt64.MaxValue;
+ }
+ }
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint6416.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint6416.cs
new file mode 100644
index 0000000000..7cb2e55c7c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint6416.cs
@@ -0,0 +1,252 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt64(String)
+/// </summary>
+public class ConvertToUInt6416
+{
+ public static int Main()
+ {
+ ConvertToUInt6416 convertToUInt6416 = new ConvertToUInt6416();
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt6416");
+ if (convertToUInt6416.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt64 from string 1");
+ try
+ {
+ string strVal = UInt64.MaxValue.ToString();
+ ulong ulongVal = Convert.ToUInt64(strVal);
+ if (ulongVal != UInt64.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt64 from string 2");
+ try
+ {
+ string strVal = UInt64.MinValue.ToString();
+ ulong ulongVal = Convert.ToUInt64(strVal);
+ if (ulongVal != UInt64.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt64 from string 3");
+ try
+ {
+ string strVal = "-" + UInt64.MinValue.ToString();
+ ulong ulongVal = Convert.ToUInt64(strVal);
+ if (ulongVal != UInt64.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert to UInt64 from string 4");
+ try
+ {
+ ulong sourceVal = (ulong)TestLibrary.Generator.GetInt64(-55);
+ string strVal = "+" + sourceVal.ToString();
+ ulong ulongVal = Convert.ToUInt64(strVal);
+ if (ulongVal != sourceVal)
+ {
+ TestLibrary.TestFramework.LogError("007", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Convert to UInt64 from string 5");
+ try
+ {
+ string strVal = null;
+ ulong ulongVal = Convert.ToUInt64(strVal);
+ if (ulongVal != 0)
+ {
+ TestLibrary.TestFramework.LogError("009", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the string represents a number less than MinValue");
+ try
+ {
+ int intVal = this.GetInt32(1, Int32.MaxValue);
+ string strVal = "-" + intVal.ToString();
+ ulong ulongVal = Convert.ToUInt64(strVal);
+ TestLibrary.TestFramework.LogError("N001", "the string represents a number less than MinValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the string represents a number greater than MaxValue");
+ try
+ {
+ string strVal = "18446744073709551616";
+ ulong ulongVal = Convert.ToUInt64(strVal);
+ TestLibrary.TestFramework.LogError("N003", "the string represents a number greater than MaxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: the string does not consist of an optional sign followed by a sequence of digits ");
+ try
+ {
+ string strVal = "helloworld";
+ ulong ulongVal = Convert.ToUInt64(strVal);
+ TestLibrary.TestFramework.LogError("N005", "the string does not consist of an optional sign followed by a sequence of digits but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: the string is empty string");
+ try
+ {
+ string strVal = string.Empty;
+ ulong ulongVal = Convert.ToUInt64(strVal);
+ TestLibrary.TestFramework.LogError("N007", "the string is empty string but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint6417.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint6417.cs
new file mode 100644
index 0000000000..5da472ac84
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint6417.cs
@@ -0,0 +1,277 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// ConvertToUInt16(String,IFormatProvider)
+/// </summary>
+public class ConvertToUInt6417
+{
+ public static int Main()
+ {
+ ConvertToUInt6417 convertToUInt6417 = new ConvertToUInt6417();
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt6417");
+ if (convertToUInt6417.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt64 from string 1");
+ try
+ {
+ string strVal = UInt64.MaxValue.ToString();
+ ulong ulongVal = Convert.ToUInt64(strVal, null);
+ if (ulongVal != UInt64.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt64 from string 2");
+ try
+ {
+ string strVal = UInt64.MaxValue.ToString();
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ ulong ulongVal = Convert.ToUInt64(strVal, provider);
+ if (ulongVal != UInt64.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt64 from string 3");
+ try
+ {
+ string strVal = UInt64.MinValue.ToString();
+ ulong ulongVal = Convert.ToUInt64(strVal, null);
+ if (ulongVal != UInt64.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert to UInt64 from string 4");
+ try
+ {
+ string strVal = "-" + UInt64.MinValue.ToString();
+ ulong ulongVal = Convert.ToUInt64(strVal, null);
+ if (ulongVal != UInt64.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("007", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Convert to UInt64 from string 5");
+ try
+ {
+ ulong sourceVal = (UInt64)TestLibrary.Generator.GetInt64(-55);
+ string strVal = "+" + sourceVal.ToString();
+ ulong ulongVal = Convert.ToUInt64(strVal, null);
+ if (ulongVal != sourceVal)
+ {
+ TestLibrary.TestFramework.LogError("009", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Convert to UInt64 from string 6");
+ try
+ {
+ string strVal = null;
+ ulong ulongVal = Convert.ToUInt64(strVal, null);
+ if (ulongVal != 0)
+ {
+ TestLibrary.TestFramework.LogError("011", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the string represents a number less than MinValue");
+ try
+ {
+ int intVal = this.GetInt32(1, Int32.MaxValue);
+ string strVal = "-" + intVal.ToString();
+ ulong ulongVal = Convert.ToUInt64(strVal, null);
+ TestLibrary.TestFramework.LogError("N001", "the string represents a number less than MinValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the string represents a number greater than MaxValue");
+ try
+ {
+ string strVal = UInt64.MaxValue.ToString() + "1";
+ ulong ulongVal = Convert.ToUInt64(strVal, null);
+ TestLibrary.TestFramework.LogError("N003", "the string represents a number greater than MaxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: the string does not consist of an optional sign followed by a sequence of digits ");
+ try
+ {
+ string strVal = "helloworld";
+ ulong ulongVal = Convert.ToUInt64(strVal, null);
+ TestLibrary.TestFramework.LogError("N005", "the string does not consist of an optional sign followed by a sequence of digits but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: the string is empty string");
+ try
+ {
+ string strVal = string.Empty;
+ ulong ulongVal = Convert.ToUInt64(strVal, null);
+ TestLibrary.TestFramework.LogError("N007", "the string is empty string but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint6418.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint6418.cs
new file mode 100644
index 0000000000..c893cac30e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint6418.cs
@@ -0,0 +1,320 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt64(String,Int32)
+/// </summary>
+public class ConvertToUInt6418
+{
+ public static int Main()
+ {
+ ConvertToUInt6418 convertToUInt6418 = new ConvertToUInt6418();
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt6418");
+ if (convertToUInt6418.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt64 from string 1");
+ try
+ {
+ string strVal = "1111";
+ ulong ulongVal1 = Convert.ToUInt64(strVal, 2);
+ ulong ulongVal2 = Convert.ToUInt64(strVal, 8);
+ ulong ulongVal3 = Convert.ToUInt64(strVal, 10);
+ ulong ulongVal4 = Convert.ToUInt64(strVal, 16);
+ if (ulongVal1 != (UInt64)(1 * Math.Pow(2, 3) + 1 * Math.Pow(2, 2) + 1 * Math.Pow(2, 1) + 1 * Math.Pow(2, 0)) ||
+ ulongVal2 != (UInt64)(1 * Math.Pow(8, 3) + 1 * Math.Pow(8, 2) + 1 * Math.Pow(8, 1) + 1 * Math.Pow(8, 0)) ||
+ ulongVal3 != (UInt64)(1 * Math.Pow(10, 3) + 1 * Math.Pow(10, 2) + 1 * Math.Pow(10, 1) + 1 * Math.Pow(10, 0)) ||
+ ulongVal4 != (UInt64)(1 * Math.Pow(16, 3) + 1 * Math.Pow(16, 2) + 1 * Math.Pow(16, 1) + 1 * Math.Pow(16, 0))
+ )
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt64 from string 2");
+ try
+ {
+ ulong sourceVal = (UInt64)TestLibrary.Generator.GetInt64(-55);
+ string strVal = "+" + sourceVal.ToString();
+ ulong ulongVal = Convert.ToUInt64(strVal, 10);
+ if (ulongVal != sourceVal)
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt64 from string 3");
+ try
+ {
+ string strVal = null;
+ ulong ulongVal1 = Convert.ToUInt64(strVal, 2);
+ ulong ulongVal2 = Convert.ToUInt64(strVal, 8);
+ ulong ulongVal3 = Convert.ToUInt64(strVal, 10);
+ ulong ulongVal4 = Convert.ToUInt64(strVal, 16);
+ if (ulongVal1 != 0 || ulongVal2 != 0 || ulongVal3 != 0 || ulongVal4 != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert to UInt64 from string 4");
+ try
+ {
+ string strVal = "0xff";
+ ulong ulongVal = Convert.ToUInt64(strVal, 16);
+ if (ulongVal != (UInt64)(15 * Math.Pow(16, 1) + 15 * Math.Pow(16, 0)))
+ {
+ TestLibrary.TestFramework.LogError("007", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the parameter of fromBase is not 2, 8, 10, or 16");
+ try
+ {
+ string strVal = "1111";
+ ulong ulongVal = Convert.ToUInt64(strVal, 100);
+ TestLibrary.TestFramework.LogError("N001", "the parameter of fromBase is not 2, 8, 10, or 16 but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the string represents a non-base 10 signed number and is prefixed with a negative sign");
+ try
+ {
+ string strVal = "-0";
+ ulong ulongVal = Convert.ToUInt64(strVal, 2);
+ TestLibrary.TestFramework.LogError("N003", "the string represents a non-base 10 signed number and is prefixed with a negative sign but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: the string contains a character that is not a valid digit in the base specified by fromBase param 1");
+ try
+ {
+ string strVal = "1234";
+ ulong ulongVal = Convert.ToUInt64(strVal, 2);
+ TestLibrary.TestFramework.LogError("N005", "the string contains a character that is not a valid digit in the base specified by fromBase param but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: the string contains a character that is not a valid digit in the base specified by fromBase param 2");
+ try
+ {
+ string strVal = "9999";
+ ulong ulongVal = Convert.ToUInt64(strVal, 8);
+ TestLibrary.TestFramework.LogError("N007", "the string contains a character that is not a valid digit in the base specified by fromBase param but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest5: the string contains a character that is not a valid digit in the base specified by fromBase param 3");
+ try
+ {
+ string strVal = "abcd";
+ ulong ulongVal = Convert.ToUInt64(strVal, 10);
+ TestLibrary.TestFramework.LogError("N009", "the string contains a character that is not a valid digit in the base specified by fromBase param but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest6: the string contains a character that is not a valid digit in the base specified by fromBase param 4");
+ try
+ {
+ string strVal = "gh";
+ ulong ulongVal = Convert.ToUInt64(strVal, 16);
+ TestLibrary.TestFramework.LogError("N011", "the string contains a character that is not a valid digit in the base specified by fromBase param but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N012", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest7: the string represents base 10 number is less than UInt64.minValue");
+ try
+ {
+ int intVal = this.GetInt32(1, Int32.MaxValue);
+ string strVal = "-" + intVal.ToString();
+ ulong ulongVal = Convert.ToUInt64(strVal, 10);
+ TestLibrary.TestFramework.LogError("N013", "the string represent base 10 number is less than UInt64.minValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N014", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest8()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest8: the string represents base 10 number is greater than UInt64.maxValue");
+ try
+ {
+ string strVal = UInt64.MaxValue.ToString() + "1";
+ ulong ulongVal = Convert.ToUInt64(strVal, 10);
+ TestLibrary.TestFramework.LogError("N015", "the string represent base 10 number is greater than UInt64.maxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N016", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint642.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint642.cs
new file mode 100644
index 0000000000..8a4b92421a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint642.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt64(Byte)
+/// </summary>
+public class ConvertToUInt642
+{
+ public static int Main()
+ {
+ ConvertToUInt642 convertToUInt642 = new ConvertToUInt642();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt642");
+ if (convertToUInt642.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt64 from Byte 1");
+ try
+ {
+ byte byteVal = byte.MaxValue;
+ ulong ulongVal = Convert.ToUInt64(byteVal);
+ if (ulongVal != (ulong)(byteVal))
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt64 from Byte 2");
+ try
+ {
+ byte byteVal = byte.MinValue;
+ ulong ulongVal = Convert.ToUInt64(byteVal);
+ if (ulongVal != (ulong)(byteVal))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt64 from Byte 3");
+ try
+ {
+ byte byteVal = TestLibrary.Generator.GetByte(-55);
+ ulong ulongVal = Convert.ToUInt64(byteVal);
+ if (ulongVal != (ulong)(byteVal))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint643.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint643.cs
new file mode 100644
index 0000000000..14f15b4e2b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint643.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt64(Char)
+/// </summary>
+public class ConvertToUInt643
+{
+ public static int Main()
+ {
+ ConvertToUInt643 convertToUInt643 = new ConvertToUInt643();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt643");
+ if (convertToUInt643.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt64 from Char 1");
+ try
+ {
+ char charVal = char.MaxValue;
+ ulong ulongVal = Convert.ToUInt64(charVal);
+ if (ulongVal != (ulong)(charVal))
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt64 from Char 2");
+ try
+ {
+ char charVal = char.MinValue;
+ ulong ulongVal = Convert.ToUInt64(charVal);
+ if (ulongVal != (ulong)(charVal))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt64 from Char 3");
+ try
+ {
+ char charVal = TestLibrary.Generator.GetChar(-55);
+ ulong ulongVal = Convert.ToUInt64(charVal);
+ if (ulongVal != (ulong)(charVal))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint644.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint644.cs
new file mode 100644
index 0000000000..1709ad6a37
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint644.cs
@@ -0,0 +1,124 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt64(UInt16)
+/// </summary>
+public class ConvertToUInt644
+{
+ public static int Main()
+ {
+ ConvertToUInt644 convertToUInt644 = new ConvertToUInt644();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt644");
+ if (convertToUInt644.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt64 from UInt16 1");
+ try
+ {
+ UInt16 UInt16Val = UInt16.MaxValue;
+ ulong ulongVal = Convert.ToUInt64(UInt16Val);
+ if (ulongVal != (ulong)UInt16Val)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt64 from UInt16 2");
+ try
+ {
+ UInt16 UInt16Val = UInt16.MinValue;
+ ulong ulongVal = Convert.ToUInt64(UInt16Val);
+ if (ulongVal != (ulong)UInt16Val)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt64 from UInt16 3");
+ try
+ {
+ UInt16 UInt16Val = (UInt16)(this.GetInt32(0, (int)UInt16.MaxValue));
+ ulong ulongVal = Convert.ToUInt64(UInt16Val);
+ if (ulongVal != (ulong)UInt16Val)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint645.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint645.cs
new file mode 100644
index 0000000000..1debef136e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint645.cs
@@ -0,0 +1,124 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt64(UInt32)
+/// </summary>
+public class ConvertToUInt645
+{
+ public static int Main()
+ {
+ ConvertToUInt645 convertToUInt645 = new ConvertToUInt645();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt645");
+ if (convertToUInt645.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt64 from UInt32 1");
+ try
+ {
+ UInt32 UInt32Val = UInt32.MaxValue;
+ ulong ulongVal = Convert.ToUInt64(UInt32Val);
+ if (ulongVal != (ulong)UInt32Val)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt64 from UInt32 2");
+ try
+ {
+ UInt32 UInt32Val = UInt32.MinValue;
+ ulong ulongVal = Convert.ToUInt64(UInt32Val);
+ if (ulongVal != (ulong)UInt32Val)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt64 from UInt32 3");
+ try
+ {
+ UInt32 UInt32Val = (UInt32)(this.GetInt32(0, Int32.MaxValue)) + (UInt32)(this.GetInt32(0, Int32.MaxValue));
+ ulong ulongVal = Convert.ToUInt64(UInt32Val);
+ if (ulongVal != (ulong)UInt32Val)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint646.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint646.cs
new file mode 100644
index 0000000000..3faa709758
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint646.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt64(UInt64)
+/// </summary>
+public class ConvertToUInt646
+{
+ public static int Main()
+ {
+ ConvertToUInt646 convertToUInt646 = new ConvertToUInt646();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt646");
+ if (convertToUInt646.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt64 from UInt64 1");
+ try
+ {
+ ulong UInt64Val = UInt64.MaxValue;
+ ulong ulongVal = Convert.ToUInt64(UInt64Val);
+ if (ulongVal != UInt64Val)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt64 from UInt64 2");
+ try
+ {
+ ulong UInt64Val = UInt64.MinValue;
+ ulong ulongVal = Convert.ToUInt64(UInt64Val);
+ if (ulongVal != UInt64Val)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint647.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint647.cs
new file mode 100644
index 0000000000..bf0eb4352a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint647.cs
@@ -0,0 +1,167 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt64(Decimal)
+/// </summary>
+public class ConvertToUInt647
+{
+ public static int Main()
+ {
+ ConvertToUInt647 convertToUInt647 = new ConvertToUInt647();
+
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt647");
+ if (convertToUInt647.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt64 from Decimal 1");
+ try
+ {
+ decimal decimalVal = (decimal)(UInt64.MaxValue);
+ ulong ulongVal = Convert.ToUInt64(decimalVal);
+ if (ulongVal != UInt64.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt64 from Decimal 2");
+ try
+ {
+ decimal decimalVal = (decimal)(UInt64.MinValue);
+ ulong ulongVal = Convert.ToUInt64(decimalVal);
+ if (ulongVal != UInt64.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt64 from Decimal 3");
+ try
+ {
+ decimal decimalVal = (decimal)TestLibrary.Generator.GetInt64(-55) + (decimal)TestLibrary.Generator.GetInt64(-55);
+ ulong ulongVal = Convert.ToUInt64(decimalVal);
+ if (ulongVal != (ulong)(decimalVal))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the decimal is larger than UInt64 maxValue");
+ try
+ {
+ decimal decimalVal = (decimal)UInt64.MaxValue + (decimal)(this.GetInt32(1, Int32.MaxValue));
+ ulong ulongVal = Convert.ToUInt64(decimalVal);
+ TestLibrary.TestFramework.LogError("N001", "the decimal is larger than UInt64 maxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the decimal is less than UInt64 minValue");
+ try
+ {
+ decimal decimalVal = (decimal)(this.GetInt32(1, Int32.MaxValue) * (-1));
+ ulong ulongVal = Convert.ToUInt64(decimalVal);
+ TestLibrary.TestFramework.LogError("N003", "the decimal is less than UInt64 minValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint648.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint648.cs
new file mode 100644
index 0000000000..9a2a57bd9e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint648.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt64(Double)
+/// </summary>
+public class ConvertToUInt648
+{
+ public static int Main()
+ {
+ ConvertToUInt648 convertToUInt648 = new ConvertToUInt648();
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt648");
+ if (convertToUInt648.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt64 from double 1");
+ try
+ {
+ double doubleVal = (double)(Int64.MaxValue);
+ ulong ulongVal = Convert.ToUInt64(doubleVal);
+ if (ulongVal != (ulong)Int64.MaxValue + 1)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt64 from double 2");
+ try
+ {
+ double doubleVal = (double)(UInt64.MinValue);
+ ulong ulongVal = Convert.ToUInt32(doubleVal);
+ if (ulongVal != UInt64.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert to UInt64 from double 3");
+ try
+ {
+ double doubleVal = (double)TestLibrary.Generator.GetInt64(-55) + (double)TestLibrary.Generator.GetInt64(-55);
+ ulong ulongVal = Convert.ToUInt64(doubleVal);
+ if (ulongVal != (ulong)(doubleVal))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the double is larger than UInt64 maxValue");
+ try
+ {
+ double doubleVal = (double)UInt64.MaxValue + (double)(this.GetInt32(0, Int32.MaxValue));
+ ulong ulongVal = Convert.ToUInt64(doubleVal);
+ TestLibrary.TestFramework.LogError("N001", "the double is larger than UInt64 maxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the double is less than UInt64 minValue");
+ try
+ {
+ double doubleVal = (double)(this.GetInt32(1, Int32.MaxValue) * (-1));
+ ulong ulongVal = Convert.ToUInt64(doubleVal);
+ TestLibrary.TestFramework.LogError("N003", "the double is less than UInt64 minValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/convert/converttouint649.cs b/tests/src/CoreMangLib/cti/system/convert/converttouint649.cs
new file mode 100644
index 0000000000..b98af4e404
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/convert/converttouint649.cs
@@ -0,0 +1,124 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Convert.ToUInt64(Int16)
+/// </summary>
+public class ConvertToUInt649
+{
+ public static int Main()
+ {
+ ConvertToUInt649 convertToUInt649 = new ConvertToUInt649();
+ TestLibrary.TestFramework.BeginTestCase("ConvertToUInt649");
+ if (convertToUInt649.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert to UInt64 from int16 1");
+ try
+ {
+ Int16 Int16Val = Int16.MaxValue;
+ ulong ulongVal = Convert.ToUInt64(Int16Val);
+ if (ulongVal != (ulong)Int16Val)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert to UInt64 from int16 2");
+ try
+ {
+ Int16 Int16Val = (Int16)this.GetInt32(0, (int)Int16.MaxValue);
+ ulong ulongVal = Convert.ToUInt64(Int16Val);
+ if (ulongVal != (ulong)Int16Val)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the int16 is less than UInt64 minValue");
+ try
+ {
+ Int16 Int16Val = (Int16)(this.GetInt32(1, (int)Int16.MaxValue + 2) * (-1));
+ ulong ulongVal = Convert.ToUInt64(Int16Val);
+ TestLibrary.TestFramework.LogError("N001", "the int16 is less than UInt64 minValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeCompare.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeCompare.csproj
new file mode 100644
index 0000000000..fc59c167fe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeCompare.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimecompare.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeCompareTo1.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeCompareTo1.csproj
new file mode 100644
index 0000000000..93ba3ddb4a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeCompareTo1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimecompareto1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeCtor1.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeCtor1.csproj
new file mode 100644
index 0000000000..ec41ab4408
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimector1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeCtor3.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeCtor3.csproj
new file mode 100644
index 0000000000..7b149234e7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimector3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeCtor4.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeCtor4.csproj
new file mode 100644
index 0000000000..54149adfc8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeCtor4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimector4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeCtor6.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeCtor6.csproj
new file mode 100644
index 0000000000..cda720830e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeCtor6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimector6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeCtor7.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeCtor7.csproj
new file mode 100644
index 0000000000..655768292a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeCtor7.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimector7.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeDate.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeDate.csproj
new file mode 100644
index 0000000000..369a383c6c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeDate.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimedate.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeGetHashCode.csproj
new file mode 100644
index 0000000000..4096884fd3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimegethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeHour.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeHour.csproj
new file mode 100644
index 0000000000..8546ca6d70
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeHour.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimehour.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeKind.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeKind.csproj
new file mode 100644
index 0000000000..069fff57c6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeKind.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimekind.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeMaxValue.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeMaxValue.csproj
new file mode 100644
index 0000000000..c588f8ce0b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeMaxValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimemaxvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeMillisecond.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeMillisecond.csproj
new file mode 100644
index 0000000000..25fde7941b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeMillisecond.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimemillisecond.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeMinValue.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeMinValue.csproj
new file mode 100644
index 0000000000..060e586ee9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeMinValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimeminvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeMinute.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeMinute.csproj
new file mode 100644
index 0000000000..ec37820d25
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeMinute.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimeminute.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeNow.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeNow.csproj
new file mode 100644
index 0000000000..bfc039f80f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeNow.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimenow.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeParse1.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeParse1.csproj
new file mode 100644
index 0000000000..5a3249701c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeParse1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimeparse1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeParse2.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeParse2.csproj
new file mode 100644
index 0000000000..1126dcdef5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeParse2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimeparse2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeParse3.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeParse3.csproj
new file mode 100644
index 0000000000..007ac1ba58
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeParse3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimeparse3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeParseExact1.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeParseExact1.csproj
new file mode 100644
index 0000000000..1c62be7593
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeParseExact1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimeparseexact1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeParseExact2.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeParseExact2.csproj
new file mode 100644
index 0000000000..d08a7742f1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeParseExact2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimeparseexact2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeParseExact3.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeParseExact3.csproj
new file mode 100644
index 0000000000..5df4c9f572
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeParseExact3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimeparseexact3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeSecond.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeSecond.csproj
new file mode 100644
index 0000000000..347cae3ff9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeSecond.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimesecond.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeSubtract1.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeSubtract1.csproj
new file mode 100644
index 0000000000..6c421e788b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeSubtract1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimesubtract1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeSubtract2.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeSubtract2.csproj
new file mode 100644
index 0000000000..eb699f4bdc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeSubtract2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimesubtract2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeTicks.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeTicks.csproj
new file mode 100644
index 0000000000..015a0c089a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeTicks.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimeticks.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeTimeOfDay.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeTimeOfDay.csproj
new file mode 100644
index 0000000000..a4272cbf1e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeTimeOfDay.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimetimeofday.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeToFileTime.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeToFileTime.csproj
new file mode 100644
index 0000000000..7d0ba1bbe2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeToFileTime.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimetofiletime.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeToFileTimeUtc.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeToFileTimeUtc.csproj
new file mode 100644
index 0000000000..3fbd0d2c38
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeToFileTimeUtc.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimetofiletimeutc.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeToLocalTime.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeToLocalTime.csproj
new file mode 100644
index 0000000000..a26bc57f46
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeToLocalTime.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimetolocaltime.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeToString1.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeToString1.csproj
new file mode 100644
index 0000000000..b16d7d324e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeToString1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimetostring1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeToString2.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeToString2.csproj
new file mode 100644
index 0000000000..3d5b4700d7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeToString2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimetostring2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeToString3.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeToString3.csproj
new file mode 100644
index 0000000000..30ebd40cf2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeToString3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimetostring3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimeUtcNow.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimeUtcNow.csproj
new file mode 100644
index 0000000000..4ba6627610
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimeUtcNow.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimeutcnow.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/DateTimetoday.csproj b/tests/src/CoreMangLib/cti/system/datetime/DateTimetoday.csproj
new file mode 100644
index 0000000000..0b8f18605b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/DateTimetoday.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimetoday.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/cfdatetimetools.cs b/tests/src/CoreMangLib/cti/system/datetime/cfdatetimetools.cs
new file mode 100644
index 0000000000..0d7c8653f2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/cfdatetimetools.cs
@@ -0,0 +1,142 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using TestLibrary;
+using System.Runtime.InteropServices;
+
+// utility functions for accessing DateTime functions in CoreFoundation for validation purposes
+
+// Important Notes:
+// CF reference types are passed as IntPtrs. In the declarations, the actual type name is given within C-style comments:
+// IntPtr /* CFTypeRef */ tr
+// many function signatures contain an allocator of type CFAllocatorRef. To use the default allocator pass in IntPtr.Zero.
+
+public class CFDateTimeTools
+{
+
+ // Basic tools (should be factored out eventually, as not DateTime-specific)
+ [DllImport("/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreFoundation.framework/Versions/Current/CoreFoundation")]
+ protected static extern string CFStringGetCStringPtr(IntPtr /* CFStringRef */ theString, CFStringEncoding encoding);
+
+ public enum CFStringEncoding : uint
+ {
+ kCFStringEncodingMacRoman = 0,
+ kCFStringEncodingWindowsLatin1 = 0x0500,
+ kCFStringEncodingISOLatin1 = 0x0201,
+ kCFStringEncodingNextStepLatin = 0x0B01,
+ kCFStringEncodingASCII = 0x0600,
+ kCFStringEncodingUnicode = 0x0100,
+ kCFStringEncodingUTF8 = 0x08000100,
+ kCFStringEncodingNonLossyASCII = 0x0BFF,
+
+ // The following constants are available
+ // only on Mac OS X v10.4 and later,
+ kCFStringEncodingUTF16 = 0x0100,
+ kCFStringEncodingUTF16BE = 0x10000100,
+ kCFStringEncodingUTF16LE = 0x14000100,
+ kCFStringEncodingUTF32 = 0x0c000100,
+ kCFStringEncodingUTF32BE = 0x18000100,
+ kCFStringEncodingUTF32LE = 0x1c000100
+ }
+ [DllImport("/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreFoundation.framework/Versions/Current/CoreFoundation")]
+ protected static extern IntPtr /* CFStringRef */ CFStringCreateWithCString(IntPtr /* CFAllocatorRef */ alloc,
+ string cStr,
+ CFStringEncoding encoding);
+
+
+ [System.Security.SecuritySafeCritical]
+ public static string CFStringToSystemString(IntPtr /* CFStringRef */ theString)
+ {
+ return CFStringGetCStringPtr(theString, CFStringEncoding.kCFStringEncodingMacRoman);
+ }
+
+ [System.Security.SecuritySafeCritical]
+ public static IntPtr /* CFStringRef */ SystemStringToCFString(string theString)
+ {
+ return CFStringCreateWithCString(IntPtr.Zero, theString, CFStringEncoding.kCFStringEncodingMacRoman);
+ }
+
+ [System.Security.SecuritySafeCritical]
+ public static string GetOSFormattedDate(DateTime d, bool getLocale)
+ {
+ IntPtr cfDateRef = CFDateTimeTools.DateTimeToCFDateRef(d);
+ IntPtr cfLocaleRef = (getLocale ? CFDateTimeTools.CFLocaleCopyCurrent() : IntPtr.Zero);
+ IntPtr cfDateFmtr = CFDateFormatterCreate(IntPtr.Zero, cfLocaleRef,
+ CFDateFormatterStyle.kCFDateFormatterLongStyle,
+ CFDateFormatterStyle.kCFDateFormatterLongStyle); // 3 for long style
+
+ IntPtr cfStr = CFDateFormatterCreateStringWithDate(IntPtr.Zero, cfDateFmtr, cfDateRef);
+ return CFStringToSystemString(cfStr);
+ }
+
+ /// CFLocale
+ /// --------
+
+ [DllImport("/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreFoundation.framework/Versions/Current/CoreFoundation")]
+ public static extern IntPtr /* CFLocaleRef */ CFLocaleCopyCurrent();
+
+ /// CFDate tools
+ /// ------------
+
+ [DllImport("/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreFoundation.framework/Versions/Current/CoreFoundation")]
+ public static extern /* CFDateRef */ IntPtr CFDateCreate(IntPtr /* CFAllocatorRef */ allocator,
+ double /* CFAbsoluteTime */ at);
+
+ // convert between CLR DateTime and CoreFoundation CFAbsoluteTime (== double) and CFDateRef types
+ private static DateTime CFAbsoluteTimeZero = new DateTime(2001, 1, 1, 0, 0, 0, DateTimeKind.Utc);
+
+ public static double DateTimeToCFAbsoluteTime(DateTime d)
+ {
+ return d.Subtract(CFAbsoluteTimeZero).TotalSeconds;
+ }
+
+ [System.Security.SecuritySafeCritical]
+ public static IntPtr /* CFDateRef */ DateTimeToCFDateRef(DateTime d)
+ {
+ return CFDateCreate(IntPtr.Zero,
+ DateTimeToCFAbsoluteTime(d));
+ }
+
+
+ /// CFDateTimeFormatter
+ /// -------------------
+
+ public enum CFDateFormatterStyle : int
+ {
+ kCFDateFormatterNoStyle = 0,
+ kCFDateFormatterShortStyle = 1,
+ kCFDateFormatterMediumStyle = 2,
+ kCFDateFormatterLongStyle = 3,
+ kCFDateFormatterFullStyle = 4
+ };
+
+
+ [DllImport("/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreFoundation.framework/Versions/Current/CoreFoundation")]
+ public static extern IntPtr /* CFDateFormatterRef */ CFDateFormatterCreate(IntPtr /* CFAllocatorRef */ alloc,
+ IntPtr /* CFLocaleRef */ locale, CFDateFormatterStyle dateStyle, CFDateFormatterStyle timeStyle);
+
+
+ [DllImport("/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreFoundation.framework/Versions/Current/CoreFoundation")]
+ public static extern /* CFStringRef */ IntPtr CFDateFormatterCreateStringWithDate(IntPtr /* CFAllocatorRef */ alloc,
+ IntPtr /* CFDateFormatterRef */ formatter, IntPtr /* CFDateRef */ date);
+
+ /// CFTimeZone
+ /// -----------
+
+ [DllImport("/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreFoundation.framework/Versions/Current/CoreFoundation")]
+ public extern static IntPtr /* CFTimeZoneRef */ CFTimeZoneCopySystem();
+
+ [DllImport("/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreFoundation.framework/Versions/Current/CoreFoundation")]
+ public extern static IntPtr /* CFStringRef */ CFTimeZoneGetName(IntPtr /* CFTimeZoneRef */ tz);
+
+ [System.Security.SecuritySafeCritical]
+ public static string GetOSTimeZoneName(IntPtr /* CFTimeZoneRef */ tz)
+ {
+ return CFStringToSystemString(CFTimeZoneGetName(tz));
+ }
+
+ [DllImport("/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreFoundation.framework/Versions/Current/CoreFoundation")]
+ public extern static bool CFTimeZoneIsDaylightSavingTime(IntPtr /* CFTimeZoneRef */ tz,
+ double /* CFAbsoluteTime */ at);
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimecompare.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimecompare.cs
new file mode 100644
index 0000000000..088f8b2932
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimecompare.cs
@@ -0,0 +1,250 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Compare(System.DateTime,System.DateTime)
+/// </summary>
+public class DateTimeCompare
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Compare a datetime instance with itself");
+
+ try
+ {
+ DateTime t1 = new DateTime(2006, 9, 21, 10, 54, 56, 888);
+
+ if (DateTime.Compare(t1, t1) != 0)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Compare a datetime instance with itself does not return 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Compare a datetime instance with a datetime instance less than it");
+
+ try
+ {
+ DateTime t1 = new DateTime(2006, 9, 21, 10, 54, 56, 888);
+ DateTime t2 = new DateTime(2006, 9, 21, 10, 54, 56, 887);
+
+ if (DateTime.Compare(t1, t2) <= 0)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Compare a datetime instance with a datetime instance less than it does not greater than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2006, 9, 21, 10, 54, 55, 888);
+
+ if (DateTime.Compare(t1, t2) <= 0)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Compare a datetime instance with a datetime instance less than it does not greater than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2006, 9, 21, 10, 53, 56, 888);
+
+ if (DateTime.Compare(t1, t2) <= 0)
+ {
+ TestLibrary.TestFramework.LogError("002.3", "Compare a datetime instance with a datetime instance less than it does not greater than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2006, 9, 21, 9, 54, 56, 888);
+
+ if (DateTime.Compare(t1, t2) <= 0)
+ {
+ TestLibrary.TestFramework.LogError("002.4", "Compare a datetime instance with a datetime instance less than it does not greater than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2006, 9, 20, 10, 54, 56, 888);
+
+ if (DateTime.Compare(t1, t2) <= 0)
+ {
+ TestLibrary.TestFramework.LogError("002.5", "Compare a datetime instance with a datetime instance less than it does not greater than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2006, 8, 21, 10, 54, 56, 888);
+
+ if (DateTime.Compare(t1, t2) <= 0)
+ {
+ TestLibrary.TestFramework.LogError("002.6", "Compare a datetime instance with a datetime instance less than it does not greater than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2005, 9, 21, 10, 54, 56, 888);
+
+ if (DateTime.Compare(t1, t2) <= 0)
+ {
+ TestLibrary.TestFramework.LogError("002.7", "Compare a datetime instance with a datetime instance less than it does not greater than 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Compare a datetime instance equal to it");
+
+ try
+ {
+ DateTime t1 = new DateTime(2006, 9, 21, 10, 54, 56, 888);
+ DateTime t2 = new DateTime(2006, 9, 21, 10, 54, 56, 888);
+
+ if (DateTime.Compare(t1, t2) != 0)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Compare a datetime instance equal to it does not return 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Compare a datetime instance with a datetime instance greater than it");
+
+ try
+ {
+ DateTime t1 = new DateTime(2006, 9, 21, 10, 54, 56, 888);
+ DateTime t2 = new DateTime(2006, 9, 21, 10, 54, 56, 889);
+
+ if (DateTime.Compare(t1, t2) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Compare a datetime instance with a datetime instance greater than it does not less than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2006, 9, 21, 10, 54, 57, 888);
+
+ if (DateTime.Compare(t1, t2) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Compare a datetime instance with a datetime instance greater than it does not less than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2006, 9, 21, 10, 55, 56, 888);
+
+ if (DateTime.Compare(t1, t2) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Compare a datetime instance with a datetime instance greater than it does not less than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2006, 9, 21, 11, 54, 56, 888);
+
+ if (DateTime.Compare(t1, t2) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Compare a datetime instance with a datetime instance greater than it does not less than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2006, 9, 22, 10, 54, 56, 888);
+
+ if (DateTime.Compare(t1, t2) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Compare a datetime instance with a datetime instance greater than it does not less than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2006, 10, 21, 10, 54, 56, 888);
+
+ if (DateTime.Compare(t1, t2) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Compare a datetime instance with a datetime instance greater than it does not less than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2007, 9, 21, 10, 54, 56, 888);
+
+ if (DateTime.Compare(t1, t2) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Compare a datetime instance with a datetime instance greater than it does not less than 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DateTimeCompare test = new DateTimeCompare();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeCompare");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimecompareto1.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimecompareto1.cs
new file mode 100644
index 0000000000..1bb2ca2db2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimecompareto1.cs
@@ -0,0 +1,250 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// CompareTo(System.DateTime)
+/// </summary>
+public class DateTimeCompareTo1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Compare a datetime instance with itself");
+
+ try
+ {
+ DateTime t = new DateTime(2006, 9, 21, 10, 54, 56, 888);
+
+ if (t.CompareTo(t) != 0)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Compare a datetime instance with itself does not return 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Compare a datetime instance with a datetime instance less than it");
+
+ try
+ {
+ DateTime t1 = new DateTime(2006, 9, 21, 10, 54, 56, 888);
+ DateTime t2 = new DateTime(2006, 9, 21, 10, 54, 56, 887);
+
+ if (t1.CompareTo(t2) <= 0)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Compare a datetime instance with a datetime instance less than it does not greater than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2006, 9, 21, 10, 54, 55, 888);
+
+ if (t1.CompareTo(t2) <= 0)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Compare a datetime instance with a datetime instance less than it does not greater than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2006, 9, 21, 10, 53, 56, 888);
+
+ if (t1.CompareTo(t2) <= 0)
+ {
+ TestLibrary.TestFramework.LogError("002.3", "Compare a datetime instance with a datetime instance less than it does not greater than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2006, 9, 21, 9, 54, 56, 888);
+
+ if (t1.CompareTo(t2) <= 0)
+ {
+ TestLibrary.TestFramework.LogError("002.4", "Compare a datetime instance with a datetime instance less than it does not greater than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2006, 9, 20, 10, 54, 56, 888);
+
+ if (t1.CompareTo(t2) <= 0)
+ {
+ TestLibrary.TestFramework.LogError("002.5", "Compare a datetime instance with a datetime instance less than it does not greater than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2006, 8, 21, 10, 54, 56, 888);
+
+ if (t1.CompareTo(t2) <= 0)
+ {
+ TestLibrary.TestFramework.LogError("002.6", "Compare a datetime instance with a datetime instance less than it does not greater than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2005, 9, 21, 10, 54, 56, 888);
+
+ if (t1.CompareTo(t2) <= 0)
+ {
+ TestLibrary.TestFramework.LogError("002.7", "Compare a datetime instance with a datetime instance less than it does not greater than 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Compare a datetime instance equal to it");
+
+ try
+ {
+ DateTime t1 = new DateTime(2006, 9, 21, 10, 54, 56, 888);
+ DateTime t2 = new DateTime(2006, 9, 21, 10, 54, 56, 888);
+
+ if (t1.CompareTo(t2) != 0)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Compare a datetime instance equal to it does not return 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Compare a datetime instance with a datetime instance greater than it");
+
+ try
+ {
+ DateTime t1 = new DateTime(2006, 9, 21, 10, 54, 56, 888);
+ DateTime t2 = new DateTime(2006, 9, 21, 10, 54, 56, 889);
+
+ if (t1.CompareTo(t2) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Compare a datetime instance with a datetime instance greater than it does not less than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2006, 9, 21, 10, 54, 57, 888);
+
+ if (t1.CompareTo(t2) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Compare a datetime instance with a datetime instance greater than it does not less than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2006, 9, 21, 10, 55, 56, 888);
+
+ if (t1.CompareTo(t2) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Compare a datetime instance with a datetime instance greater than it does not less than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2006, 9, 21, 11, 54, 56, 888);
+
+ if (t1.CompareTo(t2) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Compare a datetime instance with a datetime instance greater than it does not less than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2006, 9, 22, 10, 54, 56, 888);
+
+ if (t1.CompareTo(t2) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Compare a datetime instance with a datetime instance greater than it does not less than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2006, 10, 21, 10, 54, 56, 888);
+
+ if (t1.CompareTo(t2) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Compare a datetime instance with a datetime instance greater than it does not less than 0");
+ retVal = false;
+ }
+
+ t2 = new DateTime(2007, 9, 21, 10, 54, 56, 888);
+
+ if (t1.CompareTo(t2) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Compare a datetime instance with a datetime instance greater than it does not less than 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DateTimeCompareTo1 test = new DateTimeCompareTo1();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeCompareTo1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimector1.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimector1.cs
new file mode 100644
index 0000000000..41e4c0c39d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimector1.cs
@@ -0,0 +1,342 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ctor(System.Int32,System.Int32,System.Int32)
+/// </summary>
+public class DateTimeCtor1
+{
+ #region Private Fields
+ private int m_ErrorNo = 0;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: We can call ctor(System.Int32,System.Int32,System.Int32) to constructor a new DateTime instance by using valid value");
+
+ try
+ {
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28);
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: We can call ctor(System.Int32,System.Int32,System.Int32) to constructor a new DateTime instance by using MAX/MIN values");
+
+ try
+ {
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1);
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31);
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31);
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1);
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29);
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28);
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30);
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: We can call ctor(System.Int32,System.Int32,System.Int32) to constructor a new DateTime instance by using correct day/month pair");
+
+ try
+ {
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29);
+ retVal = retVal && VerifyDateTimeHelper(2006, 2, 28);
+ retVal = retVal && VerifyDateTimeHelper(2006, 4, 30);
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentOutOfRangeException should be thrown when year is less than 1 or greater than 9999.");
+
+ try
+ {
+ DateTime value = new DateTime(0, 1, 1);
+
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when year is less than 1");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ DateTime value = new DateTime(10000, 1, 1);
+
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when year is greater than 9999");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentOutOfRangeException should be thrown when month is less than 1 or greater than 12");
+
+ try
+ {
+ DateTime value = new DateTime(2006, 0, 1);
+
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when month is less than 1");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ DateTime value = new DateTime(2006, 13, 1);
+
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when month is greater than 12");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentOutOfRangeException should be thrown when day is less than 1 or greater than the number of days in month");
+
+ try
+ {
+ DateTime value = new DateTime(2006, 1, 0);
+
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when day is less than 1");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ DateTime value = new DateTime(2006, 1, 32);
+
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when day is greater than the number of days in month");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ DateTime value = new DateTime(2006, 2, 29);
+
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when day is greater than the number of days in month");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ DateTime value = new DateTime(2006, 4, 31);
+
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when day is greater than the number of days in month");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DateTimeCtor1 test = new DateTimeCtor1();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeCtor1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerifyDateTimeHelper(int desiredYear, int desiredMonth, int desiredDay)
+ {
+ bool retVal = true;
+
+ DateTime value = new DateTime(desiredYear, desiredMonth, desiredDay);
+ m_ErrorNo++;
+ if ((desiredYear != value.Year) || (desiredMonth != value.Month) || (desiredDay != value.Day))
+ {
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "We can call ctor(System.Int32,System.Int32,System.Int32) to constructor a wrong DateTime instance by using valid value");
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredYear = " + desiredYear.ToString() + ", desiredMonth = " + desiredMonth.ToString() + ", desiredDay = " + desiredDay.ToString() + ", actualYear = " + value.Year.ToString() + ", actualMonth = " + value.Month.ToString() + ", actualDay = " + value.Day.ToString());
+ retVal = false;
+ }
+
+ m_ErrorNo++;
+ if ((value.Hour != 0) || (value.Minute != 0) || (value.Second != 0))
+ {
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "We can call ctor(System.Int32,System.Int32,System.Int32) to constructor a wrong DateTime instance by using valid value");
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredHour = 0, desiredMinute = 0, desiredSecond = 0, actualHour = " + value.Hour.ToString() + ", actualMinute = " + value.Minute.ToString() + ", actualSecond = " + value.Second.ToString());
+ retVal = false;
+ }
+
+ m_ErrorNo++;
+ if (value.Kind != DateTimeKind.Unspecified)
+ {
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "We can call ctor(System.Int32,System.Int32,System.Int32) to constructor a wrong DateTime instance by using valid value");
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredKind = DateTimeKind.Unspecified" + ", actualKind = " + value.Kind.ToString());
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimector3.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimector3.cs
new file mode 100644
index 0000000000..8943fa3f23
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimector3.cs
@@ -0,0 +1,521 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ctor(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)
+/// </summary>
+public class DateTimeCtor3
+{
+ #region Private Fields
+ private int m_ErrorNo = 0;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: We can call ctor to constructor a new DateTime instance by using valid value");
+
+ try
+ {
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28, 16, 7, 43);
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28, 4, 7, 43);
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28, 12, 0, 0);
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28, 12, 56, 56);
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: We can call ctor to constructor a new DateTime instance by using MAX/MIN values");
+
+ try
+ {
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 16, 7, 43);
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 23, 59, 59);
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 0, 0, 0);
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 0, 59, 59);
+
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 16, 7, 43);
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 23, 59, 59);
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 0, 0, 0);
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 0, 59, 59);
+
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 16, 7, 43);
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 23, 59, 59);
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 0, 0, 0);
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 0, 59, 59);
+
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 16, 7, 43);
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 23, 59, 59);
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 0, 0, 0);
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 0, 59, 59);
+
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 16, 7, 43);
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 23, 59, 59);
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 0, 0, 0);
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 0, 59, 59);
+
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 16, 7, 43);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 23, 59, 59);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 0, 0, 0);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 0, 59, 59);
+
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 16, 7, 43);
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 23, 59, 59);
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 0, 0, 0);
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 0, 59, 59);
+
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 16, 7, 43);
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 23, 59, 59);
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 0, 0, 0);
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 0, 59, 59);
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: We can call ctor to constructor a new DateTime instance by using correct day/month pair");
+
+ try
+ {
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 16, 7, 43);
+ retVal = retVal && VerifyDateTimeHelper(2006, 2, 28, 12, 0, 0);
+ retVal = retVal && VerifyDateTimeHelper(2006, 4, 30, 16, 7, 43);
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentOutOfRangeException should be thrown when year is less than 1 or greater than 9999.");
+
+ try
+ {
+ DateTime value = new DateTime(0, 1, 1, 1, 1, 1);
+
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when year is less than 1");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ DateTime value = new DateTime(10000, 1, 1, 1, 1, 1);
+
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when year is greater than 9999");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentOutOfRangeException should be thrown when month is less than 1 or greater than 12");
+
+ try
+ {
+ DateTime value = new DateTime(2006, 0, 1, 1, 1, 1);
+
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when month is less than 1");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ DateTime value = new DateTime(2006, 13, 1, 1, 1, 1);
+
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when month is greater than 12");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentOutOfRangeException should be thrown when day is less than 1 or greater than the number of days in month");
+
+ try
+ {
+ DateTime value = new DateTime(2006, 1, 0, 1, 1, 1);
+
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when day is less than 1");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ DateTime value = new DateTime(2006, 1, 32, 1, 1, 1);
+
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when day is greater than the number of days in month");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ DateTime value = new DateTime(2006, 2, 29, 1, 1, 1);
+
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when day is greater than the number of days in month");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ DateTime value = new DateTime(2006, 4, 31, 1, 1, 1);
+
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when day is greater than the number of days in month");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: ArgumentOutOfRangeException should be thrown when hour is less than 0 or greater than 23");
+
+ try
+ {
+ DateTime value = new DateTime(2006, 1, 1, -1, 1, 1);
+
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when hour is less than 0");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ DateTime value = new DateTime(2006, 1, 1, 24, 1, 1);
+
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when hour is greater than 23");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: ArgumentOutOfRangeException should be thrown when minute is less than 0 or greater than 59");
+
+ try
+ {
+ DateTime value = new DateTime(2006, 1, 1, 1, -1, 1);
+
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown minute year is less than 0");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ DateTime value = new DateTime(2006, 1, 1, 1, 60, 1);
+
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when minute is greater than 59");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: ArgumentOutOfRangeException should be thrown when second is less than 0 or greater than 59");
+
+ try
+ {
+ DateTime value = new DateTime(2006, 1, 1, 1, 1, -1);
+
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when second is less than 0");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ DateTime value = new DateTime(2006, 1, 1, 1, 1, 60);
+
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when second is greater than 59");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DateTimeCtor3 test = new DateTimeCtor3();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeCtor3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerifyDateTimeHelper(int desiredYear, int desiredMonth, int desiredDay, int desiredHour, int desiredMinute, int desiredSecond)
+ {
+ bool retVal = true;
+
+ DateTime value = new DateTime(desiredYear, desiredMonth, desiredDay, desiredHour, desiredMinute, desiredSecond);
+ m_ErrorNo++;
+ if ((desiredYear != value.Year) || (desiredMonth != value.Month) || (desiredDay != value.Day) ||
+ (desiredHour != value.Hour) || (desiredMinute != value.Minute) || (desiredSecond != value.Second))
+ {
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "We can call ctor(System.Int32,System.Int32,System.Int32) to constructor a wrong DateTime instance by using valid value");
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredYear = " + desiredYear.ToString() +
+ ", desiredMonth = " + desiredMonth.ToString() +
+ ", desiredDay = " + desiredDay.ToString() +
+ ", desiredHour = " + desiredHour.ToString() +
+ ", desiredMinute = " + desiredMinute.ToString() +
+ ", desiredSecond = " + desiredSecond.ToString() +
+ ", actualYear = " + value.Year.ToString() +
+ ", actualMonth = " + value.Month.ToString() +
+ ", actualDay = " + value.Day.ToString() +
+ ", actualHour = " + value.Hour.ToString() +
+ ", actualMinute = " + value.Minute.ToString() +
+ ", actualSecond = " + value.Second.ToString());
+ retVal = false;
+ }
+
+ m_ErrorNo++;
+ if (value.Kind != DateTimeKind.Unspecified)
+ {
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "We can call ctor(System.Int32,System.Int32,System.Int32) to constructor a wrong DateTime instance by using valid value");
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredKind = DateTimeKind.Unspecified" + ", actualKind = " + value.Kind.ToString());
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimector4.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimector4.cs
new file mode 100644
index 0000000000..4035254ad2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimector4.cs
@@ -0,0 +1,638 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ctor(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.DateTimeKind)
+/// </summary>
+public class DateTimeCtor4
+{
+ #region Private Fields
+ private int m_ErrorNo = 0;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: We can call ctor to constructor a new DateTime instance by using valid value");
+
+ try
+ {
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28, 16, 7, 43, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28, 4, 7, 43, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28, 12, 0, 0, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28, 12, 0, 0, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28, 12, 0, 0, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28, 12, 56, 56, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28, 12, 56, 56, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28, 12, 56, 56, DateTimeKind.Utc);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: We can call ctor to constructor a new DateTime instance by using MAX/MIN values");
+
+ try
+ {
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 16, 7, 43, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 23, 59, 59, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 0, 0, 0, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 0, 59, 59, DateTimeKind.Local);
+
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 16, 7, 43, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 23, 59, 59, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 0, 0, 0, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 0, 59, 59, DateTimeKind.Utc);
+
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 0, 0, 0, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 0, 59, 59, DateTimeKind.Unspecified);
+
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 16, 7, 43, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 23, 59, 59, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 0, 0, 0, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 0, 59, 59, DateTimeKind.Local);
+
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 16, 7, 43, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 23, 59, 59, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 0, 0, 0, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 0, 59, 59, DateTimeKind.Utc);
+
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 0, 0, 0, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 0, 59, 59, DateTimeKind.Unspecified);
+
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 16, 7, 43, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 23, 59, 59, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 0, 0, 0, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 0, 59, 59, DateTimeKind.Local);
+
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 16, 7, 43, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 23, 59, 59, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 0, 0, 0, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 0, 59, 59, DateTimeKind.Utc);
+
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 0, 0, 0, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 0, 59, 59, DateTimeKind.Unspecified);
+
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 16, 7, 43, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 23, 59, 59, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 0, 0, 0, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 0, 59, 59, DateTimeKind.Local);
+
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 16, 7, 43, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 23, 59, 59, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 0, 0, 0, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 0, 59, 59, DateTimeKind.Utc);
+
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 0, 0, 0, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 0, 59, 59, DateTimeKind.Unspecified);
+
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 16, 7, 43, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 23, 59, 59, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 0, 0, 0, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 0, 59, 59, DateTimeKind.Local);
+
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 16, 7, 43, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 23, 59, 59, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 0, 0, 0, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 0, 59, 59, DateTimeKind.Utc);
+
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 0, 0, 0, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 0, 59, 59, DateTimeKind.Unspecified);
+
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 16, 7, 43, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 23, 59, 59, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 0, 0, 0, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 0, 59, 59, DateTimeKind.Local);
+
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 16, 7, 43, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 23, 59, 59, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 0, 0, 0, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 0, 59, 59, DateTimeKind.Utc);
+
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 0, 0, 0, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 0, 59, 59, DateTimeKind.Unspecified);
+
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 16, 7, 43, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 23, 59, 59, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 0, 0, 0, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 0, 59, 59, DateTimeKind.Local);
+
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 16, 7, 43, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 23, 59, 59, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 0, 0, 0, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 0, 59, 59, DateTimeKind.Utc);
+
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 0, 0, 0, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 0, 59, 59, DateTimeKind.Unspecified);
+
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 16, 7, 43, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 23, 59, 59, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 0, 0, 0, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 0, 59, 59, DateTimeKind.Local);
+
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 16, 7, 43, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 23, 59, 59, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 0, 0, 0, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 0, 59, 59, DateTimeKind.Utc);
+
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 0, 0, 0, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 0, 59, 59, DateTimeKind.Unspecified);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: We can call ctor to constructor a new DateTime instance by using correct day/month pair");
+
+ try
+ {
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 16, 7, 43, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 16, 7, 43, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 16, 7, 43, DateTimeKind.Utc);
+
+ retVal = retVal && VerifyDateTimeHelper(2006, 2, 28, 12, 0, 0, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2006, 2, 28, 12, 0, 0, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(2006, 2, 28, 12, 0, 0, DateTimeKind.Utc);
+
+ retVal = retVal && VerifyDateTimeHelper(2006, 4, 30, 16, 7, 43, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2006, 4, 30, 16, 7, 43, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(2006, 4, 30, 16, 7, 43, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2006, 4, 30, 16, 7, 43, DateTimeKind.Utc | DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(2006, 4, 30, 16, 7, 43, DateTimeKind.Local | DateTimeKind.Unspecified);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentOutOfRangeException should be thrown when year is less than 1 or greater than 9999.");
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(0, 1, 1, 1, 1, 1, DateTimeKind.Local);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when year is less than 1");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(10000, 1, 1, 1, 1, 1, DateTimeKind.Utc);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when year is greater than 9999");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentOutOfRangeException should be thrown when month is less than 1 or greater than 12");
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 0, 1, 1, 1, 1, DateTimeKind.Utc);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when month is less than 1");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 13, 1, 1, 1, 1, DateTimeKind.Local);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when month is greater than 12");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentOutOfRangeException should be thrown when day is less than 1 or greater than the number of days in month");
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 0, 1, 1, 1, DateTimeKind.Local);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when day is less than 1");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 32, 1, 1, 1, DateTimeKind.Utc);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when day is greater than the number of days in month");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 2, 29, 1, 1, 1, DateTimeKind.Utc);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when day is greater than the number of days in month");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 4, 31, 1, 1, 1, DateTimeKind.Local);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when day is greater than the number of days in month");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: ArgumentOutOfRangeException should be thrown when hour is less than 0 or greater than 23");
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, -1, 1, 1, DateTimeKind.Local);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when hour is less than 0");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, 24, 1, 1, DateTimeKind.Local);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when hour is greater than 23");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: ArgumentOutOfRangeException should be thrown when minute is less than 0 or greater than 59");
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, 1, -1, 1, DateTimeKind.Local);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown minute year is less than 0");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("105.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, 1, 60, 1, DateTimeKind.Local);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when minute is greater than 59");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("105.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: ArgumentOutOfRangeException should be thrown when second is less than 0 or greater than 59");
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, 1, 1, -1, DateTimeKind.Utc);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when second is less than 0");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, 1, 1, 60, DateTimeKind.Local);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when second is greater than 59");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest7: ArgumentException should be thrown when kind is not one of the DateTimeKind values.");
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, 1, 1, 1, DateTimeKind.Utc | DateTimeKind.Local);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentException is not thrown when kind is DateTimeKind.Utc | DateTimeKind.Local");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("107.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, 1, 1, 1, (DateTimeKind)(-1));
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentException is not thrown when kind is DateTimeKind.Local | DateTimeKind.Unspecified");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("107.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DateTimeCtor4 test = new DateTimeCtor4();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeCtor4");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerifyDateTimeHelper(int desiredYear,
+ int desiredMonth,
+ int desiredDay,
+ int desiredHour,
+ int desiredMinute,
+ int desiredSecond,
+ DateTimeKind desiredKind)
+ {
+ bool retVal = true;
+
+ DateTime value = new DateTime(desiredYear, desiredMonth, desiredDay,
+ desiredHour, desiredMinute, desiredSecond, desiredKind);
+
+ m_ErrorNo++;
+ if ((desiredYear != value.Year) ||
+ (desiredMonth != value.Month) ||
+ (desiredDay != value.Day) ||
+ (desiredHour != value.Hour) ||
+ (desiredMinute != value.Minute) ||
+ (desiredSecond != value.Second) ||
+ (desiredKind != value.Kind))
+ {
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Calling ctor constructors a wrong DateTime instance by using valid value");
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredYear = " + desiredYear.ToString() +
+ ", desiredMonth = " + desiredMonth.ToString() +
+ ", desiredDay = " + desiredDay.ToString() +
+ ", desiredHour = " + desiredHour.ToString() +
+ ", desiredMinute = " + desiredMinute.ToString() +
+ ", desiredSecond = " + desiredSecond.ToString() +
+ ", desiredKind = " + desiredKind.ToString() +
+ ", actualYear = " + value.Year.ToString() +
+ ", actualMonth = " + value.Month.ToString() +
+ ", actualDay = " + value.Day.ToString() +
+ ", actualHour = " + value.Hour.ToString() +
+ ", actualMinute = " + value.Minute.ToString() +
+ ", actualSecond = " + value.Second.ToString() +
+ ", actualKind = " + value.Kind.ToString());
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimector6.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimector6.cs
new file mode 100644
index 0000000000..8f644bd9ba
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimector6.cs
@@ -0,0 +1,570 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ctor(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)
+/// </summary>
+public class DateTimeCtor6
+{
+ #region Private Fields
+ private int m_ErrorNo = 0;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: We can call ctor to constructor a new DateTime instance by using valid value");
+
+ try
+ {
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28, 16, 7, 43, 500);
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28, 12, 0, 0, 500);
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28, 12, 56, 56, 900);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: We can call ctor to constructor a new DateTime instance by using MAX/MIN values");
+
+ try
+ {
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 16, 7, 43, 500);
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 23, 59, 59, 999);
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 0, 0, 0, 0);
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 0, 59, 59, 999);
+
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 16, 7, 43, 500);
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 23, 59, 59, 999);
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 0, 0, 0, 999);
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 0, 59, 59, 0);
+
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 16, 7, 43, 500);
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 23, 59, 59, 999);
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 0, 0, 0, 999);
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 0, 59, 59, 0);
+
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 16, 7, 43, 500);
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 23, 59, 59, 999);
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 0, 0, 0, 0);
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 0, 59, 59, 999);
+
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 16, 7, 43, 500);
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 23, 59, 59, 999);
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 0, 0, 0, 0);
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 0, 59, 59, 999);
+
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 16, 7, 43, 500);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 23, 59, 59, 999);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 0, 0, 0, 999);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 0, 59, 59, 0);
+
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 16, 7, 43, 500);
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 23, 59, 59, 999);
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 0, 0, 0, 0);
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 0, 59, 59, 999);
+
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 16, 7, 43, 500);
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 23, 59, 59, 999);
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 0, 0, 0, 999);
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 0, 59, 59, 0);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: We can call ctor to constructor a new DateTime instance by using correct day/month pair");
+
+ try
+ {
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 16, 7, 43, 500);
+ retVal = retVal && VerifyDateTimeHelper(2006, 2, 28, 12, 0, 0, 0);
+ retVal = retVal && VerifyDateTimeHelper(2006, 4, 30, 16, 7, 43, 100);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentOutOfRangeException should be thrown when year is less than 1 or greater than 9999.");
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(0, 1, 1, 1, 1, 1, 1);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when year is less than 1");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(10000, 1, 1, 1, 1, 1, 1);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when year is greater than 9999");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentOutOfRangeException should be thrown when month is less than 1 or greater than 12");
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 0, 1, 1, 1, 1, 1);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when month is less than 1");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 13, 1, 1, 1, 1, 1);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when month is greater than 12");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentOutOfRangeException should be thrown when day is less than 1 or greater than the number of days in month");
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 0, 1, 1, 1, 1);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when day is less than 1");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 32, 1, 1, 1, 1);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when day is greater than the number of days in month");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 2, 29, 1, 1, 1, 1);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when day is greater than the number of days in month");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 4, 31, 1, 1, 1, 1);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when day is greater than the number of days in month");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: ArgumentOutOfRangeException should be thrown when hour is less than 0 or greater than 23");
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, -1, 1, 1, 1);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when hour is less than 0");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, 24, 1, 1, 1);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when hour is greater than 23");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: ArgumentOutOfRangeException should be thrown when minute is less than 0 or greater than 59");
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, 1, -1, 1, 1);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown minute year is less than 0");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("105.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, 1, 60, 1, 1);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when minute is greater than 59");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("105.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: ArgumentOutOfRangeException should be thrown when second is less than 0 or greater than 59");
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, 1, 1, -1, 1);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when second is less than 0");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, 1, 1, 60, 1);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when second is greater than 59");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest7: ArgumentOutOfRangeException should be thrown when millisecond is less than 0 or greater than 999");
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, 1, 1, 1, -1);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when millisecond is less than 0");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("107.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, 1, 1, 1, 1000);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when millisecond is greater than 999");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("107.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DateTimeCtor6 test = new DateTimeCtor6();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeCtor6");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerifyDateTimeHelper(int desiredYear,
+ int desiredMonth,
+ int desiredDay,
+ int desiredHour,
+ int desiredMinute,
+ int desiredSecond,
+ int desiredMillisecond)
+ {
+ bool retVal = true;
+
+ DateTime value = new DateTime(desiredYear, desiredMonth, desiredDay,
+ desiredHour, desiredMinute, desiredSecond, desiredMillisecond);
+
+ m_ErrorNo++;
+ if ((desiredYear != value.Year) ||
+ (desiredMonth != value.Month) ||
+ (desiredDay != value.Day) ||
+ (desiredHour != value.Hour) ||
+ (desiredMinute != value.Minute) ||
+ (desiredSecond != value.Second) ||
+ (desiredMillisecond != value.Millisecond) )
+ {
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Calling ctor constructors a wrong DateTime instance by using valid value");
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredYear = " + desiredYear.ToString() +
+ ", desiredMonth = " + desiredMonth.ToString() +
+ ", desiredDay = " + desiredDay.ToString() +
+ ", desiredHour = " + desiredHour.ToString() +
+ ", desiredMinute = " + desiredMinute.ToString() +
+ ", desiredSecond = " + desiredSecond.ToString() +
+ ", desiredMillisecond = " + desiredMillisecond.ToString() +
+ ", actualYear = " + value.Year.ToString() +
+ ", actualMonth = " + value.Month.ToString() +
+ ", actualDay = " + value.Day.ToString() +
+ ", actualHour = " + value.Hour.ToString() +
+ ", actualMinute = " + value.Minute.ToString() +
+ ", actualSecond = " + value.Second.ToString() +
+ ", actualMillisecond = " + value.Millisecond.ToString());
+ retVal = false;
+ }
+
+ m_ErrorNo++;
+ if (value.Kind != DateTimeKind.Unspecified)
+ {
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Calling ctor constructors a wrong DateTime instance by using valid value");
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredKind = DateTimeKind.Unspecified" + ", actualKind = " + value.Kind.ToString());
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimector7.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimector7.cs
new file mode 100644
index 0000000000..3e839662fb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimector7.cs
@@ -0,0 +1,689 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ctor(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.DateTimeKind)
+/// </summary>
+public class DateTimeCtor7
+{
+ #region Private Fields
+ private int m_ErrorNo = 0;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: We can call ctor to constructor a new DateTime instance by using valid value");
+
+ try
+ {
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28, 16, 7, 43, 500, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28, 4, 7, 43, 100, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28, 12, 0, 0, 1, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28, 12, 0, 0, 998, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28, 12, 0, 0, 2, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28, 12, 56, 56, 100, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28, 12, 56, 56, 200, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(2006, 8, 28, 12, 56, 56, 300, DateTimeKind.Utc);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: We can call ctor to constructor a new DateTime instance by using MAX/MIN values");
+
+ try
+ {
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 16, 7, 43, 0, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 23, 59, 59, 999, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 0, 59, 59, 0, DateTimeKind.Local);
+
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 16, 7, 43, 500, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 23, 59, 59, 999, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 0, 59, 59, 59, DateTimeKind.Utc);
+
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(1, 1, 1, 0, 59, 59, 99, DateTimeKind.Unspecified);
+
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 16, 7, 43, 500, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 23, 59, 59, 999, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 0, 0, 0, 0, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 0, 59, 59, 0, DateTimeKind.Local);
+
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 16, 7, 43, 1, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 23, 59, 59, 998, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 0, 0, 0, 999, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 0, 59, 59, 0, DateTimeKind.Utc);
+
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 0, 0, 0, 1, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(9999, 12, 31, 0, 59, 59, 999, DateTimeKind.Unspecified);
+
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 16, 7, 43, 1, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 23, 59, 59, 998, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 0, 0, 0, 0, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 0, 59, 59, 999, DateTimeKind.Local);
+
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 16, 7, 43, 1, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 23, 59, 59, 998, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 0, 0, 0, 0, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 0, 59, 59, 999, DateTimeKind.Utc);
+
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 0, 0, 0, 0, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(1, 12, 31, 0, 59, 59, 999, DateTimeKind.Unspecified);
+
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 16, 7, 43, 1, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 23, 59, 59, 998, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 0, 0, 0, 0, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 0, 59, 59, 999, DateTimeKind.Local);
+
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 16, 7, 43, 1, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 23, 59, 59, 998, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 0, 59, 59, 999, DateTimeKind.Utc);
+
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(9999, 1, 1, 0, 59, 59, 999, DateTimeKind.Unspecified);
+
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 16, 7, 43, 1, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 23, 59, 59, 998, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 0, 0, 0, 0, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 0, 59, 59, 999, DateTimeKind.Local);
+
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 16, 7, 43, 1, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 23, 59, 59, 998, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 0, 0, 0, 0, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 0, 59, 59, 999, DateTimeKind.Utc);
+
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 0, 0, 0, 0, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(2000, 1, 31, 0, 59, 59, 999, DateTimeKind.Unspecified);
+
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 16, 7, 43, 1, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 23, 59, 59, 998, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 0, 0, 0, 0, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 0, 59, 59, 999, DateTimeKind.Local);
+
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 16, 7, 43, 1, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 23, 59, 59, 998, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 0, 0, 0, 0, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 0, 59, 59, 999, DateTimeKind.Utc);
+
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 0, 0, 0, 0, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 0, 59, 59, 999, DateTimeKind.Unspecified);
+
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 16, 7, 43, 1, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 23, 59, 59, 998, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 0, 0, 0, 0, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 0, 59, 59, 999, DateTimeKind.Local);
+
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 16, 7, 43, 1, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 23, 59, 59, 998, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 0, 0, 0, 0, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 0, 59, 59, 999, DateTimeKind.Utc);
+
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 0, 0, 0, 0, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(2001, 2, 28, 0, 59, 59, 999, DateTimeKind.Unspecified);
+
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 16, 7, 43, 1, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 23, 59, 59, 998, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 0, 0, 0, 0, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 0, 59, 59, 999, DateTimeKind.Local);
+
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 16, 7, 43, 1, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 23, 59, 59, 998, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 0, 0, 0, 0, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 0, 59, 59, 999, DateTimeKind.Utc);
+
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 0, 0, 0, 0, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(2001, 4, 30, 0, 59, 59, 999, DateTimeKind.Unspecified);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: We can call ctor to constructor a new DateTime instance by using correct day/month pair");
+
+ try
+ {
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 16, 7, 43, 1, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 16, 7, 43, 999, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(2000, 2, 29, 16, 7, 43, 998, DateTimeKind.Utc);
+
+ retVal = retVal && VerifyDateTimeHelper(2006, 2, 28, 12, 0, 0, 0, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2006, 2, 28, 12, 0, 0, 0, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(2006, 2, 28, 12, 0, 0, 0, DateTimeKind.Utc);
+
+ retVal = retVal && VerifyDateTimeHelper(2006, 4, 30, 16, 7, 43, 1, DateTimeKind.Local);
+ retVal = retVal && VerifyDateTimeHelper(2006, 4, 30, 16, 7, 43, 1, DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(2006, 4, 30, 16, 7, 43, 1, DateTimeKind.Utc);
+ retVal = retVal && VerifyDateTimeHelper(2006, 4, 30, 16, 7, 43, 1, DateTimeKind.Utc | DateTimeKind.Unspecified);
+ retVal = retVal && VerifyDateTimeHelper(2006, 4, 30, 16, 7, 43, 1, DateTimeKind.Local | DateTimeKind.Unspecified);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentOutOfRangeException should be thrown when year is less than 1 or greater than 9999.");
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(0, 1, 1, 1, 1, 1, 1, DateTimeKind.Local);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when year is less than 1");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(10000, 1, 1, 1, 1, 1, 1, DateTimeKind.Utc);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when year is greater than 9999");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentOutOfRangeException should be thrown when month is less than 1 or greater than 12");
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 0, 1, 1, 1, 1, 1, DateTimeKind.Utc);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when month is less than 1");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 13, 1, 1, 1, 1, 1, DateTimeKind.Local);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when month is greater than 12");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentOutOfRangeException should be thrown when day is less than 1 or greater than the number of days in month");
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 0, 1, 1, 1, 1, DateTimeKind.Local);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when day is less than 1");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 32, 1, 1, 1, 1, DateTimeKind.Utc);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when day is greater than the number of days in month");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 2, 29, 1, 1, 1, 1, DateTimeKind.Utc);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when day is greater than the number of days in month");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 4, 31, 1, 1, 1, 1, DateTimeKind.Local);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when day is greater than the number of days in month");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: ArgumentOutOfRangeException should be thrown when hour is less than 0 or greater than 23");
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, -1, 1, 1, 1, DateTimeKind.Local);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when hour is less than 0");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, 24, 1, 1, 1, DateTimeKind.Local);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when hour is greater than 23");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: ArgumentOutOfRangeException should be thrown when minute is less than 0 or greater than 59");
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, 1, -1, 1, 1, DateTimeKind.Local);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown minute year is less than 0");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("105.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, 1, 60, 1, 1, DateTimeKind.Local);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when minute is greater than 59");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("105.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: ArgumentOutOfRangeException should be thrown when second is less than 0 or greater than 59");
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, 1, 1, -1, 1, DateTimeKind.Utc);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when second is less than 0");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, 1, 1, 60, 1, DateTimeKind.Local);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when second is greater than 59");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest7: ArgumentException should be thrown when kind is not one of the DateTimeKind values.");
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, 1, 1, 1, 1, DateTimeKind.Utc | DateTimeKind.Local);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentException is not thrown when kind is DateTimeKind.Utc | DateTimeKind.Local");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("107.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, 1, 1, 1, 1, (DateTimeKind)(-1));
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentException is not thrown when kind is DateTimeKind.Local | DateTimeKind.Unspecified");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("107.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest8()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest8: ArgumentOutOfRangeException should be thrown when millisecond is less than 0 or greater than 999");
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, 1, 1, 1, -1, DateTimeKind.Utc);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when millisecond is less than 0");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ m_ErrorNo++;
+ DateTime value = new DateTime(2006, 1, 1, 1, 1, 1, 1000, DateTimeKind.Local);
+
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "ArgumentOutOfRangeException is not thrown when millisecond is greater than 999");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DateTimeCtor7 test = new DateTimeCtor7();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeCtor7");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerifyDateTimeHelper(int desiredYear,
+ int desiredMonth,
+ int desiredDay,
+ int desiredHour,
+ int desiredMinute,
+ int desiredSecond,
+ int desiredMillisecond,
+ DateTimeKind desiredKind)
+ {
+ bool retVal = true;
+
+ DateTime value = new DateTime(desiredYear, desiredMonth, desiredDay,
+ desiredHour, desiredMinute, desiredSecond, desiredMillisecond, desiredKind);
+
+ m_ErrorNo++;
+ if ((desiredYear != value.Year) ||
+ (desiredMonth != value.Month) ||
+ (desiredDay != value.Day) ||
+ (desiredHour != value.Hour) ||
+ (desiredMinute != value.Minute) ||
+ (desiredSecond != value.Second) ||
+ (desiredMillisecond != value.Millisecond) ||
+ (desiredKind != value.Kind))
+ {
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Calling ctor constructors a wrong DateTime instance by using valid value");
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredYear = " + desiredYear.ToString() +
+ ", desiredMonth = " + desiredMonth.ToString() +
+ ", desiredDay = " + desiredDay.ToString() +
+ ", desiredHour = " + desiredHour.ToString() +
+ ", desiredMinute = " + desiredMinute.ToString() +
+ ", desiredSecond = " + desiredSecond.ToString() +
+ ", desiredMillisecond = " + desiredMillisecond.ToString() +
+ ", desiredKind = " + desiredKind.ToString() +
+ ", actualYear = " + value.Year.ToString() +
+ ", actualMonth = " + value.Month.ToString() +
+ ", actualDay = " + value.Day.ToString() +
+ ", actualHour = " + value.Hour.ToString() +
+ ", actualMinute = " + value.Minute.ToString() +
+ ", actualSecond = " + value.Second.ToString() +
+ ", actualMillisecond = " + value.Millisecond.ToString() +
+ ", actualKind = " + value.Kind.ToString());
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimedate.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimedate.cs
new file mode 100644
index 0000000000..cfa1db7630
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimedate.cs
@@ -0,0 +1,144 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using System.Globalization;
+
+/// <summary>
+/// System.DateTime.Date
+/// </summary>
+public class DateTimeDate
+{
+ public static int Main(string[] args)
+ {
+ DateTimeDate date = new DateTimeDate();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.DateTime.Date property...");
+
+ if (date.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify Date property when the created DateTime instance just is assigned to year,month and day...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ DateTime myDateTime = new DateTime(1978, 08, 29);
+ DateTime myDate = myDateTime.Date;
+
+ if (myDateTime.Year != myDate.Year || myDateTime.Month != myDate.Month || myDateTime.Day != myDate.Day)
+ {
+ TestLibrary.TestFramework.LogError("001", "The Date is wrong!");
+ retVal = false;
+ }
+ else
+ {
+ if (myDate.Hour != 0 || myDate.Minute != 0 || myDate.Second != 0)
+ {
+ TestLibrary.TestFramework.LogError("002", "The initial time value is not equal to minnight!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify Date property when created DateTime instance's time value is less than 12:00:00...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ DateTime myDateTime = new DateTime(1978, 08, 29, 03, 00, 00);
+ DateTime myDate = myDateTime.Date;
+
+ if (myDate.Year != myDateTime.Year || myDate.Month != myDateTime.Month || myDate.Day != myDateTime.Day)
+ {
+ TestLibrary.TestFramework.LogError("004", "The Date is wrong!");
+ retVal = false;
+ }
+ else if (myDate.Hour != 0 || myDate.Minute != 0 || myDate.Second != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "The initial time value is not equal to minnight!");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify Date property when created DateTime instance's time value is more than 12:00:00...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ DateTime myDateTime = new DateTime(1978, 08, 29, 23, 00, 00);
+ DateTime myDate = myDateTime.Date;
+
+ if (myDateTime.Year != myDate.Year || myDateTime.Month != myDateTime.Month || myDateTime.Day != myDate.Day)
+ {
+ TestLibrary.TestFramework.LogError("007", "The Date is wrong!");
+ retVal = false;
+ }
+ else if (myDate.Hour != 0 || myDate.Minute != 0 || myDate.Second != 0)
+ {
+ TestLibrary.TestFramework.LogError("008", "The initial time value is not equal to minnight!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimegethashcode.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimegethashcode.cs
new file mode 100644
index 0000000000..e5d5c07d16
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimegethashcode.cs
@@ -0,0 +1,141 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// GetHashCode
+/// </summary>
+public class DateTimeGetHashCode
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call GetHashCode on a valid instance");
+
+ try
+ {
+ DateTime t = new DateTime(2006, 9, 25, 14, 15, 59, 999);
+ int hashCode1 = t.GetHashCode();
+ int hashCode2 = t.GetHashCode();
+ if (hashCode1 != hashCode2)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Call GetHashCode on a valid instance twice does not return the same hash code");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] hashCode1 = " + hashCode1 + ", hashCode2 = " + hashCode2);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call GetHashCode on a boundary value");
+
+ try
+ {
+ DateTime t = DateTime.MaxValue;
+ int hashCode1 = t.GetHashCode();
+ int hashCode2 = t.GetHashCode();
+ if (hashCode1 != hashCode2)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Call GetHashCode on a valid instance twice does not return the same hash code");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] hashCode1 = " + hashCode1 + ", hashCode2 = " + hashCode2);
+ retVal = false;
+ }
+
+ t = DateTime.MinValue;
+ hashCode1 = t.GetHashCode();
+ hashCode2 = t.GetHashCode();
+ if (hashCode1 != hashCode2)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Call GetHashCode on a valid instance twice does not return the same hash code");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] hashCode1 = " + hashCode1 + ", hashCode2 = " + hashCode2);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Hash code should be the same for the same date time");
+
+ try
+ {
+ DateTime t1 = new DateTime(2006, 9, 25, 14, 15, 59, 999);
+ DateTime t2 = new DateTime(2006, 9, 25, 14, 15, 59, 999);
+ int hashCode1 = t1.GetHashCode();
+ int hashCode2 = t2.GetHashCode();
+ if (hashCode1 != hashCode2)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Call GetHashCode on a valid instance twice does not return the same hash code");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] hashCode1 = " + hashCode1 + ", hashCode2 = " + hashCode2);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DateTimeGetHashCode test = new DateTimeGetHashCode();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeGetHashCode");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimehour.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimehour.cs
new file mode 100644
index 0000000000..b7d367f3f9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimehour.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Threading;
+using System.Globalization;
+
+
+/// <summary>
+/// System.DateTime.Hour
+/// </summary>
+public class DateTimeHour
+{
+ public static int Main(string[] args)
+ {
+ DateTimeHour hour = new DateTimeHour();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.DateTime.Hour property...");
+
+ if (hour.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify DateTime.Hour property when DateTime instance's hour is assigned...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ DateTime myDateTime = new DateTime(0978, 08, 29, 03, 00, 00);
+ int hour = myDateTime.Hour;
+
+ if (hour != 3)
+ {
+ TestLibrary.TestFramework.LogError("001","The hour is not correct!");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify DateTime.Hour property When DateTime instance is only assigned year month and day...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ DateTime myDateTime = new DateTime(1978,08,29);
+ int hour = myDateTime.Hour;
+
+ if (hour != 0)
+ {
+ TestLibrary.TestFramework.LogError("003","The hour is not zero when no value is assigned at init time!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("", "");
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimekind.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimekind.cs
new file mode 100644
index 0000000000..b797d038e3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimekind.cs
@@ -0,0 +1,221 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using System.Globalization;
+
+
+/// <summary>
+/// System.DateTime.Kind
+/// </summary>
+public class DateTimeKind
+{
+ public static int Main(string[] args)
+ {
+ DateTimeKind kind = new DateTimeKind();
+ TestLibrary.TestFramework.BeginScenario("Testing System.DateTime.Kind property...");
+
+ if (kind.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Check Kind property when create an instance using Utc...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ DateTime myDateTime = new DateTime(1978, 08, 29, 03, 00, 00, System.DateTimeKind.Utc);
+
+ if (myDateTime.Kind != System.DateTimeKind.Utc)
+ {
+ TestLibrary.TestFramework.LogError("001", "The kind is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Check Kind property when create an instance using local...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ DateTime myDateTime = new DateTime(1978, 08, 29, 03, 00, 00, System.DateTimeKind.Local);
+
+ if (myDateTime.Kind != System.DateTimeKind.Local)
+ {
+ TestLibrary.TestFramework.LogError("003", "The kind is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Check Kind property when create an instance using Unspecified...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ DateTime myDateTime = new DateTime(1978, 08, 29, 03, 00, 00, System.DateTimeKind.Unspecified);
+
+ if (myDateTime.Kind != System.DateTimeKind.Unspecified)
+ {
+ TestLibrary.TestFramework.LogError("005", "The kind is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Check toUniversalTime is equal to original when create an instance using Utc...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ DateTime myDateTime = new DateTime(1978, 08, 29, 03, 00, 00, System.DateTimeKind.Utc);
+ DateTime toUniversal = myDateTime.ToUniversalTime();
+
+ if (myDateTime != toUniversal)
+ {
+ TestLibrary.TestFramework.LogError("007", "The two instances are not equal!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Check toLocalTime is equal to original when create an instance using local...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ DateTime myDateTime = new DateTime(1978, 08, 29, 03, 00, 00, System.DateTimeKind.Local);
+ DateTime toLocal = myDateTime.ToLocalTime();
+
+ if (myDateTime != toLocal)
+ {
+ TestLibrary.TestFramework.LogError("009", "The kind is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Check an instance created by Unspecified, then compare to local and universal...");
+
+ try
+ {
+ if (TimeZoneInfo.Local.BaseUtcOffset == TimeSpan.Zero) // any TZ has same alignment with UTC
+ {
+ // if we are on UTC zone, then the following test wil not make sense because all date conversion will produce the same original date value
+ return retVal;
+ }
+
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ DateTime myDateTime = new DateTime(1978, 08, 29, 03, 00, 00, System.DateTimeKind.Unspecified);
+
+ DateTime toLocal = myDateTime.ToLocalTime();
+ DateTime toUniversal = myDateTime.ToUniversalTime();
+
+ if (myDateTime == toLocal)
+ {
+ string errorMessage = String.Format("The Unspecified myDateTime is regard as local by default!\nTZ: '{0}'\nmyDateTime: '{1}'\ntoLocal: '{2}'", TimeZoneInfo.Local.DisplayName, myDateTime, toLocal);
+ TestLibrary.TestFramework.LogError("011", errorMessage);
+ retVal = false;
+ }
+ else if (myDateTime == toUniversal)
+ {
+ string errorMessage = String.Format("Unexpected exception occurs!\nTZ: '{0}'\nmyDateTime: '{1}'\ntoUniversal: '{2}'", TimeZoneInfo.Local.DisplayName, myDateTime, toUniversal);
+ TestLibrary.TestFramework.LogError("012", errorMessage);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("013", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimemaxvalue.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimemaxvalue.cs
new file mode 100644
index 0000000000..d6a04de363
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimemaxvalue.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// MaxValue
+/// </summary>
+public class DateTimeMaxValue
+{
+ #region Private Fields
+ private const long DATETIME_MAX_VALUE_TICKS = 3155378975999999999;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: DateTime.MaxValue should be 23:59:59.9999999, December 31, 9999");
+
+ try
+ {
+ DateTime desiredValue = new DateTime(DATETIME_MAX_VALUE_TICKS);
+ if (!desiredValue.Equals(DateTime.MaxValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "DateTime.MaxValue is not 23:59:59.9999999, December 31, 9999");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DateTimeMaxValue test = new DateTimeMaxValue();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeMaxValue");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimemillisecond.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimemillisecond.cs
new file mode 100644
index 0000000000..dd54de864d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimemillisecond.cs
@@ -0,0 +1,124 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Threading;
+using System.Globalization;
+
+
+public class DateTimeMillisecond
+{
+ public static int Main(string[] args)
+ {
+ DateTimeMillisecond milliSecond = new DateTimeMillisecond();
+ TestLibrary.TestFramework.BeginScenario("Testing System.DateTime.Millisecond property...");
+
+ if (milliSecond.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify DateTime.Milliscond property when DateTime instance's Millisecond is assigned...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ DateTime myDateTime = new DateTime(0978, 08, 29, 03, 00, 00,666);
+ int myMillisecond = myDateTime.Millisecond;
+
+ if (myMillisecond != 666)
+ {
+ TestLibrary.TestFramework.LogError("001", "The Millisecond is not correct!");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify DateTime.Millisecond property When DateTime instance is only assigned year month and day...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ DateTime myDateTime = new DateTime(1978, 08, 29);
+ int myMillisecond = myDateTime.Millisecond;
+
+ if (myMillisecond != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "The millisecond is not zero when no value is assigned at init time!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify DateTime.Millisecond property When DateTime instance is only assigned year,month,day,hour,minute and second...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ DateTime myDateTime = new DateTime(1978, 08, 29, 03, 00, 00);
+ int myMillisecond = myDateTime.Millisecond;
+
+ if (myMillisecond != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "The millisecond is not zero when no value is assigned at init time!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimeminute.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimeminute.cs
new file mode 100644
index 0000000000..78256cc5dc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimeminute.cs
@@ -0,0 +1,95 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Threading;
+using System.Globalization;
+
+public class DateTimeMinute
+{
+ public static int Main(string[] args)
+ {
+ DateTimeMinute minute = new DateTimeMinute();
+ TestLibrary.TestFramework.BeginScenario("Testing System.DateTime.Minute...");
+
+ if (minute.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify DateTime.Minute property when DateTime instance's minute is assigned...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ DateTime myDateTime = new DateTime(0978, 08, 29, 03, 29, 00);
+ int minute = myDateTime.Minute;
+
+ if (minute != 29)
+ {
+ TestLibrary.TestFramework.LogError("001", "The minute is not correct!");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify DateTime.Minute property When DateTime instance is only assigned year month and day...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ DateTime myDateTime = new DateTime(1978, 08, 29);
+ int minute = myDateTime.Minute;
+
+ if (minute != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "The minute is not zero when no value is assigned at init time!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimeminvalue.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimeminvalue.cs
new file mode 100644
index 0000000000..ebe7f75b74
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimeminvalue.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// MinValue
+/// </summary>
+public class DateTimeMinValue
+{
+ #region Private Fields
+ private const long DATETIME_MIN_VALUE_TICKS = 0;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: DateTime.MinValue should be 00:00:00.0000000, January 1, 0001");
+
+ try
+ {
+ DateTime desiredValue = new DateTime(DATETIME_MIN_VALUE_TICKS);
+ if (!desiredValue.Equals(DateTime.MinValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "DateTime.MinValue is not 00:00:00.0000000, January 1, 0001");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DateTimeMinValue test = new DateTimeMinValue();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeMinValue");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimenow.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimenow.cs
new file mode 100644
index 0000000000..b9c9c8ceb7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimenow.cs
@@ -0,0 +1,93 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Threading;
+
+public class DateTimeNow
+{
+ public static int Main(string[] args)
+ {
+ DateTimeNow now = new DateTimeNow();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.DateTime.Now property...");
+
+ if (now.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginTestCase("Verify DateTime.Now is local kind...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new System.Globalization.CultureInfo("");
+ DateTime myDateTime = DateTime.Now;
+ Type typeOfNow = myDateTime.GetType();
+ DateTime toLocal = myDateTime.ToLocalTime();
+
+ if (myDateTime != toLocal)
+ {
+ TestLibrary.TestFramework.LogError("001","The kind of Now property is not local!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginTestCase("Verify the type of Now property is DateTime...");
+
+ try
+ {
+ DateTime myDateTime = DateTime.Now;
+ Type typeOfNow = myDateTime.GetType();
+
+ if (typeOfNow.ToString() != "System.DateTime")
+ {
+ TestLibrary.TestFramework.LogError("003","The type of Now property is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004","Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimeparse1.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimeparse1.cs
new file mode 100644
index 0000000000..ee92958220
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimeparse1.cs
@@ -0,0 +1,830 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+public class DateTimeParse1
+{
+ private CultureInfo CurrentCulture = TestLibrary.Utilities.CurrentCulture;
+ private const int c_MIN_STRING_LEN = 1;
+ private const int c_MAX_STRING_LEN = 2048;
+ private const int c_NUM_LOOPS = 100;
+ //new string[12] {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
+ private static string[] c_MONTHS = CultureInfo.InvariantCulture.DateTimeFormat.AbbreviatedMonthNames;
+ //new string[12] {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
+ private static string[] c_MONTHS_SH = CultureInfo.InvariantCulture.DateTimeFormat.AbbreviatedMonthGenitiveNames;
+ //new string[7] {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
+ private static string[] c_DAYS_SH = CultureInfo.InvariantCulture.DateTimeFormat.AbbreviatedDayNames;
+
+ public static int Main()
+ {
+ DateTimeParse1 test = new DateTimeParse1();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeParse1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ TestLibrary.Utilities.CurrentCulture = CultureInfo.InvariantCulture;
+
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+ retVal = PosTest12() && retVal;
+ retVal = PosTest13() && retVal;
+ retVal = PosTest14() && retVal;
+
+ TestLibrary.Utilities.CurrentCulture = CurrentCulture;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string dateBefore = "";
+ DateTime dateAfter;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: DateTime.Parse(DateTime.Now)");
+
+ try
+ {
+ dateBefore = DateTime.Now.ToString();
+
+ dateAfter = DateTime.Parse( dateBefore );
+
+ if (!dateBefore.Equals(dateAfter.ToString()))
+ {
+ TestLibrary.TestFramework.LogError("001", "DateTime.Parse(" + dateBefore + ") did not equal " + dateAfter.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ DateTime dateAfter;
+ string dateBefore = "";
+ int day; // 1 - 29
+ int year; // 1900 - 2000
+ int month; // 1 - 12
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: DateTime.Parse(M/d/yyyy (ShortDatePattern ex: 1/3/2002))");
+
+ try
+ {
+ for(int i=0; i<c_NUM_LOOPS; i++)
+ {
+ day = (TestLibrary.Generator.GetInt32(-55) % 28) + 1;
+ year = (TestLibrary.Generator.GetInt32(-55) % 100) + 1900;
+ month = (TestLibrary.Generator.GetInt32(-55) % 12) + 1;
+
+ dateBefore = month + "/" + day + "/" + year;
+ dateAfter = DateTime.Parse( dateBefore );
+
+ if (month != dateAfter.Month || day != dateAfter.Day || year != dateAfter.Year)
+ {
+ TestLibrary.TestFramework.LogError("003", "DateTime.Parse(" + dateBefore + ") did not equal " + dateAfter.ToString());
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ DateTime dateAfter;
+ string dateBefore = "";
+ int dayOfWeek; // 0 - 6
+ int day; // 1 - 28
+ int year; // 1900 - 2000
+ int month; // 0 - 11
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: DateTime.Parse(dddd, MMMM dd, yyyy (LongDatePattern ex: Thursday, January 03, 2002))");
+
+ try
+ {
+ for(int i=0; i<c_NUM_LOOPS; i++)
+ {
+ day = (TestLibrary.Generator.GetInt32(-55) % 27) + 1;
+ year = (TestLibrary.Generator.GetInt32(-55) % 100) + 1900;
+ month = (TestLibrary.Generator.GetInt32(-55) % 12);
+
+ // cheat and get day of the week
+ dateAfter = DateTime.Parse( (month+1) + "/" + day + "/" + year);
+ dayOfWeek = (int)dateAfter.DayOfWeek;
+
+ // parse the date
+ dateBefore = (DayOfWeek)dayOfWeek + ", " + c_MONTHS[month] + " " + day + ", " + year;
+ dateAfter = DateTime.Parse( dateBefore );
+
+ if ((month+1) != dateAfter.Month || day != dateAfter.Day || year != dateAfter.Year || (DayOfWeek)dayOfWeek != dateAfter.DayOfWeek)
+ {
+ TestLibrary.TestFramework.LogError("005", "DateTime.Parse(" + dateBefore + ") did not equal (" + dateAfter.DayOfWeek + ", " + c_MONTHS[dateAfter.Month-1] + " " + dateAfter.Day + ", " + dateAfter.Year + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ DateTime dateAfter;
+ string dateBefore = "";
+ int dayOfWeek; // 0 - 6
+ int day; // 1 - 28
+ int year; // 1900 - 2000
+ int month; // 0 - 11
+ int hour; // 0 - 11
+ int minute; // 0 - 59
+ int timeOfDay; // 0 -1
+ string[] twelveHour = new string[2] {"AM", "PM"};
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: DateTime.Parse(ex: Thursday, January 03, 2002 12:00 AM)");
+
+ try
+ {
+ for(int i=0; i<c_NUM_LOOPS; i++)
+ {
+ day = (TestLibrary.Generator.GetInt32(-55) % 27) + 1;
+ year = (TestLibrary.Generator.GetInt32(-55) % 100) + 1900;
+ month = (TestLibrary.Generator.GetInt32(-55) % 12);
+ hour = (TestLibrary.Generator.GetInt32(-55) % 12);
+ minute = (TestLibrary.Generator.GetInt32(-55) % 60);
+ timeOfDay = (TestLibrary.Generator.GetInt32(-55) % 2);
+
+ // cheat and get day of the week
+ dateAfter = DateTime.Parse( (month+1) + "/" + day + "/" + year);
+ dayOfWeek = (int)dateAfter.DayOfWeek;
+
+ // parse the date
+ dateBefore = (DayOfWeek)dayOfWeek + ", " + c_MONTHS[month] + " " + day + ", " + year + " " + hour + ":" + minute + " " + twelveHour[timeOfDay];
+ dateAfter = DateTime.Parse( dateBefore );
+
+ if ((month+1) != dateAfter.Month
+ || day != dateAfter.Day
+ || year != dateAfter.Year
+ || (DayOfWeek)dayOfWeek != dateAfter.DayOfWeek
+ || (hour + timeOfDay*12) != dateAfter.Hour
+ || minute != dateAfter.Minute)
+ {
+ TestLibrary.TestFramework.LogError("007", "DateTime.Parse(" + dateBefore + ") did not equal (" + dateAfter.DayOfWeek + ", " + c_MONTHS[dateAfter.Month-1] + " " + dateAfter.Day + ", " + dateAfter.Year + " " + dateAfter.Hour + ":" + dateAfter.Minute + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ DateTime dateAfter;
+ string dateBefore = "";
+ int dayOfWeek; // 0 - 6
+ int day; // 1 - 28
+ int year; // 1900 - 2000
+ int month; // 0 - 11
+ int hour; // 0 - 11
+ int minute; // 0 - 59
+ int second; // 0 - 59
+ int timeOfDay; // 0 -1
+ string[] twelveHour = new string[2] {"AM", "PM"};
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: DateTime.Parse(dddd, MMMM dd, yyyy h:mm:ss tt (FullDateTimePattern ex: Thursday, January 03, 2002 12:00:00 AM))");
+
+ try
+ {
+ for(int i=0; i<c_NUM_LOOPS; i++)
+ {
+ day = (TestLibrary.Generator.GetInt32(-55) % 27) + 1;
+ year = (TestLibrary.Generator.GetInt32(-55) % 100) + 1900;
+ month = (TestLibrary.Generator.GetInt32(-55) % 12);
+ hour = (TestLibrary.Generator.GetInt32(-55) % 12);
+ minute = (TestLibrary.Generator.GetInt32(-55) % 60);
+ second = (TestLibrary.Generator.GetInt32(-55) % 60);
+ timeOfDay = (TestLibrary.Generator.GetInt32(-55) % 2);
+
+ // cheat and get day of the week
+ dateAfter = DateTime.Parse( (month+1) + "/" + day + "/" + year);
+ dayOfWeek = (int)dateAfter.DayOfWeek;
+
+ // parse the date
+ dateBefore = (DayOfWeek)dayOfWeek + ", " + c_MONTHS[month] + " " + day + ", " + year + " " + hour + ":" + minute + ":" + second + " " + twelveHour[timeOfDay];
+ dateAfter = DateTime.Parse( dateBefore );
+
+ if ((month+1) != dateAfter.Month
+ || day != dateAfter.Day
+ || year != dateAfter.Year
+ || (DayOfWeek)dayOfWeek != dateAfter.DayOfWeek
+ || (hour + timeOfDay*12) != dateAfter.Hour
+ || minute != dateAfter.Minute
+ || second != dateAfter.Second)
+ {
+ TestLibrary.TestFramework.LogError("009", "DateTime.Parse(" + dateBefore + ") did not equal (" + dateAfter.DayOfWeek + ", " + c_MONTHS[dateAfter.Month-1] + " " + dateAfter.Day + ", " + dateAfter.Year + " " + dateAfter.Hour + ":" + dateAfter.Minute + ":" + dateAfter.Second + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ DateTime dateAfter;
+ string dateBefore = "";
+ int day; // 1 - 28
+ int month; // 1 - 12
+ int year; // 1900 - 2000
+ int hour; // 0 - 11
+ int minute; // 0 - 59
+ int timeOfDay; // 0 -1
+ string[] twelveHour = new string[2] {"AM", "PM"};
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: DateTime.Parse(ex: 1/3/2002 12:00 AM)");
+
+ try
+ {
+ for(int i=0; i<c_NUM_LOOPS; i++)
+ {
+ day = (TestLibrary.Generator.GetInt32(-55) % 27) + 1;
+ year = (TestLibrary.Generator.GetInt32(-55) % 100) + 1900;
+ month = (TestLibrary.Generator.GetInt32(-55) % 12) + 1;
+ hour = (TestLibrary.Generator.GetInt32(-55) % 12);
+ minute = (TestLibrary.Generator.GetInt32(-55) % 60);
+ timeOfDay = (TestLibrary.Generator.GetInt32(-55) % 2);
+
+ // parse the date
+ dateBefore = month + "/" + day + "/" + year + " " + hour + ":" + minute + " " + twelveHour[timeOfDay];
+ dateAfter = DateTime.Parse( dateBefore );
+
+ if (month != dateAfter.Month
+ || day != dateAfter.Day
+ || year != dateAfter.Year
+ || (hour + timeOfDay*12) != dateAfter.Hour
+ || minute != dateAfter.Minute)
+ {
+ TestLibrary.TestFramework.LogError("011", "DateTime.Parse(" + dateBefore + ") did not equal (" + dateAfter.Month + "/" + dateAfter.Day + "/" + dateAfter.Year + " " + dateAfter.Hour + ":" + dateAfter.Minute + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ DateTime dateAfter;
+ string dateBefore = "";
+ int day; // 1 - 28
+ int month; // 1 - 12
+ int year; // 1900 - 2000
+ int hour; // 0 - 11
+ int minute; // 0 - 59
+ int second; // 0 - 59
+ int timeOfDay; // 0 -1
+ string[] twelveHour = new string[2] {"AM", "PM"};
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7: DateTime.Parse(ex: 1/3/2002 12:00:00 AM)");
+
+ try
+ {
+ for(int i=0; i<c_NUM_LOOPS; i++)
+ {
+ day = (TestLibrary.Generator.GetInt32(-55) % 27) + 1;
+ year = (TestLibrary.Generator.GetInt32(-55) % 100) + 1900;
+ month = (TestLibrary.Generator.GetInt32(-55) % 12) + 1;
+ hour = (TestLibrary.Generator.GetInt32(-55) % 12);
+ minute = (TestLibrary.Generator.GetInt32(-55) % 60);
+ second = (TestLibrary.Generator.GetInt32(-55) % 60);
+ timeOfDay = (TestLibrary.Generator.GetInt32(-55) % 2);
+
+ // parse the date
+ dateBefore = month + "/" + day + "/" + year + " " + hour + ":" + minute + ":" + second + " " + twelveHour[timeOfDay];
+ dateAfter = DateTime.Parse( dateBefore );
+
+ if (month != dateAfter.Month
+ || day != dateAfter.Day
+ || year != dateAfter.Year
+ || (hour + timeOfDay*12) != dateAfter.Hour
+ || minute != dateAfter.Minute
+ || second != dateAfter.Second)
+ {
+ TestLibrary.TestFramework.LogError("013", "DateTime.Parse(" + dateBefore + ") did not equal (" + dateAfter.Month + "/" + dateAfter.Day + "/" + dateAfter.Year + " " + dateAfter.Hour + ":" + dateAfter.Minute + ":" + dateAfter.Second + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ DateTime dateAfter;
+ string dateBefore = "";
+ int day; // 1 - 28
+ int month; // 0 - 11
+
+ TestLibrary.TestFramework.BeginScenario("PosTest8: DateTime.Parse(MMMM dd (MonthDayPattern ex: January 03))");
+
+ try
+ {
+ for(int i=0; i<c_NUM_LOOPS; i++)
+ {
+ day = (TestLibrary.Generator.GetInt32(-55) % 27) + 1;
+ month = (TestLibrary.Generator.GetInt32(-55) % 12);
+
+ // parse the date
+ dateBefore = c_MONTHS[month] + " " + day;
+ dateAfter = DateTime.Parse( dateBefore );
+
+ if ((month+1) != dateAfter.Month
+ || day != dateAfter.Day)
+ {
+ TestLibrary.TestFramework.LogError("015", "DateTime.Parse(" + dateBefore + ") did not equal (" + c_MONTHS[dateAfter.Month-1] + " " + dateAfter.Day + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+ DateTime dateAfter;
+ string dateBefore = "";
+ int dayOfWeek; // 0 - 6
+ int day; // 1 - 28
+ int year; // 1900 - 2000
+ int month; // 0 - 11
+ int hour; // 12 - 23
+ int minute; // 0 - 59
+ int second; // 0 - 59
+
+ TestLibrary.TestFramework.BeginScenario("PosTest9: DateTime.Parse(ddd, dd MMM yyyy HH':'mm':'ss 'GMT' (RFC1123Pattern ex: Thu, 03 Jan 2002 00:00:00 GMT))");
+
+ DateTime now = DateTime.Now;
+ int hourshift;
+ if (now - now.ToUniversalTime() < TimeSpan.Zero) // western hemisphere
+ hourshift = +12;
+ else
+ hourshift = 0;
+ try
+ {
+ for(int i=0; i<c_NUM_LOOPS; i++)
+ {
+ day = (TestLibrary.Generator.GetInt32(-55) % 27) + 1;
+ year = (TestLibrary.Generator.GetInt32(-55) % 100) + 1900;
+ month = (TestLibrary.Generator.GetInt32(-55) % 12);
+ hour = (TestLibrary.Generator.GetInt32(-55) % 12) + hourshift; // Parse will convert perform GMT -> PST conversion
+ minute = (TestLibrary.Generator.GetInt32(-55) % 60);
+ second = (TestLibrary.Generator.GetInt32(-55) % 60);
+ dayOfWeek = (TestLibrary.Generator.GetInt32(-55) % 7);
+
+ // cheat and get day of the week
+ dateAfter = DateTime.Parse( (month+1) + "/" + day + "/" + year);
+ dayOfWeek = (int)dateAfter.DayOfWeek;
+
+ // parse the date
+ dateBefore = c_DAYS_SH[dayOfWeek] + ", " + day + " " + c_MONTHS_SH[month] + " " + year + " " + hour + ":" + minute + ":" + second + " GMT";
+ dateAfter = DateTime.Parse( dateBefore );
+
+ if ((month+1) != dateAfter.Month
+ || day != dateAfter.Day
+ || year != dateAfter.Year
+ || (DayOfWeek)dayOfWeek != dateAfter.DayOfWeek
+ || minute != dateAfter.Minute
+ || second != dateAfter.Second)
+ {
+ TestLibrary.TestFramework.LogError("017", "DateTime.Parse(" + dateBefore + ") did not equal (" + c_DAYS_SH[(int)dateAfter.DayOfWeek] + ", " + dateAfter.Day + " " + c_MONTHS_SH[dateAfter.Month-1] + " " + dateAfter.Year + " " + dateAfter.Hour + ":" + dateAfter.Minute + ":" + dateAfter.Second + " GMT)");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest10()
+ {
+ bool retVal = true;
+ DateTime dateAfter;
+ string dateBefore = "";
+ int day; // 1 - 28
+ int month; // 1 - 12
+ int year; // 1900 - 2000
+ int hour; // 0 - 23
+ int minute; // 0 - 59
+ int second; // 0 - 59
+
+ TestLibrary.TestFramework.BeginScenario("PosTest10: DateTime.Parse(yyyy'-'MM'-'dd'T'HH':'mm':'ss (SortableDateTimePattern ex: 2002-01-03T00:00:00))");
+
+ try
+ {
+ for(int i=0; i<c_NUM_LOOPS; i++)
+ {
+ day = (TestLibrary.Generator.GetInt32(-55) % 27) + 1;
+ year = (TestLibrary.Generator.GetInt32(-55) % 100) + 1900;
+ month = (TestLibrary.Generator.GetInt32(-55) % 12) + 1;
+ hour = (TestLibrary.Generator.GetInt32(-55) % 24);
+ minute = (TestLibrary.Generator.GetInt32(-55) % 60);
+ second = (TestLibrary.Generator.GetInt32(-55) % 60);
+
+ // parse the date
+ dateBefore = year + "-" + month + "-" + day + "T" + ((10 > hour) ? "0" : "") + hour + ":" + ((10 > minute) ? "0" : "") + minute + ":" + ((10 > second) ? "0" : "") + second;
+ dateAfter = DateTime.Parse( dateBefore );
+
+ if (month != dateAfter.Month
+ || day != dateAfter.Day
+ || year != dateAfter.Year
+ || hour != dateAfter.Hour
+ || minute != dateAfter.Minute
+ || second != dateAfter.Second)
+ {
+ TestLibrary.TestFramework.LogError("019", "DateTime.Parse(" + dateBefore + ") did not equal (" + dateAfter.Year + "-" + dateAfter.Month + "-" + dateAfter.Day + "T" + dateAfter.Hour + ":" + dateAfter.Minute + ":" + dateAfter.Second + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest11()
+ {
+ bool retVal = true;
+ DateTime dateAfter;
+ string dateBefore = "";
+ int hour; // 0 - 11
+ int minute; // 0 - 59
+ int timeOfDay; // 0 -1
+ string[] twelveHour = new string[2] {"AM", "PM"};
+
+ TestLibrary.TestFramework.BeginScenario("PosTest11: DateTime.Parse(h:mm tt (ShortTimePattern ex: 12:00 AM))");
+
+ try
+ {
+ for(int i=0; i<c_NUM_LOOPS; i++)
+ {
+ hour = (TestLibrary.Generator.GetInt32(-55) % 12);
+ minute = (TestLibrary.Generator.GetInt32(-55) % 60);
+ timeOfDay = (TestLibrary.Generator.GetInt32(-55) % 2);
+
+ // parse the date
+ dateBefore = hour + ":" + minute + " " + twelveHour[timeOfDay];
+ dateAfter = DateTime.Parse( dateBefore );
+
+ if ((hour + timeOfDay*12) != dateAfter.Hour
+ || minute != dateAfter.Minute)
+ {
+ TestLibrary.TestFramework.LogError("021", "DateTime.Parse(" + dateBefore + ") did not equal (" + dateAfter.Hour + ":" + dateAfter.Minute + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("022", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("022", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest12()
+ {
+ bool retVal = true;
+ DateTime dateAfter;
+ string dateBefore = "";
+ int hour; // 0 - 11
+ int minute; // 0 - 59
+ int second; // 0 - 59
+ int timeOfDay; // 0 -1
+ string[] twelveHour = new string[2] {"AM", "PM"};
+
+ TestLibrary.TestFramework.BeginScenario("PosTest12: DateTime.Parse(h:mm:ss tt (LongTimePattern ex: 12:00:00 AM))");
+
+ try
+ {
+ for(int i=0; i<c_NUM_LOOPS; i++)
+ {
+ hour = (TestLibrary.Generator.GetInt32(-55) % 12);
+ minute = (TestLibrary.Generator.GetInt32(-55) % 60);
+ second = (TestLibrary.Generator.GetInt32(-55) % 60);
+ timeOfDay = (TestLibrary.Generator.GetInt32(-55) % 2);
+
+ // parse the date
+ dateBefore = hour + ":" + minute + ":" + second + " " + twelveHour[timeOfDay];
+ dateAfter = DateTime.Parse( dateBefore );
+
+ if ((hour + timeOfDay*12) != dateAfter.Hour
+ || minute != dateAfter.Minute
+ || second != dateAfter.Second)
+ {
+ TestLibrary.TestFramework.LogError("023", "DateTime.Parse(" + dateBefore + ") did not equal (" + dateAfter.Hour + ":" + dateAfter.Minute + ":" + dateAfter.Second + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("024", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("024", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest13()
+ {
+ bool retVal = true;
+ DateTime dateAfter;
+ string dateBefore = "";
+ int day; // 1 - 28
+ int month; // 1 - 12
+ int year; // 1900 - 2000
+ int hour; // 12 - 23
+ int minute; // 0 - 59
+ int second; // 0 - 59
+
+ TestLibrary.TestFramework.BeginScenario("PosTest13: DateTime.Parse(yyyy'-'MM'-'dd HH':'mm':'ss'Z' (UniversalSortableDateTimePattern ex: 2002-01-03 00:00:00Z))");
+
+ DateTime now = DateTime.Now;
+ int hourshift;
+ if (now - now.ToUniversalTime() < TimeSpan.Zero) // western hemisphere
+ hourshift = +12;
+ else
+ hourshift = 0;
+ try
+ {
+ for(int i=0; i<c_NUM_LOOPS; i++)
+ {
+ day = (TestLibrary.Generator.GetInt32(-55) % 27) + 1;
+ year = (TestLibrary.Generator.GetInt32(-55) % 100) + 1900;
+ month = (TestLibrary.Generator.GetInt32(-55) % 12) + 1;
+ hour = (TestLibrary.Generator.GetInt32(-55) % 12) + hourshift; // conversion
+ minute = (TestLibrary.Generator.GetInt32(-55) % 60);
+ second = (TestLibrary.Generator.GetInt32(-55) % 60);
+
+ // parse the date
+ dateBefore = year + "-" + month + "-" + day + " " + ((10 > hour) ? "0" : "") + hour + ":" + ((10 > minute) ? "0" : "") + minute + ":" + ((10 > second) ? "0" : "") + second +"Z";
+ dateAfter = DateTime.Parse( dateBefore );
+
+ if (month != dateAfter.Month
+ || day != dateAfter.Day
+ || year != dateAfter.Year
+ || minute != dateAfter.Minute
+ || second != dateAfter.Second)
+ {
+ TestLibrary.TestFramework.LogError("025", "DateTime.Parse(" + dateBefore + ") did not equal (" + dateAfter.Year + "-" + dateAfter.Month + "-" + dateAfter.Day + " " + dateAfter.Hour + ":" + dateAfter.Minute + ":" + dateAfter.Second + "Z)");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("026", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("026", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest14()
+ {
+ bool retVal = true;
+ DateTime dateAfter;
+ string dateBefore = "";
+ int year; // 1900 - 2000
+ int month; // 0 - 11
+
+ TestLibrary.TestFramework.BeginScenario("PosTest14: DateTime.Parse(MMMM, yyyy (YearMonthPattern ex: January, 2002))");
+
+ try
+ {
+ for(int i=0; i<c_NUM_LOOPS; i++)
+ {
+ year = (TestLibrary.Generator.GetInt32(-55) % 100) + 1900;
+ month = (TestLibrary.Generator.GetInt32(-55) % 12);
+
+ // parse the date
+ dateBefore = c_MONTHS[month] + ", " + year;
+ dateAfter = DateTime.Parse( dateBefore );
+
+ if ((month+1) != dateAfter.Month
+ || year != dateAfter.Year)
+ {
+ TestLibrary.TestFramework.LogError("027", "DateTime.Parse(" + dateBefore + ") did not equal (" + c_MONTHS[dateAfter.Month-1] + ", " + dateAfter.Year + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("028", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("028", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: DateTime.Parse(null)");
+
+ try
+ {
+ DateTime.Parse(null);
+
+ TestLibrary.TestFramework.LogError("029", "DateTime.Parse(null) should have thrown");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("030", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: DateTime.Parse(String.Empty)");
+
+ try
+ {
+ DateTime.Parse(String.Empty);
+
+ TestLibrary.TestFramework.LogError("031", "DateTime.Parse(String.Empty) should have thrown");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("032", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ string strDateTime = "";
+ DateTime dateAfter;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: DateTime.Parse(<garbage>)");
+
+ try
+ {
+ for (int i=0; i<c_NUM_LOOPS; i++)
+ {
+ try
+ {
+ strDateTime = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ dateAfter = DateTime.Parse(strDateTime);
+
+ TestLibrary.TestFramework.LogError("033", "DateTime.Parse(" + strDateTime + ") should have thrown (" + dateAfter + ")");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ // expected
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("034", "Failing date: " + strDateTime);
+ TestLibrary.TestFramework.LogError("034", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimeparse2.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimeparse2.cs
new file mode 100644
index 0000000000..f5b8bb5aea
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimeparse2.cs
@@ -0,0 +1,216 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class DateTimeParse2
+{
+ private const int c_MIN_STRING_LEN = 1;
+ private const int c_MAX_STRING_LEN = 2048;
+ private const int c_NUM_LOOPS = 100;
+
+ public static int Main()
+ {
+ DateTimeParse2 test = new DateTimeParse2();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeParse2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string dateBefore = "";
+ DateTime dateAfter;
+ MyFormater formater = new MyFormater();
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: DateTime.Parse(DateTime.Now, formater)");
+
+ try
+ {
+ dateBefore = DateTime.Now.ToString();
+
+ dateAfter = DateTime.Parse( dateBefore, formater);
+
+ if (!dateBefore.Equals(dateAfter.ToString()))
+ {
+ TestLibrary.TestFramework.LogError("001", "DateTime.Parse(" + dateBefore + ") did not equal " + dateAfter.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string dateBefore = "";
+ DateTime dateAfter;
+ MyFormater formater = new MyFormater();
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: DateTime.Parse(DateTime.Now, null)");
+
+ try
+ {
+ dateBefore = DateTime.Now.ToString();
+
+ dateAfter = DateTime.Parse( dateBefore, null);
+
+ if (!dateBefore.Equals(dateAfter.ToString()))
+ {
+ TestLibrary.TestFramework.LogError("009", "DateTime.Parse(" + dateBefore + ") did not equal " + dateAfter.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: DateTime.Parse(null, formater)");
+
+ try
+ {
+ DateTime.Parse(null, formater);
+
+ TestLibrary.TestFramework.LogError("003", "DateTime.Parse(null) should have thrown");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: DateTime.Parse(String.Empty, formater)");
+
+ try
+ {
+ DateTime.Parse(String.Empty, formater);
+
+ TestLibrary.TestFramework.LogError("005", "DateTime.Parse(String.Empty) should have thrown");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+ string strDateTime = "";
+ DateTime dateAfter;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: DateTime.Parse(<garbage>, formater)");
+
+ try
+ {
+ for (int i=0; i<c_NUM_LOOPS; i++)
+ {
+ try
+ {
+ strDateTime = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ dateAfter = DateTime.Parse(strDateTime, formater);
+
+ TestLibrary.TestFramework.LogError("007", "DateTime.Parse(" + strDateTime + ") should have thrown (" + dateAfter + ")");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ // expected
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Failing date: " + strDateTime);
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+}
+
+public class MyFormater : IFormatProvider
+{
+ public object GetFormat(Type formatType)
+ {
+ if (typeof(IFormatProvider) == formatType)
+ {
+ return this;
+ }
+ else
+ {
+ return null;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimeparse3.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimeparse3.cs
new file mode 100644
index 0000000000..135fb8f167
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimeparse3.cs
@@ -0,0 +1,274 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization ;
+
+public class DateTimeParse3
+{
+ private const int c_MIN_STRING_LEN = 1;
+ private const int c_MAX_STRING_LEN = 2048;
+ private const int c_NUM_LOOPS = 100;
+
+ public static int Main()
+ {
+ DateTimeParse3 test = new DateTimeParse3();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeParse3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ // The NoCurrentDateDefault value is the only value that is useful with
+ // the DateTime.Parse method, because DateTime.Parse always ignores leading,
+ // trailing, and inner white-space characters.
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string dateBefore = "";
+ DateTime dateAfter;
+ MyFormater formater = new MyFormater();
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: DateTime.Parse(DateTime.Now, formater, DateTimeStyles.NoCurrentDateDefault)");
+
+ try
+ {
+ dateBefore = DateTime.Now.ToString();
+
+ dateAfter = DateTime.Parse( dateBefore, formater, DateTimeStyles.NoCurrentDateDefault);
+
+ if (!dateBefore.Equals(dateAfter.ToString()))
+ {
+ TestLibrary.TestFramework.LogError("001", "DateTime.Parse(" + dateBefore + ") did not equal " + dateAfter.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string dateBefore = "";
+ DateTime dateAfter;
+ MyFormater formater = new MyFormater();
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: DateTime.Parse(DateTime.Now, null, DateTimeStyles.NoCurrentDateDefault)");
+
+ try
+ {
+ dateBefore = DateTime.Now.ToString();
+
+ dateAfter = DateTime.Parse( dateBefore, null, DateTimeStyles.NoCurrentDateDefault);
+
+ if (!dateBefore.Equals(dateAfter.ToString()))
+ {
+ TestLibrary.TestFramework.LogError("009", "DateTime.Parse(" + dateBefore + ") did not equal " + dateAfter.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string dateBefore = "";
+ DateTime dateAfter;
+ MyFormater formater = new MyFormater();
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: DateTime.Parse(DateTime.Now, null, <invalid DateTimeStyles>)");
+
+ try
+ {
+ for(int i=-1024; i<1024; i++)
+ {
+ try
+ {
+ // skip the valid values
+ if (0 == (i & (int)DateTimeStyles.AdjustToUniversal)
+ && 0 == (i & (int)DateTimeStyles.AssumeUniversal)
+ && 0 == (i & (int)DateTimeStyles.AllowInnerWhite)
+ && 0 == (i & (int)DateTimeStyles.AllowLeadingWhite)
+ && 0 == (i & (int)DateTimeStyles.AllowTrailingWhite)
+ && 0 == (i & (int)DateTimeStyles.AllowWhiteSpaces)
+ && 0 == (i & (int)DateTimeStyles.NoCurrentDateDefault)
+ && i != (int)DateTimeStyles.None
+ )
+ {
+ dateBefore = DateTime.Now.ToString();
+
+ dateAfter = DateTime.Parse( dateBefore, null, (DateTimeStyles)i);
+
+ if (!dateBefore.Equals(dateAfter.ToString()))
+ {
+ TestLibrary.TestFramework.LogError("011", "DateTime.Parse(" + dateBefore + ", " + (DateTimeStyles)i + ") did not equal " + dateAfter.ToString());
+ retVal = false;
+ }
+ }
+ }
+ catch (System.ArgumentException)
+ {
+ //
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: DateTime.Parse(null, formater, DateTimeStyles.NoCurrentDateDefault)");
+
+ try
+ {
+ DateTime.Parse(null, formater, DateTimeStyles.NoCurrentDateDefault);
+
+ TestLibrary.TestFramework.LogError("003", "DateTime.Parse(null) should have thrown");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: DateTime.Parse(String.Empty, formater, DateTimeStyles.NoCurrentDateDefault)");
+
+ try
+ {
+ DateTime.Parse(String.Empty, formater, DateTimeStyles.NoCurrentDateDefault);
+
+ TestLibrary.TestFramework.LogError("005", "DateTime.Parse(String.Empty) should have thrown");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+ string strDateTime = "";
+ DateTime dateAfter;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: DateTime.Parse(<garbage>, formater, DateTimeStyles.NoCurrentDateDefault)");
+
+ try
+ {
+ for (int i=0; i<c_NUM_LOOPS; i++)
+ {
+ try
+ {
+ strDateTime = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ dateAfter = DateTime.Parse(strDateTime, formater, DateTimeStyles.NoCurrentDateDefault);
+
+ TestLibrary.TestFramework.LogError("007", "DateTime.Parse(" + strDateTime + ") should have thrown (" + dateAfter + ")");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ // expected
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Failing date: " + strDateTime);
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
+public class MyFormater : IFormatProvider
+{
+ public object GetFormat(Type formatType)
+ {
+ if (typeof(IFormatProvider) == formatType)
+ {
+ return this;
+ }
+ else
+ {
+ return null;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimeparseexact1.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimeparseexact1.cs
new file mode 100644
index 0000000000..b249da69a6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimeparseexact1.cs
@@ -0,0 +1,964 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+public class DateTimeParseExact1
+{
+ private const int c_MIN_STRING_LEN = 1;
+ private const int c_MAX_STRING_LEN = 2048;
+ private const int c_NUM_LOOPS = 100;
+ private static CultureInfo CurrentCulture = TestLibrary.Utilities.CurrentCulture;
+ private static CultureInfo EnglishCulture = new CultureInfo("en-US");
+ private static string[] c_MONTHS = EnglishCulture.DateTimeFormat.MonthGenitiveNames;
+ private static string[] c_MONTHS_SH = EnglishCulture.DateTimeFormat.AbbreviatedMonthGenitiveNames;
+ private static string[] c_DAYS_SH = EnglishCulture.DateTimeFormat.AbbreviatedDayNames;
+
+ public static int Main()
+ {
+ DateTimeParseExact1 test = new DateTimeParseExact1();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeParseExact1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest15() && retVal;
+
+ TestLibrary.Utilities.CurrentCulture = EnglishCulture;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest12() && retVal;
+ retVal = PosTest13() && retVal;
+ retVal = PosTest14() && retVal;
+ TestLibrary.Utilities.CurrentCulture = CurrentCulture;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+ string dateBefore = "";
+ DateTime dateAfter;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: DateTime.ParseExact(G, DateTime.Now)");
+
+ try
+ {
+ dateBefore = DateTime.Now.ToString();
+
+ dateAfter = DateTime.ParseExact( dateBefore, "G", formater );
+
+ if (!dateBefore.Equals(dateAfter.ToString()))
+ {
+ TestLibrary.TestFramework.LogError("001", "DateTime.ParseExact(" + dateBefore + ") did not equal " + dateAfter.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+ DateTime dateAfter;
+ string dateBefore = "";
+ int day; // 1 - 29
+ int year; // 1900 - 2000
+ int month; // 1 - 12
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: DateTime.ParseExact(d, M/d/yyyy (ShortDatePattern ex: 1/3/2002))");
+
+ // Skipping test because format 'd' on some platforms represents the year using two digits,
+ // this cause extrange results. Some dates are shifted 1 hour backward. See DDB 173277 - MAC bug
+ // Culture could be customized and dateseparator may be different than / or MM is used in the format
+ if (String.Compare(TestLibrary.Utilities.CurrentCulture.DateTimeFormat.ShortDatePattern, "M/d/yyyy", StringComparison.Ordinal) != 0)
+ {
+ TestLibrary.TestFramework.LogInformation("Skipping test case, ShortDatePattern: " + TestLibrary.Utilities.CurrentCulture.DateTimeFormat.ShortDatePattern);
+ return retVal;
+ }
+
+ try
+ {
+ for(int i=0; i<c_NUM_LOOPS; i++)
+ {
+ day = (TestLibrary.Generator.GetInt32(-55) % 28) + 1;
+ year = (TestLibrary.Generator.GetInt32(-55) % 100) + 1900;
+ month = (TestLibrary.Generator.GetInt32(-55) % 12) + 1;
+
+ dateBefore = month + "/" + day + "/" + year;
+ dateAfter = DateTime.ParseExact( dateBefore, "d", formater);
+
+ if (month != dateAfter.Month || day != dateAfter.Day || year != dateAfter.Year)
+ {
+ TestLibrary.TestFramework.LogError("003", "DateTime.ParseExact(" + dateBefore + ") did not equal " + dateAfter.ToString() + ". Got M="+dateAfter.Month+", d="+dateAfter.Day+", y="+dateAfter.Year);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+ DateTime dateAfter;
+ string dateBefore = "";
+ int dayOfWeek; // 0 - 6
+ int day; // 1 - 28
+ int year; // 1900 - 2000
+ int month; // 0 - 11
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: DateTime.ParseExact(D, dddd, MMMM dd, yyyy (LongDatePattern ex: Thursday, January 03, 2002))");
+ // Culture could be customized
+ if (String.Compare(TestLibrary.Utilities.CurrentCulture.DateTimeFormat.LongDatePattern, "dddd, MMMM dd, yyyy", StringComparison.Ordinal) != 0 &&
+ String.Compare(TestLibrary.Utilities.CurrentCulture.DateTimeFormat.LongDatePattern, "dddd, MMMM d, yyyy", StringComparison.Ordinal) != 0)
+ {
+ TestLibrary.TestFramework.LogInformation("Skipping test case, LongDatePattern: " + TestLibrary.Utilities.CurrentCulture.DateTimeFormat.LongDatePattern);
+ return retVal;
+ }
+
+ try
+ {
+ for(int i=0; i<c_NUM_LOOPS; i++)
+ {
+ day = (TestLibrary.Generator.GetInt32(-55) % 27) + 1;
+ year = (TestLibrary.Generator.GetInt32(-55) % 100) + 1900;
+ month = (TestLibrary.Generator.GetInt32(-55) % 12);
+
+ // cheat and get day of the week
+ dateAfter = DateTime.Parse( (month+1) + "/" + day + "/" + year);
+ dayOfWeek = (int)dateAfter.DayOfWeek;
+
+ // parse the date
+ dateBefore = (DayOfWeek)dayOfWeek + ", " + c_MONTHS[month] + " " +
+ (String.Compare(TestLibrary.Utilities.CurrentCulture.DateTimeFormat.LongDatePattern, "dddd, MMMM dd, yyyy", StringComparison.Ordinal) == 0 && 10 > day ? "0" : "") + day + ", " + year;
+ dateAfter = DateTime.ParseExact( dateBefore, "D", formater );
+
+ if ((month+1) != dateAfter.Month || day != dateAfter.Day || year != dateAfter.Year || (DayOfWeek)dayOfWeek != dateAfter.DayOfWeek)
+ {
+ TestLibrary.TestFramework.LogError("005", "DateTime.ParseExact(" + dateBefore + ") did not equal (" + dateAfter.DayOfWeek + ", " + c_MONTHS[dateAfter.Month-1] + " " + dateAfter.Day + ", " + dateAfter.Year + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+ DateTime dateAfter;
+ string dateBefore = "";
+ int dayOfWeek; // 0 - 6
+ int day; // 1 - 28
+ int year; // 1900 - 2000
+ int month; // 0 - 11
+ int hour; // 0 - 11
+ int minute; // 0 - 59
+ int second; // 0 - 59
+ int timeOfDay; // 0 -1
+ string[] twelveHour = new string[2] {"AM", "PM"};
+ DateTime dateBeforeForValidity;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: DateTime.ParseExact(F, dddd, MMMM dd, yyyy h:mm:ss tt (FullDateTimePattern ex: Thursday, January 03, 2002 12:00:00 AM))");
+
+ // Culture could be customized
+ if (!((String.Compare(TestLibrary.Utilities.CurrentCulture.DateTimeFormat.LongDatePattern, "dddd, MMMM dd, yyyy", StringComparison.Ordinal) == 0 ||
+ String.Compare(TestLibrary.Utilities.CurrentCulture.DateTimeFormat.LongDatePattern, "dddd, MMMM d, yyyy", StringComparison.Ordinal) == 0) &&
+ (String.Compare(TestLibrary.Utilities.CurrentCulture.DateTimeFormat.LongTimePattern, "hh:mm:ss tt", StringComparison.Ordinal) == 0 ||
+ String.Compare(TestLibrary.Utilities.CurrentCulture.DateTimeFormat.LongTimePattern, "h:mm:ss tt", StringComparison.Ordinal) == 0)))
+
+ {
+ TestLibrary.TestFramework.LogInformation("Skipping test case, " +
+ " LongDatePattern: " + TestLibrary.Utilities.CurrentCulture.DateTimeFormat.LongDatePattern +
+ " LongTimePattern: " + TestLibrary.Utilities.CurrentCulture.DateTimeFormat.LongTimePattern);
+ return retVal;
+ }
+
+ try
+ {
+ for(int i=0; i<c_NUM_LOOPS; i++)
+ {
+ day = (TestLibrary.Generator.GetInt32(-55) % 27) + 1;
+ year = (TestLibrary.Generator.GetInt32(-55) % 100) + 1900;
+ month = (TestLibrary.Generator.GetInt32(-55) % 12);
+ hour = (TestLibrary.Generator.GetInt32(-55) % 12);
+ minute = (TestLibrary.Generator.GetInt32(-55) % 60);
+ second = (TestLibrary.Generator.GetInt32(-55) % 60);
+ timeOfDay = (TestLibrary.Generator.GetInt32(-55) % 2);
+
+ dateBeforeForValidity = new DateTime(year, month + 1, day, hour, minute, second);
+
+ // cheat and get day of the week
+ dateAfter = DateTime.Parse( (month+1) + "/" + day + "/" + year);
+ dayOfWeek = (int)dateAfter.DayOfWeek;
+
+ // parse the date
+ dateBefore = (DayOfWeek)dayOfWeek + ", " +
+ c_MONTHS[month] + " " +
+ (String.Compare(TestLibrary.Utilities.CurrentCulture.DateTimeFormat.LongDatePattern, "dddd, MMMM dd, yyyy", StringComparison.Ordinal) == 0 && 10 > day ? "0" : "") + day + ", " +
+ year + " " +
+ (String.Compare(TestLibrary.Utilities.CurrentCulture.DateTimeFormat.LongTimePattern, "hh:mm:ss tt", StringComparison.Ordinal) == 0 && 10 > hour ? "0" : "") + hour + ":" +
+ (10 > minute ? "0" : "") + minute + ":" +
+ (10 > second ? "0" : "") + second + " " + twelveHour[timeOfDay];
+
+ if (!TestLibrary.Utilities.IsWindows)
+ {
+ dateAfter = DateTime.Parse(dateBefore);
+ TimeSpan span = dateAfter - dateAfter.ToUniversalTime();
+ String strSpan = (span.Duration()==span ? "+" : "-") +
+ (10 > span.Duration().Hours ? "0" : "") + span.Duration().Hours +
+ ":" + (10 > span.Minutes ? "0" : "") + span.Minutes;
+ dateBefore += " " + strSpan;
+ }
+
+ dateAfter = DateTime.ParseExact( dateBefore, "F", formater );
+
+ //Dev10 Bug 686124: For mac, the ambiguous and invalid points in time on the Mac
+ if (false == TimeZoneInfo.Local.IsInvalidTime(dateBeforeForValidity))
+ {
+ if ((month + 1) != dateAfter.Month
+ || day != dateAfter.Day
+ || year != dateAfter.Year
+ || (DayOfWeek)dayOfWeek != dateAfter.DayOfWeek
+ || (hour + timeOfDay * 12) != dateAfter.Hour
+ || minute != dateAfter.Minute
+ || second != dateAfter.Second)
+ {
+ TestLibrary.TestFramework.LogError("009", "DateTime.ParseExact(" + dateBefore + ") did not equal (" + dateAfter.DayOfWeek + ", " + c_MONTHS[dateAfter.Month - 1] + " " + dateAfter.Day + ", " + dateAfter.Year + " " + dateAfter.Hour + ":" + dateAfter.Minute + ":" + dateAfter.Second + ")");
+ retVal = false;
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+ DateTime dateAfter;
+ string dateBefore = "";
+ int day; // 1 - 28
+ int month; // 1 - 12
+ int year; // 1900 - 2000
+ int hour; // 0 - 11
+ int minute; // 0 - 59
+ int second; // 0 - 59
+ int timeOfDay; // 0 -1
+ string[] twelveHour = new string[2] {"AM", "PM"};
+
+ DateTime dateBeforeForValidity;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7: DateTime.ParseExact(G, ex: 1/3/2002 12:00:00 AM)");
+
+ // Culture could be customized
+ if (!(String.Compare(TestLibrary.Utilities.CurrentCulture.DateTimeFormat.ShortDatePattern, "M/d/yyyy", StringComparison.Ordinal) == 0 &&
+ (String.Compare(TestLibrary.Utilities.CurrentCulture.DateTimeFormat.LongTimePattern, "hh:mm:ss tt", StringComparison.Ordinal) == 0 ||
+ String.Compare(TestLibrary.Utilities.CurrentCulture.DateTimeFormat.LongTimePattern, "h:mm:ss tt", StringComparison.Ordinal) == 0)))
+ {
+ TestLibrary.TestFramework.LogInformation("Skipping test case, " +
+ " ShortDatePattern: " + TestLibrary.Utilities.CurrentCulture.DateTimeFormat.ShortDatePattern +
+ " LongTimePattern: " + TestLibrary.Utilities.CurrentCulture.DateTimeFormat.LongTimePattern);
+ return retVal;
+ }
+
+ try
+ {
+ for(int i=0; i<c_NUM_LOOPS; i++)
+ {
+ day = (TestLibrary.Generator.GetInt32(-55) % 27) + 1;
+ year = (TestLibrary.Generator.GetInt32(-55) % 100) + 1930;
+ month = (TestLibrary.Generator.GetInt32(-55) % 12) + 1;
+ hour = (TestLibrary.Generator.GetInt32(-55) % 12);
+ minute = (TestLibrary.Generator.GetInt32(-55) % 60);
+ second = (TestLibrary.Generator.GetInt32(-55) % 60);
+ timeOfDay = (TestLibrary.Generator.GetInt32(-55) % 2);
+ dateBeforeForValidity = new DateTime(year, month, day, hour, minute, second);
+
+ // parse the date
+ dateBefore = month + "/" + + day + "/" + year + " " +
+ (String.Compare(TestLibrary.Utilities.CurrentCulture.DateTimeFormat.LongTimePattern, "hh:mm:ss tt", StringComparison.Ordinal) == 0 && 10 > hour ? "0" : "") + hour + ":" +
+ (10 > minute ? "0" : "") + minute + ":" + (10 > second ? "0" : "") + second + " " + twelveHour[timeOfDay];
+
+ if (!TestLibrary.Utilities.IsWindows)
+ {
+ dateAfter = DateTime.Parse(dateBefore);
+ TimeSpan span = dateAfter - dateAfter.ToUniversalTime();
+ String strSpan = (span.Duration()==span ? "+" : "-") +
+ (10 > span.Duration().Hours ? "0" : "") + span.Duration().Hours +
+ ":" + (10 > span.Minutes ? "0" : "") + span.Minutes;
+ dateBefore += " " + strSpan;
+ }
+
+ dateAfter = DateTime.ParseExact(dateBefore, "G", formater);
+
+ //Dev10 Bug 686124: For mac, the ambiguous and invalid points in time on the Mac
+ if (false == TimeZoneInfo.Local.IsInvalidTime(dateBeforeForValidity))
+ {
+ if (month != dateAfter.Month
+ || day != dateAfter.Day
+ || year != dateAfter.Year
+ || (hour + timeOfDay * 12) != dateAfter.Hour
+ || minute != dateAfter.Minute
+ || second != dateAfter.Second)
+ {
+ TestLibrary.TestFramework.LogError("013", "DateTime.ParseExact(" + dateBefore + ") did not equal (" + dateAfter.Month + "/" + dateAfter.Day + "/" + dateAfter.Year + " " + dateAfter.Hour + ":" + dateAfter.Minute + ":" + dateAfter.Second + ")");
+ retVal = false;
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+ DateTime dateAfter;
+ string dateBefore = "";
+ int day; // 1 - 28
+ int month; // 0 - 11
+
+ TestLibrary.TestFramework.BeginScenario("PosTest8: DateTime.ParseExact(m, MMMM dd (MonthDayPattern ex: January 03))");
+
+ // Culture could be customized
+ if (String.Compare(TestLibrary.Utilities.CurrentCulture.DateTimeFormat.MonthDayPattern, "MMMM dd", StringComparison.Ordinal) != 0)
+ {
+ TestLibrary.TestFramework.LogInformation("Skipping test case, MonthDayPattern: " + TestLibrary.Utilities.CurrentCulture.DateTimeFormat.MonthDayPattern);
+ return retVal;
+ }
+
+ try
+ {
+ for(int i=0; i<c_NUM_LOOPS; i++)
+ {
+ day = (TestLibrary.Generator.GetInt32(-55) % 27) + 1;
+ month = (TestLibrary.Generator.GetInt32(-55) % 12);
+
+ // parse the date
+ dateBefore = c_MONTHS[month] + " " + (10>day?"0":"") + day;
+ dateAfter = DateTime.ParseExact( dateBefore, "m", formater );
+
+ if ((month+1) != dateAfter.Month
+ || day != dateAfter.Day)
+ {
+ TestLibrary.TestFramework.LogError("015", "DateTime.ParseExact(" + dateBefore + ") did not equal (" + c_MONTHS[dateAfter.Month-1] + " " + dateAfter.Day + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+ DateTime dateAfter;
+ string dateBefore = "";
+ int dayOfWeek; // 0 - 6
+ int day; // 1 - 28
+ int year; // 1900 - 2000
+ int month; // 0 - 11
+ int hour; // 12 - 23
+ int minute; // 0 - 59
+ int second; // 0 - 59
+ DateTime dateBeforeForValidity;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest9: DateTime.ParseExact(R, ddd, dd MMM yyyy HH':'mm':'ss 'GMT' (RFC1123Pattern ex: Thu, 03 Jan 2002 00:00:00 GMT))");
+
+ // if there is any change in RFC1123Pattern, this test case would fail. The formatting should be updated!!!
+ if (String.Compare(TestLibrary.Utilities.CurrentCulture.DateTimeFormat.RFC1123Pattern, "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'", StringComparison.Ordinal) != 0)
+ {
+ TestLibrary.TestFramework.LogError("PosTest9", "Skipping test case, RFC1123Pattern: " + TestLibrary.Utilities.CurrentCulture.DateTimeFormat.RFC1123Pattern);
+ return false;
+ }
+
+ try
+ {
+ for(int i=0; i<c_NUM_LOOPS; i++)
+ {
+ day = (TestLibrary.Generator.GetInt32(-55) % 27) + 1;
+ year = (TestLibrary.Generator.GetInt32(-55) % 100) + 1900;
+ month = (TestLibrary.Generator.GetInt32(-55) % 12);
+ hour = (TestLibrary.Generator.GetInt32(-55) % 12) + 12; // Parse will convert perform GMT -> PST conversion
+ minute = (TestLibrary.Generator.GetInt32(-55) % 60);
+ second = (TestLibrary.Generator.GetInt32(-55) % 60);
+ dayOfWeek = (TestLibrary.Generator.GetInt32(-55) % 7);
+
+ dateBeforeForValidity = new DateTime(year, month + 1, day, hour, minute, second);
+
+ // cheat and get day of the week
+ dateAfter = DateTime.Parse( (month+1) + "/" + day + "/" + year);
+ dayOfWeek = (int)dateAfter.DayOfWeek;
+
+ // parse the date
+ dateBefore = c_DAYS_SH[dayOfWeek] + ", " + (10>day?"0":"") + day + " " + c_MONTHS_SH[month] + " " + year + " " + (10>hour?"0":"") + hour + ":" + (10>minute?"0":"") + minute + ":" + (10>second?"0":"") + second + " GMT";
+ dateAfter = DateTime.ParseExact( dateBefore, "R", formater );
+
+ //Dev10 Bug 686124: For mac, the ambiguous and invalid points in time on the Mac
+ if (false == TimeZoneInfo.Local.IsInvalidTime(dateBeforeForValidity))
+ {
+ if ((month + 1) != dateAfter.Month
+ || day != dateAfter.Day
+ || year != dateAfter.Year
+ || (DayOfWeek)dayOfWeek != dateAfter.DayOfWeek
+ || minute != dateAfter.Minute
+ || second != dateAfter.Second)
+ {
+ TestLibrary.TestFramework.LogError("017", "DateTime.ParseExact(" + dateBefore + ") did not equal (" + c_DAYS_SH[(int)dateAfter.DayOfWeek] + ", " + dateAfter.Day + " " + c_MONTHS_SH[dateAfter.Month - 1] + " " + dateAfter.Year + " " + dateAfter.Hour + ":" + dateAfter.Minute + ":" + dateAfter.Second + " GMT)");
+ retVal = false;
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest10()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+ DateTime dateAfter;
+ string dateBefore = "";
+ int day; // 1 - 28
+ int month; // 1 - 12
+ int year; // 1900 - 2000
+ int hour; // 0 - 23
+ int minute; // 0 - 59
+ int second; // 0 - 59
+ DateTime dateBeforeForValidity;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest10: DateTime.ParseExact(s, yyyy'-'MM'-'dd'T'HH':'mm':'ss (SortableDateTimePattern ex: 2002-01-03T00:00:00))");
+ // if there is any change in SortableDateTimePattern, this test case would fail, The formatting should be updated!!!
+ if (String.Compare(TestLibrary.Utilities.CurrentCulture.DateTimeFormat.SortableDateTimePattern, "yyyy'-'MM'-'dd'T'HH':'mm':'ss", StringComparison.Ordinal) != 0)
+ {
+ TestLibrary.TestFramework.LogError("PosTest10", "Skipping test case, SortableDateTimePattern: " + TestLibrary.Utilities.CurrentCulture.DateTimeFormat.SortableDateTimePattern);
+ return false;
+ }
+
+ try
+ {
+ for(int i=0; i<c_NUM_LOOPS; i++)
+ {
+ day = (TestLibrary.Generator.GetInt32(-55) % 27) + 1;
+ year = (TestLibrary.Generator.GetInt32(-55) % 100) + 1900;
+ month = (TestLibrary.Generator.GetInt32(-55) % 12) + 1;
+ hour = (TestLibrary.Generator.GetInt32(-55) % 24);
+ minute = (TestLibrary.Generator.GetInt32(-55) % 60);
+ second = (TestLibrary.Generator.GetInt32(-55) % 60);
+
+ dateBeforeForValidity = new DateTime(year, month, day, hour, minute, second);
+
+ // parse the date
+ dateBefore = year + "-" + (10>month?"0":"") + month + "-" + (10>day?"0":"") + day + "T" + ((10 > hour) ? "0" : "") + hour + ":" + ((10 > minute) ? "0" : "") + minute + ":" + ((10 > second) ? "0" : "") + second;
+ dateAfter = DateTime.ParseExact( dateBefore, "s", formater );
+
+ //Dev10 Bug 686124: For mac, the ambiguous and invalid points in time on the Mac
+ if (false == TimeZoneInfo.Local.IsInvalidTime(dateBeforeForValidity))
+ {
+ if (month != dateAfter.Month
+ || day != dateAfter.Day
+ || year != dateAfter.Year
+ || hour != dateAfter.Hour
+ || minute != dateAfter.Minute
+ || second != dateAfter.Second)
+ {
+ TestLibrary.TestFramework.LogError("019", "DateTime.ParseExact(" + dateBefore + ") did not equal (" + dateAfter.Year + "-" + dateAfter.Month + "-" + dateAfter.Day + "T" + dateAfter.Hour + ":" + dateAfter.Minute + ":" + dateAfter.Second + ")");
+ retVal = false;
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest12()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+ DateTime dateAfter;
+ string dateBefore = "";
+ int hour; // 0 - 11
+ int minute; // 0 - 59
+ int second; // 0 - 59
+ int timeOfDay; // 0 -1
+ string[] twelveHour = new string[2] {"AM", "PM"};
+
+ TestLibrary.TestFramework.BeginScenario("PosTest12: DateTime.ParseExact(T, h:mm:ss tt (LongTimePattern ex: 12:00:00 AM))");
+
+ // Culture could be customized
+ if (String.Compare(TestLibrary.Utilities.CurrentCulture.DateTimeFormat.LongTimePattern, "hh:mm:ss tt", StringComparison.Ordinal) != 0 &&
+ String.Compare(TestLibrary.Utilities.CurrentCulture.DateTimeFormat.LongTimePattern, "h:mm:ss tt", StringComparison.Ordinal) != 0)
+ {
+ TestLibrary.TestFramework.LogInformation("Skipping test case, " + " LongTimePattern: " + TestLibrary.Utilities.CurrentCulture.DateTimeFormat.LongTimePattern);
+ return retVal;
+ }
+
+ try
+ {
+ for(int i=0; i<c_NUM_LOOPS; i++)
+ {
+ hour = (TestLibrary.Generator.GetInt32(-55) % 12);
+ minute = (TestLibrary.Generator.GetInt32(-55) % 60);
+ second = (TestLibrary.Generator.GetInt32(-55) % 60);
+ timeOfDay = (TestLibrary.Generator.GetInt32(-55) % 2);
+
+ // parse the date
+ int newHour = hour==0?12:hour;
+ dateBefore = (String.Compare(TestLibrary.Utilities.CurrentCulture.DateTimeFormat.LongTimePattern, "hh:mm:ss tt", StringComparison.Ordinal) == 0 && 10 > newHour ? "0" : "") + newHour +
+ ":" + (10 > minute ? "0" : "") + minute + ":" + (10 > second ? "0" : "") + second + " " + twelveHour[timeOfDay];
+ if (!TestLibrary.Utilities.IsWindows)
+ {
+ dateAfter = DateTime.Parse(dateBefore);
+ TimeSpan span = dateAfter - dateAfter.ToUniversalTime();
+ String strSpan = (span.Duration()==span ? "+" : "-") +
+ (10 > span.Duration().Hours ? "0" : "") + span.Duration().Hours +
+ ":" + (10 > span.Minutes ? "0" : "") + span.Minutes;
+ dateBefore += " " + strSpan;
+ }
+
+ dateAfter = DateTime.ParseExact(dateBefore, "T", formater);
+
+ if ((hour + timeOfDay*12) != dateAfter.Hour
+ || minute != dateAfter.Minute
+ || second != dateAfter.Second)
+ {
+ TestLibrary.TestFramework.LogError("023", "DateTime.ParseExact(" + dateBefore + ") did not equal (" + dateAfter.Hour + ":" + dateAfter.Minute + ":" + dateAfter.Second + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("024", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("024", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest13()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+ DateTime dateAfter;
+ string dateBefore = "";
+ int day; // 1 - 28
+ int month; // 1 - 12
+ int year; // 1900 - 2000
+ int hour; // 12 - 23
+ int minute; // 0 - 59
+ int second; // 0 - 59
+ DateTime dateBeforeForValidity;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest13: DateTime.ParseExact(u, yyyy'-'MM'-'dd HH':'mm':'ss'Z' (UniversalSortableDateTimePattern ex: 2002-01-03 00:00:00Z))");
+
+ // if there is any change in SortableDateTimePattern, this test case would fail, The formatting should be updated!!!
+ if (String.Compare(TestLibrary.Utilities.CurrentCulture.DateTimeFormat.UniversalSortableDateTimePattern, "yyyy'-'MM'-'dd HH':'mm':'ss'Z'", StringComparison.Ordinal) != 0)
+ {
+ TestLibrary.TestFramework.LogError("PosTest13", "Skipping test case, UniversalSortableDateTimePattern: " + TestLibrary.Utilities.CurrentCulture.DateTimeFormat.UniversalSortableDateTimePattern);
+ return false;
+ }
+
+ try
+ {
+ for(int i=0; i<c_NUM_LOOPS; i++)
+ {
+ day = (TestLibrary.Generator.GetInt32(-55) % 27) + 1;
+ year = (TestLibrary.Generator.GetInt32(-55) % 100) + 1900;
+ month = (TestLibrary.Generator.GetInt32(-55) % 12) + 1;
+ hour = (TestLibrary.Generator.GetInt32(-55) % 12) + 12; // conversion
+ minute = (TestLibrary.Generator.GetInt32(-55) % 60);
+ second = (TestLibrary.Generator.GetInt32(-55) % 60);
+
+ dateBeforeForValidity = new DateTime(year, month, day, hour, minute, second);
+
+ // parse the date
+ dateBefore = year + "-" + (10>month?"0":"") + month + "-" + (10>day?"0":"") + day + " " + ((10 > hour) ? "0" : "") + hour + ":" + ((10 > minute) ? "0" : "") + minute + ":" + ((10 > second) ? "0" : "") + second +"Z";
+ dateAfter = DateTime.ParseExact( dateBefore, "u", formater );
+
+ //Dev10 Bug 686124: For mac, the ambiguous and invalid points in time on the Mac
+ if (false == TimeZoneInfo.Local.IsInvalidTime(dateBeforeForValidity))
+ {
+ if (month != dateAfter.Month
+ || day != dateAfter.Day
+ || year != dateAfter.Year
+ || minute != dateAfter.Minute
+ || second != dateAfter.Second)
+ {
+ TestLibrary.TestFramework.LogError("025", "DateTime.ParseExact(" + dateBefore + ") did not equal (" + dateAfter.Year + "-" + dateAfter.Month + "-" + dateAfter.Day + " " + dateAfter.Hour + ":" + dateAfter.Minute + ":" + dateAfter.Second + "Z)");
+ retVal = false;
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("026", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("026", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest14()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+ DateTime dateAfter;
+ string dateBefore = "";
+ int year; // 1900 - 2000
+ int month; // 0 - 11
+
+ TestLibrary.TestFramework.BeginScenario("PosTest14: DateTime.ParseExact(y, MMMM, yyyy (YearMonthPattern ex: January, 2002))");
+
+ // Culture could be customized
+ if (String.Compare(TestLibrary.Utilities.CurrentCulture.DateTimeFormat.YearMonthPattern, "MMMM, yyyy", StringComparison.Ordinal) != 0 )
+ {
+ TestLibrary.TestFramework.LogInformation("Skipping test case, YearMonthPattern: " + TestLibrary.Utilities.CurrentCulture.DateTimeFormat.YearMonthPattern);
+ return retVal;
+ }
+
+ try
+ {
+ for(int i=0; i<c_NUM_LOOPS; i++)
+ {
+ year = (TestLibrary.Generator.GetInt32(-55) % 100) + 1900;
+ month = (TestLibrary.Generator.GetInt32(-55) % 12);
+
+ dateBefore = c_MONTHS[month] + ", " + year;
+ dateAfter = DateTime.ParseExact(dateBefore, "y", formater);
+
+ if ((month+1) != dateAfter.Month
+ || year != dateAfter.Year)
+ {
+ TestLibrary.TestFramework.LogError("027", "DateTime.ParseExact(" + dateBefore + ") did not equal (" + c_MONTHS[dateAfter.Month-1] + ", " + dateAfter.Year + ")-("+dateAfter.ToString()+")-DST("+dateAfter.IsDaylightSavingTime()+")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("028", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("028", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest15()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+ string dateBefore = "";
+ DateTime dateAfter;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest15: DateTime.ParseExact(G, DateTime.Now, null)");
+
+ try
+ {
+ dateBefore = DateTime.Now.ToString();
+
+ dateAfter = DateTime.ParseExact( dateBefore, "G", null );
+
+ if (!dateBefore.Equals(dateAfter.ToString()))
+ {
+ TestLibrary.TestFramework.LogError("101", "DateTime.ParseExact(" + dateBefore + ") did not equal " + dateAfter.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: DateTime.ParseExact(null)");
+
+ try
+ {
+ DateTime.ParseExact(null, "d", formater);
+
+ TestLibrary.TestFramework.LogError("029", "DateTime.ParseExact(null) should have thrown");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("030", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: DateTime.ParseExact(String.Empty)");
+
+ try
+ {
+ DateTime.ParseExact(String.Empty, "d", formater);
+
+ TestLibrary.TestFramework.LogError("031", "DateTime.ParseExact(String.Empty) should have thrown");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("032", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+ string strDateTime = "";
+ DateTime dateAfter;
+ string[] formats = new string[17] {"d", "D", "f", "F", "g", "G", "m", "M", "r", "R", "s", "t", "T", "u", "U", "y", "Y"};
+ string format;
+ int formatIndex;
+
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: DateTime.ParseExact(<garbage>)");
+
+ try
+ {
+ for (int i=0; i<c_NUM_LOOPS; i++)
+ {
+ try
+ {
+ formatIndex = TestLibrary.Generator.GetInt32(-55) % 34;
+
+ if (0 <= formatIndex && formatIndex < 17)
+ {
+ format = formats[formatIndex];
+ }
+ else
+ {
+ format = TestLibrary.Generator.GetChar(-55) + "";
+ }
+
+ strDateTime = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ dateAfter = DateTime.ParseExact(strDateTime, format, formater);
+
+ TestLibrary.TestFramework.LogError("033", "DateTime.ParseExact(" + strDateTime + ", "+ format + ") should have thrown (" + dateAfter + ")");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ // expected
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("034", "Failing date: " + strDateTime);
+ TestLibrary.TestFramework.LogError("034", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+ string dateBefore = "";
+ DateTime dateAfter;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: DateTime.ParseExact(\"\", DateTime.Now, formater)");
+
+ try
+ {
+ dateBefore = DateTime.Now.ToString();
+
+ dateAfter = DateTime.ParseExact( dateBefore, "", formater );
+
+ TestLibrary.TestFramework.LogError("103", "DateTime.ParseExact(" + dateBefore + ") should have thrown " + dateAfter.ToString());
+ retVal = false;
+ }
+ catch (System.FormatException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+ string dateBefore = "";
+ DateTime dateAfter;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: DateTime.ParseExact(null, DateTime.Now, formater)");
+
+ try
+ {
+ dateBefore = DateTime.Now.ToString();
+
+ dateAfter = DateTime.ParseExact( dateBefore, null, formater );
+
+ TestLibrary.TestFramework.LogError("105", "DateTime.ParseExact(" + dateBefore + ") should have thrown " + dateAfter.ToString());
+ retVal = false;
+ }
+ catch (System.ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
+public class MyFormater : IFormatProvider
+{
+ public object GetFormat(Type formatType)
+ {
+ if (typeof(IFormatProvider) == formatType)
+ {
+ return this;
+ }
+ else
+ {
+ return null;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimeparseexact2.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimeparseexact2.cs
new file mode 100644
index 0000000000..53ee48b932
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimeparseexact2.cs
@@ -0,0 +1,285 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+public class DateTimeParseExact2
+{
+ private const int c_MIN_STRING_LEN = 1;
+ private const int c_MAX_STRING_LEN = 2048;
+ private const int c_NUM_LOOPS = 100;
+ private static DateTimeStyles[] c_STYLES = new DateTimeStyles[7] {DateTimeStyles.AdjustToUniversal, DateTimeStyles.AllowInnerWhite, DateTimeStyles.AllowLeadingWhite, DateTimeStyles.AllowTrailingWhite , DateTimeStyles.AllowWhiteSpaces, DateTimeStyles.NoCurrentDateDefault, DateTimeStyles.None };
+
+
+ public static int Main()
+ {
+ DateTimeParseExact2 test = new DateTimeParseExact2();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeParseExact2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+ string dateBefore = "";
+ DateTime dateAfter;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: DateTime.ParseExact(DateTime.Now)");
+
+ try
+ {
+ for(int i=0; i<c_STYLES.Length; i++)
+ {
+ dateBefore = DateTime.Now.ToString();
+
+ dateAfter = DateTime.ParseExact( dateBefore, "G", formater, c_STYLES[i] );
+
+ if (!TestLibrary.Utilities.IsWindows &&
+ (c_STYLES[i]==DateTimeStyles.AdjustToUniversal)) // Mac prints offset
+ {
+ dateAfter = dateAfter.ToLocalTime();
+ }
+
+ if (!dateBefore.Equals(dateAfter.ToString()))
+ {
+ TestLibrary.TestFramework.LogError("001", "DateTime.ParseExact(" + dateBefore + ", G, " + c_STYLES[i] + ") did not equal " + dateAfter.ToString());
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string dateBefore = "";
+ DateTime dateAfter;
+ MyFormater formater = new MyFormater();
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: DateTime.ParseExact(DateTime.Now, g, formater, <invalid DateTimeStyles>)");
+
+ try
+ {
+ for(int i=-1024; i<1024; i++)
+ {
+ try
+ {
+ // skip the valid values
+ if (0 == (i & (int)DateTimeStyles.AdjustToUniversal)
+ && 0 == (i & (int)DateTimeStyles.AssumeUniversal)
+ && 0 == (i & (int)DateTimeStyles.AllowInnerWhite)
+ && 0 == (i & (int)DateTimeStyles.AllowLeadingWhite)
+ && 0 == (i & (int)DateTimeStyles.AllowTrailingWhite)
+ && 0 == (i & (int)DateTimeStyles.AllowWhiteSpaces)
+ && 0 == (i & (int)DateTimeStyles.NoCurrentDateDefault)
+ && i != (int)DateTimeStyles.None
+ )
+ {
+ dateBefore = DateTime.Now.ToString();
+
+ dateAfter = DateTime.ParseExact( dateBefore, "G", formater, (DateTimeStyles)i);
+
+ if (!dateBefore.Equals(dateAfter.ToString()))
+ {
+ TestLibrary.TestFramework.LogError("011", "DateTime.ParseExact(" + dateBefore + ", " + (DateTimeStyles)i + ") did not equal " + dateAfter.ToString());
+ retVal = false;
+ }
+ }
+ }
+ catch (System.ArgumentException)
+ {
+ //
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: DateTime.ParseExact(null)");
+
+ try
+ {
+ try
+ {
+ for(int i=0; i<c_STYLES.Length; i++)
+ {
+ DateTime.ParseExact(null, "d", formater, c_STYLES[i]);
+
+ TestLibrary.TestFramework.LogError("029", "DateTime.ParseExact(null, d, " + c_STYLES[i] + ") should have thrown");
+ retVal = false;
+ }
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("030", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: DateTime.ParseExact(String.Empty)");
+
+ try
+ {
+ try
+ {
+ for(int i=0; i<c_STYLES.Length; i++)
+ {
+ DateTime.ParseExact(String.Empty, "d", formater, c_STYLES[i]);
+
+ TestLibrary.TestFramework.LogError("029", "DateTime.ParseExact(String.Empty, d, " + c_STYLES[i] + ") should have thrown");
+ retVal = false;
+ }
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ }
+ catch (FormatException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("032", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+ string strDateTime = "";
+ DateTime dateAfter;
+ string[] formats = new string[17] {"d", "D", "f", "F", "g", "G", "m", "M", "r", "R", "s", "t", "T", "u", "U", "y", "Y"};
+ string format;
+ int formatIndex;
+
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: DateTime.ParseExact(<garbage>)");
+
+ try
+ {
+ for (int i=0; i<c_NUM_LOOPS; i++)
+ {
+ for(int j=0; j<c_STYLES.Length; j++)
+ {
+ try
+ {
+ formatIndex = TestLibrary.Generator.GetInt32(-55) % 34;
+
+ if (0 <= formatIndex && formatIndex < 17)
+ {
+ format = formats[formatIndex];
+ }
+ else
+ {
+ format = TestLibrary.Generator.GetChar(-55) + "";
+ }
+
+ strDateTime = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ dateAfter = DateTime.ParseExact(strDateTime, format, formater, c_STYLES[j]);
+
+ TestLibrary.TestFramework.LogError("033", "DateTime.ParseExact(" + strDateTime + ", "+ format + ", " + c_STYLES[j] + ") should have thrown (" + dateAfter + ")");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ // expected
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("034", "Failing date: " + strDateTime);
+ TestLibrary.TestFramework.LogError("034", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
+public class MyFormater : IFormatProvider
+{
+ public object GetFormat(Type formatType)
+ {
+ if (typeof(IFormatProvider) == formatType)
+ {
+ return this;
+ }
+ else
+ {
+ return null;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimeparseexact3.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimeparseexact3.cs
new file mode 100644
index 0000000000..6f08e378bd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimeparseexact3.cs
@@ -0,0 +1,318 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+public class DateTimeParseExact2
+{
+ private const int c_MIN_STRING_LEN = 1;
+ private const int c_MAX_STRING_LEN = 2048;
+ private const int c_NUM_LOOPS = 100;
+ private static DateTimeStyles[] c_STYLES = new DateTimeStyles[7] {DateTimeStyles.AdjustToUniversal, DateTimeStyles.AllowInnerWhite, DateTimeStyles.AllowLeadingWhite, DateTimeStyles.AllowTrailingWhite , DateTimeStyles.AllowWhiteSpaces, DateTimeStyles.NoCurrentDateDefault, DateTimeStyles.None };
+
+
+ public static int Main()
+ {
+ DateTimeParseExact2 test = new DateTimeParseExact2();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeParseExact2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+ string dateBefore = "";
+ DateTime dateAfter;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: DateTime.ParseExact(DateTime.Now)");
+
+ try
+ {
+ for(int i=0; i<c_STYLES.Length; i++)
+ {
+ dateBefore = DateTime.Now.ToString();
+
+ dateAfter = DateTime.ParseExact( dateBefore, new string[] {"G"}, formater, c_STYLES[i] );
+
+ if (!TestLibrary.Utilities.IsWindows &&
+ (c_STYLES[i]==DateTimeStyles.AdjustToUniversal)) // Mac prints offset
+ {
+ dateAfter = dateAfter.ToLocalTime();
+ }
+
+ if (!dateBefore.Equals(dateAfter.ToString()))
+ {
+ TestLibrary.TestFramework.LogError("001", "DateTime.ParseExact(" + dateBefore + ", G, " + c_STYLES[i] + ") did not equal " + dateAfter.ToString());
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string dateBefore = "";
+ DateTime dateAfter;
+ MyFormater formater = new MyFormater();
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: DateTime.ParseExact(DateTime.Now, g, formater, <invalid DateTimeStyles>)");
+
+ try
+ {
+ for(int i=-1024; i<1024; i++)
+ {
+ try
+ {
+ // skip the valid values
+ if (0 == (i & (int)DateTimeStyles.AdjustToUniversal)
+ && 0 == (i & (int)DateTimeStyles.AssumeUniversal)
+ && 0 == (i & (int)DateTimeStyles.AllowInnerWhite)
+ && 0 == (i & (int)DateTimeStyles.AllowLeadingWhite)
+ && 0 == (i & (int)DateTimeStyles.AllowTrailingWhite)
+ && 0 == (i & (int)DateTimeStyles.AllowWhiteSpaces)
+ && 0 == (i & (int)DateTimeStyles.NoCurrentDateDefault)
+ && i != (int)DateTimeStyles.None
+ )
+ {
+ dateBefore = DateTime.Now.ToString();
+
+ dateAfter = DateTime.ParseExact( dateBefore, new string[] {"G"}, formater, (DateTimeStyles)i);
+
+ if (!dateBefore.Equals(dateAfter.ToString()))
+ {
+ TestLibrary.TestFramework.LogError("011", "DateTime.ParseExact(" + dateBefore + ", " + (DateTimeStyles)i + ") did not equal " + dateAfter.ToString());
+ retVal = false;
+ }
+ }
+ }
+ catch (System.ArgumentException)
+ {
+ //
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: DateTime.ParseExact(null)");
+
+ try
+ {
+ try
+ {
+ for(int i=0; i<c_STYLES.Length; i++)
+ {
+ DateTime.ParseExact(null, new string[] {"d"}, formater, c_STYLES[i]);
+
+ TestLibrary.TestFramework.LogError("029", "DateTime.ParseExact(null, d, " + c_STYLES[i] + ") should have thrown");
+ retVal = false;
+ }
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("030", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: DateTime.ParseExact(String.Empty)");
+
+ try
+ {
+ try
+ {
+ for(int i=0; i<c_STYLES.Length; i++)
+ {
+ DateTime.ParseExact(String.Empty, new string[] {"d"}, formater, c_STYLES[i]);
+
+ TestLibrary.TestFramework.LogError("029", "DateTime.ParseExact(String.Empty, d, " + c_STYLES[i] + ") should have thrown");
+ retVal = false;
+ }
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ }
+ catch (FormatException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("032", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+ string strDateTime = "";
+ DateTime dateAfter;
+ string[] formats = new string[17] {"d", "D", "f", "F", "g", "G", "m", "M", "r", "R", "s", "t", "T", "u", "U", "y", "Y"};
+ string format;
+ int formatIndex;
+
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: DateTime.ParseExact(<garbage>)");
+
+ try
+ {
+ for (int i=0; i<c_NUM_LOOPS; i++)
+ {
+ for(int j=0; j<c_STYLES.Length; j++)
+ {
+ try
+ {
+ formatIndex = TestLibrary.Generator.GetInt32(-55) % 34;
+
+ if (0 <= formatIndex && formatIndex < 17)
+ {
+ format = formats[formatIndex];
+ }
+ else
+ {
+ format = TestLibrary.Generator.GetChar(-55) + "";
+ }
+
+ strDateTime = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ dateAfter = DateTime.ParseExact(strDateTime, new string[] {format}, formater, c_STYLES[j]);
+
+ TestLibrary.TestFramework.LogError("033", "DateTime.ParseExact(" + strDateTime + ", "+ format + ", " + c_STYLES[j] + ") should have thrown (" + dateAfter + ")");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ // expected
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("034", "Failing date: " + strDateTime);
+ TestLibrary.TestFramework.LogError("034", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ MyFormater formater = new MyFormater();
+ string dateBefore = "";
+ DateTime dateAfter;
+ string[] formats = null;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: DateTime.ParseExact(DateTime.Now, null)");
+
+ try
+ {
+ dateBefore = DateTime.Now.ToString();
+
+ dateAfter = DateTime.ParseExact( dateBefore, formats, formater, DateTimeStyles.NoCurrentDateDefault );
+
+ TestLibrary.TestFramework.LogError("035", "DateTime.ParseExact(" + dateBefore + ", null, " + DateTimeStyles.NoCurrentDateDefault + ") should have thrown " + dateAfter.ToString());
+ retVal = false;
+ }
+ catch (System.ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("036", "Failing date: " + dateBefore);
+ TestLibrary.TestFramework.LogError("036", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
+public class MyFormater : IFormatProvider
+{
+ public object GetFormat(Type formatType)
+ {
+ if (typeof(IFormatProvider) == formatType)
+ {
+ return this;
+ }
+ else
+ {
+ return null;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimesecond.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimesecond.cs
new file mode 100644
index 0000000000..f6928c9d88
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimesecond.cs
@@ -0,0 +1,98 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using System.Globalization;
+
+
+public class DateTimeSecond
+{
+ public static int Main(string[] args)
+ {
+ DateTimeSecond second = new DateTimeSecond();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.DateTime.Second property...");
+
+ if (second.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify DateTime.Second property when DateTime instance's second is assigned...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ DateTime myDateTime = new DateTime(0978, 08, 29, 03, 29, 22);
+ int second = myDateTime.Second;
+
+ if (second != 22)
+ {
+ TestLibrary.TestFramework.LogError("001", "The second is not correct!");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify DateTime.Second property When DateTime instance is only assigned year month and day...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ DateTime myDateTime = new DateTime(1978, 08, 29);
+ int second = myDateTime.Second;
+
+ if (second != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "The second is not zero when no value is assigned at init time!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimesubtract1.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimesubtract1.cs
new file mode 100644
index 0000000000..953dd9f3d5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimesubtract1.cs
@@ -0,0 +1,205 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// DateTime.Subtract(DateTime)
+/// </summary>
+public class DateTimeSubtract1
+{
+ public static int Main()
+ {
+ DateTimeSubtract1 dtsub1 = new DateTimeSubtract1();
+ TestLibrary.TestFramework.BeginTestCase("DataTimeSubtract1");
+ if (dtsub1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ //TestLibrary.TestFramework.LogInformation("[NegTest]");
+ //retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TimeSpan resultTime;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The TimeSpan is in the range of MinValue and MaxValue 1");
+ try
+ {
+ DateTime date1 = new DateTime(1,1,1);
+ DateTime date2 = DateTime.MinValue.AddYears(1).AddMonths(1).AddDays(1);
+ resultTime = date2.Subtract(date1);
+ if (resultTime.Days != 397)
+ {
+ TestLibrary.TestFramework.LogError("001", "Expected: 397 days, actual: "+resultTime.Days);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TimeSpan resultTime;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The TimeSpan is in the range of MinValue and MaxValue 2");
+ try
+ {
+ DateTime date1 = new DateTime(1999, 1, 1).ToLocalTime();
+ DateTime date2 = new DateTime(2000, 1, 1).ToLocalTime();
+ resultTime = date2.Subtract(date1);
+ if (resultTime.Days != 365)
+ {
+ TestLibrary.TestFramework.LogError("003", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TimeSpan resultTime;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The TimeSpan is in the range of MinValue and MaxValue 3");
+ try
+ {
+ DateTime date1 = new DateTime(2000, 1, 1).ToLocalTime();
+ DateTime date2 = new DateTime(2001, 1, 1).ToLocalTime();
+ resultTime = date2.Subtract(date1);
+ if (resultTime.Days != 366)
+ {
+ TestLibrary.TestFramework.LogError("005", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TimeSpan resultTime;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: The TimeSpan is in the range of MinValue and MaxValue 4");
+ try
+ {
+ DateTime date1 = new DateTime(2001, 1, 1).ToLocalTime();
+ DateTime date2 = new DateTime(2000, 1, 1).ToLocalTime();
+ resultTime = date2.Subtract(date1);
+ if (resultTime.Days != -366)
+ {
+ TestLibrary.TestFramework.LogError("007", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TimeSpan resultTime;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: The TimeSpan is in the range of MinValue and MaxValue 5");
+ try
+ {
+ DateTime date1 = new DateTime(2000, 1, 1).ToLocalTime();
+ DateTime date2 = new DateTime(1999, 1, 1).ToLocalTime();
+ resultTime = date2.Subtract(date1);
+ if (resultTime.Days != -365)
+ {
+ TestLibrary.TestFramework.LogError("009", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TimeSpan resultTime;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: The TimeSpan is in the range of MinValue and MaxValue 6");
+ try
+ {
+ DateTime date1 = new DateTime(2000, 1, 1).ToLocalTime();
+ DateTime date2 = new DateTime(2000, 1, 1).ToLocalTime();
+ resultTime = date2.Subtract(date1);
+ if (resultTime.Days != 0)
+ {
+ TestLibrary.TestFramework.LogError("011", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+ // TimeSpan resultTime;
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: The TimeSpan is less than DateTime MinValue");
+ // try
+ // {
+ // DateTime date1 = DateTime.MinValue.ToLocalTime();
+ // DateTime date2 = DateTime.MaxValue.ToLocalTime();
+ // resultTime = date1.Subtract(date2);
+ // retVal = false;
+ // TestLibrary.TestFramework.LogError("N001", "the TimeSpan is less DateTime MinValue but not throw exception");
+ // }
+ // catch (ArgumentOutOfRangeException) { }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ // retVal = false;
+ // }
+ // return retVal;
+ //}
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimesubtract2.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimesubtract2.cs
new file mode 100644
index 0000000000..90e4a5ce38
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimesubtract2.cs
@@ -0,0 +1,225 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// DateTime.Subtract(TimeSpan)
+/// </summary>
+public class DateTimeSubtract2
+{
+ public static int Main()
+ {
+ DateTimeSubtract2 dtsub2 = new DateTimeSubtract2();
+ TestLibrary.TestFramework.BeginTestCase("DataTimeSubtract2");
+ if (dtsub2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ TestLibrary.TestFramework.LogInformation("[NegTest]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ DateTime resultTime;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The return dateTime is in the range of MinValue and MaxValue 1");
+ try
+ {
+ DateTime date1 = new DateTime(2000, 1, 1).ToLocalTime();
+ TimeSpan timeSpan = new TimeSpan(365, 0, 0, 0);
+ resultTime = date1.Subtract(timeSpan);
+ if (resultTime!= new DateTime(1999,1,1).ToLocalTime())
+ {
+ TestLibrary.TestFramework.LogError("001", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ DateTime resultTime;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The return dateTime is in the range of MinValue and MaxValue 2");
+ try
+ {
+ DateTime date1 = new DateTime(1999, 1, 1).ToLocalTime();
+ TimeSpan timeSpan = new TimeSpan(-365, 0, 0, 0);
+ resultTime = date1.Subtract(timeSpan);
+ if (resultTime != new DateTime(2000, 1, 1).ToLocalTime())
+ {
+ TestLibrary.TestFramework.LogError("003", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ DateTime resultTime;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The return dateTime is in the range of MinValue and MaxValue 3");
+ try
+ {
+ DateTime date1 = new DateTime(this.GetInt32(1,9999),this.GetInt32(1,12),this.GetInt32(1,28)).ToLocalTime();
+ TimeSpan timeSpan = new TimeSpan(0, 0, 0, 0);
+ resultTime = date1.Subtract(timeSpan);
+ if (resultTime != date1)
+ {
+ TestLibrary.TestFramework.LogError("005", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ DateTime resultTime;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: The return dateTime is in the range of MinValue and MaxValue 4");
+ try
+ {
+ DateTime date1 = new DateTime(2001, 1, 1).ToLocalTime();
+ TimeSpan timeSpan = new TimeSpan(366, 0, 0, 0);
+ resultTime = date1.Subtract(timeSpan);
+ if (resultTime != new DateTime(2000, 1, 1).ToLocalTime())
+ {
+ TestLibrary.TestFramework.LogError("007", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ DateTime resultTime;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: The return dateTime is in the range of MinValue and MaxValue 5");
+ try
+ {
+ DateTime date1 = new DateTime(2000, 1, 1).ToLocalTime();
+ TimeSpan timeSpan = new TimeSpan(-366, 0, 0, 0);
+ resultTime = date1.Subtract(timeSpan);
+ if (resultTime != new DateTime(2001, 1, 1).ToLocalTime())
+ {
+ TestLibrary.TestFramework.LogError("009", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ DateTime resultTime;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The return dateTime is out the range of MinValue and MaxValue 1");
+ try
+ {
+ DateTime date1 = DateTime.MinValue.ToLocalTime();
+ TimeSpan timeSpan = new TimeSpan(365, 0, 0, 0);
+ resultTime = date1.Subtract(timeSpan);
+ TestLibrary.TestFramework.LogError("N001", "The return datetime is less than MinValue but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ DateTime resultTime;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The return dateTime is out the range of MinValue and MaxValue 1");
+ try
+ {
+ DateTime date1 = DateTime.MaxValue.ToLocalTime();
+ TimeSpan timeSpan = new TimeSpan(-365, 0, 0, 0);
+ resultTime = date1.Subtract(timeSpan);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N003", "The return datetime is greater than MaxValue but not throw exception");
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimeticks.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimeticks.cs
new file mode 100644
index 0000000000..198c20ccde
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimeticks.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Threading;
+
+
+/// <summary>
+/// System.DateTime.Ticks
+/// </summary>
+public class DateTimeTicks
+{
+ public static int Main(string[] args)
+ {
+ DateTimeTicks ticks = new DateTimeTicks();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.DateTime.Ticks property...");
+
+ if (ticks.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ //retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify ticks when DateTime instance is midnight, January 1, 0001...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new System.Globalization.CultureInfo("");
+ DateTime myDateTime = new DateTime(0001,01,01,00,00,00);
+ long ticks = myDateTime.Ticks;
+
+ if (ticks != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "The ticks is not zero when the DateTime instance is midnight, January 1, 0001...");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify ticks when DateTime instance is larger than midnight, January 1, 0001");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new System.Globalization.CultureInfo("");
+ DateTime myDateTime = new DateTime(1978,08,29,03,29,22);
+ long ticks = myDateTime.Ticks;
+
+ if (ticks <= 0)
+ {
+ TestLibrary.TestFramework.LogError("003","The ticks is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004","Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimetimeofday.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimetimeofday.cs
new file mode 100644
index 0000000000..744242ee63
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimetimeofday.cs
@@ -0,0 +1,98 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Threading;
+
+/// <summary>
+/// System.DateTime.TimeOfDay
+/// </summary>
+public class DateTimeTimeOfDay
+{
+ public static int Main(string[] args)
+ {
+ DateTimeTimeOfDay timeOfDay = new DateTimeTimeOfDay();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.DateTime.TimeOfDay property...");
+
+ if (timeOfDay.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify TimeOfDay when created instance is assigned time...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new System.Globalization.CultureInfo("");
+ DateTime myDateTime = new DateTime(1978,08,29,03,29,22);
+ TimeSpan myTimeSpan = myDateTime.TimeOfDay;
+
+ if (myTimeSpan.Days != 0 && myTimeSpan.Hours != 03 && myTimeSpan.Minutes != 29
+ && myTimeSpan.Seconds != 22 && myTimeSpan.Milliseconds != 0)
+ {
+ TestLibrary.TestFramework.LogError("001","The TimeSpan is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify TimeOfDay when created instance is not assigned time...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new System.Globalization.CultureInfo("");
+ DateTime myDateTime = new DateTime(1978,08,29);
+ TimeSpan myTimeSpan = myDateTime.TimeOfDay;
+
+ if (myTimeSpan.Hours != 0 && myTimeSpan.Minutes != 0 && myTimeSpan.Seconds != 0)
+ {
+ TestLibrary.TestFramework.LogError("003","The initial timeSpan is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004","Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimetoday.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimetoday.cs
new file mode 100644
index 0000000000..d2f372732d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimetoday.cs
@@ -0,0 +1,95 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Threading;
+
+
+/// <summary>
+/// System.DateTime.Today
+/// </summary>
+public class DateTimeToday
+{
+ public static int Main(string[] args)
+ {
+ DateTimeToday today = new DateTimeToday();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.DateTime.Today property...");
+
+ if (today.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify the value of hour minute and second in Today property...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new System.Globalization.CultureInfo("");
+ DateTime today = DateTime.Today;
+
+ if (today.Hour != 0 && today.Minute != 0 && today.Second != 0)
+ {
+ TestLibrary.TestFramework.LogError("001","The initial value of today is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify the type of today property is System.DateTime...");
+
+ try
+ {
+ DateTime today = DateTime.Today;
+ Type typeOfToday = today.GetType();
+
+ if (typeOfToday.ToString() != "System.DateTime")
+ {
+ TestLibrary.TestFramework.LogError("003","The type of Today property is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004","Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimetofiletime.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimetofiletime.cs
new file mode 100644
index 0000000000..36653c9b71
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimetofiletime.cs
@@ -0,0 +1,126 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// System.DateTime.ToFileTime()
+/// </summary>
+public class DateTimeToFileTime
+{
+ public static int Main()
+ {
+ DateTimeToFileTime dttft = new DateTimeToFileTime();
+ TestLibrary.TestFramework.BeginTestCase("DataTimeToFileTime");
+ if (dttft.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[NegTest]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The current dateTime equals 1601/1/1");
+ try
+ {
+ DateTime date1 = new DateTime(1601, 1, 1).ToLocalTime().ToUniversalTime();
+ long result = date1.ToFileTime();
+ if (result != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The current dateTime lager 1601/1/1");
+ try
+ {
+ DateTime date1 = new DateTime(1999, 1, 1).ToLocalTime().ToUniversalTime();
+ DateTime date2 = new DateTime(1601, 1, 1).ToLocalTime().ToUniversalTime();
+ TimeSpan timeSpan = date1.Subtract(date2);
+ long result = date1.ToFileTime();
+ long expect = timeSpan.Days * 864000000000; //8640000000 = 24*3600*1000*1000*1000/100
+ if (result != expect)
+ {
+ TestLibrary.TestFramework.LogError("003", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The current dateTime less than 1601/1/1 1");
+ try
+ {
+ DateTime date1 = DateTime.MinValue.ToLocalTime().ToUniversalTime();
+ long result = date1.ToFileTime();
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N001", "The current dateTime is less than 1601/1/1 but not throw exception");
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The current dateTime less than 1601/1/1 2");
+ try
+ {
+ DateTime date1 = new DateTime(1600, 1, 1).ToLocalTime().ToUniversalTime();
+ long result = date1.ToFileTime();
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N003", "The current dateTime is less than 1601/1/1 but not throw exception");
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimetofiletimeutc.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimetofiletimeutc.cs
new file mode 100644
index 0000000000..c3d3321636
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimetofiletimeutc.cs
@@ -0,0 +1,126 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// System.DateTime.ToFileTimeUtc()
+/// </summary>
+public class DateTimeToFileTimeUtc
+{
+ public static int Main()
+ {
+ DateTimeToFileTimeUtc dttftu = new DateTimeToFileTimeUtc();
+ TestLibrary.TestFramework.BeginTestCase("DataTimeToFileTimeUtc");
+ if (dttftu.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[NegTest]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The current dateTime equals 1601/1/1");
+ try
+ {
+ DateTime date1 = new DateTime(1601, 1, 1).ToLocalTime().ToUniversalTime();
+ long result = date1.ToFileTime();
+ if (result != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The current dateTime lager 1601/1/1");
+ try
+ {
+ DateTime date1 = new DateTime(1999, 1, 1).ToLocalTime().ToUniversalTime();
+ DateTime date2 = new DateTime(1601, 1, 1).ToLocalTime().ToUniversalTime();
+ TimeSpan timeSpan = date1.Subtract(date2);
+ long result = date1.ToFileTime();
+ long expect = timeSpan.Days * 864000000000; //8640000000 = 24*3600*1000*1000*1000/100
+ if (result != expect)
+ {
+ TestLibrary.TestFramework.LogError("003", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The current dateTime less than 1601/1/1 1");
+ try
+ {
+ DateTime date1 = DateTime.MinValue.ToLocalTime().ToUniversalTime();
+ long result = date1.ToFileTime();
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N001", "The current dateTime is less than 1601/1/1 but not throw exception");
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The current dateTime less than 1601/1/1 2");
+ try
+ {
+ DateTime date1 = new DateTime(1600, 1, 1).ToLocalTime().ToUniversalTime();
+ long result = date1.ToFileTime();
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N003", "The current dateTime is less than 1601/1/1 but not throw exception");
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimetolocaltime.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimetolocaltime.cs
new file mode 100644
index 0000000000..e79453f571
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimetolocaltime.cs
@@ -0,0 +1,66 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.DateTime.ToLocalTime
+/// </summary>
+public class DateTimeToLocalTime
+{
+ public static int Main(string[] args)
+ {
+ DateTimeToLocalTime toLocalTime = new DateTimeToLocalTime();
+ TestLibrary.TestFramework.BeginTestCase("Testing DateTime.ToLocalTime...");
+
+ if (toLocalTime.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify convvert DateTime to utc then convert back is equal to original...");
+
+ try
+ {
+ DateTime myTime = DateTime.Now;
+ DateTime myUtcTime = myTime.ToUniversalTime();
+ DateTime utcToLocal = myUtcTime.ToLocalTime();
+
+ if (myTime != utcToLocal)
+ {
+ TestLibrary.TestFramework.LogError("001","The DateTime change back to local should be equal to original!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimetostring1.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimetostring1.cs
new file mode 100644
index 0000000000..3fd204fe73
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimetostring1.cs
@@ -0,0 +1,122 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+
+
+/// <summary>
+/// System.DateTime.ToString
+/// </summary>
+public class DateTimeToString1
+{
+ public static int Main(string[] args)
+ {
+ DateTimeToString1 toString = new DateTimeToString1();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.DateTime.ToString method...");
+
+ if (toString.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Testing DateTime.ToString() when DateTime instance is created by ctor(int year,int month,int day)...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ DateTime myDateTime = new DateTime(1978,08,29);
+ string dateString = myDateTime.ToString();
+ char[] splitors = {'/',' ',':'};
+ string[] parts = dateString.Split(splitors);
+
+ if (parts.Length != 6)
+ {
+ TestLibrary.TestFramework.LogError("001", "The component parts are not correct!");
+ retVal = false;
+ }
+ else
+ {
+ if (parts[0] != "1978" && parts[1] != "08" && parts[2] != "29" && parts[3] != "00"
+ && parts[4] != "00" && parts[5] != "00")
+ {
+ TestLibrary.TestFramework.LogError("002","The content is not correct!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// new added scenario
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Testing DateTime.ToString() when DateTime instance is created by ctor(int year,int month,int day,int hour,int minute,int second)...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ DateTime myDateTime = new DateTime(1978,08,29,01,10,10);
+ string dateString = myDateTime.ToString();
+ char[] splitors = { '/', ' ', ':' };
+ string[] parts = dateString.Split(splitors);
+
+ if (parts.Length != 6)
+ {
+ TestLibrary.TestFramework.LogError("001", "The component parts are not correct!");
+ retVal = false;
+ }
+ else
+ {
+ if (parts[0] != "1978" && parts[1] != "08" && parts[2] != "29" && parts[3] != "01"
+ && parts[4] != "10" && parts[5] != "10")
+ {
+ TestLibrary.TestFramework.LogError("002", "The content is not correct!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimetostring2.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimetostring2.cs
new file mode 100644
index 0000000000..d4cd95a296
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimetostring2.cs
@@ -0,0 +1,118 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+
+
+/// <summary>
+/// System.DateTime.ToString(System.IFormatProvider)
+/// </summary>
+public class DateTimeToString2
+{
+ public static int Main(string[] args)
+ {
+ DateTimeToString2 toString = new DateTimeToString2();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.DateTime.ToString(System.IFormatProvider)...");
+
+ if (toString.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Testing DateTime.ToString(System.IFormatProvider) when DateTimeFormatInfo is CurrentInfo...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ DateTime myDateTime = new DateTime(1978, 08, 29);
+ string dateString = myDateTime.ToString(DateTimeFormatInfo.CurrentInfo);
+ char[] splitors = { '/', ' ', ':' };
+ string[] parts = dateString.Split(splitors);
+
+ if (parts.Length != 6)
+ {
+ TestLibrary.TestFramework.LogError("001", "The component parts are not correct!");
+ retVal = false;
+ }
+ else
+ {
+ if (parts[0] != "1978" && parts[1] != "08" && parts[2] != "29" && parts[3] != "00"
+ && parts[4] != "00" && parts[5] != "00")
+ {
+ TestLibrary.TestFramework.LogError("002", "The content is not correct!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Testing DateTime.ToString(System.IFormatProvider) when when DateTimeFormatInfo is InvariantInfo...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ DateTime myDateTime = new DateTime(1978, 08, 29, 01, 10, 10);
+ string dateString = myDateTime.ToString(DateTimeFormatInfo.InvariantInfo);
+ char[] splitors = { '/', ' ', ':' };
+ string[] parts = dateString.Split(splitors);
+
+ if (parts.Length != 6)
+ {
+ TestLibrary.TestFramework.LogError("001", "The component parts are not correct!");
+ retVal = false;
+ }
+ else
+ {
+ if (parts[0] != "1978" && parts[1] != "08" && parts[2] != "29" && parts[3] != "01"
+ && parts[4] != "10" && parts[5] != "10")
+ {
+ TestLibrary.TestFramework.LogError("002", "The content is not correct!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimetostring3.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimetostring3.cs
new file mode 100644
index 0000000000..79c8a31683
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimetostring3.cs
@@ -0,0 +1,588 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+
+/// <summary>
+/// System.DateTime.ToString(System.String)
+/// </summary>
+public class DateTimeToString3
+{
+ public static int Main(string[] args)
+ {
+ DateTimeToString3 myDateTime = new DateTimeToString3();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.DateTime.ToString(System.String)...");
+
+ if (myDateTime.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+ retVal = PosTest12() && retVal;
+ retVal = PosTest13() && retVal;
+ retVal = PosTest14() && retVal;
+ retVal = PosTest15() && retVal;
+ retVal = PosTest16() && retVal;
+ retVal = PosTest17() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Testing DateTime.ToString(System.String) using format as M/d/yyyy hh:mm:ss tt...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ string format = @"M/d/yyyy hh:mm:ss tt";
+ DateTime myDateTime = new DateTime(1978, 08, 29);
+ string dateString = myDateTime.ToString(format);
+ char[] splitors = { '/', ' ', ':' };
+ string[] parts = dateString.Split(splitors);
+
+ if (parts.Length != 7)
+ {
+ TestLibrary.TestFramework.LogError("001", "The component parts are not correct!");
+ retVal = false;
+ }
+ else
+ {
+ if (parts[0] != "1978" && parts[1] != "08" && parts[2] != "29" && parts[3] != "00"
+ && parts[4] != "00" && parts[5] != "00" && parts[6]!="AM")
+ {
+ TestLibrary.TestFramework.LogError("002", "The content is not correct!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Testing DateTime.ToString(System.String) using format as M-d-yyyy hh:mm:ss tt...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ string format = @"M-d-yyyy hh:mm:ss tt";
+ DateTime myDateTime = new DateTime(1978, 08, 29);
+ string dateString = myDateTime.ToString(format);
+ char[] splitors = { '-', ' ', ':' };
+ string[] parts = dateString.Split(splitors);
+
+ if (parts.Length != 7)
+ {
+ TestLibrary.TestFramework.LogError("004", "The component parts are not correct!");
+ retVal = false;
+ }
+ else
+ {
+ if (parts[0] != "1978" && parts[1] != "08" && parts[2] != "29" && parts[3] != "00"
+ && parts[4] != "00" && parts[5] != "00" && parts[6]!="AM")
+ {
+ TestLibrary.TestFramework.LogError("005", "The content is not correct!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Testing DateTime.ToString(System.String) using format as M-d-yyyy hh:mm:ss...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ string format = @"M-d-yyyy hh:mm:ss";
+ DateTime myDateTime = new DateTime(1978, 08, 29);
+ string dateString = myDateTime.ToString(format);
+ char[] splitors = { '-', ' ', ':' };
+ string[] parts = dateString.Split(splitors);
+
+ if (parts.Length != 6)
+ {
+ TestLibrary.TestFramework.LogError("007", "The component parts are not correct!");
+ retVal = false;
+ }
+ else
+ {
+ if (parts[0] != "1978" && parts[1] != "08" && parts[2] != "29" && parts[3] != "00"
+ && parts[4] != "00" && parts[5] != "00")
+ {
+ TestLibrary.TestFramework.LogError("008", "The content is not correct!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Testing DateTime.ToString(System.String) using format as d...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ string format = @"d";
+ DateTime myDateTime = new DateTime(1978, 08, 29);
+ string dateString = myDateTime.ToString(format);
+ char[] splitors = { '/'};
+ string[] parts = dateString.Split(splitors);
+
+ if (parts.Length != 3)
+ {
+ TestLibrary.TestFramework.LogError("010", "The component parts are not correct!");
+ retVal = false;
+ }
+ else
+ {
+ if (parts[0] != "29" && parts[1] != "08" && parts[2] != "1978")
+ {
+ TestLibrary.TestFramework.LogError("011", "The content is not correct!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Testing DateTime.ToString(System.String) using format as D...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ string format = @"D";
+ DateTime myDateTime = DateTime.Now;
+ string dateString = myDateTime.ToString(format);
+ char[] splitors = { ' ' };
+ string[] parts = dateString.Split(splitors);
+
+ if (parts.Length != 4)
+ {
+ TestLibrary.TestFramework.LogError("013", "The component parts are not correct!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Testing DateTime.ToString(System.String) using format as f...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ string format = @"f";
+ DateTime myDateTime = DateTime.Now;
+ string dateString = myDateTime.ToString(format);
+ char[] splitors = { ' ',':' };
+ string[] parts = dateString.Split(splitors);
+
+ if (parts.Length != 6)
+ {
+ TestLibrary.TestFramework.LogError("015", "The component parts are not correct!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Testing DateTime.ToString(System.String) using format as F...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ string format = @"F";
+ DateTime myDateTime = DateTime.Now;
+ string dateString = myDateTime.ToString(format);
+ char[] splitors = { ' ', ':' };
+ string[] parts = dateString.Split(splitors);
+
+ if (parts.Length != 7)
+ {
+ TestLibrary.TestFramework.LogError("017", "The component parts are not correct!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Testing DateTime.ToString(System.String) using format as g...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ string format = @"g";
+ DateTime myDateTime = DateTime.Now;
+ string dateString = myDateTime.ToString(format);
+ char[] splitors = { '/',' ', ':' };
+ string[] parts = dateString.Split(splitors);
+
+ if (parts.Length != 5)
+ {
+ TestLibrary.TestFramework.LogError("019", "The component parts are not correct!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Testing DateTime.ToString(System.String) using format as G...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ string format = @"G";
+ DateTime myDateTime = DateTime.Now;
+ string dateString = myDateTime.ToString(format);
+ char[] splitors = { '/', ' ', ':' };
+ string[] parts = dateString.Split(splitors);
+
+ if (parts.Length != 6)
+ {
+ TestLibrary.TestFramework.LogError("021", "The component parts are not correct!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("022", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest10()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Testing DateTime.ToString(System.String) using format as m...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ string format = @"m";
+ DateTime myDateTime = DateTime.Now;
+ string dateString = myDateTime.ToString(format);
+ char[] splitors = {' '};
+ string[] parts = dateString.Split(splitors);
+
+ if (parts.Length != 2)
+ {
+ TestLibrary.TestFramework.LogError("023", "The component parts are not correct!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("024", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest11()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Testing DateTime.ToString(System.String) using format as r...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ string format = @"r";
+ DateTime myDateTime = DateTime.Now;
+ string dateString = myDateTime.ToString(format);
+ char[] splitors = { ',',' ',':' };
+ string[] parts = dateString.Split(splitors);
+
+ if (parts.Length != 9)
+ {
+ TestLibrary.TestFramework.LogError("025", "The component parts are not correct!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("026", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest12()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Testing DateTime.ToString(System.String) using format as s...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ string format = @"s";
+ DateTime myDateTime = DateTime.Now;
+ string dateString = myDateTime.ToString(format);
+ char[] splitors = { '-', 'T', ':' };
+ string[] parts = dateString.Split(splitors);
+
+ if (parts.Length != 6)
+ {
+ TestLibrary.TestFramework.LogError("027", "The component parts are not correct!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("028", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest13()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Testing DateTime.ToString(System.String) using format as t...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ string format = @"t";
+ DateTime myDateTime = DateTime.Now;
+ string dateString = myDateTime.ToString(format);
+ char[] splitors = {':' };
+ string[] parts = dateString.Split(splitors);
+
+ if (parts.Length != 2)
+ {
+ TestLibrary.TestFramework.LogError("029", "The component parts are not correct!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("030", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest14()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Testing DateTime.ToString(System.String) using format as T...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ string format = @"T";
+ DateTime myDateTime = DateTime.Now;
+ string dateString = myDateTime.ToString(format);
+ char[] splitors = { ':' };
+ string[] parts = dateString.Split(splitors);
+
+ if (parts.Length != 3)
+ {
+ TestLibrary.TestFramework.LogError("031", "The component parts are not correct!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("032", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest15()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Testing DateTime.ToString(System.String) using format as u...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ string format = @"u";
+ DateTime myDateTime = DateTime.Now;
+ string dateString = myDateTime.ToString(format);
+ char[] splitors = {'-',' ', ':' };
+ string[] parts = dateString.Split(splitors);
+
+ if (parts.Length != 6)
+ {
+ TestLibrary.TestFramework.LogError("033", "The component parts are not correct!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("034", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest16()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Testing DateTime.ToString(System.String) using format as U...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ string format = @"U";
+ DateTime myDateTime = DateTime.Now;
+ string dateString = myDateTime.ToString(format);
+ char[] splitors = {' ', ':' };
+ string[] parts = dateString.Split(splitors);
+
+ if (parts.Length != 7)
+ {
+ TestLibrary.TestFramework.LogError("035", "The component parts are not correct!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("036", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest17()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Testing DateTime.ToString(System.String) using format as y...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new CultureInfo("");
+ string format = @"y";
+ DateTime myDateTime = DateTime.Now;
+ string dateString = myDateTime.ToString(format);
+ char[] splitors = { ' '};
+ string[] parts = dateString.Split(splitors);
+
+ if (parts.Length != 2)
+ {
+ TestLibrary.TestFramework.LogError("037", "The component parts are not correct!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("038", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetime/datetimeutcnow.cs b/tests/src/CoreMangLib/cti/system/datetime/datetimeutcnow.cs
new file mode 100644
index 0000000000..668e71f6e0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetime/datetimeutcnow.cs
@@ -0,0 +1,93 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.Threading;
+
+public class DateTimeUtcNow
+{
+ public static int Main(string[] args)
+ {
+ DateTimeUtcNow utcNow = new DateTimeUtcNow();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.DateTime.UtcNow property...");
+
+ if (utcNow.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginTestCase("Verify DateTime.UtcNow is Universal kind...");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = new System.Globalization.CultureInfo("");
+ DateTime myDateTime = DateTime.UtcNow;
+ Type typeOfNow = myDateTime.GetType();
+ DateTime toUniversal = myDateTime.ToUniversalTime();
+
+ if (myDateTime != toUniversal)
+ {
+ TestLibrary.TestFramework.LogError("001", "The kind of UtcNow property is not local!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginTestCase("Verify the type of UtcNow property is DateTime...");
+
+ try
+ {
+ DateTime myDateTime = DateTime.UtcNow;
+ Type typeOfNow = myDateTime.GetType();
+
+ if (typeOfNow.ToString() != "System.DateTime")
+ {
+ TestLibrary.TestFramework.LogError("003", "The type of Now property is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetimekind/DateTimeKindLocal.csproj b/tests/src/CoreMangLib/cti/system/datetimekind/DateTimeKindLocal.csproj
new file mode 100644
index 0000000000..8887078638
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetimekind/DateTimeKindLocal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimekindlocal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetimekind/DateTimeKindUnspecified.csproj b/tests/src/CoreMangLib/cti/system/datetimekind/DateTimeKindUnspecified.csproj
new file mode 100644
index 0000000000..68b0c2373c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetimekind/DateTimeKindUnspecified.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimekindunspecified.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetimekind/DateTimeKindUtc.csproj b/tests/src/CoreMangLib/cti/system/datetimekind/DateTimeKindUtc.csproj
new file mode 100644
index 0000000000..c4ff4dc298
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetimekind/DateTimeKindUtc.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimekindutc.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/datetimekind/datetimekindlocal.cs b/tests/src/CoreMangLib/cti/system/datetimekind/datetimekindlocal.cs
new file mode 100644
index 0000000000..5970677acb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetimekind/datetimekindlocal.cs
@@ -0,0 +1,69 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+///<summary>
+///System.DateTimeKind.Local
+///</summary>
+
+public class DateTimeKindLocal
+{
+
+ public static int Main()
+ {
+ DateTimeKindLocal testObj = new DateTimeKindLocal();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.DateTimeKind.Local");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ int expectedValue = 2;
+ int actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get DateTimeKind.Local");
+ try
+ {
+ actualValue = (int)DateTimeKind.Local;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetimekind/datetimekindunspecified.cs b/tests/src/CoreMangLib/cti/system/datetimekind/datetimekindunspecified.cs
new file mode 100644
index 0000000000..9a278fbfda
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetimekind/datetimekindunspecified.cs
@@ -0,0 +1,69 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+///<summary>
+///System.DateTimeKind.Unspecified
+///</summary>
+
+public class DateTimeKindUnspecified
+{
+
+ public static int Main()
+ {
+ DateTimeKindUnspecified testObj = new DateTimeKindUnspecified();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.DateTimeKind.Unspecified");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ int expectedValue = 0;
+ int actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get DateTimeKind.Unspecified");
+ try
+ {
+ actualValue = (int)DateTimeKind.Unspecified;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/datetimekind/datetimekindutc.cs b/tests/src/CoreMangLib/cti/system/datetimekind/datetimekindutc.cs
new file mode 100644
index 0000000000..2c19aeeb00
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/datetimekind/datetimekindutc.cs
@@ -0,0 +1,69 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+///<summary>
+///System.DateTimeKind.Utc
+///</summary>
+
+public class DateTimeKindUtc
+{
+
+ public static int Main()
+ {
+ DateTimeKindUtc testObj = new DateTimeKindUtc();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.DateTimeKind.Utc");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ int expectedValue = 1;
+ int actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get DateTimeKind.Utc");
+ try
+ {
+ actualValue = (int)DateTimeKind.Utc;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") != ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekFriday.csproj b/tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekFriday.csproj
new file mode 100644
index 0000000000..77c7eedd58
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekFriday.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dayofweekfriday.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekMonday.csproj b/tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekMonday.csproj
new file mode 100644
index 0000000000..f4e01aebb5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekMonday.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dayofweekmonday.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekSaturday.csproj b/tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekSaturday.csproj
new file mode 100644
index 0000000000..481479b09a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekSaturday.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dayofweeksaturday.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekSunday.csproj b/tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekSunday.csproj
new file mode 100644
index 0000000000..55341d2c69
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekSunday.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dayofweeksunday.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekThursday.csproj b/tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekThursday.csproj
new file mode 100644
index 0000000000..0c0ec69f16
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekThursday.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dayofweekthursday.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekTuesDay.csproj b/tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekTuesDay.csproj
new file mode 100644
index 0000000000..3b5badbbc7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekTuesDay.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dayofweektuesday.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekWednesday.csproj b/tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekWednesday.csproj
new file mode 100644
index 0000000000..a496b18f64
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dayofweek/DayOfWeekWednesday.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dayofweekwednesday.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/dayofweek/dayofweekfriday.cs b/tests/src/CoreMangLib/cti/system/dayofweek/dayofweekfriday.cs
new file mode 100644
index 0000000000..99d76c6d1c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dayofweek/dayofweekfriday.cs
@@ -0,0 +1,67 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+///<summary>
+///System.DayOfWeek.Friday
+///</summary>
+
+public class DayOfWeekFriday
+{
+
+ public static int Main()
+ {
+ DayOfWeekFriday testObj = new DayOfWeekFriday();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.DayOfWeek.Friday");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ int expectedValue = 5;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property.");
+ try
+ {
+ actualValue = (int)DayOfWeek.Friday;
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/dayofweek/dayofweekmonday.cs b/tests/src/CoreMangLib/cti/system/dayofweek/dayofweekmonday.cs
new file mode 100644
index 0000000000..5e70cc2fd0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dayofweek/dayofweekmonday.cs
@@ -0,0 +1,67 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+///<summary>
+///System.DayOfWeek.Monday
+///</summary>
+
+public class DayOfWeekMonday
+{
+
+ public static int Main()
+ {
+ DayOfWeekMonday testObj = new DayOfWeekMonday();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.DayOfWeek.Monday");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ int expectedValue = 1;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property.");
+ try
+ {
+ actualValue = (int)DayOfWeek.Monday;
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/dayofweek/dayofweeksaturday.cs b/tests/src/CoreMangLib/cti/system/dayofweek/dayofweeksaturday.cs
new file mode 100644
index 0000000000..d1c1e98a82
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dayofweek/dayofweeksaturday.cs
@@ -0,0 +1,67 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+///<summary>
+///System.DayOfWeek.Saturday
+///</summary>
+
+public class DayOfWeekSaturday
+{
+
+ public static int Main()
+ {
+ DayOfWeekSaturday testObj = new DayOfWeekSaturday();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.DayOfWeek.Saturday");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ int expectedValue = 6;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property.");
+ try
+ {
+ actualValue = (int)DayOfWeek.Saturday;
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/dayofweek/dayofweeksunday.cs b/tests/src/CoreMangLib/cti/system/dayofweek/dayofweeksunday.cs
new file mode 100644
index 0000000000..165734b9fa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dayofweek/dayofweeksunday.cs
@@ -0,0 +1,67 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+///<summary>
+///System.DayOfWeek.Sunday
+///</summary>
+
+public class DayOfWeekSunday
+{
+
+ public static int Main()
+ {
+ DayOfWeekSunday testObj = new DayOfWeekSunday();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.DayOfWeek.Sunday");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ int expectedValue = 0;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property.");
+ try
+ {
+ actualValue = (int)DayOfWeek.Sunday;
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/dayofweek/dayofweekthursday.cs b/tests/src/CoreMangLib/cti/system/dayofweek/dayofweekthursday.cs
new file mode 100644
index 0000000000..c16e3b51ec
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dayofweek/dayofweekthursday.cs
@@ -0,0 +1,67 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+///<summary>
+///System.DayOfWeek.Thursday
+///</summary>
+
+public class DayOfWeekThursday
+{
+
+ public static int Main()
+ {
+ DayOfWeekThursday testObj = new DayOfWeekThursday();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.DayOfWeek.Thursday");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ int expectedValue = 4;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property.");
+ try
+ {
+ actualValue = (int)DayOfWeek.Thursday;
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/dayofweek/dayofweektuesday.cs b/tests/src/CoreMangLib/cti/system/dayofweek/dayofweektuesday.cs
new file mode 100644
index 0000000000..31e1189619
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dayofweek/dayofweektuesday.cs
@@ -0,0 +1,67 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+///<summary>
+///System.DayOfWeek.Tuesday
+///</summary>
+
+public class DayOfWeekTuesday
+{
+
+ public static int Main()
+ {
+ DayOfWeekTuesday testObj = new DayOfWeekTuesday();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.DayOfWeek.Tuesday");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ int expectedValue = 2;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property.");
+ try
+ {
+ actualValue = (int)DayOfWeek.Tuesday;
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/dayofweek/dayofweekwednesday.cs b/tests/src/CoreMangLib/cti/system/dayofweek/dayofweekwednesday.cs
new file mode 100644
index 0000000000..62a63b8935
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dayofweek/dayofweekwednesday.cs
@@ -0,0 +1,67 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+///<summary>
+///System.DayOfWeek.Wednesday
+///</summary>
+
+public class DayOfWeekWednesday
+{
+
+ public static int Main()
+ {
+ DayOfWeekWednesday testObj = new DayOfWeekWednesday();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.DayOfWeek.Wednesday");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ int expectedValue = 3;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property.");
+ try
+ {
+ actualValue = (int)DayOfWeek.Wednesday;
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimaFloor.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimaFloor.csproj
new file mode 100644
index 0000000000..88fbe2fb3d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimaFloor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimafloor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalAdd.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalAdd.csproj
new file mode 100644
index 0000000000..c5d525c502
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalAdd.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimaladd.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalCompare.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalCompare.csproj
new file mode 100644
index 0000000000..ad3548edab
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalCompare.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalcompare.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor1.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor1.csproj
new file mode 100644
index 0000000000..4b39b45e40
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor2.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor2.csproj
new file mode 100644
index 0000000000..cbf3dacd9f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor3.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor3.csproj
new file mode 100644
index 0000000000..5cc1e44b25
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor4.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor4.csproj
new file mode 100644
index 0000000000..c505aac19b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalctor4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor5.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor5.csproj
new file mode 100644
index 0000000000..2b2bf34546
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalctor5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor6.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor6.csproj
new file mode 100644
index 0000000000..7b59fde4eb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalctor6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor7.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor7.csproj
new file mode 100644
index 0000000000..ef83f344c7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor7.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalctor7.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor8.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor8.csproj
new file mode 100644
index 0000000000..66cc7abeff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalCtor8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalctor8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalDivide.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalDivide.csproj
new file mode 100644
index 0000000000..9fac1992af
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalDivide.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimaldivide.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalEquals1.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalEquals1.csproj
new file mode 100644
index 0000000000..269b39607d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalEquals1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalequals1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalEquals2.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalEquals2.csproj
new file mode 100644
index 0000000000..5747cb5094
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalEquals2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalequals2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalEquals3.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalEquals3.csproj
new file mode 100644
index 0000000000..61afb1c85d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalEquals3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalequals3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalGetBits.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalGetBits.csproj
new file mode 100644
index 0000000000..a78ebe1039
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalGetBits.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalgetbits.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalMaxValue.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalMaxValue.csproj
new file mode 100644
index 0000000000..942501a51c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalMaxValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalmaxvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalMinValue.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalMinValue.csproj
new file mode 100644
index 0000000000..c74aa8d803
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalMinValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalminvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalMinusOne.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalMinusOne.csproj
new file mode 100644
index 0000000000..4d3b221176
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalMinusOne.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalminusone.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalMultiply.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalMultiply.csproj
new file mode 100644
index 0000000000..f49d44ef60
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalMultiply.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalmultiply.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalNegate.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalNegate.csproj
new file mode 100644
index 0000000000..5b0e426047
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalNegate.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalnegate.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalOne.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalOne.csproj
new file mode 100644
index 0000000000..e8f2f1654f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalOne.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalone.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalParse.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalParse.csproj
new file mode 100644
index 0000000000..9538353402
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalParse.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalparse.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalParse2.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalParse2.csproj
new file mode 100644
index 0000000000..6994c3c631
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalParse2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalparse2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalParse3.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalParse3.csproj
new file mode 100644
index 0000000000..6eea919a02
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalParse3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalparse3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalParse4.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalParse4.csproj
new file mode 100644
index 0000000000..53bfb3d44f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalParse4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalparse4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalRemainder.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalRemainder.csproj
new file mode 100644
index 0000000000..1edfad5d9b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalRemainder.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalremainder.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalSubtract.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalSubtract.csproj
new file mode 100644
index 0000000000..eb0f70d5e6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalSubtract.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalsubtract.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalToBoolean.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalToBoolean.csproj
new file mode 100644
index 0000000000..d1e85286f4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalToBoolean.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimaltoboolean.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalToByte.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalToByte.csproj
new file mode 100644
index 0000000000..101b1fc344
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalToByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimaltobyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalToByte1.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalToByte1.csproj
new file mode 100644
index 0000000000..3a206cf7db
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalToByte1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimaltobyte1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalToChar.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalToChar.csproj
new file mode 100644
index 0000000000..ba30814b35
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalToChar.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimaltochar.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalToDateTime.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalToDateTime.csproj
new file mode 100644
index 0000000000..25251942e7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalToDateTime.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimaltodatetime.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalToDecimal.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalToDecimal.csproj
new file mode 100644
index 0000000000..2fdc4b5c6c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalToDecimal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimaltodecimal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalToDouble.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalToDouble.csproj
new file mode 100644
index 0000000000..dc8641139c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalToDouble.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimaltodouble.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalToInt16.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalToInt16.csproj
new file mode 100644
index 0000000000..15e2caef51
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalToInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimaltoint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalToInt32.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalToInt32.csproj
new file mode 100644
index 0000000000..0b98b202d3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalToInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimaltoint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalToInt64.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalToInt64.csproj
new file mode 100644
index 0000000000..d92655359d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalToInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimaltoint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalToSByte.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalToSByte.csproj
new file mode 100644
index 0000000000..5fe8c34077
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalToSByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimaltosbyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalToSingle.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalToSingle.csproj
new file mode 100644
index 0000000000..3672c7773b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalToSingle.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimaltosingle.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalToString1.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalToString1.csproj
new file mode 100644
index 0000000000..fe8b81edb5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalToString1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimaltostring1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalToString2.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalToString2.csproj
new file mode 100644
index 0000000000..46963539f8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalToString2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimaltostring2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalToString3.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalToString3.csproj
new file mode 100644
index 0000000000..f43b292e47
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalToString3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimaltostring3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalToString4.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalToString4.csproj
new file mode 100644
index 0000000000..83ae241ba8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalToString4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimaltostring4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalToUInt16.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalToUInt16.csproj
new file mode 100644
index 0000000000..127bbd132b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalToUInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimaltouint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalToUInt32.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalToUInt32.csproj
new file mode 100644
index 0000000000..486f18e04d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalToUInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimaltouint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalToUInt64.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalToUInt64.csproj
new file mode 100644
index 0000000000..74c9988a13
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalToUInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimaltouint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalTruncate.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalTruncate.csproj
new file mode 100644
index 0000000000..8ecc82732f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalTruncate.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimaltruncate.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalTryParse.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalTryParse.csproj
new file mode 100644
index 0000000000..fdf8df16db
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalTryParse.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimaltryparse.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/DecimalZero.csproj b/tests/src/CoreMangLib/cti/system/decimal/DecimalZero.csproj
new file mode 100644
index 0000000000..0b8dc586fc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/DecimalZero.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalzero.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimafloor.cs b/tests/src/CoreMangLib/cti/system/decimal/decimafloor.cs
new file mode 100644
index 0000000000..c6f99373b7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimafloor.cs
@@ -0,0 +1,197 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///Floor(System.Decimal)
+/// </summary>
+public class DecimaFloor
+{
+ #region const
+ private const int SEEDVALUE = 2;
+ private const int EQUALVALUE = 1;
+ private const int ZEROVALUE = 0;
+ private const Double RAND_DOUBLE_POSITIVE = 101.111;
+ private const Double RAND_DOUBLE_NEGTIVE = -101.111;
+ private const int RAND_DOUBLE_INT = 101;
+ #endregion
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: If d doesn't have a fractional part, d is returned unchanged.");
+
+ try
+ {
+ int myInt = TestLibrary.Generator.GetInt32(-55);
+ Decimal myDecimal1 = new decimal(myInt);
+ Decimal returnValue = Decimal.Floor(myDecimal1);
+ if (returnValue != myDecimal1)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling Floor method should return " + myDecimal1);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: If d has a fractional part, the next whole Decimal number toward negative infinity that is less than d.and the decimal comes from single.");
+
+ try
+ {
+ Single mySingle = TestLibrary.Generator.GetSingle(-55);
+ Decimal myDecimal1 = new decimal(mySingle);
+ Decimal returnValue = Decimal.Floor(myDecimal1);
+ if (returnValue != ZEROVALUE)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling Floor method should return " + ZEROVALUE);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: If d has a fractional part, the next whole Decimal number toward negative infinity that is less than d.and the decimal comes from double.");
+
+ try
+ {
+ Double myDouble = TestLibrary.Generator.GetDouble(-55);
+ Decimal myDecimal1 = new decimal(myDouble);
+ Decimal returnValue = Decimal.Floor(myDecimal1);
+ if (returnValue != ZEROVALUE)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Calling Floor method should return " + ZEROVALUE);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: If d has a fractional part, the next whole Decimal number toward negative infinity that is less than d.Positive Value.");
+
+ try
+ {
+
+ Decimal myDecimal1 = new decimal(RAND_DOUBLE_POSITIVE);
+ Decimal returnValue = Decimal.Floor(myDecimal1);
+ if (returnValue != RAND_DOUBLE_INT)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Calling Floor method should return " + RAND_DOUBLE_INT);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: If d has a fractional part, the next whole Decimal number toward negative infinity that is less than d. Negitive value ");
+
+ try
+ {
+
+ Decimal myDecimal1 = new decimal(RAND_DOUBLE_NEGTIVE);
+ Decimal returnValue = Decimal.Floor(myDecimal1);
+ if (returnValue != -RAND_DOUBLE_INT-1)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "Calling Floor method should return " + (-RAND_DOUBLE_INT - 1));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimaFloor test = new DecimaFloor();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimaFloor");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimaladd.cs b/tests/src/CoreMangLib/cti/system/decimal/decimaladd.cs
new file mode 100644
index 0000000000..48cc905a70
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimaladd.cs
@@ -0,0 +1,205 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Decimal.Add(Decimal,Decimal)
+/// </summary>
+public class DecimalAdd
+{
+
+ public static int Main()
+ {
+ DecimalAdd dAdd = new DecimalAdd();
+ TestLibrary.TestFramework.BeginTestCase("for Method:System.Decimal.Add(Decimal,Decimal)");
+
+ if (dAdd.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1:Verify two params both are plus...";
+ const string c_TEST_ID = "P001";
+
+ Decimal dec1 = 12345.678m;
+ Decimal dec2 = 87654.321m;
+ Decimal resDec = 99999.999m;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = Decimal.Add(dec1, dec2); ;
+ if (decimalValue != resDec)
+ {
+ string errorDesc = "Value is not " + resDec.ToString() + " as expected: param is " + decimalValue.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2:Verify a param is zero...";
+ const string c_TEST_ID = "P003";
+
+ Decimal dec1 = 623512345.678m;
+ Decimal dec2 = 0m;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = Decimal.Add(dec1, dec2); ;
+ if (decimalValue != dec1)
+ {
+ string errorDesc = "Value is not " + dec1.ToString() + " as expected: param is " + decimalValue.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3:Verify a param is negative ";
+ const string c_TEST_ID = "P003";
+
+ Decimal dec1 = 87654.321234m;
+ Decimal dec2 = -12345.678321m;
+ Decimal resDec = 75308.642913m;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = Decimal.Add(dec1, dec2); ;
+ if (decimalValue != resDec)
+ {
+ string errorDesc = "Value is not " + resDec.ToString() + " as expected: param is " + decimalValue.ToString();
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest4:Verify two params both are negative...";
+ const string c_TEST_ID = "P004";
+
+ Decimal dec1 = -87654.321234m;
+ Decimal dec2 = -12345.678321m;
+ Decimal resDec = -99999.999555m;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = Decimal.Add(dec1, dec2); ;
+ if (decimalValue != resDec)
+ {
+ string errorDesc = "Value is not " + resDec.ToString() + " as expected: param is " + decimalValue.ToString();
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+ #endregion
+
+ #region NegativeTesting
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest1:Verify the sum of two larger than Decimal.MaxValue";
+ const string c_TEST_ID = "N001";
+
+ Decimal dec1 = Decimal.MaxValue;
+ Decimal dec2 = 12345.678321m;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+
+ try
+ {
+ Decimal decimalValue = Decimal.Add(dec1,dec2);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, "OverflowException is not thrown as expected ." + "\n parame value is " + dec1.ToString() + " and " + dec2.ToString());
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalcompare.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalcompare.cs
new file mode 100644
index 0000000000..f16e23c079
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalcompare.cs
@@ -0,0 +1,282 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Decimal.Compare(Decimal,Decimal)
+/// </summary>
+public class DecimalCompare
+{
+
+ public static int Main()
+ {
+ DecimalCompare dCompare = new DecimalCompare();
+ TestLibrary.TestFramework.BeginTestCase("for Method:System.Decimal.DecimalCompare(Decimal,Decimal)");
+
+ if (dCompare.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ return retVal;
+
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1:Verify two decimal both are plus...";
+ const string c_TEST_ID = "P001";
+
+ Decimal dec1 = 12345.678m;
+ Decimal dec2 = 87654.321m;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int result = Decimal.Compare(dec1, dec2);
+ if (result>0)
+ {
+ string errorDesc = "Value is not less than zero as expected: Actual (" + result.ToString()+")";
+ errorDesc += GetDataString(dec1, dec2);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(dec1, dec2));
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2:Verify two decimal are equal...";
+ const string c_TEST_ID = "P002";
+
+ Decimal dec1 = 623512345.678m;
+ Decimal dec2 = 623512345.678m;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int result = Decimal.Compare(dec1, dec2); ;
+ if (result != 0)
+ {
+ string errorDesc = "Value is not zero as expected: Actual (" + result.ToString()+")";
+ errorDesc += GetDataString(dec1, dec2);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(dec1, dec2));
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3:Verify a decimal is negative...";
+ const string c_TEST_ID = "P003";
+
+ Decimal dec1 = 87654.321234m;
+ Decimal dec2 = -12345.678321m;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int result = Decimal.Compare(dec1, dec2); ;
+ if (result < 0)
+ {
+ string errorDesc = "Value is not greater than zero as expected: Actual (" + result.ToString() + ")";
+ errorDesc += GetDataString(dec1, dec2);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(dec1, dec2));
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest4:Verify two decimal both are negative...";
+ const string c_TEST_ID = "P004";
+
+ Decimal dec1 = -87654.321234m;
+ Decimal dec2 = -12345.678321m;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int result = Decimal.Compare(dec1, dec2); ;
+ if (result >0)
+ {
+ string errorDesc = "Value is not less than zero as expected: Actual (" + result.ToString() + ")";
+ errorDesc += GetDataString(dec1, dec2);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(dec1, dec2));
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest5:Verify a decimal is zero...";
+ const string c_TEST_ID = "P005";
+
+ Decimal dec1 = -87654.321234m;
+ Decimal dec2 = 0m;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int result = Decimal.Compare(dec1, dec2);
+ if (result > 0)
+ {
+ string errorDesc = "Value is not less than zero as expected: Actual (" + result.ToString() + ")";
+ errorDesc += GetDataString(dec1, dec2);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(dec1, dec2));
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest6:Verify a decimal is Decimal.MinValue...";
+ const string c_TEST_ID = "P006";
+
+ Decimal dec1 = -87654.321234m;
+ Decimal dec2 = Decimal.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int result = Decimal.Compare(dec1, dec2);
+ if (result < 0)
+ {
+ string errorDesc = "Value is not greater than zero as expected: Actual (" + result.ToString() + ")";
+ errorDesc += GetDataString(dec1, dec2);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(dec1, dec2));
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest7:Verify a decimal is Decimal.MaxValue...";
+ const string c_TEST_ID = "P007";
+
+ Decimal dec1 = 87654.321234m;
+ Decimal dec2 = Decimal.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int result = Decimal.Compare(dec1, dec2);
+ if (result > 0)
+ {
+ string errorDesc = "Value is not less than zero as expected: Actual (" + result.ToString() + ")";
+ errorDesc += GetDataString(dec1, dec2);
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(dec1, dec2));
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methords for testing
+ private string GetDataString(Decimal dec1, Decimal dec2)
+ {
+ string str;
+ str = string.Format("\n[decimal1 value]\n {0}", dec1.ToString());
+ str += string.Format("\n[decimal2 value]\n {0}", dec2.ToString());
+
+ return str;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalctor1.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalctor1.cs
new file mode 100644
index 0000000000..515d3289e2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalctor1.cs
@@ -0,0 +1,263 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Decimal.ctor(Double)
+/// </summary>
+public class DecimalCtor1
+{
+
+ public static int Main()
+ {
+ DecimalCtor1 dCtor1 = new DecimalCtor1();
+ TestLibrary.TestFramework.BeginTestCase("for Constructor:System.Decimal.Ctor(Double)");
+
+ if (dCtor1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1:Verify the param is a random double ";
+ const string c_TEST_ID = "P001";
+
+ Double dValue = TestLibrary.Generator.GetDouble(-55);
+ while (dValue > Convert.ToDouble(Decimal.MaxValue) || dValue < Convert.ToDouble(Decimal.MinValue))
+ {
+ dValue = TestLibrary.Generator.GetDouble(-55);
+ }
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = new Decimal(dValue);
+ if (decimalValue != Convert.ToDecimal(dValue))
+ {
+ string errorDesc = "Value is not " + decimalValue.ToString() + " as expected: param is "+ dValue.ToString() ;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2:Verify the param is 0 ";
+ const string c_TEST_ID = "P002";
+
+ Double dValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = new Decimal(dValue);
+ if (decimalValue != 0m)
+ {
+ string errorDesc = "Value is not " + decimalValue.ToString() + " as expected: param is " + dValue.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Testing
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest1:Verify the param is larger than Decimal.MaxValue";
+ const string c_TEST_ID = "N001";
+
+ double dValue = 1.2345678901234567E+35;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+
+ try
+ {
+ Decimal decimalValue = new Decimal(dValue);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, "ArgumentException is not thrown as expected ." + "\n arame value is "+dValue.ToString());
+ retVal = false;
+ }
+ catch(OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest2:Verify the param is less than Decimal.MinValue";
+ const string c_TEST_ID = "N002";
+
+ double dValue = -1.2345678901234567E+35;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+
+ try
+ {
+ Decimal decimalValue = new Decimal(dValue);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, "ArgumentException is not thrown as expected ." + "\n arame value is "+dValue.ToString());
+ retVal = false;
+ }
+ catch(OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest3:Verify the param is Double.NaN";
+ const string c_TEST_ID = "N003";
+
+ double dValue = Double.NaN;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+
+ try
+ {
+ Decimal decimalValue = new Decimal(dValue);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, "ArgumentException is not thrown as expected ." + "\n arame value is " + dValue.ToString());
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest4:Verify the param is Double.PositiveInfinity";
+ const string c_TEST_ID = "N004";
+
+ double dValue = Double.PositiveInfinity;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+
+ try
+ {
+ Decimal decimalValue = new Decimal(dValue);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, "ArgumentException is not thrown as expected ." + "\n arame value is " + dValue.ToString());
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest5:Verify the param is Double.NegativeInfinity";
+ const string c_TEST_ID = "N005";
+
+ double dValue = Double.NegativeInfinity;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+
+ try
+ {
+ Decimal decimalValue = new Decimal(dValue);
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, "ArgumentException is not thrown as expected ." + "\n arame value is " + dValue.ToString());
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalctor2.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalctor2.cs
new file mode 100644
index 0000000000..0444a713e9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalctor2.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Decimal.ctor(System.Int32)
+/// </summary>
+public class DecimalCtor2
+{
+
+ public static int Main()
+ {
+ DecimalCtor2 dCtor2 = new DecimalCtor2();
+ TestLibrary.TestFramework.BeginTestCase("for Constructor:System.Decimal.Ctor(System.Int32)");
+
+ if (dCtor2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1:Verify the param is a random Int32 ";
+ const string c_TEST_ID = "P001";
+
+ System.Int32 int32Value = TestLibrary.Generator.GetInt32(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = new Decimal(int32Value);
+ if (decimalValue != Convert.ToDecimal(int32Value))
+ {
+ string errorDesc = "Value is not " + decimalValue.ToString() + " as expected: param is " + int32Value.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2:Verify the param is 0 ";
+ const string c_TEST_ID = "P002";
+
+ Double dValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = new Decimal(dValue);
+ if (decimalValue != 0m)
+ {
+ string errorDesc = "Value is not " + decimalValue.ToString() + " as expected: param is " + dValue.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+ #endregion
+
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalctor3.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalctor3.cs
new file mode 100644
index 0000000000..0a999ae219
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalctor3.cs
@@ -0,0 +1,275 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Decimal.ctor(Int32,Int32,Int32,Boolean,Byte)
+/// </summary>
+public class DecimalCtor3
+{
+
+ public static int Main()
+ {
+ DecimalCtor3 dCtor3 = new DecimalCtor3();
+ TestLibrary.TestFramework.BeginTestCase("for Constructor:System.Decimal.Ctor(Int32,Int32,Int32,Boolean,Byte)");
+
+ if (dCtor3.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1:Verify the isNagetive is true... ";
+ const string c_TEST_ID = "P001";
+
+ int low = TestLibrary.Generator.GetInt32(-55);
+ int mid = TestLibrary.Generator.GetInt32(-55);
+ int hi = TestLibrary.Generator.GetInt32(-55);
+ bool isNagetive = true;
+ Byte scale = TestLibrary.Generator.GetByte(-55);
+
+ while (scale > 28)
+ {
+ scale = TestLibrary.Generator.GetByte(-55);
+ }
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = new Decimal(low, mid, hi, isNagetive, scale);
+ int[] arrInt = Decimal.GetBits(decimalValue);
+
+ if (arrInt[0] != low)
+ {
+ string errorDesc = "lo Value is not " +low.ToString() +" as expected: param is " + arrInt[0].ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ if (arrInt[1] != mid)
+ {
+ string errorDesc = "mid Value is not " + mid.ToString() + " as expected: param is " + arrInt[1].ToString();
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ if (arrInt[2] != hi)
+ {
+ string errorDesc = "hi Value is not " + hi.ToString() + " as expected: param is " + arrInt[2].ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (isNagetive)
+ {
+ if (decimalValue > 0m)
+ {
+ string errorDesc = "created decimal object should is less than 0 ";
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ else
+ {
+ if (decimalValue < 0m)
+ {
+ string errorDesc = "created decimal object should is larger than 0 ";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+
+ string subLast;
+ int resScale;
+ int index = decimalValue.ToString().IndexOf(System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator);
+ if (index != -1)
+ {
+ subLast = decimalValue.ToString().Substring(index);
+ resScale = subLast.Length - 1;
+ }
+ else
+ {
+ resScale = 0;
+ }
+
+ if (Convert.ToInt64(scale) != resScale)
+ {
+ string errorDesc = "scale Value is not " + scale.ToString() + " as expected: actual<" + resScale.ToString() + ">";
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2:Verify the isNagetive is false... ";
+ const string c_TEST_ID = "P002";
+
+ int low = TestLibrary.Generator.GetInt32(-55);
+ int mid = TestLibrary.Generator.GetInt32(-55);
+ int hi = TestLibrary.Generator.GetInt32(-55);
+ bool isNagetive = false;
+ Byte scale = TestLibrary.Generator.GetByte(-55);
+
+ while (scale > 28)
+ {
+ scale = TestLibrary.Generator.GetByte(-55);
+ }
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = new Decimal(low, mid, hi, isNagetive, scale);
+ int[] arrInt = Decimal.GetBits(decimalValue);
+
+ if (arrInt[0] != low)
+ {
+ string errorDesc = "lo Value is not " + low.ToString() + " as expected: param is " + arrInt[0].ToString();
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ if (arrInt[1] != mid)
+ {
+ string errorDesc = "mid Value is not " + mid.ToString() + " as expected: param is " + arrInt[1].ToString();
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ if (arrInt[2] != hi)
+ {
+ string errorDesc = "hi Value is not " + hi.ToString() + " as expected: param is " + arrInt[2].ToString();
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (isNagetive)
+ {
+ if (decimalValue > 0m)
+ {
+ string errorDesc = "created decimal object should is less than 0 ";
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ else
+ {
+ if (decimalValue < 0m)
+ {
+ string errorDesc = "created decimal object should is larger than 0 ";
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+
+ string subLast;
+ int resScale;
+ int index = decimalValue.ToString().IndexOf(System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator);
+ if (index != -1)
+ {
+ subLast = decimalValue.ToString().Substring(index);
+ resScale = subLast.Length - 1;
+ }
+ else
+ {
+ resScale=0;
+ }
+
+
+ if (Convert.ToInt64(scale) != resScale)
+ {
+ string errorDesc = "scale Value is not " + scale.ToString() + " as expected: actual<" + resScale.ToString() + ">";
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Testing
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest1:Verify the scale is larger than 28";
+ const string c_TEST_ID = "N001";
+
+ int low = TestLibrary.Generator.GetInt32(-55);
+ int mid = TestLibrary.Generator.GetInt32(-55);
+ int hi = TestLibrary.Generator.GetInt32(-55);
+ bool isNagetive = false;
+ Byte scale = TestLibrary.Generator.GetByte(-55);
+
+ while (scale < 28)
+ {
+ scale = TestLibrary.Generator.GetByte(-55);
+ }
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+
+ try
+ {
+ Decimal decimalValue = new Decimal(low,mid,hi,isNagetive,scale);
+ TestLibrary.TestFramework.LogError("015" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected ." + "\n scale value is " + scale.ToString());
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalctor4.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalctor4.cs
new file mode 100644
index 0000000000..21f815bd5e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalctor4.cs
@@ -0,0 +1,206 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Decimal.ctor(Int32[])
+/// </summary>
+public class DecimalCtor4
+{
+
+ public static int Main()
+ {
+ DecimalCtor4 dCtor4 = new DecimalCtor4();
+ TestLibrary.TestFramework.BeginTestCase("for Constructor:System.Decimal.Ctor(Int32[])");
+
+ if (dCtor4.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1:Verify the top 3 param are random Int32... ";
+ const string c_TEST_ID = "P001";
+
+ int low = TestLibrary.Generator.GetInt32(-55);
+ int mid = TestLibrary.Generator.GetInt32(-55);
+ int hi = TestLibrary.Generator.GetInt32(-55);
+ int flags = 0x1C0000;
+ int[] arrInt ={low, mid, hi, flags};
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = new Decimal(arrInt);
+ int[] arrBits = Decimal.GetBits(decimalValue);
+
+ if (arrBits[0] != low)
+ {
+ string errorDesc = "lo Value is not " + low.ToString() + " as expected: param is " + arrInt[0].ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ if (arrBits[1] != mid)
+ {
+ string errorDesc = "mid Value is not " + mid.ToString() + " as expected: param is " + arrInt[1].ToString();
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ if (arrBits[2] != hi)
+ {
+ string errorDesc = "hi Value is not " + hi.ToString() + " as expected: param is " + arrInt[2].ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ if (arrBits[3] != flags)
+ {
+ string errorDesc = "flags Value is not " + flags.ToString() + " as expected: param is " + arrInt[3].ToString();
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+
+ #endregion
+
+ #region Nagetive Testing
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest1:Verify the param is a null reference";
+ const string c_TEST_ID = "N001";
+
+ int[] bits = null;
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+
+ try
+ {
+ Decimal decimalValue = new Decimal(bits);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, "ArgumentNullException is not thrown as expected ." );
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest2:the bits's length is not 4...";
+ const string c_TEST_ID = "N002";
+
+ int low = TestLibrary.Generator.GetInt32(-55);
+ int mid = TestLibrary.Generator.GetInt32(-55);
+ int hi = TestLibrary.Generator.GetInt32(-55);
+ int flag = TestLibrary.Generator.GetInt32(-55);
+ int[] bits ={ low, mid, hi, flag,low };
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+
+ try
+ {
+ Decimal decimalValue = new Decimal(bits);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, "ArgumentException is not thrown as expected ." );
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest3:Verfiy the decimal value in bits is not valid.";
+ const string c_TEST_ID = "N003";
+
+ int low = TestLibrary.Generator.GetInt32(-55);
+ int mid = TestLibrary.Generator.GetInt32(-55);
+ int hi = TestLibrary.Generator.GetInt32(-55);
+ int flag = 0x1C0001;
+ int[] bits ={ low, mid, hi, flag};
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+
+ try
+ {
+ Decimal decimalValue = new Decimal(bits);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, "ArgumentException is not thrown as expected .");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalctor5.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalctor5.cs
new file mode 100644
index 0000000000..2c8bd1fefc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalctor5.cs
@@ -0,0 +1,179 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Decimal.ctor(System.Int64)
+/// </summary>
+public class DecimalCtor5
+{
+
+ public static int Main()
+ {
+ DecimalCtor5 dCtor5 = new DecimalCtor5();
+ TestLibrary.TestFramework.BeginTestCase("for Constructor:System.Decimal.Ctor(System.Int64)");
+
+ if (dCtor5.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1:Verify the param is a random Int64... ";
+ const string c_TEST_ID = "P001";
+
+ long value = TestLibrary.Generator.GetInt64(-55);
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = new Decimal(value);
+
+ if (decimalValue != Convert.ToDecimal(value))
+ {
+ string errorDesc = "Value is not " + Convert.ToDecimal(value).ToString() + " as expected: param is " + decimalValue.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2:Verify the param is zero... ";
+ const string c_TEST_ID = "P002";
+
+ long value = 0;
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = new Decimal(value);
+
+ if (decimalValue != Convert.ToDecimal(value))
+ {
+ string errorDesc = "Value is not " + Convert.ToDecimal(value).ToString() + " as expected: param is " + decimalValue.ToString();
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3:Verify the param is long.MaxValue... ";
+ const string c_TEST_ID = "P003";
+
+ long value = long.MaxValue;
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = new Decimal(value);
+
+ if (decimalValue != Convert.ToDecimal(value))
+ {
+ string errorDesc = "Value is not " + Convert.ToDecimal(value).ToString() + " as expected: param is " + decimalValue.ToString();
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest4:Verify the param is long.MinValue... ";
+ const string c_TEST_ID = "P004";
+
+ long value = long.MinValue;
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = new Decimal(value);
+
+ if (decimalValue != Convert.ToDecimal(value))
+ {
+ string errorDesc = "Value is not " + Convert.ToDecimal(value).ToString() + " as expected: param is " + decimalValue.ToString();
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalctor6.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalctor6.cs
new file mode 100644
index 0000000000..cd7e8058cc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalctor6.cs
@@ -0,0 +1,308 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Decimal.ctor(Single)
+/// </summary>
+public class DecimalCtor6
+{
+
+ public static int Main()
+ {
+ DecimalCtor6 dCtor6 = new DecimalCtor6();
+ TestLibrary.TestFramework.BeginTestCase("for Constructor:System.Decimal.Ctor(Single)");
+
+ if (dCtor6.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1:Verify the param is a random float ";
+ const string c_TEST_ID = "P001";
+
+ float dValue = TestLibrary.Generator.GetSingle(-55);
+ while (dValue > Convert.ToSingle(Decimal.MaxValue) || dValue < Convert.ToSingle(Decimal.MinValue))
+ {
+ dValue = TestLibrary.Generator.GetSingle(-55);
+ }
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = new Decimal(dValue);
+ if (decimalValue != Convert.ToDecimal(dValue))
+ {
+ string errorDesc = "Value is not " + decimalValue.ToString() + " as expected: param is " + dValue.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2:Verify the param is 0.00 ";
+ const string c_TEST_ID = "P002";
+
+ float dValue = 0.00F;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = new Decimal(dValue);
+ if (decimalValue != 0m)
+ {
+ string errorDesc = "Value is not " + decimalValue.ToString() + " as expected: param is " + dValue.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3:Verify the param is 1.23456789E-25F ";
+ const string c_TEST_ID = "P003";
+
+ float dValue = 1.23456789E-25F;
+ Decimal resDec = 0.0000000000000000000000001235m;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = new Decimal(dValue);
+ if (decimalValue != resDec)
+ {
+ string errorDesc = "Value is not " + decimalValue.ToString() + " as expected: param is " + resDec.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Testing
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest1:Verify the param is larger than Decimal.MaxValue";
+ const string c_TEST_ID = "N001";
+
+ float dValue = Convert.ToSingle(Decimal.MaxValue);
+
+ float addValue = TestLibrary.Generator.GetSingle(-55);
+ while (addValue <= 0)
+ {
+ addValue = TestLibrary.Generator.GetSingle(-55);
+ }
+ dValue += addValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+
+ try
+ {
+ Decimal decimalValue = new Decimal(dValue);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, "ArgumentException is not thrown as expected ." + "\n parame value is " + dValue.ToString());
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest2:Verify the param is less than Decimal.MinValue";
+ const string c_TEST_ID = "N002";
+
+ float dValue = Convert.ToSingle(Decimal.MinValue);
+
+ float addValue = TestLibrary.Generator.GetSingle(-55);
+ while (addValue <= 0)
+ {
+ addValue = TestLibrary.Generator.GetSingle(-55);
+ }
+ dValue -= addValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+
+ try
+ {
+ Decimal decimalValue = new Decimal(dValue);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, "ArgumentException is not thrown as expected ." + "\n arame value is " + dValue.ToString());
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest3:Verify the param is Single.NaN";
+ const string c_TEST_ID = "N003";
+
+ Single dValue = Single.NaN;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+
+ try
+ {
+ Decimal decimalValue = new Decimal(dValue);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, "ArgumentException is not thrown as expected ." + "\n arame value is " + dValue.ToString());
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest4:Verify the param is Single.PositiveInfinity";
+ const string c_TEST_ID = "N004";
+
+ Single dValue = Single.PositiveInfinity;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+
+ try
+ {
+ Decimal decimalValue = new Decimal(dValue);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, "ArgumentException is not thrown as expected ." + "\n arame value is " + dValue.ToString());
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "NegTest5:Verify the param is Single.NegativeInfinity";
+ const string c_TEST_ID = "N005";
+
+ Single dValue = Single.NegativeInfinity;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+
+ try
+ {
+ Decimal decimalValue = new Decimal(dValue);
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, "ArgumentException is not thrown as expected ." + "\n arame value is " + dValue.ToString());
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalctor7.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalctor7.cs
new file mode 100644
index 0000000000..7de1774480
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalctor7.cs
@@ -0,0 +1,133 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Decimal.ctor(System.UInt32)
+/// </summary>
+public class DecimalCtor7
+{
+
+ public static int Main()
+ {
+ DecimalCtor7 dCtor7 = new DecimalCtor7();
+ TestLibrary.TestFramework.BeginTestCase("for Constructor:System.Decimal.Ctor(System.UInt32)");
+
+ if (dCtor7.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1:Verify the param is a random UInt32 ";
+ const string c_TEST_ID = "P001";
+
+ System.UInt32 uint32Value = Convert.ToUInt32(TestLibrary.Generator.GetInt32(-55));
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = new Decimal(uint32Value);
+ if (decimalValue != Convert.ToDecimal(uint32Value))
+ {
+ string errorDesc = "Value is not " + decimalValue.ToString() + " as expected: param is " + uint32Value.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2:Verify the param is UInt32.MinValue(0) ";
+ const string c_TEST_ID = "P002";
+
+ UInt32 dValue = UInt32.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = new Decimal(dValue);
+ if (decimalValue != Convert.ToDecimal(dValue))
+ {
+ string errorDesc = "Value is not " + decimalValue.ToString() + " as expected: param is " + dValue.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3:Verify the param is UInt32.MaxValue ";
+ const string c_TEST_ID = "P003";
+
+ UInt32 dValue = UInt32.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = new Decimal(dValue);
+ if (decimalValue != Convert.ToDecimal(dValue))
+ {
+ string errorDesc = "Value is not " + decimalValue.ToString() + " as expected: param is " + dValue.ToString();
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+ #endregion
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalctor8.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalctor8.cs
new file mode 100644
index 0000000000..fd26edfc18
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalctor8.cs
@@ -0,0 +1,135 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Decimal.ctor(System.UInt64)
+/// </summary>
+public class DecimalCtor8
+{
+
+ public static int Main()
+ {
+ DecimalCtor8 dCtor8 = new DecimalCtor8();
+ TestLibrary.TestFramework.BeginTestCase("for Constructor:System.Decimal.Ctor(System.UInt64)");
+
+ if (dCtor8.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1:Verify the param is a random UInt64 ";
+ const string c_TEST_ID = "P001";
+
+ System.UInt64 uint64Value = Convert.ToUInt64(TestLibrary.Generator.GetInt64(-55));
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = new Decimal(uint64Value);
+ if (decimalValue != Convert.ToDecimal(uint64Value))
+ {
+ string errorDesc = "Value is not " + Convert.ToDecimal(uint64Value).ToString() + " as expected: param is " + decimalValue.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2:Verify the param is UInt64.MinValue(0) ";
+ const string c_TEST_ID = "P002";
+
+ UInt64 dValue = UInt64.MinValue;
+ Decimal resValue = 0m;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = new Decimal(dValue);
+ if (decimalValue != resValue)
+ {
+ string errorDesc = "Value is not " + resValue.ToString() + " as expected: param is " + decimalValue.ToString();
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3:Verify the param is UInt64.MaxValue ";
+ const string c_TEST_ID = "P003";
+
+ UInt64 dValue = UInt64.MaxValue;
+ Decimal resValue = 18446744073709551615m;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Decimal decimalValue = new Decimal(dValue);
+ if (decimalValue != resValue)
+ {
+ string errorDesc = "Value is not " + resValue.ToString() + " as expected: param is " + decimalValue.ToString();
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+ #endregion
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimaldivide.cs b/tests/src/CoreMangLib/cti/system/decimal/decimaldivide.cs
new file mode 100644
index 0000000000..b83ecafb66
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimaldivide.cs
@@ -0,0 +1,249 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Divide(System.Decimal,System.Decimal)
+/// </summary>
+public class DecimalDivide
+{
+ #region const
+ private const int SEEDVALUE = 2;
+ private const int EQUALVALUE = 1;
+ private const int ZEROVALUE = 0;
+ #endregion
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Calling Devide method and the dividend is a random decimal,divisor is defined as Seed.");
+
+ try
+ {
+
+ Decimal myDecimal1 = new decimal(TestLibrary.Generator.GetInt32(-55) / SEEDVALUE);
+ Decimal myDecimal2 = new decimal(SEEDVALUE);
+ Decimal returnValue = Decimal.Divide(myDecimal1 * SEEDVALUE, myDecimal2);
+ if (returnValue != myDecimal1)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Calling Devide method should return " + myDecimal1);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Calling Devide method and the dividend 0.");
+
+ try
+ {
+
+ Decimal myDecimal1 = new decimal(ZEROVALUE / SEEDVALUE);
+ Decimal myDecimal2 = new decimal(SEEDVALUE);
+ Decimal returnValue = Decimal.Divide(ZEROVALUE, myDecimal2);
+ if (returnValue != ZEROVALUE)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Calling Devide method should return " + ZEROVALUE);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Calling Devide method and the dividend is Int32.MaxValue or Int32.MinValue.");
+
+ try
+ {
+
+ Decimal myDecimal1 = new decimal(Int32.MaxValue / SEEDVALUE);
+ Decimal myDecimal2 = new decimal(SEEDVALUE);
+ Decimal returnValue = Decimal.Divide(myDecimal1 * SEEDVALUE, myDecimal2);
+ if (returnValue != myDecimal1)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Calling Devide method should return " + myDecimal1);
+ retVal = false;
+ }
+ myDecimal1 = new decimal(Int32.MinValue / SEEDVALUE);
+ myDecimal2 = new decimal(SEEDVALUE);
+ returnValue = Decimal.Divide(myDecimal1 * SEEDVALUE, myDecimal2);
+ if (returnValue != myDecimal1)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Calling Devide method should return " + myDecimal1);
+ retVal = false;
+ }
+
+ myDecimal1 = new decimal(Int32.MinValue);
+ myDecimal2 = new decimal(Int32.MinValue);
+ returnValue = Decimal.Divide(myDecimal1 , myDecimal2);
+ if (returnValue != EQUALVALUE)
+ {
+ TestLibrary.TestFramework.LogError("003.3", "Calling Devide method should return " + EQUALVALUE);
+ retVal = false;
+ }
+
+ myDecimal1 = new decimal(Int32.MaxValue);
+ myDecimal2 = new decimal(Int32.MaxValue);
+ returnValue = Decimal.Divide(myDecimal1, myDecimal2);
+ if (returnValue != EQUALVALUE)
+ {
+ TestLibrary.TestFramework.LogError("003.4", "Calling Devide method should return " + EQUALVALUE);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: d2 is zero.");
+
+ try
+ {
+
+ Decimal myDecimal1 = new decimal(TestLibrary.Generator.GetInt32(-55) );
+ Decimal myDecimal2 = new decimal(ZEROVALUE);
+ Decimal returnValue = Decimal.Divide(ZEROVALUE, myDecimal2);
+ TestLibrary.TestFramework.LogError("101.1", "DivideByZeroException should be caught.");
+ retVal = false;
+ }
+ catch (DivideByZeroException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The return value (that is, the quotient) is greater than MaxValue.");
+
+ try
+ {
+
+ Decimal myDecimal1 = new decimal(Int32.MaxValue);
+ Decimal myDecimal2 = new decimal(1e-020);
+ Decimal returnValue = Decimal.Divide(myDecimal1, myDecimal2);
+ TestLibrary.TestFramework.LogError("102.1", "OverflowException should be caught.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: The return value (that is, the quotient) is less than MinValue .");
+
+ try
+ {
+
+ Decimal myDecimal1 = new decimal(Int32.MinValue);
+ Decimal myDecimal2 = new decimal(1e-020);
+ Decimal returnValue = Decimal.Divide(myDecimal1, myDecimal2);
+ TestLibrary.TestFramework.LogError("103.1", "OverflowException should be caught.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalDivide test = new DecimalDivide();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalDivide");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalequals1.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalequals1.cs
new file mode 100644
index 0000000000..e3a97d0af4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalequals1.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///Equals(System.Decimal)
+/// </summary>
+public class DecimalEquals1
+{
+ #region const
+ private const int SEEDVALUE = 2;
+ private const int EQUALVALUE = 1;
+ private const int ZEROVALUE = 0;
+ #endregion
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: compare to itself.");
+
+ try
+ {
+
+ Decimal myDecimal1 = new decimal(TestLibrary.Generator.GetInt32(-55));
+
+ if (!myDecimal1.Equals(myDecimal1))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling Equals method should return true" );
+ retVal = false;
+ }
+
+ myDecimal1 = new decimal(TestLibrary.Generator.GetSingle(-55));
+
+ if (!myDecimal1.Equals(myDecimal1))
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Calling Equals method should return true");
+ retVal = false;
+ }
+ myDecimal1 = new decimal(TestLibrary.Generator.GetDouble(-55));
+
+ if (!myDecimal1.Equals(myDecimal1))
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Calling Equals method should return true");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Compare to difference value.");
+
+ try
+ {
+
+ Decimal myDecimal1 = new decimal(TestLibrary.Generator.GetInt32(-55));
+ Decimal myDecimal2 = new decimal(TestLibrary.Generator.GetSingle(-55));
+ if (myDecimal1.Equals(myDecimal2))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling Equals method should return false." );
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Compare to difference value.");
+
+ try
+ {
+
+ int myInt = TestLibrary.Generator.GetInt32(-55);
+ Decimal myDecimal1 = new decimal(myInt);
+ Decimal myDecimal2 = new decimal(myInt);
+ if (!myDecimal1.Equals(myDecimal2))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Calling Equals method should return true.");
+ retVal = false;
+ }
+ Single mySingle = TestLibrary.Generator.GetSingle(-55);
+ myDecimal1 = new decimal(mySingle);
+ myDecimal2 = new decimal(mySingle);
+ if (!myDecimal1.Equals(myDecimal2))
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Calling Equals method should return true.");
+ retVal = false;
+ }
+ double myDouble = TestLibrary.Generator.GetDouble(-55);
+ myDecimal1 = new decimal(myDouble);
+ myDecimal2 = new decimal(myDouble);
+ if (!myDecimal1.Equals(myDecimal2))
+ {
+ TestLibrary.TestFramework.LogError("003.3", "Calling Equals method should return true.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalEquals1 test = new DecimalEquals1();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalEquals1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalequals2.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalequals2.cs
new file mode 100644
index 0000000000..646d6576e1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalequals2.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///Equals(System.Decimal,System.Decimal)
+/// </summary>
+public class DecimalEquals2
+{
+ #region const
+ private const int SEEDVALUE = 2;
+ private const int EQUALVALUE = 1;
+ private const int ZEROVALUE = 0;
+ #endregion
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: compare to itself.");
+
+ try
+ {
+
+ Decimal myDecimal1 = new decimal(TestLibrary.Generator.GetInt32(-55));
+
+ if (!Decimal.Equals(myDecimal1, myDecimal1))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling Equals method should return true" );
+ retVal = false;
+ }
+
+ myDecimal1 = new decimal(TestLibrary.Generator.GetSingle(-55));
+
+ if (!Decimal.Equals(myDecimal1, myDecimal1))
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Calling Equals method should return true");
+ retVal = false;
+ }
+ myDecimal1 = new decimal(TestLibrary.Generator.GetDouble(-55));
+
+ if (!Decimal.Equals(myDecimal1, myDecimal1))
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Calling Equals method should return true");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Compare to difference value.");
+
+ try
+ {
+
+ Decimal myDecimal1 = new decimal(TestLibrary.Generator.GetInt32(-55));
+ Decimal myDecimal2 = new decimal(TestLibrary.Generator.GetSingle(-55));
+ if (Decimal.Equals(myDecimal1, myDecimal2))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling Equals method should return false." );
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Compare to difference value.");
+
+ try
+ {
+
+ int myInt = TestLibrary.Generator.GetInt32(-55);
+ Decimal myDecimal1 = new decimal(myInt);
+ Decimal myDecimal2 = new decimal(myInt);
+ if (!Decimal.Equals(myDecimal1, myDecimal2))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Calling Equals method should return true.");
+ retVal = false;
+ }
+ Single mySingle = TestLibrary.Generator.GetSingle(-55);
+ myDecimal1 = new decimal(mySingle);
+ myDecimal2 = new decimal(mySingle);
+ if (!Decimal.Equals(myDecimal1, myDecimal2))
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Calling Equals method should return true.");
+ retVal = false;
+ }
+ double myDouble = TestLibrary.Generator.GetDouble(-55);
+ myDecimal1 = new decimal(myDouble);
+ myDecimal2 = new decimal(myDouble);
+ if (!Decimal.Equals(myDecimal1, myDecimal2))
+ {
+ TestLibrary.TestFramework.LogError("003.3", "Calling Equals method should return true.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalEquals2 test = new DecimalEquals2();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalEquals2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalequals3.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalequals3.cs
new file mode 100644
index 0000000000..637b2d36ce
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalequals3.cs
@@ -0,0 +1,169 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///Equals(System.Object)
+/// </summary>
+public class DecimalEquals3
+{
+ #region const
+ private const int SEEDVALUE = 2;
+ private const int EQUALVALUE = 1;
+ private const int ZEROVALUE = 0;
+ #endregion
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: compare to itself.");
+
+ try
+ {
+
+ Decimal myDecimal1 = new decimal(TestLibrary.Generator.GetInt32(-55));
+ object myValue = myDecimal1;
+ if (!myDecimal1.Equals(myValue))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling Equals method should return true" );
+ retVal = false;
+ }
+
+ myDecimal1 = new decimal(TestLibrary.Generator.GetSingle(-55));
+ myValue = myDecimal1;
+ if (!myDecimal1.Equals(myValue))
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Calling Equals method should return true");
+ retVal = false;
+ }
+ myDecimal1 = new decimal(TestLibrary.Generator.GetDouble(-55));
+ myValue = myDecimal1;
+ if (!myDecimal1.Equals(myValue))
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Calling Equals method should return true");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Compare to difference value.");
+
+ try
+ {
+
+ Decimal myDecimal1 = new decimal(TestLibrary.Generator.GetInt32(-55));
+ Decimal myDecimal2 = new decimal(TestLibrary.Generator.GetSingle(-55));
+ object myValue = myDecimal2;
+ if (myDecimal1.Equals(myValue))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling Equals method should return false." );
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Compare to difference value.");
+
+ try
+ {
+
+ int myInt = TestLibrary.Generator.GetInt32(-55);
+ Decimal myDecimal1 = new decimal(myInt);
+ Decimal myDecimal2 = new decimal(myInt);
+ object myValue = myDecimal2;
+ if (!myDecimal1.Equals(myValue))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Calling Equals method should return true.");
+ retVal = false;
+ }
+ Single mySingle = TestLibrary.Generator.GetSingle(-55);
+ myDecimal1 = new decimal(mySingle);
+ myDecimal2 = new decimal(mySingle);
+ myValue = myDecimal2;
+ if (!myDecimal1.Equals(myValue))
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Calling Equals method should return true.");
+ retVal = false;
+ }
+ double myDouble = TestLibrary.Generator.GetDouble(-55);
+ myDecimal1 = new decimal(myDouble);
+ myDecimal2 = new decimal(myDouble);
+ myValue = myDecimal2;
+ if (!myDecimal1.Equals(myValue))
+ {
+ TestLibrary.TestFramework.LogError("003.3", "Calling Equals method should return true.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalEquals3 test = new DecimalEquals3();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalEquals3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalgetbits.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalgetbits.cs
new file mode 100644
index 0000000000..beefaed657
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalgetbits.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalmaxvalue.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalmaxvalue.cs
new file mode 100644
index 0000000000..6c30e57290
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalmaxvalue.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Decimal.MaxValue
+/// </summary>
+public class DecimalMaxValue
+{
+ private const string c_STRMAX = "79228162514264337593543950335";
+
+ public static int Main()
+ {
+ DecimalMaxValue dMaxValue = new DecimalMaxValue();
+ TestLibrary.TestFramework.BeginTestCase("for Field:System.Decimal.MaxValue");
+
+ if (dMaxValue.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1:Verify the Decimal.MaxValue is equal to 79228162514264337593543950335";
+ const string c_TEST_ID = "P001";
+
+ Decimal dMax = Convert.ToDecimal(c_STRMAX);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (Decimal.MaxValue != dMax)
+ {
+ string errorDesc = "Value is not " + dMax.ToString() + " as expected: Actual(" + Decimal.MaxValue.ToString() + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalminusone.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalminusone.cs
new file mode 100644
index 0000000000..0f119255ea
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalminusone.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Decimal.MinusOne
+/// </summary>
+public class DecimalMinusOne
+{
+
+ public static int Main()
+ {
+ DecimalMinusOne dMinusOne = new DecimalMinusOne();
+ TestLibrary.TestFramework.BeginTestCase("for Field:System.Decimal.MinusOne");
+
+ if (dMinusOne.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1:Verify the Decimal.MinusOne is equal -1";
+ const string c_TEST_ID = "P001";
+
+ Decimal dMinusOne = Convert.ToDecimal(-1);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (Decimal.MinusOne != dMinusOne)
+ {
+ string errorDesc = "Value is not " + dMinusOne.ToString() + " as expected: Actual(" + Decimal.MinusOne.ToString() + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalminvalue.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalminvalue.cs
new file mode 100644
index 0000000000..f14498d8bf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalminvalue.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Decimal.MinValue
+/// </summary>
+public class DecimalMinValue
+{
+ private const string c_STRMIN = "-79228162514264337593543950335";
+
+ public static int Main()
+ {
+ DecimalMinValue dMinValue = new DecimalMinValue();
+ TestLibrary.TestFramework.BeginTestCase("for Field:System.Decimal.MinValue");
+
+ if (dMinValue.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1:Verify the Decimal.MinValue is equal to -79228162514264337593543950335";
+ const string c_TEST_ID = "P001";
+
+ Decimal dMin = Convert.ToDecimal(c_STRMIN);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (Decimal.MinValue != dMin)
+ {
+ string errorDesc = "Value is not " + dMin.ToString() + " as expected: Actual(" + Decimal.MinValue.ToString() + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalmultiply.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalmultiply.cs
new file mode 100644
index 0000000000..dd9bf433f9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalmultiply.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalnegate.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalnegate.cs
new file mode 100644
index 0000000000..f43057ff93
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalnegate.cs
@@ -0,0 +1,108 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Negate(System.Decimal)
+/// </summary>
+public class DecimalNegate
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Calling Negate method.");
+
+ try
+ {
+ Decimal m1 = new decimal(TestLibrary.Generator.GetDouble(-55));
+ Decimal expectValue = -m1;
+ Decimal actualValue = Decimal.Negate(m1);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Negate should return " + expectValue);
+ retVal = false;
+ }
+
+
+ m1 = new decimal(TestLibrary.Generator.GetInt32(-55));
+ expectValue = -m1;
+ actualValue = Decimal.Negate(m1);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Negate should return " + expectValue);
+ retVal = false;
+ }
+
+ m1 = new decimal(TestLibrary.Generator.GetSingle(-55));
+ expectValue = -m1;
+ actualValue = Decimal.Negate(m1);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Negate should return " + expectValue);
+ retVal = false;
+ }
+
+ m1 = -1000m;
+ expectValue =1000m;
+ actualValue = Decimal.Negate(m1);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.4", "Negate should return " + expectValue);
+ retVal = false;
+ }
+
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalNegate test = new DecimalNegate();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalNegate");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region private method
+ public TypeCode GetExpectValue(Decimal myValue)
+ {
+ return TypeCode.Decimal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalone.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalone.cs
new file mode 100644
index 0000000000..a64efcae61
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalone.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Decimal.One
+/// </summary>
+public class DecimalOne
+{
+
+ public static int Main()
+ {
+ DecimalOne dOne = new DecimalOne();
+ TestLibrary.TestFramework.BeginTestCase("for Field:System.Decimal.One");
+
+ if (dOne.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1:Verify the Decimal One is equal to 1";
+ const string c_TEST_ID = "P001";
+
+ Decimal dOne = Convert.ToDecimal(1);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (Decimal.One != dOne)
+ {
+ string errorDesc = "Value is not " + dOne.ToString() + " as expected: Actual(" + Decimal.One.ToString() + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalparse.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalparse.cs
new file mode 100644
index 0000000000..b7acebdb88
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalparse.cs
@@ -0,0 +1,171 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Parse(System.String)
+/// </summary>
+public class DecimalParse
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Calling Parse method.");
+
+ try
+ {
+ Decimal m1 = new decimal(TestLibrary.Generator.GetDouble(-55));
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string m1ToString = m1.ToString(myCulture);
+ Decimal expectValue = m1;
+ Decimal actualValue = Decimal.Parse(m1ToString);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Parse method should return " + expectValue);
+ retVal = false;
+ }
+
+
+ m1 = new decimal(TestLibrary.Generator.GetInt32(-55));
+ m1ToString = m1.ToString(myCulture);
+ expectValue = m1;
+ actualValue = Decimal.Parse(m1ToString);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Parse method should return " + expectValue);
+ retVal = false;
+ }
+
+ m1 = new decimal(TestLibrary.Generator.GetSingle(-55));
+ m1ToString = m1.ToString(myCulture);
+ expectValue = m1;
+ actualValue = Decimal.Parse(m1ToString);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Parse method should return " + expectValue);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Calling Parse method and the decimal is MaxValue and MinValue.");
+
+ try
+ {
+ Decimal m1 = Decimal.MaxValue;
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string m1ToString = m1.ToString(myCulture);
+ Decimal expectValue = m1;
+ Decimal actualValue = Decimal.Parse(m1ToString);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Parse method should return " + expectValue);
+ retVal = false;
+ }
+
+ m1 = Decimal.MinValue;
+ m1ToString = m1.ToString(myCulture);
+ expectValue = m1;
+ actualValue = Decimal.Parse(m1ToString);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Parse method should return " + expectValue);
+ retVal = false;
+ }
+
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Calling Parse method and the decimal is Especial value.");
+
+ try
+ {
+ Decimal m1 = -9876543210.9876543210m;
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string m1ToString = m1.ToString(myCulture);
+ Decimal expectValue = m1;
+ Decimal actualValue = Decimal.Parse(m1ToString);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Parse method should return " + expectValue);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalParse test = new DecimalParse();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalParse");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region private method
+ public TypeCode GetExpectValue(Decimal myValue)
+ {
+ return TypeCode.Decimal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalparse2.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalparse2.cs
new file mode 100644
index 0000000000..3ff85cf979
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalparse2.cs
@@ -0,0 +1,414 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Parse(System.String,System.Globalization.NumberStyles)
+/// </summary>
+public class DecimalParse2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negitive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Calling Parse method.");
+
+ try
+ {
+ Decimal m1 = new decimal(TestLibrary.Generator.GetDouble(-55));
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string m1ToString = m1.ToString(myCulture);
+ Decimal expectValue = m1;
+ retVal = VerifyHelper(m1, m1ToString, NumberStyles.AllowDecimalPoint, "001.1") & retVal;
+ retVal = VerifyHelper(m1, m1ToString, NumberStyles.Any, "001.2") & retVal;
+ retVal = VerifyHelper(m1, m1ToString, NumberStyles.Currency, "001.3") & retVal;
+ retVal = VerifyHelper(m1, m1ToString, NumberStyles.Float, "001.4") & retVal;
+ retVal = VerifyHelper(m1, m1ToString, NumberStyles.Number, "001.5") & retVal;
+
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Calling Parse method and the decimal is MaxValue and MinValue.");
+
+ try
+ {
+ Decimal m1 = Decimal.MaxValue;
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string m1ToString = m1.ToString(myCulture);
+ Decimal expectValue = m1;
+ Decimal actualValue = Decimal.Parse(m1ToString, NumberStyles.Any);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Parse method should return " + expectValue);
+ retVal = false;
+ }
+
+ m1 = Decimal.MinValue;
+ m1ToString = m1.ToString(myCulture);
+ expectValue = m1;
+ actualValue = Decimal.Parse(m1ToString,NumberStyles.Any);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Parse method should return " + expectValue);
+ retVal = false;
+ }
+
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Calling Parse method and the decimal is Especial value.");
+
+ try
+ {
+ Decimal m1 = -9876543210.9876543210m;
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string m1ToString = m1.ToString(myCulture);
+ Decimal expectValue = m1;
+ Decimal actualValue = Decimal.Parse(m1ToString, NumberStyles.Any);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Parse method should return " + expectValue);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Negitive test
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: s is a null reference.");
+
+ try
+ {
+ string m1ToString = null;
+
+ Decimal actualValue = Decimal.Parse(m1ToString, NumberStyles.Any);
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException should be caught." );
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: s is not in the correct format.");
+
+ try
+ {
+ string m1ToString = "ADAAAW";
+
+ Decimal actualValue = Decimal.Parse(m1ToString, NumberStyles.Any);
+ TestLibrary.TestFramework.LogError("102.1", "FormatException should be caught.");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: s represents a number greater than MaxValue.");
+
+ try
+ {
+
+ Decimal myDecimal = decimal.MaxValue;
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string m1ToString = myDecimal.ToString(myCulture);
+ m1ToString = m1ToString + m1ToString;
+ Decimal actualValue = Decimal.Parse(m1ToString, NumberStyles.Any);
+ TestLibrary.TestFramework.LogError("103.1", "OverflowException should be caught.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: s represents a number less than MinValue.");
+
+ try
+ {
+
+ Decimal myDecimal = decimal.MinValue;
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string m1ToString = myDecimal.ToString(myCulture);
+ m1ToString = m1ToString + Decimal.Negate(myDecimal).ToString(myCulture);
+ Decimal actualValue = Decimal.Parse(m1ToString, NumberStyles.Any);
+ TestLibrary.TestFramework.LogError("104.1", "OverflowException should be caught.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: not support NumberStyles .");
+
+ try
+ {
+ Decimal m1 = new decimal(TestLibrary.Generator.GetDouble(-55));
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string m1ToString = m1.ToString(myCulture);
+ Decimal expectValue = m1;
+ retVal = VerifyNegHelper(m1, m1ToString, NumberStyles.AllowCurrencySymbol, "105.1") & retVal;
+ retVal = VerifyNegHelper(m1, m1ToString, NumberStyles.AllowExponent, "105.2") & retVal;
+ retVal = VerifyNegHelper(m1, m1ToString, NumberStyles.AllowLeadingSign, "105.4") & retVal;
+ retVal = VerifyNegHelper(m1, m1ToString, NumberStyles.AllowLeadingWhite, "105.5") & retVal;
+ retVal = VerifyNegHelper(m1, m1ToString, NumberStyles.AllowParentheses, "105.6") & retVal;
+ retVal = VerifyNegHelper(m1, m1ToString, NumberStyles.AllowThousands, "105.7") & retVal;
+ retVal = VerifyNegHelper(m1, m1ToString, NumberStyles.AllowTrailingSign, "105.8") & retVal;
+
+ retVal = VerifyNegHelper(m1, m1ToString, NumberStyles.AllowTrailingWhite, "105.9") & retVal;
+ retVal = VerifyNegHelper(m1, m1ToString, NumberStyles.Integer, "105.11") & retVal;
+ retVal = VerifyNegHelper(m1, m1ToString, NumberStyles.None, "105.12") & retVal;
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("105.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: style is the AllowHexSpecifier value.");
+
+ try
+ {
+ Decimal m1 = new decimal(TestLibrary.Generator.GetDouble(-55));
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string m1ToString = m1.ToString(myCulture);
+ Decimal expectValue = m1;
+ retVal = VerifyNegHexHelper(m1, m1ToString, NumberStyles.AllowHexSpecifier, "106.1") & retVal;
+ retVal = VerifyNegHexHelper(m1, m1ToString, NumberStyles.HexNumber, "106.2") & retVal;
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: style is not a NumberStyles value.");
+
+ try
+ {
+ Decimal m1 = new decimal(TestLibrary.Generator.GetDouble(-55));
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string m1ToString = m1.ToString(myCulture);
+ Decimal expectValue = m1;
+ retVal = VerifyNegHexHelper(m1, m1ToString,(NumberStyles)9999, "107.1") & retVal;
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("107.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DecimalParse2 test = new DecimalParse2();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalParse2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region private method
+ private bool VerifyHelper(Decimal expectValue, string testValue, NumberStyles myNumberStyles, string errorno)
+ {
+ bool retVal = true;
+ try
+ {
+ Decimal actualValue = Decimal.Parse(testValue, myNumberStyles);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Parse should return " + expectValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ private bool VerifyNegHelper(Decimal expectValue, string testValue, NumberStyles myNumberStyles, string errorno)
+ {
+ bool retVal = true;
+ try
+ {
+ Decimal actualValue = Decimal.Parse(testValue, myNumberStyles);
+
+ TestLibrary.TestFramework.LogError(errorno, "FormatException should be caught.");
+ retVal = false;
+
+ }
+ catch (FormatException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ private bool VerifyNegHexHelper(Decimal expectValue, string testValue, NumberStyles myNumberStyles, string errorno)
+ {
+ bool retVal = true;
+ try
+ {
+ Decimal actualValue = Decimal.Parse(testValue, myNumberStyles);
+
+ TestLibrary.TestFramework.LogError(errorno, "ArgumentException should be caught.");
+ retVal = false;
+
+ }
+ catch (ArgumentException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalparse3.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalparse3.cs
new file mode 100644
index 0000000000..eec6105916
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalparse3.cs
@@ -0,0 +1,417 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Parse(System.String,System.Globalization.NumberStyles,System.IFormatProvider)
+/// </summary>
+public class DecimalParse3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negitive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Calling Parse method.");
+
+ try
+ {
+ Decimal m1 = new decimal(TestLibrary.Generator.GetDouble(-55));
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ string m1ToString = m1.ToString(myCulture);
+ Decimal expectValue = m1;
+ retVal = VerifyHelper(m1, m1ToString, NumberStyles.AllowDecimalPoint, "001.1") & retVal;
+ retVal = VerifyHelper(m1, m1ToString, NumberStyles.Any, "001.2") & retVal;
+ retVal = VerifyHelper(m1, m1ToString, NumberStyles.Currency, "001.3") & retVal;
+ retVal = VerifyHelper(m1, m1ToString, NumberStyles.Float, "001.4") & retVal;
+ retVal = VerifyHelper(m1, m1ToString, NumberStyles.Number, "001.5") & retVal;
+
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Calling Parse method and the decimal is MaxValue and MinValue.");
+
+ try
+ {
+ Decimal m1 = Decimal.MaxValue;
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string m1ToString = m1.ToString(myCulture);
+ Decimal expectValue = m1;
+ Decimal actualValue = Decimal.Parse(m1ToString, NumberStyles.Any, myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Parse method should return " + expectValue);
+ retVal = false;
+ }
+
+ m1 = Decimal.MinValue;
+ m1ToString = m1.ToString(myCulture);
+ expectValue = m1;
+ actualValue = Decimal.Parse(m1ToString,NumberStyles.Any);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Parse method should return " + expectValue);
+ retVal = false;
+ }
+
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Calling Parse method and the decimal is Especial value.");
+
+ try
+ {
+ Decimal m1 = -9876543210.9876543210m;
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string m1ToString = m1.ToString(myCulture);
+ Decimal expectValue = m1;
+ Decimal actualValue = Decimal.Parse(m1ToString, NumberStyles.Any, myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Parse method should return " + expectValue);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Negitive test
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: s is a null reference.");
+
+ try
+ {
+ string m1ToString = null;
+ CultureInfo myCluture = CultureInfo.InvariantCulture;
+ Decimal actualValue = Decimal.Parse(m1ToString, NumberStyles.Any, myCluture);
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException should be caught." );
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: s is not in the correct format.");
+
+ try
+ {
+ string m1ToString = "ADAAAW";
+ CultureInfo myCluture = CultureInfo.InvariantCulture;
+ Decimal actualValue = Decimal.Parse(m1ToString, NumberStyles.Any, myCluture);
+ TestLibrary.TestFramework.LogError("102.1", "FormatException should be caught.");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: s represents a number greater than MaxValue.");
+
+ try
+ {
+
+ Decimal myDecimal = decimal.MaxValue;
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string m1ToString = myDecimal.ToString(myCulture);
+ m1ToString = m1ToString + m1ToString;
+ Decimal actualValue = Decimal.Parse(m1ToString, NumberStyles.Any, myCulture);
+ TestLibrary.TestFramework.LogError("103.1", "OverflowException should be caught.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: s represents a number less than MinValue.");
+
+ try
+ {
+
+ Decimal myDecimal = decimal.MinValue;
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string m1ToString = myDecimal.ToString(myCulture);
+ m1ToString = m1ToString + Decimal.Negate(myDecimal).ToString(myCulture);
+ Decimal actualValue = Decimal.Parse(m1ToString, NumberStyles.Any, myCulture);
+ TestLibrary.TestFramework.LogError("104.1", "OverflowException should be caught.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: not support NumberStyles .");
+
+ try
+ {
+ Decimal m1 = new decimal(TestLibrary.Generator.GetDouble(-55));
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ string m1ToString = m1.ToString(myCulture);
+ Decimal expectValue = m1;
+ retVal = VerifyNegHelper(m1, m1ToString, NumberStyles.AllowCurrencySymbol, "105.1") & retVal;
+ retVal = VerifyNegHelper(m1, m1ToString, NumberStyles.AllowExponent, "105.2") & retVal;
+ retVal = VerifyNegHelper(m1, m1ToString, NumberStyles.AllowLeadingSign, "105.4") & retVal;
+ retVal = VerifyNegHelper(m1, m1ToString, NumberStyles.AllowLeadingWhite, "105.5") & retVal;
+ retVal = VerifyNegHelper(m1, m1ToString, NumberStyles.AllowParentheses, "105.6") & retVal;
+ retVal = VerifyNegHelper(m1, m1ToString, NumberStyles.AllowThousands, "105.7") & retVal;
+ retVal = VerifyNegHelper(m1, m1ToString, NumberStyles.AllowTrailingSign, "105.8") & retVal;
+
+ retVal = VerifyNegHelper(m1, m1ToString, NumberStyles.AllowTrailingWhite, "105.9") & retVal;
+ retVal = VerifyNegHelper(m1, m1ToString, NumberStyles.Integer, "105.11") & retVal;
+ retVal = VerifyNegHelper(m1, m1ToString, NumberStyles.None, "105.12") & retVal;
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("105.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: style is the AllowHexSpecifier value.");
+
+ try
+ {
+ Decimal m1 = new decimal(TestLibrary.Generator.GetDouble(-55));
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ string m1ToString = m1.ToString(myCulture);
+ Decimal expectValue = m1;
+ retVal = VerifyNegHexHelper(m1, m1ToString, NumberStyles.AllowHexSpecifier, "106.1") & retVal;
+ retVal = VerifyNegHexHelper(m1, m1ToString, NumberStyles.HexNumber, "106.2") & retVal;
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: style is not a NumberStyles value.");
+
+ try
+ {
+ Decimal m1 = new decimal(TestLibrary.Generator.GetDouble(-55));
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ string m1ToString = m1.ToString(myCulture);
+ Decimal expectValue = m1;
+ retVal = VerifyNegHexHelper(m1, m1ToString,(NumberStyles)9999, "107.1") & retVal;
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("107.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DecimalParse3 test = new DecimalParse3();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalParse3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region private method
+ private bool VerifyHelper(Decimal expectValue, string testValue, NumberStyles myNumberStyles, string errorno)
+ {
+ bool retVal = true;
+ try
+ {
+ CultureInfo myCluture = CultureInfo.InvariantCulture;
+ Decimal actualValue = Decimal.Parse(testValue, myNumberStyles, myCluture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Parse should return " + expectValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ private bool VerifyNegHelper(Decimal expectValue, string testValue, NumberStyles myNumberStyles, string errorno)
+ {
+ bool retVal = true;
+ try
+ {
+ CultureInfo myCluture = CultureInfo.InvariantCulture;
+ Decimal actualValue = Decimal.Parse(testValue, myNumberStyles, myCluture);
+
+ TestLibrary.TestFramework.LogError(errorno, "FormatException should be caught.");
+ retVal = false;
+
+ }
+ catch (FormatException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ private bool VerifyNegHexHelper(Decimal expectValue, string testValue, NumberStyles myNumberStyles, string errorno)
+ {
+ bool retVal = true;
+ try
+ {
+ CultureInfo myCluture = CultureInfo.InvariantCulture;
+ Decimal actualValue = Decimal.Parse(testValue, myNumberStyles, myCluture);
+
+ TestLibrary.TestFramework.LogError(errorno, "ArgumentException should be caught.");
+ retVal = false;
+
+ }
+ catch (ArgumentException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalparse4.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalparse4.cs
new file mode 100644
index 0000000000..3a17b4b011
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalparse4.cs
@@ -0,0 +1,292 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Parse(System.String,System.IFormatProvider)
+/// </summary>
+public class DecimalParse4
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negitive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Calling Parse method.");
+
+ try
+ {
+ Decimal m1 = new decimal(TestLibrary.Generator.GetDouble(-55));
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string m1ToString = m1.ToString(myCulture);
+ Decimal expectValue = m1;
+ Decimal actualValue = Decimal.Parse(m1ToString, myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Parse method should return " + expectValue);
+ retVal = false;
+ }
+
+
+ m1 = new decimal(TestLibrary.Generator.GetInt32(-55));
+ m1ToString = m1.ToString(myCulture);
+ expectValue = m1;
+ actualValue = Decimal.Parse(m1ToString,myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Parse method should return " + expectValue);
+ retVal = false;
+ }
+
+ m1 = new decimal(TestLibrary.Generator.GetSingle(-55));
+ m1ToString = m1.ToString(myCulture);
+ expectValue = m1;
+ actualValue = Decimal.Parse(m1ToString, myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Parse method should return " + expectValue);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Calling Parse method and the decimal is MaxValue and MinValue.");
+
+ try
+ {
+ Decimal m1 = Decimal.MaxValue;
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string m1ToString = m1.ToString(myCulture);
+ Decimal expectValue = m1;
+ Decimal actualValue = Decimal.Parse(m1ToString, myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Parse method should return " + expectValue);
+ TestLibrary.TestFramework.LogInformation("Actual value: " + actualValue.ToString());
+ retVal = false;
+ }
+
+ m1 = Decimal.MinValue;
+ m1ToString = m1.ToString(myCulture);
+ expectValue = m1;
+ actualValue = Decimal.Parse(m1ToString, myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Parse method should return " + expectValue);
+ TestLibrary.TestFramework.LogInformation("Actual value: " + actualValue.ToString());
+ retVal = false;
+ }
+
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Calling Parse method and the decimal is Especial value.");
+
+ try
+ {
+ Decimal m1 = -9876543210.9876543210m;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ string m1ToString = m1.ToString(myCulture);
+ Decimal expectValue = m1;
+ Decimal actualValue = Decimal.Parse(m1ToString, myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Parse method should return " + expectValue);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Negitive test
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: s is a null reference.");
+
+ try
+ {
+ string m1ToString = null;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ Decimal actualValue = Decimal.Parse(m1ToString, myCulture);
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException should be caught.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: s is not in the correct format.");
+
+ try
+ {
+ string m1ToString = "ADAAAW";
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ Decimal actualValue = Decimal.Parse(m1ToString, myCulture);
+ TestLibrary.TestFramework.LogError("102.1", "FormatException should be caught.");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: s represents a number greater than MaxValue.");
+
+ try
+ {
+
+ Decimal myDecimal = decimal.MaxValue;
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string m1ToString = myDecimal.ToString(myCulture);
+ m1ToString = m1ToString + m1ToString;
+ Decimal actualValue = Decimal.Parse(m1ToString, myCulture);
+ TestLibrary.TestFramework.LogError("103.1", "OverflowException should be caught.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: s represents a number less than MinValue.");
+
+ try
+ {
+
+ Decimal myDecimal = decimal.MinValue;
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string m1ToString = myDecimal.ToString(myCulture);
+ m1ToString = m1ToString + Decimal.Negate(myDecimal).ToString(myCulture);
+ Decimal actualValue = Decimal.Parse(m1ToString,myCulture);
+ TestLibrary.TestFramework.LogError("104.1", "OverflowException should be caught.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DecimalParse4 test = new DecimalParse4();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalParse4");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region private method
+ public TypeCode GetExpectValue(Decimal myValue)
+ {
+ return TypeCode.Decimal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalremainder.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalremainder.cs
new file mode 100644
index 0000000000..0ed3072212
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalremainder.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalsubtract.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalsubtract.cs
new file mode 100644
index 0000000000..1d8f836573
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalsubtract.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimaltoboolean.cs b/tests/src/CoreMangLib/cti/system/decimal/decimaltoboolean.cs
new file mode 100644
index 0000000000..94c5731904
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimaltoboolean.cs
@@ -0,0 +1,212 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToBoolean(System.IFormatProvider)
+/// </summary>
+public class DecimalToBoolean
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random Decimal.");
+
+ try
+ {
+ Decimal i1 =new decimal( TestLibrary.Generator.GetSingle(-55));
+ CultureInfo myCulture = new CultureInfo("en-us");
+ bool actualValue = ((IConvertible)i1).ToBoolean(myCulture);
+ if (!actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToBoolean should return " + actualValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: check Decimal which is the MaxValue and MinValue.");
+
+ try
+ {
+ Decimal i1 = Decimal.MaxValue;
+ CultureInfo myCulture = new CultureInfo("en-us");
+ bool actualValue = ((IConvertible)i1).ToBoolean(myCulture);
+ if (!actualValue)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToBoolean should return " + actualValue);
+ retVal = false;
+ }
+ i1 = Decimal.MinValue;
+ actualValue = ((IConvertible)i1).ToBoolean(myCulture);
+ if (!actualValue)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "ToBoolean should return " + actualValue);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.4", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check a decimal which is -123456789.");
+
+ try
+ {
+ Decimal i1 = -123456789m;
+ CultureInfo myCulture = new CultureInfo("en-us");
+ bool actualValue = ((IConvertible)i1).ToBoolean(myCulture);
+ if (!actualValue)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "ToBoolean should return " + actualValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Check a Decimal which is 123.45e+6.");
+
+ try
+ {
+ Decimal i1 = (Decimal)123.45e+6;
+ CultureInfo myCulture = new CultureInfo("en-us");
+ bool actualValue = ((IConvertible)i1).ToBoolean(myCulture);
+ if (!actualValue)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "ToBoolean should return " + actualValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Check a Decimal which is -.123.");
+
+ try
+ {
+ Decimal i1 = (Decimal)(-.123);
+ CultureInfo myCulture = new CultureInfo("en-us");
+ bool actualValue = ((IConvertible)i1).ToBoolean(myCulture);
+ if (!actualValue)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "ToBoolean return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Check a Decimal which is +123.");
+
+ try
+ {
+ Decimal i1 = (Decimal)(+123);
+ CultureInfo myCulture = new CultureInfo("en-us");
+ bool actualValue = ((IConvertible)i1).ToBoolean(myCulture);
+ if (!actualValue)
+ {
+ TestLibrary.TestFramework.LogError("006.1", "ToBoolean return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalToBoolean test = new DecimalToBoolean();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalToBoolean");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimaltobyte.cs b/tests/src/CoreMangLib/cti/system/decimal/decimaltobyte.cs
new file mode 100644
index 0000000000..19d8869c80
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimaltobyte.cs
@@ -0,0 +1,200 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToByte(System.IFormatProvider)
+/// </summary>
+public class DecimalToByte
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random Decimal.");
+
+ try
+ {
+ Decimal i1 = new decimal(TestLibrary.Generator.GetSingle(-55));
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ byte expectVaule;
+ if (i1 > 0.5m)
+ expectVaule = 1;
+ else
+ expectVaule = 0;
+ byte actualValue = ((IConvertible)i1).ToByte(myCulture);
+ if (actualValue != expectVaule)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToByte mix match: Expected(" + expectVaule +") Actual("+actualValue+")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check a Decimal which is byte.MaxValue and byte.MinValue.");
+
+ try
+ {
+ Decimal i1 = byte.MaxValue;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ byte expectVaule = byte.MaxValue;
+ byte actualValue = ((IConvertible)i1).ToByte(myCulture);
+ if (actualValue != expectVaule)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToByte should return " + expectVaule);
+ retVal = false;
+ }
+
+ i1 = byte.MinValue;
+ expectVaule = byte.MinValue;
+ actualValue = ((IConvertible)i1).ToByte(myCulture);
+ if (actualValue != expectVaule)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "ToByte should return " + expectVaule);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: value is greater than Byte.MaxValue.");
+
+ try
+ {
+ Decimal i1 = byte.MaxValue + 1m;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ byte actualValue = ((IConvertible)i1).ToByte(myCulture);
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException should be caught. ");
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: value is less than Byte.MinValue.");
+
+ try
+ {
+ Decimal i1 = byte.MinValue - 1m;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ byte actualValue = ((IConvertible)i1).ToByte(myCulture);
+ TestLibrary.TestFramework.LogError("102.1", "OverflowException should be caught. ");
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalToByte test = new DecimalToByte();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalToByte");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region private method
+ private bool VerifyHelper(Decimal i1, string errorno)
+ {
+ bool retVal = true;
+
+ try
+ {
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ byte actualValue = ((IConvertible)i1).ToByte(myCulture);
+ TestLibrary.TestFramework.LogError(errorno, "OverflowException should be caught. ");
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimaltobyte1.cs b/tests/src/CoreMangLib/cti/system/decimal/decimaltobyte1.cs
new file mode 100644
index 0000000000..f80d5b4290
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimaltobyte1.cs
@@ -0,0 +1,197 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///ToByte(System.Decimal)
+/// </summary>
+public class DecimalToByte1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random Decimal.");
+
+ try
+ {
+ byte b = (byte)(TestLibrary.Generator.GetInt32(-55) % 256);
+ Decimal i1 = (Decimal)(b + new decimal(TestLibrary.Generator.GetSingle(-55)));
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ byte expectVaule = b;
+ byte actualValue = Decimal.ToByte(i1);
+ if (actualValue != expectVaule)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToByte should return " + expectVaule + " Actual: " + actualValue);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check a Decimal which is byte.MaxValue and byte.MinValue.");
+
+ try
+ {
+ Decimal i1 = byte.MaxValue;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ byte expectVaule = byte.MaxValue;
+ byte actualValue = Decimal.ToByte(i1);
+ if (actualValue != expectVaule)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToByte should return " + expectVaule);
+ retVal = false;
+ }
+
+ i1 = byte.MinValue;
+ expectVaule = byte.MinValue;
+ actualValue = Decimal.ToByte(i1);
+ if (actualValue != expectVaule)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "ToByte should return " + expectVaule);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: value is greater than Byte.MaxValue.");
+
+ try
+ {
+ Decimal i1 = byte.MaxValue + 1m;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ byte actualValue = Decimal.ToByte(i1);
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException should be caught. ");
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: value is less than Byte.MinValue.");
+
+ try
+ {
+ Decimal i1 = byte.MinValue - 1m;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ byte actualValue = Decimal.ToByte(i1);
+ TestLibrary.TestFramework.LogError("102.1", "OverflowException should be caught. ");
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalToByte1 test = new DecimalToByte1();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalToByte1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region private method
+ private bool VerifyHelper(Decimal i1, string errorno)
+ {
+ bool retVal = true;
+
+ try
+ {
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ byte actualValue = Decimal.ToByte(i1);
+ TestLibrary.TestFramework.LogError(errorno, "OverflowException should be caught. ");
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimaltochar.cs b/tests/src/CoreMangLib/cti/system/decimal/decimaltochar.cs
new file mode 100644
index 0000000000..96ce7c3ab3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimaltochar.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimaltodatetime.cs b/tests/src/CoreMangLib/cti/system/decimal/decimaltodatetime.cs
new file mode 100644
index 0000000000..53aa601931
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimaltodatetime.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimaltodecimal.cs b/tests/src/CoreMangLib/cti/system/decimal/decimaltodecimal.cs
new file mode 100644
index 0000000000..cfa4fec530
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimaltodecimal.cs
@@ -0,0 +1,160 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToDecimal(System.IFormatProvider)
+/// </summary>
+public class DecimalToDecimal
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random Decimal.");
+
+ try
+ {
+ Decimal i1 = new decimal(TestLibrary.Generator.GetSingle(-55));
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ Decimal expectVaule = i1;
+ Decimal actualValue = ((IConvertible)i1).ToDecimal(myCulture);
+ if (actualValue != expectVaule)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToDecimal should return " + expectVaule);
+ retVal = false;
+ }
+
+
+ i1 = new decimal(TestLibrary.Generator.GetInt32(-55));
+ expectVaule = i1;
+ actualValue = ((IConvertible)i1).ToDecimal(myCulture);
+ if (actualValue != expectVaule)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "ToDecimal should return " + expectVaule);
+ retVal = false;
+ }
+
+
+ i1 = new decimal(TestLibrary.Generator.GetSingle(-55));
+ expectVaule = i1;
+ actualValue = ((IConvertible)i1).ToDecimal(myCulture);
+ if (actualValue != expectVaule)
+ {
+ TestLibrary.TestFramework.LogError("001.3", "ToDecimal should return " + expectVaule);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check a Decimal which is byte.MaxValue and byte.MinValue.");
+
+ try
+ {
+ Decimal i1 = Decimal.MaxValue;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ Decimal expectVaule = Decimal.MaxValue;
+ Decimal actualValue = ((IConvertible)i1).ToDecimal(myCulture);
+ if (actualValue != expectVaule)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToDecimal should return " + expectVaule);
+ retVal = false;
+ }
+
+ i1 = Decimal.MinValue;
+ expectVaule = Decimal.MinValue;
+ actualValue = ((IConvertible)i1).ToDecimal(myCulture);
+ if (actualValue != expectVaule)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "ToDecimal should return " + expectVaule);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalToDecimal test = new DecimalToDecimal();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalToDecimal");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region private method
+ private bool VerifyHelper(Decimal i1, string errorno)
+ {
+ bool retVal = true;
+
+ try
+ {
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ Decimal actualValue = ((IConvertible)i1).ToDecimal(myCulture);
+ TestLibrary.TestFramework.LogError(errorno, "OverflowException should be caught. ");
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimaltodouble.cs b/tests/src/CoreMangLib/cti/system/decimal/decimaltodouble.cs
new file mode 100644
index 0000000000..37b020d4d2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimaltodouble.cs
@@ -0,0 +1,112 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToDouble(System.IFormatProvider)
+/// </summary>
+public class DecimalToDouble
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random Decimal.");
+
+ try
+ {
+ Decimal d1 = new decimal(TestLibrary.Generator.GetSingle(-55));
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ double actualValue = ((IConvertible)d1).ToDouble(myCulture);
+ double expectValue = (double)d1;
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToDouble should return " + expectValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check a Decimal which is the Decimal.MaxValue and Decimal.MinValue.");
+
+ try
+ {
+ Decimal i1 = Decimal.MaxValue;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ Double actualValue = ((IConvertible)i1).ToDouble(myCulture);
+ Double expectValue = (double)i1;
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToDouble should return " + expectValue);
+ retVal = false;
+ }
+
+ i1 = Decimal.MinValue;
+ actualValue = ((IConvertible)i1).ToDouble(myCulture);
+ expectValue = (double)i1;
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "ToDouble should return " + expectValue);
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalToDouble test = new DecimalToDouble();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalToDouble");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimaltoint16.cs b/tests/src/CoreMangLib/cti/system/decimal/decimaltoint16.cs
new file mode 100644
index 0000000000..93ff98ca83
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimaltoint16.cs
@@ -0,0 +1,172 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToInt16(System.IFormatProvider)
+/// </summary>
+public class DecimalToInt16
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random Decimal.");
+
+ try
+ {
+ Decimal i1 = new decimal(TestLibrary.Generator.GetSingle(-55));
+ short expectValue = 0;
+ if (i1 > 0.5m)
+ expectValue = 1;
+ else
+ expectValue = 0;
+ CultureInfo myCulture = new CultureInfo("en-us");
+ short actualValue = ((IConvertible)i1).ToInt16(myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToInt16 should return " + expectValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check a Decimal which is -123.");
+
+ try
+ {
+ Decimal i1 = short.MaxValue;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ short actualValue = ((IConvertible)i1).ToInt16(myCulture);
+ if (actualValue != short.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToInt16 return failed. ");
+ retVal = false;
+ }
+
+ i1 = short.MinValue;
+ actualValue = ((IConvertible)i1).ToInt16(myCulture);
+ if (actualValue != short.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "ToInt16 return failed. ");
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Check a Decimal which is >Int16.MaxValue.");
+
+ try
+ {
+ Decimal i1 = Int16.MaxValue +1m;
+ CultureInfo myCulture = new CultureInfo("en-us");
+ short actualValue = ((IConvertible)i1).ToInt16(myCulture);
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException should be caught.");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Check a Decimal which is <Int16.MinValue.");
+
+ try
+ {
+ Decimal i1 = Int16.MinValue - 1m;
+ CultureInfo myCulture = new CultureInfo("en-us");
+ short actualValue = ((IConvertible)i1).ToInt16(myCulture);
+ TestLibrary.TestFramework.LogError("102.1", "ToInt16 return failed. ");
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalToInt16 test = new DecimalToInt16();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalToInt16");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimaltoint32.cs b/tests/src/CoreMangLib/cti/system/decimal/decimaltoint32.cs
new file mode 100644
index 0000000000..727b19a2b6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimaltoint32.cs
@@ -0,0 +1,172 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToInt32(System.IFormatProvider)
+/// </summary>
+public class DecimalToInt32
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random Decimal.");
+
+ try
+ {
+ Decimal i1 = new decimal(TestLibrary.Generator.GetSingle(-55));
+ int expectValue = 0;
+ if (i1 > 0.5m)
+ expectValue = 1;
+ else
+ expectValue = 0;
+ CultureInfo myCulture = new CultureInfo("en-us");
+ int actualValue = ((IConvertible)i1).ToInt32(myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToInt32 should return " + expectValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check a Decimal which is -123.");
+
+ try
+ {
+ Decimal i1 = int.MaxValue;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ int actualValue = ((IConvertible)i1).ToInt32(myCulture);
+ if (actualValue != int.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToInt32 return failed. ");
+ retVal = false;
+ }
+
+ i1 = int.MinValue;
+ actualValue = ((IConvertible)i1).ToInt32(myCulture);
+ if (actualValue != int.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "ToInt32 return failed. ");
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Check a Decimal which is >Int32.MaxValue.");
+
+ try
+ {
+ Decimal i1 = Int32.MaxValue +1m;
+ CultureInfo myCulture = new CultureInfo("en-us");
+ int actualValue = ((IConvertible)i1).ToInt32(myCulture);
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException should be caught.");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Check a Decimal which is <Int32.MinValue.");
+
+ try
+ {
+ Decimal i1 = Int32.MinValue - 1m;
+ CultureInfo myCulture = new CultureInfo("en-us");
+ int actualValue = ((IConvertible)i1).ToInt32(myCulture);
+ TestLibrary.TestFramework.LogError("102.1", "ToInt32 return failed. ");
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalToInt32 test = new DecimalToInt32();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalToInt32");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimaltoint64.cs b/tests/src/CoreMangLib/cti/system/decimal/decimaltoint64.cs
new file mode 100644
index 0000000000..bfdeb06413
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimaltoint64.cs
@@ -0,0 +1,172 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToInt64(System.IFormatProvider)
+/// </summary>
+public class DecimalToInt64
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random Decimal.");
+
+ try
+ {
+ Decimal i1 = new decimal(TestLibrary.Generator.GetSingle(-55));
+ long expectValue = 0;
+ if (i1 > 0.5m)
+ expectValue = 1;
+ else
+ expectValue = 0;
+ CultureInfo myCulture = new CultureInfo("en-us");
+ long actualValue = ((IConvertible)i1).ToInt64(myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToInt64 should return " + expectValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check a Decimal which is Int64.MaxValue and Int64.MinValue.");
+
+ try
+ {
+ Decimal i1 = Int64.MaxValue;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ long actualValue = ((IConvertible)i1).ToInt64(myCulture);
+ if (actualValue != Int64.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToInt64 return failed. ");
+ retVal = false;
+ }
+
+ i1 = Int64.MinValue;
+ actualValue = ((IConvertible)i1).ToInt64(myCulture);
+ if (actualValue != Int64.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "ToInt64 return failed. ");
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Check a Decimal which is >Int64.MaxValue.");
+
+ try
+ {
+ Decimal i1 = Int64.MaxValue +1m;
+ CultureInfo myCulture = new CultureInfo("en-us");
+ Int64 actualValue = ((IConvertible)i1).ToInt64(myCulture);
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException should be caught.");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Check a Decimal which is <Int64.MinValue.");
+
+ try
+ {
+ Decimal i1 = Int64.MinValue - 1m;
+ CultureInfo myCulture = new CultureInfo("en-us");
+ Int64 actualValue = ((IConvertible)i1).ToInt64(myCulture);
+ TestLibrary.TestFramework.LogError("102.1", "ToInt64 return failed. ");
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalToInt64 test = new DecimalToInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalToInt64");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimaltosbyte.cs b/tests/src/CoreMangLib/cti/system/decimal/decimaltosbyte.cs
new file mode 100644
index 0000000000..43cde3d8c9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimaltosbyte.cs
@@ -0,0 +1,174 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToSByte(System.IFormatProvider)
+/// </summary>
+public class DecimalToSByte
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random Decimal.");
+
+ try
+ {
+ Decimal i1 = new decimal(TestLibrary.Generator.GetSingle(-55));
+ int expectValue = 0;
+ if (i1 > 0.5m)
+ expectValue = 1;
+ else
+ expectValue = 0;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ sbyte actualValue = ((IConvertible)i1).ToSByte(myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToSByte should return " + expectValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check a Decimal which is sbyte.MaxValue and sbyte.MinValue.");
+
+ try
+ {
+ Decimal i1 = sbyte.MaxValue;
+ CultureInfo myCulture =CultureInfo.InvariantCulture;
+ sbyte actualValue = ((IConvertible)i1).ToSByte(myCulture);
+ if (actualValue != sbyte.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToSByte return failed. ");
+ retVal = false;
+ }
+
+ i1 = sbyte.MinValue;
+ actualValue = ((IConvertible)i1).ToSByte(myCulture);
+ if (actualValue != sbyte.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "ToSByte return failed. ");
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Check a Decimal which is >SByte.MaxValue.");
+
+ try
+ {
+
+ Decimal i1 = SByte.MaxValue + 1.0m;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ sbyte actualValue = ((IConvertible)i1).ToSByte(myCulture);
+ TestLibrary.TestFramework.LogError("101.1", "ToSByte return failed. ");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Check a Decimal which is <SByte.MinValue.");
+
+ try
+ {
+ Decimal i1 = SByte.MinValue - 1.0m;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ sbyte actualValue = ((IConvertible)i1).ToSByte(myCulture);
+ TestLibrary.TestFramework.LogError("102.1", "ToSByte return failed. ");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalToSByte test = new DecimalToSByte();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalToSByte");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimaltosingle.cs b/tests/src/CoreMangLib/cti/system/decimal/decimaltosingle.cs
new file mode 100644
index 0000000000..276645df62
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimaltosingle.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToSingle(System.IFormatProvider)
+/// </summary>
+public class DecimalToSingle
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random single.");
+
+ try
+ {
+ Decimal i1 = new decimal(TestLibrary.Generator.GetSingle(-55));
+
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ Single actualValue = ((IConvertible)i1).ToSingle(myCulture);
+ Single expectValue = (Single)i1;
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToSingle should return " + expectValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check a single which is -9999.999.");
+
+ try
+ {
+ Decimal i1 = -9999.999m;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ Single actualValue = ((IConvertible)i1).ToSingle(myCulture);
+ Single expectValue = -9999.999f;
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToSingle should return " + expectValue);
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalToSingle test = new DecimalToSingle();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalToSingle");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimaltostring1.cs b/tests/src/CoreMangLib/cti/system/decimal/decimaltostring1.cs
new file mode 100644
index 0000000000..49999d5e35
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimaltostring1.cs
@@ -0,0 +1,154 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.CompilerServices;
+using System.Globalization;
+/// <summary>
+/// ToString
+/// </summary>
+public class DecimalToString1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Calling ToString method.");
+
+ try
+ {
+ decimal d1 = 11111.111m;
+ CultureInfo myCulture=CultureInfo.CurrentCulture ;
+ string seperator=myCulture.NumberFormat.CurrencyDecimalSeparator;
+ string expectValue="11111"+seperator+"111";
+ string actualValue = d1.ToString();
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToString should return "+expectValue);
+ retVal = false;
+ }
+ d1 = -11111.111m;
+ expectValue = "-11111" + seperator + "111";
+ actualValue = d1.ToString();
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "ToString should return " + expectValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Calling ToString method and the value is Decimal.MaxValue and Decimal.MinValue.");
+
+ try
+ {
+ decimal d1 = Decimal.MaxValue;
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string seperator = myCulture.NumberFormat.CurrencyDecimalSeparator;
+ string expectValue = "79228162514264337593543950335";
+ string actualValue = d1.ToString();
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToString should return " + expectValue);
+ retVal = false;
+ }
+ d1 = Decimal.MinValue;
+ expectValue = "-79228162514264337593543950335";
+ actualValue = d1.ToString();
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "ToString should return " + expectValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Calling ToString method,the decimal has a long fractional digits.");
+
+ try
+ {
+ int exponent = 28;
+ decimal d1 = 1e-28m;
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string seperator = myCulture.NumberFormat.CurrencyDecimalSeparator;
+ string expectValue = "0" + seperator;
+ for (int i = 1; i < exponent; i++)
+ {
+ expectValue += "0";
+ }
+ expectValue = expectValue + "1";
+ string actualValue = d1.ToString();
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "ToString should return " + expectValue);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalToString1 test = new DecimalToString1();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalToString1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimaltostring2.cs b/tests/src/CoreMangLib/cti/system/decimal/decimaltostring2.cs
new file mode 100644
index 0000000000..aa8d58f588
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimaltostring2.cs
@@ -0,0 +1,154 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.CompilerServices;
+using System.Globalization;
+/// <summary>
+/// ToString(System.IFormatProvider)
+/// </summary>
+public class DecimalToString2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Calling ToString method.");
+
+ try
+ {
+ decimal d1 = 11111.111m;
+ CultureInfo myCulture=CultureInfo.InvariantCulture ;
+ string seperator=myCulture.NumberFormat.CurrencyDecimalSeparator;
+ string expectValue="11111"+seperator+"111";
+ string actualValue = d1.ToString(myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToString should return "+expectValue);
+ retVal = false;
+ }
+ d1 = -11111.111m;
+ expectValue = "-11111" + seperator + "111";
+ actualValue = d1.ToString(myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "ToString should return " + expectValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Calling ToString method and the value is Decimal.MaxValue and Decimal.MinValue.");
+
+ try
+ {
+ decimal d1 = Decimal.MaxValue;
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string seperator = myCulture.NumberFormat.CurrencyDecimalSeparator;
+ string expectValue = "79228162514264337593543950335";
+ string actualValue = d1.ToString(myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToString should return " + expectValue);
+ retVal = false;
+ }
+ d1 = Decimal.MinValue;
+ expectValue = "-79228162514264337593543950335";
+ actualValue = d1.ToString(myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "ToString should return " + expectValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Calling ToString method,the decimal has a long fractional digits.");
+
+ try
+ {
+ int exponent = 28;
+ decimal d1 = 1e-28m;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ string seperator = myCulture.NumberFormat.CurrencyDecimalSeparator;
+ string expectValue = "0" + seperator;
+ for (int i = 1; i < exponent; i++)
+ {
+ expectValue += "0";
+ }
+ expectValue = expectValue + "1";
+ string actualValue = d1.ToString(myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "ToString should return " + expectValue);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalToString2 test = new DecimalToString2();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalToString2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimaltostring3.cs b/tests/src/CoreMangLib/cti/system/decimal/decimaltostring3.cs
new file mode 100644
index 0000000000..2211388516
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimaltostring3.cs
@@ -0,0 +1,195 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.CompilerServices;
+using System.Globalization;
+/// <summary>
+///ToString(System.String)
+/// </summary>
+public class DecimalToString3
+{
+ #region privates
+ private CultureInfo CurrentCulture = TestLibrary.Utilities.CurrentCulture;
+ private CultureInfo customCulture = null;
+
+ private CultureInfo CustomCulture
+ {
+ get
+ {
+ if (null == customCulture)
+ {
+ customCulture = new CultureInfo(CultureInfo.CurrentCulture.Name);
+ NumberFormatInfo nfi = customCulture.NumberFormat;
+
+ //For "G"
+ // NegativeSign, NumberDecimalSeparator, NumberDecimalDigits, PositiveSign
+ nfi.NumberDecimalDigits = 2;
+ nfi.PositiveSign = "+";
+ nfi.NegativeSign = "-";
+ nfi.NumberDecimalSeparator = ".";
+
+ //For "N"
+ //NegativeSign, NumberNegativePattern, NumberGroupSizes, NumberGroupSeparator, NumberDecimalSeparator, NumberDecimalDigits
+ nfi.NumberNegativePattern = 1;
+ nfi.NumberGroupSizes = new int[]{3};
+ nfi.NumberGroupSeparator = ",";
+
+ customCulture.NumberFormat = nfi;
+ }
+ return customCulture;
+ }
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ TestLibrary.Utilities.CurrentCulture = CustomCulture;
+
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.Utilities.CurrentCulture = CurrentCulture;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Calling ToString method,format string is G.");
+
+ try
+ {
+ decimal d1 = 11111.111m;
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string seperator = myCulture.NumberFormat.NumberDecimalSeparator;
+ string expectValue = "11111" + seperator + "111";
+ string actualValue = d1.ToString("G9");
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToString should return " + expectValue);
+ retVal = false;
+ }
+ d1 = -11111.1234567891m;
+ expectValue = "-11111" + seperator + "1235";
+ actualValue = d1.ToString("G9");
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "ToString should return " + expectValue);
+ retVal = false;
+ }
+
+ d1 = -1.1234567891m;
+ expectValue = "-1";
+ actualValue = d1.ToString("G1");
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.3", "ToString should return " + expectValue);
+ retVal = false;
+ }
+
+ d1 = -1.1234567891m;
+ expectValue = "-1" + seperator + "1235";
+ actualValue = d1.ToString("G5");
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.4", "ToString should return " + expectValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Calling ToString method,format string is N.");
+
+ try
+ {
+ decimal d1 = 11111.111m;
+ CultureInfo myCulture = CultureInfo.CurrentCulture;
+ string seperator = myCulture.NumberFormat.NumberDecimalSeparator;
+ string expectValue = "11" + myCulture.NumberFormat.NumberGroupSeparator + "111" + seperator + "111000000";
+ string actualValue = d1.ToString("N9");
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToString should return " + expectValue);
+ retVal = false;
+ }
+ d1 = -11111.1234567891m;
+ expectValue = "-11" + myCulture.NumberFormat.NumberGroupSeparator + "111" + seperator + "123456789";
+ actualValue = d1.ToString("N9");
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "ToString should return " + expectValue);
+ retVal = false;
+ }
+
+ d1 = -1.1234567891m;
+ expectValue = "-1" + seperator + "1";
+ actualValue = d1.ToString("N1");
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.3", "ToString should return " + expectValue);
+ retVal = false;
+ }
+
+ d1 = -1.1234567891m;
+ expectValue = "-1" + seperator + "12346";
+ actualValue = d1.ToString("N5");
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.4", "ToString should return " + expectValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalToString3 test = new DecimalToString3();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalToString3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimaltostring4.cs b/tests/src/CoreMangLib/cti/system/decimal/decimaltostring4.cs
new file mode 100644
index 0000000000..3ce0148fab
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimaltostring4.cs
@@ -0,0 +1,209 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.CompilerServices;
+using System.Globalization;
+/// <summary>
+/// ToString(System.String,System.IFormatProvider)
+/// </summary>
+public class DecimalToString4
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Calling ToString method,format string is G.");
+
+ try
+ {
+ decimal d1 = 11111.111m;
+ CultureInfo myCulture=CultureInfo.InvariantCulture ;
+ string seperator=myCulture.NumberFormat.CurrencyDecimalSeparator;
+ string expectValue="11111"+seperator+"111";
+ string actualValue = d1.ToString("G9", myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToString should return "+expectValue);
+ retVal = false;
+ }
+ d1 = -11111.1234567891m;
+ expectValue = "-11111" + seperator + "1235";
+ actualValue = d1.ToString("G9", myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "ToString should return " + expectValue);
+ retVal = false;
+ }
+
+ d1 = -1.1234567891m;
+ expectValue = "-1" ;
+ actualValue = d1.ToString("G1", myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.3", "ToString should return " + expectValue);
+ retVal = false;
+ }
+
+ d1 = -1.1234567891m;
+ expectValue = "-1" + seperator + "1235";
+ actualValue = d1.ToString("G5", myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.4", "ToString should return " + expectValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Calling ToString method,format string is N.");
+
+ try
+ {
+ decimal d1 = 11111.111m;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ string seperator = myCulture.NumberFormat.CurrencyDecimalSeparator;
+ string expectValue = "11" + myCulture.NumberFormat.NumberGroupSeparator + "111" + seperator + "111000000";
+ string actualValue = d1.ToString("N9", myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToString should return " + expectValue);
+ retVal = false;
+ }
+ d1 = -11111.1234567891m;
+ expectValue = "-11" + myCulture.NumberFormat.NumberGroupSeparator + "111" + seperator + "123456789";
+ actualValue = d1.ToString("N9", myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "ToString should return " + expectValue);
+ retVal = false;
+ }
+
+ d1 = -1.1234567891m;
+ expectValue = "-1" + seperator + "1";
+ actualValue = d1.ToString("N1", myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.3", "ToString should return " + expectValue);
+ retVal = false;
+ }
+
+ d1 = -1.1234567891m;
+ expectValue = "-1" + seperator + "12346";
+ actualValue = d1.ToString("N5", myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.4", "ToString should return " + expectValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Calling ToString method,format string is C.");
+
+ try
+ {
+ decimal d1 = 11111.111m;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ string seperator = myCulture.NumberFormat.CurrencyDecimalSeparator;
+ string expectValue = myCulture.NumberFormat.CurrencySymbol + "11" + myCulture.NumberFormat.NumberGroupSeparator + "111" + seperator + "111000000";
+ string actualValue = d1.ToString("C9", myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "ToString should return " + expectValue);
+ retVal = false;
+ }
+ d1 = 11111.1234567891m;
+ expectValue = myCulture.NumberFormat.CurrencySymbol + "11" + myCulture.NumberFormat.NumberGroupSeparator + "111" + seperator + "123456789";
+ actualValue = d1.ToString("C9", myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "ToString should return " + expectValue);
+ retVal = false;
+ }
+
+ d1 = 1.1234567891m;
+ expectValue = myCulture.NumberFormat.CurrencySymbol + "1" + seperator + "1";
+ actualValue = d1.ToString("C1", myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("003.3", "ToString should return " + expectValue);
+ retVal = false;
+ }
+
+ d1 = 1.1234567891m;
+ expectValue = myCulture.NumberFormat.CurrencySymbol + "1" + seperator + "12346";
+ actualValue = d1.ToString("C5", myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("003.4", "ToString should return " + expectValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalToString4 test = new DecimalToString4();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalToString4");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimaltouint16.cs b/tests/src/CoreMangLib/cti/system/decimal/decimaltouint16.cs
new file mode 100644
index 0000000000..268bace4f6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimaltouint16.cs
@@ -0,0 +1,137 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToUInt16(System.IFormatProvider)
+/// </summary>
+public class DecimalToUInt16
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random Decimal.");
+
+ try
+ {
+ Decimal i1 = new decimal (TestLibrary.Generator.GetSingle(-55));
+ short expectValue = 0;
+ if (i1 > 0.5m)
+ expectValue = 1;
+ else
+ expectValue = 0;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ ushort actualValue = ((IConvertible)i1).ToUInt16(myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToUInt16 return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Check a Decimal which is >UInt16.MaxValue.");
+
+ try
+ {
+ Decimal i1 = UInt16.MaxValue + 1m;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ ushort actualValue = ((IConvertible)i1).ToUInt16(myCulture);
+ TestLibrary.TestFramework.LogError("101.1", "ToUInt16 return failed. ");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Check a Decimal which is <UInt16.MinValue.");
+
+ try
+ {
+ Decimal i1 = UInt16.MinValue - 1m;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ ushort actualValue = ((IConvertible)i1).ToUInt16(myCulture);
+ TestLibrary.TestFramework.LogError("102.1", "ToUInt16 return failed. ");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalToUInt16 test = new DecimalToUInt16();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalToUInt16");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimaltouint32.cs b/tests/src/CoreMangLib/cti/system/decimal/decimaltouint32.cs
new file mode 100644
index 0000000000..5e52c450d3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimaltouint32.cs
@@ -0,0 +1,137 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToUInt32(System.IFormatProvider)
+/// </summary>
+public class DecimalToUInt32
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random Decimal.");
+
+ try
+ {
+ Decimal i1 = new decimal (TestLibrary.Generator.GetSingle(-55));
+ short expectValue = 0;
+ if (i1 > 0.5m)
+ expectValue = 1;
+ else
+ expectValue = 0;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ uint actualValue = ((IConvertible)i1).ToUInt32(myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToUInt32 return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Check a Decimal which is >UInt32.MaxValue.");
+
+ try
+ {
+ Decimal i1 = UInt32.MaxValue + 1.0m;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ uint actualValue = ((IConvertible)i1).ToUInt32(myCulture);
+ TestLibrary.TestFramework.LogError("101.1", "ToUInt32 return failed. ");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Check a Decimal which is <UInt32.MinValue.");
+
+ try
+ {
+ Decimal i1 = UInt32.MinValue - 1.0m;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ uint actualValue = ((IConvertible)i1).ToUInt32(myCulture);
+ TestLibrary.TestFramework.LogError("102.1", "ToUInt32 return failed. ");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalToUInt32 test = new DecimalToUInt32();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalToUInt32");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimaltouint64.cs b/tests/src/CoreMangLib/cti/system/decimal/decimaltouint64.cs
new file mode 100644
index 0000000000..7c8b41152c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimaltouint64.cs
@@ -0,0 +1,137 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToUInt64(System.IFormatProvider)
+/// </summary>
+public class DecimalToUInt64
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random Decimal.");
+
+ try
+ {
+ Decimal i1 = new decimal (TestLibrary.Generator.GetSingle(-55));
+ ulong expectValue = 0;
+ if (i1 > 0.5m)
+ expectValue = 1;
+ else
+ expectValue = 0;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ ulong actualValue = ((IConvertible)i1).ToUInt64(myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToUInt64 return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Check a Decimal which is >UInt64.MaxValue.");
+
+ try
+ {
+ Decimal i1 = UInt64.MaxValue + 1.0m;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ ulong actualValue = ((IConvertible)i1).ToUInt64(myCulture);
+ TestLibrary.TestFramework.LogError("101.1", "ToUInt64 return failed. ");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Check a Decimal which is <UInt64.MinValue.");
+
+ try
+ {
+ Decimal i1 = UInt64.MinValue - 1.0m;
+ CultureInfo myCulture = CultureInfo.InvariantCulture;
+ ulong actualValue = ((IConvertible)i1).ToUInt64(myCulture);
+ TestLibrary.TestFramework.LogError("102.1", "ToUInt64 return failed. ");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalToUInt64 test = new DecimalToUInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalToUInt64");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimaltruncate.cs b/tests/src/CoreMangLib/cti/system/decimal/decimaltruncate.cs
new file mode 100644
index 0000000000..02e46ca5db
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimaltruncate.cs
@@ -0,0 +1,125 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Truncate(System.Decimal)
+/// </summary>
+public class DecimalTruncate
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Calling Truncate method.");
+
+ try
+ {
+ Decimal m1 =new decimal(TestLibrary.Generator.GetSingle(-55));
+ Decimal expectValue = 0m;
+ Decimal actualValue = Decimal.Truncate(m1);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Truncate should return " + expectValue);
+ retVal = false;
+ }
+
+
+ m1 = 123.456789m;
+ expectValue = 123m;
+ actualValue = Decimal.Truncate(m1);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Truncate should return " + expectValue);
+ retVal = false;
+ }
+
+
+
+ m1 = -123.456789m;
+ expectValue = -123m;
+ actualValue = Decimal.Truncate(m1);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Truncate should return " + expectValue);
+ retVal = false;
+ }
+
+ m1 = -9999999999.9999999999m;
+ expectValue = -9999999999m;
+ actualValue = Decimal.Truncate(m1);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.4", "Truncate should return " + expectValue);
+ retVal = false;
+ }
+ m1 = Decimal.MaxValue;
+ expectValue = Decimal.MaxValue;
+ actualValue = Decimal.Truncate(m1);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.5", "Truncate should return " + expectValue);
+ retVal = false;
+ }
+
+ m1 = Decimal.MinValue;
+ expectValue = Decimal.MinValue;
+ actualValue = Decimal.Truncate(m1);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.6", "Truncate should return " + expectValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+
+ #endregion
+
+ public static int Main()
+ {
+ DecimalTruncate test = new DecimalTruncate();
+
+ TestLibrary.TestFramework.BeginTestCase("DecimalTruncate");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region private method
+ public TypeCode GetExpectValue(Decimal myValue)
+ {
+ return TypeCode.Decimal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimaltryparse.cs b/tests/src/CoreMangLib/cti/system/decimal/decimaltryparse.cs
new file mode 100644
index 0000000000..e6203babcf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimaltryparse.cs
@@ -0,0 +1,839 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+// Ported to CoreCLR from Co7531TryParse_all.cs
+// Tests Decimal.TryParse(String), Decimal.TryParse(String, NumberStyles, IFormatProvider, ref Decimal)
+// 2003/04/01 KatyK
+// 2007/07/12 adapted by MarielY
+public class Co7531TryParse
+{
+ static bool verbose = false;
+
+ public static int Main()
+ {
+ bool passed = true;
+
+ try
+ {
+ // Make the test culture independent
+ TestLibrary.Utilities.CurrentCulture = CultureInfo.InvariantCulture;
+
+ // Set up NFIs to use
+ NumberFormatInfo goodNFI = new NumberFormatInfo();
+
+ NumberFormatInfo corruptNFI = new NumberFormatInfo(); // DecimalSeparator == GroupSeparator
+ corruptNFI.NumberDecimalSeparator = ".";
+ corruptNFI.NumberGroupSeparator = ".";
+ corruptNFI.CurrencyDecimalSeparator = ".";
+ corruptNFI.CurrencyGroupSeparator = ".";
+ corruptNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo swappedNFI = new NumberFormatInfo(); // DecimalSeparator & GroupSeparator swapped
+ swappedNFI.NumberDecimalSeparator = ".";
+ swappedNFI.NumberGroupSeparator = ",";
+ swappedNFI.CurrencyDecimalSeparator = ",";
+ swappedNFI.CurrencyGroupSeparator = ".";
+ swappedNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo distinctNFI = new NumberFormatInfo(); // DecimalSeparator & GroupSeparator distinct
+ distinctNFI.NumberDecimalSeparator = ".";
+ distinctNFI.NumberGroupSeparator = ",";
+ distinctNFI.CurrencyDecimalSeparator = ":";
+ distinctNFI.CurrencyGroupSeparator = ";";
+ distinctNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo customNFI = new NumberFormatInfo();
+ customNFI.NegativeSign = "^";
+
+ NumberFormatInfo ambigNFI = new NumberFormatInfo();
+ ambigNFI.NegativeSign = "^";
+ ambigNFI.CurrencySymbol = "^";
+
+ CultureInfo invariantCulture = CultureInfo.InvariantCulture;
+ CultureInfo germanCulture = new CultureInfo("de-DE");
+ CultureInfo japaneseCulture;
+ try {
+ japaneseCulture = new CultureInfo("ja-JP");
+ }
+ catch (CultureNotFoundException)
+ {
+ TestLibrary.TestFramework.LogInformation("East Asian Languages are not installed. Skipping Japanese culture test(s).");
+ japaneseCulture = null;
+ }
+
+ // Parse tests included for comparison/regression
+ passed &= VerifyDecimalParse("5", 5);
+ passed &= VerifyDecimalParse("5 ", 5);
+ passed &= VerifyDecimalParse("5\0", 5);
+ passed &= VerifyDecimalParse("-5", -5);
+ passed &= VerifyDecimalParse("893382737", 893382737);
+ passed &= VerifyDecimalParse("-893382737", -893382737);
+ passed &= VerifyDecimalParse("1234567891", 1234567891);
+ passed &= VerifyDecimalParse("-1234567891", -1234567891);
+ passed &= VerifyDecimalParse("123456789123456789", 123456789123456789);
+ passed &= VerifyDecimalParse("-123456789123456789", -123456789123456789);
+ passed &= VerifyDecimalParse("5", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyDecimalParse("5 \0", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyDecimalParse("5\0\0\0", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyDecimalParse("-5", NumberStyles.Integer, CultureInfo.InvariantCulture, -5);
+ passed &= VerifyDecimalParse("5", NumberStyles.Integer, goodNFI, 5);
+ passed &= VerifyDecimalParse("5.0", NumberStyles.AllowDecimalPoint, goodNFI, 5.0m);
+ passed &= VerifyDecimalParse("5.3", NumberStyles.AllowDecimalPoint, goodNFI, 5.3m);
+ passed &= VerifyDecimalParse("123456789123456789123", 123456789123456789123m);
+ passed &= VerifyDecimalParse("-123456789123456789123", -123456789123456789123m);
+ passed &= VerifyDecimalParse("18446744073709551615", 18446744073709551615);
+ passed &= VerifyDecimalParse("79228162514264337593543950335", 79228162514264337593543950335m);
+ passed &= VerifyDecimalParse("-79228162514264337593543950335", -79228162514264337593543950335m);
+ passed &= VerifyDecimalParse("5.555555555", 5.555555555m);
+ passed &= VerifyDecimalParse("1.000000", 1.000000m);
+ passed &= VerifyDecimalParse("123", NumberStyles.Integer, germanCulture, 123);
+ passed &= VerifyDecimalParse("123", NumberStyles.Integer, japaneseCulture, 123);
+ passed &= VerifyDecimalParse("123.456", NumberStyles.Any, germanCulture, 123456);
+ passed &= VerifyDecimalParse("123,456", NumberStyles.Any, japaneseCulture, 123456);
+ passed &= VerifyDecimalParse("123,456", NumberStyles.AllowDecimalPoint, germanCulture, 123.456m);
+ passed &= VerifyDecimalParse("123.456", NumberStyles.AllowDecimalPoint, japaneseCulture, 123.456m);
+ passed &= VerifyDecimalParse("5,23 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 5.23m); // currency
+ passed &= VerifyDecimalParse("5.23 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 523); // currency
+ //
+ passed &= VerifyDecimalParse("5", NumberStyles.Integer, corruptNFI, 5);
+ passed &= VerifyDecimalParse("5", NumberStyles.Number, corruptNFI, 5);
+ passed &= VerifyDecimalParse("5.3", NumberStyles.Number, corruptNFI, 5.3m);
+ passed &= VerifyDecimalParseException("5,3", NumberStyles.Number, corruptNFI, typeof(FormatException));
+ passed &= VerifyDecimalParseException("5.2.3", NumberStyles.Number, corruptNFI, typeof(FormatException));
+ passed &= VerifyDecimalParse("$5.3", NumberStyles.Currency, corruptNFI, 5.3m);
+ passed &= VerifyDecimalParseException("$5,3", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyDecimalParseException("$5.2.3", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyDecimalParse("5.3", NumberStyles.Currency, corruptNFI, 5.3m);
+ passed &= VerifyDecimalParseException("5,3", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyDecimalParseException("5.2.3", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyDecimalParse("5.3", NumberStyles.Any, corruptNFI, 5.3m);
+ passed &= VerifyDecimalParseException("5,3", NumberStyles.Any, corruptNFI, typeof(FormatException));
+ passed &= VerifyDecimalParseException("5.2.3", NumberStyles.Any, corruptNFI, typeof(FormatException));
+ //
+ passed &= VerifyDecimalParse("5", NumberStyles.Integer, swappedNFI, 5);
+ passed &= VerifyDecimalParseException("1,234", NumberStyles.Integer, swappedNFI, typeof(FormatException));
+ passed &= VerifyDecimalParse("5", NumberStyles.Number, swappedNFI, 5);
+ passed &= VerifyDecimalParse("5.0", NumberStyles.Number, swappedNFI, 5.0m);
+ passed &= VerifyDecimalParse("1,234", NumberStyles.Number, swappedNFI, 1234);
+ passed &= VerifyDecimalParse("1,234.0", NumberStyles.Number, swappedNFI, 1234.0m);
+ passed &= VerifyDecimalParseException("5.000.000", NumberStyles.Number, swappedNFI, typeof(FormatException));
+ passed &= VerifyDecimalParseException("5.000,00", NumberStyles.Number, swappedNFI, typeof(FormatException));
+ passed &= VerifyDecimalParse("5.000", NumberStyles.Currency, swappedNFI, 5); //???
+ passed &= VerifyDecimalParseException("5.000,00", NumberStyles.Currency, swappedNFI, typeof(FormatException)); //???
+ passed &= VerifyDecimalParse("$5.000", NumberStyles.Currency, swappedNFI, 5000);
+ passed &= VerifyDecimalParse("$5.000,00", NumberStyles.Currency, swappedNFI, 5000);
+ passed &= VerifyDecimalParse("5.000", NumberStyles.Any, swappedNFI, 5); //?
+ passed &= VerifyDecimalParseException("5.000,00", NumberStyles.Any, swappedNFI, typeof(FormatException)); //?
+ passed &= VerifyDecimalParse("$5.000", NumberStyles.Any, swappedNFI, 5000);
+ passed &= VerifyDecimalParse("$5.000,00", NumberStyles.Any, swappedNFI, 5000);
+ passed &= VerifyDecimalParse("5,0", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyDecimalParse("$5,0", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyDecimalParse("5,000", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyDecimalParse("$5,000", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyDecimalParseException("5,000.0", NumberStyles.Currency, swappedNFI, typeof(FormatException));
+ passed &= VerifyDecimalParseException("$5,000.0", NumberStyles.Currency, swappedNFI, typeof(FormatException));
+ passed &= VerifyDecimalParse("5,000", NumberStyles.Any, swappedNFI, 5);
+ passed &= VerifyDecimalParse("$5,000", NumberStyles.Any, swappedNFI, 5);
+ passed &= VerifyDecimalParseException("5,000.0", NumberStyles.Any, swappedNFI, typeof(FormatException));
+ passed &= VerifyDecimalParseException("$5,000.0", NumberStyles.Any, swappedNFI, typeof(FormatException));
+ //
+ passed &= VerifyDecimalParse("5.0", NumberStyles.Number, distinctNFI, 5);
+ passed &= VerifyDecimalParse("1,234.0", NumberStyles.Number, distinctNFI, 1234);
+ passed &= VerifyDecimalParse("5.0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyDecimalParse("1,234.0", NumberStyles.Currency, distinctNFI, 1234);
+ passed &= VerifyDecimalParse("5.0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyDecimalParse("1,234.0", NumberStyles.Any, distinctNFI, 1234);
+ passed &= VerifyDecimalParseException("$5.0", NumberStyles.Currency, distinctNFI, typeof(FormatException));
+ passed &= VerifyDecimalParseException("$5.0", NumberStyles.Any, distinctNFI, typeof(FormatException));
+ passed &= VerifyDecimalParseException("5:0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyDecimalParseException("5;0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyDecimalParseException("$5:0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyDecimalParse("5:0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyDecimalParse("5:000", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyDecimalParse("5;000", NumberStyles.Currency, distinctNFI, 5000);
+ passed &= VerifyDecimalParse("$5:0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyDecimalParse("$5;0", NumberStyles.Currency, distinctNFI, 50);
+ passed &= VerifyDecimalParse("5:0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyDecimalParse("5;0", NumberStyles.Any, distinctNFI, 50);
+ passed &= VerifyDecimalParse("$5:0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyDecimalParse("$5;0", NumberStyles.Any, distinctNFI, 50);
+ passed &= VerifyDecimalParseException("123,456;789.0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyDecimalParse("123,456;789.0", NumberStyles.Currency, distinctNFI, 123456789);
+ passed &= VerifyDecimalParse("123,456;789.0", NumberStyles.Any, distinctNFI, 123456789);
+ passed &= VerifyDecimalParseException("$123,456;789.0", NumberStyles.Any, distinctNFI, typeof(FormatException));
+ //
+ passed &= VerifyDecimalParseException("79228162514264337593543950336", typeof(OverflowException));
+ passed &= VerifyDecimalParseException("-79228162514264337593543950336", typeof(OverflowException));
+ passed &= VerifyDecimalParseException("Garbage", typeof(FormatException));
+ passed &= VerifyDecimalParseException("5\0Garbage", typeof(FormatException));
+ passed &= VerifyDecimalParseException(null, typeof(ArgumentNullException));
+ passed &= VerifyDecimalParseException("FF", NumberStyles.HexNumber, goodNFI, typeof(ArgumentException));
+ passed &= VerifyDecimalParseException("4", (NumberStyles)(-1), typeof(ArgumentException));
+ passed &= VerifyDecimalParseException("4", (NumberStyles)0x10000, typeof(ArgumentException));
+ passed &= VerifyDecimalParseException("4", (NumberStyles)(-1), CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyDecimalParseException("4", (NumberStyles)0x10000, CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyDecimalParseException("123,000,000,000,000,000,000", NumberStyles.Any, germanCulture, typeof(FormatException));
+ passed &= VerifyDecimalParseException("123.000.000.000.000.000.000", NumberStyles.Any, japaneseCulture, typeof(FormatException));
+ passed &= VerifyDecimalParseException("5,00 \u20AC", NumberStyles.Integer, germanCulture, typeof(FormatException)); // currency
+
+ // Underflow cases - see VSWhidbey #576556
+ Decimal zeroScale28 = new Decimal(0, 0, 0, false, 28);
+ Decimal zeroScale27 = new Decimal(0, 0, 0, false, 27);
+ passed &= VerifyExactDecimalParse("0E-27", NumberStyles.AllowExponent, zeroScale27);
+ passed &= VerifyExactDecimalParse("0E-28", NumberStyles.AllowExponent, zeroScale28);
+ passed &= VerifyExactDecimalParse("0E-29", NumberStyles.AllowExponent, zeroScale28);
+ passed &= VerifyExactDecimalParse("0E-30", NumberStyles.AllowExponent, zeroScale28);
+ passed &= VerifyExactDecimalParse("0E-31", NumberStyles.AllowExponent, zeroScale28);
+ passed &= VerifyExactDecimalParse("0E-50", NumberStyles.AllowExponent, zeroScale28);
+ passed &= VerifyExactDecimalParse("0E-100", NumberStyles.AllowExponent, zeroScale28);
+ passed &= VerifyExactDecimalParse("0.000000000000000000000000000", zeroScale27);
+ passed &= VerifyExactDecimalParse("0.0000000000000000000000000000", zeroScale28); //28
+ passed &= VerifyExactDecimalParse("0.00000000000000000000000000000", zeroScale28); //29
+ passed &= VerifyExactDecimalParse("0.000000000000000000000000000000", zeroScale28); //30
+ passed &= VerifyExactDecimalParse("0.0000000000000000000000000000000", zeroScale28); //31
+ passed &= VerifyExactDecimalParse("0.0", new Decimal(0, 0, 0, false, 1));
+ passed &= VerifyExactDecimalParse("0E-15", NumberStyles.AllowExponent, new Decimal(0, 0, 0, false, 15));
+ passed &= VerifyExactDecimalParse("0", Decimal.Zero);
+
+ Decimal oneScale27 = new Decimal(1, 0, 0, false, 27);
+ Decimal oneScale28 = new Decimal(1, 0, 0, false, 28);
+
+ passed &= VerifyExactDecimalParse("1E-27", NumberStyles.AllowExponent, oneScale27);
+ passed &= VerifyExactDecimalParse("1E-28", NumberStyles.AllowExponent, oneScale28);
+ passed &= VerifyExactDecimalParse("1E-29", NumberStyles.AllowExponent, zeroScale28);
+ passed &= VerifyExactDecimalParse("1E-30", NumberStyles.AllowExponent, zeroScale28);
+ passed &= VerifyExactDecimalParse("1E-31", NumberStyles.AllowExponent, zeroScale28);
+ passed &= VerifyExactDecimalParse("1E-50", NumberStyles.AllowExponent, zeroScale28);
+ passed &= VerifyExactDecimalParse("1E-100", NumberStyles.AllowExponent, zeroScale28);
+
+ passed &= VerifyExactDecimalParse("1E-27", NumberStyles.AllowExponent, invariantCulture, oneScale27);
+ passed &= VerifyExactDecimalParse("1E-28", NumberStyles.AllowExponent, invariantCulture, oneScale28);
+ passed &= VerifyExactDecimalParse("1E-29", NumberStyles.AllowExponent, invariantCulture, zeroScale28);
+ passed &= VerifyExactDecimalParse("1E-30", NumberStyles.AllowExponent, invariantCulture, zeroScale28);
+ passed &= VerifyExactDecimalParse("1E-31", NumberStyles.AllowExponent, invariantCulture, zeroScale28);
+ passed &= VerifyExactDecimalParse("1E-50", NumberStyles.AllowExponent, invariantCulture, zeroScale28);
+ passed &= VerifyExactDecimalParse("1E-100", NumberStyles.AllowExponent, invariantCulture, zeroScale28);
+ passed &= VerifyExactDecimalParse("0E-27", NumberStyles.AllowExponent, invariantCulture, zeroScale27);
+ passed &= VerifyExactDecimalParse("0E-28", NumberStyles.AllowExponent, invariantCulture, zeroScale28);
+ passed &= VerifyExactDecimalParse("0E-29", NumberStyles.AllowExponent, invariantCulture, zeroScale28);
+ passed &= VerifyExactDecimalParse("0E-30", NumberStyles.AllowExponent, invariantCulture, zeroScale28);
+ passed &= VerifyExactDecimalParse("0E-31", NumberStyles.AllowExponent, invariantCulture, zeroScale28);
+ passed &= VerifyExactDecimalParse("0E-50", NumberStyles.AllowExponent, invariantCulture, zeroScale28);
+ passed &= VerifyExactDecimalParse("0E-100", NumberStyles.AllowExponent, invariantCulture, zeroScale28);
+
+ // make sure parse lines up with compiler
+ //passed &= VerifyExactDecimalParse("0E-50", NumberStyles.AllowExponent, 0E-50m); // V2->V4 compiler change
+ passed &= VerifyExactDecimalParse("1E-50", NumberStyles.AllowExponent, 1E-50m);
+ passed &= VerifyExactDecimalParse("2E-100", NumberStyles.AllowExponent, 2E-100m);
+ passed &= VerifyExactDecimalParse("100E-29", NumberStyles.AllowExponent, 100E-29m);
+ passed &= VerifyExactDecimalParse("200E-29", NumberStyles.AllowExponent, 200E-29m);
+ passed &= VerifyExactDecimalParse("500E-29", NumberStyles.AllowExponent, 500E-29m);
+ passed &= VerifyExactDecimalParse("900E-29", NumberStyles.AllowExponent, 900E-29m);
+ passed &= VerifyExactDecimalParse("1900E-29", NumberStyles.AllowExponent, 1900E-29m);
+ passed &= VerifyExactDecimalParse("10900E-29", NumberStyles.AllowExponent, 10900E-29m);
+ passed &= VerifyExactDecimalParse("10900E-30", NumberStyles.AllowExponent, 10900E-30m);
+ passed &= VerifyExactDecimalParse("10900E-31", NumberStyles.AllowExponent, 10900E-31m);
+ passed &= VerifyExactDecimalParse("10900E-32", NumberStyles.AllowExponent, 10900E-32m);
+ passed &= VerifyExactDecimalParse("10900E-33", NumberStyles.AllowExponent, 10900E-33m);
+ passed &= VerifyExactDecimalParse("10900E-34", NumberStyles.AllowExponent, 10900E-34m);
+ passed &= VerifyExactDecimalParse("10900E-340", NumberStyles.AllowExponent, 10900E-340m);
+ passed &= VerifyExactDecimalParse("10900E-512", NumberStyles.AllowExponent, 10900E-512m);
+ passed &= VerifyExactDecimalParse("10900E-678", NumberStyles.AllowExponent, 10900E-678m);
+ passed &= VerifyExactDecimalParse("10900E-999", NumberStyles.AllowExponent, 10900E-999m);
+
+
+ /////////// TryParse(String)
+ //// Pass cases
+ passed &= VerifyDecimalTryParse("5", 5, true);
+ passed &= VerifyDecimalTryParse(" 5 ", 5, true);
+ passed &= VerifyDecimalTryParse("-5", -5, true);
+ passed &= VerifyDecimalTryParse("5\0", 5, true);
+ passed &= VerifyDecimalTryParse("5 \0", 5, true);
+ passed &= VerifyDecimalTryParse("5\0\0\0", 5, true);
+ passed &= VerifyDecimalTryParse("893382737", 893382737, true);
+ passed &= VerifyDecimalTryParse("-893382737", -893382737, true);
+ passed &= VerifyDecimalTryParse("1234567891", 1234567891, true);
+ passed &= VerifyDecimalTryParse("-1234567891", -1234567891, true);
+ passed &= VerifyDecimalTryParse("123456789123456789", 123456789123456789, true);
+ passed &= VerifyDecimalTryParse("-123456789123456789", -123456789123456789, true);
+ passed &= VerifyDecimalTryParse("123456789123456789123", 123456789123456789123m, true);
+ passed &= VerifyDecimalTryParse("-123456789123456789123", -123456789123456789123m, true);
+ passed &= VerifyDecimalTryParse("18446744073709551615", 18446744073709551615, true);
+ passed &= VerifyDecimalTryParse("79228162514264337593543950335", 79228162514264337593543950335m, true);
+ passed &= VerifyDecimalTryParse("-79228162514264337593543950335", -79228162514264337593543950335m, true);
+ passed &= VerifyDecimalTryParse("7.3", 7.3m, true);
+ passed &= VerifyDecimalTryParse(".297", 0.297m, true);
+ passed &= VerifyDecimalTryParse("5.555555555", 5.555555555m, true);
+ passed &= VerifyDecimalTryParse("1.000000", 1.000000m, true);
+
+ //// Fail cases
+ passed &= VerifyDecimalTryParse(null, 0, false);
+ passed &= VerifyDecimalTryParse("", 0, false);
+ passed &= VerifyDecimalTryParse("Garbage", 0, false);
+ passed &= VerifyDecimalTryParse("5\0Garbage", 0, false);
+ passed &= VerifyDecimalTryParse("FF", 0, false);
+ passed &= VerifyDecimalTryParse("23 5", 0, false);
+ passed &= VerifyDecimalTryParse("NaN", 0, false);
+ passed &= VerifyDecimalTryParse("Infinity", 0, false);
+ passed &= VerifyDecimalTryParse("-Infinity", 0, false);
+ passed &= VerifyDecimalTryParse("79228162514264337593543950336", 0, false);
+ passed &= VerifyDecimalTryParse("-79228162514264337593543950336", 0, false);
+ passed &= VerifyDecimalTryParse("1.234+E05", 0, false);
+ passed &= VerifyDecimalTryParse("1.234E+05", 0, false);
+
+
+ /////////// TryParse(TryParse(String, NumberStyles, IFormatProvider, ref Decimal)
+ //// Pass cases
+ passed &= VerifyDecimalTryParse("5", NumberStyles.Integer, CultureInfo.InvariantCulture, 5, true);
+ passed &= VerifyDecimalTryParse("-5", NumberStyles.Integer, CultureInfo.InvariantCulture, -5, true);
+ // Variations on NumberStyles
+ passed &= VerifyDecimalTryParse(" 5", NumberStyles.AllowLeadingWhite, goodNFI, 5, true);
+ passed &= VerifyDecimalTryParse("5", NumberStyles.Number, goodNFI, 5, true);
+ passed &= VerifyDecimalTryParse("5.0", NumberStyles.AllowDecimalPoint, goodNFI, 5.0m, true);
+ passed &= VerifyDecimalTryParse("5.3", NumberStyles.AllowDecimalPoint, goodNFI, 5.3m, true);
+ // Variations on IFP
+ passed &= VerifyDecimalTryParse("5", NumberStyles.Integer, goodNFI, 5, true);
+ passed &= VerifyDecimalTryParse("5", NumberStyles.Integer, null, 5, true);
+ passed &= VerifyDecimalTryParse("5", NumberStyles.Integer, new DateTimeFormatInfo(), 5, true);
+ passed &= VerifyDecimalTryParse("^42", NumberStyles.Any, customNFI, -42, true);
+ passed &= VerifyDecimalTryParse("123", NumberStyles.Integer, germanCulture, 123, true);
+ passed &= VerifyDecimalTryParse("123", NumberStyles.Integer, japaneseCulture, 123, true);
+ passed &= VerifyDecimalTryParse("123.456", NumberStyles.Any, germanCulture, 123456, true);
+ passed &= VerifyDecimalTryParse("123,456", NumberStyles.Any, japaneseCulture, 123456, true);
+ passed &= VerifyDecimalTryParse("123,456", NumberStyles.AllowDecimalPoint, germanCulture, 123.456m, true);
+ passed &= VerifyDecimalTryParse("123.456", NumberStyles.AllowDecimalPoint, japaneseCulture, 123.456m, true);
+ passed &= VerifyDecimalTryParse("5,23 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 5.23m, true); // currency
+ passed &= VerifyDecimalTryParse("5.23 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 523, true); // currency
+ //
+ //// Fail cases
+ passed &= VerifyDecimalTryParse("-79228162514264337593543950336", NumberStyles.Integer, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifyDecimalTryParse("-42", NumberStyles.Any, customNFI, 0, false);
+ passed &= VerifyDecimalTryParse("5 ", NumberStyles.AllowLeadingWhite, goodNFI, 0, false);
+ passed &= VerifyDecimalTryParse("1.234+E05", NumberStyles.AllowExponent, goodNFI, 0, false);
+ passed &= VerifyDecimalTryParse("5.3", NumberStyles.None, goodNFI, 0, false);
+
+ //// Exception cases
+ passed &= VerifyDecimalTryParseException("12", NumberStyles.HexNumber, CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyDecimalTryParseException("5", NumberStyles.AllowHexSpecifier | NumberStyles.AllowParentheses, null, typeof(ArgumentException));
+ passed &= VerifyDecimalTryParseException("4", (NumberStyles)(-1), CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyDecimalTryParseException("4", (NumberStyles)0x10000, CultureInfo.InvariantCulture, typeof(ArgumentException));
+
+ // NumberStyles/NFI variations
+ //
+ passed &= VerifyDecimalTryParse("5", NumberStyles.Integer, corruptNFI, 5, true);
+ passed &= VerifyDecimalTryParse("5", NumberStyles.Number, corruptNFI, 5, true);
+ passed &= VerifyDecimalTryParse("5.3", NumberStyles.Number, corruptNFI, 5.3m, true);
+ passed &= VerifyDecimalTryParse("5,3", NumberStyles.Number, corruptNFI, 0, false);
+ passed &= VerifyDecimalTryParse("5.2.3", NumberStyles.Number, corruptNFI, 0, false);
+ passed &= VerifyDecimalTryParse("$5.3", NumberStyles.Currency, corruptNFI, 5.3m, true);
+ passed &= VerifyDecimalTryParse("$5,3", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyDecimalTryParse("$5.2.3", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyDecimalTryParse("5.3", NumberStyles.Currency, corruptNFI, 5.3m, true);
+ passed &= VerifyDecimalTryParse("5,3", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyDecimalTryParse("5.2.3", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyDecimalTryParse("5.3", NumberStyles.Any, corruptNFI, 5.3m, true);
+ passed &= VerifyDecimalTryParse("5,3", NumberStyles.Any, corruptNFI, 0, false);
+ passed &= VerifyDecimalTryParse("5.2.3", NumberStyles.Any, corruptNFI, 0, false);
+ //
+ passed &= VerifyDecimalTryParse("5", NumberStyles.Integer, swappedNFI, 5, true);
+ passed &= VerifyDecimalTryParse("1,234", NumberStyles.Integer, swappedNFI, 0, false);
+ passed &= VerifyDecimalTryParse("5", NumberStyles.Number, swappedNFI, 5, true);
+ passed &= VerifyDecimalTryParse("5.0", NumberStyles.Number, swappedNFI, 5, true);
+ passed &= VerifyDecimalTryParse("1,234", NumberStyles.Number, swappedNFI, 1234, true);
+ passed &= VerifyDecimalTryParse("1,234.0", NumberStyles.Number, swappedNFI, 1234, true);
+ passed &= VerifyDecimalTryParse("5.000.000", NumberStyles.Number, swappedNFI, 0, false);
+ passed &= VerifyDecimalTryParse("5.000,00", NumberStyles.Number, swappedNFI, 0, false);
+ passed &= VerifyDecimalTryParse("5.000", NumberStyles.Currency, swappedNFI, 5, true); //???
+ passed &= VerifyDecimalTryParse("5.000,00", NumberStyles.Currency, swappedNFI, 0, false); //???
+ passed &= VerifyDecimalTryParse("$5.000", NumberStyles.Currency, swappedNFI, 5000, true);
+ passed &= VerifyDecimalTryParse("$5.000,00", NumberStyles.Currency, swappedNFI, 5000, true);
+ passed &= VerifyDecimalTryParse("5.000", NumberStyles.Any, swappedNFI, 5, true); //?
+ passed &= VerifyDecimalTryParse("5.000,00", NumberStyles.Any, swappedNFI, 0, false); //?
+ passed &= VerifyDecimalTryParse("$5.000", NumberStyles.Any, swappedNFI, 5000, true);
+ passed &= VerifyDecimalTryParse("$5.000,00", NumberStyles.Any, swappedNFI, 5000, true);
+ passed &= VerifyDecimalTryParse("5,0", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyDecimalTryParse("$5,0", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyDecimalTryParse("5,000", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyDecimalTryParse("$5,000", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyDecimalTryParse("5,000.0", NumberStyles.Currency, swappedNFI, 0, false);
+ passed &= VerifyDecimalTryParse("$5,000.0", NumberStyles.Currency, swappedNFI, 0, false);
+ passed &= VerifyDecimalTryParse("5,000", NumberStyles.Any, swappedNFI, 5, true);
+ passed &= VerifyDecimalTryParse("$5,000", NumberStyles.Any, swappedNFI, 5, true);
+ passed &= VerifyDecimalTryParse("5,000.0", NumberStyles.Any, swappedNFI, 0, false);
+ passed &= VerifyDecimalTryParse("$5,000.0", NumberStyles.Any, swappedNFI, 0, false);
+ //
+ passed &= VerifyDecimalTryParse("5.0", NumberStyles.Number, distinctNFI, 5, true);
+ passed &= VerifyDecimalTryParse("1,234.0", NumberStyles.Number, distinctNFI, 1234, true);
+ passed &= VerifyDecimalTryParse("5.0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyDecimalTryParse("1,234.0", NumberStyles.Currency, distinctNFI, 1234, true);
+ passed &= VerifyDecimalTryParse("5.0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyDecimalTryParse("1,234.0", NumberStyles.Any, distinctNFI, 1234, true);
+ passed &= VerifyDecimalTryParse("$5.0", NumberStyles.Currency, distinctNFI, 0, false);
+ passed &= VerifyDecimalTryParse("$5.0", NumberStyles.Any, distinctNFI, 0, false);
+ passed &= VerifyDecimalTryParse("5:0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyDecimalTryParse("5;0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyDecimalTryParse("$5:0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyDecimalTryParse("5:0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyDecimalTryParse("5:000", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyDecimalTryParse("5;000", NumberStyles.Currency, distinctNFI, 5000, true);
+ passed &= VerifyDecimalTryParse("$5:0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyDecimalTryParse("$5;0", NumberStyles.Currency, distinctNFI, 50, true);
+ passed &= VerifyDecimalTryParse("5:0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyDecimalTryParse("5;0", NumberStyles.Any, distinctNFI, 50, true);
+ passed &= VerifyDecimalTryParse("$5:0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyDecimalTryParse("$5;0", NumberStyles.Any, distinctNFI, 50, true);
+ passed &= VerifyDecimalTryParse("123,456;789.0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyDecimalTryParse("123,456;789.0", NumberStyles.Currency, distinctNFI, 123456789, true);
+ passed &= VerifyDecimalTryParse("123,456;789.0", NumberStyles.Any, distinctNFI, 123456789, true);
+ passed &= VerifyDecimalTryParse("$123,456;789.0", NumberStyles.Any, distinctNFI, 0, false);
+
+
+ // Underflow cases - see VSWhidbey #576556
+ passed &= VerifyExactDecimalTryParse("0E-27", NumberStyles.AllowExponent, invariantCulture, zeroScale27, true);
+ passed &= VerifyExactDecimalTryParse("0E-28", NumberStyles.AllowExponent, invariantCulture, zeroScale28, true);
+ passed &= VerifyExactDecimalTryParse("0E-29", NumberStyles.AllowExponent, invariantCulture, zeroScale28, true);
+ passed &= VerifyExactDecimalTryParse("0E-30", NumberStyles.AllowExponent, invariantCulture, zeroScale28, true);
+ passed &= VerifyExactDecimalTryParse("0E-31", NumberStyles.AllowExponent, invariantCulture, zeroScale28, true);
+ passed &= VerifyExactDecimalTryParse("0E-50", NumberStyles.AllowExponent, invariantCulture, zeroScale28, true);
+ passed &= VerifyExactDecimalTryParse("0E-100", NumberStyles.AllowExponent, invariantCulture, zeroScale28, true);
+ passed &= VerifyExactDecimalTryParse("0.000000000000000000000000000", zeroScale27, true);
+ passed &= VerifyExactDecimalTryParse("0.0000000000000000000000000000", zeroScale28, true); //28
+ passed &= VerifyExactDecimalTryParse("0.00000000000000000000000000000", zeroScale28, true); //29
+ passed &= VerifyExactDecimalTryParse("0.000000000000000000000000000000", zeroScale28, true); //30
+ passed &= VerifyExactDecimalTryParse("0.0000000000000000000000000000000", zeroScale28, true); //31
+ passed &= VerifyExactDecimalTryParse("0.0", new Decimal(0, 0, 0, false, 1), true);
+ passed &= VerifyExactDecimalTryParse("0E-15", NumberStyles.AllowExponent, invariantCulture, new Decimal(0, 0, 0, false, 15), true);
+ passed &= VerifyExactDecimalTryParse("0", Decimal.Zero, true);
+
+ passed &= VerifyExactDecimalTryParse("1E-27", NumberStyles.AllowExponent, invariantCulture, oneScale27, true);
+ passed &= VerifyExactDecimalTryParse("1E-28", NumberStyles.AllowExponent, invariantCulture, oneScale28, true);
+ passed &= VerifyExactDecimalTryParse("1E-29", NumberStyles.AllowExponent, invariantCulture, zeroScale28, true);
+ passed &= VerifyExactDecimalTryParse("1E-30", NumberStyles.AllowExponent, invariantCulture, zeroScale28, true);
+ passed &= VerifyExactDecimalTryParse("1E-31", NumberStyles.AllowExponent, invariantCulture, zeroScale28, true);
+ passed &= VerifyExactDecimalTryParse("1E-50", NumberStyles.AllowExponent, invariantCulture, zeroScale28, true);
+ passed &= VerifyExactDecimalTryParse("1E-100", NumberStyles.AllowExponent, invariantCulture, zeroScale28, true);
+
+ // make sure parse lines up with compiler
+ //passed &= VerifyExactDecimalTryParse("0E-50", NumberStyles.AllowExponent, invariantCulture, 0E-50m, true); // V2->V4 compiler change
+ passed &= VerifyExactDecimalTryParse("1E-50", NumberStyles.AllowExponent, invariantCulture, 1E-50m, true);
+ passed &= VerifyExactDecimalTryParse("2E-100", NumberStyles.AllowExponent, invariantCulture, 2E-100m, true);
+ passed &= VerifyExactDecimalTryParse("100E-29", NumberStyles.AllowExponent, invariantCulture, 100E-29m, true);
+ passed &= VerifyExactDecimalTryParse("200E-29", NumberStyles.AllowExponent, invariantCulture, 200E-29m, true);
+ passed &= VerifyExactDecimalTryParse("500E-29", NumberStyles.AllowExponent, invariantCulture, 500E-29m, true);
+ passed &= VerifyExactDecimalTryParse("900E-29", NumberStyles.AllowExponent, invariantCulture, 900E-29m, true);
+ passed &= VerifyExactDecimalTryParse("1900E-29", NumberStyles.AllowExponent, invariantCulture, 1900E-29m, true);
+ passed &= VerifyExactDecimalTryParse("10900E-29", NumberStyles.AllowExponent, invariantCulture, 10900E-29m, true);
+ passed &= VerifyExactDecimalTryParse("10900E-30", NumberStyles.AllowExponent, invariantCulture, 10900E-30m, true);
+ passed &= VerifyExactDecimalTryParse("10900E-31", NumberStyles.AllowExponent, invariantCulture, 10900E-31m, true);
+ passed &= VerifyExactDecimalTryParse("10900E-32", NumberStyles.AllowExponent, invariantCulture, 10900E-32m, true);
+ passed &= VerifyExactDecimalTryParse("10900E-33", NumberStyles.AllowExponent, invariantCulture, 10900E-33m, true);
+ passed &= VerifyExactDecimalTryParse("10900E-34", NumberStyles.AllowExponent, invariantCulture, 10900E-34m, true);
+ passed &= VerifyExactDecimalTryParse("10900E-340", NumberStyles.AllowExponent, invariantCulture, 10900E-340m, true);
+ passed &= VerifyExactDecimalTryParse("10900E-512", NumberStyles.AllowExponent, invariantCulture, 10900E-512m, true);
+ passed &= VerifyExactDecimalTryParse("10900E-678", NumberStyles.AllowExponent, invariantCulture, 10900E-678m, true);
+ passed &= VerifyExactDecimalTryParse("10900E-999", NumberStyles.AllowExponent, invariantCulture, 10900E-999m, true);
+
+
+ // Should these pass or fail? Current parse behavior is to pass, so they might be
+ // parse bugs, but they're not tryparse bugs.
+ passed &= VerifyDecimalParse("5", NumberStyles.AllowExponent, goodNFI, 5);
+ passed &= VerifyDecimalTryParse("5", NumberStyles.AllowExponent, goodNFI, 5, true);
+ // I expect ArgumentException with an ambiguous NFI
+ passed &= VerifyDecimalParse("^42", NumberStyles.Any, ambigNFI, -42);
+ passed &= VerifyDecimalTryParse("^42", NumberStyles.Any, ambigNFI, -42, true);
+
+ /// END TEST CASES
+ }
+ catch (Exception e)
+ {
+ TestLibrary.Logging.WriteLine("Unexpected exception!! " + e.ToString());
+ passed = false;
+ }
+
+ if (passed)
+ {
+ TestLibrary.Logging.WriteLine("paSs");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.Logging.WriteLine("FAiL");
+ return 1;
+ }
+ }
+
+ public static bool VerifyDecimalTryParse(string value, Decimal expectedResult, bool expectedReturn)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Decimal.TryParse, Value = '{0}', Expected Result = {1}, Expected Return = {2}",
+ value, expectedResult, expectedReturn);
+ }
+ Decimal result = 0;
+ try
+ {
+ bool returnValue = Decimal.TryParse(value, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedReturn, returnValue);
+ return false;
+ }
+ if (result != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, result);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyDecimalTryParse(string value, NumberStyles style, IFormatProvider provider, Decimal expectedResult, bool expectedReturn)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Decimal.TryParse, Value = '{0}', Style = {1}, Provider = {2}, Expected Result = {3}, Expected Return = {4}",
+ value, style, provider, expectedResult, expectedReturn);
+ }
+ Decimal result = 0;
+ try
+ {
+ bool returnValue = Decimal.TryParse(value, style, provider, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Style = {1}, Provider = {2}, Expected Return = {3}, Actual Return = {4}",
+ value, style, provider, expectedReturn, returnValue);
+ return false;
+ }
+ if (result != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, result);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyDecimalTryParseException(string value, NumberStyles style, IFormatProvider provider, Type exceptionType)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Decimal.TryParse, Value = '{0}', Style = {1}, Provider = {2}, Expected Exception = {3}",
+ value, style, provider, exceptionType);
+ }
+ try
+ {
+ Decimal result = 0;
+ Boolean returnValue = Decimal.TryParse(value, style, provider, out result);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyDecimalParse(string value, Decimal expectedResult)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Decimal.Parse, Value = '{0}', Expected Result, {1}",
+ value, expectedResult);
+ }
+ try
+ {
+ Decimal returnValue = Decimal.Parse(value);
+ if (returnValue != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, returnValue);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyDecimalParse(string value, NumberStyles style, IFormatProvider provider, Decimal expectedResult)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Decimal.Parse, Value = '{0}', Style = {1}, provider = {2}, Expected Result = {3}",
+ value, style, provider, expectedResult);
+ }
+ try
+ {
+ Decimal returnValue = Decimal.Parse(value, style, provider);
+ if (returnValue != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, returnValue);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static String HexValue(Decimal value)
+ {
+ Int32[] bits = Decimal.GetBits(value);
+ return String.Format("{{0x{0:X8} {1:X8} {2:X8} {3:X8} }}", bits[0], bits[1], bits[2], bits[3]);
+ }
+
+ // Verify that decimals have the same bits, not just the same values.
+ public static Boolean CompareExact(Decimal x, Decimal y)
+ {
+ Int32[] arrayX = Decimal.GetBits(x);
+ Int32[] arrayY = Decimal.GetBits(y);
+ for (int i = 0; i < 4; i++)
+ {
+ if (arrayX[i] != arrayY[i])
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public static bool VerifyExactDecimalParse(string value, Decimal expectedResult)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Decimal.Parse, Value = '{0}', Expected Result = {1}",
+ value, expectedResult);
+ }
+ try
+ {
+ Decimal returnValue = Decimal.Parse(value);
+ if (!CompareExact(returnValue, expectedResult))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, HexValue(expectedResult), HexValue(returnValue));
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyExactDecimalParse(string value, NumberStyles style, Decimal expectedResult)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Decimal.Parse, Value = '{0}', Style = {1}, Expected Result = {2}",
+ value, style, expectedResult);
+ }
+ try
+ {
+ Decimal returnValue = Decimal.Parse(value, style);
+ if (!CompareExact(returnValue, expectedResult))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, HexValue(expectedResult), HexValue(returnValue));
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyExactDecimalParse(string value, NumberStyles style, IFormatProvider provider, Decimal expectedResult)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Decimal.Parse, Value = '{0}', Style = {1}, provider = {2}, Expected Result = {3}",
+ value, style, provider, expectedResult);
+ }
+ try
+ {
+ Decimal returnValue = Decimal.Parse(value, style, provider);
+ if (!CompareExact(returnValue, expectedResult))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, HexValue(expectedResult), HexValue(returnValue));
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyExactDecimalTryParse(string value, Decimal expectedResult, bool expectedReturn)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Decimal.TryParse, Value = '{0}', Expected Result = {1}, Expected Return = {2}",
+ value, expectedResult, expectedReturn);
+ }
+ Decimal result = 0;
+ try
+ {
+ bool returnValue = Decimal.TryParse(value, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedReturn, returnValue);
+ return false;
+ }
+ if (!CompareExact(result, expectedResult))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, HexValue(expectedResult), HexValue(result));
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyExactDecimalTryParse(string value, NumberStyles style, IFormatProvider provider, Decimal expectedResult, bool expectedReturn)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Decimal.TryParse, Value = '{0}', Style = {1}, Provider = {2}, Expected Result = {3}, Expected Return = {4}",
+ value, style, provider, expectedResult, expectedReturn);
+ }
+ Decimal result = 0;
+ try
+ {
+ bool returnValue = Decimal.TryParse(value, style, provider, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Style = {1}, Provider = {2}, Expected Return = {3}, Actual Return = {4}",
+ value, style, provider, expectedReturn, returnValue);
+ return false;
+ }
+ if (!CompareExact(result, expectedResult))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, HexValue(expectedResult), HexValue(result));
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyDecimalParseException(string value, Type exceptionType)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Decimal.Parse, Value = '{0}', Expected Exception, {1}",
+ value, exceptionType);
+ }
+ try
+ {
+ Decimal returnValue = Decimal.Parse(value);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyDecimalParseException(string value, NumberStyles style, Type exceptionType)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Decimal.Parse, Value = '{0}', Style = {1}, Expected Exception = {3}",
+ value, style, exceptionType);
+ }
+ try
+ {
+ Decimal returnValue = Decimal.Parse(value, style);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyDecimalParseException(string value, NumberStyles style, IFormatProvider provider, Type exceptionType)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Decimal.Parse, Value = '{0}', Style = {1}, Provider = {2}, Expected Exception = {3}",
+ value, style, provider, exceptionType);
+ }
+ try
+ {
+ Decimal returnValue = Decimal.Parse(value, style, provider);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/decimal/decimalzero.cs b/tests/src/CoreMangLib/cti/system/decimal/decimalzero.cs
new file mode 100644
index 0000000000..ceaf97463a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/decimal/decimalzero.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Decimal.Zero
+/// </summary>
+public class DecimalZero
+{
+
+ public static int Main()
+ {
+ DecimalZero dZero = new DecimalZero();
+ TestLibrary.TestFramework.BeginTestCase("for Field:System.Decimal.Zero");
+
+ if (dZero.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1:Verify the Decimal Zero is equal to 0";
+ const string c_TEST_ID = "P001";
+
+ Decimal dZero = Convert.ToDecimal(0);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (Decimal.Zero != dZero)
+ {
+ string errorDesc = "Value is not " + dZero.ToString() + " as expected: Actual(" + Decimal.Zero.ToString() + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/delegate/DelegateABI.csproj b/tests/src/CoreMangLib/cti/system/delegate/DelegateABI.csproj
new file mode 100644
index 0000000000..cb2a4548a6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/delegate/DelegateABI.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="delegateabi.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/CoreMangLib/cti/system/delegate/DelegateCombine1.csproj b/tests/src/CoreMangLib/cti/system/delegate/DelegateCombine1.csproj
new file mode 100644
index 0000000000..012b34bbf4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/delegate/DelegateCombine1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="delegatecombine1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/delegate/DelegateCombineImpl.csproj b/tests/src/CoreMangLib/cti/system/delegate/DelegateCombineImpl.csproj
new file mode 100644
index 0000000000..1d7c1e17a0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/delegate/DelegateCombineImpl.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="delegatecombineimpl.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/delegate/DelegateEquals1.csproj b/tests/src/CoreMangLib/cti/system/delegate/DelegateEquals1.csproj
new file mode 100644
index 0000000000..4318a60137
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/delegate/DelegateEquals1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="delegateequals1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/delegate/DelegateGetHashCode1.csproj b/tests/src/CoreMangLib/cti/system/delegate/DelegateGetHashCode1.csproj
new file mode 100644
index 0000000000..3d7a49c77b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/delegate/DelegateGetHashCode1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="delegategethashcode1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/delegate/DelegateGetInvocationList1.csproj b/tests/src/CoreMangLib/cti/system/delegate/DelegateGetInvocationList1.csproj
new file mode 100644
index 0000000000..13e1a0f9c9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/delegate/DelegateGetInvocationList1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="delegategetinvocationlist1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/delegate/DelegateRemove.csproj b/tests/src/CoreMangLib/cti/system/delegate/DelegateRemove.csproj
new file mode 100644
index 0000000000..a9b95ee22a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/delegate/DelegateRemove.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="delegateremove.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/delegate/TestForOtherAssembly.csproj b/tests/src/CoreMangLib/cti/system/delegate/TestForOtherAssembly.csproj
new file mode 100644
index 0000000000..0497f7d644
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/delegate/TestForOtherAssembly.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="testforotherassembly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/delegate/delegateRemoveImpl.csproj b/tests/src/CoreMangLib/cti/system/delegate/delegateRemoveImpl.csproj
new file mode 100644
index 0000000000..32a2dfceb8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/delegate/delegateRemoveImpl.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="delegateremoveimpl.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/delegate/delegateabi.cs b/tests/src/CoreMangLib/cti/system/delegate/delegateabi.cs
new file mode 100644
index 0000000000..e13ccafb8e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/delegate/delegateabi.cs
@@ -0,0 +1,68 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+
+namespace ClassLibrary
+{
+ public class test
+ {
+ public delegate float FloatTest(float a);
+
+ static float testfloat(float a)
+ {
+ if(a != -1.1f)
+ {
+ throw new Exception();
+ }
+ return -2.2f;
+ }
+
+ public delegate int IntTest(int a);
+
+ static int testint(int a)
+ {
+ if(a != -1)
+ {
+ throw new Exception();
+ }
+ return -2;
+ }
+
+ static int Main(string[] args)
+ {
+ try
+ {
+ IntTest inttest = testint;
+ int r = inttest(-1);
+ if (r != -2)
+ {
+ Console.WriteLine("FAIL - int return value mismatch");
+ return 101;
+ }
+ }
+ catch (Exception)
+ {
+ Console.WriteLine("FAIL - int argument value mismatch");
+ return 102;
+ }
+ try
+ {
+ FloatTest floattest = testfloat;
+ float r = floattest(-1.1f);
+ if (r != -2.2f)
+ {
+ Console.WriteLine("FAIL - float return value mismatch");
+ return 103;
+ }
+ }
+ catch (Exception)
+ {
+ Console.WriteLine("FAIL - float argument value mismatch");
+ return 104;
+ }
+ return 100;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/delegate/delegatecombine1.cs b/tests/src/CoreMangLib/cti/system/delegate/delegatecombine1.cs
new file mode 100644
index 0000000000..e529fe753d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/delegate/delegatecombine1.cs
@@ -0,0 +1,272 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+using System.Globalization;
+using System.Collections;
+//create for delegate combine(delegate a,delagate b) testing
+namespace DelegateTest
+{
+ delegate bool booldelegate();
+ delegate void voiddelegate();
+ delegate void delegatecombine(booldelegate delgate1, booldelegate delgate2);
+
+ public class DelegateCombine1
+ {
+ const string c_StartWrok = "Stark";
+ const string c_Working = "Working";
+ enum identify_null
+ {
+ c_Start_null_true,
+ c_Start_null_false,
+ c_Working_null_true,
+ c_Working_null_false
+
+ }
+ booldelegate starkWork;
+ booldelegate working;
+ voiddelegate completeWork;
+ public static int Main()
+ {
+ DelegateCombine1 delegateCombine1 = new DelegateCombine1();
+
+ TestLibrary.TestFramework.BeginTestCase("DelegateCombine1");
+
+
+
+ if (delegateCombine1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: combine two delegates which are not null");
+
+ try
+ {
+ if (GetInvocationListFlag(identify_null.c_Start_null_false, identify_null.c_Working_null_false ) != c_StartWrok + c_Working)
+ {
+ TestLibrary.TestFramework.LogError("001", "delegate combine is not successful ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: combine two delegate ,first is null,second is not null");
+
+ try
+ {
+
+ if (GetInvocationListFlag(identify_null.c_Start_null_true, identify_null.c_Working_null_false ) != c_Working)
+ {
+ TestLibrary.TestFramework.LogError("003", "delegate combine is not successful ");
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: combine two delegate ,first is not null,second is null");
+
+ try
+ {
+
+ if (GetInvocationListFlag( identify_null.c_Start_null_false, identify_null.c_Working_null_true ) != c_StartWrok)
+ {
+ TestLibrary.TestFramework.LogError("005", "delegate combine is not successful ");
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: combine two delegate ,first is null and second is null");
+
+ try
+ {
+ if (GetInvocationListFlag( identify_null.c_Start_null_true , identify_null.c_Working_null_true) != string.Empty )
+ {
+ TestLibrary.TestFramework.LogError("007", "delegate combine is not successful ");
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Both a and b are not a null reference , and a and b are not instances of the same delegate type.");
+
+ try
+ {
+ DelegateCombine1 delctor = new DelegateCombine1();
+ TestClass testinstance = new TestClass();
+ delctor.starkWork = new booldelegate(testinstance.StartWork_Bool);
+ delctor.completeWork = new voiddelegate(testinstance.CompleteWork_Void);
+
+ object obj = Delegate.Combine(delctor.starkWork, delctor.completeWork);
+
+ TestLibrary.TestFramework.LogError("009", "a ArgumentException should be throw ");
+ retVal = false;
+
+ }
+ catch (ArgumentException)
+ {
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ private string GetInvocationListFlag(identify_null start,identify_null working)
+ {
+ DelegateCombine1 delctor = new DelegateCombine1();
+ TestClass testinstance = new TestClass();
+
+ string sFlag = string.Empty;
+ if (start == identify_null.c_Start_null_false)
+ {
+ delctor.starkWork = new booldelegate(testinstance.StartWork_Bool);
+ }
+ else
+ {
+ delctor.starkWork = null;
+ }
+ if (working == identify_null.c_Working_null_false)
+ {
+ delctor.working = new booldelegate(testinstance.Working_Bool );
+ }
+ else
+ {
+ delctor.working = null;
+ }
+ booldelegate combine = (booldelegate)Delegate.Combine(delctor.starkWork, delctor.working);
+ if (combine == null)
+ {
+ return string.Empty;
+ }
+
+ for (IEnumerator itr = combine.GetInvocationList().GetEnumerator(); itr.MoveNext(); )
+ {
+ booldelegate bd = (booldelegate)itr.Current;
+ if (bd.Equals(delctor.starkWork))
+ {
+ sFlag += c_StartWrok;
+ }
+ if (bd.Equals(delctor.working))
+ {
+ sFlag += c_Working;
+ }
+ }
+ combine();
+ return sFlag;
+ }
+
+ }
+ //create testclass for provding test method and test target.
+ class TestClass
+ {
+ public bool StartWork_Bool()
+ {
+ TestLibrary.TestFramework.LogInformation("StartWork_Bool method is running .");
+ return true;
+ }
+ public bool Working_Bool()
+ {
+ TestLibrary.TestFramework.LogInformation("Working_Bool method is running .");
+ return true;
+ }
+ public void CompleteWork_Void()
+ {
+ TestLibrary.TestFramework.LogInformation("CompleteWork_Void method is running .");
+
+ }
+ }
+
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/delegate/delegatecombineimpl.cs b/tests/src/CoreMangLib/cti/system/delegate/delegatecombineimpl.cs
new file mode 100644
index 0000000000..03138bd642
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/delegate/delegatecombineimpl.cs
@@ -0,0 +1,290 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+using System.Globalization;
+using System.Collections;
+//create for delegate combine(delegate a,delagate b) testing
+namespace DelegateTest
+{
+ delegate bool booldelegate();
+ delegate void voiddelegate();
+
+ public class DelegateCombineImpl
+ {
+ const string c_StartWrok = "Start";
+ const string c_Working = "Working";
+ enum identify_null
+ {
+ c_Start_null_true,
+ c_Start_null_false,
+ c_Working_null_true,
+ c_Working_null_false,
+ c_Start_null_false_duplicate
+
+ }
+ booldelegate starkWork;
+ booldelegate working;
+ public static int Main()
+ {
+ DelegateCombineImpl delegateCombineImpl = new DelegateCombineImpl();
+
+ TestLibrary.TestFramework.BeginTestCase("DelegateCombineImpl");
+
+
+
+ if (delegateCombineImpl.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ return retVal;
+ }
+
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: combine two delegates which are not null");
+
+ try
+ {
+ booldelegate delgate = new booldelegate(new TestClass().Working_Bool);
+ if (!CombineImpl(delgate,identify_null.c_Start_null_false))
+ {
+ TestLibrary.TestFramework.LogError("001", "delegate combineimpl is not successful ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: combine two delegate ,first is null,second is not null");
+
+ try
+ {
+
+ booldelegate delgate = null;
+ if (!CombineImpl(delgate, identify_null.c_Working_null_false))
+ {
+ TestLibrary.TestFramework.LogError("003", "delegate combine is not successful ");
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: combine two delegate ,first is not null,second is null");
+
+ try
+ {
+
+ booldelegate delgate = new booldelegate(new TestClass().StartWork_Bool);
+ if (!CombineImpl(delgate, identify_null.c_Working_null_true ))
+ {
+ TestLibrary.TestFramework.LogError("005", "delegate combine is not successful ");
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: combine two delegate ,first is null and second is null");
+
+ try
+ {
+ booldelegate delgate = null;
+ if (!CombineImpl(delgate, identify_null.c_Working_null_true))
+ {
+ TestLibrary.TestFramework.LogError("007", "delegate combine is not successful ");
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: combine three delegate ,first is not null and the two others entry that refer to the same method on the same object");
+
+ try
+ {
+ booldelegate delgate = new booldelegate(new TestClass().Working_Bool);
+ if (!CombineImpl(delgate, identify_null.c_Start_null_false_duplicate ))
+ {
+ TestLibrary.TestFramework.LogError("009", "delegate combine is not successful ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ private bool CombineImpl(booldelegate delegatesrc,identify_null start)
+ {
+ DelegateCombineImpl delctor = new DelegateCombineImpl();
+ TestClass testinstance = new TestClass();
+
+ string sFlag = string.Empty;
+ string sFlagAdd=string.Empty ;
+ booldelegate combineImpl = delegatesrc;
+ if (start == identify_null.c_Start_null_false)
+ {
+ delctor.starkWork = new booldelegate(testinstance.StartWork_Bool);
+ combineImpl += (booldelegate)delctor.starkWork;
+ sFlagAdd = c_StartWrok;
+
+ }
+ else if (start == identify_null.c_Start_null_false_duplicate )
+ {
+ delctor.starkWork = new booldelegate(testinstance.StartWork_Bool);
+ combineImpl += (booldelegate)delctor.starkWork;
+ sFlagAdd = c_StartWrok;
+ //The invocation list can contain duplicate entries; that is, entries that refer to the same method on the same object.
+ combineImpl += (booldelegate)delctor.starkWork;
+ sFlagAdd += sFlagAdd;
+ }
+ else if(start==identify_null.c_Start_null_true )
+ {
+ delctor.starkWork = null;
+ combineImpl += (booldelegate)delctor.starkWork;
+ }
+ else if (start == identify_null.c_Working_null_false)
+ {
+ delctor.working = new booldelegate(testinstance.Working_Bool );
+ combineImpl += (booldelegate)delctor.working;
+ sFlagAdd=c_Working ;
+ }
+ else
+ {
+ delctor.working = null;
+ combineImpl += (booldelegate)delctor.working;
+ }
+
+ if (combineImpl == null)
+ {
+ return true;
+ }
+
+ for (IEnumerator itr = combineImpl.GetInvocationList().GetEnumerator(); itr.MoveNext(); )
+ {
+ booldelegate bd = (booldelegate)itr.Current;
+ //the filter is to get the delegate which is appended through equals method.
+ if (bd.Equals(delctor.starkWork))
+ {
+ sFlag += c_StartWrok;
+ }
+ if (bd.Equals(delctor.working))
+ {
+ sFlag += c_Working;
+ }
+ }
+ combineImpl();
+ //judge delegate is appended to the end of the invocation list of the current
+ if (sFlag == sFlagAdd)
+ return true;
+ else
+ return false;
+
+ }
+
+ }
+ //create testclass for provding test method and test target.
+ class TestClass
+ {
+ public bool StartWork_Bool()
+ {
+ TestLibrary.TestFramework.LogInformation("StartWork_Bool method is running .");
+ return true;
+ }
+ public bool Working_Bool()
+ {
+ TestLibrary.TestFramework.LogInformation("Working_Bool method is running .");
+ return true;
+ }
+ public void CompleteWork_Void()
+ {
+ TestLibrary.TestFramework.LogInformation("CompleteWork_Void method is running .");
+
+ }
+ }
+
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/delegate/delegateequals1.cs b/tests/src/CoreMangLib/cti/system/delegate/delegateequals1.cs
new file mode 100644
index 0000000000..ca99d679c8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/delegate/delegateequals1.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/delegate/delegategethashcode1.cs b/tests/src/CoreMangLib/cti/system/delegate/delegategethashcode1.cs
new file mode 100644
index 0000000000..8c77c9b77a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/delegate/delegategethashcode1.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/delegate/delegategetinvocationlist1.cs b/tests/src/CoreMangLib/cti/system/delegate/delegategetinvocationlist1.cs
new file mode 100644
index 0000000000..3f1d311172
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/delegate/delegategetinvocationlist1.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/delegate/delegateremove.cs b/tests/src/CoreMangLib/cti/system/delegate/delegateremove.cs
new file mode 100644
index 0000000000..aba475d184
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/delegate/delegateremove.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/delegate/delegateremoveimpl.cs b/tests/src/CoreMangLib/cti/system/delegate/delegateremoveimpl.cs
new file mode 100644
index 0000000000..d06e82a12a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/delegate/delegateremoveimpl.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/delegate/testforotherassembly.cs b/tests/src/CoreMangLib/cti/system/delegate/testforotherassembly.cs
new file mode 100644
index 0000000000..11a25dad56
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/delegate/testforotherassembly.cs
@@ -0,0 +1,23 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Security;
+
+namespace OtherAssemblyTest
+{
+ public class TestOtherAssemblyClass
+ {
+
+ static internal void MethodF(string s)
+ {
+ Console.WriteLine("Static internal method MethodE on TestOtherAssemblyClass: s = {0}", s);
+ }
+ private void MethodH(string s)
+ {
+ Console.WriteLine("instance private method MethodE on TestOtherAssemblyClass: s = {0}", s);
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/diagnostics/conditionalattribute/ConditionalAttributeConditionString.csproj b/tests/src/CoreMangLib/cti/system/diagnostics/conditionalattribute/ConditionalAttributeConditionString.csproj
new file mode 100644
index 0000000000..a933a8a5ba
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/diagnostics/conditionalattribute/ConditionalAttributeConditionString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="conditionalattributeconditionstring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/diagnostics/conditionalattribute/ConditionalAttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/diagnostics/conditionalattribute/ConditionalAttributeCtor.csproj
new file mode 100644
index 0000000000..fb32363a60
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/diagnostics/conditionalattribute/ConditionalAttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="conditionalattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/diagnostics/conditionalattribute/conditionalattributeconditionstring.cs b/tests/src/CoreMangLib/cti/system/diagnostics/conditionalattribute/conditionalattributeconditionstring.cs
new file mode 100644
index 0000000000..15b03740ca
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/diagnostics/conditionalattribute/conditionalattributeconditionstring.cs
@@ -0,0 +1,152 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Diagnostics;
+
+/// <summary>
+/// ConditionalAttribute.ConditionString(v-yaduoj)
+/// </summary>
+public class ConditionalAttributeConditionString
+{
+ public static int Main()
+ {
+ ConditionalAttributeConditionString testObj = new ConditionalAttributeConditionString();
+
+ TestLibrary.TestFramework.BeginTestCase("for property: ConditionalAttribute.ConditionString");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Get unempty ConditionString";
+ string errorDesc;
+
+ string expectedCondition;
+ string actualCondition;
+ expectedCondition = "CLR_Test_Case";
+ ConditionalAttribute conditionalAtt = new ConditionalAttribute(expectedCondition);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualCondition = conditionalAtt.ConditionString;
+ if (actualCondition != expectedCondition)
+ {
+ errorDesc = "The value of property ConditionString of instance of class ConditionalAttribute is not " +
+ "the value \"" + expectedCondition + "\" as expected: Actually\"" + actualCondition +
+ "\"";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: Get empty ConditionString";
+ string errorDesc;
+
+ string expectedCondition;
+ string actualCondition;
+ expectedCondition = string.Empty;
+ ConditionalAttribute conditionalAtt = new ConditionalAttribute(expectedCondition);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualCondition = conditionalAtt.ConditionString;
+ if (actualCondition != expectedCondition)
+ {
+ errorDesc = "The value of property ConditionString of instance of class ConditionalAttribute is not " +
+ "the value string.Empty as expected: Actually\"" + actualCondition +
+ "\"";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ const string c_TEST_DESC = "PosTest3: Get null reference ConditionString";
+ string errorDesc;
+
+ string expectedCondition;
+ string actualCondition;
+ expectedCondition = null;
+ ConditionalAttribute conditionalAtt = new ConditionalAttribute(expectedCondition);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualCondition = conditionalAtt.ConditionString;
+ if (actualCondition != expectedCondition)
+ {
+ errorDesc = "The value of property ConditionString of instance of class ConditionalAttribute is not " +
+ "the value null reference as expected: Actually\"" + actualCondition +
+ "\"";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/diagnostics/conditionalattribute/conditionalattributector.cs b/tests/src/CoreMangLib/cti/system/diagnostics/conditionalattribute/conditionalattributector.cs
new file mode 100644
index 0000000000..322b6f019c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/diagnostics/conditionalattribute/conditionalattributector.cs
@@ -0,0 +1,140 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Diagnostics;
+
+/// <summary>
+/// ConditionalAttribute(string)(v-yaduoj)
+/// </summary>
+public class ConditionalAttributeCtor
+{
+ public static int Main()
+ {
+ ConditionalAttributeCtor testObj = new ConditionalAttributeCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("for constructor: ConditionalAttribute(string)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Intinalize the conditional attribute using not empty string.";
+ string errorDesc;
+
+ string conditionalString;
+
+ conditionalString = "CLR_API_Test";
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ConditionalAttribute conditionalAtt = new ConditionalAttribute(conditionalString);
+ if (conditionalAtt.ConditionString != conditionalString)
+ {
+ errorDesc = string.Format("Faile to initialize the conditional attribute using string \"{0}\"", conditionalString);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: Intinalize the conditional attribute using string.Empty.";
+ string errorDesc;
+
+ string conditionalString;
+
+ conditionalString = string.Empty;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ConditionalAttribute conditionalAtt = new ConditionalAttribute(conditionalString);
+ if (conditionalAtt.ConditionString != conditionalString)
+ {
+ errorDesc = "Failed to initialize the conditional attribute using an empty string(string.Empty)";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ const string c_TEST_DESC = "PosTest3: Intinalize the conditional attribute using a null reference.";
+ string errorDesc;
+
+ string conditionalString;
+
+ conditionalString = null;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ConditionalAttribute conditionalAtt = new ConditionalAttribute(conditionalString);
+ if (conditionalAtt.ConditionString != conditionalString)
+ {
+ errorDesc = "Failed to initialize the conditional attribute using a null reference";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/DebuggingModesDefault.csproj b/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/DebuggingModesDefault.csproj
new file mode 100644
index 0000000000..c774856ddd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/DebuggingModesDefault.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="debuggingmodesdefault.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/DebuggingModesDisableOptimizations.csproj b/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/DebuggingModesDisableOptimizations.csproj
new file mode 100644
index 0000000000..409a9f4961
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/DebuggingModesDisableOptimizations.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="debuggingmodesdisableoptimizations.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/DebuggingModesEnableEditAndContinue.csproj b/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/DebuggingModesEnableEditAndContinue.csproj
new file mode 100644
index 0000000000..1337a22909
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/DebuggingModesEnableEditAndContinue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="debuggingmodesenableeditandcontinue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/DebuggingModesIgnoreSymbolStoreSequencePoints.csproj b/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/DebuggingModesIgnoreSymbolStoreSequencePoints.csproj
new file mode 100644
index 0000000000..35a886e0a7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/DebuggingModesIgnoreSymbolStoreSequencePoints.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="debuggingmodesignoresymbolstoresequencepoints.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/DebuggingModesNone.csproj b/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/DebuggingModesNone.csproj
new file mode 100644
index 0000000000..d221a56091
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/DebuggingModesNone.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="debuggingmodesnone.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/debuggingmodesdefault.cs b/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/debuggingmodesdefault.cs
new file mode 100644
index 0000000000..2198968b2f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/debuggingmodesdefault.cs
@@ -0,0 +1,92 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Diagnostics;
+
+/// <summary>
+/// DebuggingModes.Default (v-yaduoj)
+/// </summary>
+public class DebuggingModesElement
+{
+ private enum MyDebuggingModes
+ {
+ None = 0x0,
+ Default = 0x1,
+ DisableOptimizations = 0x100,
+ IgnoreSymbolStoreSequencePoints = 0x2,
+ EnableEditAndContinue = 0x4
+ }
+
+ public static int Main()
+ {
+ DebuggingModesElement testObj = new DebuggingModesElement();
+
+ TestLibrary.TestFramework.BeginTestCase("for enum value: DebuggingModes.Default");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ const string c_TEST_ID = "P001";
+ string testDesc = "PosTest1: value of DebuggableAttribute.DebuggingModes.";
+ DebuggableAttribute.DebuggingModes modes = DebuggableAttribute.DebuggingModes.Default;
+ testDesc += modes;
+ MyDebuggingModes expectedModes = MyDebuggingModes.Default;
+ return ExecutePosTest(c_TEST_ID, testDesc, "001", "002", modes, expectedModes);
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool ExecutePosTest(string testId, string testDesc,
+ string errorNum1, string errorNum2,
+ DebuggableAttribute.DebuggingModes actualModes,
+ MyDebuggingModes expectedModes)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ if (actualModes != (DebuggableAttribute.DebuggingModes)expectedModes)
+ {
+ errorDesc = "Value of " + actualModes + " is not the value " + (int)expectedModes +
+ " as expected: Actually(" + (int)actualModes + ")";
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/debuggingmodesdisableoptimizations.cs b/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/debuggingmodesdisableoptimizations.cs
new file mode 100644
index 0000000000..ff65994d0a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/debuggingmodesdisableoptimizations.cs
@@ -0,0 +1,92 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Diagnostics;
+
+/// <summary>
+/// DebuggingModes.DisableOptimizations (v-yaduoj)
+/// </summary>
+public class DebuggingModesElement
+{
+ private enum MyDebuggingModes
+ {
+ None = 0x0,
+ Default = 0x1,
+ DisableOptimizations = 0x100,
+ IgnoreSymbolStoreSequencePoints = 0x2,
+ EnableEditAndContinue = 0x4
+ }
+
+ public static int Main()
+ {
+ DebuggingModesElement testObj = new DebuggingModesElement();
+
+ TestLibrary.TestFramework.BeginTestCase("for enum value: DebuggingModes.DisableOptimizations");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ const string c_TEST_ID = "P001";
+ string testDesc = "PosTest1: value of DebuggableAttribute.DebuggingModes.";
+ DebuggableAttribute.DebuggingModes modes = DebuggableAttribute.DebuggingModes.DisableOptimizations;
+ testDesc += modes;
+ MyDebuggingModes expectedModes = MyDebuggingModes.DisableOptimizations;
+ return ExecutePosTest(c_TEST_ID, testDesc, "001", "002", modes, expectedModes);
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool ExecutePosTest(string testId, string testDesc,
+ string errorNum1, string errorNum2,
+ DebuggableAttribute.DebuggingModes actualModes,
+ MyDebuggingModes expectedModes)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ if (actualModes != (DebuggableAttribute.DebuggingModes)expectedModes)
+ {
+ errorDesc = "Value of " + actualModes + " is not the value " + (int)expectedModes +
+ " as expected: Actually(" + (int)actualModes + ")";
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/debuggingmodesenableeditandcontinue.cs b/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/debuggingmodesenableeditandcontinue.cs
new file mode 100644
index 0000000000..83a1deb50a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/debuggingmodesenableeditandcontinue.cs
@@ -0,0 +1,92 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Diagnostics;
+
+/// <summary>
+/// DebuggingModes.EnableEditAndContinue (v-yaduoj)
+/// </summary>
+public class DebuggingModesElement
+{
+ private enum MyDebuggingModes
+ {
+ None = 0x0,
+ Default = 0x1,
+ DisableOptimizations = 0x100,
+ IgnoreSymbolStoreSequencePoints = 0x2,
+ EnableEditAndContinue = 0x4
+ }
+
+ public static int Main()
+ {
+ DebuggingModesElement testObj = new DebuggingModesElement();
+
+ TestLibrary.TestFramework.BeginTestCase("for enum value: DebuggingModes.EnableEditAndContinue");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ const string c_TEST_ID = "P001";
+ string testDesc = "PosTest1: value of DebuggableAttribute.DebuggingModes.";
+ DebuggableAttribute.DebuggingModes modes = DebuggableAttribute.DebuggingModes.EnableEditAndContinue;
+ testDesc += modes;
+ MyDebuggingModes expectedModes = MyDebuggingModes.EnableEditAndContinue;
+ return ExecutePosTest(c_TEST_ID, testDesc, "001", "002", modes, expectedModes);
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool ExecutePosTest(string testId, string testDesc,
+ string errorNum1, string errorNum2,
+ DebuggableAttribute.DebuggingModes actualModes,
+ MyDebuggingModes expectedModes)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ if (actualModes != (DebuggableAttribute.DebuggingModes)expectedModes)
+ {
+ errorDesc = "Value of " + actualModes + " is not the value " + (int)expectedModes +
+ " as expected: Actually(" + (int)actualModes + ")";
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/debuggingmodesignoresymbolstoresequencepoints.cs b/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/debuggingmodesignoresymbolstoresequencepoints.cs
new file mode 100644
index 0000000000..cd3ddd05ae
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/debuggingmodesignoresymbolstoresequencepoints.cs
@@ -0,0 +1,92 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Diagnostics;
+
+/// <summary>
+/// DebuggingModes.IgnoreSymbolStoreSequencePoints (v-yaduoj)
+/// </summary>
+public class DebuggingModesElement
+{
+ private enum MyDebuggingModes
+ {
+ None = 0x0,
+ Default = 0x1,
+ DisableOptimizations = 0x100,
+ IgnoreSymbolStoreSequencePoints = 0x2,
+ EnableEditAndContinue = 0x4
+ }
+
+ public static int Main()
+ {
+ DebuggingModesElement testObj = new DebuggingModesElement();
+
+ TestLibrary.TestFramework.BeginTestCase("for enum value: DebuggingModes.IgnoreSymbolStoreSequencePoints");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ const string c_TEST_ID = "P001";
+ string testDesc = "PosTest1: value of DebuggableAttribute.DebuggingModes.";
+ DebuggableAttribute.DebuggingModes modes = DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints;
+ testDesc += modes;
+ MyDebuggingModes expectedModes = MyDebuggingModes.IgnoreSymbolStoreSequencePoints;
+ return ExecutePosTest(c_TEST_ID, testDesc, "001", "002", modes, expectedModes);
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool ExecutePosTest(string testId, string testDesc,
+ string errorNum1, string errorNum2,
+ DebuggableAttribute.DebuggingModes actualModes,
+ MyDebuggingModes expectedModes)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ if (actualModes != (DebuggableAttribute.DebuggingModes)expectedModes)
+ {
+ errorDesc = "Value of " + actualModes + " is not the value " + (int)expectedModes +
+ " as expected: Actually(" + (int)actualModes + ")";
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/debuggingmodesnone.cs b/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/debuggingmodesnone.cs
new file mode 100644
index 0000000000..6d0263d31e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/diagnostics/debuggingmodes/debuggingmodesnone.cs
@@ -0,0 +1,92 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Diagnostics;
+
+/// <summary>
+/// DebuggingModes.None (v-yaduoj)
+/// </summary>
+public class DebuggingModesElement
+{
+ private enum MyDebuggingModes
+ {
+ None = 0x0,
+ Default = 0x1,
+ DisableOptimizations = 0x100,
+ IgnoreSymbolStoreSequencePoints = 0x2,
+ EnableEditAndContinue = 0x4
+ }
+
+ public static int Main()
+ {
+ DebuggingModesElement testObj = new DebuggingModesElement();
+
+ TestLibrary.TestFramework.BeginTestCase("for enum value: DebuggingModes.None");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ const string c_TEST_ID = "P001";
+ string testDesc = "PosTest1: value of DebuggableAttribute.DebuggingModes.";
+ DebuggableAttribute.DebuggingModes modes = DebuggableAttribute.DebuggingModes.None;
+ testDesc += modes;
+ MyDebuggingModes expectedModes = MyDebuggingModes.None;
+ return ExecutePosTest(c_TEST_ID, testDesc, "001", "002", modes, expectedModes);
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool ExecutePosTest(string testId, string testDesc,
+ string errorNum1, string errorNum2,
+ DebuggableAttribute.DebuggingModes actualModes,
+ MyDebuggingModes expectedModes)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ if (actualModes != (DebuggableAttribute.DebuggingModes)expectedModes)
+ {
+ errorDesc = "Value of " + actualModes + " is not the value " + (int)expectedModes +
+ " as expected: Actually(" + (int)actualModes + ")";
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/dividebyzeroexception/DivideByZeroExceptionCtor.csproj b/tests/src/CoreMangLib/cti/system/dividebyzeroexception/DivideByZeroExceptionCtor.csproj
new file mode 100644
index 0000000000..a2bbe56f7a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dividebyzeroexception/DivideByZeroExceptionCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dividebyzeroexceptionctor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/dividebyzeroexception/DivideByZeroExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/dividebyzeroexception/DivideByZeroExceptionCtor2.csproj
new file mode 100644
index 0000000000..d216b3b3b2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dividebyzeroexception/DivideByZeroExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dividebyzeroexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/dividebyzeroexception/DivideByZeroExceptionCtor3.csproj b/tests/src/CoreMangLib/cti/system/dividebyzeroexception/DivideByZeroExceptionCtor3.csproj
new file mode 100644
index 0000000000..55b46933d9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dividebyzeroexception/DivideByZeroExceptionCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dividebyzeroexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/dividebyzeroexception/dividebyzeroexceptionctor.cs b/tests/src/CoreMangLib/cti/system/dividebyzeroexception/dividebyzeroexceptionctor.cs
new file mode 100644
index 0000000000..694a93af1d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dividebyzeroexception/dividebyzeroexceptionctor.cs
@@ -0,0 +1,93 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+///<summary>
+///System.DivideByZeroException.Ctor()
+///</summary>
+
+public class DivideByZeroExceptionCtor
+{
+
+ public static int Main()
+ {
+ DivideByZeroExceptionCtor testObj = new DivideByZeroExceptionCtor();
+ TestLibrary.TestFramework.BeginTestCase("for constructor of System.DivideByZeroException");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Positive Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Create a instance of DivideByZeroException");
+ try
+ {
+ DivideByZeroException dbz = new DivideByZeroException();
+
+ if (dbz == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negtive Test Logic
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ int tempInt = TestLibrary.Generator.GetInt32(-55);
+ int divider = 0;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Try to throw a DivideByZeroException");
+ try
+ {
+ int temp = tempInt / divider;
+ TestLibrary.TestFramework.LogError("003", "No DivideByZeroExcepthion thrown out expected.");
+ retVal = false;
+ }
+ catch (DivideByZeroException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/dividebyzeroexception/dividebyzeroexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/dividebyzeroexception/dividebyzeroexceptionctor2.cs
new file mode 100644
index 0000000000..d492aff161
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dividebyzeroexception/dividebyzeroexceptionctor2.cs
@@ -0,0 +1,194 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+///<summary>
+///System.DivideByZeroException.Ctor(String)
+///</summary>
+
+public class DivideByZeroExceptionCtor
+{
+
+ public static int Main()
+ {
+ DivideByZeroExceptionCtor testObj = new DivideByZeroExceptionCtor();
+ TestLibrary.TestFramework.BeginTestCase("for constructor of System.DivideByZeroException");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+
+ #region Positive Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ String errMessage = TestLibrary.Generator.GetString(-55, false, 1, 255);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Create a instance of DivideByZeroException with not null message");
+ try
+ {
+
+ DivideByZeroException dbz = new DivideByZeroException(errMessage);
+
+ if (dbz == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ String errMessage = TestLibrary.Generator.GetString(-55, false, 1, 255);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Determine the error message is changed or not when the exception is thown out");
+ try
+ {
+
+ DivideByZeroException dbz = new DivideByZeroException(errMessage);
+
+ if (dbz == null)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ else
+ {
+ retVal = false;
+ throw dbz;
+ }
+ }
+ catch (DivideByZeroException dE)
+ {
+ retVal = true;
+ if (!dE.Message.Equals(errMessage))
+ {
+ TestLibrary.TestFramework.LogError("004", "ExpectedValue(Message Not Be Changed) !=ActualValue(Message Be Changed)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ String errMessage = String.Empty;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Determine it with empty error message");
+ try
+ {
+
+ DivideByZeroException dbz = new DivideByZeroException(errMessage);
+
+ if (dbz == null)
+ {
+ TestLibrary.TestFramework.LogError("006", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ else
+ {
+ retVal = false;
+ throw dbz;
+ }
+ }
+ catch (DivideByZeroException dE)
+ {
+ retVal = true;
+ if (!dE.Message.Equals(errMessage))
+ {
+ TestLibrary.TestFramework.LogError("007", "ExpectedValue(Message Not Be Changed) !=ActualValue(Message Be Changed)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ String errMessage = TestLibrary.Generator.GetString(-55, false, 256, 512);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Determine it with long string");
+ try
+ {
+
+ DivideByZeroException dbz = new DivideByZeroException(errMessage);
+
+ if (dbz == null)
+ {
+ TestLibrary.TestFramework.LogError("009", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ else
+ {
+ retVal = false;
+ throw dbz;
+ }
+ }
+ catch (DivideByZeroException dE)
+ {
+ retVal = true;
+ if (!dE.Message.Equals(errMessage))
+ {
+ TestLibrary.TestFramework.LogError("010", "ExpectedValue(Message Not Be Changed) !=ActualValue(Message Be Changed)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("011", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/dividebyzeroexception/dividebyzeroexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/dividebyzeroexception/dividebyzeroexceptionctor3.cs
new file mode 100644
index 0000000000..85bdce78af
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dividebyzeroexception/dividebyzeroexceptionctor3.cs
@@ -0,0 +1,194 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+///<summary>
+///System.DivideByZeroException.Ctor(String,Exception)
+///</summary>
+
+public class DivideByZeroExceptionCtor
+{
+
+ public static int Main()
+ {
+ DivideByZeroExceptionCtor testObj = new DivideByZeroExceptionCtor();
+ TestLibrary.TestFramework.BeginTestCase("for constructor of System.DivideByZeroException");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+
+ #region Positive Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ String errMessage = TestLibrary.Generator.GetString(-55, false, 1, 255);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Create a instance of DivideByZeroException with not null message");
+ try
+ {
+
+ DivideByZeroException dbz = new DivideByZeroException(errMessage,new Exception());
+
+ if (dbz == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ String errMessage = TestLibrary.Generator.GetString(-55, false, 1, 255);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Determine the error message is changed or not when the exception is thown out");
+ try
+ {
+
+ DivideByZeroException dbz = new DivideByZeroException(errMessage,new Exception());
+
+ if (dbz == null)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ else
+ {
+ retVal = false;
+ throw dbz;
+ }
+ }
+ catch (DivideByZeroException dE)
+ {
+ retVal = true;
+ if (!dE.Message.Equals(errMessage))
+ {
+ TestLibrary.TestFramework.LogError("004", "ExpectedValue(Message Not Be Changed) !=ActualValue(Message Be Changed)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ String errMessage = String.Empty;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Determine it with empty error message");
+ try
+ {
+
+ DivideByZeroException dbz = new DivideByZeroException(errMessage,new Exception());
+
+ if (dbz == null)
+ {
+ TestLibrary.TestFramework.LogError("006", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ else
+ {
+ retVal = false;
+ throw dbz;
+ }
+ }
+ catch (DivideByZeroException dE)
+ {
+ retVal = true;
+ if (!dE.Message.Equals(errMessage))
+ {
+ TestLibrary.TestFramework.LogError("007", "ExpectedValue(Message Not Be Changed) !=ActualValue(Message Be Changed)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ String errMessage = TestLibrary.Generator.GetString(-55, false, 256, 512);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Determine it with long string");
+ try
+ {
+
+ DivideByZeroException dbz = new DivideByZeroException(errMessage,new Exception());
+
+ if (dbz == null)
+ {
+ TestLibrary.TestFramework.LogError("009", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ else
+ {
+ retVal = false;
+ throw dbz;
+ }
+ }
+ catch (DivideByZeroException dE)
+ {
+ retVal = true;
+ if (!dE.Message.Equals(errMessage))
+ {
+ TestLibrary.TestFramework.LogError("010", "ExpectedValue(Message Not Be Changed) !=ActualValue(Message Be Changed)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("011", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/dllnotfoundexception/DllNotFoundException1.csproj b/tests/src/CoreMangLib/cti/system/dllnotfoundexception/DllNotFoundException1.csproj
new file mode 100644
index 0000000000..3132168481
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dllnotfoundexception/DllNotFoundException1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dllnotfoundexception1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/dllnotfoundexception/DllNotFoundExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/dllnotfoundexception/DllNotFoundExceptionCtor2.csproj
new file mode 100644
index 0000000000..72913083a3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dllnotfoundexception/DllNotFoundExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dllnotfoundexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/dllnotfoundexception/DllNotFoundExceptionCtor3.csproj b/tests/src/CoreMangLib/cti/system/dllnotfoundexception/DllNotFoundExceptionCtor3.csproj
new file mode 100644
index 0000000000..de34aece1b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dllnotfoundexception/DllNotFoundExceptionCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dllnotfoundexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/dllnotfoundexception/dllnotfoundexception1.cs b/tests/src/CoreMangLib/cti/system/dllnotfoundexception/dllnotfoundexception1.cs
new file mode 100644
index 0000000000..2a4bfbe57e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dllnotfoundexception/dllnotfoundexception1.cs
@@ -0,0 +1,63 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+///<summary>
+///System.DllNotFoundException.Ctor()
+///</summary>
+
+public class DllNotFoundExceptionCtor
+{
+
+ public static int Main()
+ {
+ DllNotFoundExceptionCtor testObj = new DllNotFoundExceptionCtor();
+ TestLibrary.TestFramework.BeginTestCase("for constructor of System.DllNotFoundException");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Positive Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Create a instance of DllNotFoundException");
+ try
+ {
+ DllNotFoundException dbz = new DllNotFoundException();
+
+ if (dbz == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/dllnotfoundexception/dllnotfoundexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/dllnotfoundexception/dllnotfoundexceptionctor2.cs
new file mode 100644
index 0000000000..2414439451
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dllnotfoundexception/dllnotfoundexceptionctor2.cs
@@ -0,0 +1,188 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+///<summary>
+///System.DllNotFoundException.Ctor(String)
+///</summary>
+
+public class DllNotFoundExceptionCtor
+{
+
+ public static int Main()
+ {
+ DllNotFoundExceptionCtor testObj = new DllNotFoundExceptionCtor();
+ TestLibrary.TestFramework.BeginTestCase("for constructor of System.DllNotFoundException");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+
+
+ #region Positive Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ String errMessage = TestLibrary.Generator.GetString(-55, false, 1, 255);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Create a instance of DllNotFoundException");
+ try
+ {
+ DllNotFoundException dnfe = new DllNotFoundException(errMessage);
+
+ if (dnfe == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ String errMessage = TestLibrary.Generator.GetString(-55, false, 1, 255);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Determine the error message is changed or not when the exception is thown out");
+ try
+ {
+
+ DllNotFoundException dnfe = new DllNotFoundException(errMessage);
+
+ if (dnfe == null)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ else
+ {
+ retVal = false;
+ throw dnfe;
+ }
+ }
+ catch (DllNotFoundException dE)
+ {
+ retVal = true;
+ if (!dE.Message.Equals(errMessage))
+ {
+ TestLibrary.TestFramework.LogError("004", "ExpectedValue(Message Not Be Changed) !=ActualValue(Message Be Changed)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ String errMessage = String.Empty;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Determine the method with Empty String");
+ try
+ {
+
+ DllNotFoundException dnfe = new DllNotFoundException(errMessage);
+
+ if (dnfe == null)
+ {
+ TestLibrary.TestFramework.LogError("006", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ else
+ {
+ retVal = false;
+ throw dnfe;
+ }
+ }
+ catch (DllNotFoundException dE)
+ {
+ retVal = true;
+ if (!dE.Message.Equals(errMessage))
+ {
+ TestLibrary.TestFramework.LogError("007", "ExpectedValue(Message Not Be Changed) !=ActualValue(Message Be Changed)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ String errMessage = TestLibrary.Generator.GetString(-55, false,256,512);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Determine the method with Long String");
+ try
+ {
+
+ DllNotFoundException dnfe = new DllNotFoundException(errMessage);
+
+ if (dnfe == null)
+ {
+ TestLibrary.TestFramework.LogError("009", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ else
+ {
+ retVal = false;
+ throw dnfe;
+ }
+ }
+ catch (DllNotFoundException dE)
+ {
+ retVal = true;
+ if (!dE.Message.Equals(errMessage))
+ {
+ TestLibrary.TestFramework.LogError("010", "ExpectedValue(Message Not Be Changed) !=ActualValue(Message Be Changed)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("011", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/dllnotfoundexception/dllnotfoundexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/dllnotfoundexception/dllnotfoundexceptionctor3.cs
new file mode 100644
index 0000000000..5fae346a36
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/dllnotfoundexception/dllnotfoundexceptionctor3.cs
@@ -0,0 +1,187 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+///<summary>
+///System.DllNotFoundException.Ctor(String,Exception)
+///</summary>
+
+public class DllNotFoundExceptionCtor
+{
+
+ public static int Main()
+ {
+ DllNotFoundExceptionCtor testObj = new DllNotFoundExceptionCtor();
+ TestLibrary.TestFramework.BeginTestCase("for constructor of System.DllNotFoundException");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+
+
+ #region Positive Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ String errMessage = TestLibrary.Generator.GetString(-55, false, 1, 255);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Create a instance of DllNotFoundException");
+ try
+ {
+ DllNotFoundException dnfe = new DllNotFoundException(errMessage, new Exception());
+
+ if (dnfe == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ String errMessage = TestLibrary.Generator.GetString(-55, false, 1, 255);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Determine the error message is changed or not when the exception is thown out");
+ try
+ {
+
+ DllNotFoundException dnfe = new DllNotFoundException(errMessage, new Exception());
+
+ if (dnfe == null)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ else
+ {
+ retVal = false;
+ throw dnfe;
+ }
+ }
+ catch (DllNotFoundException dE)
+ {
+ retVal = true;
+ if (!dE.Message.Equals(errMessage))
+ {
+ TestLibrary.TestFramework.LogError("004", "ExpectedValue(Message Not Be Changed) !=ActualValue(Message Be Changed)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ String errMessage = String.Empty;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Determine the method with Empty String");
+ try
+ {
+
+ DllNotFoundException dnfe = new DllNotFoundException(errMessage, new Exception());
+
+ if (dnfe == null)
+ {
+ TestLibrary.TestFramework.LogError("006", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ else
+ {
+ retVal = false;
+ throw dnfe;
+ }
+ }
+ catch (DllNotFoundException dE)
+ {
+ retVal = true;
+ if (!dE.Message.Equals(errMessage))
+ {
+ TestLibrary.TestFramework.LogError("007", "ExpectedValue(Message Not Be Changed) !=ActualValue(Message Be Changed)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ String errMessage = TestLibrary.Generator.GetString(-55, false, 256, 512);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Determine the method with Long String");
+ try
+ {
+
+ DllNotFoundException dnfe = new DllNotFoundException(errMessage, new Exception());
+
+ if (dnfe == null)
+ {
+ TestLibrary.TestFramework.LogError("009", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ else
+ {
+ retVal = false;
+ throw dnfe;
+ }
+ }
+ catch (DllNotFoundException dE)
+ {
+ retVal = true;
+ if (!dE.Message.Equals(errMessage))
+ {
+ TestLibrary.TestFramework.LogError("010", "ExpectedValue(Message Not Be Changed) !=ActualValue(Message Be Changed)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("011", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleCompareTo1.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleCompareTo1.csproj
new file mode 100644
index 0000000000..6015739d23
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleCompareTo1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doublecompareto1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleEpsilon.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleEpsilon.csproj
new file mode 100644
index 0000000000..118fdd485a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleEpsilon.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubleepsilon.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleEquals1.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleEquals1.csproj
new file mode 100644
index 0000000000..22d38ba6fd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleEquals1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubleequals1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleEquals2.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleEquals2.csproj
new file mode 100644
index 0000000000..f65b19d926
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleEquals2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubleequals2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleGetHashCode.csproj
new file mode 100644
index 0000000000..e4b60ff111
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doublegethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToBoolean.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToBoolean.csproj
new file mode 100644
index 0000000000..7257f73042
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToBoolean.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubleiconvertibletoboolean.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToByte.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToByte.csproj
new file mode 100644
index 0000000000..bdb53dda03
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubleiconvertibletobyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToDateTime.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToDateTime.csproj
new file mode 100644
index 0000000000..35b8ded0d2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToDateTime.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubleiconvertibletodatetime.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToDecimal.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToDecimal.csproj
new file mode 100644
index 0000000000..266227b260
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToDecimal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubleiconvertibletodecimal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToDouble.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToDouble.csproj
new file mode 100644
index 0000000000..3e9eee94df
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToDouble.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubleiconvertibletodouble.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToInt16.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToInt16.csproj
new file mode 100644
index 0000000000..23eecc8f62
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubleiconvertibletoint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToInt32.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToInt32.csproj
new file mode 100644
index 0000000000..b4a86a4f15
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubleiconvertibletoint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToInt64.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToInt64.csproj
new file mode 100644
index 0000000000..21c04324ac
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubleiconvertibletoint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToSByte.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToSByte.csproj
new file mode 100644
index 0000000000..5de336f3b6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToSByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubleiconvertibletosbyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToSingle.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToSingle.csproj
new file mode 100644
index 0000000000..6d42d1bc9a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleIConvertibleToSingle.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubleiconvertibletosingle.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleIsInfinity.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleIsInfinity.csproj
new file mode 100644
index 0000000000..05f8d4172f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleIsInfinity.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubleisinfinity.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleIsNaN.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleIsNaN.csproj
new file mode 100644
index 0000000000..772727a899
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleIsNaN.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubleisnan.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleIsNegativeInfinity.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleIsNegativeInfinity.csproj
new file mode 100644
index 0000000000..b7326f097c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleIsNegativeInfinity.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubleisnegativeinfinity.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleIsPositiveInfinity.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleIsPositiveInfinity.csproj
new file mode 100644
index 0000000000..7c0cf82bdf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleIsPositiveInfinity.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubleispositiveinfinity.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleMaxValue.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleMaxValue.csproj
new file mode 100644
index 0000000000..cabc41610b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleMaxValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doublemaxvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleMinValue.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleMinValue.csproj
new file mode 100644
index 0000000000..86dab4f8aa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleMinValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubleminvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleNaN.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleNaN.csproj
new file mode 100644
index 0000000000..9938e31a8f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleNaN.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doublenan.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleNegativeInfinity.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleNegativeInfinity.csproj
new file mode 100644
index 0000000000..f69575cb75
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleNegativeInfinity.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doublenegativeinfinity.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleParse3.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleParse3.csproj
new file mode 100644
index 0000000000..d7de6009d1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleParse3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubleparse3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoublePositiveInfinity.csproj b/tests/src/CoreMangLib/cti/system/double/DoublePositiveInfinity.csproj
new file mode 100644
index 0000000000..ceb1919398
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoublePositiveInfinity.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doublepositiveinfinity.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleToString1.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleToString1.csproj
new file mode 100644
index 0000000000..cac336e054
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleToString1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubletostring1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleToString2.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleToString2.csproj
new file mode 100644
index 0000000000..45274b11b9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleToString2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubletostring2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleToString3.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleToString3.csproj
new file mode 100644
index 0000000000..56ce35f388
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleToString3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubletostring3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleToString4.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleToString4.csproj
new file mode 100644
index 0000000000..3ebf1c58c6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleToString4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubletostring4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/DoubleTryParse.csproj b/tests/src/CoreMangLib/cti/system/double/DoubleTryParse.csproj
new file mode 100644
index 0000000000..f6e54a4513
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/DoubleTryParse.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="doubletryparse.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/double/doublecompareto1.cs b/tests/src/CoreMangLib/cti/system/double/doublecompareto1.cs
new file mode 100644
index 0000000000..dae337f5ad
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doublecompareto1.cs
@@ -0,0 +1,260 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// CompareTo(System.Double)
+/// </summary>
+public class DoubleCompareTo1
+{
+ public static int Main()
+ {
+ DoubleCompareTo1 test = new DoubleCompareTo1();
+ TestLibrary.TestFramework.BeginTestCase("DoubleCompareTo1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Ensure the return value of CompareTo(System.Double) is less than zero when the instance is less than System.Double.");
+
+ try
+ {
+ Random random = new Random(-55);
+ Double d1, d2;
+ do
+ {
+ d1 = random.NextDouble();
+ d2 = random.NextDouble();
+ }
+ while (d1 >= d2);
+ if (d1.CompareTo(d2) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The return value of CompareTo(System.Double) is not less than zero when the instance is less than System.Double!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Ensure the return value of CompareTo(System.Double) is less than zero when this instance is not a number (NaN) and System.Double is a number.");
+
+ try
+ {
+ Random random = new Random(-55);
+ Double randomDouble;
+ do
+ {
+ randomDouble = random.NextDouble();
+ }
+ while (Double.IsNaN(randomDouble) == true);
+
+ if (Double.NaN.CompareTo(randomDouble) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "The return value of CompareTo(System.Double) is not less than zero when this instance is not a number (NaN) and System.Double is a number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Ensure the return value of CompareTo(System.Double) equal to zero when this instance equals to System.Double.");
+
+ try
+ {
+ Random random = new Random(-55);
+ Double d1, d2;
+ d1 = random.NextDouble();
+ d2 = d1;
+
+ if (d1.CompareTo(d2) != 0)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "The return value of CompareTo(System.Double) does not equal to zero when this instance equals to System.Double!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Ensure the return value of CompareTo(System.Double) equal to zero when both this instance and value are NaN.");
+
+ try
+ {
+ Double d1 = 0.0;
+ long myl1 = 0;
+ myl1 = myl1 | 0x7ff0000000000001;
+ byte[] mybytes1 = { 0, 0, 0, 0, 0, 0, 0, 0 };
+ mybytes1 = BitConverter.GetBytes(myl1);
+ d1 = BitConverter.ToDouble(mybytes1, 0);
+
+ Double d2 = 0.0;
+ long myl2 = 0;
+ myl2 = myl2 | 0x7ff0000000000002;
+ byte[] mybytes2 = { 0, 0, 0, 0, 0, 0, 0, 0 };
+ mybytes2 = BitConverter.GetBytes(myl2);
+ d2 = BitConverter.ToDouble(mybytes2, 0);
+
+ if (d1.CompareTo(d2) != 0)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "The return value of CompareTo(System.Double) does not equal to zero when both this instance and value are NaN!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Ensure the return value of CompareTo(System.Double) equal to zero when both this instance and value are PositiveInfinity.");
+
+ try
+ {
+ Double zero = 0.0;
+
+ if ((1 / zero).CompareTo(2 / zero) != 0)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "The return value of CompareTo(System.Double) does not equal to zero when both this instance and value are PositiveInfinity!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Ensure the return value of CompareTo(System.Double) is greater than zero when the instance is greater than System.Double.");
+
+ try
+ {
+ Random random = new Random(-55);
+ Double d1, d2;
+ do
+ {
+ d1 = random.NextDouble();
+ d2 = random.NextDouble();
+ }
+ while (d1 <= d2);
+ if (d1.CompareTo(d2) <= 0)
+ {
+ TestLibrary.TestFramework.LogError("006.1", "The return value of CompareTo(System.Double) is not greater than zero when the instance is greater than System.Double!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Ensure the return value of CompareTo(System.Double) is greater than zero when this instance is a number and System.Double is not a number.");
+
+ try
+ {
+ Random random = new Random(-55);
+ Double randomDouble;
+ do
+ {
+ randomDouble = random.NextDouble();
+ }
+ while (Double.IsNaN(randomDouble) == true);
+
+ if (randomDouble.CompareTo(Double.NaN) <= 0)
+ {
+ TestLibrary.TestFramework.LogError("007.1", "The return value of CompareTo(System.Double) is not greater than zero when this instance is a number and System.Double is not a number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubleepsilon.cs b/tests/src/CoreMangLib/cti/system/double/doubleepsilon.cs
new file mode 100644
index 0000000000..9f29ccffed
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubleepsilon.cs
@@ -0,0 +1,63 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// Epsilon
+/// </summary>
+public class DoubleEpsilon
+{
+ public static int Main()
+ {
+ DoubleEpsilon test = new DoubleEpsilon();
+ TestLibrary.TestFramework.BeginTestCase("DoubleEpsilon");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Ensure Epsilon equals 4.94065645841247e-324");
+
+ try
+ {
+ if (Double.Epsilon.CompareTo(4.94065645841247e-324) != 0)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Epsilon does not equal 4.94065645841247e-324!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubleequals1.cs b/tests/src/CoreMangLib/cti/system/double/doubleequals1.cs
new file mode 100644
index 0000000000..39e8fdc8c8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubleequals1.cs
@@ -0,0 +1,108 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Equals(System.Double)
+/// </summary>
+
+public class DoubleEquals1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Double value equals with Equals(Double).");
+
+ try
+ {
+ Double d1 = new Random(-55).NextDouble();
+ Double d2 = d1;
+
+ if (!d1.Equals(d2))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method Double.Equals(Double) Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify Double value not equals with Equals(Double).");
+
+ try
+ {
+ Random random = new Random(-55);
+ Double d1,d2;
+ do
+ {
+ d1 = random.NextDouble();
+ d2 = random.NextDouble();
+ }
+ while (d1 == d2);
+
+ if (d1.Equals(d2))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method Double.Equals(Double) Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DoubleEquals1 test = new DoubleEquals1();
+
+ TestLibrary.TestFramework.BeginTestCase("DoubleEquals1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubleequals2.cs b/tests/src/CoreMangLib/cti/system/double/doubleequals2.cs
new file mode 100644
index 0000000000..81295be30f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubleequals2.cs
@@ -0,0 +1,109 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Equals(System.Object)
+/// </summary>
+
+public class DoubleEquals2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Double value equals with Equals(Object).");
+
+ try
+ {
+ Double d = new Random(-55).NextDouble();
+ Object obj = (Object)d;
+
+ if (!d.Equals(obj))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method Double.Equals(Object) Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify Double value not equals with Equals(Object).");
+
+ try
+ {
+ Random random = new Random(-55);
+ Double d1, d2;
+ do
+ {
+ d1 = random.NextDouble();
+ d2 = random.NextDouble();
+ }
+ while (d1 == d2);
+
+ Object obj = (Object)d2;
+
+ if (d1.Equals(obj))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method Double.Equals(Object) Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DoubleEquals2 test = new DoubleEquals2();
+
+ TestLibrary.TestFramework.BeginTestCase("DoubleEquals2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doublegethashcode.cs b/tests/src/CoreMangLib/cti/system/double/doublegethashcode.cs
new file mode 100644
index 0000000000..d06e2d139d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doublegethashcode.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// GetHashCode
+/// </summary>
+
+public class DoubleGetHashCode
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: check that if the return value is equal.");
+
+ try
+ {
+ Double i = TestLibrary.Generator.GetDouble(-55);
+ Double i1 = i;
+ Double i2 = i;
+
+ if (i1.GetHashCode() != i2.GetHashCode())
+ {
+ TestLibrary.TestFramework.LogError("001.1", "gethashcode is not equal : " + i1);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DoubleGetHashCode test = new DoubleGetHashCode();
+
+ TestLibrary.TestFramework.BeginTestCase("DoubleGetHashCode");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletoboolean.cs b/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletoboolean.cs
new file mode 100644
index 0000000000..9b824159e9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletoboolean.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class DoubleIConvertibleToBoolean
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: genarate a random Double to boolean");
+
+ try
+ {
+ Double i1 = 0;
+ while (i1 == 0)
+ {
+ i1 = TestLibrary.Generator.GetDouble(-55);
+ }
+
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToBoolean(null) != true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", String.Format("The Double {0} to boolean is not true as expected ", i1));
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Zero to boolean ");
+
+ try
+ {
+ Double i1 = 0;
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToBoolean(null) != false)
+ {
+ TestLibrary.TestFramework.LogError("002.1", String.Format("The Double {0} to boolean is not false as expected ", i1));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: convert negative number to boolean ");
+
+ try
+ {
+ Double i1 = 0;
+ while (i1 == 0)
+ {
+ i1 = TestLibrary.Generator.GetInt32(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(-i1);
+ if (Icon1.ToBoolean(null) != true)
+ {
+ TestLibrary.TestFramework.LogError("003.1", String.Format("The Double {0} to boolean is not true as expected ", i1));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DoubleIConvertibleToBoolean test = new DoubleIConvertibleToBoolean();
+
+ TestLibrary.TestFramework.BeginTestCase("DoubleIConvertibleToBoolean");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletobyte.cs b/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletobyte.cs
new file mode 100644
index 0000000000..5c4e03a73a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletobyte.cs
@@ -0,0 +1,255 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// DoubleIConvertibleToByte
+/// </summary>
+
+public class DoubleIConvertibleToByte
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random Double( <= 0.5 ) to byte");
+
+ try
+ {
+ Double i1;
+ do
+ i1 = (Double)TestLibrary.Generator.GetDouble(-55);
+ while (i1 > 0.5D);
+
+ IConvertible Icon1 = (IConvertible)i1;
+
+ if (Icon1.ToByte(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert a random Double( > 0.5 ) to byte");
+
+ try
+ {
+ Double i1;
+ do
+ i1 = (Double)TestLibrary.Generator.GetDouble(-55);
+ while (i1 <= 0.5D);
+
+ IConvertible Icon1 = (IConvertible)i1;
+
+ if (Icon1.ToByte(null) != 1)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert ByteMaxValue");
+
+ try
+ {
+ Double i1 = (Double)Byte.MaxValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToByte(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "The result is not the value as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert zero to byte ");
+
+ try
+ {
+ Double i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToByte(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "The result is not zero as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Convert a negative byte Double to Byte ");
+
+ try
+ {
+ Double i1 = 0;
+ while (i1 == 0)
+ i1 = (Double)TestLibrary.Generator.GetByte(-55);
+
+ IConvertible Icon1 = (IConvertible)(-i1);
+ Byte b1 = Icon1.ToByte(null);
+ TestLibrary.TestFramework.LogError("101.1", "An overflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (System.OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Convert Double to Byte ");
+
+ try
+ {
+ Int32 i1 = 0;
+ while (i1 <= 255)
+ i1 = (Int32)TestLibrary.Generator.GetInt32(-55);
+
+ IConvertible Icon1 = (IConvertible)((Double)i1);
+ Byte b1 = Icon1.ToByte(null);
+ TestLibrary.TestFramework.LogError("102.1", "An overflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (System.OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Check the border value ");
+
+ try
+ {
+ Double i1 = 256D;
+ IConvertible Icon1 = (IConvertible)(i1);
+ Byte b1 = Icon1.ToByte(null);
+ TestLibrary.TestFramework.LogError("103.1", "An overflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (System.OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DoubleIConvertibleToByte test = new DoubleIConvertibleToByte();
+
+ TestLibrary.TestFramework.BeginTestCase("DoubleIConvertibleToByte");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletodatetime.cs b/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletodatetime.cs
new file mode 100644
index 0000000000..1ae796faed
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletodatetime.cs
@@ -0,0 +1,70 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.IConvertible.ToDateTime(System.IFormatProvider)
+/// </summary>
+
+public class DoubleIConvertibleToDateTime
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ Double d = TestLibrary.Generator.GetDouble(-55);
+ DateTime v = (d as IConvertible).ToDateTime(null);
+ TestLibrary.TestFramework.LogError("001",
+ String.Format("expected a InvalidCastException on (d as IConvertible).ToDateTime(null)) but got {0}", v));
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ retVal = true;
+ return retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DoubleIConvertibleToDateTime test = new DoubleIConvertibleToDateTime();
+
+ TestLibrary.TestFramework.BeginTestCase("DoubleIConvertibleToDateTime");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletodecimal.cs b/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletodecimal.cs
new file mode 100644
index 0000000000..22157ec57a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletodecimal.cs
@@ -0,0 +1,168 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.IConvertible.ToDecimal(System.IFormatProvider)
+/// </summary>
+
+public class DoubleIConvertibleToDecimal
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a Double to Decimal.");
+
+ try
+ {
+ Double d = TestLibrary.Generator.GetDouble();
+ IConvertible i = (IConvertible)d;
+ Decimal dm = i.ToDecimal(null);
+
+ String dmString = dm.ToString();
+ //truncate one more precision digit to get rid off precision difference
+ dmString = dmString.Substring(0, dmString.Length - 1);
+
+ if (!d.ToString().Contains(dmString))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The result " + dmString + " is not correct as expected: " + d);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert zero to decimal");
+
+ try
+ {
+ Double d = 0;
+ IConvertible i = (IConvertible)d;
+ decimal dm = i.ToDecimal(null);
+ if (d.ToString() != dm.ToString())
+ {
+ TestLibrary.TestFramework.LogError("002.1", "The result is not correct as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Check OverflowException");
+
+ try
+ {
+ Double d = Double.MaxValue;
+ IConvertible i = (IConvertible)d;
+ decimal dm = i.ToDecimal(null);
+
+ TestLibrary.TestFramework.LogError("001.1", "The OverflowException is not thrown.");
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Check OverflowException");
+
+ try
+ {
+ Double d = Double.MinValue;
+ IConvertible i = (IConvertible)d;
+ decimal dm = i.ToDecimal(null);
+
+ TestLibrary.TestFramework.LogError("002.1", "The OverflowException is not thrown.");
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DoubleIConvertibleToDecimal test = new DoubleIConvertibleToDecimal();
+
+ TestLibrary.TestFramework.BeginTestCase("DoubleIConvertibleToDecimal");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletodouble.cs b/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletodouble.cs
new file mode 100644
index 0000000000..3b33c2dc47
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletodouble.cs
@@ -0,0 +1,188 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.IConvertible.ToDouble(System.IFormatProvider)
+/// </summary>
+
+public class DoubleIConvertibleToDouble
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Random double to double.");
+
+ try
+ {
+ Double d1 = TestLibrary.Generator.GetDouble(-55);
+ IConvertible i = d1 as IConvertible;
+ Double d2 = i.ToDouble(null);
+
+ if (d1 != d2)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The result is not correct as expected.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Zero to double.");
+
+ try
+ {
+ Double d1 = 0.00D;
+ IConvertible i = d1 as IConvertible;
+ Double d2 = i.ToDouble(null);
+
+ if (d1 != d2)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "The result is not correct as expected.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Double.MaxValue to double.");
+
+ try
+ {
+ Double d1 = Double.MaxValue;
+ IConvertible i = d1 as IConvertible;
+ Double d2 = i.ToDouble(null);
+
+ if (d1 != d2)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "The result is not correct as expected.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Random.MinValue to double.");
+
+ try
+ {
+ Double d1 = Double.MinValue;
+ IConvertible i = d1 as IConvertible;
+ Double d2 = i.ToDouble(null);
+
+ if (d1 != d2)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "The result is not correct as expected.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DoubleIConvertibleToDouble test = new DoubleIConvertibleToDouble();
+
+ TestLibrary.TestFramework.BeginTestCase("DoubleIConvertibleToDouble");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletoint16.cs b/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletoint16.cs
new file mode 100644
index 0000000000..3a1e5a2475
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletoint16.cs
@@ -0,0 +1,221 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.IConvertible.ToInt16(System.IFormatProvider)
+/// </summary>
+
+public class DoubleIConvertibleToInt16
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random Double( <= 0.5 ) to int16");
+
+ try
+ {
+ Double i1;
+ do
+ i1 = (Double)TestLibrary.Generator.GetDouble(-55);
+ while (i1 > 0.5D);
+
+ IConvertible Icon1 = (IConvertible)i1;
+
+ if (Icon1.ToInt16(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert a random Double( > 0.5 ) to int16");
+
+ try
+ {
+ Double i1;
+ do
+ i1 = (Double)TestLibrary.Generator.GetDouble(-55);
+ while (i1 <= 0.5D);
+
+ IConvertible Icon1 = (IConvertible)i1;
+
+ if (Icon1.ToInt16(null) != 1)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert zero to int16 ");
+
+ try
+ {
+ Double i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToInt16(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "The result is not zero as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert (double)int16.MaxValue to int16 ");
+
+ try
+ {
+ Double i1 = (Double)Int16.MaxValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToInt16(null) != Int16.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "The result is not expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Convert (double)int16.MinValue to int16 ");
+
+ try
+ {
+ Double i1 = (Double)Int16.MinValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToInt16(null) != Int16.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "The result is not expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DoubleIConvertibleToInt16 test = new DoubleIConvertibleToInt16();
+
+ TestLibrary.TestFramework.BeginTestCase("DoubleIConvertibleToInt16");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletoint32.cs b/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletoint32.cs
new file mode 100644
index 0000000000..60db60e3a1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletoint32.cs
@@ -0,0 +1,221 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.IConvertible.ToInt32(System.IFormatProvider)
+/// </summary>
+
+public class DoubleIConvertibleToInt32
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random Double( <= 0.5 ) to int32");
+
+ try
+ {
+ Double i1;
+ do
+ i1 = (Double)TestLibrary.Generator.GetDouble(-55);
+ while (i1 > 0.5D);
+
+ IConvertible Icon1 = (IConvertible)i1;
+
+ if (Icon1.ToInt32(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert a random Double( > 0.5 ) to int32");
+
+ try
+ {
+ Double i1;
+ do
+ i1 = (Double)TestLibrary.Generator.GetDouble(-55);
+ while (i1 <= 0.5D);
+
+ IConvertible Icon1 = (IConvertible)i1;
+
+ if (Icon1.ToInt32(null) != 1)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert zero to int32 ");
+
+ try
+ {
+ Double i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToInt32(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "The result is not zero as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert (double)int32.MaxValue to int32 ");
+
+ try
+ {
+ Double i1 = (Double)Int32.MaxValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToInt32(null) != Int32.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "The result is not expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Convert (double)int32.MinValue to int32 ");
+
+ try
+ {
+ Double i1 = (Double)Int32.MinValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToInt32(null) != Int32.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "The result is not expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DoubleIConvertibleToInt32 test = new DoubleIConvertibleToInt32();
+
+ TestLibrary.TestFramework.BeginTestCase("DoubleIConvertibleToInt32");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletoint64.cs b/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletoint64.cs
new file mode 100644
index 0000000000..04668fe873
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletoint64.cs
@@ -0,0 +1,162 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.IConvertible.ToInt64(System.IFormatProvider)
+/// </summary>
+
+public class DoubleIConvertibleToInt64
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random Double( <= 0.5 ) to int64");
+
+ try
+ {
+ Double i1;
+ do
+ i1 = (Double)TestLibrary.Generator.GetDouble(-55);
+ while (i1 > 0.5D);
+
+ IConvertible Icon1 = (IConvertible)i1;
+
+ if (Icon1.ToInt64(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert a random Double( > 0.5 ) to int64");
+
+ try
+ {
+ Double i1;
+ do
+ i1 = (Double)TestLibrary.Generator.GetDouble(-55);
+ while (i1 <= 0.5D);
+
+ IConvertible Icon1 = (IConvertible)i1;
+
+ if (Icon1.ToInt64(null) != 1)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert zero to int64 ");
+
+ try
+ {
+ Double i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToInt64(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "The result is not zero as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DoubleIConvertibleToInt64 test = new DoubleIConvertibleToInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("DoubleIConvertibleToInt64");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletosbyte.cs b/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletosbyte.cs
new file mode 100644
index 0000000000..b3352d5f9d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletosbyte.cs
@@ -0,0 +1,221 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.IConvertible.ToSByte(System.IFormatProvider)
+/// </summary>
+
+public class DoubleIConvertibleToSByte
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random Double( <= 0.5 ) to sbyte");
+
+ try
+ {
+ Double i1;
+ do
+ i1 = (Double)TestLibrary.Generator.GetDouble(-55);
+ while (i1 > 0.5D);
+
+ IConvertible Icon1 = (IConvertible)i1;
+
+ if (Icon1.ToSByte(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert a random Double( > 0.5 ) to sbyte");
+
+ try
+ {
+ Double i1;
+ do
+ i1 = (Double)TestLibrary.Generator.GetDouble(-55);
+ while (i1 <= 0.5D);
+
+ IConvertible Icon1 = (IConvertible)i1;
+
+ if (Icon1.ToSByte(null) != 1)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert zero to sbyte ");
+
+ try
+ {
+ Double i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToSByte(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "The result is not zero as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert (double)SByte.MaxValue to sbyte.");
+
+ try
+ {
+ Double i1 = (Double)SByte.MaxValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToSByte(null) != SByte.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "The result is not expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Convert (double)SByte.MinValue to sbyte.");
+
+ try
+ {
+ Double i1 = (Double)SByte.MinValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToSByte(null) != SByte.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "The result is not expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DoubleIConvertibleToSByte test = new DoubleIConvertibleToSByte();
+
+ TestLibrary.TestFramework.BeginTestCase("DoubleIConvertibleToSByte");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletosingle.cs b/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletosingle.cs
new file mode 100644
index 0000000000..ba83d7b2ed
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletosingle.cs
@@ -0,0 +1,219 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.IConvertible.ToSingle(System.IFormatProvider)
+/// </summary>
+
+public class DoubleIConvertibleToSingle
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random positive Double to single");
+
+ try
+ {
+
+ Single s = TestLibrary.Generator.GetSingle(-55);
+ Double i1 = (Double)s;
+
+ IConvertible Icon1 = (IConvertible)i1;
+
+ if (Icon1.ToSingle(null) != s)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert a random negtive Double to single");
+
+ try
+ {
+
+ Single s = -TestLibrary.Generator.GetSingle(-55);
+ Double i1 = (Double)s;
+
+ IConvertible Icon1 = (IConvertible)i1;
+
+ if (Icon1.ToSingle(null) != s)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert zero to single ");
+
+ try
+ {
+ Double i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToSingle(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "The result is not zero as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert (double)Single.MaxValue to single.");
+
+ try
+ {
+ Double i1 = (Double)Single.MaxValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToSingle(null) != Single.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "The result is not expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Convert (double)Single.MinValue to single.");
+
+ try
+ {
+ Double i1 = (Double)Single.MinValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToSingle(null) != Single.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "The result is not expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DoubleIConvertibleToSingle test = new DoubleIConvertibleToSingle();
+
+ TestLibrary.TestFramework.BeginTestCase("DoubleIConvertibleToSingle");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubleisinfinity.cs b/tests/src/CoreMangLib/cti/system/double/doubleisinfinity.cs
new file mode 100644
index 0000000000..7648b55a34
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubleisinfinity.cs
@@ -0,0 +1,186 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// IsInfinity(System.Double)
+/// </summary>
+
+public class DoubleIsInfinity
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify IsInfinity when value is PositiveInfinity.");
+
+ try
+ {
+ Double d;
+ do
+ d = TestLibrary.Generator.GetDouble(-55);
+ while (d == 0);
+
+ if (true != Double.IsInfinity(d / 0))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "IsInfinity Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify IsInfinity when value is NegativeInfinity.");
+
+ try
+ {
+ Double d;
+ do
+ d = -TestLibrary.Generator.GetDouble(-55);
+ while (d == 0);
+
+ if (true != Double.IsInfinity(d / 0))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "IsInfinity Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify IsInfinity when d is zero.");
+
+ try
+ {
+ Double d = 0.00D;
+
+ if (false != Double.IsInfinity(d / 0))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "IsInfinity Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify IsInfinity when d is a const.");
+
+ try
+ {
+ Double d = -TestLibrary.Generator.GetDouble(-55);
+
+ if (false != Double.IsInfinity(d))
+ {
+ TestLibrary.TestFramework.LogError("004.1", "IsInfinity Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DoubleIsInfinity test = new DoubleIsInfinity();
+
+ TestLibrary.TestFramework.BeginTestCase("DoubleIsInfinity");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubleisnan.cs b/tests/src/CoreMangLib/cti/system/double/doubleisnan.cs
new file mode 100644
index 0000000000..2287a88bc9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubleisnan.cs
@@ -0,0 +1,130 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// IsNaN(System.Double)
+/// </summary>
+
+public class DoubleIsNaN
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Double.IsNaN true.");
+
+ try
+ {
+ Double zero = 0.00D;
+
+ if (Double.IsNaN(0 / zero) == false)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Double.IsNaN Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify Double.IsNaN false.");
+
+ try
+ {
+ Double d1,d2;
+ do
+ {
+ d1 = TestLibrary.Generator.GetDouble(-55);
+ d2 = TestLibrary.Generator.GetDouble(-55);
+ }
+ while (d1 * d2 == 0);
+
+ if (Double.IsNaN(d1 / d2) == true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Double.IsNaN Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DoubleIsNaN test = new DoubleIsNaN();
+
+ TestLibrary.TestFramework.BeginTestCase("DoubleIsNaN");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubleisnegativeinfinity.cs b/tests/src/CoreMangLib/cti/system/double/doubleisnegativeinfinity.cs
new file mode 100644
index 0000000000..da1a8302fb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubleisnegativeinfinity.cs
@@ -0,0 +1,162 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// IsNegativeInfinity(System.Double)
+/// </summary>
+
+public class DoubleIsNegativeInfinity
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest2() && retVal;
+
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Method IsNegativeInfinity when Double is Negative value.");
+
+ try
+ {
+ Double d;
+ do
+ d = -TestLibrary.Generator.GetDouble(-55);
+ while (d == 0);
+
+ if (!Double.IsNegativeInfinity(d / 0))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method IsNegativeInfinity(System.Double) Err.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Method IsNegativeInfinity when Double is Positive value.");
+
+ try
+ {
+ Double d;
+ do
+ d = TestLibrary.Generator.GetDouble(-55);
+ while (d == 0);
+
+ if (Double.IsNegativeInfinity(d / 0))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method IsNegativeInfinity(System.Double) Err.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Method IsNegativeInfinity when Double is zero value.");
+
+ try
+ {
+ Double d = 0.00D;
+
+ if (Double.IsNegativeInfinity(d / 0))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method IsNegativeInfinity(System.Double) Err.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DoubleIsNegativeInfinity test = new DoubleIsNegativeInfinity();
+
+ TestLibrary.TestFramework.BeginTestCase("DoubleIsNegativeInfinity");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubleispositiveinfinity.cs b/tests/src/CoreMangLib/cti/system/double/doubleispositiveinfinity.cs
new file mode 100644
index 0000000000..80cdd6783d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubleispositiveinfinity.cs
@@ -0,0 +1,161 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// IsPositiveInfinity(System.Double)
+/// </summary>
+
+public class DoubleIsPositiveInfinity
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Method IsPositiveInfinity when Double is Positive value.");
+
+ try
+ {
+ Double d;
+ do
+ d = TestLibrary.Generator.GetDouble(-55);
+ while (d == 0);
+
+ if (!Double.IsPositiveInfinity(d / 0))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method IsPositiveInfinity(System.Double) Err.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Method IsPositiveInfinity when Double is Negative value.");
+
+ try
+ {
+ Double d;
+ do
+ d = -TestLibrary.Generator.GetDouble(-55);
+ while (d == 0);
+
+ if (Double.IsPositiveInfinity(d / 0))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method IsPositiveInfinity(System.Double) Err.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Method IsPositiveInfinity when Double is zero value.");
+
+ try
+ {
+ Double d = 0.00D;
+
+ if (Double.IsPositiveInfinity(d / 0))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method IsPositiveInfinity(System.Double) Err.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DoubleIsPositiveInfinity test = new DoubleIsPositiveInfinity();
+
+ TestLibrary.TestFramework.BeginTestCase("DoubleIsPositiveInfinity");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doublemaxvalue.cs b/tests/src/CoreMangLib/cti/system/double/doublemaxvalue.cs
new file mode 100644
index 0000000000..b0a4a9db66
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doublemaxvalue.cs
@@ -0,0 +1,63 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// MaxValue
+/// </summary>
+public class DoubleMaxValue
+{
+ public static int Main()
+ {
+ DoubleMaxValue test = new DoubleMaxValue();
+ TestLibrary.TestFramework.BeginTestCase("DoubleMaxValue");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Ensure MaxValue equals +1.79769313486232e308");
+
+ try
+ {
+ if (Double.MaxValue.CompareTo(+1.7976931348623157E+308) != 0)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "MaxValue does not equal +1.79769313486232e308!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubleminvalue.cs b/tests/src/CoreMangLib/cti/system/double/doubleminvalue.cs
new file mode 100644
index 0000000000..b012bffb33
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubleminvalue.cs
@@ -0,0 +1,66 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+// v-jinfw
+// Does not build
+
+using System;
+using System.Collections;
+
+/// <summary>
+/// MinValue
+/// </summary>
+public class DoubleMinValue
+{
+ public static int Main()
+ {
+ DoubleMinValue test = new DoubleMinValue();
+ TestLibrary.TestFramework.BeginTestCase("DoubleMinValue");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Ensure MinValue equals -1.79769313486232e308");
+
+ try
+ {
+ if (Double.MinValue.CompareTo(-1.7976931348623157E+308) != 0)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "MinValue does not equal -1.79769313486232e308!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doublenan.cs b/tests/src/CoreMangLib/cti/system/double/doublenan.cs
new file mode 100644
index 0000000000..907b82cafd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doublenan.cs
@@ -0,0 +1,63 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// NaN
+/// </summary>
+public class DoubleNaN
+{
+ public static int Main()
+ {
+ DoubleNaN test = new DoubleNaN();
+ TestLibrary.TestFramework.BeginTestCase("DoubleNaN");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Ensure NaN is not a number");
+
+ try
+ {
+ if (Double.IsNaN(Double.NaN) != true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "NaN is a number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doublenegativeinfinity.cs b/tests/src/CoreMangLib/cti/system/double/doublenegativeinfinity.cs
new file mode 100644
index 0000000000..89a65dd155
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doublenegativeinfinity.cs
@@ -0,0 +1,88 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// NegativeInfinity
+/// </summary>
+public class DoubleNegativeInfinity
+{
+ public static int Main()
+ {
+ DoubleNegativeInfinity test = new DoubleNegativeInfinity();
+ TestLibrary.TestFramework.BeginTestCase("DoubleNegativeInfinity");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Ensure NegativeInfinity is negative infinity.");
+
+ try
+ {
+ if (Double.IsNegativeInfinity(Double.NegativeInfinity) != true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "NegativeInfinity is not negative infinity!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Ensure NegativeInfinity is negative infinity after adding with a double value.");
+
+ Double randomDouble = new Random(-55).NextDouble();
+ try
+ {
+ if (Double.IsNegativeInfinity(Double.NegativeInfinity + randomDouble) != true)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "NegativeInfinity is not negative infinity after adding with a double value!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubleparse3.cs b/tests/src/CoreMangLib/cti/system/double/doubleparse3.cs
new file mode 100644
index 0000000000..97eecb82d2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubleparse3.cs
@@ -0,0 +1,612 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+using System.Globalization;
+
+/// <summary>
+/// Parse(System.String,System.Globalization.NumberStyles,System.IFormatProvider)
+/// </summary>
+
+public class DoubleParse3
+{
+ private static NumberFormatInfo nfi;
+ private static string currencySymbol;
+
+ public static void InitializeIFormatProvider()
+ {
+ nfi = new CultureInfo("en-US").NumberFormat;
+ currencySymbol = nfi.CurrencySymbol;
+ }
+
+ public static int Main()
+ {
+ InitializeIFormatProvider();
+
+ DoubleParse3 test = new DoubleParse3();
+
+ TestLibrary.TestFramework.BeginTestCase("DoubleParse3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+ retVal = PosTest12() && retVal;
+ retVal = PosTest13() && retVal;
+ retVal = PosTest14() && retVal;
+ retVal = PosTest15() && retVal;
+ retVal = PosTest16() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Ensure the result is correct when NumberStyles is set to AllowCurrencySymbol.");
+
+ try
+ {
+ Double d = Double.Parse("123" + currencySymbol, NumberStyles.AllowCurrencySymbol, nfi);
+ if (d.CompareTo(123.0) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "The result is not correct when NumberStyles is set to AllowCurrencySymbol!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Ensure the result is correct when NumberStyles is set to AllowDecimalPoint.");
+
+ try
+ {
+ Double d = Double.Parse("123.1", NumberStyles.AllowDecimalPoint, nfi);
+ if (d.CompareTo(123.1) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P02.1", "The result is not correct when NumberStyles is set to AllowDecimalPoint!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P02.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Ensure the result is correct when NumberStyles is set to AllowExponent.");
+
+ try
+ {
+ Double d = Double.Parse("123E2", NumberStyles.AllowExponent, nfi);
+ if (d.CompareTo(12300.0) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P03.1", "The result is not correct when NumberStyles is set to AllowExponent!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P03.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Ensure the result is correct when NumberStyles is set to AllowLeadingSign.");
+
+ try
+ {
+ Double d = Double.Parse("-12345", NumberStyles.AllowLeadingSign, nfi);
+ if (d.CompareTo(-12345.0) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P04.1", "The result is not correct when NumberStyles is set to AllowLeadingSign!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P04.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Ensure the result is correct when NumberStyles is set to AllowLeadingWhite.");
+
+ try
+ {
+ Double d = Double.Parse(" 1234", NumberStyles.AllowLeadingWhite, nfi);
+ if (d.CompareTo(1234.0) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P05.1", "The result is not correct when NumberStyles is set to AllowLeadingWhite!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P05.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Ensure the result is correct when NumberStyles is set to AllowParentheses.");
+
+ try
+ {
+ Double d = Double.Parse("(456)", NumberStyles.AllowParentheses, nfi);
+ if (d.CompareTo(-456.0) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P06.1", "The result is not correct when NumberStyles is set to AllowParentheses!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P06.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Ensure the result is correct when NumberStyles is set to AllowThousands.");
+
+ try
+ {
+ Double d = Double.Parse("123,456", NumberStyles.AllowThousands, nfi);
+ if (d.CompareTo(123456.0) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P07.1", "The result is not correct when NumberStyles is set to AllowThousands!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P07.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest8: Ensure the result is correct when NumberStyles is set to AllowTrailingSign.");
+
+ try
+ {
+ Double d = Double.Parse("123-", NumberStyles.AllowTrailingSign, nfi);
+ if (d.CompareTo(-123.0) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P08.1", "The result is not correct when NumberStyles is set to AllowTrailingSign!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P08.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest9: Ensure the result is correct when NumberStyles is set to AllowTrailingWhite.");
+
+ try
+ {
+ Double d = Double.Parse("123 ", NumberStyles.AllowTrailingWhite, nfi);
+ if (d.CompareTo(123.0) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P09.1", "The result is not correct when NumberStyles is set to AllowTrailingWhite!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P09.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest10()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest10: Ensure the result is correct when NumberStyles is set to Any.");
+
+ try
+ {
+ Double d = Double.Parse("-123E2 " + currencySymbol, NumberStyles.Any, nfi);
+ if (d.CompareTo(-12300.0) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P10.1", "The result is not correct when NumberStyles is set to Any!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P10.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest11()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest11: Ensure the result is correct when NumberStyles is set to Currency.");
+
+ try
+ {
+ Double d = Double.Parse("-123 " + currencySymbol, NumberStyles.Currency, nfi);
+ if (d.CompareTo(-123.0) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P11.1", "The result is not correct when NumberStyles is set to Currency!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P11.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest12()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest12: Ensure the result is correct when NumberStyles is set to Float.");
+
+ try
+ {
+ Double d = Double.Parse(" -123.4 ", NumberStyles.Float, nfi);
+ if (d.CompareTo(-123.4) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P12.1", "The result is not correct when NumberStyles is set to Float!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P12.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest13()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest13: Ensure the result is correct when NumberStyles is set to Integer.");
+
+ try
+ {
+ Double d = Double.Parse(" -123 ", NumberStyles.Integer, nfi);
+ if (d.CompareTo(-123.0) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P13.1", "The result is not correct when NumberStyles is set to Integer!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P13.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest14()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest14: Ensure the result is correct when NumberStyles is set to None.");
+
+ try
+ {
+ Double d = Double.Parse("123", NumberStyles.None, nfi);
+ if (d.CompareTo(123.0) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P14.1", "The result is not correct when NumberStyles is set to None!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P14.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest15()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest15: Ensure the result is correct when NumberStyles is set to Number.");
+
+ try
+ {
+ Double d = Double.Parse(" 4,123.1- ", NumberStyles.Number, nfi);
+ if (d.CompareTo(-4123.1) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P15.1", "The result is not correct when NumberStyles is set to Number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P15.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest16()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest16: Ensure the result is correct when NumberStyles is set to None but System.String has currency symbol.");
+
+ try
+ {
+ Double d = Double.Parse("123$", NumberStyles.None, nfi);
+ TestLibrary.TestFramework.LogError("P16.1", "The result is not correct when NumberStyles is set to None but System.String has currency symbol!");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P16.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException should be thrown when System.String is a null reference.");
+
+ try
+ {
+ Double d = Double.Parse(null, NumberStyles.Any, nfi);
+ TestLibrary.TestFramework.LogError("N01.1", "ArgumentNullException is not thrown when System.String is a null reference!");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: FormatException should be thrown when System.String is not a number in a valid format.");
+
+ try
+ {
+ Double d = Double.Parse("123,456.5.66", NumberStyles.None, nfi);
+ TestLibrary.TestFramework.LogError("N02.1", "FormatException is not thrown when System.String is not a number in a valid format!");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N02.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: OverflowException should be thrown when System.String represents a number greater than MaxValue.");
+
+ try
+ {
+ Double d = Double.Parse("1.79769313486233e308", NumberStyles.Float, nfi);
+ TestLibrary.TestFramework.LogError("N03.1", "OverflowException is not thrown when System.String represents a number greater than MaxValue!");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N03.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: ArgumentException should be thrown when NumberStyles contains AllowHexSpecifier value.");
+
+ try
+ {
+ Double d = Double.Parse("108", NumberStyles.HexNumber, nfi);
+ TestLibrary.TestFramework.LogError("N04.1", "ArgumentException is not thrown when NumberStyles contains AllowHexSpecifier value!");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N04.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest5: ArgumentException should be thrown when NumberStyles is the AllowHexSpecifier value.");
+
+ try
+ {
+ Double d = Double.Parse("108", NumberStyles.AllowHexSpecifier, nfi);
+ TestLibrary.TestFramework.LogError("N05.1", "ArgumentException is not thrown when NumberStyles is the AllowHexSpecifier value!");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N05.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest6: ArgumentException should be thrown when NumberStyles is not a NumberStyles value.");
+
+ try
+ {
+ Double d = Double.Parse("123", (NumberStyles)5000, nfi);
+ TestLibrary.TestFramework.LogError("N06.1", "ArgumentException is not thrown when NumberStyles is not a NumberStyles value!");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N06.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doublepositiveinfinity.cs b/tests/src/CoreMangLib/cti/system/double/doublepositiveinfinity.cs
new file mode 100644
index 0000000000..0d5aba30d1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doublepositiveinfinity.cs
@@ -0,0 +1,88 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// PositiveInfinity
+/// </summary>
+public class DoublePositiveInfinity
+{
+ public static int Main()
+ {
+ DoublePositiveInfinity test = new DoublePositiveInfinity();
+ TestLibrary.TestFramework.BeginTestCase("DoublePositiveInfinity");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Ensure PositiveInfinity is positive infinity.");
+
+ try
+ {
+ if (Double.IsPositiveInfinity(Double.PositiveInfinity) != true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "PositiveInfinity is not positive infinity!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Ensure PositiveInfinity is positive infinity after adding with a double value.");
+
+ Double randomDouble = new Random(-55).NextDouble();
+ try
+ {
+ if (Double.IsPositiveInfinity(Double.PositiveInfinity + randomDouble) != true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "PositiveInfinity is not positive infinity after adding with a double value!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubletostring1.cs b/tests/src/CoreMangLib/cti/system/double/doubletostring1.cs
new file mode 100644
index 0000000000..31eed60ed0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubletostring1.cs
@@ -0,0 +1,93 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// ToString()
+/// </summary>
+
+public class DoubleToString1
+{
+ public static int Main()
+ {
+ DoubleToString1 test = new DoubleToString1();
+
+ TestLibrary.TestFramework.BeginTestCase("DoubleToString1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ TestLibrary.Utilities.CurrentCulture = CustomCulture;
+
+ retVal &= VerifyToString("PostTest0", Double.NaN, "NaN");
+ retVal &= VerifyToString("PosTest1", 0.123456789123456789123D, "0,123456789123457");
+ retVal &= VerifyToString("PosTest2", 0.123456789123459789123D, "0,12345678912346");
+ retVal &= VerifyToString("PosTest3", 0.123456789123000009123D, "0,123456789123");
+
+ TestLibrary.Utilities.CurrentCulture = CurrentCulture;
+
+ return retVal;
+ }
+
+ private CultureInfo CurrentCulture = TestLibrary.Utilities.CurrentCulture;
+ private CultureInfo customCulture = null;
+
+ private CultureInfo CustomCulture
+ {
+ get
+ {
+ if (null == customCulture)
+ {
+ customCulture = new CultureInfo(CultureInfo.CurrentCulture.Name);
+ NumberFormatInfo nfi = customCulture.NumberFormat;
+
+ //For "G"
+ // NegativeSign, NumberDecimalSeparator, NumberDecimalDigits, PositiveSign
+ nfi.NumberDecimalDigits = 3; //Default: 2
+ nfi.PositiveSign = "++"; //Default: "+"
+ nfi.NegativeSign = "@"; //Default: "-"
+ nfi.NumberDecimalSeparator = ","; //Default: "."
+ nfi.NaNSymbol = "NaN";
+
+ customCulture.NumberFormat = nfi;
+ }
+ return customCulture;
+ }
+ }
+
+ private bool VerifyToString(String id, Double myDouble, String expected)
+ {
+ try
+ {
+ String actual = myDouble.ToString();
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError(id + "_001", "Expected: " + expected + " Actual: " + actual);
+ return false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(id + "_002", "Unexpected exception occurs: " + e);
+ return false;
+ }
+ return true;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubletostring2.cs b/tests/src/CoreMangLib/cti/system/double/doubletostring2.cs
new file mode 100644
index 0000000000..ba8f3c6ef9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubletostring2.cs
@@ -0,0 +1,160 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// ToString(System.IFormatProvider)
+/// </summary>
+
+public class DoubleToString1
+{
+ private static NumberFormatInfo nfi;
+
+ public static void InitializeIFormatProvider()
+ {
+ nfi = new CultureInfo("en-US").NumberFormat;
+ //For "G"
+ // NegativeSign, NumberDecimalSeparator, NumberDecimalDigits, PositiveSign
+ nfi.NumberDecimalDigits = 2; //Default: 2
+ nfi.PositiveSign = "+"; //Default: "+"
+ nfi.NegativeSign = "-"; //Default: "-"
+ nfi.NumberDecimalSeparator = "."; //Default: "."
+ nfi.NaNSymbol = "NaN";
+ }
+
+ public static int Main()
+ {
+ InitializeIFormatProvider();
+ DoubleToString1 test = new DoubleToString1();
+
+ TestLibrary.TestFramework.BeginTestCase("DoubleToString1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Ensure the String decimal part will be rounded to 15 digits when the Double decimal part is longer than 15.");
+
+ try
+ {
+ Double d1 = 0.123456789123456789123D;
+ String s1 = d1.ToString(nfi);
+ if (s1 != "0.123456789123457")
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "The String decimal part is not rounded to 15 digits when the Double decimal part is longer than 15!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Ensure the suffix zero will be discarded in String after Double decimal part is rounded (become zero after carry).");
+
+ try
+ {
+ Double d1 = 0.123456789123459789123D;
+ String s1 = d1.ToString(nfi);
+ if (s1 != "0.12345678912346")
+ {
+ TestLibrary.TestFramework.LogError("P02.1", "The suffix zero is not discarded in String after Double decimal part is rounded (become zero after carry)!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P02.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Ensure the suffix zero will be discarded in String after Double decimal part is rounded (original zero).");
+
+ try
+ {
+ Double d1 = 0.123456789123000009123D;
+ String s1 = d1.ToString(nfi);
+ if (s1 != "0.123456789123")
+ {
+ TestLibrary.TestFramework.LogError("P03.1", "The suffix zero is not discarded in String after Double decimal part is rounded (original zero)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P03.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Ensure the result will be correct when Double is NaN.");
+
+ try
+ {
+ Double d1 = Double.NaN;
+ String s1 = d1.ToString(nfi);
+ if (s1 != "NaN")
+ {
+ TestLibrary.TestFramework.LogError("P04.1", "The result is not correct when Double is NaN!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P04.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubletostring3.cs b/tests/src/CoreMangLib/cti/system/double/doubletostring3.cs
new file mode 100644
index 0000000000..f62253a0ff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubletostring3.cs
@@ -0,0 +1,141 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using TestLibrary;
+
+/// <summary>
+/// ToString(System.String)
+/// </summary>
+
+public class DoubleToString3
+{
+ public static int Main()
+ {
+ DoubleToString3 test = new DoubleToString3();
+
+ TestLibrary.TestFramework.BeginTestCase("DoubleToString3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ private CultureInfo CurrentCulture = TestLibrary.Utilities.CurrentCulture;
+ private CultureInfo customCulture = null;
+
+ private CultureInfo CustomCulture
+ {
+ get
+ {
+ if (null == customCulture)
+ {
+ customCulture = new CultureInfo(CultureInfo.CurrentCulture.Name);
+ NumberFormatInfo nfi = customCulture.NumberFormat;
+
+ //For "E"
+ // PositiveSign, NegativeSign, and NumberDecimalSeparator.
+ // If precision specifier is omitted, a default of six digits after the decimal point is used.
+ nfi.PositiveSign = "++"; //Default: "+"
+ nfi.NegativeSign = "@"; //Default: "-"
+ nfi.NumberDecimalSeparator = ","; //Default: "."
+
+ //For "G"
+ // NegativeSign, NumberDecimalSeparator, NumberDecimalDigits, PositiveSign
+ nfi.NumberDecimalDigits = 3; //Default: 2
+ nfi.NaNSymbol = "NaN";
+
+ //For "R"
+ // NegativeSign, NumberDecimalSeparator and PositiveSign
+
+ customCulture.NumberFormat = nfi;
+ }
+ return customCulture;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ TestLibrary.Utilities.CurrentCulture = CustomCulture;
+ retVal &= VerifyToString("PostTestG1", Double.NaN, "G", "NaN");
+ retVal &= VerifyToString("PostTestG2", 0.123456789123456789123D, "G", "0,123456789123457");
+ retVal &= VerifyToString("PostTestG3", 0.123456789123459789D, "G", "0,12345678912346");
+ retVal &= VerifyToString("PostTestG4", 0.123456789123000009123D, "G", "0,123456789123");
+
+ retVal &= VerifyToString("PostTestR1", Double.NaN, "R", "NaN");
+ retVal &= VerifyToString("PostTestR2", 0.123456789123456789123D, "R", TestLibrary.Utilities.IsWindows ? "0,12345678912345678" : "0,123456789123457");
+ retVal &= VerifyToString("PostTestR3", 0.123456789123459789D, "R", TestLibrary.Utilities.IsWindows ? "0,1234567891234598" : "0,12345678912346");
+ retVal &= VerifyToString("PostTestR4", 0.123456789123000009123D, "R", TestLibrary.Utilities.IsWindows ? "0,12345678912300001" : "0,123456789123");
+
+ retVal &= VerifyToString("PostTestE1", Double.NaN, "E", "NaN");
+ retVal &= VerifyToString("PostTestE2", 0.123456789123456789123D, "E", TestLibrary.Utilities.IsWindows ? "1,234568E@001" : "1,234568E@1");
+ retVal &= VerifyToString("PostTestE3", 0.123456789123459789D, "E", TestLibrary.Utilities.IsWindows ? "1,234568E@001" : "1,234568E@1");
+ retVal &= VerifyToString("PostTestE4", 0.123456789123000009123D, "E", TestLibrary.Utilities.IsWindows ? "1,234568E@001" : "1,234568E@1");
+
+ TestLibrary.Utilities.CurrentCulture = CurrentCulture;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal &= NegTest1();
+
+ return retVal;
+ }
+
+ private bool VerifyToString(String id, Double myDouble, String format, String expected)
+ {
+ try
+ {
+ String actual = myDouble.ToString(format);
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError(id + "_001", "Expected: " + expected + " Actual: " + actual);
+ return false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(id + "_002", "Unexpected exception occurs: " + e);
+ return false;
+ }
+ return true;
+ }
+
+ private bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: FormatException should be thrown when the format string is invalid.");
+
+ try
+ {
+ Double d1 = 0.123456009123000009123D;
+ String s1 = d1.ToString("H");
+ TestLibrary.TestFramework.LogError("N01.1", "FormatException is not thrown when the format string is invalid!");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubletostring4.cs b/tests/src/CoreMangLib/cti/system/double/doubletostring4.cs
new file mode 100644
index 0000000000..b32f3273d5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubletostring4.cs
@@ -0,0 +1,135 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using TestLibrary;
+
+/// <summary>
+/// ToString(System.String,System.IFormatProvider)
+/// </summary>
+
+public class DoubleToString3
+{
+ private static CultureInfo ci = new CultureInfo("en-US");
+ private static NumberFormatInfo nfi = ci.NumberFormat;
+
+ public static int Main()
+ {
+ DoubleToString3 test = new DoubleToString3();
+
+ TestLibrary.TestFramework.BeginTestCase("DoubleToString3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ private NumberFormatInfo customNFI = null;
+
+ private NumberFormatInfo CustomNFI
+ {
+ get
+ {
+ if (null == customNFI)
+ {
+ customNFI = new CultureInfo(CultureInfo.CurrentCulture.Name).NumberFormat;
+ //For "E"
+ // PositiveSign, NegativeSign, and NumberDecimalSeparator.
+ // If precision specifier is omitted, a default of six digits after the decimal point is used.
+ customNFI.PositiveSign = "++"; //Default: "+"
+ customNFI.NegativeSign = "@"; //Default: "-"
+ customNFI.NumberDecimalSeparator = ","; //Default: "."
+
+ //For "G"
+ // NegativeSign, NumberDecimalSeparator, NumberDecimalDigits, PositiveSign
+ customNFI.NumberDecimalDigits = 3; //Default: 2
+ customNFI.NaNSymbol = "NaN";
+
+ //For "R"
+ // NegativeSign, NumberDecimalSeparator and PositiveSign
+ }
+ return customNFI;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal &= VerifyToString("PostTestG1", Double.NaN, "G", "NaN");
+ retVal &= VerifyToString("PostTestG2", 0.123456789123456789123D, "G", "0,123456789123457");
+ retVal &= VerifyToString("PostTestG3", 0.123456789123459789D, "G", "0,12345678912346");
+ retVal &= VerifyToString("PostTestG4", 0.123456789123000009123D, "G", "0,123456789123");
+
+ retVal &= VerifyToString("PostTestR1", Double.NaN, "R", "NaN");
+ retVal &= VerifyToString("PostTestR2", 0.123456789123456789123D, "R", TestLibrary.Utilities.IsWindows ? "0,12345678912345678" : "0,123456789123457");
+ retVal &= VerifyToString("PostTestR3", 0.123456789123459789D, "R", TestLibrary.Utilities.IsWindows ? "0,1234567891234598" : "0,12345678912346");
+ retVal &= VerifyToString("PostTestR4", 0.123456789123000009123D, "R", TestLibrary.Utilities.IsWindows ? "0,12345678912300001" : "0,123456789123");
+
+ retVal &= VerifyToString("PostTestE1", Double.NaN, "E", "NaN");
+ retVal &= VerifyToString("PostTestE2", 0.123456789123456789123D, "E", TestLibrary.Utilities.IsWindows ? "1,234568E@001" : "1,234568E@1");
+ retVal &= VerifyToString("PostTestE3", 0.123456789123459789D, "E", TestLibrary.Utilities.IsWindows ? "1,234568E@001" : "1,234568E@1");
+ retVal &= VerifyToString("PostTestE4", 0.123456789123000009123D, "E", TestLibrary.Utilities.IsWindows ? "1,234568E@001" : "1,234568E@1");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal &= NegTest1();
+
+ return retVal;
+ }
+
+ private bool VerifyToString(String id, Double myDouble, String format, String expected)
+ {
+ try
+ {
+ String actual = myDouble.ToString(format, CustomNFI);
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError(id + "_001", "Expected: " + expected + " Actual: " + actual);
+ return false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(id + "_002", "Unexpected exception occurs: " + e);
+ return false;
+ }
+ return true;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: FormatException should be thrown when the format string is invalid.");
+
+ try
+ {
+ Double d1 = 0.123456009123000009123D;
+ String s1 = d1.ToString("H", nfi);
+ TestLibrary.TestFramework.LogError("N01.1", "FormatException is not thrown when the format string is invalid!");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/double/doubletryparse.cs b/tests/src/CoreMangLib/cti/system/double/doubletryparse.cs
new file mode 100644
index 0000000000..514e57ae2e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/double/doubletryparse.cs
@@ -0,0 +1,606 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+// Ported to CoreCLR from Co7532TryParse_all.cs
+// Tests Double.TryParse(String), Double.TryParse(String, NumberStyles, IFormatProvider, ref Double)
+// 2003/04/01 KatyK
+// 2007/06/28 adapted by MarielY
+public class DoubleTryParse
+{
+ static bool verbose = false;
+
+ public static int Main()
+ {
+ bool passed = true;
+
+ try
+ {
+ // Make the test culture independent
+ TestLibrary.Utilities.CurrentCulture = CultureInfo.InvariantCulture;
+
+ // Set up NFIs to use
+ NumberFormatInfo goodNFI = new NumberFormatInfo();
+
+ NumberFormatInfo corruptNFI = new NumberFormatInfo(); // DecimalSeparator == GroupSeparator
+ corruptNFI.NumberDecimalSeparator = ".";
+ corruptNFI.NumberGroupSeparator = ".";
+ corruptNFI.CurrencyDecimalSeparator = ".";
+ corruptNFI.CurrencyGroupSeparator = ".";
+ corruptNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo swappedNFI = new NumberFormatInfo(); // DecimalSeparator & GroupSeparator swapped
+ swappedNFI.NumberDecimalSeparator = ".";
+ swappedNFI.NumberGroupSeparator = ",";
+ swappedNFI.CurrencyDecimalSeparator = ",";
+ swappedNFI.CurrencyGroupSeparator = ".";
+ swappedNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo distinctNFI = new NumberFormatInfo(); // DecimalSeparator & GroupSeparator distinct
+ distinctNFI.NumberDecimalSeparator = ".";
+ distinctNFI.NumberGroupSeparator = ",";
+ distinctNFI.CurrencyDecimalSeparator = ":";
+ distinctNFI.CurrencyGroupSeparator = ";";
+ distinctNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo customNFI = new NumberFormatInfo();
+ customNFI.NegativeSign = "^";
+
+ NumberFormatInfo ambigNFI = new NumberFormatInfo();
+ ambigNFI.NegativeSign = "^";
+ ambigNFI.CurrencySymbol = "^";
+
+ CultureInfo germanCulture = new CultureInfo("de-DE");
+ CultureInfo japaneseCulture;
+ try
+ {
+ japaneseCulture = new CultureInfo("ja-JP");
+ }
+ catch (Exception)
+ {
+ TestLibrary.TestFramework.LogInformation("East Asian Languages are not installed. Skipping Japanese culture test(s).");
+ japaneseCulture = null;
+ }
+
+ // Parse tests included for comparison/regression
+ passed &= VerifyDoubleParse("0", 0);
+ passed &= VerifyDoubleParse("5", 5);
+ passed &= VerifyDoubleParse("5 ", 5);
+ passed &= VerifyDoubleParse("5\0", 5);
+ passed &= VerifyDoubleParse("-5", -5);
+ passed &= VerifyDoubleParse("893382737", 893382737);
+ passed &= VerifyDoubleParse("-893382737", -893382737);
+ passed &= VerifyDoubleParse("1234567891", 1234567891);
+ passed &= VerifyDoubleParse("-1234567891", -1234567891);
+ passed &= VerifyDoubleParse("123456789123456789", 123456789123456789);
+ passed &= VerifyDoubleParse("-123456789123456789", -123456789123456789);
+ passed &= VerifyDoubleParse("5", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyDoubleParse("5 \0", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyDoubleParse("5\0\0\0", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyDoubleParse("-5", NumberStyles.Integer, CultureInfo.InvariantCulture, -5);
+ passed &= VerifyDoubleParse("5", NumberStyles.Integer, goodNFI, 5);
+ passed &= VerifyDoubleParse("5.0", NumberStyles.AllowDecimalPoint, goodNFI, 5);
+ passed &= VerifyDoubleParse("5.3", NumberStyles.AllowDecimalPoint, goodNFI, 5.3);
+ passed &= VerifyDoubleParse("123456789123456789123", 123456789123456789123.0);
+ passed &= VerifyDoubleParse("-123456789123456789123", -123456789123456789123.0);
+ passed &= VerifyDoubleParse("18446744073709551615", 18446744073709551615);
+ passed &= VerifyDoubleParse("79228162514264337593543950335", 79228162514264337593543950335.0);
+ passed &= VerifyDoubleParse("-79228162514264337593543950335", -79228162514264337593543950335.0);
+ passed &= VerifyDoubleParse("5.555555555", 5.555555555);
+ passed &= VerifyDoubleParse("1.000000", 1.0);
+ passed &= VerifyDoubleParse("79228162514264337593543950336", 79228162514264337593543950336.0);
+ passed &= VerifyDoubleParse("-79228162514264337593543950336", -79228162514264337593543950336.0);
+ passed &= VerifyDoubleParse("1.79769313486231E+308", NumberStyles.Float | NumberStyles.AllowExponent, null, 1.79769313486231E+308);
+ passed &= VerifyDoubleParse("-1.79769313486231E+308", NumberStyles.Float | NumberStyles.AllowExponent, null, -1.79769313486231E+308);
+ passed &= VerifyDoubleParse("NaN", NumberStyles.Float, NumberFormatInfo.InvariantInfo, Double.NaN);
+ passed &= VerifyDoubleParse("Infinity", NumberStyles.Float, NumberFormatInfo.InvariantInfo, Double.PositiveInfinity);
+ passed &= VerifyDoubleParse("-Infinity", NumberStyles.Float, NumberFormatInfo.InvariantInfo, Double.NegativeInfinity);
+ passed &= VerifyDoubleParse("123", NumberStyles.Integer, germanCulture, 123);
+ passed &= VerifyDoubleParse("123", NumberStyles.Integer, japaneseCulture, 123);
+ passed &= VerifyDoubleParse("123.456", NumberStyles.Any, germanCulture, 123456);
+ passed &= VerifyDoubleParse("123,456", NumberStyles.Any, japaneseCulture, 123456);
+ passed &= VerifyDoubleParse("123,456", NumberStyles.AllowDecimalPoint, germanCulture, 123.456);
+ passed &= VerifyDoubleParse("123.456", NumberStyles.AllowDecimalPoint, japaneseCulture, 123.456);
+ passed &= VerifyDoubleParse("5,23 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 5.23); // currency
+ passed &= VerifyDoubleParse("5.23 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 523); // currency
+ //
+ passed &= VerifyDoubleParse("5", NumberStyles.Integer, corruptNFI, 5);
+ passed &= VerifyDoubleParse("5", NumberStyles.Number, corruptNFI, 5);
+ passed &= VerifyDoubleParse("5.3", NumberStyles.Number, corruptNFI, 5.3);
+ passed &= VerifyDoubleParseException("5,3", NumberStyles.Number, corruptNFI, typeof(FormatException));
+ passed &= VerifyDoubleParseException("5.2.3", NumberStyles.Number, corruptNFI, typeof(FormatException));
+ passed &= VerifyDoubleParse("$5.3", NumberStyles.Currency, corruptNFI, 5.3);
+ passed &= VerifyDoubleParseException("$5,3", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyDoubleParseException("$5.2.3", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyDoubleParse("5.3", NumberStyles.Currency, corruptNFI, 5.3);
+ passed &= VerifyDoubleParseException("5,3", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyDoubleParseException("5.2.3", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyDoubleParse("5.3", NumberStyles.Any, corruptNFI, 5.3);
+ passed &= VerifyDoubleParseException("5,3", NumberStyles.Any, corruptNFI, typeof(FormatException));
+ passed &= VerifyDoubleParseException("5.2.3", NumberStyles.Any, corruptNFI, typeof(FormatException));
+ //
+ passed &= VerifyDoubleParse("5", NumberStyles.Integer, swappedNFI, 5);
+ passed &= VerifyDoubleParseException("1,234", NumberStyles.Integer, swappedNFI, typeof(FormatException));
+ passed &= VerifyDoubleParse("5", NumberStyles.Number, swappedNFI, 5);
+ passed &= VerifyDoubleParse("5.0", NumberStyles.Number, swappedNFI, 5);
+ passed &= VerifyDoubleParse("1,234", NumberStyles.Number, swappedNFI, 1234);
+ passed &= VerifyDoubleParse("1,234.0", NumberStyles.Number, swappedNFI, 1234);
+ passed &= VerifyDoubleParseException("5.000.000", NumberStyles.Number, swappedNFI, typeof(FormatException));
+ passed &= VerifyDoubleParseException("5.000,00", NumberStyles.Number, swappedNFI, typeof(FormatException));
+ passed &= VerifyDoubleParse("5.000", NumberStyles.Currency, swappedNFI, 5); //???
+ passed &= VerifyDoubleParseException("5.000,00", NumberStyles.Currency, swappedNFI, typeof(FormatException)); //???
+ passed &= VerifyDoubleParse("$5.000", NumberStyles.Currency, swappedNFI, 5000);
+ passed &= VerifyDoubleParse("$5.000,00", NumberStyles.Currency, swappedNFI, 5000);
+ passed &= VerifyDoubleParse("5.000", NumberStyles.Any, swappedNFI, 5); //?
+ passed &= VerifyDoubleParseException("5.000,00", NumberStyles.Any, swappedNFI, typeof(FormatException)); //?
+ passed &= VerifyDoubleParse("$5.000", NumberStyles.Any, swappedNFI, 5000);
+ passed &= VerifyDoubleParse("$5.000,00", NumberStyles.Any, swappedNFI, 5000);
+ passed &= VerifyDoubleParse("5,0", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyDoubleParse("$5,0", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyDoubleParse("5,000", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyDoubleParse("$5,000", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyDoubleParseException("5,000.0", NumberStyles.Currency, swappedNFI, typeof(FormatException));
+ passed &= VerifyDoubleParseException("$5,000.0", NumberStyles.Currency, swappedNFI, typeof(FormatException));
+ passed &= VerifyDoubleParse("5,000", NumberStyles.Any, swappedNFI, 5);
+ passed &= VerifyDoubleParse("$5,000", NumberStyles.Any, swappedNFI, 5);
+ passed &= VerifyDoubleParseException("5,000.0", NumberStyles.Any, swappedNFI, typeof(FormatException));
+ passed &= VerifyDoubleParseException("$5,000.0", NumberStyles.Any, swappedNFI, typeof(FormatException));
+ //
+ passed &= VerifyDoubleParse("5.0", NumberStyles.Number, distinctNFI, 5);
+ passed &= VerifyDoubleParse("1,234.0", NumberStyles.Number, distinctNFI, 1234);
+ passed &= VerifyDoubleParse("5.0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyDoubleParse("1,234.0", NumberStyles.Currency, distinctNFI, 1234);
+ passed &= VerifyDoubleParse("5.0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyDoubleParse("1,234.0", NumberStyles.Any, distinctNFI, 1234);
+ passed &= VerifyDoubleParseException("$5.0", NumberStyles.Currency, distinctNFI, typeof(FormatException));
+ passed &= VerifyDoubleParseException("$5.0", NumberStyles.Any, distinctNFI, typeof(FormatException));
+ passed &= VerifyDoubleParseException("5:0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyDoubleParseException("5;0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyDoubleParseException("$5:0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyDoubleParse("5:0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyDoubleParse("5:000", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyDoubleParse("5;000", NumberStyles.Currency, distinctNFI, 5000);
+ passed &= VerifyDoubleParse("$5:0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyDoubleParse("$5;0", NumberStyles.Currency, distinctNFI, 50);
+ passed &= VerifyDoubleParse("5:0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyDoubleParse("5;0", NumberStyles.Any, distinctNFI, 50);
+ passed &= VerifyDoubleParse("$5:0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyDoubleParse("$5;0", NumberStyles.Any, distinctNFI, 50);
+ passed &= VerifyDoubleParseException("123,456;789.0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyDoubleParse("123,456;789.0", NumberStyles.Currency, distinctNFI, 123456789);
+ passed &= VerifyDoubleParse("123,456;789.0", NumberStyles.Any, distinctNFI, 123456789);
+ passed &= VerifyDoubleParseException("$123,456;789.0", NumberStyles.Any, distinctNFI, typeof(FormatException));
+ //
+ passed &= VerifyDoubleParseException("1.79769313486231E+309", NumberStyles.Float | NumberStyles.AllowExponent, null, typeof(OverflowException));
+ passed &= VerifyDoubleParseException("-1.79769313486231E+309", NumberStyles.Float | NumberStyles.AllowExponent, null, typeof(OverflowException));
+ passed &= VerifyDoubleParseException("1.89769313486231E+308", NumberStyles.Float | NumberStyles.AllowExponent, null, typeof(OverflowException));
+ passed &= VerifyDoubleParseException("-1.89769313486231E+308", NumberStyles.Float | NumberStyles.AllowExponent, null, typeof(OverflowException));
+ passed &= VerifyDoubleParseException("Garbage", typeof(FormatException));
+ passed &= VerifyDoubleParseException("5\0Garbage", typeof(FormatException));
+ passed &= VerifyDoubleParseException(null, typeof(ArgumentNullException));
+ passed &= VerifyDoubleParseException("FF", NumberStyles.HexNumber, goodNFI, typeof(ArgumentException));
+ passed &= VerifyDoubleParseException("4", (NumberStyles)(-1), typeof(ArgumentException));
+ passed &= VerifyDoubleParseException("4", (NumberStyles)0x10000, typeof(ArgumentException));
+ passed &= VerifyDoubleParseException("4", (NumberStyles)(-1), CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyDoubleParseException("4", (NumberStyles)0x10000, CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyDoubleParseException("123,000,000,000,000,000,000", NumberStyles.Any, germanCulture, typeof(FormatException));
+ passed &= VerifyDoubleParseException("123.000.000.000.000.000.000", NumberStyles.Any, japaneseCulture, typeof(FormatException));
+ passed &= VerifyDoubleParseException("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Integer, germanCulture, typeof(FormatException)); // currency
+
+
+ /////////// TryParse(String)
+ //// Pass cases
+ passed &= VerifyDoubleTryParse("0", 0, true);
+ passed &= VerifyDoubleTryParse("-0", 0, true);
+ passed &= VerifyDoubleTryParse("5", 5, true);
+ passed &= VerifyDoubleTryParse(" 5 ", 5, true);
+ passed &= VerifyDoubleTryParse("-5", -5, true);
+ passed &= VerifyDoubleTryParse("5\0", 5, true);
+ passed &= VerifyDoubleTryParse("5 \0", 5, true);
+ passed &= VerifyDoubleTryParse("5\0\0\0", 5, true);
+ passed &= VerifyDoubleTryParse("893382737", 893382737, true);
+ passed &= VerifyDoubleTryParse("-893382737", -893382737, true);
+ passed &= VerifyDoubleTryParse("1234567891", 1234567891, true);
+ passed &= VerifyDoubleTryParse("-1234567891", -1234567891, true);
+ passed &= VerifyDoubleTryParse("123456789123456789", 123456789123456789, true);
+ passed &= VerifyDoubleTryParse("-123456789123456789", -123456789123456789, true);
+ passed &= VerifyDoubleTryParse("123456789123456789123", 123456789123456789123.0, true);
+ passed &= VerifyDoubleTryParse("-123456789123456789123", -123456789123456789123.0, true);
+ passed &= VerifyDoubleTryParse("18446744073709551615", 18446744073709551615, true);
+ passed &= VerifyDoubleTryParse("79228162514264337593543950335", 79228162514264337593543950335.0, true);
+ passed &= VerifyDoubleTryParse("-79228162514264337593543950335", -79228162514264337593543950335.0, true);
+ passed &= VerifyDoubleTryParse("79228162514264337593543950336", 79228162514264337593543950336.0, true);
+ passed &= VerifyDoubleTryParse("-79228162514264337593543950336", -79228162514264337593543950336.0, true);
+ passed &= VerifyDoubleTryParse("7.3", 7.3, true);
+ passed &= VerifyDoubleTryParse(".297", 0.297, true);
+ passed &= VerifyDoubleTryParse("5.555555555", 5.555555555, true);
+ passed &= VerifyDoubleTryParse("1.000000", 1.0, true);
+ passed &= VerifyDoubleTryParse("1.234E+05", 123400, true);
+ passed &= VerifyDoubleTryParse("NaN", Double.NaN, true);
+ passed &= VerifyDoubleTryParse("Infinity", Double.PositiveInfinity, true);
+ passed &= VerifyDoubleTryParse("-Infinity", Double.NegativeInfinity, true);
+
+ //// Fail cases
+ passed &= VerifyDoubleTryParse(null, 0, false);
+ passed &= VerifyDoubleTryParse("", 0, false);
+ passed &= VerifyDoubleTryParse("Garbage", 0, false);
+ passed &= VerifyDoubleTryParse("5\0Garbage", 0, false);
+ passed &= VerifyDoubleTryParse("FF", 0, false);
+ passed &= VerifyDoubleTryParse("23 5", 0, false);
+ passed &= VerifyDoubleTryParse("1.234+E05", 0, false);
+
+
+ /////////// TryParse(TryParse(String, NumberStyles, IFormatProvider, ref Double)
+ //// Pass cases
+ passed &= VerifyDoubleTryParse("5", NumberStyles.Integer, CultureInfo.InvariantCulture, 5, true);
+ passed &= VerifyDoubleTryParse("-5", NumberStyles.Integer, CultureInfo.InvariantCulture, -5, true);
+ passed &= VerifyDoubleTryParse("-79228162514264337593543950336", NumberStyles.Integer, CultureInfo.InvariantCulture, -79228162514264337593543950336.0, true);
+ // Variations on NumberStyles
+ passed &= VerifyDoubleTryParse(" 5", NumberStyles.AllowLeadingWhite, goodNFI, 5, true);
+ passed &= VerifyDoubleTryParse("5", NumberStyles.Number, goodNFI, 5, true);
+ passed &= VerifyDoubleTryParse("5.0", NumberStyles.AllowDecimalPoint, goodNFI, 5.0, true);
+ passed &= VerifyDoubleTryParse("5.3", NumberStyles.AllowDecimalPoint, goodNFI, 5.3, true);
+ passed &= VerifyDoubleTryParse("1.234E+05", NumberStyles.Float | NumberStyles.AllowExponent, goodNFI, 123400, true);
+ passed &= VerifyDoubleTryParse("1.79769313486231E+308", NumberStyles.Float | NumberStyles.AllowExponent, null, 1.79769313486231E+308, true);
+ passed &= VerifyDoubleTryParse("-1.79769313486231E+308", NumberStyles.Float | NumberStyles.AllowExponent, null, -1.79769313486231E+308, true);
+ // Variations on IFP
+ passed &= VerifyDoubleTryParse("5", NumberStyles.Integer, goodNFI, 5, true);
+ passed &= VerifyDoubleTryParse("5", NumberStyles.Integer, null, 5, true);
+ passed &= VerifyDoubleTryParse("5", NumberStyles.Integer, new DateTimeFormatInfo(), 5, true);
+ passed &= VerifyDoubleTryParse("^42", NumberStyles.Any, customNFI, -42, true);
+ passed &= VerifyDoubleTryParse("123", NumberStyles.Integer, germanCulture, 123, true);
+ passed &= VerifyDoubleTryParse("123", NumberStyles.Integer, japaneseCulture, 123, true);
+ passed &= VerifyDoubleTryParse("123.456", NumberStyles.Any, germanCulture, 123456, true);
+ passed &= VerifyDoubleTryParse("123,456", NumberStyles.Any, japaneseCulture, 123456, true);
+ passed &= VerifyDoubleTryParse("123,456", NumberStyles.AllowDecimalPoint, germanCulture, 123.456, true);
+ passed &= VerifyDoubleTryParse("123.456", NumberStyles.AllowDecimalPoint, japaneseCulture, 123.456, true);
+ passed &= VerifyDoubleTryParse("5,23 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 5.23, true); // currency
+ passed &= VerifyDoubleTryParse("5.23 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 523, true); // currency
+ //
+ //// Fail cases
+ passed &= VerifyDoubleTryParse("-42", NumberStyles.Any, customNFI, 0, false);
+ passed &= VerifyDoubleTryParse("5 ", NumberStyles.AllowLeadingWhite, goodNFI, 0, false);
+ passed &= VerifyDoubleTryParse("5.3", NumberStyles.None, goodNFI, 0, false);
+ passed &= VerifyDoubleTryParse("1.234E+05", NumberStyles.AllowExponent, goodNFI, 0, false);
+ passed &= VerifyDoubleTryParse("-1.79769313486231E+309", NumberStyles.Float | NumberStyles.AllowExponent, null, 0, false);
+ passed &= VerifyDoubleTryParse("1.89769313486231E+308", NumberStyles.Float | NumberStyles.AllowExponent, null, 0, false);
+ passed &= VerifyDoubleTryParse("-1.89769313486231E+308", NumberStyles.Float | NumberStyles.AllowExponent, null, 0, false);
+ passed &= VerifyDoubleTryParse("123,000,000,000,000,000,000", NumberStyles.Any, germanCulture, 0, false);
+ passed &= VerifyDoubleTryParse("123.000.000.000.000.000.000", NumberStyles.Any, japaneseCulture, 0, false);
+
+ //// Exception cases
+ passed &= VerifyDoubleTryParseException("12", NumberStyles.HexNumber, CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyDoubleTryParseException("5", NumberStyles.AllowHexSpecifier | NumberStyles.AllowParentheses, null, typeof(ArgumentException));
+ passed &= VerifyDoubleTryParseException("4", (NumberStyles)(-1), CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyDoubleTryParseException("4", (NumberStyles)0x10000, CultureInfo.InvariantCulture, typeof(ArgumentException));
+
+ // NumberStyles/NFI variations
+ //
+ passed &= VerifyDoubleTryParse("5", NumberStyles.Integer, corruptNFI, 5, true);
+ passed &= VerifyDoubleTryParse("5", NumberStyles.Number, corruptNFI, 5, true);
+ passed &= VerifyDoubleTryParse("5.3", NumberStyles.Number, corruptNFI, 5.3, true);
+ passed &= VerifyDoubleTryParse("5,3", NumberStyles.Number, corruptNFI, 0, false);
+ passed &= VerifyDoubleTryParse("5.2.3", NumberStyles.Number, corruptNFI, 0, false);
+ passed &= VerifyDoubleTryParse("$5.3", NumberStyles.Currency, corruptNFI, 5.3, true);
+ passed &= VerifyDoubleTryParse("$5,3", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyDoubleTryParse("$5.2.3", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyDoubleTryParse("5.3", NumberStyles.Currency, corruptNFI, 5.3, true);
+ passed &= VerifyDoubleTryParse("5,3", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyDoubleTryParse("5.2.3", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyDoubleTryParse("5.3", NumberStyles.Any, corruptNFI, 5.3, true);
+ passed &= VerifyDoubleTryParse("5,3", NumberStyles.Any, corruptNFI, 0, false);
+ passed &= VerifyDoubleTryParse("5.2.3", NumberStyles.Any, corruptNFI, 0, false);
+ //
+ passed &= VerifyDoubleTryParse("5", NumberStyles.Integer, swappedNFI, 5, true);
+ passed &= VerifyDoubleTryParse("1,234", NumberStyles.Integer, swappedNFI, 0, false);
+ passed &= VerifyDoubleTryParse("5", NumberStyles.Number, swappedNFI, 5, true);
+ passed &= VerifyDoubleTryParse("5.0", NumberStyles.Number, swappedNFI, 5, true);
+ passed &= VerifyDoubleTryParse("1,234", NumberStyles.Number, swappedNFI, 1234, true);
+ passed &= VerifyDoubleTryParse("1,234.0", NumberStyles.Number, swappedNFI, 1234, true);
+ passed &= VerifyDoubleTryParse("5.000.000", NumberStyles.Number, swappedNFI, 0, false);
+ passed &= VerifyDoubleTryParse("5.000,00", NumberStyles.Number, swappedNFI, 0, false);
+ passed &= VerifyDoubleTryParse("5.000", NumberStyles.Currency, swappedNFI, 5, true); //???
+ passed &= VerifyDoubleTryParse("5.000,00", NumberStyles.Currency, swappedNFI, 0, false); //???
+ passed &= VerifyDoubleTryParse("$5.000", NumberStyles.Currency, swappedNFI, 5000, true);
+ passed &= VerifyDoubleTryParse("$5.000,00", NumberStyles.Currency, swappedNFI, 5000, true);
+ passed &= VerifyDoubleTryParse("5.000", NumberStyles.Any, swappedNFI, 5, true); //?
+ passed &= VerifyDoubleTryParse("5.000,00", NumberStyles.Any, swappedNFI, 0, false); //?
+ passed &= VerifyDoubleTryParse("$5.000", NumberStyles.Any, swappedNFI, 5000, true);
+ passed &= VerifyDoubleTryParse("$5.000,00", NumberStyles.Any, swappedNFI, 5000, true);
+ passed &= VerifyDoubleTryParse("5,0", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyDoubleTryParse("$5,0", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyDoubleTryParse("5,000", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyDoubleTryParse("$5,000", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyDoubleTryParse("5,000.0", NumberStyles.Currency, swappedNFI, 0, false);
+ passed &= VerifyDoubleTryParse("$5,000.0", NumberStyles.Currency, swappedNFI, 0, false);
+ passed &= VerifyDoubleTryParse("5,000", NumberStyles.Any, swappedNFI, 5, true);
+ passed &= VerifyDoubleTryParse("$5,000", NumberStyles.Any, swappedNFI, 5, true);
+ passed &= VerifyDoubleTryParse("5,000.0", NumberStyles.Any, swappedNFI, 0, false);
+ passed &= VerifyDoubleTryParse("$5,000.0", NumberStyles.Any, swappedNFI, 0, false);
+ //
+ passed &= VerifyDoubleTryParse("5.0", NumberStyles.Number, distinctNFI, 5, true);
+ passed &= VerifyDoubleTryParse("1,234.0", NumberStyles.Number, distinctNFI, 1234, true);
+ passed &= VerifyDoubleTryParse("5.0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyDoubleTryParse("1,234.0", NumberStyles.Currency, distinctNFI, 1234, true);
+ passed &= VerifyDoubleTryParse("5.0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyDoubleTryParse("1,234.0", NumberStyles.Any, distinctNFI, 1234, true);
+ passed &= VerifyDoubleTryParse("$5.0", NumberStyles.Currency, distinctNFI, 0, false);
+ passed &= VerifyDoubleTryParse("$5.0", NumberStyles.Any, distinctNFI, 0, false);
+ passed &= VerifyDoubleTryParse("5:0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyDoubleTryParse("5;0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyDoubleTryParse("$5:0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyDoubleTryParse("5:0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyDoubleTryParse("5:000", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyDoubleTryParse("5;000", NumberStyles.Currency, distinctNFI, 5000, true);
+ passed &= VerifyDoubleTryParse("$5:0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyDoubleTryParse("$5;0", NumberStyles.Currency, distinctNFI, 50, true);
+ passed &= VerifyDoubleTryParse("5:0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyDoubleTryParse("5;0", NumberStyles.Any, distinctNFI, 50, true);
+ passed &= VerifyDoubleTryParse("$5:0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyDoubleTryParse("$5;0", NumberStyles.Any, distinctNFI, 50, true);
+ passed &= VerifyDoubleTryParse("123,456;789.0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyDoubleTryParse("123,456;789.0", NumberStyles.Currency, distinctNFI, 123456789, true);
+ passed &= VerifyDoubleTryParse("123,456;789.0", NumberStyles.Any, distinctNFI, 123456789, true);
+ passed &= VerifyDoubleTryParse("$123,456;789.0", NumberStyles.Any, distinctNFI, 0, false);
+
+
+ // Should these pass or fail? Current parse behavior is to pass, so they might be
+ // parse bugs, but they're not tryparse bugs.
+ passed &= VerifyDoubleParse("5", NumberStyles.AllowExponent, goodNFI, 5);
+ passed &= VerifyDoubleTryParse("5", NumberStyles.AllowExponent, goodNFI, 5, true);
+ // I expect ArgumentException with an ambiguous NFI
+ passed &= VerifyDoubleParse("^42", NumberStyles.Any, ambigNFI, -42);
+ passed &= VerifyDoubleTryParse("^42", NumberStyles.Any, ambigNFI, -42, true);
+
+ /// END TEST CASES
+ }
+ catch (Exception e)
+ {
+ TestLibrary.Logging.WriteLine("Unexpected exception!! " + e.ToString());
+ passed = false;
+ }
+
+ if (passed)
+ {
+ TestLibrary.Logging.WriteLine("paSs");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.Logging.WriteLine("FAiL");
+ return 1;
+ }
+ }
+
+ public static bool VerifyDoubleTryParse(string value, Double expectedResult, bool expectedReturn)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Double.TryParse, Value = '{0}', Expected Result = {1}, Expected Return = {2}",
+ value, expectedResult, expectedReturn);
+ }
+ Double result = 0;
+ try
+ {
+ bool returnValue = Double.TryParse(value, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedReturn, returnValue);
+ return false;
+ }
+ if (Double.IsNaN(expectedResult) && Double.IsNaN(result))
+ {
+ return true;
+ }
+ if (result != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, result);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyDoubleTryParse(string value, NumberStyles style, IFormatProvider provider, Double expectedResult, bool expectedReturn)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Double.TryParse, Value = '{0}', Style = {1}, Provider = {2}, Expected Result = {3}, Expected Return = {4}",
+ value, style, provider, expectedResult, expectedReturn);
+ }
+ Double result = 0;
+ try
+ {
+ bool returnValue = Double.TryParse(value, style, provider, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Style = {1}, Provider = {2}, Expected Return = {3}, Actual Return = {4}",
+ value, style, provider, expectedReturn, returnValue);
+ return false;
+ }
+ if (Double.IsNaN(expectedResult) && Double.IsNaN(result))
+ {
+ return true;
+ }
+ if (result != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, result);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyDoubleTryParseException(string value, NumberStyles style, IFormatProvider provider, Type exceptionType)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Double.TryParse, Value = '{0}', Style = {1}, Provider = {2}, Expected Exception = {3}",
+ value, style, provider, exceptionType);
+ }
+ try
+ {
+ Double result = 0;
+ Boolean returnValue = Double.TryParse(value, style, provider, out result);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyDoubleParse(string value, Double expectedResult)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Double.Parse, Value = '{0}', Expected Result, {1}",
+ value, expectedResult);
+ }
+ try
+ {
+ Double returnValue = Double.Parse(value);
+ if (Double.IsNaN(expectedResult) && Double.IsNaN(returnValue))
+ {
+ return true;
+ }
+ if (returnValue != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, returnValue);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyDoubleParse(string value, NumberStyles style, IFormatProvider provider, Double expectedResult)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Double.Parse, Value = '{0}', Style = {1}, provider = {2}, Expected Result = {3}",
+ value, style, provider, expectedResult);
+ }
+ try
+ {
+ Double returnValue = Double.Parse(value, style, provider);
+ if (Double.IsNaN(expectedResult) && Double.IsNaN(returnValue))
+ {
+ return true;
+ }
+ if (returnValue != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, returnValue);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyDoubleParseException(string value, Type exceptionType)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Double.Parse, Value = '{0}', Expected Exception, {1}",
+ value, exceptionType);
+ }
+ try
+ {
+ Double returnValue = Double.Parse(value);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyDoubleParseException(string value, NumberStyles style, Type exceptionType)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Double.Parse, Value = '{0}', Style = {1}, Expected Exception = {3}",
+ value, style, exceptionType);
+ }
+ try
+ {
+ Double returnValue = Double.Parse(value, style);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyDoubleParseException(string value, NumberStyles style, IFormatProvider provider, Type exceptionType)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Double.Parse, Value = '{0}', Style = {1}, Provider = {2}, Expected Exception = {3}",
+ value, style, provider, exceptionType);
+ }
+ try
+ {
+ Double returnValue = Double.Parse(value, style, provider);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToInt64.csproj b/tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToInt64.csproj
new file mode 100644
index 0000000000..03b5766e81
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="enumiconvertibletoint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToSingle.csproj b/tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToSingle.csproj
new file mode 100644
index 0000000000..c706072c6b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToSingle.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="enumiconvertibletosingle.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToType.csproj b/tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToType.csproj
new file mode 100644
index 0000000000..c748d8e8c3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToType.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="enumiconvertibletotype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToUint16.csproj b/tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToUint16.csproj
new file mode 100644
index 0000000000..814d39dd69
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToUint16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="enumiconvertibletouint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToUint32.csproj b/tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToUint32.csproj
new file mode 100644
index 0000000000..6de8bbe8f6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToUint32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="enumiconvertibletouint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToUint64.csproj b/tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToUint64.csproj
new file mode 100644
index 0000000000..4d1b7448ae
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/enum/EnumIConvertibleToUint64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="enumiconvertibletouint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/enum/EnumIsDefined.csproj b/tests/src/CoreMangLib/cti/system/enum/EnumIsDefined.csproj
new file mode 100644
index 0000000000..0f0805ee0f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/enum/EnumIsDefined.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="enumisdefined.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/enum/EnumToObjectb.csproj b/tests/src/CoreMangLib/cti/system/enum/EnumToObjectb.csproj
new file mode 100644
index 0000000000..414c1b33cb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/enum/EnumToObjectb.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="enumtoobjectb.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/enum/EnumToString.csproj b/tests/src/CoreMangLib/cti/system/enum/EnumToString.csproj
new file mode 100644
index 0000000000..8bd3e0bbab
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/enum/EnumToString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="enumtostring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/enum/EnumToString3.csproj b/tests/src/CoreMangLib/cti/system/enum/EnumToString3.csproj
new file mode 100644
index 0000000000..ce7fd8150c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/enum/EnumToString3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="enumtostring3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/enum/enumiconvertibletoint64.cs b/tests/src/CoreMangLib/cti/system/enum/enumiconvertibletoint64.cs
new file mode 100644
index 0000000000..c436ec3b54
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/enum/enumiconvertibletoint64.cs
@@ -0,0 +1,194 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Enum.IConvertibleToInt64(System.IFormatProvider)
+/// </summary>
+public class EnumIConvertibleToInt64
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test a customized enum type");
+
+ try
+ {
+ color e1 = color.blue;
+ IConvertible i1 = e1 as IConvertible;
+ long l1 = i1.ToInt64(null);
+ if (l1 != 100)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test a system defined enum type");
+
+ try
+ {
+ Enum e2 = System.StringComparison.CurrentCultureIgnoreCase;
+ long l2 = (e2 as IConvertible).ToInt64(null);
+ if (l2 != 1)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert a enum to int64, the value of which is Int32.Maximal ");
+
+ try
+ {
+ e_test e3 = e_test.itemA;
+ long l3 = (e3 as IConvertible).ToInt64(null);
+ if (l3 != Int32.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert a enum to Int64, the value of which is Int64.minvalue");
+
+ try
+ {
+ e_test e4 = e_test.itemB;
+ IConvertible i4 = e4 as IConvertible;
+ long l4 = i4.ToInt64(null);
+ if (l4 != Int64.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Convert a enum to Int64, the value of which is Int64.MaxValue");
+
+ try
+ {
+ e_test? e5 = e_test.itemC;
+ IConvertible i5 = e5 as IConvertible;
+ long l5 = i5.ToInt64(null);
+ if (l5 != Int64.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EnumIConvertibleToInt64 test = new EnumIConvertibleToInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("EnumIConvertibleToInt64");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ enum color
+ {
+ blue = 100,
+ white,
+ red,
+ }
+ enum e_test : long
+ {
+ itemA = Int32.MaxValue,
+ itemB = Int64.MinValue,
+ itemC = Int64.MaxValue,
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/enum/enumiconvertibletosingle.cs b/tests/src/CoreMangLib/cti/system/enum/enumiconvertibletosingle.cs
new file mode 100644
index 0000000000..1ff1c11e87
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/enum/enumiconvertibletosingle.cs
@@ -0,0 +1,223 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Enum.IConvertibleToSingle(provider)
+/// </summary>
+public class EnumIConvertibleToSingle
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert zero to single");
+
+ try
+ {
+ color c1 = color.blue;
+ IConvertible i1 = c1 as IConvertible;
+ float f1 = i1.ToSingle(null);
+ if (f1 != 0.0)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test a normal enum of value 3 ");
+
+ try
+ {
+ color c2 = color.white;
+ IConvertible i2 = c2 as IConvertible;
+ float f2 = i2.ToSingle(null);
+ if (f2 != 3.0)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert an int32 to single");
+
+ try
+ {
+ e_test c2 = e_test.itemB;
+ IConvertible i2 = c2 as IConvertible;
+ float f2 = i2.ToSingle(null);
+ if (f2 != Int32.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert an int64.MinValue to single");
+
+ try
+ {
+ e_test c2 = e_test.itemC;
+ IConvertible i2 = c2 as IConvertible;
+ float f2 = i2.ToSingle(null);
+ if (f2 != Int64.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Convert a negative to single");
+
+ try
+ {
+ e_test c2 = e_test.itemA;
+ IConvertible i2 = c2 as IConvertible;
+ float f2 = i2.ToSingle(null);
+ if (f2 != -4)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Convert a negative zero to single");
+
+ try
+ {
+ e_test c2 = e_test.itemD;
+ IConvertible i2 = c2 as IConvertible;
+ float f2 = i2.ToSingle(null);
+ if (f2 != 0)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EnumIConvertibleToSingle test = new EnumIConvertibleToSingle();
+
+ TestLibrary.TestFramework.BeginTestCase("EnumIConvertibleToSingle");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ enum color
+ {
+ blue = 0,
+ white = 3,
+ red,
+ }
+ enum e_test : long
+ {
+ itemA = -4,
+ itemB = Int32.MaxValue,
+ itemC = Int64.MinValue,
+ itemD = -0,
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/enum/enumiconvertibletotype.cs b/tests/src/CoreMangLib/cti/system/enum/enumiconvertibletotype.cs
new file mode 100644
index 0000000000..f1a3a79526
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/enum/enumiconvertibletotype.cs
@@ -0,0 +1,253 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Enum.IConvertibleToType(System.Type,IFormatProvider )
+/// </summary>
+public class EnumIConvertibleToType
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert an enum to string ");
+
+ try
+ {
+ color c1 = color.blue;
+ IConvertible i1 = c1 as IConvertible;
+ string s1 = i1.ToType(typeof(string), null) as string;
+ if (s1 != "blue")
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert an enum to byte");
+
+ try
+ {
+ color c1 = color.white;
+ IConvertible i1 = c1 as IConvertible;
+ byte s1 = (byte)i1.ToType(typeof(byte), null);
+ if (s1 != 101)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert an enum of negative value to single");
+
+ try
+ {
+ e_test e1 = e_test.itemA;
+ IConvertible i1 = e1 as IConvertible;
+ float s1 = (float)i1.ToType(typeof(float), null);
+ if (s1 != -123456789.0f)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert an enum of int64.MaxValue to Int64 ");
+
+ try
+ {
+ e_test e1 = e_test.itemC;
+ IConvertible i1 = e1 as IConvertible;
+ long s1 = (long)i1.ToType(typeof(long), null);
+ if (s1 != Int64.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Convert an enum of int32.MinValue to Int32");
+
+ try
+ {
+ e_test e1 = e_test.itemB;
+ IConvertible i1 = e1 as IConvertible;
+ int s1 = (int)i1.ToType(typeof(int), null);
+ if (s1 != Int32.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6:Set the first argument as type of double");
+
+ try
+ {
+ e_test e1 = e_test.itemC;
+ IConvertible i1 = e1 as IConvertible;
+ double s1 = (double)i1.ToType(typeof(double), null);
+ if (s1 != (double)Int64.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("011", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Convert an enum of int32 to int16");
+
+ try
+ {
+ e_test e1 = e_test.itemB;
+ IConvertible i1 = e1 as IConvertible;
+ Int16 s1 = (Int16)i1.ToType(typeof(Int16), null);
+ TestLibrary.TestFramework.LogError("101", "The OverflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EnumIConvertibleToType test = new EnumIConvertibleToType();
+
+ TestLibrary.TestFramework.BeginTestCase("EnumIConvertibleToType");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ enum color
+ {
+ blue = 100,
+ white,
+ red,
+ }
+ enum e_test : long
+ {
+ itemA = -123456789,
+ itemB = Int32.MinValue,
+ itemC = Int64.MaxValue,
+ itemD = -0,
+ itemE = 1220,
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/enum/enumiconvertibletouint16.cs b/tests/src/CoreMangLib/cti/system/enum/enumiconvertibletouint16.cs
new file mode 100644
index 0000000000..b59e335283
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/enum/enumiconvertibletouint16.cs
@@ -0,0 +1,225 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Enum.IConvertibleToUint16(System.Type,IFormatProvider )
+/// </summary>
+public class EnumIConvertibleToUint16
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert an enum of zero to Uint16");
+
+ try
+ {
+ color c1 = color.blue;
+ IConvertible i1 = c1 as IConvertible;
+ UInt16 u1 = i1.ToUInt16(null);
+ if (u1 != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test a system defined enum type");
+
+ try
+ {
+ Enum e2 = System.StringComparison.CurrentCultureIgnoreCase;
+ UInt16 l2 = (e2 as IConvertible).ToUInt16(null);
+ if (l2 != 1)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert an enum of Uint16.maxvalue to uint16");
+
+ try
+ {
+ color c1 = color.white;
+ IConvertible i1 = c1 as IConvertible;
+ UInt16 u1 = i1.ToUInt16(null);
+ if (u1 != UInt16.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert an enum of negative zero to Uint16 ");
+
+ try
+ {
+ color c1 = color.red;
+ IConvertible i1 = c1 as IConvertible;
+ UInt16 u1 = i1.ToUInt16(null);
+ if (u1 != 0)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Convert an enum of negative value to Uint16");
+
+ try
+ {
+ e_test e1 = e_test.itemA;
+ IConvertible i1 = e1 as IConvertible;
+ UInt16 u1 = i1.ToUInt16(null);
+ TestLibrary.TestFramework.LogError("101", "The OverflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Convert an enum of the value which is bigger than uint16.maxvalue to Uint16");
+
+ try
+ {
+ e_test e1 = e_test.itemB;
+ IConvertible i1 = e1 as IConvertible;
+ UInt16 u1 = i1.ToUInt16(null);
+ TestLibrary.TestFramework.LogError("103", "The OverflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EnumIConvertibleToUint16 test = new EnumIConvertibleToUint16();
+
+ TestLibrary.TestFramework.BeginTestCase("EnumIConvertibleToUint16");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ enum color
+ {
+ blue = 0,
+ white = UInt16.MaxValue,
+ red = -0,
+ }
+ enum e_test : long
+ {
+ itemA = -123,
+ itemB = Int32.MaxValue,
+ itemC = Int64.MaxValue,
+ itemD = -0,
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/enum/enumiconvertibletouint32.cs b/tests/src/CoreMangLib/cti/system/enum/enumiconvertibletouint32.cs
new file mode 100644
index 0000000000..8963a02282
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/enum/enumiconvertibletouint32.cs
@@ -0,0 +1,224 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Enum.IConvertibleToUint32(System.Type,IFormatProvider )
+/// </summary>
+public class EnumIConvertibleToUint32
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert an enum of zero to Uint32");
+
+ try
+ {
+ color c1 = color.blue;
+ IConvertible i1 = c1 as IConvertible;
+ UInt32 u1 = i1.ToUInt32(null);
+ if (u1 != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test a system defined enum type");
+
+ try
+ {
+ Enum e2 = System.StringComparison.OrdinalIgnoreCase;
+ UInt32 l2 = (e2 as IConvertible).ToUInt32(null);
+ if (l2 != 5)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert an enum of Uint32.maxvalue to Uint32");
+
+ try
+ {
+ color c1 = color.white;
+ IConvertible i1 = c1 as IConvertible;
+ UInt32 u1 = i1.ToUInt32(null);
+ if (u1 != UInt32.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert an enum of negative zero to Uint32 ");
+
+ try
+ {
+ color c1 = color.red;
+ IConvertible i1 = c1 as IConvertible;
+ UInt32 u1 = i1.ToUInt32(null);
+ if (u1 != 0)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Convert an enum of negative value to Uint32");
+
+ try
+ {
+ e_test e1 = e_test.itemA;
+ IConvertible i1 = e1 as IConvertible;
+ UInt32 u1 = i1.ToUInt32(null);
+ TestLibrary.TestFramework.LogError("101", "The OverflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Convert an enum of the value which is bigger than uint32.maxvalue to Uint32");
+
+ try
+ {
+ e_test e1 = e_test.itemB;
+ IConvertible i1 = e1 as IConvertible;
+ UInt32 u1 = i1.ToUInt32(null);
+ TestLibrary.TestFramework.LogError("103", "The OverflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EnumIConvertibleToUint32 test = new EnumIConvertibleToUint32();
+
+ TestLibrary.TestFramework.BeginTestCase("EnumIConvertibleToUint32");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ enum color : uint
+ {
+ blue = 0,
+ white = UInt32.MaxValue,
+ red = -0,
+ }
+ enum e_test : long
+ {
+ itemA = -123,
+ itemB = Int64.MaxValue,
+ itemC = Int64.MaxValue,
+ itemD = -0,
+ }
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/enum/enumiconvertibletouint64.cs b/tests/src/CoreMangLib/cti/system/enum/enumiconvertibletouint64.cs
new file mode 100644
index 0000000000..d329b2195d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/enum/enumiconvertibletouint64.cs
@@ -0,0 +1,196 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Enum.IConvertibleToUint64(System.Type,IFormatProvider )
+/// </summary>
+public class EnumIConvertibleToUint64
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert an enum of zero to Uint64");
+
+ try
+ {
+ color c1 = color.blue;
+ IConvertible i1 = c1 as IConvertible;
+ UInt64 u1 = i1.ToUInt64(null);
+ if (u1 != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test a system defined enum type");
+
+ try
+ {
+ Enum e2 = System.StringComparison.OrdinalIgnoreCase;
+ UInt64 l2 = (e2 as IConvertible).ToUInt64(null);
+ if (l2 != 5)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert an enum of Uint64.maxvalue to Uint64");
+
+ try
+ {
+ color c1 = color.white;
+ IConvertible i1 = c1 as IConvertible;
+ UInt64 u1 = i1.ToUInt64(null);
+ if (u1 != UInt64.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert an enum of negative zero to Uint64");
+
+ try
+ {
+ color c1 = color.red;
+ IConvertible i1 = c1 as IConvertible;
+ UInt64 u1 = i1.ToUInt64(null);
+ if (u1 != 0)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Convert an enum of negative value to Uint64");
+
+ try
+ {
+ e_test e1 = e_test.itemA;
+ IConvertible i1 = e1 as IConvertible;
+ UInt64 u1 = i1.ToUInt64(null);
+ TestLibrary.TestFramework.LogError("101", "The OverflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EnumIConvertibleToUint64 test = new EnumIConvertibleToUint64();
+
+ TestLibrary.TestFramework.BeginTestCase("EnumIConvertibleToUint64");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ enum color : ulong
+ {
+ blue = 0,
+ white = UInt64.MaxValue,
+ red = -0,
+ }
+ enum e_test : long
+ {
+ itemA = -123,
+ itemB = Int64.MaxValue,
+ itemC = Int64.MaxValue,
+ itemD = -0,
+ }
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/enum/enumisdefined.cs b/tests/src/CoreMangLib/cti/system/enum/enumisdefined.cs
new file mode 100644
index 0000000000..ae85dcd91b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/enum/enumisdefined.cs
@@ -0,0 +1,389 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using TestLibrary;
+
+public enum EnumInt32 : int
+{
+ One, Two, Three
+}
+
+public enum EnumByte : byte
+{
+ One, Two, Three
+}
+
+class EnumIsDefined
+{
+ static int Main()
+ {
+ EnumIsDefined test = new EnumIsDefined();
+
+ TestFramework.BeginTestCase("Enum.IsDefined(enumType,value)");
+
+ if (test.RunTests())
+ {
+ TestFramework.EndTestCase();
+ TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestFramework.EndTestCase();
+ TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ //Type ctor are now internal, so inheritance of Type class is not allowed on SL
+
+ return retVal;
+ }
+
+
+
+ public bool PosTest1()
+ {
+ bool retVal = false;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: use enumType and value that is contained in the enum (1)");
+
+ try
+ {
+ if (Enum.IsDefined(typeof(EnumInt32), 1))
+ {
+ retVal = true;
+ }
+ else
+ {
+ TestLibrary.TestFramework.LogError("001", "Enum.IsDefined(typeof(EnumInt32), 1) returned false");
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = false;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: use enumType and value that is not contained in the enum (5)");
+
+ try
+ {
+ if (!Enum.IsDefined(typeof(EnumInt32), 5))
+ {
+ retVal = true;
+ }
+ else
+ {
+ TestLibrary.TestFramework.LogError("003", "Enum.IsDefined(typeof(EnumInt32), 5) returned true");
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = false;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: use enumType and value that is contained in the enum (One)");
+
+ try
+ {
+ if (Enum.IsDefined(typeof(EnumInt32), "One"))
+ {
+ retVal = true;
+ }
+ else
+ {
+ TestLibrary.TestFramework.LogError("005", "Enum.IsDefined(typeof(EnumInt32), \"One\") returned false");
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = false;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: use enumType and value that is not contained in the enum (ONE)");
+
+ try
+ {
+ if (!Enum.IsDefined(typeof(EnumInt32), "ONE"))
+ {
+ retVal = true;
+ }
+ else
+ {
+ TestLibrary.TestFramework.LogError("007", "Enum.IsDefined(typeof(EnumInt32), \"ONE\") returned true");
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = false;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: use enumType and value that is contained in the enum (Enum1.One)");
+
+ try
+ {
+ if (Enum.IsDefined(typeof(EnumInt32), EnumInt32.One))
+ {
+ retVal = true;
+ }
+ else
+ {
+ TestLibrary.TestFramework.LogError("009", "Enum.IsDefined(typeof(EnumInt32), EnumInt32.One) returned false");
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = false;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Try different underlying type, use enumType and value that is contained in the enum (One)");
+
+ try
+ {
+ if (Enum.IsDefined(typeof(EnumByte), "One"))
+ {
+ retVal = true;
+ }
+ else
+ {
+ TestLibrary.TestFramework.LogError("011", "Enum.IsDefined(typeof(EnumByte), \"One\") returned false");
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = false;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Try different underlying type, use enumType and value that is not contained in the enum (Five)");
+
+ try
+ {
+ if (!Enum.IsDefined(typeof(EnumByte), "Five"))
+ {
+ retVal = true;
+ }
+ else
+ {
+ TestLibrary.TestFramework.LogError("013", "Enum.IsDefined(typeof(EnumByte), \"Five\") returned true");
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = false;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest8: Try different underlying type, use enumType and value that is contained in the enum ((byte)1)");
+
+ try
+ {
+ if (Enum.IsDefined(typeof(EnumByte), (byte)1))
+ {
+ retVal = true;
+ }
+ else
+ {
+ TestLibrary.TestFramework.LogError("015", "Enum.IsDefined(typeof(EnumByte), (byte)1) returned false");
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception: " + e);
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = false;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: enumType is null");
+
+ try
+ {
+ Enum.IsDefined(null,1);
+ TestLibrary.TestFramework.LogError("017", "Did not catch expected ArgumentNullException");
+ }
+ catch (ArgumentNullException)
+ {
+ // caught expected exception
+ retVal = true;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception: " + e);
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = false;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: value is null");
+
+ try
+ {
+ Enum.IsDefined(typeof(EnumInt32), null);
+ TestLibrary.TestFramework.LogError("019", "Did not catch expected ArgumentNullException");
+ }
+ catch (ArgumentNullException)
+ {
+ // caught expected exception
+ retVal = true;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception: " + e);
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = false;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: enumType is not an Enum");
+
+ try
+ {
+ Enum.IsDefined(typeof(string), EnumInt32.One);
+ TestLibrary.TestFramework.LogError("021", "Did not catch expected ArgumentException");
+ }
+ catch (ArgumentException)
+ {
+ // caught expected exception
+ retVal = true;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("022", "Unexpected exception: " + e);
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = false;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: type of value is not an enumType");
+
+ try
+ {
+ Enum.IsDefined(typeof(EnumInt32), new Object());
+ TestLibrary.TestFramework.LogError("023", "Did not catch expected ArgumentException");
+ }
+ catch (InvalidOperationException)
+ {
+ // caught expected exception
+ retVal = true;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("024", "Unexpected exception: " + e);
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = false;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: type of value is not an underlying type of enumType");
+
+ try
+ {
+ Enum.IsDefined(typeof(EnumInt32), (byte)1);
+ TestLibrary.TestFramework.LogError("025", "Expected ArgumentException is not thrown");
+ }
+ catch (ArgumentException)
+ {
+ retVal = true;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("026", "Unexpected exception: " + e);
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/enum/enumtoobjectb.cs b/tests/src/CoreMangLib/cti/system/enum/enumtoobjectb.cs
new file mode 100644
index 0000000000..6d02e38964
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/enum/enumtoobjectb.cs
@@ -0,0 +1,263 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Enum.ToObject(Type,object value)
+/// </summary>
+public class EnumToObject
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Return the enum object whose value is -100 ");
+
+ try
+ {
+ object o1 = Enum.ToObject(typeof(color), -100);
+ if ((color)o1 != color.blue)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Return the enum object whose value is -0");
+
+ try
+ {
+ object o1 = Enum.ToObject(typeof(color), -0);
+ if ((color)o1 != color.white)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Return the enum object whose value is int32.maxvalue");
+
+ try
+ {
+ object o1 = Enum.ToObject(typeof(e_test), Int32.MaxValue);
+ if ((e_test)o1 != e_test.itemA)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Return the enum object whose value is int64.MinValue ");
+
+ try
+ {
+ object o1 = Enum.ToObject(typeof(e_test), Int64.MinValue);
+ if ((e_test)o1 != e_test.itemC)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Test the situation when none of the value could match the value of the enum");
+
+ try
+ {
+ object o1 = Enum.ToObject(typeof(e_test), 1);
+ if (((e_test)o1).ToString() != "1")
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The type of the enum is null reference ");
+
+ try
+ {
+ object o1 = Enum.ToObject(null, -100);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The first argument is not a type of enum ");
+
+ try
+ {
+ object o1 = Enum.ToObject(typeof(Array), 0);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: The type of the value is invalid");
+
+ try
+ {
+ object o1 = Enum.ToObject(typeof(e_test), "itemC");
+ TestLibrary.TestFramework.LogError("105", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EnumToObject test = new EnumToObject();
+
+ TestLibrary.TestFramework.BeginTestCase("EnumToObject");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ enum color
+ {
+ blue = -100,
+ white = -0,
+ red = 0,
+ }
+ enum e_test : long
+ {
+ itemA = Int32.MaxValue,
+ itemB = Int32.MinValue,
+ itemC = Int64.MinValue,
+ itemD = -0,
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/enum/enumtostring.cs b/tests/src/CoreMangLib/cti/system/enum/enumtostring.cs
new file mode 100644
index 0000000000..c8a39ff7d6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/enum/enumtostring.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/enum/enumtostring3.cs b/tests/src/CoreMangLib/cti/system/enum/enumtostring3.cs
new file mode 100644
index 0000000000..24c9933352
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/enum/enumtostring3.cs
@@ -0,0 +1,250 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Enum.ToString(System.string)
+/// </summary>
+public class EnumToString3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Using the Format string \"D\"");
+
+ try
+ {
+ color c1 = color.blue;
+ string s1 = c1.ToString("D");
+ if (s1 != "-100")
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Using the Format string \"G\" ");
+
+ try
+ {
+ color c2 = color.brown;
+ string s2 = c2.ToString("G");
+ if (s2 != "brown")
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Using the Format string \"F\"");
+
+ try
+ {
+ e_test e3 = e_test.itemA;
+ string s3 = e3.ToString("F");
+ if (s3 != "itemA")
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Using the Format string \"X\"");
+
+ try
+ {
+ e_test e3 = e_test.itemA;
+ string s3 = e3.ToString("X");
+ if (s3 != "000000007FFFFFFF")
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Using the empty string as the argument");
+
+ try
+ {
+ e_test e3 = e_test.itemA;
+ string s3 = e3.ToString("");
+ if (s3 != "itemA")
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Set the argument as null");
+
+ try
+ {
+ color c6 = color.white;
+ string argu = null;
+ string s3 = c6.ToString(argu);
+ if (s3 != "white")
+ {
+ TestLibrary.TestFramework.LogError("011", "The result is not the value as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Set the format string argument as a invalid value ");
+
+ try
+ {
+ e_test e2 = e_test.itemC;
+ string s2 = e2.ToString("H");
+ TestLibrary.TestFramework.LogError("101", "The ArgumentException was not thrown as expected");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EnumToString3 test = new EnumToString3();
+
+ TestLibrary.TestFramework.BeginTestCase("EnumToString3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ enum color : long
+ {
+ blue = -100,
+ white = 0,
+ red = byte.MaxValue,
+ brown = Int64.MaxValue,
+ }
+ enum e_test : long
+ {
+ itemA = Int32.MaxValue,
+ itemB = Int32.MinValue,
+ itemC = Int64.MinValue,
+ itemD = -0,
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/environment/EnvironmentNewLine.csproj b/tests/src/CoreMangLib/cti/system/environment/EnvironmentNewLine.csproj
new file mode 100644
index 0000000000..7eea703dff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/environment/EnvironmentNewLine.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="environmentnewline.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/environment/environmentnewline.cs b/tests/src/CoreMangLib/cti/system/environment/environmentnewline.cs
new file mode 100644
index 0000000000..15498936c7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/environment/environmentnewline.cs
@@ -0,0 +1,68 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class EnvironmentNewLine
+{
+ public static int Main(string[] args)
+ {
+ EnvironmentNewLine newLine = new EnvironmentNewLine();
+ TestLibrary.TestFramework.BeginScenario("Testing System.Environment.NewLine property...");
+
+ if (newLine.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify environment.NewLine contains \r\n...");
+
+ try
+ {
+ if (TestLibrary.Utilities.IsWindows && !Environment.NewLine.Contains("\r\n"))
+ {
+ TestLibrary.TestFramework.LogError("001", @"The NewLine does not contain \r\n");
+ retVal = false;
+ }
+ else if (!TestLibrary.Utilities.IsWindows && !Environment.NewLine.Contains("\n"))
+ {
+ TestLibrary.TestFramework.LogError("001", @"The NewLine does not contain \n");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/eventargs/EventArgsctor.csproj b/tests/src/CoreMangLib/cti/system/eventargs/EventArgsctor.csproj
new file mode 100644
index 0000000000..75feafd2a3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/eventargs/EventArgsctor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="eventargsctor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/eventargs/eventargsctor.cs b/tests/src/CoreMangLib/cti/system/eventargs/eventargsctor.cs
new file mode 100644
index 0000000000..7b653b5167
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/eventargs/eventargsctor.cs
@@ -0,0 +1,62 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+
+
+public class EventArgsctor
+{
+ public static int Main(string[] args)
+ {
+ EventArgsctor ctor = new EventArgsctor();
+ TestLibrary.TestFramework.BeginTestCase("Testing EventArgs.ctor...");
+
+ if (ctor.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify using EventArgs constructor to create an instance...");
+
+ try
+ {
+ EventArgs e = new EventArgs();
+ if (e == null)
+ {
+ TestLibrary.TestFramework.LogError("001","The new created instance should not be null!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/eventhandler/EventHandlerInvoke.csproj b/tests/src/CoreMangLib/cti/system/eventhandler/EventHandlerInvoke.csproj
new file mode 100644
index 0000000000..b9ae24b422
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/eventhandler/EventHandlerInvoke.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="eventhandlerinvoke.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/eventhandler/eventhandlerinvoke.cs b/tests/src/CoreMangLib/cti/system/eventhandler/eventhandlerinvoke.cs
new file mode 100644
index 0000000000..eddf99eb98
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/eventhandler/eventhandlerinvoke.cs
@@ -0,0 +1,184 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public static class Counter
+{
+ public static int count = 0;
+}
+
+public class MyClass
+{
+ public void Test1(object sender, EventArgs e)
+ {
+ Counter.count++;
+ }
+
+ public static void Test2(object sender, EventArgs e)
+ {
+ Counter.count++;
+ }
+
+ private void Test3(object sender, EventArgs e)
+ {
+ Console.WriteLine("Static EventArgs is {0}: ", e.ToString());
+ }
+
+ public int Test4(object sender, EventArgs e)
+ {
+ Console.WriteLine("Int value return EventArgs is {0}: ", e.ToString());
+ return 1;
+ }
+}
+
+public class EventHandlerInvoke
+{
+ public event EventHandler myHandler;
+
+ public static int Main(string[] args)
+ {
+ EventHandlerInvoke invoke =
+ new EventHandlerInvoke();
+ TestLibrary.TestFramework.BeginTestCase("Testing EventHandler.Invoke(System.Object,System.EventArgs,System.AsyncCallback,System.Object)...");
+
+ if (invoke.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify invoke eventhandler using non-static method...");
+
+ try
+ {
+ EventHandlerInvoke delctor = new EventHandlerInvoke();
+ delctor.myHandler = new EventHandler(new MyClass().Test1);
+ EventArgs e = new EventArgs();
+ int i = Counter.count;
+ delctor.myHandler.Invoke(null, e);
+
+ if (i!=Counter.count-1)
+ {
+ TestLibrary.TestFramework.LogError("001", "Invoke method is not invoked!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify invoke eventhandler using static method...");
+
+ try
+ {
+ EventHandlerInvoke delctor = new EventHandlerInvoke();
+ delctor.myHandler = new EventHandler(new MyClass().Test1);
+ EventArgs e = new EventArgs();
+ int i = Counter.count;
+ delctor.myHandler.Invoke(new MyClass(), e);
+
+ if (i != Counter.count - 1)
+ {
+ TestLibrary.TestFramework.LogError("001", "Invoke method is not invoked!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify invoke eventhandler using non-static method when target object is null...");
+
+ try
+ {
+ EventHandlerInvoke delctor = new EventHandlerInvoke();
+ delctor.myHandler = new EventHandler(new MyClass().Test1);
+ EventArgs e = new EventArgs();
+ int i = Counter.count;
+ delctor.myHandler.Invoke(null, e);
+
+ if (i != Counter.count - 1)
+ {
+ TestLibrary.TestFramework.LogError("001", "Invoke method is not invoked!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify invoke eventhandler using static method when target object is null...");
+
+ try
+ {
+ EventHandlerInvoke delctor = new EventHandlerInvoke();
+ delctor.myHandler = new EventHandler(new MyClass().Test1);
+ EventArgs e = new EventArgs();
+ int i = Counter.count;
+ delctor.myHandler.Invoke(new MyClass(), e);
+
+ if (i != Counter.count - 1)
+ {
+ TestLibrary.TestFramework.LogError("001", "Invoke method is not invoked!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/eventhandler_generic/EventHandlerBeginInvoke.csproj b/tests/src/CoreMangLib/cti/system/eventhandler_generic/EventHandlerBeginInvoke.csproj
new file mode 100644
index 0000000000..54c9d83dfb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/eventhandler_generic/EventHandlerBeginInvoke.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="eventhandlerbegininvoke.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/eventhandler_generic/EventHandlerCtor.csproj b/tests/src/CoreMangLib/cti/system/eventhandler_generic/EventHandlerCtor.csproj
new file mode 100644
index 0000000000..eb1815617b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/eventhandler_generic/EventHandlerCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="eventhandlerctor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/eventhandler_generic/EventHandlerEndInvoke.csproj b/tests/src/CoreMangLib/cti/system/eventhandler_generic/EventHandlerEndInvoke.csproj
new file mode 100644
index 0000000000..98325a2847
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/eventhandler_generic/EventHandlerEndInvoke.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="eventhandlerendinvoke.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/eventhandler_generic/EventHandlerInvoke.csproj b/tests/src/CoreMangLib/cti/system/eventhandler_generic/EventHandlerInvoke.csproj
new file mode 100644
index 0000000000..b9ae24b422
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/eventhandler_generic/EventHandlerInvoke.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="eventhandlerinvoke.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/eventhandler_generic/eventhandlerbegininvoke.cs b/tests/src/CoreMangLib/cti/system/eventhandler_generic/eventhandlerbegininvoke.cs
new file mode 100644
index 0000000000..2a00f211c5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/eventhandler_generic/eventhandlerbegininvoke.cs
@@ -0,0 +1,130 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+///<summary>
+///System.EventHandler.BeginInvoke(System.Object,TEventArgs,System.AsyncCallback,System.Object)
+///</summary>
+
+public class EventHandlerBeginInvoke
+{
+ //create a instance of HelperArgs that the event effected.
+ public HelperArgs helperArgs = new HelperArgs(null);
+
+ //this event return the changed object.
+ public void setMessage(Object src, HelperArgs hArgs)
+ {
+ this.helperArgs = hArgs;
+ }
+
+ public static int Main()
+ {
+ EventHandlerBeginInvoke testObj = new EventHandlerBeginInvoke();
+ TestLibrary.TestFramework.BeginTestCase("for Method of System.EventHandler");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ String temp = TestLibrary.Generator.GetString(-55, false, 1, 255);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:invoke the method BeginInvoke with all arguments null");
+ try
+ {
+ HelperEvent helperEvent = new HelperEvent();
+
+ EventHandler<HelperArgs> eventHandler = new EventHandler<HelperArgs>(setMessage);
+
+ IAsyncResult iAR = eventHandler.BeginInvoke(helperEvent, new HelperArgs(temp), null, null);
+
+ TestLibrary.TestFramework.LogError("001", "Expected NotSupportedException exception");
+ retVal = false;
+ }
+ catch (NotSupportedException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ #endregion
+}
+
+#region Helper Class
+public class HelperArgs : EventArgs
+{
+ private String m_msg = "Helper EventArgs";
+
+ public String message
+ {
+ get
+ {
+ return m_msg;
+ }
+ set
+ {
+ m_msg = value;
+ }
+ }
+
+ public HelperArgs(String msg)
+ {
+ m_msg = msg;
+ }
+}
+
+public class HelperEvent
+{
+ private String m_Desc;
+
+ public event EventHandler<HelperArgs> setEvent;
+
+ public String Desc
+ {
+ set
+ {
+ EventHandler<HelperArgs> setevent = setEvent;
+ if (setevent != null)
+ {
+ setevent(this, new HelperArgs(value));
+ }
+ m_Desc = value;
+ }
+ get
+ {
+ return m_Desc;
+ }
+ }
+}
+#endregion
diff --git a/tests/src/CoreMangLib/cti/system/eventhandler_generic/eventhandlerctor.cs b/tests/src/CoreMangLib/cti/system/eventhandler_generic/eventhandlerctor.cs
new file mode 100644
index 0000000000..7fd3a1bc53
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/eventhandler_generic/eventhandlerctor.cs
@@ -0,0 +1,130 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+///<summary>
+///System.EventHandler.Ctor
+///</summary>
+
+public class EventHandlerCtor
+{
+ //create a instance of HelperArgs that the event effected.
+ public HelperArgs helperArgs = new HelperArgs(null);
+
+ //this event return the changed object.
+ public void setMessage(Object src, HelperArgs hArgs)
+ {
+ this.helperArgs = hArgs;
+ }
+
+ public static int Main()
+ {
+ EventHandlerCtor testObj = new EventHandlerCtor();
+ TestLibrary.TestFramework.BeginTestCase("for Constructor of System.EventHandler");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ String temp = TestLibrary.Generator.GetString(-55, false,1,255);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:invoke the method BeginInvoke");
+ try
+ {
+ HelperEvent helperEvent = new HelperEvent();
+ helperEvent.setEvent += new EventHandler<HelperArgs>(setMessage);
+ helperEvent.Desc = temp;
+ //if the Object helperArgs is changed,it shows that the event take off.
+
+ if (!helperArgs.message.Equals(temp))
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+}
+
+#region Helper Class
+public class HelperArgs : EventArgs
+{
+ private String m_msg = "Helper EventArgs";
+
+ public String message
+ {
+ get
+ {
+ return m_msg;
+ }
+ set
+ {
+ m_msg = value;
+ }
+ }
+
+ public HelperArgs(String msg)
+ {
+ m_msg = msg;
+ }
+}
+
+public class HelperEvent
+{
+ private String m_Desc;
+
+ public event EventHandler<HelperArgs> setEvent;
+
+ public String Desc
+ {
+ set
+ {
+ EventHandler<HelperArgs> setevent = setEvent;
+ if (setevent != null)
+ {
+ setevent(this, new HelperArgs(value));
+ }
+ m_Desc = value;
+ }
+ get
+ {
+ return m_Desc;
+ }
+ }
+}
+#endregion
diff --git a/tests/src/CoreMangLib/cti/system/eventhandler_generic/eventhandlerendinvoke.cs b/tests/src/CoreMangLib/cti/system/eventhandler_generic/eventhandlerendinvoke.cs
new file mode 100644
index 0000000000..4df6c22ba0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/eventhandler_generic/eventhandlerendinvoke.cs
@@ -0,0 +1,133 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+///<summary>
+///System.EventHandler.EndInvoke(System.IAsyncResult)
+///</summary>
+
+public class EventHandlerEndInvoke
+{
+ //create a instance of HelperArgs that the event effected.
+ public HelperArgs helperArgs = new HelperArgs(null);
+
+ //this event return the changed object.
+ public void setMessage(Object src, HelperArgs hArgs)
+ {
+ this.helperArgs = hArgs;
+ }
+
+ public static int Main()
+ {
+ EventHandlerEndInvoke testObj = new EventHandlerEndInvoke();
+ TestLibrary.TestFramework.BeginTestCase("for Method of System.EventHandler");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+
+
+ return retVal;
+ }
+
+ #region Test Logic
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ String temp = TestLibrary.Generator.GetString(-55, false, 1, 255);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:invoke the method EndInvoke");
+ try
+ {
+ HelperEvent helperEvent = new HelperEvent();
+
+ EventHandler<HelperArgs> eventHandler = new EventHandler<HelperArgs>(setMessage);
+
+ IAsyncResult iAR = null;
+
+ eventHandler.EndInvoke(iAR);
+
+ TestLibrary.TestFramework.LogError("001", "Expected NotSupportedException exception");
+ retVal = false;
+ }
+ catch (NotSupportedException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+}
+
+#region Helper Class
+public class HelperArgs : EventArgs
+{
+ private String m_msg = "Helper EventArgs";
+
+ public String message
+ {
+ get
+ {
+ return m_msg;
+ }
+ set
+ {
+ m_msg = value;
+ }
+ }
+
+ public HelperArgs(String msg)
+ {
+ m_msg = msg;
+ }
+}
+
+public class HelperEvent
+{
+ private String m_Desc;
+
+ public event EventHandler<HelperArgs> setEvent;
+
+ public String Desc
+ {
+ set
+ {
+ EventHandler<HelperArgs> setevent = setEvent;
+ if (setevent != null)
+ {
+ setevent(this, new HelperArgs(value));
+ }
+ m_Desc = value;
+ }
+ get
+ {
+ return m_Desc;
+ }
+ }
+}
+#endregion
diff --git a/tests/src/CoreMangLib/cti/system/eventhandler_generic/eventhandlerinvoke.cs b/tests/src/CoreMangLib/cti/system/eventhandler_generic/eventhandlerinvoke.cs
new file mode 100644
index 0000000000..ab6f3efb3a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/eventhandler_generic/eventhandlerinvoke.cs
@@ -0,0 +1,127 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+///<summary>
+///System.EventHandler.Invoke(System.Object,TEventArgs)
+///</summary>
+
+public class EventHandlerInvoke
+{
+ //create a instance of HelperArgs that the event effected.
+ public HelperArgs helperArgs = new HelperArgs(null);
+
+ //this event return the changed object.
+ public void setMessage(Object src, HelperArgs hArgs)
+ {
+ this.helperArgs = hArgs;
+ }
+
+ public static int Main()
+ {
+ EventHandlerInvoke testObj = new EventHandlerInvoke();
+ TestLibrary.TestFramework.BeginTestCase("for Method of System.EventHandler");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ String temp = TestLibrary.Generator.GetString(-55, false, 1, 255);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:invoke the method");
+ try
+ {
+ HelperEvent helperEvent = new HelperEvent();
+
+ EventHandler<HelperArgs> eventHandler = new EventHandler<HelperArgs>(setMessage);
+
+ eventHandler.Invoke(helperEvent,new HelperArgs(temp));
+
+ if (!helperArgs.message.Equals(temp))
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(true) !=ActualValue(false)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Helper Class
+public class HelperArgs : EventArgs
+{
+ private String m_msg = "Helper EventArgs";
+
+ public String message
+ {
+ get
+ {
+ return m_msg;
+ }
+ set
+ {
+ m_msg = value;
+ }
+ }
+
+ public HelperArgs(String msg)
+ {
+ m_msg = msg;
+ }
+}
+
+public class HelperEvent
+{
+ private String m_Desc;
+
+ public event EventHandler<HelperArgs> setEvent;
+
+ public String Desc
+ {
+ set
+ {
+ EventHandler<HelperArgs> setevent = setEvent;
+ if (setevent != null)
+ {
+ setevent(this, new HelperArgs(value));
+ }
+ m_Desc = value;
+ }
+ get
+ {
+ return m_Desc;
+ }
+ }
+}
+#endregion
diff --git a/tests/src/CoreMangLib/cti/system/exception/ExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/exception/ExceptionCtor1.csproj
new file mode 100644
index 0000000000..897f2554bc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/exception/ExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="exceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/exception/ExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/exception/ExceptionCtor2.csproj
new file mode 100644
index 0000000000..c5a34cc2eb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/exception/ExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="exceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/exception/ExceptionCtor3.csproj b/tests/src/CoreMangLib/cti/system/exception/ExceptionCtor3.csproj
new file mode 100644
index 0000000000..054677f123
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/exception/ExceptionCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="exceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/exception/ExceptionGetBaseException.csproj b/tests/src/CoreMangLib/cti/system/exception/ExceptionGetBaseException.csproj
new file mode 100644
index 0000000000..e206a5727f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/exception/ExceptionGetBaseException.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="exceptiongetbaseexception.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/exception/exceptionctor1.cs b/tests/src/CoreMangLib/cti/system/exception/exceptionctor1.cs
new file mode 100644
index 0000000000..5e0cf591c0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/exception/exceptionctor1.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ctor
+/// </summary>
+public class ExceptionCtor1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor to construct a new Exception instance");
+
+ try
+ {
+ Exception ex = new Exception();
+
+ if (ex == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling ctor to construct a new Exception instance returns a null reference");
+ retVal = false;
+ }
+
+ if (ex.InnerException != null)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Calling ctor to construct a new Exception instance returns an instance with InnerException is not a null reference");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ExceptionCtor1 test = new ExceptionCtor1();
+
+ TestLibrary.TestFramework.BeginTestCase("ExceptionCtor1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/exception/exceptionctor2.cs b/tests/src/CoreMangLib/cti/system/exception/exceptionctor2.cs
new file mode 100644
index 0000000000..07baa05c45
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/exception/exceptionctor2.cs
@@ -0,0 +1,170 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ctor(System.String)
+/// </summary>
+public class ExceptionCtor2
+{
+ #region Private Fields
+ private const int c_MIN_STRING_LENGTH = 1;
+ private const int c_MAX_STRING_LENGTH = 256;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string randValue = null;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor to construct a new Exception instance");
+
+ try
+ {
+ randValue = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ Exception ex = new Exception(randValue);
+
+ if (ex == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling ctor to construct a new Exception instance returns a null reference");
+ retVal = false;
+ }
+
+ if (ex.InnerException != null)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Calling ctor to construct a new Exception instance returns an instance with InnerException is not a null reference");
+ retVal = false;
+ }
+
+ if (!ex.Message.Equals(randValue))
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Calling ctor to construct a new Exception instance returns an instance with Message is wrong");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] ex.Message = " + ex.Message + ", randValue = " + randValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] randValue = " + randValue);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call ctor to construct a new Exception instance with message is null reference");
+
+ try
+ {
+ Exception ex = new Exception(null);
+
+ if (ex == null)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling ctor to construct a new Exception instance with message is null reference returns a null reference");
+ retVal = false;
+ }
+
+ if (ex.InnerException != null)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Calling ctor to construct a new Exception instance with message is null reference returns an instance with InnerException is not a null reference");
+ retVal = false;
+ }
+
+ if (ex.Message == null)
+ {
+ TestLibrary.TestFramework.LogError("002.3", "Calling ctor to construct a new Exception instance with message is null reference returns an instance with Message is not default message");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call ctor to construct a new Exception instance with message is String.Empty");
+
+ try
+ {
+ Exception ex = new Exception(String.Empty);
+
+ if (ex == null)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Calling ctor to construct a new Exception instance with message is String.Empty returns a null reference");
+ retVal = false;
+ }
+
+ if (ex.InnerException != null)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Calling ctor to construct a new Exception instance with message is String.Empty returns an instance with InnerException is not a null reference");
+ retVal = false;
+ }
+
+ if (!ex.Message.Equals(String.Empty))
+ {
+ TestLibrary.TestFramework.LogError("003.3", "Calling ctor to construct a new Exception instance with message is String.Empty returns an instance with Message is wrong");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] ex.Message = " + ex.Message);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ExceptionCtor2 test = new ExceptionCtor2();
+
+ TestLibrary.TestFramework.BeginTestCase("ExceptionCtor2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/exception/exceptionctor3.cs b/tests/src/CoreMangLib/cti/system/exception/exceptionctor3.cs
new file mode 100644
index 0000000000..2c90f2737f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/exception/exceptionctor3.cs
@@ -0,0 +1,262 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class TestException : Exception
+{
+}
+
+/// <summary>
+/// ctor(System.String,System.Exception)
+/// </summary>
+public class ExceptionCtor3
+{
+ #region Private Fields
+ private const int c_MIN_STRING_LENGTH = 1;
+ private const int c_MAX_STRING_LENGTH = 256;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string randValue = null;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor to construct a new Exception instance");
+
+ try
+ {
+ randValue = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ Exception ex = new Exception(randValue, null);
+
+ if (ex == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling ctor to construct a new Exception instance returns a null reference");
+ retVal = false;
+ }
+
+ if (ex.InnerException != null)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Calling ctor to construct a new Exception instance returns an instance with InnerException is not a null reference");
+ retVal = false;
+ }
+
+ if (!ex.Message.Equals(randValue))
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Calling ctor to construct a new Exception instance returns an instance with Message is wrong");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] ex.Message = " + ex.Message + ", randValue = " + randValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] randValue = " + randValue);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call ctor to construct a new Exception instance with message is null reference");
+
+ try
+ {
+ Exception ex = new Exception(null, null);
+
+ if (ex == null)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling ctor to construct a new Exception instance with message is null reference returns a null reference");
+ retVal = false;
+ }
+
+ if (ex.InnerException != null)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Calling ctor to construct a new Exception instance with message is null reference returns an instance with InnerException is not a null reference");
+ retVal = false;
+ }
+
+ if (ex.Message == null)
+ {
+ TestLibrary.TestFramework.LogError("002.3", "Calling ctor to construct a new Exception instance with message is null reference returns an instance with Message is not default message");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call ctor to construct a new Exception instance with message is String.Empty");
+
+ try
+ {
+ Exception ex = new Exception(String.Empty, null);
+
+ if (ex == null)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Calling ctor to construct a new Exception instance with message is String.Empty returns a null reference");
+ retVal = false;
+ }
+
+ if (ex.InnerException != null)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Calling ctor to construct a new Exception instance with message is String.Empty returns an instance with InnerException is not a null reference");
+ retVal = false;
+ }
+
+ if (!ex.Message.Equals(String.Empty))
+ {
+ TestLibrary.TestFramework.LogError("003.3", "Calling ctor to construct a new Exception instance with message is String.Empty returns an instance with Message is wrong");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] ex.Message = " + ex.Message);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string randValue = null;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call ctor to construct a new Exception instance with InnerException is set");
+
+ try
+ {
+ randValue = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ TestException innerException = new TestException();
+ Exception ex = new Exception(randValue, innerException);
+
+ if (ex == null)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Calling ctor to construct a new Exception instance returns a null reference");
+ retVal = false;
+ }
+
+ if (!ex.InnerException.Equals(innerException))
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Calling ctor to construct a new Exception instance returns an instance with InnerException is not a instance of TestException");
+ retVal = false;
+ }
+
+ if (!ex.Message.Equals(randValue))
+ {
+ TestLibrary.TestFramework.LogError("004.3", "Calling ctor to construct a new Exception instance returns an instance with Message is wrong");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] ex.Message = " + ex.Message + ", randValue = " + randValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] randValue = " + randValue);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string randValue = null;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Call ctor to construct a new Exception instance with InnerException is set to Exception's instance");
+
+ try
+ {
+ randValue = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ Exception innerException = new Exception();
+ Exception ex = new Exception(randValue, innerException);
+
+ if (ex == null)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "Calling ctor to construct a new Exception instance returns a null reference");
+ retVal = false;
+ }
+
+ if (!ex.InnerException.Equals(innerException))
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Calling ctor to construct a new Exception instance returns an instance with InnerException is not a instance of Exception");
+ retVal = false;
+ }
+
+ if (!ex.Message.Equals(randValue))
+ {
+ TestLibrary.TestFramework.LogError("005.3", "Calling ctor to construct a new Exception instance returns an instance with Message is wrong");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] ex.Message = " + ex.Message + ", randValue = " + randValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] randValue = " + randValue);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ExceptionCtor3 test = new ExceptionCtor3();
+
+ TestLibrary.TestFramework.BeginTestCase("ExceptionCtor3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/exception/exceptiongetbaseexception.cs b/tests/src/CoreMangLib/cti/system/exception/exceptiongetbaseexception.cs
new file mode 100644
index 0000000000..421b655ba7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/exception/exceptiongetbaseexception.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class TestException : Exception
+{
+ public TestException() { }
+
+ public TestException(string message, Exception inner)
+ : base(message, inner)
+ {
+ }
+}
+
+public class TestException1 : Exception
+{
+ public TestException1() { }
+
+ public TestException1(string message, Exception inner)
+ : base(message, inner)
+ {
+ }
+}
+
+/// <summary>
+/// GetBaseException
+/// </summary>
+public class ExceptionGetBaseException
+{
+ #region Private Fields
+ private const int c_MIN_STRING_LENGTH = 1;
+ private const int c_MAX_STRING_LENGTH = 256;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call GetBaseException when InnerException property is null reference");
+
+ try
+ {
+ Exception desired = new Exception();
+ Exception actual = desired.GetBaseException();
+
+ if (!desired.Equals(actual))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling GetBaseException when InnerException property is null reference does not return current exception instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] desired = " + desired + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call GetBaseException when InnerException property is not null reference");
+
+ try
+ {
+ TestException desired = new TestException();
+ Exception ex = new Exception(
+ TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH),
+ desired);
+ Exception actual = ex.GetBaseException();
+
+ if (!desired.Equals(actual))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling GetBaseException when InnerException property is not null reference does not return current exception instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] desired = " + desired + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call GetBaseException when InnerException property is a chain of Exception");
+
+ try
+ {
+ TestException desired = new TestException();
+ Exception ex = new Exception(
+ TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH),
+ new TestException1(
+ TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH),
+ desired));
+ Exception actual = ex.GetBaseException();
+
+ if (!desired.Equals(actual))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Calling GetBaseException when InnerException property is a chain of Exception does not return current exception instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] desired = " + desired + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ExceptionGetBaseException test = new ExceptionGetBaseException();
+
+ TestLibrary.TestFramework.BeginTestCase("ExceptionGetBaseException");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/flagsattribute/FlagsAttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/flagsattribute/FlagsAttributeCtor.csproj
new file mode 100644
index 0000000000..211d8386e5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/flagsattribute/FlagsAttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="flagsattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/flagsattribute/flagsattributector.cs b/tests/src/CoreMangLib/cti/system/flagsattribute/flagsattributector.cs
new file mode 100644
index 0000000000..24447a0d22
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/flagsattribute/flagsattributector.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ctor
+/// </summary>
+
+public class FlagsAttributeCtor
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Ctor.");
+
+ try
+ {
+ FlagsAttribute fa = new FlagsAttribute();
+
+ if (fa == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Ctor Err !");
+ retVal = false;
+ return retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FlagsAttributeCtor test = new FlagsAttributeCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("FlagsAttributeCtor");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/formatexception/FormatExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/formatexception/FormatExceptionCtor1.csproj
new file mode 100644
index 0000000000..f03e7b8ba0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/formatexception/FormatExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="formatexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/formatexception/FormatExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/formatexception/FormatExceptionCtor2.csproj
new file mode 100644
index 0000000000..aa3fe0977e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/formatexception/FormatExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="formatexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/formatexception/FormatExceptionCtor3.csproj b/tests/src/CoreMangLib/cti/system/formatexception/FormatExceptionCtor3.csproj
new file mode 100644
index 0000000000..6cfb013c7c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/formatexception/FormatExceptionCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="formatexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/formatexception/formatexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/formatexception/formatexceptionctor1.cs
new file mode 100644
index 0000000000..06dcf9d465
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/formatexception/formatexceptionctor1.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// FormatException Constructor ()
+/// </summary>
+public class FormatExceptionCtor
+{
+ public static int Main()
+ {
+ FormatExceptionCtor testObj = new FormatExceptionCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("for constructor: FormatException()");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string testDesc = "PosTest1: Initializes a new instance of FormatException.";
+ string errorDesc;
+
+ FormatException formatException;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ formatException = new FormatException();
+ if(null == formatException || formatException.InnerException != null)
+ {
+ errorDesc = "Failed to initialize instance of FormatException";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/formatexception/formatexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/formatexception/formatexceptionctor2.cs
new file mode 100644
index 0000000000..2db7537ad4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/formatexception/formatexceptionctor2.cs
@@ -0,0 +1,147 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// FormatException Constructor (String)
+/// Initializes a new instance of the FormatException class with a specified error message.
+/// </summary>
+public class FormatExceptionCtor
+{
+ private const int c_MIN_STRING_LENGTH = 1;
+ private const int c_MAX_STRING_LENGTH = 256;
+
+ public static int Main()
+ {
+ FormatExceptionCtor testObj = new FormatExceptionCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("for constructor: FormatException(String)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string testDesc = "PosTest1: Initializes a new instance of FormatException using non-empty message.";
+ string errorDesc;
+
+ FormatException formatException;
+ string message;
+ message = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ formatException = new FormatException(message);
+ if(null == formatException ||
+ formatException.InnerException != null ||
+ !formatException.Message.Contains(message))
+ {
+ errorDesc = "Failed to initialize instance of FormatException using message \"" +
+ message + "\"";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string testDesc = "PosTest2: Initializes a new instance of FormatException using null reference.";
+ string errorDesc;
+
+ FormatException formatException;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ formatException = new FormatException(null);
+ if (null == formatException ||
+ formatException.InnerException != null)
+ {
+ errorDesc = "Failed to initialize instance of FormatException using null reference.";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ string testDesc = "PosTest3: Initializes a new instance of FormatException using string.Empty.";
+ string errorDesc;
+
+ FormatException formatException;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ formatException = new FormatException(string.Empty);
+ if (null == formatException ||
+ formatException.InnerException != null)
+ {
+ errorDesc = "Failed to initialize instance of FormatException using string.Empty.";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/formatexception/formatexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/formatexception/formatexceptionctor3.cs
new file mode 100644
index 0000000000..3251a929d0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/formatexception/formatexceptionctor3.cs
@@ -0,0 +1,154 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// FormatException Constructor (String, Exception)
+/// </summary>
+public class FormatExceptionCtor
+{
+ private const int c_MIN_STRING_LENGTH = 1;
+ private const int c_MAX_STRING_LENGTH = 256;
+
+ public static int Main()
+ {
+ FormatExceptionCtor testObj = new FormatExceptionCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("for constructor: FormatException(String)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string testDesc = "PosTest1: Initializes a new instance of FormatException using non-empty message.";
+ string errorDesc;
+
+ FormatException formatException;
+ string message;
+ Exception innerException;
+ innerException = new Exception();
+ message = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ formatException = new FormatException(message, innerException);
+ if(null == formatException ||
+ !formatException.Message.Contains(message) ||
+ formatException.InnerException != innerException)
+ {
+ errorDesc = "Failed to initialize instance of FormatException using message \"" +
+ message + "\"\n Inner exception: " + innerException;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string testDesc = "PosTest2: Initializes a new instance of FormatException using null reference.";
+ string errorDesc;
+
+ FormatException formatException;
+ Exception innerException;
+ innerException = new Exception();
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ formatException = new FormatException(null, innerException);
+ if (null == formatException ||
+ formatException.InnerException != innerException)
+ {
+ errorDesc = "Failed to initialize instance of FormatException using null reference." +
+ "\n Inner exception: " + innerException;
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ string testDesc = "PosTest3: Initializes a new instance of FormatException using string.Empty.";
+ string errorDesc;
+
+ FormatException formatException;
+ Exception innerException;
+ innerException = new Exception();
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ formatException = new FormatException(string.Empty, innerException);
+ if (null == formatException ||
+ formatException.InnerException != innerException)
+ {
+ errorDesc = "Failed to initialize instance of FormatException using null reference." +
+ "\n Inner exception: " + innerException;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/gc/GCCollect.csproj b/tests/src/CoreMangLib/cti/system/gc/GCCollect.csproj
new file mode 100644
index 0000000000..4cbdee06b2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/gc/GCCollect.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="gccollect.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/gc/GCGetTotalMemory.csproj b/tests/src/CoreMangLib/cti/system/gc/GCGetTotalMemory.csproj
new file mode 100644
index 0000000000..0e97ee13e6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/gc/GCGetTotalMemory.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="gcgettotalmemory.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/gc/GCKeepAlive.csproj b/tests/src/CoreMangLib/cti/system/gc/GCKeepAlive.csproj
new file mode 100644
index 0000000000..088d78c21d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/gc/GCKeepAlive.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="gckeepalive.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/gc/GCMaxGeneration.csproj b/tests/src/CoreMangLib/cti/system/gc/GCMaxGeneration.csproj
new file mode 100644
index 0000000000..1d9730459b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/gc/GCMaxGeneration.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="gcmaxgeneration.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/gc/GCReRegisterForFinalize.csproj b/tests/src/CoreMangLib/cti/system/gc/GCReRegisterForFinalize.csproj
new file mode 100644
index 0000000000..d39f562027
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/gc/GCReRegisterForFinalize.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="gcreregisterforfinalize.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/gc/GCSuppressFinalize.csproj b/tests/src/CoreMangLib/cti/system/gc/GCSuppressFinalize.csproj
new file mode 100644
index 0000000000..fb56117dcc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/gc/GCSuppressFinalize.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="gcsuppressfinalize.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/gc/GCWaitForPendingFinalizers.csproj b/tests/src/CoreMangLib/cti/system/gc/GCWaitForPendingFinalizers.csproj
new file mode 100644
index 0000000000..282fad69d6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/gc/GCWaitForPendingFinalizers.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="gcwaitforpendingfinalizers.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/gc/gccollect.cs b/tests/src/CoreMangLib/cti/system/gc/gccollect.cs
new file mode 100644
index 0000000000..c7209bb2eb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/gc/gccollect.cs
@@ -0,0 +1,101 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class TestClass
+{
+ private const int c_SIZE_OF_ARRAY = 1024;
+ private byte[] m_Bytes;
+
+ public TestClass()
+ {
+ m_Bytes = new byte[c_SIZE_OF_ARRAY];
+ TestLibrary.Generator.GetBytes(-55, m_Bytes);
+ }
+}
+
+/// <summary>
+/// Collect
+/// </summary>
+public class GCCollect
+{
+ #region Private Fields
+ private const int c_MAX_GARBAGE_COUNT = 1000;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Collect to reclaim memories");
+
+ try
+ {
+ MakeSomeGarbage();
+ long beforeCollect = GC.GetTotalMemory(false);
+
+ GC.Collect();
+ long afterCollect = GC.GetTotalMemory(true);
+
+ if (beforeCollect <= afterCollect)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "GC.Collect does not work");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] beforeCollect = " + beforeCollect + ", afterCollect = " + afterCollect);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ GCCollect test = new GCCollect();
+
+ TestLibrary.TestFramework.BeginTestCase("GCCollect");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private static void MakeSomeGarbage()
+ {
+ for (int i = 0; i < c_MAX_GARBAGE_COUNT; ++i)
+ {
+ TestClass c = new TestClass();
+ }
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/gc/gcgettotalmemory.cs b/tests/src/CoreMangLib/cti/system/gc/gcgettotalmemory.cs
new file mode 100644
index 0000000000..f5cca25b94
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/gc/gcgettotalmemory.cs
@@ -0,0 +1,97 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// GetTotalMemory(System.Boolean)
+/// </summary>
+public class GCGetTotalMemory
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call GetTotalMemory with forceFullCollection set to false");
+
+ try
+ {
+ long result = GC.GetTotalMemory(false);
+
+ if (result == 0)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling GetTotalMemory with forceFullCollection set to false returns 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call GetTotalMemory with forceFullCollection set to true");
+
+ try
+ {
+ long result = GC.GetTotalMemory(true);
+
+ if (result == 0)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling GetTotalMemory with forceFullCollection set to true returns 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ GCGetTotalMemory test = new GCGetTotalMemory();
+
+ TestLibrary.TestFramework.BeginTestCase("GCGetTotalMemory");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/gc/gckeepalive.cs b/tests/src/CoreMangLib/cti/system/gc/gckeepalive.cs
new file mode 100644
index 0000000000..ed90465171
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/gc/gckeepalive.cs
@@ -0,0 +1,86 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class TestClass
+{
+ public static int m_TestInt = 1;
+
+ ~TestClass()
+ {
+ m_TestInt--;
+ }
+}
+
+/// <summary>
+/// KeepAlive(System.Object)
+/// </summary>
+public class GCKeepAlive
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call KeepAlive to prevent an object to be GCed");
+
+ try
+ {
+ TestClass tc = new TestClass();
+
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+ GC.Collect();
+
+ GC.KeepAlive(tc);
+ if (TestClass.m_TestInt != 1)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling KeepAlive can not prevent an object to be GCed");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] TestClass.m_TestInt = " + TestClass.m_TestInt);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ GCKeepAlive test = new GCKeepAlive();
+
+ TestLibrary.TestFramework.BeginTestCase("GCKeepAlive");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/gc/gcmaxgeneration.cs b/tests/src/CoreMangLib/cti/system/gc/gcmaxgeneration.cs
new file mode 100644
index 0000000000..54e1ca1e15
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/gc/gcmaxgeneration.cs
@@ -0,0 +1,71 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// MaxGeneration
+/// </summary>
+public class GCMaxGeneration
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call MaxGeneration to get the max generation the system current supports");
+
+ try
+ {
+ int gen = GC.MaxGeneration;
+
+ if (gen == 0)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Call MaxGeneration to get the max generation the system current supports returns 0");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] gen = " + gen);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ GCMaxGeneration test = new GCMaxGeneration();
+
+ TestLibrary.TestFramework.BeginTestCase("GCMaxGeneration");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/gc/gcreregisterforfinalize.cs b/tests/src/CoreMangLib/cti/system/gc/gcreregisterforfinalize.cs
new file mode 100644
index 0000000000..7a41aa7235
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/gc/gcreregisterforfinalize.cs
@@ -0,0 +1,190 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.CompilerServices;
+
+public class TestClass
+{
+ public const int c_DEFAULT_VALUE = 2;
+ public static int m_TestInt = c_DEFAULT_VALUE;
+
+ private bool m_hasFinalized = false;
+
+ ~TestClass()
+ {
+ m_TestInt--;
+
+ if (!m_hasFinalized)
+ {
+ m_hasFinalized = true;
+ GC.ReRegisterForFinalize(this);
+ }
+ }
+}
+
+public class TestClass1
+{
+ public const int c_DEFAULT_VALUE = 2;
+ public static int m_TestInt = c_DEFAULT_VALUE;
+
+ ~TestClass1()
+ {
+ m_TestInt--;
+ }
+}
+
+/// <summary>
+/// ReRegisterForFinalize(System.Object)
+/// </summary>
+public class GCReRegisterForFinalize
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ReRegisterForFinalize to register the Finalizer for twice");
+
+ try
+ {
+ PosTest1Worker();
+
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+ GC.Collect();
+
+ // Call the Finalizer second time
+ GC.WaitForPendingFinalizers();
+ GC.Collect();
+
+ if (TestClass.m_TestInt != 0)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling ReRegisterForFinalize has no effect");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] TestClass.m_TestInt = " + TestClass.m_TestInt);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ [MethodImplAttribute(MethodImplOptions.NoInlining)]
+ public void PosTest1Worker()
+ {
+ TestClass tc = new TestClass();
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call ReRegisterForFinalize to register the Finalizer for twice with the caller is not the current object");
+
+ try
+ {
+ PosTest2Worker();
+
+ GC.Collect();
+ // Call the Finalizer second time
+ GC.WaitForPendingFinalizers();
+ GC.Collect();
+
+ if (TestClass1.m_TestInt != 0)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling ReRegisterForFinalize has no effect");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] TestClass1.m_TestInt = " + TestClass1.m_TestInt);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ [MethodImplAttribute(MethodImplOptions.NoInlining)]
+ public void PosTest2Worker()
+ {
+ TestClass1 tc = new TestClass1();
+
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+ GC.ReRegisterForFinalize(tc);
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException should be thrown when obj is a null reference");
+
+ try
+ {
+ GC.ReRegisterForFinalize(null);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown when obj is a null reference");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ GCReRegisterForFinalize test = new GCReRegisterForFinalize();
+
+ TestLibrary.TestFramework.BeginTestCase("GCReRegisterForFinalize");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/gc/gcsuppressfinalize.cs b/tests/src/CoreMangLib/cti/system/gc/gcsuppressfinalize.cs
new file mode 100644
index 0000000000..84aa313077
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/gc/gcsuppressfinalize.cs
@@ -0,0 +1,169 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.CompilerServices;
+
+public class TestClass
+{
+ public const int c_DEFAULT_VALUE = 1;
+ public static int m_TestInt = c_DEFAULT_VALUE;
+
+ ~TestClass()
+ {
+ m_TestInt--;
+ }
+}
+
+/// <summary>
+/// SuppressFinalize(System.Object)
+/// </summary>
+public class GCSuppressFinalize
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call SuppressFinalize should prevent an object's finalizer is called during GC");
+
+ try
+ {
+ TestClass.m_TestInt = TestClass.c_DEFAULT_VALUE;
+
+ PosTest1Worker();
+
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+ GC.Collect();
+
+ if (TestClass.m_TestInt != TestClass.c_DEFAULT_VALUE)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling SuppressFinalize does not prevent an object's finalizer is called during GC");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] TestClass.m_TestInt = " + TestClass.m_TestInt);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ [MethodImplAttribute(MethodImplOptions.NoInlining)]
+ public void PosTest1Worker()
+ {
+ TestClass tc = new TestClass();
+ GC.SuppressFinalize(tc);
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call SuppressFinalize should prevent an object's finalizer is called during GC and then you can re-register is to finalizer calling queue");
+
+ try
+ {
+ TestClass.m_TestInt = TestClass.c_DEFAULT_VALUE;
+
+ PosTest2Worker();
+
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+ GC.Collect();
+
+ if (TestClass.m_TestInt != 0)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling SuppressFinalize prevents an object's finalizer is called during GC, but then call ReRegisterForFinalize method takes no effect");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] TestClass.m_TestInt = " + TestClass.m_TestInt);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ [MethodImplAttribute(MethodImplOptions.NoInlining)]
+ public void PosTest2Worker()
+ {
+ TestClass tc = new TestClass();
+ GC.SuppressFinalize(tc);
+ GC.ReRegisterForFinalize(tc);
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException should be thrown when obj is a null reference ");
+
+ try
+ {
+ GC.SuppressFinalize(null);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown when obj is a null reference");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ GCSuppressFinalize test = new GCSuppressFinalize();
+
+ TestLibrary.TestFramework.BeginTestCase("GCSuppressFinalize");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/gc/gcwaitforpendingfinalizers.cs b/tests/src/CoreMangLib/cti/system/gc/gcwaitforpendingfinalizers.cs
new file mode 100644
index 0000000000..bcc0261521
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/gc/gcwaitforpendingfinalizers.cs
@@ -0,0 +1,98 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+using System.Runtime.CompilerServices;
+
+public class TestClass
+{
+ GCWaitForPendingFinalizers creator;
+
+ public TestClass(GCWaitForPendingFinalizers _creator)
+ {
+ creator = _creator;
+ }
+
+ ~TestClass()
+ {
+ creator.f_TestClassFinalizerExecuted = true;
+ }
+}
+
+/// <summary>
+/// WaitForPendingFinalizers
+/// </summary>
+public class GCWaitForPendingFinalizers
+{
+ public bool f_TestClassFinalizerExecuted = false;
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call WaitForPendingFinalizers should wait all finalizer are called");
+
+ try
+ {
+ PosTest1Worker();
+
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+
+ if (!f_TestClassFinalizerExecuted)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Call WaitForPendingFinalizers does not wait for finalizer");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ [MethodImplAttribute(MethodImplOptions.NoInlining)]
+ public void PosTest1Worker()
+ {
+ TestClass tc = new TestClass(this);
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ GCWaitForPendingFinalizers test = new GCWaitForPendingFinalizers();
+
+ TestLibrary.TestFramework.BeginTestCase("GCWaitForPendingFinalizers");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/CalendarWeekRuleFirstDay.csproj b/tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/CalendarWeekRuleFirstDay.csproj
new file mode 100644
index 0000000000..a225d5eb2b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/CalendarWeekRuleFirstDay.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="calendarweekrulefirstday.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/CalendarWeekRuleFirstFourDayWeek.csproj b/tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/CalendarWeekRuleFirstFourDayWeek.csproj
new file mode 100644
index 0000000000..99a9c8edda
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/CalendarWeekRuleFirstFourDayWeek.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="calendarweekrulefirstfourdayweek.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/CalendarWeekRuleFirstFullWeek.csproj b/tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/CalendarWeekRuleFirstFullWeek.csproj
new file mode 100644
index 0000000000..3ba9a7f199
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/CalendarWeekRuleFirstFullWeek.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="calendarweekrulefirstfullweek.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/calendarweekrulefirstday.cs b/tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/calendarweekrulefirstday.cs
new file mode 100644
index 0000000000..fa911175e1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/calendarweekrulefirstday.cs
@@ -0,0 +1,70 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.CalendarWeekRule.FirstDay
+///</summary>
+
+public class CalendarWeekRuleFirstDay
+{
+
+ public static int Main()
+ {
+ CalendarWeekRuleFirstDay testObj = new CalendarWeekRuleFirstDay();
+ TestLibrary.TestFramework.BeginTestCase("for the System.CalendarWeekRule.FirstDay");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ int expectedValue = 0;
+ int actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get CalendarWeekRule.FirstDay");
+ try
+ {
+ actualValue = (int)CalendarWeekRule.FirstDay;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/calendarweekrulefirstfourdayweek.cs b/tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/calendarweekrulefirstfourdayweek.cs
new file mode 100644
index 0000000000..a8c3975dcf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/calendarweekrulefirstfourdayweek.cs
@@ -0,0 +1,70 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.CalendarWeekRule.FirstFourDayWeek
+///</summary>
+
+public class CalendarWeekRuleFirstFourDayWeek
+{
+
+ public static int Main()
+ {
+ CalendarWeekRuleFirstFourDayWeek testObj = new CalendarWeekRuleFirstFourDayWeek();
+ TestLibrary.TestFramework.BeginTestCase("for the System.CalendarWeekRule.FirstDay");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ int expectedValue = 2;
+ int actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get CalendarWeekRule.FirstFourDayWeek");
+ try
+ {
+ actualValue = (int)CalendarWeekRule.FirstFourDayWeek;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/calendarweekrulefirstfullweek.cs b/tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/calendarweekrulefirstfullweek.cs
new file mode 100644
index 0000000000..69258ffc1c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/calendarweekrulefirstfullweek.cs
@@ -0,0 +1,70 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.CalendarWeekRule.FirstFullWeek
+///</summary>
+
+public class CalendarWeekRuleFirstFullWeek
+{
+
+ public static int Main()
+ {
+ CalendarWeekRuleFirstFullWeek testObj = new CalendarWeekRuleFirstFullWeek();
+ TestLibrary.TestFramework.BeginTestCase("for the System.CalendarWeekRule.FirstDay");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ int expectedValue = 1;
+ int actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get CalendarWeekRule.FirstFullWeek");
+ try
+ {
+ actualValue = (int)CalendarWeekRule.FirstFullWeek;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/CharUnicodeInfoGetNumericValue1.csproj b/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/CharUnicodeInfoGetNumericValue1.csproj
new file mode 100644
index 0000000000..7ee428d34e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/CharUnicodeInfoGetNumericValue1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charunicodeinfogetnumericvalue1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/CharUnicodeInfoGetNumericValue2.csproj b/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/CharUnicodeInfoGetNumericValue2.csproj
new file mode 100644
index 0000000000..61274599c8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/CharUnicodeInfoGetNumericValue2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charunicodeinfogetnumericvalue2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/CharUnicodeInfoGetUnicodeCategory1.csproj b/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/CharUnicodeInfoGetUnicodeCategory1.csproj
new file mode 100644
index 0000000000..b9b9088b6b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/CharUnicodeInfoGetUnicodeCategory1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charunicodeinfogetunicodecategory1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/CharUnicodeInfoGetUnicodeCategory2.csproj b/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/CharUnicodeInfoGetUnicodeCategory2.csproj
new file mode 100644
index 0000000000..716b0f9ccf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/CharUnicodeInfoGetUnicodeCategory2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charunicodeinfogetunicodecategory2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/charunicodeinfogetnumericvalue1.cs b/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/charunicodeinfogetnumericvalue1.cs
new file mode 100644
index 0000000000..01926ba435
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/charunicodeinfogetnumericvalue1.cs
@@ -0,0 +1,226 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.CharUnicodeInfo.GetNumericValue(Char)
+///</summary>
+
+public class CharUnicodeInfoGetNumericValue
+{
+
+ public static int Main()
+ {
+ CharUnicodeInfoGetNumericValue testObj = new CharUnicodeInfoGetNumericValue();
+ TestLibrary.TestFramework.BeginTestCase("for method of System.Globalization.CharUnicodeInfo.GetNumericValue");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ Char ch = '\0';
+
+ Double expectedValue = -1;
+
+ Double actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(@"PosTest1:Test the method with '\0'");
+ try
+ {
+ actualValue = CharUnicodeInfo.GetNumericValue(ch);
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ Char ch = '0';
+
+ Double expectedValue = 0;
+
+ Double actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Test the method with char '0'");
+ try
+ {
+ actualValue = CharUnicodeInfo.GetNumericValue(ch);
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ Char ch = '9';
+
+ Double expectedValue = 9;
+
+ Double actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Test the method with char '9'");
+ try
+ {
+ actualValue = CharUnicodeInfo.GetNumericValue(ch);
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ Char ch = '\u3289';
+
+ Double expectedValue = 10;
+
+ Double actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Test the method with char '\\u3289'");
+ try
+ {
+ actualValue = CharUnicodeInfo.GetNumericValue(ch);
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("007", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ Char ch = 'a';
+
+ Double expectedValue = -1;
+
+ Double actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Test the method with char 'a'");
+ try
+ {
+ actualValue = CharUnicodeInfo.GetNumericValue(ch);
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("009", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ Char ch = 'Z';
+
+ Double expectedValue = -1;
+
+ Double actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Test the method with char 'Z'");
+ try
+ {
+ actualValue = CharUnicodeInfo.GetNumericValue(ch);
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("011", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/charunicodeinfogetnumericvalue2.cs b/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/charunicodeinfogetnumericvalue2.cs
new file mode 100644
index 0000000000..2e7403e65a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/charunicodeinfogetnumericvalue2.cs
@@ -0,0 +1,310 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.CharUnicodeInfo.GetNumericValue(System.String,System.Int32)
+///</summary>
+
+public class CharUnicodeInfoGetNumericValue
+{
+
+ public static int Main()
+ {
+ CharUnicodeInfoGetNumericValue testObj = new CharUnicodeInfoGetNumericValue();
+ TestLibrary.TestFramework.BeginTestCase("for method of System.Globalization.CharUnicodeInfo.GetNumericValue");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+
+ #region Positive Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ String str = "\009aZ\u0f33";
+
+ Double expectedValue = -1;
+
+ Double actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(@"PosTest1:Test the method with '\0'");
+ try
+ {
+ actualValue = CharUnicodeInfo.GetNumericValue(str,0);
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ String str = "\009aZ\u0f33";
+
+ Double expectedValue = 0;
+
+ Double actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Test the method with char '0'");
+ try
+ {
+ actualValue = CharUnicodeInfo.GetNumericValue(str,1);
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ String str = "\009aZ\u0f33";
+
+ Double expectedValue = 9;
+
+ Double actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Test the method with char '9'");
+ try
+ {
+ actualValue = CharUnicodeInfo.GetNumericValue(str,2);
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ String str = "\009aZ\u0f33";
+
+ Double expectedValue = -1;
+
+ Double actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Test the method with char 'a'");
+ try
+ {
+ actualValue = CharUnicodeInfo.GetNumericValue(str,3);
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("007", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ String str = "\009aZ\u0f33";
+
+ Double expectedValue = -1;
+
+ Double actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Test the method with char 'Z'");
+ try
+ {
+ actualValue = CharUnicodeInfo.GetNumericValue(str,4);
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("009", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ String str = "\009aZ\u0f33";
+
+ Double expectedValue = -0.5;
+
+ Double actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Test the method with char '\\u0f33'");
+ try
+ {
+ actualValue = CharUnicodeInfo.GetNumericValue(str,5);
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("011", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region Negative Test Logic
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ String str = null;
+ Double actureValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Invoke the method with null string");
+ try
+ {
+ actureValue = CharUnicodeInfo.GetNumericValue(str, 0);
+ TestLibrary.TestFramework.LogError("013", "No ArgumentNullExcepthion thrown out expected.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ String str = TestLibrary.Generator.GetString(-55, false,1,5);
+ Double actureValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Invoke the method with index out of left range");
+ try
+ {
+ actureValue = CharUnicodeInfo.GetNumericValue(str, -1);
+ TestLibrary.TestFramework.LogError("014", "No ArgumentNullExcepthion thrown out expected.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("015", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ String str = TestLibrary.Generator.GetString(-55, false, 1, 5);
+ Double actureValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Invoke the method with index out of right range");
+ try
+ {
+ actureValue = CharUnicodeInfo.GetNumericValue(str, 5);
+ TestLibrary.TestFramework.LogError("014", "No ArgumentNullExcepthion thrown out expected.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("015", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/charunicodeinfogetunicodecategory1.cs b/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/charunicodeinfogetunicodecategory1.cs
new file mode 100644
index 0000000000..ee79c21e2a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/charunicodeinfogetunicodecategory1.cs
@@ -0,0 +1,944 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.CharUnicodeInfo.GetUnicodeCategory(System.Char)
+///</summary>
+
+public class CharUnicodeInfoGetUnicodeCategory
+{
+
+ public static int Main()
+ {
+ CharUnicodeInfoGetUnicodeCategory testObj = new CharUnicodeInfoGetUnicodeCategory();
+ TestLibrary.TestFramework.BeginTestCase("for method of System.Globalization.CharUnicodeInfo.GetUnicodeCategory");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+ retVal = PosTest12() && retVal;
+ retVal = PosTest13() && retVal;
+ retVal = PosTest14() && retVal;
+ retVal = PosTest15() && retVal;
+ retVal = PosTest16() && retVal;
+ retVal = PosTest17() && retVal;
+ retVal = PosTest18() && retVal;
+ retVal = PosTest19() && retVal;
+ retVal = PosTest20() && retVal;
+ retVal = PosTest21() && retVal;
+ retVal = PosTest22() && retVal;
+ retVal = PosTest23() && retVal;
+ retVal = PosTest24() && retVal;
+ retVal = PosTest25() && retVal;
+ retVal = PosTest26() && retVal;
+ retVal = PosTest27() && retVal;
+ retVal = PosTest28() && retVal;
+ retVal = PosTest29() && retVal;
+ retVal = PosTest30() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ Char ch = 'A';
+
+ int expectedValue = (int)UnicodeCategory.UppercaseLetter;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Test the method with upper letter");
+
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ") when char is '" + ch + "'" );
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ Char ch = 'a';
+
+ int expectedValue = (int)UnicodeCategory.LowercaseLetter;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Test the method with low case char");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ Char ch = '\u1fa8'; //this char is a TitlecaseLetter char
+
+ int expectedValue = (int)UnicodeCategory.TitlecaseLetter;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Test the method with '\\0'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ Char ch = '\u02b0';
+
+ int expectedValue = (int)UnicodeCategory.ModifierLetter;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Test the method with '\\u02b0'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("007", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ Char ch = '\u404e';
+
+ int expectedValue = (int)UnicodeCategory.OtherLetter;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5:Test the method with '\\u404e'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("009", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ Char ch = '\u0300';
+
+ int expectedValue = (int)UnicodeCategory.NonSpacingMark;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6:Test the method with '\\u0300'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("011", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ Char ch = '\u0903';
+
+ int expectedValue = (int)UnicodeCategory.SpacingCombiningMark;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7:Test the method with '\\u0903'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("013", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+
+ Char ch = '\u0488';
+
+ int expectedValue = (int)UnicodeCategory.EnclosingMark;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest8:Test the method with '\\u0488'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("017", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+
+ Char ch = '0';
+
+ int expectedValue = (int)UnicodeCategory.DecimalDigitNumber;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest9:Test the method with '0'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("017", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest10()
+ {
+ bool retVal = true;
+
+ Char ch = '\u16ee';
+
+ int expectedValue = (int)UnicodeCategory.LetterNumber;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest10:Test the method with '\\u16ee'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("019", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest11()
+ {
+ bool retVal = true;
+
+ Char ch = '\u00b2';
+
+ int expectedValue = (int)UnicodeCategory.OtherNumber;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest11:Test the method with '\\u00b2'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("021", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("022", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest12()
+ {
+ bool retVal = true;
+
+ Char ch = '\u0020';
+
+ int expectedValue = (int)UnicodeCategory.SpaceSeparator;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest12:Test the method with '\\u0020'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("023", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("024", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest13()
+ {
+ bool retVal = true;
+
+ Char ch = '\u2028';
+
+ int expectedValue = (int)UnicodeCategory.LineSeparator;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest13:Test the method with '\\u2028'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("025", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("026", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest14()
+ {
+ bool retVal = true;
+
+ Char ch = '\u2029';
+
+ int expectedValue = (int)UnicodeCategory.ParagraphSeparator;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest14:Test the method with '\\u2029'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("027", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("028", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest15()
+ {
+ bool retVal = true;
+
+ Char ch = '\0';
+
+ int expectedValue = (int)UnicodeCategory.Control;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest15:Test the method with '\\0'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("029", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("030", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest16()
+ {
+ bool retVal = true;
+
+ Char ch = '\u00ad';
+
+ int expectedValue = (int)UnicodeCategory.Format;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest16:Test the method with '\\u00ad'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("031", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("032", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest17()
+ {
+ bool retVal = true;
+
+ Char ch = '\ud800';
+
+ int expectedValue = (int)UnicodeCategory.Surrogate;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest17:Test the method with '\\ud800'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("033", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("034", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest18()
+ {
+ bool retVal = true;
+
+ Char ch = '\ue000';
+
+ int expectedValue = (int)UnicodeCategory.PrivateUse;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest18:Test the method with '\\ue000'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("035", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("036", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest19()
+ {
+ bool retVal = true;
+
+ Char ch = '\u005f';
+
+ int expectedValue = (int)UnicodeCategory.ConnectorPunctuation;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest19:Test the method with '\\u005f'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("037", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("038", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest20()
+ {
+ bool retVal = true;
+
+ Char ch = '-';
+
+ int expectedValue = (int)UnicodeCategory.DashPunctuation;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest20:Test the method with '-'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("039", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("040", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest21()
+ {
+ bool retVal = true;
+
+ Char ch = '(';
+
+ int expectedValue = (int)UnicodeCategory.OpenPunctuation;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest21:Test the method with '('");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("041", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("042", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest22()
+ {
+ bool retVal = true;
+
+ Char ch = ')';
+
+ int expectedValue = (int)UnicodeCategory.ClosePunctuation;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest22:Test the method with ')'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("043", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("044", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest23()
+ {
+ bool retVal = true;
+
+ Char ch = '\u00ab';
+
+ int expectedValue = (int)UnicodeCategory.InitialQuotePunctuation;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest23:Test the method with '\\u00ab'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("045", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("046", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest24()
+ {
+ bool retVal = true;
+
+ Char ch = '\u00bb';
+
+ int expectedValue = (int)UnicodeCategory.FinalQuotePunctuation;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest24:Test the method with '\\u00bb'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("047", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("048", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest25()
+ {
+ bool retVal = true;
+
+ Char ch = '!';
+
+ int expectedValue = (int)UnicodeCategory.OtherPunctuation;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest25:Test the method with '!'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("049", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("050", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest26()
+ {
+ bool retVal = true;
+
+ Char ch = '+';
+
+ int expectedValue = (int)UnicodeCategory.MathSymbol;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest26:Test the method with '+'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("051", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("052", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest27()
+ {
+ bool retVal = true;
+
+ Char ch = '$';
+
+ int expectedValue = (int)UnicodeCategory.CurrencySymbol;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest27:Test the method with '$'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("053", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("054", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest28()
+ {
+ bool retVal = true;
+
+ Char ch = '^';
+
+ int expectedValue = (int)UnicodeCategory.ModifierSymbol;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest28:Test the method with '^'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("055", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("056", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest29()
+ {
+ bool retVal = true;
+
+ Char ch = '\u00a6';
+
+ int expectedValue = (int)UnicodeCategory.OtherSymbol;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest29:Test the method with '\\u00a6'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("057", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("058", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest30()
+ {
+ bool retVal = true;
+
+ Char ch = '\u0242';
+
+ int expectedValue = (int)UnicodeCategory.LowercaseLetter;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest30:Test the method with '\\u0242'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(ch));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("059", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("060", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/charunicodeinfogetunicodecategory2.cs b/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/charunicodeinfogetunicodecategory2.cs
new file mode 100644
index 0000000000..200ece2abc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/charunicodeinfogetunicodecategory2.cs
@@ -0,0 +1,1040 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.CharUnicodeInfo.GetUnicodeCategory(System.String,System.Int32)
+///</summary>
+
+public class CharUnicodeInfoGetUnicodeCategory
+{
+ public String str = "Aa\u1fa8\u02b0\u404e\u0300\u0903\u0488\u0030\u16ee\u00b2\u0020\u2028\u2029\0\u00ad\ud800\ue000\u005f\u002d()\u00ab\u00bb!+$^\u00a6\u0242";
+
+ public static int Main()
+ {
+ CharUnicodeInfoGetUnicodeCategory testObj = new CharUnicodeInfoGetUnicodeCategory();
+ TestLibrary.TestFramework.BeginTestCase("for method of System.Globalization.CharUnicodeInfo.GetUnicodeCategory");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+ retVal = PosTest12() && retVal;
+ retVal = PosTest13() && retVal;
+ retVal = PosTest14() && retVal;
+ retVal = PosTest15() && retVal;
+ retVal = PosTest16() && retVal;
+ retVal = PosTest17() && retVal;
+ retVal = PosTest18() && retVal;
+ retVal = PosTest19() && retVal;
+ retVal = PosTest20() && retVal;
+ retVal = PosTest21() && retVal;
+ retVal = PosTest22() && retVal;
+ retVal = PosTest23() && retVal;
+ retVal = PosTest24() && retVal;
+ retVal = PosTest25() && retVal;
+ retVal = PosTest26() && retVal;
+ retVal = PosTest27() && retVal;
+ retVal = PosTest28() && retVal;
+ retVal = PosTest29() && retVal;
+ retVal = PosTest30() && retVal;
+
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ return retVal;
+ }
+
+
+ #region Positive Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ Char ch = 'A';
+
+ int expectedValue = (int)UnicodeCategory.UppercaseLetter;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Test the method with upper letter");
+
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,0));
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ") when char is '" + ch + "'");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ Char ch = 'a';
+
+ int expectedValue = (int)UnicodeCategory.LowercaseLetter;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Test the method with low case char");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,1));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ Char ch = '\0';
+
+ int expectedValue = (int)UnicodeCategory.TitlecaseLetter;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Test the method with '\\0'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,2));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ Char ch = '\u02b0';
+
+ int expectedValue = (int)UnicodeCategory.ModifierLetter;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Test the method with '\\u02b0'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,3));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("007", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ Char ch = '\u404e';
+
+ int expectedValue = (int)UnicodeCategory.OtherLetter;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5:Test the method with '\\u404e'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,4));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("009", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ Char ch = '\u0300';
+
+ int expectedValue = (int)UnicodeCategory.NonSpacingMark;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6:Test the method with '\\u0300'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,5));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("011", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ Char ch = '\u0903';
+
+ int expectedValue = (int)UnicodeCategory.SpacingCombiningMark;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7:Test the method with '\\u0903'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,6));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("013", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+
+ Char ch = '\u0488';
+
+ int expectedValue = (int)UnicodeCategory.EnclosingMark;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest8:Test the method with '\\u0488'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,7));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("017", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+
+ Char ch = '0';
+
+ int expectedValue = (int)UnicodeCategory.DecimalDigitNumber;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest9:Test the method with '0'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,8));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("017", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest10()
+ {
+ bool retVal = true;
+
+ Char ch = '\u16ee';
+
+ int expectedValue = (int)UnicodeCategory.LetterNumber;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest10:Test the method with '\\u16ee'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,9));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("019", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest11()
+ {
+ bool retVal = true;
+
+ Char ch = '\u00b2';
+
+ int expectedValue = (int)UnicodeCategory.OtherNumber;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest11:Test the method with '\\u00b2'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,10));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("021", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("022", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest12()
+ {
+ bool retVal = true;
+
+ Char ch = '\u0020';
+
+ int expectedValue = (int)UnicodeCategory.SpaceSeparator;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest12:Test the method with '\\u0020'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,11));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("023", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("024", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest13()
+ {
+ bool retVal = true;
+
+ Char ch = '\u2028';
+
+ int expectedValue = (int)UnicodeCategory.LineSeparator;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest13:Test the method with '\\u2028'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,12));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("025", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("026", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest14()
+ {
+ bool retVal = true;
+
+ Char ch = '\u2029';
+
+ int expectedValue = (int)UnicodeCategory.ParagraphSeparator;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest14:Test the method with '\\u2029'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,13));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("027", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("028", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest15()
+ {
+ bool retVal = true;
+
+ Char ch = '\0';
+
+ int expectedValue = (int)UnicodeCategory.Control;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest15:Test the method with '\\0'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,14));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("029", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("030", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest16()
+ {
+ bool retVal = true;
+
+ Char ch = '\u00ad';
+
+ int expectedValue = (int)UnicodeCategory.Format;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest16:Test the method with '\\u00ad'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,15));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("031", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("032", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest17()
+ {
+ bool retVal = true;
+
+ Char ch = '\ud800';
+
+ int expectedValue = (int)UnicodeCategory.Surrogate;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest17:Test the method with '\\ud800'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,16));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("033", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("034", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest18()
+ {
+ bool retVal = true;
+
+ Char ch = '\ue000';
+
+ int expectedValue = (int)UnicodeCategory.PrivateUse;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest18:Test the method with '\\ue000'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,17));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("035", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("036", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest19()
+ {
+ bool retVal = true;
+
+ Char ch = '\u005f';
+
+ int expectedValue = (int)UnicodeCategory.ConnectorPunctuation;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest19:Test the method with '\\u005f'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,18));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("037", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("038", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest20()
+ {
+ bool retVal = true;
+
+ Char ch = '-';
+
+ int expectedValue = (int)UnicodeCategory.DashPunctuation;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest20:Test the method with '-'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,19));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("039", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("040", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest21()
+ {
+ bool retVal = true;
+
+ Char ch = '(';
+
+ int expectedValue = (int)UnicodeCategory.OpenPunctuation;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest21:Test the method with '('");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,20));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("041", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("042", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest22()
+ {
+ bool retVal = true;
+
+ Char ch = ')';
+
+ int expectedValue = (int)UnicodeCategory.ClosePunctuation;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest22:Test the method with ')'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,21));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("043", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("044", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest23()
+ {
+ bool retVal = true;
+
+ Char ch = '\u00ab';
+
+ int expectedValue = (int)UnicodeCategory.InitialQuotePunctuation;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest23:Test the method with '\\u00ab'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,22));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("045", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("046", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest24()
+ {
+ bool retVal = true;
+
+ Char ch = '\u00bb';
+
+ int expectedValue = (int)UnicodeCategory.FinalQuotePunctuation;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest24:Test the method with '\\u00bb'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,23));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("047", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("048", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest25()
+ {
+ bool retVal = true;
+
+ Char ch = '!';
+
+ int expectedValue = (int)UnicodeCategory.OtherPunctuation;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest25:Test the method with '!'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,24));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("049", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("050", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest26()
+ {
+ bool retVal = true;
+
+ Char ch = '+';
+
+ int expectedValue = (int)UnicodeCategory.MathSymbol;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest26:Test the method with '+'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,25));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("051", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("052", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest27()
+ {
+ bool retVal = true;
+
+ Char ch = '$';
+
+ int expectedValue = (int)UnicodeCategory.CurrencySymbol;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest27:Test the method with '$'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,26));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("053", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("054", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest28()
+ {
+ bool retVal = true;
+
+ Char ch = '^';
+
+ int expectedValue = (int)UnicodeCategory.ModifierSymbol;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest28:Test the method with '^'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,27));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("055", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("056", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest29()
+ {
+ bool retVal = true;
+
+ Char ch = '\u00a6';
+
+ int expectedValue = (int)UnicodeCategory.OtherSymbol;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest29:Test the method with '\\u00a6'");
+ try
+ {
+ actualValue = (int)(CharUnicodeInfo.GetUnicodeCategory(str,28));
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("057", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("058", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest30()
+ {
+ bool retVal = true;
+
+ Char ch = '\u0242';
+
+ // The values 0242 thru 024F on the Mac PPC (which is unicode 4.0) are OtherNotAssigned
+ // On Whidbey (QFE branch), Telesto and Intel Mac this 0242 has the value of LowercaseLetter
+ int expectedValue = (int)UnicodeCategory.LowercaseLetter;
+ if ((!TestLibrary.Utilities.IsWindows) && (TestLibrary.Utilities.IsBigEndian))
+ {
+ expectedValue = (int)UnicodeCategory.OtherNotAssigned;
+ }
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest30:Test the method with '\\u0242'");
+ try
+ {
+ actualValue = (int) CharUnicodeInfo.GetUnicodeCategory(str,29);
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("059", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("060", "when char is '" + ch + "',Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negative Test Logic
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ String testStr = null;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Invoke the method with null string");
+ try
+ {
+ actualValue = (int)CharUnicodeInfo.GetUnicodeCategory(testStr, 0);
+ TestLibrary.TestFramework.LogError("061", "No ArgumentNullExcepthion thrown out expected.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("062", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ int actualValue;
+
+ String testStr = TestLibrary.Generator.GetString(-55, false,1,5);
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2:Invoke the method with index out of left range.");
+ try
+ {
+ actualValue = (int)CharUnicodeInfo.GetUnicodeCategory(testStr, -1);
+ TestLibrary.TestFramework.LogError("063", "No ArgumentNullExcepthion thrown out expected.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("064", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ int actualValue;
+
+ String testStr = TestLibrary.Generator.GetString(-55, false,1,5);
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3:Invoke the method with index out of right range");
+ try
+ {
+ actualValue = (int)CharUnicodeInfo.GetUnicodeCategory(testStr, 6);
+ TestLibrary.TestFramework.LogError("065", "No ArgumentNullExcepthion thrown out expected.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("066", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/compareinfo/CompareInfoCompare2.csproj b/tests/src/CoreMangLib/cti/system/globalization/compareinfo/CompareInfoCompare2.csproj
new file mode 100644
index 0000000000..4f954662f2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/compareinfo/CompareInfoCompare2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="compareinfocompare2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/compareinfo/CompareInfoIndexOf2.csproj b/tests/src/CoreMangLib/cti/system/globalization/compareinfo/CompareInfoIndexOf2.csproj
new file mode 100644
index 0000000000..e0e2211392
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/compareinfo/CompareInfoIndexOf2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="compareinfoindexof2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/compareinfo/compareinfocompare2.cs b/tests/src/CoreMangLib/cti/system/globalization/compareinfo/compareinfocompare2.cs
new file mode 100644
index 0000000000..f8c05e97b8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/compareinfo/compareinfocompare2.cs
@@ -0,0 +1,218 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+using System.Globalization;
+using TestLibrary;
+
+public class CompareInfoCompare
+{
+ public static string[] InterestingStrings = new string[] { null, "", "a", "1", "-", "A", "!", "abc", "aBc", "a\u0400Bc", "I", "i", "\u0130", "\u0131", "A", "\uFF21", "\uFE57"};
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Compare interesting strings ordinally");
+
+ try
+ {
+ foreach (string s in InterestingStrings)
+ {
+ foreach (string r in InterestingStrings)
+ {
+ retVal &= TestStrings(s, r);
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Compare many characters");
+
+ try
+ {
+ for (int i = 0; i < 40; i++) // Ok, 40 isn't that many... but this takes way too long
+ {
+ char c = Generator.GetChar(-55);
+ if (Utilities.CurrentCulture.CompareInfo.Compare(new string(new char[] { c }), new string(new char[] { c }), CompareOptions.Ordinal) != 0)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Character " + i.ToString() + " is not equal to itself ordinally!");
+ retVal = false;
+ }
+
+ for (int j = 0; j < (int)c; j++)
+ {
+ int compareResult = Utilities.CurrentCulture.CompareInfo.Compare(new string(new char[] { c }), new string(new char[] { (char)j }), CompareOptions.Ordinal);
+ if (compareResult != 0) compareResult = compareResult / Math.Abs(compareResult);
+ if (compareResult != 1)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Character " + ((int)c).ToString() + " is not greater than character " + j.ToString() + ", Compare result: " + compareResult.ToString());
+ retVal = false;
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.4", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Compare many strings");
+
+ try
+ {
+ for (int i = 0; i < 1000; i++)
+ {
+ string str1 = Generator.GetString(-55, false, 5, 20);
+ string str2 = Generator.GetString(-55, false, 5, 20);
+ if (Utilities.CurrentCulture.CompareInfo.Compare(str1, str1, CompareOptions.Ordinal) != 0)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Comparison not as expected! Acutal result: " + Utilities.CurrentCulture.CompareInfo.Compare(str1, str1, CompareOptions.Ordinal).ToString() + ", Expected result: 0");
+ TestLibrary.TestFramework.LogInformation("String 1: <" + str1 + "> : " + BytesFromString(str1) + "\nString 2: <" + str1 + "> : " + BytesFromString(str1));
+ retVal = false;
+ }
+ if (Utilities.CurrentCulture.CompareInfo.Compare(str2, str2, CompareOptions.Ordinal) != 0)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Comparison not as expected! Acutal result: " + Utilities.CurrentCulture.CompareInfo.Compare(str2, str2, CompareOptions.Ordinal).ToString() + ", Expected result: 0");
+ TestLibrary.TestFramework.LogInformation("String 1: <" + str2 + "> : " + BytesFromString(str2) + "\nString 2: <" + str2 + "> : " + BytesFromString(str2));
+ retVal = false;
+ }
+ TestStrings(str1, str2);
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.4", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Specific regression cases");
+
+ try
+ {
+ CultureInfo oldCi = Utilities.CurrentCulture;
+ Utilities.CurrentCulture = new CultureInfo("hu-HU");
+ retVal &= TestStrings("dzsdzs", "ddzs");
+ Utilities.CurrentCulture = oldCi;
+
+ retVal &= TestStrings("\u00C0nimal", "A\u0300nimal");
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public static int Main()
+ {
+ CompareInfoCompare test = new CompareInfoCompare();
+
+ TestLibrary.TestFramework.BeginTestCase("CompareInfoCompare");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ private bool TestStrings(string str1, string str2)
+ {
+ bool retVal = true;
+
+ int expectValue = PredictValue(str1, str2);
+ int actualValue = Utilities.CurrentCulture.CompareInfo.Compare(str1, str2, CompareOptions.Ordinal);
+ if (expectValue != 0) expectValue = expectValue / Math.Abs(expectValue);
+ if (actualValue != 0) actualValue = actualValue / Math.Abs(actualValue);
+
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Comparison not as expected! Acutal result: " + actualValue + ", Expected result: " + expectValue);
+ TestLibrary.TestFramework.LogInformation("String 1: <" + str1 + "> : " + BytesFromString(str1) + "\nString 2: <" + str2 + "> : " + BytesFromString(str2));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ int PredictValue(string str1, string str2)
+ {
+ if (str1 == null)
+ {
+ if (str2 == null) return 0;
+ else return -1;
+ }
+ if (str2 == null) return 1;
+
+ for (int i = 0; i < str1.Length; i++)
+ {
+ if (i >= str2.Length) return 1;
+ if ((int)str1[i] > (int)str2[i]) return 1;
+ if ((int)str1[i] < (int)str2[i]) return -1;
+ }
+
+ if (str2.Length > str1.Length) return -1;
+
+ return 0;
+ }
+
+ private static string BytesFromString(string str)
+ {
+ if (str == null) return string.Empty;
+ StringBuilder output = new StringBuilder();
+ for (int i = 0; i < str.Length; i++)
+ {
+ output.Append(Utilities.ByteArrayToString(BitConverter.GetBytes(str[i])));
+ if (i != (str.Length - 1)) output.Append(", ");
+ }
+ return output.ToString();
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/compareinfo/compareinfoindexof2.cs b/tests/src/CoreMangLib/cti/system/globalization/compareinfo/compareinfoindexof2.cs
new file mode 100644
index 0000000000..4a653b8bc9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/compareinfo/compareinfoindexof2.cs
@@ -0,0 +1,185 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+using System.Globalization;
+using TestLibrary;
+
+public class CompareInfoIndexOf
+{
+ public static string[] InterestingStrings = new string[] { "", "a", "1", "-", "A", "!", "abc", "aBc", "a\u0400Bc", "I", "i", "\u0130", "\u0131", "A", "\uFF21", "\uFE57"};
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Compare interesting strings ordinally");
+
+ try
+ {
+ foreach (string s in InterestingStrings)
+ {
+ foreach (string r in InterestingStrings)
+ {
+ retVal &= TestStrings(s, r);
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Compare many strings");
+
+ try
+ {
+ for (int i = 0; i < 1000; i++)
+ {
+ string str1 = Generator.GetString(-55, false, 5, 20);
+ string str2 = Generator.GetString(-55, false, 5, 20);
+ if (Utilities.CurrentCulture.CompareInfo.IndexOf(str1, str1, CompareOptions.Ordinal) != 0)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Comparison not as expected! Actual result: " + Utilities.CurrentCulture.CompareInfo.IndexOf(str1, str1, CompareOptions.Ordinal).ToString() + ", Expected result: 0");
+ TestLibrary.TestFramework.LogInformation("String 1: <" + str1 + "> : " + BytesFromString(str1) + "\nString 2: <" + str1 + "> : " + BytesFromString(str1));
+ retVal = false;
+ }
+ if (Utilities.CurrentCulture.CompareInfo.IndexOf(str2, str2, CompareOptions.Ordinal) != 0)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Comparison not as expected! Actual result: " + Utilities.CurrentCulture.CompareInfo.IndexOf(str2, str2, CompareOptions.Ordinal).ToString() + ", Expected result: 0");
+ TestLibrary.TestFramework.LogInformation("String 1: <" + str2 + "> : " + BytesFromString(str2) + "\nString 2: <" + str2 + "> : " + BytesFromString(str2));
+ retVal = false;
+ }
+ TestStrings(str1, str2);
+ TestStrings(str1 + str2, str2);
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.4", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Specific regression cases");
+
+ try
+ {
+ CultureInfo oldCi = Utilities.CurrentCulture;
+ Utilities.CurrentCulture = new CultureInfo("hu-HU");
+ retVal &= TestStrings("Foodzsdzsbar", "ddzs");
+ Utilities.CurrentCulture = oldCi;
+
+ retVal &= TestStrings("\u00C0nimal", "A\u0300");
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public static int Main()
+ {
+ CompareInfoIndexOf test = new CompareInfoIndexOf();
+
+ TestLibrary.TestFramework.BeginTestCase("CompareInfoIndexOf");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ private bool TestStrings(string str1, string str2)
+ {
+ bool retVal = true;
+
+ int expectValue = PredictValue(str1, str2);
+ int actualValue = Utilities.CurrentCulture.CompareInfo.IndexOf(str1, str2, CompareOptions.Ordinal);
+
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Comparison not as expected! Actual result: " + actualValue + ", Expected result: " + expectValue);
+ TestLibrary.TestFramework.LogInformation("String 1: <" + str1 + "> : " + BytesFromString(str1) + "\nString 2: <" + str2 + "> : " + BytesFromString(str2));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ int PredictValue(string str1, string str2)
+ {
+ if (str1 == null)
+ {
+ if (str2 == null) return 0;
+ else return -1;
+ }
+ if (str2 == null) return -1;
+
+ if (str2.Length > str1.Length) return -1;
+
+ for (int i = 0; i <= str1.Length - str2.Length; i++)
+ {
+ bool match = true;
+ for (int j = 0; j < str2.Length; j++)
+ {
+ if ((int)str1[i + j] != (int)str2[j])
+ {
+ match = false;
+ break;
+ }
+ }
+ if (match) return i;
+ }
+ return -1;
+ }
+
+ private static string BytesFromString(string str)
+ {
+ if (str == null) return string.Empty;
+ StringBuilder output = new StringBuilder();
+ for (int i = 0; i < str.Length; i++)
+ {
+ output.Append(Utilities.ByteArrayToString(BitConverter.GetBytes(str[i])));
+ if (i != (str.Length - 1)) output.Append(", ");
+ }
+ return output.ToString();
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsIgnoreCase.csproj b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsIgnoreCase.csproj
new file mode 100644
index 0000000000..4786f6a0f0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsIgnoreCase.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="compareoptionsignorecase.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsIgnoreKanaType.csproj b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsIgnoreKanaType.csproj
new file mode 100644
index 0000000000..e281e195aa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsIgnoreKanaType.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="compareoptionsignorekanatype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsIgnoreNonSpace.csproj b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsIgnoreNonSpace.csproj
new file mode 100644
index 0000000000..1ef959adfe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsIgnoreNonSpace.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="compareoptionsignorenonspace.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsIgnoreSymbols.csproj b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsIgnoreSymbols.csproj
new file mode 100644
index 0000000000..692ab099e8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsIgnoreSymbols.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="compareoptionsignoresymbols.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsIgnoreWidth.csproj b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsIgnoreWidth.csproj
new file mode 100644
index 0000000000..79afcada8e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsIgnoreWidth.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="compareoptionsignorewidth.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsNone.csproj b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsNone.csproj
new file mode 100644
index 0000000000..0657d01721
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsNone.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="compareoptionsnone.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsOrdinal.csproj b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsOrdinal.csproj
new file mode 100644
index 0000000000..9884209bb5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsOrdinal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="compareoptionsordinal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsOrdinalIgoreCase.csproj b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsOrdinalIgoreCase.csproj
new file mode 100644
index 0000000000..719a7f491e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsOrdinalIgoreCase.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="compareoptionsordinaligorecase.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsStringSort.csproj b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsStringSort.csproj
new file mode 100644
index 0000000000..339c0bb9fc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/CompareOptionsStringSort.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="compareoptionsstringsort.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsignorecase.cs b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsignorecase.cs
new file mode 100644
index 0000000000..7217e6d487
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsignorecase.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.CompareOptions.IgnoreCase
+///</summary>
+
+public class CompareOptionsIgnoreCase
+{
+
+ public static int Main()
+ {
+ CompareOptionsIgnoreCase testObj = new CompareOptionsIgnoreCase();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.Globalization.CompareOptions.IgnoreCase");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ UInt64 expectedValue = 0x00000001;
+ UInt64 actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get CompareOptions.IgnoreCase");
+ try
+ {
+ actualValue = (UInt64)CompareOptions.IgnoreCase;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsignorekanatype.cs b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsignorekanatype.cs
new file mode 100644
index 0000000000..47031cd2a0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsignorekanatype.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.CompareOptions.IgnoreKanaType
+///</summary>
+
+public class CompareOptionsIgnoreKanaType
+{
+
+ public static int Main()
+ {
+ CompareOptionsIgnoreKanaType testObj = new CompareOptionsIgnoreKanaType();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.Globalization.CompareOptions.IgnoreKanaType");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ UInt64 expectedValue = 0x00000008;
+ UInt64 actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get CompareOptions.IgnoreKanaType");
+ try
+ {
+ actualValue = (UInt64)CompareOptions.IgnoreKanaType;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsignorenonspace.cs b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsignorenonspace.cs
new file mode 100644
index 0000000000..6a561951d8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsignorenonspace.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.CompareOptions.IgnoreNonSpace
+///</summary>
+
+public class CompareOptionsIgnoreNonSpace
+{
+
+ public static int Main()
+ {
+ CompareOptionsIgnoreNonSpace testObj = new CompareOptionsIgnoreNonSpace();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.Globalization.CompareOptions.IgnoreNonSpace");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ UInt64 expectedValue = 0x00000002;
+ UInt64 actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get CompareOptions.IgnoreNonSpace");
+ try
+ {
+ actualValue = (UInt64)CompareOptions.IgnoreNonSpace;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsignoresymbols.cs b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsignoresymbols.cs
new file mode 100644
index 0000000000..39ebfd22ce
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsignoresymbols.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.CompareOptions.IgnoreSymbols
+///</summary>
+
+public class CompareOptionsIgnoreSymbols
+{
+
+ public static int Main()
+ {
+ CompareOptionsIgnoreSymbols testObj = new CompareOptionsIgnoreSymbols();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.Globalization.CompareOptions.IgnoreSymbols");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ UInt64 expectedValue = 0x00000004;
+ UInt64 actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get CompareOptions.IgnoreSymbols");
+ try
+ {
+ actualValue = (UInt64)CompareOptions.IgnoreSymbols;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsignorewidth.cs b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsignorewidth.cs
new file mode 100644
index 0000000000..abedd43452
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsignorewidth.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.CompareOptions.IgnoreWidth
+///</summary>
+
+public class CompareOptionsIgnoreWidth
+{
+
+ public static int Main()
+ {
+ CompareOptionsIgnoreWidth testObj = new CompareOptionsIgnoreWidth();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.Globalization.CompareOptions.IgnoreWidth");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ UInt64 expectedValue = 0x00000010;
+ UInt64 actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get CompareOptions.IgnoreWidth");
+ try
+ {
+ actualValue = (UInt64)CompareOptions.IgnoreWidth;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsnone.cs b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsnone.cs
new file mode 100644
index 0000000000..5fe1b92c4d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsnone.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.CompareOptions.None
+///</summary>
+
+public class CompareOptionsNone
+{
+
+ public static int Main()
+ {
+ CompareOptionsNone testObj = new CompareOptionsNone();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.Globalization.CompareOptions.None");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ UInt64 expectedValue = 0x00000000;
+ UInt64 actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get CompareOptions.None");
+ try
+ {
+ actualValue = (UInt64)CompareOptions.None;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsordinal.cs b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsordinal.cs
new file mode 100644
index 0000000000..991754c1e8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsordinal.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.CompareOptions.Ordinal
+///</summary>
+
+public class CompareOptionsOrdinal
+{
+
+ public static int Main()
+ {
+ CompareOptionsOrdinal testObj = new CompareOptionsOrdinal();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.Globalization.CompareOptions.Ordinal");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ UInt64 expectedValue = 0x40000000;
+ UInt64 actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get CompareOptions.Ordinal");
+ try
+ {
+ actualValue = (UInt64)CompareOptions.Ordinal;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsordinaligorecase.cs b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsordinaligorecase.cs
new file mode 100644
index 0000000000..cdcc9175df
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsordinaligorecase.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.CompareOptions.OrdinalIgnoreCase
+///</summary>
+
+public class CompareOptionsOrdinalIgnoreCase
+{
+
+ public static int Main()
+ {
+ CompareOptionsOrdinalIgnoreCase testObj = new CompareOptionsOrdinalIgnoreCase();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.Globalization.CompareOptions.OrdinalIgnoreCase");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ UInt64 expectedValue = 0x10000000;
+ UInt64 actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get CompareOptions.OrdinalIgnoreCase");
+ try
+ {
+ actualValue = (UInt64)CompareOptions.OrdinalIgnoreCase;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsstringsort.cs b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsstringsort.cs
new file mode 100644
index 0000000000..15868acbf6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsstringsort.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.CompareOptions.StringSort
+///</summary>
+
+public class CompareOptionsStringSort
+{
+
+ public static int Main()
+ {
+ CompareOptionsStringSort testObj = new CompareOptionsStringSort();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.Globalization.CompareOptions.StringSort");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ UInt64 expectedValue = 0x20000000;
+ UInt64 actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get CompareOptions.StringSort");
+ try
+ {
+ actualValue = (UInt64)CompareOptions.StringSort;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoClone.csproj b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoClone.csproj
new file mode 100644
index 0000000000..3114583b30
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoClone.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="cultureinfoclone.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoEnglishName.csproj b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoEnglishName.csproj
new file mode 100644
index 0000000000..c4ad0843ad
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoEnglishName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="cultureinfoenglishname.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoEquals.csproj b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoEquals.csproj
new file mode 100644
index 0000000000..f102f04769
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoEquals.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="cultureinfoequals.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoGetCultureInfo2.csproj b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoGetCultureInfo2.csproj
new file mode 100644
index 0000000000..849865924c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoGetCultureInfo2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="cultureinfogetcultureinfo2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoGetHashCode.csproj
new file mode 100644
index 0000000000..635338451f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="cultureinfogethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoInvariantCulture.csproj b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoInvariantCulture.csproj
new file mode 100644
index 0000000000..47c0e85e3c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoInvariantCulture.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="cultureinfoinvariantculture.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoIsNeutralCulture.csproj b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoIsNeutralCulture.csproj
new file mode 100644
index 0000000000..2b4a504c11
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoIsNeutralCulture.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="cultureinfoisneutralculture.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoName.csproj b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoName.csproj
new file mode 100644
index 0000000000..a923906f7f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="cultureinfoname.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoNativeName.csproj b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoNativeName.csproj
new file mode 100644
index 0000000000..fd8eeafc8b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoNativeName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="cultureinfonativename.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoParent.csproj b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoParent.csproj
new file mode 100644
index 0000000000..91b9dee20f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoParent.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="cultureinfoparent.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoReadOnly.csproj b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoReadOnly.csproj
new file mode 100644
index 0000000000..c86f59799e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoReadOnly.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="cultureinforeadonly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoTextInfo.csproj b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoTextInfo.csproj
new file mode 100644
index 0000000000..77aaf35c39
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoTextInfo.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="cultureinfotextinfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoToString.csproj b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoToString.csproj
new file mode 100644
index 0000000000..a70c9acf42
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoToString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="cultureinfotostring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoTwoLetterISOLanguageName.csproj b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoTwoLetterISOLanguageName.csproj
new file mode 100644
index 0000000000..113a11d68a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/CultureInfoTwoLetterISOLanguageName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="cultureinfotwoletterisolanguagename.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoclone.cs b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoclone.cs
new file mode 100644
index 0000000000..3fb2ec0434
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoclone.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoenglishname.cs b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoenglishname.cs
new file mode 100644
index 0000000000..0d7244e608
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoenglishname.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoequals.cs b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoequals.cs
new file mode 100644
index 0000000000..de2c612a3a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoequals.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfogetcultureinfo2.cs b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfogetcultureinfo2.cs
new file mode 100644
index 0000000000..187bdd9794
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfogetcultureinfo2.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfogethashcode.cs b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfogethashcode.cs
new file mode 100644
index 0000000000..14b746047a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfogethashcode.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoinvariantculture.cs b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoinvariantculture.cs
new file mode 100644
index 0000000000..c325160b00
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoinvariantculture.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoisneutralculture.cs b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoisneutralculture.cs
new file mode 100644
index 0000000000..53770fba4d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoisneutralculture.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoname.cs b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoname.cs
new file mode 100644
index 0000000000..83dd460d10
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoname.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfonativename.cs b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfonativename.cs
new file mode 100644
index 0000000000..b42972a706
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfonativename.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoparent.cs b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoparent.cs
new file mode 100644
index 0000000000..079d6c79e7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfoparent.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinforeadonly.cs b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinforeadonly.cs
new file mode 100644
index 0000000000..2df3f6c921
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinforeadonly.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfotextinfo.cs b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfotextinfo.cs
new file mode 100644
index 0000000000..973a349441
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfotextinfo.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfotostring.cs b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfotostring.cs
new file mode 100644
index 0000000000..250b9949e2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfotostring.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfotwoletterisolanguagename.cs b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfotwoletterisolanguagename.cs
new file mode 100644
index 0000000000..1b990e69ed
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/cultureinfo/cultureinfotwoletterisolanguagename.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoClone.csproj b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoClone.csproj
new file mode 100644
index 0000000000..b5aaef7ee3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoClone.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimeformatinfoclone.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoCurrentInfo.csproj b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoCurrentInfo.csproj
new file mode 100644
index 0000000000..25a21a208a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoCurrentInfo.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimeformatinfocurrentinfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoGetAbbreviatedMonthName.csproj b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoGetAbbreviatedMonthName.csproj
new file mode 100644
index 0000000000..a1c4a8c122
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoGetAbbreviatedMonthName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimeformatinfogetabbreviatedmonthname.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoGetFormat.csproj b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoGetFormat.csproj
new file mode 100644
index 0000000000..b6b29fd2d0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoGetFormat.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimeformatinfogetformat.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoGetInstance.csproj b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoGetInstance.csproj
new file mode 100644
index 0000000000..c78d2041ae
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoGetInstance.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimeformatinfogetinstance.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoGetMonthName.csproj b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoGetMonthName.csproj
new file mode 100644
index 0000000000..772207d5cd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoGetMonthName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimeformatinfogetmonthname.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoInvariantInfo.csproj b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoInvariantInfo.csproj
new file mode 100644
index 0000000000..0667522ae3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoInvariantInfo.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimeformatinfoinvariantinfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoIsReadOnly.csproj b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoIsReadOnly.csproj
new file mode 100644
index 0000000000..ea61dda12b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoIsReadOnly.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimeformatinfoisreadonly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoRFC1123Pattern.csproj b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoRFC1123Pattern.csproj
new file mode 100644
index 0000000000..deb0f8c023
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoRFC1123Pattern.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimeformatinforfc1123pattern.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoReadOnly.csproj b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoReadOnly.csproj
new file mode 100644
index 0000000000..b1f30a1e98
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoReadOnly.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimeformatinforeadonly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoSortableDateTimePattern.csproj b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoSortableDateTimePattern.csproj
new file mode 100644
index 0000000000..ae1af29c3e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/DateTimeFormatInfoSortableDateTimePattern.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimeformatinfosortabledatetimepattern.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/UniversalSortableDateTimePattern.csproj b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/UniversalSortableDateTimePattern.csproj
new file mode 100644
index 0000000000..3ef122ca51
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/UniversalSortableDateTimePattern.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimeformatinfouniversalsortabledatetimepattern.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfoclone.cs b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfoclone.cs
new file mode 100644
index 0000000000..49137b156b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfoclone.cs
@@ -0,0 +1,239 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Clone
+/// </summary>
+public class DateTimeFormatInfoClone
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Clone method on a instance created from Ctor");
+
+ try
+ {
+ DateTimeFormatInfo expected = new DateTimeFormatInfo();
+
+ retVal = VerificationHelper(expected, expected.Clone(), "001.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Clone method on a instance created from several cultures");
+
+ try
+ {
+ DateTimeFormatInfo expected = new CultureInfo("en-us").DateTimeFormat;
+ retVal = VerificationHelper(expected, expected.Clone(), "002.1") && retVal;
+
+ expected = new CultureInfo("fr-FR").DateTimeFormat;
+ retVal = VerificationHelper(expected, expected.Clone(), "002.2") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call Clone method on a readonly instance created from several cultures");
+
+ try
+ {
+ DateTimeFormatInfo expected = CultureInfo.InvariantCulture.DateTimeFormat;
+ retVal = VerificationHelper(expected, expected.Clone(), "003.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DateTimeFormatInfoClone test = new DateTimeFormatInfoClone();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeFormatInfoClone");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(DateTimeFormatInfo expected, Object obj, string errorno)
+ {
+ bool retval = true;
+
+ if (!(obj is DateTimeFormatInfo))
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "Calling Clone method does not return an DateTimeFormatInfo copy");
+ retval = false;
+ }
+
+ DateTimeFormatInfo actual = obj as DateTimeFormatInfo;
+ if ( actual.IsReadOnly )
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "Calling Clone method makes DateTimeFormatInfo copy read only");
+ retval = false;
+ }
+
+ retval =
+ IsEquals(actual.AbbreviatedDayNames, expected.AbbreviatedDayNames, errorno + ".3") &&
+ IsEquals(actual.AbbreviatedMonthGenitiveNames, expected.AbbreviatedMonthGenitiveNames, errorno + ".4") &&
+ IsEquals(actual.AbbreviatedMonthNames, expected.AbbreviatedMonthNames, errorno + ".5") &&
+ IsEquals(actual.DayNames, expected.DayNames, errorno + ".6") &&
+ IsEquals(actual.MonthGenitiveNames, expected.MonthGenitiveNames, errorno + ".7") &&
+ IsEquals(actual.MonthNames, expected.MonthNames, errorno + ".8") &&
+ IsEquals(actual.ShortestDayNames, expected.ShortestDayNames, errorno + ".9") &&
+ IsEquals(actual.AMDesignator, expected.AMDesignator, errorno + ".10") &&
+ //DateTimeFormatInfo.DateSeparator property has been removed
+ IsEquals(actual.FullDateTimePattern, expected.FullDateTimePattern, errorno + ".12") &&
+ IsEquals(actual.LongDatePattern, expected.LongDatePattern, errorno + ".13") &&
+ IsEquals(actual.LongTimePattern, expected.LongTimePattern, errorno + ".14") &&
+ IsEquals(actual.MonthDayPattern, expected.MonthDayPattern, errorno + ".15") &&
+ IsEquals(actual.PMDesignator, expected.PMDesignator, errorno + ".17") &&
+ IsEquals(actual.RFC1123Pattern, expected.RFC1123Pattern, errorno + ".18") &&
+ IsEquals(actual.ShortDatePattern, expected.ShortDatePattern, errorno + ".19") &&
+ IsEquals(actual.ShortTimePattern, expected.ShortTimePattern, errorno + ".20") &&
+ IsEquals(actual.SortableDateTimePattern, expected.SortableDateTimePattern, errorno + ".21") &&
+ //DateTimeFormatInfo.TimeSeparator property has been removed
+ IsEquals(actual.UniversalSortableDateTimePattern, expected.UniversalSortableDateTimePattern, errorno + ".23") &&
+ IsEquals(actual.YearMonthPattern, expected.YearMonthPattern, errorno + ".24") &&
+ IsEquals(actual.CalendarWeekRule, expected.CalendarWeekRule, errorno + ".25") &&
+ IsEquals(actual.FirstDayOfWeek, expected.FirstDayOfWeek, errorno + ".26") &&
+ retval;
+
+ return retval;
+ }
+
+ private bool IsEquals(string str1, string str2, string errorno)
+ {
+ bool retVal = true;
+
+ if (str1 != str2)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Two string are not equal");
+ TestLibrary.TestFramework.LogInformation("WARNING[LOCAL VARIABLES] str1 = " + str1 + ", str2 = " + str2);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ private bool IsEquals(DayOfWeek value1, DayOfWeek value2, string errorno)
+ {
+ bool retVal = true;
+
+ if (value1 != value2)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Two values are not equal");
+ TestLibrary.TestFramework.LogInformation("WARNING[LOCAL VARIABLES] value1 = " + value1 + ", value2 = " + value2);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ private bool IsEquals(CalendarWeekRule value1, CalendarWeekRule value2, string errorno)
+ {
+ bool retVal = true;
+
+ if (value1 != value2)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Two values are not equal");
+ TestLibrary.TestFramework.LogInformation("WARNING[LOCAL VARIABLES] value1 = " + value1 + ", value2 = " + value2);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ private bool IsEquals(string[] array1, string[] array2, string errorno)
+ {
+ bool retval = true;
+
+ if ((array1 == null) && (array2 == null))
+ {
+ return true;
+ }
+ if ((array1 == null) && (array2 != null))
+ {
+ return false;
+ }
+ if ((array1 != null) && (array2 == null))
+ {
+ return false;
+ }
+ if (array1.Length != array2.Length)
+ {
+ return false;
+ }
+
+ for (int i = 0; i < array1.Length; i++)
+ {
+ if (array1[i] != array2[i])
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Two arrays are not equal");
+ TestLibrary.TestFramework.LogInformation("WARNING[LOCAL VARIABLES] array1[i] = " + array1[i] + ", array2[i] = " + array2[i] + ", i = " + i);
+ retval = false;
+ break;
+ }
+ }
+
+ return retval;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfocurrentinfo.cs b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfocurrentinfo.cs
new file mode 100644
index 0000000000..dbe3e8a81a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfocurrentinfo.cs
@@ -0,0 +1,70 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// CurrentInfo
+/// </summary>
+public class DateTimeFormatInfoCurrentInfo
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call CurrentInfo to get a read only DateTimeFormatInfo based on the CultureInfo of the current thread");
+
+ try
+ {
+ DateTimeFormatInfo info = DateTimeFormatInfo.CurrentInfo;
+ if (!info.IsReadOnly)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling CurrentInfo returns a writable instance");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DateTimeFormatInfoCurrentInfo test = new DateTimeFormatInfoCurrentInfo();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeFormatInfoCurrentInfo");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfogetabbreviatedmonthname.cs b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfogetabbreviatedmonthname.cs
new file mode 100644
index 0000000000..97877e73c3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfogetabbreviatedmonthname.cs
@@ -0,0 +1,277 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// GetAbbreviatedMonthName(System.Int32)
+/// </summary>
+public class DateTimeFormatInfoGetAbbreviatedMonthName
+{
+ #region Private Fields
+ private const int c_MIN_MONTH_VALUE = 1;
+ private const int c_MAX_MONTH_VALUE = 13;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call GetAbbreviatedDayName on default invariant DateTimeFormatInfo instance");
+
+ try
+ {
+ DateTimeFormatInfo info = CultureInfo.InvariantCulture.DateTimeFormat;
+ string[] expected = new string[] {
+ "",
+ "Jan",
+ "Feb",
+ "Mar",
+ "Apr",
+ "May",
+ "Jun",
+ "Jul",
+ "Aug",
+ "Sep",
+ "Oct",
+ "Nov",
+ "Dec",
+ "",
+ };
+
+ retVal = VerificationHelper(info, expected, "001.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call GetAbbreviatedDayName on en-us culture DateTimeFormatInfo instance");
+
+ try
+ {
+ DateTimeFormatInfo info = new CultureInfo("en-us").DateTimeFormat;
+ string[] expected = new string[] {
+ "",
+ "Jan",
+ "Feb",
+ "Mar",
+ "Apr",
+ "May",
+ "Jun",
+ "Jul",
+ "Aug",
+ "Sep",
+ "Oct",
+ "Nov",
+ "Dec",
+ "",
+ };
+
+ retVal = VerificationHelper(info, expected, "002.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call GetAbbreviatedDayName on fr-FR culture DateTimeFormatInfo instance");
+
+ try
+ {
+ DateTimeFormatInfo info = new CultureInfo("fr-FR").DateTimeFormat;
+ string[] expected = new string[] {
+ "",
+ "janv.",
+ "f\u00e9vr.",
+ "mars",
+ "avr.",
+ "mai",
+ "juin",
+ "juil.",
+ "ao\u00fbt",
+ "sept.",
+ "oct.",
+ "nov.",
+ "d\u00e9c.",
+ "",
+ };
+
+ retVal = VerificationHelper(info, expected, "003.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call GetAbbreviatedDayName on DateTimeFormatInfo instance created from ctor");
+
+ try
+ {
+ DateTimeFormatInfo info = new DateTimeFormatInfo();
+ string[] expected = new string[] {
+ "",
+ "Jan",
+ "Feb",
+ "Mar",
+ "Apr",
+ "May",
+ "Jun",
+ "Jul",
+ "Aug",
+ "Sep",
+ "Oct",
+ "Nov",
+ "Dec",
+ "",
+ };
+
+ retVal = VerificationHelper(info, expected, "004.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentOutOfRangeException should be thrown when dayofweek is not a valid System.DayOfWeek value. ");
+
+ try
+ {
+ DateTimeFormatInfo info = new DateTimeFormatInfo();
+
+ info.GetAbbreviatedMonthName(c_MIN_MONTH_VALUE - 1);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentOutOfRangeException is not thrown");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ DateTimeFormatInfo info = new DateTimeFormatInfo();
+
+ info.GetAbbreviatedMonthName(c_MAX_MONTH_VALUE + 1);
+
+ TestLibrary.TestFramework.LogError("101.3", "ArgumentOutOfRangeException is not thrown");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.4", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DateTimeFormatInfoGetAbbreviatedMonthName test = new DateTimeFormatInfoGetAbbreviatedMonthName();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeFormatInfoGetAbbreviatedMonthName");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(DateTimeFormatInfo info, string[] expected, string errorno)
+ {
+ bool retval = true;
+
+ for (int i = c_MIN_MONTH_VALUE; i <= c_MAX_MONTH_VALUE; ++i)
+ {
+ string actual = info.GetAbbreviatedMonthName(i);
+ if (actual != expected[i])
+ {
+ TestLibrary.TestFramework.LogError(errorno, "GetAbbreviatedDayName returns wrong value");
+ TestLibrary.TestFramework.LogInformation("WARNING[LOCAL VARIABLES] i = " + i + ", expected[i] = " + expected[i] + ", actual = " + actual);
+ retval = false;
+ }
+ }
+
+ return retval;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfogetformat.cs b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfogetformat.cs
new file mode 100644
index 0000000000..d8a569b080
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfogetformat.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// GetFormat(System.Type)
+/// </summary>
+public class DateTimeFormatInfoGetFormat
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call GetFormat to to get an valid DateTimeFormatInfo instance");
+
+ try
+ {
+ DateTimeFormatInfo expected = new DateTimeFormatInfo();
+ object obj = expected.GetFormat(typeof(DateTimeFormatInfo));
+
+ if (!(obj is DateTimeFormatInfo))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling GetFormat returns a non DateTimeFormatInfo instance");
+ retVal = false;
+ }
+
+ DateTimeFormatInfo actual = obj as DateTimeFormatInfo;
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Calling GetFormat returns wrong instance");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: If the format type is not supported, null reference should be return");
+
+ try
+ {
+ DateTimeFormatInfo info = new DateTimeFormatInfo();
+ if (info.GetFormat(typeof(Object)) != null)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "If the format type is not supported, null reference is not returned");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DateTimeFormatInfoGetFormat test = new DateTimeFormatInfoGetFormat();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeFormatInfoGetFormat");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfogetinstance.cs b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfogetinstance.cs
new file mode 100644
index 0000000000..6be081cc07
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfogetinstance.cs
@@ -0,0 +1,195 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+public class TestIFormatProviderClass : IFormatProvider
+{
+ public object GetFormat(Type formatType)
+ {
+ return this;
+ }
+}
+
+public class TestIFormatProviderClass2 : IFormatProvider
+{
+ public object GetFormat(Type formatType)
+ {
+ return new DateTimeFormatInfo();
+ }
+}
+
+/// <summary>
+/// GetInstance(System.IFormatProvider)
+/// </summary>
+public class DateTimeFormatInfoGetInstance
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call GetInstance to get an DateTimeFormatInfo instance when provider is an CultureInfo instance");
+
+ try
+ {
+ DateTimeFormatInfo info = DateTimeFormatInfo.GetInstance(new CultureInfo("en-us"));
+
+ if (info == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling GetInstance to get an DateTimeFormatInfo instance when provider is an CultureInfo instance returns null reference");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call GetInstance to get an DateTimeFormatInfo instance when provider is null reference");
+
+ try
+ {
+ DateTimeFormatInfo info = DateTimeFormatInfo.GetInstance(null);
+
+ if (info != DateTimeFormatInfo.CurrentInfo)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling GetInstance to get an DateTimeFormatInfo instance when provider is null reference does not return CurrentInfo");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call GetInstance to get an DateTimeFormatInfo instance when provider is a DateTimeFormatInfo instance");
+
+ try
+ {
+ DateTimeFormatInfo info = DateTimeFormatInfo.GetInstance(new DateTimeFormatInfo());
+
+ if (info == null)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Calling GetInstance to get an DateTimeFormatInfo instance when provider is a DateTimeFormatInfo instance returns null reference");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call GetInstance to get an DateTimeFormatInfo instance when provider.GetFormat method supports a DateTimeFormatInfo instance");
+
+ try
+ {
+ DateTimeFormatInfo info = DateTimeFormatInfo.GetInstance(new TestIFormatProviderClass2());
+
+ if (info == null)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Calling GetInstance to get an DateTimeFormatInfo instance when provider.GetFormat method supports a DateTimeFormatInfo instance returns null reference");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Call GetInstance to get an DateTimeFormatInfo instance when provider.GetFormat method does not support a DateTimeFormatInfo instance");
+
+ try
+ {
+ DateTimeFormatInfo info = DateTimeFormatInfo.GetInstance(new TestIFormatProviderClass());
+
+ if (info != DateTimeFormatInfo.CurrentInfo)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "Calling GetInstance to get an DateTimeFormatInfo instance when provider.GetFormat method does not support a DateTimeFormatInfo instance does not return CurrentInfo");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DateTimeFormatInfoGetInstance test = new DateTimeFormatInfoGetInstance();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeFormatInfoGetInstance");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfogetmonthname.cs b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfogetmonthname.cs
new file mode 100644
index 0000000000..5bdf5937c7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfogetmonthname.cs
@@ -0,0 +1,277 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// GetMonthName(System.Int32)
+/// </summary>
+public class DateTimeFormatInfoGetMonthName
+{
+ #region Private Fields
+ private const int c_MIN_MONTH_VALUE = 1;
+ private const int c_MAX_MONTH_VALUE = 13;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call GetAbbreviatedDayName on default invariant DateTimeFormatInfo instance");
+
+ try
+ {
+ DateTimeFormatInfo info = CultureInfo.InvariantCulture.DateTimeFormat;
+ string[] expected = new string[] {
+ "",
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December",
+ "",
+ };
+
+ retVal = VerificationHelper(info, expected, "001.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call GetAbbreviatedDayName on en-us culture DateTimeFormatInfo instance");
+
+ try
+ {
+ DateTimeFormatInfo info = new CultureInfo("en-us").DateTimeFormat;
+ string[] expected = new string[] {
+ "",
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December",
+ "",
+ };
+
+ retVal = VerificationHelper(info, expected, "002.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call GetAbbreviatedDayName on fr-FR culture DateTimeFormatInfo instance");
+
+ try
+ {
+ DateTimeFormatInfo info = new CultureInfo("fr-FR").DateTimeFormat;
+ string[] expected = new string[] {
+ "",
+ "janvier",
+ "f\u00e9vrier",
+ "mars",
+ "avril",
+ "mai",
+ "juin",
+ "juillet",
+ "ao\u00fbt",
+ "septembre",
+ "octobre",
+ "novembre",
+ "d\u00e9cembre",
+ "",
+ };
+
+ retVal = VerificationHelper(info, expected, "003.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call GetAbbreviatedDayName on DateTimeFormatInfo instance created from ctor");
+
+ try
+ {
+ DateTimeFormatInfo info = new DateTimeFormatInfo();
+ string[] expected = new string[] {
+ "",
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December",
+ "",
+ };
+
+ retVal = VerificationHelper(info, expected, "004.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentOutOfRangeException should be thrown when dayofweek is not a valid System.DayOfWeek value. ");
+
+ try
+ {
+ DateTimeFormatInfo info = new DateTimeFormatInfo();
+
+ info.GetMonthName(c_MIN_MONTH_VALUE - 1);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentOutOfRangeException is not thrown");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ try
+ {
+ DateTimeFormatInfo info = new DateTimeFormatInfo();
+
+ info.GetMonthName(c_MAX_MONTH_VALUE + 1);
+
+ TestLibrary.TestFramework.LogError("101.3", "ArgumentOutOfRangeException is not thrown");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.4", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DateTimeFormatInfoGetMonthName test = new DateTimeFormatInfoGetMonthName();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeFormatInfoGetMonthName");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(DateTimeFormatInfo info, string[] expected, string errorno)
+ {
+ bool retval = true;
+
+ for (int i = c_MIN_MONTH_VALUE; i <= c_MAX_MONTH_VALUE; ++i)
+ {
+ string actual = info.GetMonthName(i);
+ if (actual != expected[i])
+ {
+ TestLibrary.TestFramework.LogError(errorno + "." + i, "GetAbbreviatedDayName returns wrong value");
+ TestLibrary.TestFramework.LogInformation("WARNING[LOCAL VARIABLES] i = " + i + ", expected[i] = " + expected[i] + ", actual = " + actual);
+ retval = false;
+ }
+ }
+
+ return retval;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfoinvariantinfo.cs b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfoinvariantinfo.cs
new file mode 100644
index 0000000000..f93379c3af
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfoinvariantinfo.cs
@@ -0,0 +1,70 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// InvariantInfo
+/// </summary>
+public class DateTimeFormatInfoInvariantInfo
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: InvariantInfo should return a read-only DateTimeFormatInfo");
+
+ try
+ {
+ DateTimeFormatInfo info = DateTimeFormatInfo.InvariantInfo;
+ if (!info.IsReadOnly)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "InvariantInfo does not return a read-only DateTimeFormatInfo");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DateTimeFormatInfoInvariantInfo test = new DateTimeFormatInfoInvariantInfo();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeFormatInfoInvariantInfo");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfoisreadonly.cs b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfoisreadonly.cs
new file mode 100644
index 0000000000..082a70ab14
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfoisreadonly.cs
@@ -0,0 +1,122 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// IsReadOnly
+/// </summary>
+public class DateTimeFormatInfoIsReadOnly
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: IsReadOnly should return false for DateTimeFormatInfo created from non invariant culture");
+
+ try
+ {
+ DateTimeFormatInfo info = new CultureInfo("en-us").DateTimeFormat;
+ if (info.IsReadOnly)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "IsReadOnly returns true for DateTimeFormatInfo created from non invariant culture");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: IsReadOnly should return true for DateTimeFormatInfo created from invariant culture");
+
+ try
+ {
+ DateTimeFormatInfo info = DateTimeFormatInfo.InvariantInfo;
+ if (!info.IsReadOnly)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "IsReadOnly returns false for DateTimeFormatInfo created from non invariant culture");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: IsReadOnly should return true for DateTimeFormatInfo created by ReadOnly method");
+
+ try
+ {
+ DateTimeFormatInfo info = DateTimeFormatInfo.ReadOnly(new CultureInfo("en-us").DateTimeFormat);
+ if (!info.IsReadOnly)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "IsReadOnly returns false for DateTimeFormatInfo created by ReadOnly method");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DateTimeFormatInfoIsReadOnly test = new DateTimeFormatInfoIsReadOnly();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeFormatInfoIsReadOnly");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinforeadonly.cs b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinforeadonly.cs
new file mode 100644
index 0000000000..d52985d328
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinforeadonly.cs
@@ -0,0 +1,131 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// ReadOnly(System.Globalization.DateTimeFormatInfo)
+/// </summary>
+public class DateTimeFormatInfoReadOnly
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ReadOnly on a writable DateTimeFormatInfo instance");
+
+ try
+ {
+ DateTimeFormatInfo info = new DateTimeFormatInfo();
+ DateTimeFormatInfo actual = DateTimeFormatInfo.ReadOnly(info);
+
+ if (!actual.IsReadOnly)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling ReadOnly on a writable DateTimeFormatInfo instance does not make the instance read only");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call ReadOnly on a read only DateTimeFormatInfo instance");
+
+ try
+ {
+ DateTimeFormatInfo info = DateTimeFormatInfo.InvariantInfo;
+ DateTimeFormatInfo actual = DateTimeFormatInfo.ReadOnly(info);
+
+ if (!actual.IsReadOnly)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling ReadOnly on a read only DateTimeFormatInfo instance does not make the instance read only");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException should be thrown when dtfi is a null reference");
+
+ try
+ {
+ DateTimeFormatInfo.ReadOnly(null);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown when dtfi is a null reference");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DateTimeFormatInfoReadOnly test = new DateTimeFormatInfoReadOnly();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeFormatInfoReadOnly");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinforfc1123pattern.cs b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinforfc1123pattern.cs
new file mode 100644
index 0000000000..b590b306aa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinforfc1123pattern.cs
@@ -0,0 +1,92 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// RFC1123Pattern
+/// </summary>
+public class DateTimeFormatInfoRFC1123Pattern
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call RFC1123Pattern getter method should return correct value for InvariantInfo");
+
+ try
+ {
+ retVal = VerificationHelper(DateTimeFormatInfo.InvariantInfo, "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'", "001.1") && retVal;
+ retVal = VerificationHelper(new CultureInfo("en-us").DateTimeFormat, "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'", "001.2") && retVal;
+ try
+ {
+ retVal = VerificationHelper(new CultureInfo("ja-jp").DateTimeFormat, "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'", "001.3") && retVal;
+ }
+ catch (ArgumentException)
+ {
+ TestLibrary.TestFramework.LogInformation("East Asian Languages are not installed. Skipping Japanese culture test(s).");
+ retVal = retVal && true;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DateTimeFormatInfoRFC1123Pattern test = new DateTimeFormatInfoRFC1123Pattern();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeFormatInfoRFC1123Pattern");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(DateTimeFormatInfo info, string expected, string errorno)
+ {
+ bool retval = true;
+
+ string actual = info.RFC1123Pattern;
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Call RFC1123Pattern returns wrong value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retval = false;
+ }
+
+ return retval;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfosortabledatetimepattern.cs b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfosortabledatetimepattern.cs
new file mode 100644
index 0000000000..5595ec0bb9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfosortabledatetimepattern.cs
@@ -0,0 +1,93 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// SortableDateTimePattern
+/// </summary>
+public class DateTimeFormatInfoSortableDateTimePattern
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call SortableDateTimePattern getter method should return correct value for InvariantInfo");
+
+ try
+ {
+ retVal = VerificationHelper(DateTimeFormatInfo.InvariantInfo, "yyyy'-'MM'-'dd'T'HH':'mm':'ss", "001.1") && retVal;
+ retVal = VerificationHelper(new CultureInfo("en-us").DateTimeFormat, "yyyy'-'MM'-'dd'T'HH':'mm':'ss", "001.2") && retVal;
+ try
+ {
+ retVal = VerificationHelper(new CultureInfo("ja-JP").DateTimeFormat, "yyyy'-'MM'-'dd'T'HH':'mm':'ss", "001.3") && retVal;
+ }
+ catch (ArgumentException)
+ {
+ TestLibrary.TestFramework.LogInformation("East Asian Languages are not installed. Skipping Japanese culture test(s).");
+ retVal = retVal && true;
+ }
+ retVal = VerificationHelper(new CultureInfo("fr-fr").DateTimeFormat, "yyyy'-'MM'-'dd'T'HH':'mm':'ss", "001.4") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DateTimeFormatInfoSortableDateTimePattern test = new DateTimeFormatInfoSortableDateTimePattern();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeFormatInfoSortableDateTimePattern");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(DateTimeFormatInfo info, string expected, string errorno)
+ {
+ bool retval = true;
+
+ string actual = info.SortableDateTimePattern;
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Call SortableDateTimePattern returns wrong value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retval = false;
+ }
+
+ return retval;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfouniversalsortabledatetimepattern.cs b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfouniversalsortabledatetimepattern.cs
new file mode 100644
index 0000000000..34c348cd6a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimeformatinfo/datetimeformatinfouniversalsortabledatetimepattern.cs
@@ -0,0 +1,93 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// UniversalSortableDateTimePattern
+/// </summary>
+public class DateTimeFormatInfoUniversalSortableDateTimePattern
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call UniversalSortableDateTimePattern getter method should return correct value for InvariantInfo");
+
+ try
+ {
+ retVal = VerificationHelper(DateTimeFormatInfo.InvariantInfo, "yyyy'-'MM'-'dd HH':'mm':'ss'Z'", "001.1") && retVal;
+ retVal = VerificationHelper(new CultureInfo("en-us").DateTimeFormat, "yyyy'-'MM'-'dd HH':'mm':'ss'Z'", "001.2") && retVal;
+ try
+ {
+ retVal = VerificationHelper(new CultureInfo("ja-jp").DateTimeFormat, "yyyy'-'MM'-'dd HH':'mm':'ss'Z'", "001.3") && retVal;
+ } catch (ArgumentException)
+ {
+ TestLibrary.TestFramework.LogInformation("East Asian Languages are not installed. Skipping Japanese culture test(s).");
+ retVal = retVal && true;
+ }
+
+ retVal = VerificationHelper(new CultureInfo("fr-fr").DateTimeFormat, "yyyy'-'MM'-'dd HH':'mm':'ss'Z'", "001.4") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DateTimeFormatInfoUniversalSortableDateTimePattern test = new DateTimeFormatInfoUniversalSortableDateTimePattern();
+
+ TestLibrary.TestFramework.BeginTestCase("DateTimeFormatInfoUniversalSortableDateTimePattern");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(DateTimeFormatInfo info, string expected, string errorno)
+ {
+ bool retval = true;
+
+ string actual = info.UniversalSortableDateTimePattern;
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Call UniversalSortableDateTimePattern returns wrong value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retval = false;
+ }
+
+ return retval;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStyleAllowInnerWhite.csproj b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStyleAllowInnerWhite.csproj
new file mode 100644
index 0000000000..1225c341db
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStyleAllowInnerWhite.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimestyleallowinnerwhite.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAdjustToUniversal.csproj b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAdjustToUniversal.csproj
new file mode 100644
index 0000000000..21dc7910ff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAdjustToUniversal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimestylesadjusttouniversal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAllowLeadingWhite.csproj b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAllowLeadingWhite.csproj
new file mode 100644
index 0000000000..d089b55476
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAllowLeadingWhite.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimestylesallowleadingwhite.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAllowTrailingWhite.csproj b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAllowTrailingWhite.csproj
new file mode 100644
index 0000000000..527f8d53a0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAllowTrailingWhite.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimestylesallowtrailingwhite.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAllowWhiteSpaces.csproj b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAllowWhiteSpaces.csproj
new file mode 100644
index 0000000000..fd2745ef04
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAllowWhiteSpaces.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimestylesallowwhitespaces.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAssumeLocal.csproj b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAssumeLocal.csproj
new file mode 100644
index 0000000000..7765ed7bac
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAssumeLocal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimestylesassumelocal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAssumeUniversal.csproj b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAssumeUniversal.csproj
new file mode 100644
index 0000000000..d9fc1407f2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesAssumeUniversal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimestylesassumeuniversal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesNoCurrentDateDefault.csproj b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesNoCurrentDateDefault.csproj
new file mode 100644
index 0000000000..e8bb7e44b7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesNoCurrentDateDefault.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimestylesnocurrentdatedefault.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesNone.csproj b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesNone.csproj
new file mode 100644
index 0000000000..de31176a6a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesNone.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimestylesnone.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesRoundTripKind.csproj b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesRoundTripKind.csproj
new file mode 100644
index 0000000000..c0ccab739e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/DateTimeStylesRoundTripKind.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="datetimestylesroundtripkind.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestyleallowinnerwhite.cs b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestyleallowinnerwhite.cs
new file mode 100644
index 0000000000..bf57876930
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestyleallowinnerwhite.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.DateTimeStyles.AllowInnerWhite
+///</summary>
+
+public class DateTimeStylesAllowInnerWhite
+{
+
+ public static int Main()
+ {
+ DateTimeStylesAllowInnerWhite testObj = new DateTimeStylesAllowInnerWhite();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.Globalization.DateTimeStyles.AllowInnerWhite");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ UInt64 expectedValue = 0x00000004;
+ UInt64 actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get DateTimeStyles.AllowInnerWhite");
+ try
+ {
+ actualValue = (UInt64)DateTimeStyles.AllowInnerWhite;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesadjusttouniversal.cs b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesadjusttouniversal.cs
new file mode 100644
index 0000000000..e4201821da
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesadjusttouniversal.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.DateTimeStyles.AdjustToUniversal
+///</summary>
+
+public class DateTimeStylesAdjustToUniversal
+{
+
+ public static int Main()
+ {
+ DateTimeStylesAdjustToUniversal testObj = new DateTimeStylesAdjustToUniversal();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.Globalization.DateTimeStyles.AdjustToUniversal");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ UInt64 expectedValue = 0x00000010;
+ UInt64 actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get DateTimeStyles.AdjustToUniversal");
+ try
+ {
+ actualValue = (UInt64)DateTimeStyles.AdjustToUniversal;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesallowleadingwhite.cs b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesallowleadingwhite.cs
new file mode 100644
index 0000000000..c0623b12fe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesallowleadingwhite.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.DateTimeStyles.AllowLeadingWhite
+///</summary>
+
+public class DateTimeStylesAllowLeadingWhite
+{
+
+ public static int Main()
+ {
+ DateTimeStylesAllowLeadingWhite testObj = new DateTimeStylesAllowLeadingWhite();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.Globalization.DateTimeStyles.AllowLeadingWhite");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ UInt64 expectedValue = 0x00000001;
+ UInt64 actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get DateTimeStyles.AllowLeadingWhite");
+ try
+ {
+ actualValue = (UInt64)DateTimeStyles.AllowLeadingWhite;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesallowtrailingwhite.cs b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesallowtrailingwhite.cs
new file mode 100644
index 0000000000..f2600b0098
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesallowtrailingwhite.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.DateTimeStyles.AllowTrailingWhite
+///</summary>
+
+public class DateTimeStylesAllowTrailingWhite
+{
+
+ public static int Main()
+ {
+ DateTimeStylesAllowTrailingWhite testObj = new DateTimeStylesAllowTrailingWhite();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.Globalization.DateTimeStyles.AllowTrailingWhite");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ UInt64 expectedValue = 0x00000002;
+ UInt64 actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get DateTimeStyles.AllowTrailingWhite");
+ try
+ {
+ actualValue = (UInt64)DateTimeStyles.AllowTrailingWhite;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesallowwhitespaces.cs b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesallowwhitespaces.cs
new file mode 100644
index 0000000000..6abb682e4e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesallowwhitespaces.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.DateTimeStyles.AllowWhiteSpaces
+///</summary>
+
+public class DateTimeStylesAllowWhiteSpaces
+{
+
+ public static int Main()
+ {
+ DateTimeStylesAllowWhiteSpaces testObj = new DateTimeStylesAllowWhiteSpaces();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.Globalization.DateTimeStyles.AllowWhiteSpaces");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ UInt64 expectedValue = 0x00000001 | 0x00000002 | 0x00000004;
+ UInt64 actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get DateTimeStyles.AllowWhiteSpaces");
+ try
+ {
+ actualValue = (UInt64)DateTimeStyles.AllowWhiteSpaces;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesassumelocal.cs b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesassumelocal.cs
new file mode 100644
index 0000000000..85d5ec4d4c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesassumelocal.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.DateTimeStyles.AssumeLocal
+///</summary>
+
+public class DateTimeStylesAssumeLocal
+{
+
+ public static int Main()
+ {
+ DateTimeStylesAssumeLocal testObj = new DateTimeStylesAssumeLocal();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.Globalization.DateTimeStyles.AssumeLocal");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ UInt64 expectedValue = 0x00000020;
+ UInt64 actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get DateTimeStyles.AssumeLocal");
+ try
+ {
+ actualValue = (UInt64)DateTimeStyles.AssumeLocal;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesassumeuniversal.cs b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesassumeuniversal.cs
new file mode 100644
index 0000000000..bf4460bd20
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesassumeuniversal.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.DateTimeStyles.AssumeUniversal
+///</summary>
+
+public class DateTimeStylesAssumeUniversal
+{
+
+ public static int Main()
+ {
+ DateTimeStylesAssumeUniversal testObj = new DateTimeStylesAssumeUniversal();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.Globalization.DateTimeStyles.AssumeUniversal");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ UInt64 expectedValue = 0x00000040;
+ UInt64 actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get DateTimeStyles.AssumeUniversal");
+ try
+ {
+ actualValue = (UInt64)DateTimeStyles.AssumeUniversal;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesnocurrentdatedefault.cs b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesnocurrentdatedefault.cs
new file mode 100644
index 0000000000..b80b871e45
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesnocurrentdatedefault.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.DateTimeStyles.NoCurrentDateDefault
+///</summary>
+
+public class DateTimeStylesNoCurrentDateDefault
+{
+
+ public static int Main()
+ {
+ DateTimeStylesNoCurrentDateDefault testObj = new DateTimeStylesNoCurrentDateDefault();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.Globalization.DateTimeStyles.NoCurrentDateDefault");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ UInt64 expectedValue = 0x00000008;
+ UInt64 actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get DateTimeStyles.NoCurrentDateDefault");
+ try
+ {
+ actualValue = (UInt64)DateTimeStyles.NoCurrentDateDefault;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesnone.cs b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesnone.cs
new file mode 100644
index 0000000000..300f379e0a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesnone.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.DateTimeStyles.None
+///</summary>
+
+public class DateTimeStylesNone
+{
+
+ public static int Main()
+ {
+ DateTimeStylesNone testObj = new DateTimeStylesNone();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.Globalization.DateTimeStyles.None");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ UInt64 expectedValue = 0x00000000;
+ UInt64 actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get DateTimeStyles.None");
+ try
+ {
+ actualValue = (UInt64)DateTimeStyles.None;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesroundtripkind.cs b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesroundtripkind.cs
new file mode 100644
index 0000000000..652fa65906
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/datetimestyles/datetimestylesroundtripkind.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+///<summary>
+///System.Globalization.DateTimeStyles.RoundtripKind
+///</summary>
+
+public class DateTimeStylesRoundtripKind
+{
+
+ public static int Main()
+ {
+ DateTimeStylesRoundtripKind testObj = new DateTimeStylesRoundtripKind();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.Globalization.DateTimeStyles.RoundtripKind");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ UInt64 expectedValue = 0x00000080;
+ UInt64 actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get DateTimeStyles.RoundtripKind");
+ try
+ {
+ actualValue = (UInt64)DateTimeStyles.RoundtripKind;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoClone.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoClone.csproj
new file mode 100644
index 0000000000..27641af31b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoClone.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberformatinfoclone.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoCtor.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoCtor.csproj
new file mode 100644
index 0000000000..1c25e99ceb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberformatinfoctor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoCurrencyDecimalSeparator.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoCurrencyDecimalSeparator.csproj
new file mode 100644
index 0000000000..775795eac5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoCurrencyDecimalSeparator.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberformatinfocurrencydecimalseparator.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoCurrencyGroupSeparator.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoCurrencyGroupSeparator.csproj
new file mode 100644
index 0000000000..9e52b952fb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoCurrencyGroupSeparator.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberformatinfocurrencygroupseparator.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoGetFormat.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoGetFormat.csproj
new file mode 100644
index 0000000000..d5ea727124
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoGetFormat.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberformatinfogetformat.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoGetInstance.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoGetInstance.csproj
new file mode 100644
index 0000000000..c686c889b3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoGetInstance.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberformatinfogetinstance.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoReadOnly.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoReadOnly.csproj
new file mode 100644
index 0000000000..2e54d88df2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/NumberFormatInfoReadOnly.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberformatinforeadonly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfoclone.cs b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfoclone.cs
new file mode 100644
index 0000000000..d866b7c6b1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfoclone.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Clone
+/// </summary>
+
+public class NumberFormatInfoClone
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method Clone .");
+
+ try
+ {
+ NumberFormatInfo nfi1 = new NumberFormatInfo();
+ NumberFormatInfo nfi2 = (NumberFormatInfo)nfi1.Clone();
+
+ if (!nfi1.Equals(nfi2) && nfi1.GetHashCode() == nfi2.GetHashCode())
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method Clone Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberFormatInfoClone test = new NumberFormatInfoClone();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberFormatInfoClone");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfoctor.cs b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfoctor.cs
new file mode 100644
index 0000000000..807163628a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfoctor.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// System.Globalization.NumberFormatInfo
+/// </summary>
+
+public class NumberFormatInfoCtor
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Ctor .");
+
+ try
+ {
+ NumberFormatInfo nfi = new NumberFormatInfo();
+
+ if (nfi == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Failed to instance a NumberFormatInfo type .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberFormatInfoCtor test = new NumberFormatInfoCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberFormatInfoCtor");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfocurrencydecimalseparator.cs b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfocurrencydecimalseparator.cs
new file mode 100644
index 0000000000..716b097c78
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfocurrencydecimalseparator.cs
@@ -0,0 +1,193 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// CurrencyDecimalSeparator
+/// </summary>
+
+public class NumberFormatInfoCurrencyDecimalSeparator
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify default value of property CurrencyDecimalSeparator .");
+
+ try
+ {
+ NumberFormatInfo nfi = new NumberFormatInfo();
+
+ if (nfi.CurrencyDecimalSeparator!=".")
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property CurrencyDecimalSeparator Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify set value of property CurrencyDecimalSeparator .");
+
+ try
+ {
+ string testStr = "testStr";
+ NumberFormatInfo nfi = new NumberFormatInfo();
+ nfi.CurrencyDecimalSeparator = testStr;
+
+ if (nfi.CurrencyDecimalSeparator != testStr)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Property CurrencyDecimalSeparator Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown.");
+
+ try
+ {
+ string testStr = null;
+ NumberFormatInfo nfi = new NumberFormatInfo();
+ nfi.CurrencyDecimalSeparator = testStr;
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: InvalidOperationException is not thrown.");
+
+ try
+ {
+ string testStr = "testStr";
+ NumberFormatInfo nfi = new NumberFormatInfo();
+ NumberFormatInfo nfiReadOnly = NumberFormatInfo.ReadOnly(nfi);
+ nfiReadOnly.CurrencyDecimalSeparator = testStr;
+
+ TestLibrary.TestFramework.LogError("102.1", "InvalidOperationException is not thrown.");
+ retVal = false;
+ }
+ catch (InvalidOperationException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentException is not thrown.");
+
+ try
+ {
+ string testStr = "";
+ NumberFormatInfo nfi = new NumberFormatInfo();
+ NumberFormatInfo nfiReadOnly = NumberFormatInfo.ReadOnly(nfi);
+ nfi.CurrencyDecimalSeparator = testStr;
+
+ TestLibrary.TestFramework.LogError("103.1", "ArgumentException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberFormatInfoCurrencyDecimalSeparator test = new NumberFormatInfoCurrencyDecimalSeparator();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberFormatInfoCurrencyDecimalSeparator");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfocurrencygroupseparator.cs b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfocurrencygroupseparator.cs
new file mode 100644
index 0000000000..fe75bc04de
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfocurrencygroupseparator.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// CurrencyGroupSeparator
+/// </summary>
+
+public class NumberFormatInfoCurrencyGroupSeparator
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify default value of property CurrencyGroupSeparator .");
+
+ try
+ {
+ NumberFormatInfo nfi = new NumberFormatInfo();
+
+ if (nfi.CurrencyGroupSeparator != ",")
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property CurrencyGroupSeparator Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify set value of property CurrencyGroupSeparator .");
+
+ try
+ {
+ string testStr = "testStr";
+ NumberFormatInfo nfi = new NumberFormatInfo();
+ nfi.CurrencyGroupSeparator = testStr;
+
+ if (nfi.CurrencyGroupSeparator != testStr)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Property CurrencyGroupSeparator Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown.");
+
+ try
+ {
+ string testStr = null;
+ NumberFormatInfo nfi = new NumberFormatInfo();
+ nfi.CurrencyGroupSeparator = testStr;
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: InvalidOperationException is not thrown.");
+
+ try
+ {
+ string testStr = "testStr";
+ NumberFormatInfo nfi = new NumberFormatInfo();
+ NumberFormatInfo nfiReadOnly = NumberFormatInfo.ReadOnly(nfi);
+ nfiReadOnly.CurrencyGroupSeparator = testStr;
+
+ TestLibrary.TestFramework.LogError("102.1", "InvalidOperationException is not thrown.");
+ retVal = false;
+ }
+ catch (InvalidOperationException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberFormatInfoCurrencyGroupSeparator test = new NumberFormatInfoCurrencyGroupSeparator();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberFormatInfoCurrencyGroupSeparator");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfogetformat.cs b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfogetformat.cs
new file mode 100644
index 0000000000..ee321af124
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfogetformat.cs
@@ -0,0 +1,137 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// GetFormat(System.Type)
+/// </summary>
+
+public class NumberFormatInfoGetFormat
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method GetFormat when arg is a type of NumberFormatInfo .");
+
+ try
+ {
+ NumberFormatInfo nfi = new NumberFormatInfo();
+ Type formatType = typeof(NumberFormatInfo);
+ object obj = nfi.GetFormat(formatType);
+
+ bool testVerify = obj is NumberFormatInfo;
+
+ if (testVerify != true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method GetFormat .");
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method GetFormat when arg is not a type of NumberFormatInfo .");
+
+ try
+ {
+ NumberFormatInfo nfi = new NumberFormatInfo();
+ Type formatType = typeof(object);
+
+ if (nfi.GetFormat(formatType) != null)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Failed to instance a NumberFormatInfo type .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberFormatInfoGetFormat test = new NumberFormatInfoGetFormat();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberFormatInfoGetFormat");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfogetinstance.cs b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfogetinstance.cs
new file mode 100644
index 0000000000..2de248c6d4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinfogetinstance.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// GetInstance(System.IFormatProvider)
+/// </summary>
+
+public class NumberFormatInfoGetInstance
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method GetInstance .");
+
+ try
+ {
+ CultureInfo ci = new CultureInfo("fr-FR");
+ NumberFormatInfo nfi = NumberFormatInfo.GetInstance(ci);
+
+ if (nfi == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method GetInstance Err .");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberFormatInfoGetInstance test = new NumberFormatInfoGetInstance();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberFormatInfoGetInstance");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinforeadonly.cs b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinforeadonly.cs
new file mode 100644
index 0000000000..51f63c013e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberformatinfo/numberformatinforeadonly.cs
@@ -0,0 +1,107 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// ReadOnly(System.Globalization.NumberFormatInfo)
+/// </summary>
+
+public class NumberFormatInfoReadOnly
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ReadOnly .");
+
+ try
+ {
+ NumberFormatInfo nfi = new NumberFormatInfo();
+ NumberFormatInfo nfiReadOnly = NumberFormatInfo.ReadOnly(nfi);
+
+ if (nfiReadOnly.IsReadOnly != true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method ReadOnly Err .");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown.");
+
+ try
+ {
+ NumberFormatInfo nfi = null;
+ NumberFormatInfo nfiReadOnly = NumberFormatInfo.ReadOnly(nfi);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberFormatInfoReadOnly test = new NumberFormatInfoReadOnly();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberFormatInfoReadOnly");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowCurrencySymbol.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowCurrencySymbol.csproj
new file mode 100644
index 0000000000..1079ef3563
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowCurrencySymbol.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberstylesallowcurrencysymbol.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowDecimalPoint.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowDecimalPoint.csproj
new file mode 100644
index 0000000000..52a9defb6e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowDecimalPoint.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberstylesallowdecimalpoint.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowExponent.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowExponent.csproj
new file mode 100644
index 0000000000..ebcb0a555d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowExponent.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberstylesallowexponent.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowHexSpecifier.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowHexSpecifier.csproj
new file mode 100644
index 0000000000..012ec8e8af
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowHexSpecifier.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberstylesallowhexspecifier.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowLeadingSign.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowLeadingSign.csproj
new file mode 100644
index 0000000000..59202092f6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowLeadingSign.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberstylesallowleadingsign.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowLeadingWhite.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowLeadingWhite.csproj
new file mode 100644
index 0000000000..11e9d6956a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowLeadingWhite.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberstylesallowleadingwhite.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowParentheses.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowParentheses.csproj
new file mode 100644
index 0000000000..23f25cef0d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowParentheses.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberstylesallowparentheses.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowThousands.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowThousands.csproj
new file mode 100644
index 0000000000..e3b9323edd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowThousands.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberstylesallowthousands.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowTrailingSign.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowTrailingSign.csproj
new file mode 100644
index 0000000000..c2707d3dc7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowTrailingSign.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberstylesallowtrailingsign.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowTrailingWhite.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowTrailingWhite.csproj
new file mode 100644
index 0000000000..1b4bac079e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAllowTrailingWhite.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberstylesallowtrailingwhite.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAny.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAny.csproj
new file mode 100644
index 0000000000..cc74514d8b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesAny.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberstylesany.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesCurrency.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesCurrency.csproj
new file mode 100644
index 0000000000..acca22ad3b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesCurrency.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberstylescurrency.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesFloat.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesFloat.csproj
new file mode 100644
index 0000000000..331c18860d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesFloat.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberstylesfloat.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesHexNumber.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesHexNumber.csproj
new file mode 100644
index 0000000000..d5ee79e71d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesHexNumber.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberstyleshexnumber.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesInteger.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesInteger.csproj
new file mode 100644
index 0000000000..c78a6d0071
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesInteger.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberstylesinteger.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesNone.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesNone.csproj
new file mode 100644
index 0000000000..e8ce455b93
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesNone.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberstylesnone.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesNumber.csproj b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesNumber.csproj
new file mode 100644
index 0000000000..0bce942aef
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/NumberStylesNumber.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="numberstylesnumber.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowcurrencysymbol.cs b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowcurrencysymbol.cs
new file mode 100644
index 0000000000..b9c3873af7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowcurrencysymbol.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// AllowCurrencySymbol [v-jianq]
+/// </summary>
+
+public class NumberStylesAllowCurrencySymbol
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify value of NumberStyles.AllowCurrencySymbol .");
+
+ try
+ {
+ int expected = 0x00000100;
+ int actual = (int)NumberStyles.AllowCurrencySymbol;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Value of NumberStyles.AllowCurrencySymbol Err .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberStylesAllowCurrencySymbol test = new NumberStylesAllowCurrencySymbol();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberStylesAllowCurrencySymbol");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowdecimalpoint.cs b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowdecimalpoint.cs
new file mode 100644
index 0000000000..10ee6edb6c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowdecimalpoint.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// AllowDecimalPoint [v-jianq]
+/// </summary>
+
+public class NumberStylesAllowDecimalPoint
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify value of NumberStyles.AllowDecimalPoint .");
+
+ try
+ {
+ int expected = 0x00000020;
+ int actual = (int)NumberStyles.AllowDecimalPoint;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Value of NumberStyles.AllowDecimalPoint Err .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberStylesAllowDecimalPoint test = new NumberStylesAllowDecimalPoint();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberStylesAllowDecimalPoint");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowexponent.cs b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowexponent.cs
new file mode 100644
index 0000000000..26d6b387cc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowexponent.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// AllowExponent [v-jianq]
+/// </summary>
+
+public class NumberStylesAllowExponent
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify value of NumberStyles.AllowExponent .");
+
+ try
+ {
+ int expected = 0x00000080;
+ int actual = (int)NumberStyles.AllowExponent;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Value of NumberStyles.AllowExponent Err .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberStylesAllowExponent test = new NumberStylesAllowExponent();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberStylesAllowExponent");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowhexspecifier.cs b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowhexspecifier.cs
new file mode 100644
index 0000000000..e366e878f7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowhexspecifier.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// AllowHexSpecifier [v-jianq]
+/// </summary>
+
+public class NumberStylesAllowHexSpecifier
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify value of NumberStyles.AllowHexSpecifier .");
+
+ try
+ {
+ int expected = 0x00000200;
+ int actual = (int)NumberStyles.AllowHexSpecifier;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Value of NumberStyles.AllowHexSpecifier Err .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberStylesAllowHexSpecifier test = new NumberStylesAllowHexSpecifier();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberStylesAllowHexSpecifier");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowleadingsign.cs b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowleadingsign.cs
new file mode 100644
index 0000000000..197173aac5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowleadingsign.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// AllowLeadingSign [v-jianq]
+/// </summary>
+
+public class NumberStylesAllowLeadingSign
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify value of NumberStyles.AllowLeadingSign .");
+
+ try
+ {
+ int expected = 0x00000004;
+ int actual = (int)NumberStyles.AllowLeadingSign;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Value of NumberStyles.AllowLeadingSign Err .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberStylesAllowLeadingSign test = new NumberStylesAllowLeadingSign();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberStylesAllowLeadingSign");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowleadingwhite.cs b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowleadingwhite.cs
new file mode 100644
index 0000000000..3b9af11a3d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowleadingwhite.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// AllowLeadingWhite [v-jianq]
+/// </summary>
+
+public class NumberStylesAllowLeadingWhite
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify value of NumberStyles.AllowLeadingWhite .");
+
+ try
+ {
+ int expected = 0x00000001;
+ int actual = (int)NumberStyles.AllowLeadingWhite;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Value of NumberStyles.AllowLeadingWhite Err .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberStylesAllowLeadingWhite test = new NumberStylesAllowLeadingWhite();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberStylesAllowLeadingWhite");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowparentheses.cs b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowparentheses.cs
new file mode 100644
index 0000000000..7bbf7ee6bb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowparentheses.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// AllowParentheses [v-jianq]
+/// </summary>
+
+public class NumberStylesAllowParentheses
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify value of NumberStyles.AllowParentheses .");
+
+ try
+ {
+ int expected = 0x00000010;
+ int actual = (int)NumberStyles.AllowParentheses;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Value of NumberStyles.AllowParentheses Err .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberStylesAllowParentheses test = new NumberStylesAllowParentheses();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberStylesAllowParentheses");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowthousands.cs b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowthousands.cs
new file mode 100644
index 0000000000..8f83b564a4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowthousands.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// AllowThousands [v-jianq]
+/// </summary>
+
+public class NumberStylesAllowThousands
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify value of NumberStyles.AllowThousands .");
+
+ try
+ {
+ int expected = 0x00000040;
+ int actual = (int)NumberStyles.AllowThousands;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Value of NumberStyles.AllowThousands Err .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberStylesAllowThousands test = new NumberStylesAllowThousands();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberStylesAllowThousands");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowtrailingsign.cs b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowtrailingsign.cs
new file mode 100644
index 0000000000..5153b20fbe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowtrailingsign.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// AllowTrailingSign [v-jianq]
+/// </summary>
+
+public class NumberStylesAllowTrailingSign
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify value of NumberStyles.AllowTrailingSign .");
+
+ try
+ {
+ int expected = 0x00000008;
+ int actual = (int)NumberStyles.AllowTrailingSign;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Value of NumberStyles.AllowTrailingSign Err .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberStylesAllowTrailingSign test = new NumberStylesAllowTrailingSign();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberStylesAllowTrailingSign");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowtrailingwhite.cs b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowtrailingwhite.cs
new file mode 100644
index 0000000000..fda107c24b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesallowtrailingwhite.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// AllowTrailingWhite [v-jianq]
+/// </summary>
+
+public class NumberStylesAllowTrailingWhite
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify value of NumberStyles.AllowTrailingWhite .");
+
+ try
+ {
+ int expected = 0x00000002;
+ int actual = (int)NumberStyles.AllowTrailingWhite;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Value of NumberStyles.AllowTrailingWhite Err .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberStylesAllowTrailingWhite test = new NumberStylesAllowTrailingWhite();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberStylesAllowTrailingWhite");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesany.cs b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesany.cs
new file mode 100644
index 0000000000..88da563283
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesany.cs
@@ -0,0 +1,125 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Any [v-jianq]
+/// </summary>
+
+public class NumberStylesAny
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify value of NumberStyles.Any .");
+
+ try
+ {
+ int AllowLeadingWhite = 0x00000001,
+
+ AllowTrailingWhite = 0x00000002,
+
+ AllowLeadingSign = 0x00000004,
+
+ AllowTrailingSign = 0x00000008,
+
+ AllowParentheses = 0x00000010,
+
+ AllowDecimalPoint = 0x00000020,
+
+ AllowThousands = 0x00000040,
+
+ AllowExponent = 0x00000080,
+
+ AllowCurrencySymbol = 0x00000100;
+
+ int expected = AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign | AllowTrailingSign |
+ AllowParentheses | AllowDecimalPoint | AllowThousands | AllowCurrencySymbol | AllowExponent;
+
+ int actual = (int)NumberStyles.Any;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Value of NumberStyles.Any Err .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberStylesAny test = new NumberStylesAny();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberStylesAny");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylescurrency.cs b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylescurrency.cs
new file mode 100644
index 0000000000..a7c053c36b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylescurrency.cs
@@ -0,0 +1,124 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Currency
+/// </summary>
+
+public class NumberStylesCurrency
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify value of NumberStyles.Currency .");
+
+ try
+ {
+ int AllowLeadingWhite = 0x00000001,
+
+ AllowTrailingWhite = 0x00000002,
+
+ AllowLeadingSign = 0x00000004,
+
+ AllowTrailingSign = 0x00000008,
+
+ AllowParentheses = 0x00000010,
+
+ AllowDecimalPoint = 0x00000020,
+
+ AllowThousands = 0x00000040,
+
+ AllowCurrencySymbol = 0x00000100;
+
+
+ int expected = AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign | AllowTrailingSign |
+ AllowParentheses | AllowDecimalPoint | AllowThousands | AllowCurrencySymbol;
+
+ int actual = (int)NumberStyles.Currency;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Value of NumberStyles.Currency Err .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberStylesCurrency test = new NumberStylesCurrency();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberStylesCurrency");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesfloat.cs b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesfloat.cs
new file mode 100644
index 0000000000..f7520115c1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesfloat.cs
@@ -0,0 +1,119 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Float
+/// </summary>
+
+public class NumberStylesFloat
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify value of NumberStyles.Float .");
+
+ try
+ {
+ int AllowLeadingWhite = 0x00000001,
+
+ AllowTrailingWhite = 0x00000002,
+
+ AllowLeadingSign = 0x00000004,
+
+ AllowDecimalPoint = 0x00000020,
+
+ AllowExponent = 0x00000080;
+
+
+ int expected = AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign |
+ AllowDecimalPoint | AllowExponent;
+
+ int actual = (int)NumberStyles.Float;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Value of NumberStyles.Float Err .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberStylesFloat test = new NumberStylesFloat();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberStylesFloat");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstyleshexnumber.cs b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstyleshexnumber.cs
new file mode 100644
index 0000000000..ca400c53cb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstyleshexnumber.cs
@@ -0,0 +1,112 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// HexNumber [v-jianq]
+/// </summary>
+
+public class NumberStylesHexNumber
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify value of NumberStyles.HexNumber .");
+
+ try
+ {
+ int AllowLeadingWhite = 0x00000001,
+
+ AllowTrailingWhite = 0x00000002,
+
+ AllowHexSpecifier = 0x00000200;
+
+ int expected = AllowLeadingWhite | AllowTrailingWhite | AllowHexSpecifier;
+
+ int actual = (int)NumberStyles.HexNumber;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Value of NumberStyles.HexNumber Err .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberStylesHexNumber test = new NumberStylesHexNumber();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberStylesHexNumber");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesinteger.cs b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesinteger.cs
new file mode 100644
index 0000000000..7535463963
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesinteger.cs
@@ -0,0 +1,111 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Integer [v-jianq]
+/// </summary>
+
+public class NumberStylesInteger
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify value of NumberStyles.Integer .");
+
+ try
+ {
+ int AllowLeadingWhite = 0x00000001,
+
+ AllowTrailingWhite = 0x00000002,
+
+ AllowLeadingSign = 0x00000004;
+
+ int expected = AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign;
+ int actual = (int)NumberStyles.Integer;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Value of NumberStyles.Integer Err .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberStylesInteger test = new NumberStylesInteger();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberStylesInteger");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesnone.cs b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesnone.cs
new file mode 100644
index 0000000000..87cb5c7481
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesnone.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// None [v-jianq]
+/// </summary>
+
+public class NumberStylesNone
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify value of NumberStyles.None .");
+
+ try
+ {
+ int expected = 0x00000000;
+ int actual = (int)NumberStyles.None;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Value of NumberStyles.None Err .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberStylesNone test = new NumberStylesNone();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberStylesNone");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesnumber.cs b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesnumber.cs
new file mode 100644
index 0000000000..225d458ec3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesnumber.cs
@@ -0,0 +1,120 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Number [v-jianq]
+/// </summary>
+
+public class NumberStylesNumber
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify value of NumberStyles.Number .");
+
+ try
+ {
+ int AllowLeadingWhite = 0x00000001,
+
+ AllowTrailingWhite = 0x00000002,
+
+ AllowLeadingSign = 0x00000004,
+
+ AllowTrailingSign = 0x00000008,
+
+ AllowDecimalPoint = 0x00000020,
+
+ AllowThousands = 0x00000040;
+
+ int expected = AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign | AllowTrailingSign |
+ AllowDecimalPoint | AllowThousands;
+
+
+ int actual = (int)NumberStyles.Number;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Value of NumberStyles.Number Err .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NumberStylesNumber test = new NumberStylesNumber();
+
+ TestLibrary.TestFramework.BeginTestCase("NumberStylesNumber");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoEquals.csproj b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoEquals.csproj
new file mode 100644
index 0000000000..857841b57c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoEquals.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="regioninfoequals.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoGetHashCode.csproj
new file mode 100644
index 0000000000..500f7dbb4d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="regioninfogethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoISOCurrencySymbol.csproj b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoISOCurrencySymbol.csproj
new file mode 100644
index 0000000000..9c1f5e5957
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoISOCurrencySymbol.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="regioninfoisocurrencysymbol.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoIsMetric.csproj b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoIsMetric.csproj
new file mode 100644
index 0000000000..eeef871514
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoIsMetric.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="regioninfoismetric.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoName.csproj b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoName.csproj
new file mode 100644
index 0000000000..19bada9ae4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="regioninfoname.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoToString.csproj b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoToString.csproj
new file mode 100644
index 0000000000..a0d8a95ab1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoToString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="regioninfotostring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoTwoLetterISORegionName.csproj b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoTwoLetterISORegionName.csproj
new file mode 100644
index 0000000000..4140d72bf3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/RegionInfoTwoLetterISORegionName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="regioninfotwoletterisoregionname.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfoequals.cs b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfoequals.cs
new file mode 100644
index 0000000000..df14b135b2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfoequals.cs
@@ -0,0 +1,133 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// RegionInfo.Equals(Object)
+/// </summary>
+public class RegionInfoEquals
+{
+ public static int Main()
+ {
+ RegionInfoEquals regInfoEquals = new RegionInfoEquals();
+ TestLibrary.TestFramework.BeginTestCase("RegionInfoEquals");
+ if (regInfoEquals.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ // The RegionInfo constructor will disallow partial names
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Compare two RegionInfo object 1");
+ try
+ {
+ RegionInfo regionInfo1 = new RegionInfo("en-US");
+ RegionInfo regionInfo2 = new RegionInfo("en-US");
+ bool boolVal = regionInfo1.Equals(regionInfo2);
+ if (!boolVal)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is true but the ActualResult is " + boolVal.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Compare two RegionInfo object 2");
+ try
+ {
+ RegionInfo regionInfo1 = new RegionInfo("en-US");
+ RegionInfo regionInfo2 = new RegionInfo("zh-CN");
+ bool boolVal = regionInfo1.Equals(regionInfo2);
+ if (boolVal)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is false but the ActualResult is " + boolVal.ToString());
+ retVal = false;
+ }
+ }
+ catch (ArgumentException)
+ {
+ TestLibrary.TestFramework.LogInformation("The East Asian Languages are not installed. Skipping test(s)");
+ retVal = true;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3() // The RegionInfo constructor will disallow partial names
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Compare two RegionInfo object 3");
+ try
+ {
+ RegionInfo regionInfo1 = new RegionInfo("US");
+ RegionInfo regionInfo2 = new RegionInfo("en-US");
+ bool boolVal = regionInfo1.Equals(regionInfo2);
+ if (boolVal)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is false but the ActualResult is " + boolVal.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:RegionInfo object compared with not RegionInfo object");
+ try
+ {
+ RegionInfo regionInfo1 = new RegionInfo("en-US");
+ object objVal = new object();
+ bool boolVal = regionInfo1.Equals(objVal);
+ if (boolVal)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ExpectResult is false but the ActualResult is " + boolVal.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfogethashcode.cs b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfogethashcode.cs
new file mode 100644
index 0000000000..119f94b9f1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfogethashcode.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// RegionInfo.GetHashCode()
+/// </summary>
+public class RegionInfoGetHashCode
+{
+ public static int Main()
+ {
+ RegionInfoGetHashCode regInfoGetHashCode = new RegionInfoGetHashCode();
+ TestLibrary.TestFramework.BeginTestCase("RegionInfoGetHashCode");
+ if (regInfoGetHashCode.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Get the hash code of the RegionInfo object 1");
+ try
+ {
+ RegionInfo regionInfo = new RegionInfo("zh-CN");
+ int hashCode = regionInfo.GetHashCode();
+ if (hashCode != regionInfo.Name.GetHashCode())
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is" + regionInfo.Name.GetHashCode() +"but the ActualResult is " + hashCode);
+ retVal = false;
+ }
+ }
+ catch (ArgumentException)
+ {
+ TestLibrary.TestFramework.LogInformation("The East Asian Languages are not installed. Skipping test(s)");
+ retVal = true;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Get the hash code of the RegionInfo object 2");
+ try
+ {
+ RegionInfo regionInfo = new RegionInfo("en-US");
+ int hashCode = regionInfo.GetHashCode();
+ if (hashCode != regionInfo.Name.GetHashCode())
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is" + regionInfo.Name.GetHashCode() +"but the ActualResult is " + hashCode);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfoismetric.cs b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfoismetric.cs
new file mode 100644
index 0000000000..b89c74b29e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfoismetric.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// RegionInfo.IsMetric
+/// </summary>
+public class RegionInfoIsMetric
+{
+ public static int Main()
+ {
+ RegionInfoIsMetric regInfoIsMetric = new RegionInfoIsMetric();
+ TestLibrary.TestFramework.BeginTestCase("RegionInfoIsMetric");
+ if (regInfoIsMetric.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the property IsMetric in RegionInfo object 1");
+ try
+ {
+ RegionInfo regionInfo = new RegionInfo("en-US");
+ bool boolVal = regionInfo.IsMetric;
+ if (boolVal)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is false but the ActualResult is " + boolVal.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the property IsMetric in RegionInfo object 2");
+ try
+ {
+ RegionInfo regionInfo = new RegionInfo("zh-CN");
+ bool boolVal = regionInfo.IsMetric;
+ if (!boolVal)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is false but the ActualResult is " + boolVal.ToString());
+ retVal = false;
+ }
+ }
+ catch (ArgumentException)
+ {
+ TestLibrary.TestFramework.LogInformation("The East Asian Languages are not installed. Skipping test(s)");
+ retVal = true;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfoisocurrencysymbol.cs b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfoisocurrencysymbol.cs
new file mode 100644
index 0000000000..47a7e0d0b2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfoisocurrencysymbol.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// RegionInfo.ISOCurrencySymbol [v-minch]
+/// </summary>
+public class RegionInfoISOCurrencySymbol
+{
+ public static int Main()
+ {
+ RegionInfoISOCurrencySymbol regInfoISOCurrencySymbol = new RegionInfoISOCurrencySymbol();
+ TestLibrary.TestFramework.BeginTestCase("RegionInfoISOCurrencySymbol");
+ if (regInfoISOCurrencySymbol.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the property ISOCurrencySymbol in RegionInfo object 1");
+ try
+ {
+ RegionInfo regionInfo = new RegionInfo("en-US");
+ string strISOCurrency = regionInfo.ISOCurrencySymbol;
+ if (strISOCurrency != "USD")
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is USD but the ActualResult is (" + strISOCurrency +")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the property ISOCurrencySymbol in RegionInfo object 2");
+ try
+ {
+ RegionInfo regionInfo = new RegionInfo("zh-CN");
+ string strISOCurrency = regionInfo.ISOCurrencySymbol;
+ if (strISOCurrency != "CNY")
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is CNY but the ActualResult is (" + strISOCurrency +")");
+ retVal = false;
+ }
+ }
+ catch (ArgumentException)
+ {
+ TestLibrary.TestFramework.LogInformation("The East Asian Languages are not installed. Skipping test(s)");
+ retVal = true;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Return the property ISOCurrencySymbol in RegionInfo object 3");
+ try
+ {
+ RegionInfo regionInfo = new RegionInfo("de-DE");
+ string strISOCurrency = regionInfo.ISOCurrencySymbol;
+ // On an older OS which does not have the right uptodate information, we can report DEM as the currency for German
+ if (TestLibrary.Utilities.IsVistaOrLater)
+ {
+ if (strISOCurrency != "EUR")
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is EUR but the ActualResult is (" + strISOCurrency + ")");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (strISOCurrency != "EUR" && strISOCurrency != "DEM")
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is EUR or DEM but the ActualResult is (" + strISOCurrency + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Return the property ISOCurrencySymbol in RegionInfo object 4");
+ try
+ {
+ RegionInfo regionInfo = new RegionInfo("it-IT");
+ string strISOCurrency = regionInfo.ISOCurrencySymbol;
+ // On an older OS which does not have the right uptodate information, we can report ITL as the currency for Italian
+ if (TestLibrary.Utilities.IsVistaOrLater)
+ {
+ if (strISOCurrency != "EUR")
+ {
+ TestLibrary.TestFramework.LogError("007", "the ExpectResult is EUR but the ActualResult is (" + strISOCurrency + ")");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (strISOCurrency != "EUR" && strISOCurrency != "ITL")
+ {
+ TestLibrary.TestFramework.LogError("007", "the ExpectResult is EUR or ITL but the ActualResult is (" + strISOCurrency + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfoname.cs b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfoname.cs
new file mode 100644
index 0000000000..3b6dfa0c17
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfoname.cs
@@ -0,0 +1,130 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// RegionInfo.Name [v-minch]
+/// </summary>
+public class RegionInfoName
+{
+ public static int Main()
+ {
+ RegionInfoName regInfoName = new RegionInfoName();
+ TestLibrary.TestFramework.BeginTestCase("RegionInfoName");
+ if (regInfoName.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest1() && retVal;
+ // The constructor will disallow partial names
+ //retVal = PosTest3() && retVal;
+ //retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the property Name in RegionInfo object 1");
+ try
+ {
+ RegionInfo regionInfo = new RegionInfo("en-US");
+ string strName = regionInfo.Name;
+ if (strName != "US")
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is en-US but the ActualResult is " + strName);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the property Name in RegionInfo object 2");
+ try
+ {
+ RegionInfo regionInfo = new RegionInfo("zh-CN");
+ string strName = regionInfo.Name;
+ if (strName != "CN")
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is ZH-CN but the ActualResult is " + strName);
+ retVal = false;
+ }
+ }
+ catch (ArgumentException)
+ {
+ TestLibrary.TestFramework.LogInformation("The East Asian Languages are not installed. Skipping test(s)");
+ retVal = true;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3() // The constructor will disallow partial names
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Return the property Name in RegionInfo object 3");
+ try
+ {
+ RegionInfo regionInfo = new RegionInfo("US");
+ string strName = regionInfo.Name;
+ if (strName != "US")
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is US but the ActualResult is " + strName);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4() // The constructor will disallow partial names
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Return the property Name in RegionInfo object 4");
+ try
+ {
+ RegionInfo regionInfo = new RegionInfo("CN");
+ string strName = regionInfo.Name;
+ if (strName != "CN")
+ {
+ TestLibrary.TestFramework.LogError("007", "the ExpectResult is CN but the ActualResult is " + strName);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfotostring.cs b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfotostring.cs
new file mode 100644
index 0000000000..bf3b90d31e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfotostring.cs
@@ -0,0 +1,107 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// RegionInfo.ToString()
+/// </summary>
+public class RegionInfoToString
+{
+ public static int Main()
+ {
+ RegionInfoToString regInfoToString = new RegionInfoToString();
+ TestLibrary.TestFramework.BeginTestCase("RegionInfoToString");
+ if (regInfoToString.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest1() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method ToString in RegionInfo object 1");
+ try
+ {
+ RegionInfo regionInfo = new RegionInfo("zh-CN");
+ string strVal = regionInfo.ToString();
+ if (strVal != regionInfo.Name)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is" + regionInfo.Name + "but the ActualResult is" + strVal);
+ retVal = false;
+ }
+ }
+ catch (ArgumentException)
+ {
+ TestLibrary.TestFramework.LogInformation("The East Asian Languages are not installed. Skipping test(s)");
+ retVal = true;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the method ToString in RegionInfo object 2");
+ try
+ {
+ RegionInfo regionInfo = new RegionInfo("en-US");
+ string strVal = regionInfo.ToString();
+ if (strVal != regionInfo.Name)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is" + regionInfo.Name + "but the ActualResult is" + strVal);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke the method ToString in RegionInfo object 3");
+ try
+ {
+ RegionInfo regionInfo = new RegionInfo("en-IE");
+ string strVal = regionInfo.ToString();
+ if (strVal != regionInfo.Name)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is" + regionInfo.Name + "but the ActualResult is" + strVal);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfotwoletterisoregionname.cs b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfotwoletterisoregionname.cs
new file mode 100644
index 0000000000..bec7ad3814
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfotwoletterisoregionname.cs
@@ -0,0 +1,129 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// RegionInfo.TwoLetterISORegionName [v-minch]
+/// </summary>
+public class RegionInfoTwoLetterISORegionName
+{
+ public static int Main()
+ {
+ RegionInfoTwoLetterISORegionName regInfoTwoLetterISOName = new RegionInfoTwoLetterISORegionName();
+ TestLibrary.TestFramework.BeginTestCase("RegionInfoTwoLetterISORegionName");
+ if (regInfoTwoLetterISOName.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the property TwoLetterISORegionName in RegionInfo object 1");
+ try
+ {
+ RegionInfo regionInfo = new RegionInfo("en-US");
+ string strTwoLetterName = regionInfo.TwoLetterISORegionName;
+ if (strTwoLetterName != "US")
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is US but the ActualResult is " + strTwoLetterName);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the property TwoLetterISORegionName in RegionInfo object 2");
+ try
+ {
+ RegionInfo regionInfo = new RegionInfo("zh-CN");
+ string strTwoLetterName = regionInfo.TwoLetterISORegionName;
+ if (strTwoLetterName != "CN")
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is CN but the ActualResult is " + strTwoLetterName);
+ retVal = false;
+ }
+ }
+ catch (ArgumentException)
+ {
+ TestLibrary.TestFramework.LogInformation("The East Asian Languages are not installed. Skipping test(s)");
+ retVal = true;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Return the property TwoLetterISORegionName in RegionInfo object 3");
+ try
+ {
+ RegionInfo regionInfo = new RegionInfo("de-DE");
+ string strTwoLetterName = regionInfo.TwoLetterISORegionName;
+ if (strTwoLetterName != "DE")
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is DE but the ActualResult is " + strTwoLetterName);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Return the property TwoLetterISORegionName in RegionInfo object 4");
+ try
+ {
+ RegionInfo regionInfo = new RegionInfo("it-IT");
+ string strTwoLetterName = regionInfo.TwoLetterISORegionName;
+ if (strTwoLetterName != "IT")
+ {
+ TestLibrary.TestFramework.LogError("007", "the ExpectResult is IT but the ActualResult is " + strTwoLetterName);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoCtor1.csproj b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoCtor1.csproj
new file mode 100644
index 0000000000..153e433336
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringinfoctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoCtor2.csproj b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoCtor2.csproj
new file mode 100644
index 0000000000..b32d70506b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringinfoctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoEquals.csproj b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoEquals.csproj
new file mode 100644
index 0000000000..43d549dc8a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoEquals.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringinfoequals.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetHashCode.csproj
new file mode 100644
index 0000000000..2b1ea4a0ff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringinfogethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetNextTextElement2.csproj b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetNextTextElement2.csproj
new file mode 100644
index 0000000000..7e190a857e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetNextTextElement2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringinfogetnexttextelement2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetTextElementEnumerator1.csproj b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetTextElementEnumerator1.csproj
new file mode 100644
index 0000000000..f3dbb3dc33
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetTextElementEnumerator1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringinfogettextelementenumerator1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetTextElementEnumerator2.csproj b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetTextElementEnumerator2.csproj
new file mode 100644
index 0000000000..62fbca43ea
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetTextElementEnumerator2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringinfogettextelementenumerator2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoLengthInTextElements.csproj b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoLengthInTextElements.csproj
new file mode 100644
index 0000000000..5fb5e06563
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoLengthInTextElements.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringinfolengthintextelements.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoParseCombiningCharacters.csproj b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoParseCombiningCharacters.csproj
new file mode 100644
index 0000000000..7d30397972
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoParseCombiningCharacters.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringinfoparsecombiningcharacters.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoString.csproj b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoString.csproj
new file mode 100644
index 0000000000..494784f20e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringinfostring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoctor1.cs b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoctor1.cs
new file mode 100644
index 0000000000..edd16c04d9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoctor1.cs
@@ -0,0 +1,77 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// System.Globalization.StringInfo.Ctor
+/// </summary>
+public class StringInfoCtor1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call constructor to create an instance");
+
+ try
+ {
+ StringInfo stringInfo = new StringInfo();
+ if (stringInfo == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "The constructor does not create a new instance");
+ retVal = false;
+ }
+ if (stringInfo.String != string.Empty)
+ {
+ TestLibrary.TestFramework.LogError("002", "The constructor does not work correctly");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StringInfoCtor1 test = new StringInfoCtor1();
+
+ TestLibrary.TestFramework.BeginTestCase("StringInfoCtor1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoctor2.cs b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoctor2.cs
new file mode 100644
index 0000000000..09a1344117
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoctor2.cs
@@ -0,0 +1,171 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// System.Globalization.StringInfo.Ctor(System.String)
+/// </summary>
+public class StringInfoCtor2
+{
+ private const int c_MINI_STRING_LENGTH = 8;
+ private const int c_MAX_STRING_LENGTH = 256;
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call constructor to create an instance with a random string argument");
+
+ try
+ {
+ string str = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ StringInfo stringInfo = new StringInfo(str);
+ if (stringInfo == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "The constructor does not create a new instance");
+ retVal = false;
+ }
+ if (stringInfo.String != str)
+ {
+ TestLibrary.TestFramework.LogError("002", "The constructor does not work correctly,the str is: " + str);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call constructor to create an instance with an empty string argument");
+
+ try
+ {
+ string str = string.Empty;
+ StringInfo stringInfo = new StringInfo(str);
+ if (stringInfo == null)
+ {
+ TestLibrary.TestFramework.LogError("004", "The constructor does not create a new instance");
+ retVal = false;
+ }
+ if (stringInfo.String != string.Empty)
+ {
+ TestLibrary.TestFramework.LogError("005", "The constructor does not work correctly,the str is: " + str);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call constructor to create an instance with a string of white space");
+
+ try
+ {
+ string str = " ";
+ StringInfo stringInfo = new StringInfo(str);
+ if (stringInfo == null)
+ {
+ TestLibrary.TestFramework.LogError("007", "The constructor does not create a new instance");
+ retVal = false;
+ }
+ if (stringInfo.String != " ")
+ {
+ TestLibrary.TestFramework.LogError("008", "The constructor does not work correctly,the str is: " + str);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The string is a null reference");
+
+ try
+ {
+ string str = null;
+ StringInfo stringInfo = new StringInfo(str);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StringInfoCtor2 test = new StringInfoCtor2();
+
+ TestLibrary.TestFramework.BeginTestCase("StringInfoCtor2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoequals.cs b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoequals.cs
new file mode 100644
index 0000000000..4866c64f17
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoequals.cs
@@ -0,0 +1,235 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// System.Globalization.StringInfo.Equals(Object)
+/// </summary>
+public class StringInfoEquals
+{
+ private const int c_MINI_STRING_LENGTH = 8;
+ private const int c_MAX_STRING_LENGTH = 256;
+
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Compare two equal StringInfo");
+
+ try
+ {
+ string str = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ StringInfo stringInfo1 = new StringInfo(str);
+ StringInfo stringInfo2 = new StringInfo(str);
+ if (!stringInfo1.Equals(stringInfo2))
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The two stringinfos reference to one object ");
+
+ try
+ {
+ string str = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ StringInfo stringInfo1 = new StringInfo(str);
+ StringInfo stringInfo2 = stringInfo1;
+ if (!stringInfo1.Equals(stringInfo2))
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Using default constructor to create two equal instance");
+
+ try
+ {
+ StringInfo stringInfo1 = new StringInfo();
+ StringInfo stringInfo2 = new StringInfo();
+ if (!stringInfo1.Equals(stringInfo2))
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Compare two instance with different string value");
+
+ try
+ {
+ StringInfo stringInfo1 = new StringInfo("stringinfo1");
+ StringInfo stringInfo2 = new StringInfo("stringinfo2");
+ if (stringInfo1.Equals(stringInfo2))
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Compare with a different kind of type");
+
+ try
+ {
+ StringInfo stringInfo1 = new StringInfo("stringinfo1");
+ string str = "stringinfo1";
+ if (stringInfo1.Equals(str))
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: The argument is a null reference");
+
+ try
+ {
+ StringInfo stringInfo1 = new StringInfo("stringinfo1");
+ object ob = null;
+ if (stringInfo1.Equals(ob))
+ {
+ TestLibrary.TestFramework.LogError("011", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7: The argument is value type");
+
+ try
+ {
+ StringInfo stringInfo1 = new StringInfo("123");
+ int i = 123;
+ if (stringInfo1.Equals(i))
+ {
+ TestLibrary.TestFramework.LogError("013", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StringInfoEquals test = new StringInfoEquals();
+
+ TestLibrary.TestFramework.BeginTestCase("StringInfoEquals");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogethashcode.cs b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogethashcode.cs
new file mode 100644
index 0000000000..89b7bb45cc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogethashcode.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// System.Globalization.StringInfo.GetHashCode()
+/// </summary>
+public class StringInfoGetHashCode
+{
+ private const int c_MINI_STRING_LENGTH = 8;
+ private const int c_MAX_STRING_LENGTH = 256;
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The two instances created by the same argument return the same hashcode");
+
+ try
+ {
+ string str = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ StringInfo stringInfo1 = new StringInfo(str);
+ StringInfo stringInfo2 = new StringInfo(str);
+ if (stringInfo1.GetHashCode() != stringInfo2.GetHashCode())
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check two different instance");
+
+ try
+ {
+ string str = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ StringInfo stringInfo1 = new StringInfo(str);
+ StringInfo stringInfo2 = new StringInfo("");
+ if (stringInfo1.GetHashCode() == stringInfo2.GetHashCode())
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StringInfoGetHashCode test = new StringInfoGetHashCode();
+
+ TestLibrary.TestFramework.BeginTestCase("StringInfoGetHashCode");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogetnexttextelement2.cs b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogetnexttextelement2.cs
new file mode 100644
index 0000000000..7f323d0707
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogetnexttextelement2.cs
@@ -0,0 +1,267 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// System.Globalization.StringInfo.GetNextTestElement(string,int32)
+/// </summary>
+public class StringInfoGetNextTextElement2
+{
+ private const int c_MINI_STRING_LENGTH = 8;
+ private const int c_MAX_STRING_LENGTH = 256;
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Get the text element from a random index in a string");
+
+ try
+ {
+ string str = TestLibrary.Generator.GetString(-55, true, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ int index = this.GetInt32(8, str.Length);
+ string result = StringInfo.GetNextTextElement(str, index);
+ if (result != str[index].ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,the result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The first element is a surrogate pair");
+
+ try
+ {
+ string str = "\uDBFF\uDFFF";
+ string result = StringInfo.GetNextTextElement("ef45-;\uDBFF\uDFFFabcde", 6);
+ if (result.Length != 2)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ if (result != str)
+ {
+ TestLibrary.TestFramework.LogError("004", "The result is not the value as expected,the result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The element is a combining character");
+
+ try
+ {
+ string str = "a\u20D1";
+ string result = StringInfo.GetNextTextElement("13229^a\u20D1abcde", 6);
+ if (result != str)
+ {
+ TestLibrary.TestFramework.LogError("006", "The result is not the value as expected,the result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: The element is a combination of base character and several combining characters");
+
+ try
+ {
+ string str = "z\uFE22\u20D1\u20EB";
+ string result = StringInfo.GetNextTextElement("az\uFE22\u20D1\u20EBabcde", 1);
+ if (result.Length != 4)
+ {
+ TestLibrary.TestFramework.LogError("008", "The result is not the value as expected,length is: " + result.Length);
+ retVal = false;
+ }
+ if (result != str)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected,the result is: " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The string is a null reference");
+
+ try
+ {
+ string str = null;
+ string result = StringInfo.GetNextTextElement(str, 0);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The index is out of the range of the string");
+
+ try
+ {
+ string str = "abc";
+ string result = StringInfo.GetNextTextElement(str, -4);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: The index is a negative number");
+
+ try
+ {
+ string str = "df8%^dk";
+ string result = StringInfo.GetNextTextElement(str, -1);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StringInfoGetNextTextElement2 test = new StringInfoGetNextTextElement2();
+
+ TestLibrary.TestFramework.BeginTestCase("StringInfoGetNextTextElement2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogettextelementenumerator1.cs b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogettextelementenumerator1.cs
new file mode 100644
index 0000000000..5b7fe1c42c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogettextelementenumerator1.cs
@@ -0,0 +1,185 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// System.Globalization.StringInfo.GetTestElementEnumerator(string)
+/// </summary>
+public class StringInfoGetTextElementEnumerator1
+{
+ private const int c_MINI_STRING_LENGTH = 8;
+ private const int c_MAX_STRING_LENGTH = 256;
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The argument is a random string");
+
+ try
+ {
+ string str = TestLibrary.Generator.GetString(-55, true, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ TextElementEnumerator TextElementEnumerator = StringInfo.GetTextElementEnumerator(str);
+ int len = str.Length;
+ TextElementEnumerator.MoveNext();
+ for (int i = 0; i < len; i++)
+ {
+ if (TextElementEnumerator.Current.ToString() != str[i].ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,the str[i] is: " + str[i]);
+ retVal = false;
+ }
+ TextElementEnumerator.MoveNext();
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The string has a surrogate pair");
+
+ try
+ {
+ string str = "\uDBFF\uDFFF";
+ TextElementEnumerator TextElementEnumerator = StringInfo.GetTextElementEnumerator("s\uDBFF\uDFFF$");
+ TextElementEnumerator.MoveNext();
+ if (TextElementEnumerator.Current.ToString() != "s")
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ TextElementEnumerator.MoveNext();
+ if (TextElementEnumerator.Current.ToString() != str)
+ {
+ TestLibrary.TestFramework.LogError("004", "The result is not the value as expected,the current is: " + TextElementEnumerator.Current.ToString());
+ retVal = false;
+ }
+ TextElementEnumerator.MoveNext();
+ if (TextElementEnumerator.Current.ToString() != "$")
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The string has a combining character");
+
+ try
+ {
+ string str = "a\u20D1";
+ TextElementEnumerator TextElementEnumerator = StringInfo.GetTextElementEnumerator("13229^a\u20D1a");
+ for (int i = 0; i < 7; i++)
+ {
+ TextElementEnumerator.MoveNext();
+ }
+ if (TextElementEnumerator.Current.ToString() != str)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected,the current is: " + TextElementEnumerator.Current.ToString());
+ retVal = false;
+ }
+ TextElementEnumerator.MoveNext();
+ if (TextElementEnumerator.MoveNext())
+ {
+ TestLibrary.TestFramework.LogError("008", "The result is not the value as expected,the current is: " + TextElementEnumerator.Current.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The string is a null reference");
+
+ try
+ {
+ string str = null;
+ TextElementEnumerator TextElementEnumerator = StringInfo.GetTextElementEnumerator(str);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StringInfoGetTextElementEnumerator1 test = new StringInfoGetTextElementEnumerator1();
+
+ TestLibrary.TestFramework.BeginTestCase("StringInfoGetTextElementEnumerator1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogettextelementenumerator2.cs b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogettextelementenumerator2.cs
new file mode 100644
index 0000000000..aeb9a27c44
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogettextelementenumerator2.cs
@@ -0,0 +1,257 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// System.Globalization.StringInfo.GetTestElementEnumerator(string,Int32)
+/// </summary>
+public class StringInfoGetTextElementEnumerator2
+{
+ private const int c_MINI_STRING_LENGTH = 8;
+ private const int c_MAX_STRING_LENGTH = 256;
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The argument is a random string,and start at a random index");
+
+ try
+ {
+ string str = TestLibrary.Generator.GetString(-55, true, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ int len = str.Length;
+ int index = this.GetInt32(8, len);
+ TextElementEnumerator TextElementEnumerator = StringInfo.GetTextElementEnumerator(str, index);
+ TextElementEnumerator.MoveNext();
+ for (int i = 0; i < len - index; i++)
+ {
+ if (TextElementEnumerator.Current.ToString() != str[i + index].ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,the str is: " + str[i + index]);
+ retVal = false;
+ }
+ TextElementEnumerator.MoveNext();
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The string has a surrogate pair");
+
+ try
+ {
+ string str = "\uDBFF\uDFFF";
+ TextElementEnumerator TextElementEnumerator = StringInfo.GetTextElementEnumerator("s\uDBFF\uDFFF$", 1);
+ TextElementEnumerator.MoveNext();
+ if (TextElementEnumerator.Current.ToString() != str)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,the current is: " + TextElementEnumerator.Current.ToString());
+ retVal = false;
+ }
+ TextElementEnumerator.MoveNext();
+ if (TextElementEnumerator.Current.ToString() != "$")
+ {
+ TestLibrary.TestFramework.LogError("004", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The string has a combining character");
+
+ try
+ {
+ string str = "a\u20D1";
+ TextElementEnumerator TextElementEnumerator = StringInfo.GetTextElementEnumerator("13229^a\u20D1a", 6);
+ TextElementEnumerator.MoveNext();
+ if (TextElementEnumerator.Current.ToString() != str)
+ {
+ TestLibrary.TestFramework.LogError("006", "The result is not the value as expected,the current is: " + TextElementEnumerator.Current.ToString());
+ retVal = false;
+ }
+ TextElementEnumerator.MoveNext();
+ if (TextElementEnumerator.Current.ToString() != "a")
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected,the current is: " + TextElementEnumerator.Current.ToString());
+ retVal = false;
+ }
+ if (TextElementEnumerator.MoveNext())
+ {
+ TestLibrary.TestFramework.LogError("008", "The result is not the value as expected,the current is: " + TextElementEnumerator.Current.ToString());
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The string is a null reference");
+
+ try
+ {
+ string str = null;
+ TextElementEnumerator TextElementEnumerator = StringInfo.GetTextElementEnumerator(str, 0);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The index is out of the range of the string");
+
+ try
+ {
+ string str = "dur8&p!";
+ TextElementEnumerator TextElementEnumerator = StringInfo.GetTextElementEnumerator(str, 10);
+ TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: The index is a negative number");
+
+ try
+ {
+ string str = "dur8&p!";
+ TextElementEnumerator TextElementEnumerator = StringInfo.GetTextElementEnumerator(str, -10);
+ TestLibrary.TestFramework.LogError("105", "The ArgumentOutOfRangeException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StringInfoGetTextElementEnumerator2 test = new StringInfoGetTextElementEnumerator2();
+
+ TestLibrary.TestFramework.BeginTestCase("StringInfoGetTextElementEnumerator2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfolengthintextelements.cs b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfolengthintextelements.cs
new file mode 100644
index 0000000000..95e298787f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfolengthintextelements.cs
@@ -0,0 +1,109 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// System.Globalization.StringInfo.LengthInTextElements
+/// </summary>
+public class StringInfoLengthInTextElements
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The mothod should return the number of base character in the current stringInfo object");
+
+ try
+ {
+ retVal = VerificationHelper("\u4f00\u302a\ud800\udc00\u4f01", 3, "001.1");
+ retVal = VerificationHelper("abcdefgh", 8, "001.2");
+ retVal = VerificationHelper("zj\uDBFF\uDFFFlk", 5, "001.3");
+ retVal = VerificationHelper("!@#$%^&", 7, "001.4");
+ retVal = VerificationHelper("!\u20D1bo\uFE22\u20D1\u20EB|", 4, "001.5");
+ retVal = VerificationHelper("1\uDBFF\uDFFF@\uFE22\u20D1\u20EB9", 4, "001.6");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The string in stringinfo is white space or empty string");
+
+ try
+ {
+ retVal = VerificationHelper(" ", 3, "001.1");
+ retVal = VerificationHelper(string.Empty, 0, "001.2");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StringInfoLengthInTextElements test = new StringInfoLengthInTextElements();
+
+ TestLibrary.TestFramework.BeginTestCase("StringInfoLengthInTextElements");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region Private Methods
+ private bool VerificationHelper(string str, int expected, string errorno)
+ {
+ bool retVal = true;
+
+ StringInfo stringInfo = new StringInfo(str);
+ int result = stringInfo.LengthInTextElements;
+ if (result != expected)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "The result is not the value as expected,The actual is: " + result + ", the desire is: " + expected);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoparsecombiningcharacters.cs b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoparsecombiningcharacters.cs
new file mode 100644
index 0000000000..9fbbe76037
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoparsecombiningcharacters.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// System.Globalization.StringInfo.ParseCombiningCharacters(System.String)
+/// </summary>
+public class StringInfoParseCombiningCharacters
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The mothod should return the indexes of each base character");
+
+ try
+ {
+ retVal = VerificationHelper("\u4f00\u302a\ud800\udc00\u4f01", new int[] { 0, 2, 4 }, "001.1");
+ retVal = VerificationHelper("abcdefgh", new int[] { 0, 1, 2, 3, 4, 5, 6, 7 }, "001.2");
+ retVal = VerificationHelper("zj\uDBFF\uDFFFlk", new int[] { 0, 1, 2, 4, 5 }, "001.3");
+ retVal = VerificationHelper("!@#$%^&", new int[] { 0, 1, 2, 3, 4, 5, 6 }, "001.4");
+ retVal = VerificationHelper("!\u20D1bo\uFE22\u20D1\u20EB|", new int[] { 0, 2, 3, 7 }, "001.5");
+ retVal = VerificationHelper("1\uDBFF\uDFFF@\uFE22\u20D1\u20EB9", new int[] { 0, 1, 3, 7 }, "001.6");
+ retVal = VerificationHelper(" ", new int[] { 0, 1, 2 }, "001.7");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The argument string is an empty string");
+
+ try
+ {
+ int[] result = StringInfo.ParseCombiningCharacters(string.Empty);
+ if (result == null)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ if (result.Length != 0)
+ {
+ TestLibrary.TestFramework.LogError("004", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The argument string is a null reference");
+
+ try
+ {
+ string str = null;
+ int[] result = StringInfo.ParseCombiningCharacters(str);
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StringInfoParseCombiningCharacters test = new StringInfoParseCombiningCharacters();
+
+ TestLibrary.TestFramework.BeginTestCase("StringInfoParseCombiningCharacters");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region Private Methods
+ private bool VerificationHelper(string str, int[] expected, string errorno)
+ {
+ bool retVal = true;
+
+ int[] result = StringInfo.ParseCombiningCharacters(str);
+
+ if (!compare<int>(result, expected))
+ {
+ TestLibrary.TestFramework.LogError(errorno, "The result is not the value as expected");
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ private bool compare<T>(T[] a, T[] b)
+ {
+ if (a.Length != b.Length)
+ {
+ return false;
+ }
+ else
+ {
+ for (int i = 0; i < a.Length; i++)
+ {
+ if (!a[i].Equals(b[i]))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfostring.cs b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfostring.cs
new file mode 100644
index 0000000000..0656a630ad
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfostring.cs
@@ -0,0 +1,184 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// System.Globalization.StringInfo.string
+/// </summary>
+public class StringInfoString
+{
+ private const int c_MINI_STRING_LENGTH = 8;
+ private const int c_MAX_STRING_LENGTH = 256;
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The string property in stringinfo object is a random string argument");
+
+ try
+ {
+ string str = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ StringInfo stringInfo = new StringInfo(str);
+ if (stringInfo.String != str)
+ {
+ TestLibrary.TestFramework.LogError("001", "The constructor does not work correctly,the str is: " + str);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The string property in stringinfo object is an empty string argument");
+
+ try
+ {
+ string str = string.Empty;
+ StringInfo stringInfo = new StringInfo(str);
+ if (stringInfo.String != string.Empty)
+ {
+ TestLibrary.TestFramework.LogError("003", "The constructor does not work correctly,the str is: " + str);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check an instance with a string of white space");
+
+ try
+ {
+ string str = " ";
+ StringInfo stringInfo = new StringInfo(str);
+ if (stringInfo.String != " ")
+ {
+ TestLibrary.TestFramework.LogError("005", "The constructor does not work correctly,the str is: " + str);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Set the property with a random string value");
+
+ try
+ {
+ string str = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ StringInfo stringInfo = new StringInfo();
+ stringInfo.String = str;
+ if (stringInfo.String != str)
+ {
+ TestLibrary.TestFramework.LogError("007", "The constructor does not work correctly,the str is: " + str);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The property was set with a value of null");
+
+ try
+ {
+ string str = null;
+ StringInfo stringInfo = new StringInfo();
+ stringInfo.String = str;
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StringInfoString test = new StringInfoString();
+
+ TestLibrary.TestFramework.BeginTestCase("StringInfoString");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/TextElementEnumeratorCurrent.csproj b/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/TextElementEnumeratorCurrent.csproj
new file mode 100644
index 0000000000..293566ca05
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/TextElementEnumeratorCurrent.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="textelementenumeratorcurrent.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/TextElementEnumeratorElementIndex.csproj b/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/TextElementEnumeratorElementIndex.csproj
new file mode 100644
index 0000000000..289f05c338
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/TextElementEnumeratorElementIndex.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="textelementenumeratorelementindex.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/TextElementEnumeratorGetTextElement.csproj b/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/TextElementEnumeratorGetTextElement.csproj
new file mode 100644
index 0000000000..c43bec8922
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/TextElementEnumeratorGetTextElement.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="textelementenumeratorgettextelement.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/TextElementEnumeratorMoveNext.csproj b/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/TextElementEnumeratorMoveNext.csproj
new file mode 100644
index 0000000000..fbc809baef
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/TextElementEnumeratorMoveNext.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="textelementenumeratormovenext.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/TextElementEnumeratorReset.csproj b/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/TextElementEnumeratorReset.csproj
new file mode 100644
index 0000000000..e2089806ec
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/TextElementEnumeratorReset.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="textelementenumeratorreset.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/textelementenumeratorcurrent.cs b/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/textelementenumeratorcurrent.cs
new file mode 100644
index 0000000000..7369ef772f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/textelementenumeratorcurrent.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/textelementenumeratorelementindex.cs b/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/textelementenumeratorelementindex.cs
new file mode 100644
index 0000000000..6a9c144556
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/textelementenumeratorelementindex.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/textelementenumeratorgettextelement.cs b/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/textelementenumeratorgettextelement.cs
new file mode 100644
index 0000000000..a0c6caa59e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/textelementenumeratorgettextelement.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/textelementenumeratormovenext.cs b/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/textelementenumeratormovenext.cs
new file mode 100644
index 0000000000..adcefaefd9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/textelementenumeratormovenext.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/textelementenumeratorreset.cs b/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/textelementenumeratorreset.cs
new file mode 100644
index 0000000000..0f847678fa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textelementenumerator/textelementenumeratorreset.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoCultureName.csproj b/tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoCultureName.csproj
new file mode 100644
index 0000000000..490e931df9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoCultureName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="textinfoculturename.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoEquals.csproj b/tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoEquals.csproj
new file mode 100644
index 0000000000..b3785d2b9c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoEquals.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="textinfoequals.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoGetHashCode.csproj
new file mode 100644
index 0000000000..f3df729358
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="textinfogethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoIsReadOnly.csproj b/tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoIsReadOnly.csproj
new file mode 100644
index 0000000000..23de89ae51
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoIsReadOnly.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="textinfoisreadonly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoToString.csproj b/tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoToString.csproj
new file mode 100644
index 0000000000..90dc881304
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoToString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="textinfotostring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoToUpper1.csproj b/tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoToUpper1.csproj
new file mode 100644
index 0000000000..a1ab434288
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoToUpper1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="textinfotoupper1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoToUpper2.csproj b/tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoToUpper2.csproj
new file mode 100644
index 0000000000..2ba47808f6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textinfo/TextInfoToUpper2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="textinfotoupper2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfoculturename.cs b/tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfoculturename.cs
new file mode 100644
index 0000000000..7d094f80a4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfoculturename.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// System.Globalization.TextInfo.CultureName
+/// </summary>
+public class TextInfoCultureName
+{
+ public static int Main()
+ {
+ TextInfoCultureName testObj = new TextInfoCultureName();
+ TestLibrary.TestFramework.BeginTestCase("for Property:System.Globalization.TextInfo.CultureInfo");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify the en-US TextInfo";
+ const string c_TEST_ID = "P001";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ CultureInfo ci = new CultureInfo("en-US");
+ TextInfo textInfoUS = ci.TextInfo;
+ String cultureName = ci.Name;
+ try
+ {
+
+ if (cultureName != textInfoUS.CultureName)
+ {
+ string errorDesc = "Value is not " + cultureName + " as expected: Actual(" + textInfoUS.CultureName + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Verify the fr-FR CultureInfo's TextInfo";
+ const string c_TEST_ID = "P002";
+
+
+ CultureInfo ci = new CultureInfo("fr-FR");
+ TextInfo textInfoFrance = ci.TextInfo;
+ String cultureName = ci.Name;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (cultureName != textInfoFrance.CultureName)
+ {
+ string errorDesc = "Value is not " + cultureName + " as expected: Actual(" + textInfoFrance.CultureName + ")";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfoequals.cs b/tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfoequals.cs
new file mode 100644
index 0000000000..ca7dae7f7f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfoequals.cs
@@ -0,0 +1,243 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// System.Globalization.TextInfo.Equals(Object)
+/// </summary>
+public class TextInfoEquals
+{
+
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ public static int Main()
+ {
+ TextInfoEquals testObj = new TextInfoEquals();
+ TestLibrary.TestFramework.BeginTestCase("for Method:System.Globalization.TextInfo.Equals(Object)");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify same culture TextInfo equals original TextInfo. ";
+ const string c_TEST_ID = "P001";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ CultureInfo ci = new CultureInfo("en-US");
+ CultureInfo ci2 = new CultureInfo("en-US");
+ object textInfo = ci2.TextInfo;
+
+ try
+ {
+
+ if (!ci.TextInfo.Equals(textInfo))
+ {
+ string errorDesc = "the second TextInfo should equal original TextInfo.";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Verify the TextInfo is not same CultureInfo's . ";
+ const string c_TEST_ID = "P002";
+
+
+ TextInfo textInfoFrance = new CultureInfo("fr-FR").TextInfo;
+ TextInfo textInfoUS = new CultureInfo("en-US").TextInfo;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (textInfoFrance.Equals((object)textInfoUS))
+ {
+ string errorDesc = "the TextInfos of differente CultureInfo should not equal. ";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: Verify the TextInfo not equal a null reference . ";
+ const string c_TEST_ID = "P003";
+
+
+ TextInfo textInfoUS = new CultureInfo("en-US").TextInfo;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (textInfoUS.Equals(null))
+ {
+ string errorDesc = "the US CultureInfo's TextInfo should not equal a null reference. ";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest4: Verify the TextInfo not equal another type object . ";
+ const string c_TEST_ID = "P004";
+
+
+ TextInfo textInfoUS = new CultureInfo("en-US").TextInfo;
+ object obj = (object)(new MyClass());
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (textInfoUS.Equals(obj))
+ {
+ string errorDesc = "the US CultureInfo's TextInfo should not equal user-defined type object. ";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest5: Verify the TextInfo not equal a int object . ";
+ const string c_TEST_ID = "P005";
+
+
+ TextInfo textInfoUS = new CultureInfo("en-US").TextInfo;
+ int i = TestLibrary.Generator.GetInt32(-55);
+ object intObject = i as object;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (textInfoUS.Equals(intObject))
+ {
+ string errorDesc = "the US CultureInfo's TextInfo should not equal int object. ";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest6: Verify the TextInfo not equal a string object . ";
+ const string c_TEST_ID = "P006";
+
+
+ TextInfo textInfoUS = new CultureInfo("en-US").TextInfo;
+ String str = TestLibrary.Generator.GetString(-55, false,c_MINI_STRING_LENGTH,c_MAX_STRING_LENGTH);
+ object strObject = str as object;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (textInfoUS.Equals(strObject))
+ {
+ string errorDesc = "the US CultureInfo's TextInfo should not equal string object. ";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Customer Class
+ public class MyClass
+ {
+
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfogethashcode.cs b/tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfogethashcode.cs
new file mode 100644
index 0000000000..f6cf23af91
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfogethashcode.cs
@@ -0,0 +1,108 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// System.Globalization.TextInfo.GetHashCode()
+/// </summary>
+public class TextInfoGetHashCode
+{
+ public static int Main()
+ {
+ TextInfoGetHashCode testObj = new TextInfoGetHashCode();
+ TestLibrary.TestFramework.BeginTestCase("for Method:System.Globalization.TextInfo.GetHashCode()");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify the TextInfo equals original TextInfo. ";
+ const string c_TEST_ID = "P001";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ CultureInfo ci = new CultureInfo("en-US");
+ CultureInfo ci2 = new CultureInfo("en-US");
+ object textInfo = ci2.TextInfo;
+
+ try
+ {
+ int originalHC = ci.TextInfo.GetHashCode();
+ int clonedHC = (textInfo as TextInfo).GetHashCode();
+ if (originalHC != clonedHC)
+ {
+ string errorDesc = "the cloned TextInfo'HashCode should equal original TextInfo's HashCode.";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Verify the TextInfo is not same CultureInfo's . ";
+ const string c_TEST_ID = "P002";
+
+
+ TextInfo textInfoFrance = new CultureInfo("fr-FR").TextInfo;
+ TextInfo textInfoUS = new CultureInfo("en-US").TextInfo;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int franceHashCode = textInfoFrance.GetHashCode();
+ int usHashCode = textInfoUS.GetHashCode();
+ if (franceHashCode == usHashCode)
+ {
+ string errorDesc = "the differente TextInfo's HashCode should not equal. ";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfoisreadonly.cs b/tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfoisreadonly.cs
new file mode 100644
index 0000000000..f0d9eb1c84
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfoisreadonly.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// System.Globalization.TextInfo.IsReadOnly
+/// </summary>
+public class TextInfoIsReadOnly
+{
+ public static int Main()
+ {
+ TextInfoIsReadOnly testObj = new TextInfoIsReadOnly();
+ TestLibrary.TestFramework.BeginTestCase("for Property:System.Globalization.TextInfo.IsReadOnly");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify the new TextInfo is not readOnly";
+ const string c_TEST_ID = "P001";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ CultureInfo ci = new CultureInfo("en-US");
+ TextInfo textInfoUS = ci.TextInfo;
+
+ try
+ {
+
+ if (textInfoUS.IsReadOnly)
+ {
+ string errorDesc = "Value is not true as expected: Actual is false";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Verify the fr-FR CultureInfo's TextInfo";
+ const string c_TEST_ID = "P002";
+
+
+ CultureInfo ci = new CultureInfo("fr-FR");
+ TextInfo textInfoFrance = ci.TextInfo;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (textInfoFrance.IsReadOnly)
+ {
+ string errorDesc = "Value is not true as expected: Actual is false";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfotostring.cs b/tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfotostring.cs
new file mode 100644
index 0000000000..27064abb32
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfotostring.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// System.Globalization.TextInfo.ToString()
+/// </summary>
+public class TextInfoToString
+{
+ public static int Main()
+ {
+ TextInfoToString testObj = new TextInfoToString();
+ TestLibrary.TestFramework.BeginTestCase("for Method:System.Globalization.TextInfo.ToString()");
+
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify the en-US TextInfo";
+ const string c_TEST_ID = "P001";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ TextInfo textInfoUS = new CultureInfo("en-US").TextInfo;
+ String textinfoStr = "TextInfo - en-US";
+ try
+ {
+
+ if (textinfoStr != textInfoUS.ToString())
+ {
+ string errorDesc = "Value is not " + textinfoStr + " as expected: Actual(" + textInfoUS.ToString() + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Verify the fr-FR CultureInfo's TextInfo";
+ const string c_TEST_ID = "P002";
+
+
+ TextInfo textInfoFrance = new CultureInfo("fr-FR").TextInfo;
+ String textinfoStr = "TextInfo - fr-FR";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (textinfoStr != textInfoFrance.ToString())
+ {
+ string errorDesc = "Value is not " + textinfoStr + " as expected: Actual(" + textInfoFrance.ToString() + ")";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfotoupper1.cs b/tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfotoupper1.cs
new file mode 100644
index 0000000000..d87eac576f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfotoupper1.cs
@@ -0,0 +1,223 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// System.Globalization.TextInfo.ToUpper(Char)
+/// </summary>
+public class TextInfoToUpper1
+{
+ public static int Main()
+ {
+ TextInfoToUpper1 testObj = new TextInfoToUpper1();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: System.Globalization.TextInfo.ToUpper(Char)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: uppercase character";
+ string errorDesc;
+
+ char ch = 'A';
+ char expectedChar = ch;
+ TextInfo textInfo = new CultureInfo("en-US").TextInfo;
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+
+ char actualChar = textInfo.ToUpper(ch);
+ if (actualChar != expectedChar)
+ {
+ errorDesc = string.Format("Uppercase of character \\u{0:x} is not the value ", (int)ch);
+ errorDesc += string.Format("\\u{0:x} as expected: actual(\\u{1:x}", (int)expectedChar, (int)actualChar);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: lowercase character";
+ string errorDesc;
+
+ char ch = 'a';
+ char expectedChar = 'A';
+ TextInfo textInfo = new CultureInfo("en-US").TextInfo;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+
+ char actualChar = textInfo.ToUpper(ch);
+ if (actualChar != expectedChar)
+ {
+ errorDesc = string.Format("Uppercase of character \\u{0:x} is not the value ", (int)ch);
+ errorDesc += string.Format("\\u{0:x} as expected: actual(\\u{1:x}", (int)expectedChar, (int)actualChar);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ const string c_TEST_DESC = "PosTest3: non-alphabetic character";
+ string errorDesc;
+
+ char ch = Convert.ToChar(TestLibrary.Generator.GetInt16(-55) % 10 + '0');
+ char expectedChar = ch;
+ TextInfo textInfo = new CultureInfo("en-US").TextInfo;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+
+ char actualChar = textInfo.ToUpper(ch);
+ if (actualChar != expectedChar)
+ {
+ errorDesc = string.Format("Uppercase of character \\u{0:x} is not the value ", (int)ch);
+ errorDesc += string.Format("\\u{0:x} as expected: actual(\\u{1:x}", (int)expectedChar, (int)actualChar);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P004";
+ const string c_TEST_DESC = "PosTest4: uppercase character and TextInfo is french CultureInfo's";
+ string errorDesc;
+
+ char ch = 'G';
+ char expectedChar = ch;
+ TextInfo textInfo = new CultureInfo("fr-FR").TextInfo;
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+
+ char actualChar = textInfo.ToUpper(ch);
+ if (actualChar != expectedChar)
+ {
+ errorDesc = string.Format("Uppercase of character \\u{0:x} is not the value ", (int)ch);
+ errorDesc += string.Format("\\u{0:x} as expected: actual(\\u{1:x}", (int)expectedChar, (int)actualChar);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P005";
+ const string c_TEST_DESC = "PosTest5: lowercase character and TextInfo is french(France) CultureInfo's";
+ string errorDesc;
+
+ char ch = 'g';
+ char expectedChar = 'G';
+ TextInfo textInfo = new CultureInfo("fr-FR").TextInfo;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+
+ char actualChar = textInfo.ToUpper(ch);
+ if (actualChar != expectedChar)
+ {
+ errorDesc = string.Format("Uppercase of character \\u{0:x} is not the value ", (int)ch);
+ errorDesc += string.Format("\\u{0:x} as expected: actual(\\u{1:x}", (int)expectedChar, (int)actualChar);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfotoupper2.cs b/tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfotoupper2.cs
new file mode 100644
index 0000000000..ff385637d3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/textinfo/textinfotoupper2.cs
@@ -0,0 +1,244 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// System.Globalization.TextInfo.ToUpper(String)
+/// </summary>
+public class TextInfoToUpper2
+{
+ public static int Main()
+ {
+ TextInfoToUpper2 stu1 = new TextInfoToUpper2();
+ TestLibrary.TestFramework.BeginTestCase("for Method:System.Globalization.TextInfo.ToUpper(String)");
+
+ if (stu1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string strA = "HelloWorld!";
+ string ActualResult;
+
+ TextInfo textInfo = new CultureInfo("en-US").TextInfo;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: normal string ToUpper");
+ try
+ {
+ ActualResult = textInfo.ToUpper(strA);
+ if (ActualResult != "HELLOWORLD!")
+ {
+ TestLibrary.TestFramework.LogError("001", "normal string ToUpper ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string strA = string.Empty;
+ string ActualResult;
+
+ TextInfo textInfo = new CultureInfo("en-US").TextInfo;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: empty string ToUpper");
+ try
+ {
+ ActualResult = textInfo.ToUpper(strA);
+ if (ActualResult != string.Empty)
+ {
+ TestLibrary.TestFramework.LogError("003", "empty string ToUpper ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string strA = "Hello\n\0World\u0009!";
+ string ActualResult;
+
+ TextInfo textInfo = new CultureInfo("en-US").TextInfo;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: normal string with special symbols '\u0009' and '\0'");
+ try
+ {
+
+ ActualResult = textInfo.ToUpper(strA);
+ if (ActualResult != "HELLO\n\0WORLD\t!")
+ {
+ TestLibrary.TestFramework.LogError("005", "normal string with special symbols ToUpper ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string strA = "HelloWorld!";
+ string ActualResult;
+
+ TextInfo textInfo = new CultureInfo("fr-FR").TextInfo;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: normal string ToUpper and TextInfo is French (France) CultureInfo's");
+ try
+ {
+ ActualResult = textInfo.ToUpper(strA);
+ if (ActualResult != "HELLOWORLD!")
+ {
+ TestLibrary.TestFramework.LogError("009", "normal string ToUpper ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ string strA = "Hello\n\0World\u0009!";
+ string ActualResult;
+
+ TextInfo textInfo = new CultureInfo("fr-FR").TextInfo;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: normal string with special symbols and TextInfo is French (France) CultureInfo's");
+ try
+ {
+
+ ActualResult = textInfo.ToUpper(strA);
+ if (ActualResult != "HELLO\n\0WORLD\t!")
+ {
+ TestLibrary.TestFramework.LogError("011", "normal string with special symbols ToUpper ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region NegativeTests
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: The string is a null reference";
+ const string c_TEST_ID = "N001";
+
+ TextInfo textInfoUS = new CultureInfo("en-US").TextInfo;
+ string str = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ textInfoUS.ToUpper(str);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, "ArgumentNullException is not thrown as expected.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: The string is a null reference and TextInfo is French (France) CultureInfo's";
+ const string c_TEST_ID = "N001";
+
+ TextInfo textInfoUS = new CultureInfo("fr-FR").TextInfo;
+ string str = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ textInfoUS.ToUpper(str);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, "ArgumentNullException is not thrown as expected.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryClosePunctuation.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryClosePunctuation.csproj
new file mode 100644
index 0000000000..8132678627
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryClosePunctuation.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategoryclosepunctuation.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryConnectorPunctuation.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryConnectorPunctuation.csproj
new file mode 100644
index 0000000000..11f3d94e85
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryConnectorPunctuation.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategoryconnectorpunctuation.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryControl.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryControl.csproj
new file mode 100644
index 0000000000..ae4ca6c387
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryControl.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategorycontrol.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryDashPunctuation.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryDashPunctuation.csproj
new file mode 100644
index 0000000000..739caab798
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryDashPunctuation.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategorydashpunctuation.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryDecimalDigitNumber.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryDecimalDigitNumber.csproj
new file mode 100644
index 0000000000..8b3ef430e3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryDecimalDigitNumber.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategorydecimaldigitnumber.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryEnclosingMark.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryEnclosingMark.csproj
new file mode 100644
index 0000000000..126d970b72
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryEnclosingMark.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategoryenclosingmark.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryFinalQuotePunctuation.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryFinalQuotePunctuation.csproj
new file mode 100644
index 0000000000..c6f43d1278
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryFinalQuotePunctuation.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategoryfinalquotepunctuation.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryFormat.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryFormat.csproj
new file mode 100644
index 0000000000..96f5fc5863
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryFormat.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategoryformat.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryInitialQuotePunctuation.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryInitialQuotePunctuation.csproj
new file mode 100644
index 0000000000..59366df06c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryInitialQuotePunctuation.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategoryinitialquotepunctuation.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryLetterNumber.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryLetterNumber.csproj
new file mode 100644
index 0000000000..ab5c9ceecd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryLetterNumber.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategoryletternumber.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryLineSeparator.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryLineSeparator.csproj
new file mode 100644
index 0000000000..ef9346c0e7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryLineSeparator.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategorylineseparator.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryLowercaseLetter.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryLowercaseLetter.csproj
new file mode 100644
index 0000000000..178bae3ca0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryLowercaseLetter.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategorylowercaseletter.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryMathSymbol.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryMathSymbol.csproj
new file mode 100644
index 0000000000..5a32d07ad3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryMathSymbol.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategorymathsymbol.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryModifierLetter.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryModifierLetter.csproj
new file mode 100644
index 0000000000..a94578a65d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryModifierLetter.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategorymodifierletter.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryModifierSymbol.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryModifierSymbol.csproj
new file mode 100644
index 0000000000..7a9793265e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryModifierSymbol.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategorymodifiersymbol.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryNonSpacingMark.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryNonSpacingMark.csproj
new file mode 100644
index 0000000000..e0278b659c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryNonSpacingMark.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategorynonspacingmark.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOpenPunctuation.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOpenPunctuation.csproj
new file mode 100644
index 0000000000..e6bb5a427c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOpenPunctuation.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategoryopenpunctuation.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOtherLetter.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOtherLetter.csproj
new file mode 100644
index 0000000000..ea407c0f68
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOtherLetter.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategoryotherletter.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOtherNotAssigned.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOtherNotAssigned.csproj
new file mode 100644
index 0000000000..308e4720e5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOtherNotAssigned.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategoryothernotassigned.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOtherNumber.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOtherNumber.csproj
new file mode 100644
index 0000000000..704ad15cf7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOtherNumber.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategoryothernumber.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOtherPunctuation.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOtherPunctuation.csproj
new file mode 100644
index 0000000000..346fce411e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOtherPunctuation.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategoryotherpunctuation.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOtherSymbol.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOtherSymbol.csproj
new file mode 100644
index 0000000000..73ef39db0f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryOtherSymbol.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategoryothersymbol.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryParagraphSeparator.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryParagraphSeparator.csproj
new file mode 100644
index 0000000000..e21f98425e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryParagraphSeparator.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategoryparagraphseparator.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryPrivateUse.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryPrivateUse.csproj
new file mode 100644
index 0000000000..8889136510
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryPrivateUse.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategoryprivateuse.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategorySpaceSeparator.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategorySpaceSeparator.csproj
new file mode 100644
index 0000000000..3e16f7f37e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategorySpaceSeparator.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategoryspaceseparator.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategorySpacingCombiningMark.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategorySpacingCombiningMark.csproj
new file mode 100644
index 0000000000..5c617ba633
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategorySpacingCombiningMark.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategoryspacingcombiningmark.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategorySurrogate.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategorySurrogate.csproj
new file mode 100644
index 0000000000..cb263d0dd9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategorySurrogate.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategorysurrogate.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryTitlecaseLetter.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryTitlecaseLetter.csproj
new file mode 100644
index 0000000000..47655c1195
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryTitlecaseLetter.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategorytitlecaseletter.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryUppercaseLetter.csproj b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryUppercaseLetter.csproj
new file mode 100644
index 0000000000..266bb41667
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/UnicodeCategoryUppercaseLetter.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodecategoryuppercaseletter.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryclosepunctuation.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryclosepunctuation.cs
new file mode 100644
index 0000000000..98af37cdc0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryclosepunctuation.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.ClosePunctuation [v-minch]
+/// </summary>
+public class UnicodeCategoryClosePunctuation
+{
+ public static int Main()
+ {
+ UnicodeCategoryClosePunctuation unicodeClosePunc = new UnicodeCategoryClosePunctuation();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryClosePunctuation");
+ if (unicodeClosePunc.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the ClosePunctuation Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.ClosePunctuation;
+ if (myUnicodeCategory != (UnicodeCategory)21)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 21 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryconnectorpunctuation.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryconnectorpunctuation.cs
new file mode 100644
index 0000000000..dfd6b85756
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryconnectorpunctuation.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.ConnectorPunctuation [v-minch]
+/// </summary>
+public class UnicodeCategoryConnectorPunctuation
+{
+ public static int Main()
+ {
+ UnicodeCategoryConnectorPunctuation unicodeConnectPunc = new UnicodeCategoryConnectorPunctuation();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryConnectorPunctuation");
+ if (unicodeConnectPunc.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the ConnectorPunctuation Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.ConnectorPunctuation;
+ if (myUnicodeCategory != (UnicodeCategory)18)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 18 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorycontrol.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorycontrol.cs
new file mode 100644
index 0000000000..9aa99a8e5d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorycontrol.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.Control [v-minch]
+/// </summary>
+public class UnicodeCategoryControl
+{
+ public static int Main()
+ {
+ UnicodeCategoryControl unicodeControl = new UnicodeCategoryControl();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryControl");
+ if (unicodeControl.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the Control Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.Control;
+ if (myUnicodeCategory != (UnicodeCategory)14)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 14 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorydashpunctuation.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorydashpunctuation.cs
new file mode 100644
index 0000000000..8fb4ef20b9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorydashpunctuation.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.DashPunctuation [v-minch]
+/// </summary>
+public class UnicodeCategoryDashPunctuation
+{
+ public static int Main()
+ {
+ UnicodeCategoryDashPunctuation unicodeDashPunctuation = new UnicodeCategoryDashPunctuation();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryDashPunctuation");
+ if (unicodeDashPunctuation.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the DashPunctuation Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.DashPunctuation;
+ if (myUnicodeCategory != (UnicodeCategory)19)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 19 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorydecimaldigitnumber.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorydecimaldigitnumber.cs
new file mode 100644
index 0000000000..06b08e4beb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorydecimaldigitnumber.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.DecimalDigitNumber [v-minch]
+/// </summary>
+public class UnicodeCategoryDecimalDigitNumber
+{
+ public static int Main()
+ {
+ UnicodeCategoryDecimalDigitNumber unicodeDecimalDigitNumber = new UnicodeCategoryDecimalDigitNumber();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryDecimalDigitNumber");
+ if (unicodeDecimalDigitNumber.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the DecimalDigitNumber Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.DecimalDigitNumber;
+ if (myUnicodeCategory != (UnicodeCategory)8)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 8 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryenclosingmark.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryenclosingmark.cs
new file mode 100644
index 0000000000..18d837bae5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryenclosingmark.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.EnclosingMark [v-minch]
+/// </summary>
+public class UnicodeCategoryEnclosingMark
+{
+ public static int Main()
+ {
+ UnicodeCategoryEnclosingMark unicodeEnclosingMark = new UnicodeCategoryEnclosingMark();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryEnclosingMark");
+ if (unicodeEnclosingMark.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the EnclosingMark Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.EnclosingMark;
+ if (myUnicodeCategory != (UnicodeCategory)7)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 7 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryfinalquotepunctuation.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryfinalquotepunctuation.cs
new file mode 100644
index 0000000000..c1693a43a0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryfinalquotepunctuation.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.FinalQuotePunctuation [v-minch]
+/// </summary>
+public class UnicodeCategoryFinalQuotePunctuation
+{
+ public static int Main()
+ {
+ UnicodeCategoryFinalQuotePunctuation unicodeFinalQuotePunctuation = new UnicodeCategoryFinalQuotePunctuation();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryFinalQuotePunctuation");
+ if (unicodeFinalQuotePunctuation.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the FinalQuotePunctuation Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.FinalQuotePunctuation;
+ if (myUnicodeCategory != (UnicodeCategory)23)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 23 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryformat.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryformat.cs
new file mode 100644
index 0000000000..f8ce3d50a0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryformat.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.Format [v-minch]
+/// </summary>
+public class UnicodeCategoryFormat
+{
+ public static int Main()
+ {
+ UnicodeCategoryFormat unicodeFormat = new UnicodeCategoryFormat();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryFormat");
+ if (unicodeFormat.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the Format Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.Format;
+ if (myUnicodeCategory != (UnicodeCategory)15)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 15 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryinitialquotepunctuation.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryinitialquotepunctuation.cs
new file mode 100644
index 0000000000..84070ec329
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryinitialquotepunctuation.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.InitialQuotePunctuation [v-minch]
+/// </summary>
+public class UnicodeCategoryInitialQuotePunctuation
+{
+ public static int Main()
+ {
+ UnicodeCategoryInitialQuotePunctuation unicodeInitialQuotePunctuation = new UnicodeCategoryInitialQuotePunctuation();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryInitialQuotePunctuation");
+ if (unicodeInitialQuotePunctuation.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the InitialQuotePunctuation Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.InitialQuotePunctuation;
+ if (myUnicodeCategory != (UnicodeCategory)22)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 22 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryletternumber.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryletternumber.cs
new file mode 100644
index 0000000000..f95c248cef
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryletternumber.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.LetterNumber [v-minch]
+/// </summary>
+public class UnicodeCategoryLetterNumber
+{
+ public static int Main()
+ {
+ UnicodeCategoryLetterNumber unicodeLetterNumber = new UnicodeCategoryLetterNumber();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryLetterNumber");
+ if (unicodeLetterNumber.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the LetterNumber Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.LetterNumber;
+ if (myUnicodeCategory != (UnicodeCategory)9)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 9 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorylineseparator.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorylineseparator.cs
new file mode 100644
index 0000000000..8ea8f2edcd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorylineseparator.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.LineSeparator [v-minch]
+/// </summary>
+public class UnicodeCategoryLineSeparator
+{
+ public static int Main()
+ {
+ UnicodeCategoryLineSeparator unicodeLineSeparator = new UnicodeCategoryLineSeparator();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryLineSeparator");
+ if (unicodeLineSeparator.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the LineSeparator Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.LineSeparator;
+ if (myUnicodeCategory != (UnicodeCategory)12)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 12 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorylowercaseletter.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorylowercaseletter.cs
new file mode 100644
index 0000000000..35d628066d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorylowercaseletter.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.LowercaseLette [v-minch]
+/// </summary>
+public class UnicodeCategoryLowercaseLetter
+{
+ public static int Main()
+ {
+ UnicodeCategoryLowercaseLetter unicodeLowercaseLetter = new UnicodeCategoryLowercaseLetter();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryLowercaseLetter");
+ if (unicodeLowercaseLetter.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the LowercaseLetter Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.LowercaseLetter;
+ if (myUnicodeCategory != (UnicodeCategory)1)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 1 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorymathsymbol.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorymathsymbol.cs
new file mode 100644
index 0000000000..66a8427b04
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorymathsymbol.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.MathSymbol [v-minch]
+/// </summary>
+public class UnicodeCategoryMathSymbol
+{
+ public static int Main()
+ {
+ UnicodeCategoryMathSymbol unicodeMathSymbol = new UnicodeCategoryMathSymbol();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryMathSymbol");
+ if (unicodeMathSymbol.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the MathSymbol Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.MathSymbol;
+ if (myUnicodeCategory != (UnicodeCategory)25)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 25 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorymodifierletter.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorymodifierletter.cs
new file mode 100644
index 0000000000..63e6cc510b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorymodifierletter.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.ModifierLetter [v-minch]
+/// </summary>
+public class UnicodeCategoryModifierLetter
+{
+ public static int Main()
+ {
+ UnicodeCategoryModifierLetter unicodeModifierLetter = new UnicodeCategoryModifierLetter();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryModifierLetter");
+ if (unicodeModifierLetter.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the ModifierLetter Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.ModifierLetter;
+ if (myUnicodeCategory != (UnicodeCategory)3)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 3 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorymodifiersymbol.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorymodifiersymbol.cs
new file mode 100644
index 0000000000..c63f4a7fa1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorymodifiersymbol.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.ModifierSymbol [v-minch]
+/// </summary>
+public class UnicodeCategoryModifierSymbol
+{
+ public static int Main()
+ {
+ UnicodeCategoryModifierSymbol unicodeModifierSymbol = new UnicodeCategoryModifierSymbol();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryModifierSymbol");
+ if (unicodeModifierSymbol.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the ModifierSymbol Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.ModifierSymbol;
+ if (myUnicodeCategory != (UnicodeCategory)27)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 27 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorynonspacingmark.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorynonspacingmark.cs
new file mode 100644
index 0000000000..b815da9dfb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorynonspacingmark.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.NonSpacingMark [v-minch]
+/// </summary>
+class UnicodeCategoryNonSpacingMark
+{
+ public static int Main()
+ {
+ UnicodeCategoryNonSpacingMark unicodeNonSpacingMark = new UnicodeCategoryNonSpacingMark();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryNonSpacingMark");
+ if (unicodeNonSpacingMark.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the NonSpacingMark Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.NonSpacingMark;
+ if (myUnicodeCategory != (UnicodeCategory)5)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 5 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryopenpunctuation.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryopenpunctuation.cs
new file mode 100644
index 0000000000..914c69e55d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryopenpunctuation.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.OpenPunctuation [v-minch]
+/// </summary>
+public class UnicodeCategoryOpenPunctuation
+{
+ public static int Main()
+ {
+ UnicodeCategoryOpenPunctuation unicodeOpenPunctuation = new UnicodeCategoryOpenPunctuation();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryOpenPunctuation");
+ if (unicodeOpenPunctuation.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the OpenPunctuation Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.OpenPunctuation;
+ if (myUnicodeCategory != (UnicodeCategory)20)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 20 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryotherletter.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryotherletter.cs
new file mode 100644
index 0000000000..90424ddbc6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryotherletter.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.OtherLetter [v-minch]
+/// </summary>
+public class UnicodeCategoryOtherLetter
+{
+ public static int Main()
+ {
+ UnicodeCategoryOtherLetter unicodeOtherLetter = new UnicodeCategoryOtherLetter();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryOtherLetter");
+ if (unicodeOtherLetter.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the OtherLetter Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.OtherLetter;
+ if (myUnicodeCategory != (UnicodeCategory)4)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 4 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryothernotassigned.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryothernotassigned.cs
new file mode 100644
index 0000000000..a6a7920751
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryothernotassigned.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.OtherNotAssigned [v-minch]
+/// </summary>
+public class UnicodeCategoryOtherNotAssigned
+{
+ public static int Main()
+ {
+ UnicodeCategoryOtherNotAssigned unicodeOtherNotAssigned = new UnicodeCategoryOtherNotAssigned();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryOtherNotAssigned");
+ if (unicodeOtherNotAssigned.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the OtherNotAssigned Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.OtherNotAssigned;
+ if (myUnicodeCategory != (UnicodeCategory)29)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 29 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryothernumber.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryothernumber.cs
new file mode 100644
index 0000000000..f6128de1e0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryothernumber.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.OtherNumber [v-minch]
+/// </summary>
+public class UnicodeCategoryOtherNumber
+{
+ public static int Main()
+ {
+ UnicodeCategoryOtherNumber unicodeOtherNumber = new UnicodeCategoryOtherNumber();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryOtherNumber");
+ if (unicodeOtherNumber.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the OtherNumber Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.OtherNumber;
+ if (myUnicodeCategory != (UnicodeCategory)10)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 10 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryotherpunctuation.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryotherpunctuation.cs
new file mode 100644
index 0000000000..884c0ab6ae
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryotherpunctuation.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.OtherPunctuation [v-minch]
+/// </summary>
+public class UnicodeCategoryOtherPunctuation
+{
+ public static int Main()
+ {
+ UnicodeCategoryOtherPunctuation unicodeOtherPunctuation = new UnicodeCategoryOtherPunctuation();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryOtherPunctuation");
+ if (unicodeOtherPunctuation.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the OtherPunctuation Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.OtherPunctuation;
+ if (myUnicodeCategory != (UnicodeCategory)24)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 24 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryothersymbol.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryothersymbol.cs
new file mode 100644
index 0000000000..4e8d4ac138
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryothersymbol.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.OtherSymbol [v-minch]
+/// </summary>
+public class UnicodeCategoryOtherSymbol
+{
+ public static int Main()
+ {
+ UnicodeCategoryOtherSymbol unicodeOtherSymbol = new UnicodeCategoryOtherSymbol();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryOtherSymbol");
+ if (unicodeOtherSymbol.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the OtherSymbol Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.OtherSymbol;
+ if (myUnicodeCategory != (UnicodeCategory)28)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 28 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryparagraphseparator.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryparagraphseparator.cs
new file mode 100644
index 0000000000..4e1bfa3280
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryparagraphseparator.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.ParagraphSeparator [v-minch]
+/// </summary>
+public class UnicodeCategoryParagraphSeparator
+{
+ public static int Main()
+ {
+ UnicodeCategoryParagraphSeparator unicodeParagraphSeparator = new UnicodeCategoryParagraphSeparator();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryParagraphSeparator");
+ if (unicodeParagraphSeparator.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the ParagraphSeparator Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.ParagraphSeparator;
+ if (myUnicodeCategory != (UnicodeCategory)13)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 13 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryprivateuse.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryprivateuse.cs
new file mode 100644
index 0000000000..53aa98f4ca
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryprivateuse.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.PrivateUse [v-minch]
+/// </summary>
+public class UnicodeCategoryPrivateUse
+{
+ public static int Main()
+ {
+ UnicodeCategoryPrivateUse unicodePrivateUse = new UnicodeCategoryPrivateUse();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryPrivateUse");
+ if (unicodePrivateUse.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the PrivateUse Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.PrivateUse;
+ if (myUnicodeCategory != (UnicodeCategory)17)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 17 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryspaceseparator.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryspaceseparator.cs
new file mode 100644
index 0000000000..5d4b5bb063
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryspaceseparator.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.SpaceSeparator [v-minch]
+/// </summary>
+public class UnicodeCategorySpaceSeparator
+{
+ public static int Main()
+ {
+ UnicodeCategorySpaceSeparator unicodeSpaceSeparator = new UnicodeCategorySpaceSeparator();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategorySpaceSeparator");
+ if (unicodeSpaceSeparator.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the SpaceSeparator Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.SpaceSeparator;
+ if (myUnicodeCategory != (UnicodeCategory)11)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 11 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryspacingcombiningmark.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryspacingcombiningmark.cs
new file mode 100644
index 0000000000..685129f854
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryspacingcombiningmark.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.SpacingCombiningMark [v-minch]
+/// </summary>
+public class UnicodeCategorySpacingCombiningMark
+{
+ public static int Main()
+ {
+ UnicodeCategorySpacingCombiningMark unicodeSpacingCombiningMark = new UnicodeCategorySpacingCombiningMark();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategorySpacingCombiningMark");
+ if (unicodeSpacingCombiningMark.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the SpacingCombiningMark Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.SpacingCombiningMark;
+ if (myUnicodeCategory != (UnicodeCategory)6)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 6 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorysurrogate.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorysurrogate.cs
new file mode 100644
index 0000000000..1acd3e5e1f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorysurrogate.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.Surrogate [v-minch]
+/// </summary>
+public class UnicodeCategorySurrogate
+{
+ public static int Main()
+ {
+ UnicodeCategorySurrogate unicodeSurrogate = new UnicodeCategorySurrogate();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategorySurrogate");
+ if (unicodeSurrogate.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the Surrogate Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.Surrogate;
+ if (myUnicodeCategory != (UnicodeCategory)16)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 16 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorytitlecaseletter.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorytitlecaseletter.cs
new file mode 100644
index 0000000000..1e61044588
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategorytitlecaseletter.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.TitlecaseLetter [v-minch]
+/// </summary>
+public class UnicodeCategoryTitlecaseLetter
+{
+ public static int Main()
+ {
+ UnicodeCategoryTitlecaseLetter unicodeTitlecaseLetter = new UnicodeCategoryTitlecaseLetter();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryTitlecaseLetter");
+ if (unicodeTitlecaseLetter.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the TitlecaseLetter Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.TitlecaseLetter;
+ if (myUnicodeCategory != (UnicodeCategory)2)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 2 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryuppercaseletter.cs b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryuppercaseletter.cs
new file mode 100644
index 0000000000..4a634b6242
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/globalization/unicodecategory/unicodecategoryuppercaseletter.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// UnicodeCategory.UppercaseLetter
+/// </summary>
+public class UnicodeCategoryUppercaseLetter
+{
+ public static int Main()
+ {
+ UnicodeCategoryUppercaseLetter unicodeUppercaseLetter = new UnicodeCategoryUppercaseLetter();
+ TestLibrary.TestFramework.BeginTestCase("UnicodeCategoryUppercaseLetter");
+ if (unicodeUppercaseLetter.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the UppercaseLetter Value in UnicodeCategory Enumerator");
+ try
+ {
+ UnicodeCategory myUnicodeCategory = UnicodeCategory.UppercaseLetter;
+ if (myUnicodeCategory != (UnicodeCategory)0)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 0 but the ActualResult is " + myUnicodeCategory.GetHashCode());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/guid/GuidCompareTo1_cti.csproj b/tests/src/CoreMangLib/cti/system/guid/GuidCompareTo1_cti.csproj
new file mode 100644
index 0000000000..f9464ce72e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/GuidCompareTo1_cti.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="guidcompareto1_cti.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/guid/GuidCompareTo2.csproj b/tests/src/CoreMangLib/cti/system/guid/GuidCompareTo2.csproj
new file mode 100644
index 0000000000..61376f210a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/GuidCompareTo2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="guidcompareto2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/guid/GuidCtor1.csproj b/tests/src/CoreMangLib/cti/system/guid/GuidCtor1.csproj
new file mode 100644
index 0000000000..7db856720d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/GuidCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="guidctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/guid/GuidCtor1_cti.csproj b/tests/src/CoreMangLib/cti/system/guid/GuidCtor1_cti.csproj
new file mode 100644
index 0000000000..0b210436cd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/GuidCtor1_cti.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="guidctor1_cti.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/guid/GuidCtor2_cti.csproj b/tests/src/CoreMangLib/cti/system/guid/GuidCtor2_cti.csproj
new file mode 100644
index 0000000000..11010ededd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/GuidCtor2_cti.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="guidctor2_cti.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/guid/GuidCtor3.csproj b/tests/src/CoreMangLib/cti/system/guid/GuidCtor3.csproj
new file mode 100644
index 0000000000..cb0d31fd81
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/GuidCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="guidctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/guid/GuidCtor3_cti.csproj b/tests/src/CoreMangLib/cti/system/guid/GuidCtor3_cti.csproj
new file mode 100644
index 0000000000..ee59380c04
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/GuidCtor3_cti.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="guidctor3_cti.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/guid/GuidEmpty.csproj b/tests/src/CoreMangLib/cti/system/guid/GuidEmpty.csproj
new file mode 100644
index 0000000000..8809cf3d7a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/GuidEmpty.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="guidempty.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/guid/GuidEquals1.csproj b/tests/src/CoreMangLib/cti/system/guid/GuidEquals1.csproj
new file mode 100644
index 0000000000..c9a376ccf3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/GuidEquals1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="guidequals1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/guid/GuidEquals1_cti.csproj b/tests/src/CoreMangLib/cti/system/guid/GuidEquals1_cti.csproj
new file mode 100644
index 0000000000..3924d495a1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/GuidEquals1_cti.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="guidequals1_cti.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/guid/GuidEquals2.csproj b/tests/src/CoreMangLib/cti/system/guid/GuidEquals2.csproj
new file mode 100644
index 0000000000..f06eb96b4b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/GuidEquals2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="guidequals2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/guid/GuidEquals2_cti.csproj b/tests/src/CoreMangLib/cti/system/guid/GuidEquals2_cti.csproj
new file mode 100644
index 0000000000..4e916b53b6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/GuidEquals2_cti.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="guidequals2_cti.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/guid/GuidEquals3.csproj b/tests/src/CoreMangLib/cti/system/guid/GuidEquals3.csproj
new file mode 100644
index 0000000000..c5e603d517
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/GuidEquals3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="guidequals3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/guid/GuidGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/guid/GuidGetHashCode.csproj
new file mode 100644
index 0000000000..0f59d61c87
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/GuidGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="guidgethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/guid/GuidNewGuid.csproj b/tests/src/CoreMangLib/cti/system/guid/GuidNewGuid.csproj
new file mode 100644
index 0000000000..19b9bf414e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/GuidNewGuid.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="guidnewguid.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/guid/GuidToByteArray.csproj b/tests/src/CoreMangLib/cti/system/guid/GuidToByteArray.csproj
new file mode 100644
index 0000000000..e9edf29036
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/GuidToByteArray.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="guidtobytearray.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/guid/GuidToString1.csproj b/tests/src/CoreMangLib/cti/system/guid/GuidToString1.csproj
new file mode 100644
index 0000000000..d534ed6641
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/GuidToString1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="guidtostring1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/guid/guidcompareto1_cti.cs b/tests/src/CoreMangLib/cti/system/guid/guidcompareto1_cti.cs
new file mode 100644
index 0000000000..682554e6da
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/guidcompareto1_cti.cs
@@ -0,0 +1,234 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// CompareTo(System.Guid)
+/// </summary>
+public class GuidCompareTo1
+{
+ #region Private Fields
+ private const int c_GUID_BYTE_ARRAY_SIZE = 16;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call CompareTo to compare with guid itself");
+
+ try
+ {
+ Guid guid = new Guid();
+ int result = guid.CompareTo(guid);
+ if ( result != 0)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Call CompareTo to compare with guid itself does not return 0");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] guid = " + guid + ", result = " + result);
+ retVal = false;
+ }
+
+ byte[] bytes = new byte[c_GUID_BYTE_ARRAY_SIZE];
+ TestLibrary.Generator.GetBytes(-55, bytes);
+
+ guid = new Guid(bytes);
+ result = guid.CompareTo(guid);
+ if (result != 0)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Call CompareTo to compare with guid itself does not return 0");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] guid = " + guid + ", result = " + result);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call CompareTo to compare with a guid less then it should a positive integer");
+
+ try
+ {
+ retVal = VerificationHelper(new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), true, "002.1") && retVal;
+ retVal = VerificationHelper(new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1), true, "002.2") && retVal;
+ retVal = VerificationHelper(new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1), true, "002.3") && retVal;
+ retVal = VerificationHelper(new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1), true, "002.4") && retVal;
+ retVal = VerificationHelper(new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1), true, "002.5") && retVal;
+ retVal = VerificationHelper(new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1), true, "002.6") && retVal;
+ retVal = VerificationHelper(new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1), true, "002.7") && retVal;
+ retVal = VerificationHelper(new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1), true, "002.8") && retVal;
+ retVal = VerificationHelper(new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1), true, "002.9") && retVal;
+ retVal = VerificationHelper(new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1), true, "002.10") && retVal;
+ retVal = VerificationHelper(new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0), true, "002.11") && retVal;
+
+ // Negative values
+ retVal = VerificationHelper(new Guid(-1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(0, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1), true, "002.12") && retVal;
+ retVal = VerificationHelper(new Guid(-1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(-1, 0, -1, 1, 1, 1, 1, 1, 1, 1, 1), true, "002.13") && retVal;
+ retVal = VerificationHelper(new Guid(-1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(-1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1), true, "002.14") && retVal;
+ retVal = VerificationHelper(new Guid(-1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(-1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 1), true, "002.15") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call CompareTo to compare with a guid less then it should a negative integer");
+
+ try
+ {
+ retVal = VerificationHelper(new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), false, "003.1") && retVal;
+ retVal = VerificationHelper(new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1), false, "003.2") && retVal;
+ retVal = VerificationHelper(new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1), false, "003.3") && retVal;
+ retVal = VerificationHelper(new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1), false, "003.4") && retVal;
+ retVal = VerificationHelper(new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1), false, "003.5") && retVal;
+ retVal = VerificationHelper(new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1), false, "003.6") && retVal;
+ retVal = VerificationHelper(new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1), false, "003.7") && retVal;
+ retVal = VerificationHelper(new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1), false, "003.8") && retVal;
+ retVal = VerificationHelper(new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1), false, "003.9") && retVal;
+ retVal = VerificationHelper(new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1), false, "003.10") && retVal;
+ retVal = VerificationHelper(new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2), false, "003.11") && retVal;
+
+ // Negative values
+ retVal = VerificationHelper(new Guid(2, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(-1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1), false, "003.12") && retVal;
+ retVal = VerificationHelper(new Guid(-1, 2, -1, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(-1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1), false, "003.13") && retVal;
+ retVal = VerificationHelper(new Guid(-1, -1, 2, 1, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(-1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1), false, "003.14") && retVal;
+ retVal = VerificationHelper(new Guid(-1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 1),
+ new Guid(-1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1), false, "003.15") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call CompareTo to compare an guid with all field set to 0 and an guid all field set to F");
+
+ try
+ {
+ retVal = VerificationHelper(new Guid("00000000-0000-0000-0000-000000000000"),
+ new Guid("FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF"), false, "004.1") && retVal;
+ retVal = VerificationHelper(new Guid("FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF"),
+ new Guid("00000000-0000-0000-0000-000000000000"), true, "004.2") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ GuidCompareTo1 test = new GuidCompareTo1();
+
+ TestLibrary.TestFramework.BeginTestCase("GuidCompareTo1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(Guid guid1, Guid guid2, bool greaterThanZero, string errorNo)
+ {
+ bool retVal = true;
+
+ int result = guid1.CompareTo(guid2);
+ bool actual = result > 0;
+
+ if (actual != greaterThanZero)
+ {
+ TestLibrary.TestFramework.LogError(errorNo, "Call CompareTo to compare with guid itself does not return 0");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] guid1 = " + guid1 + ", guid2 = " + guid2 + ", greaterThanZero = " + greaterThanZero + ", result = " + result + ", actual = " + actual);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/guid/guidcompareto2.cs b/tests/src/CoreMangLib/cti/system/guid/guidcompareto2.cs
new file mode 100644
index 0000000000..fddfaa3b83
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/guidcompareto2.cs
@@ -0,0 +1,211 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public class GuidCompareTo2
+{
+ public static int Main()
+ {
+ GuidCompareTo2 ac = new GuidCompareTo2();
+
+ TestLibrary.TestFramework.BeginTestCase("GuidCompareTo2");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Guid g1;
+ Guid g2;
+ int a;
+ short b;
+ short c;
+ byte[] d;
+ int compare;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Guid.CompareTo(Guid) always equals");
+
+ try
+ {
+ d = new byte[8];
+ for(int i=0;i<d.Length; i++) d[i] = TestLibrary.Generator.GetByte(-55);
+ a = TestLibrary.Generator.GetInt32(-55);
+ b = TestLibrary.Generator.GetInt16(-55);
+ c = TestLibrary.Generator.GetInt16(-55);
+ g1 = new Guid(a, b, c, d);
+
+ // equals
+ g2 = new Guid(a, b, c, d);
+
+ compare = g1.CompareTo(g2);
+
+ if (0 != compare)
+ {
+ TestLibrary.TestFramework.LogError("000", "Guid1: " + g1);
+ TestLibrary.TestFramework.LogError("001", "Guid2: " + g2);
+ TestLibrary.TestFramework.LogError("002", "Compare mismatch: Exepcted(0) Actual("+compare+")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Guid g1;
+ Guid g2;
+ int a;
+ short b;
+ short c;
+ byte[] d;
+ int compare;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Guid.CompareTo(Guid) always less than");
+
+ try
+ {
+ for (int i=0; i<11; i++)
+ {
+ d = new byte[8];
+ for(int j=0;j<d.Length; j++) d[j] = (byte)(Math.Abs(TestLibrary.Generator.GetByte(-55) - 1) + 1);
+ a = Math.Abs(TestLibrary.Generator.GetInt32(-55) - 1) + 1;
+ b = (short)(Math.Abs(TestLibrary.Generator.GetInt16(-55) - 1) + 1);
+ c = (short)(Math.Abs(TestLibrary.Generator.GetInt16(-55) - 1) + 1);
+ g1 = new Guid(a, b, c, d);
+
+ // less than
+ switch (i)
+ {
+ case 0:
+ g2 = new Guid(a-1, b, c, d);
+ break;
+ case 1:
+ g2 = new Guid(a, (short)(b-1), c, d);
+ break;
+ case 2:
+ g2 = new Guid(a, b, (short)(c-1), d);
+ break;
+ default:
+ d[i-3] = (byte)(d[i-3] - 1);
+ g2 = new Guid(a, b, c, d);
+ break;
+ }
+
+ compare = g1.CompareTo(g2);
+
+ if (1 != compare)
+ {
+ TestLibrary.TestFramework.LogError("004", "Guid1: " + g1);
+ TestLibrary.TestFramework.LogError("005", "Guid2: " + g2);
+ TestLibrary.TestFramework.LogError("006", "Compare mismatch: Exepcted(1) Actual("+compare+")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ Guid g1;
+ Guid g2;
+ int a;
+ short b;
+ short c;
+ byte[] d;
+ int compare;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Guid.CompareTo(Guid) always greater than");
+
+ try
+ {
+ for (int i=0; i<11; i++)
+ {
+ d = new byte[8];
+ for(int j=0;j<d.Length; j++) d[j] = (byte)(Math.Abs(TestLibrary.Generator.GetByte(-55) - 1));
+ a = Math.Abs(TestLibrary.Generator.GetInt32(-55) - 1);
+ b = (short)(Math.Abs(TestLibrary.Generator.GetInt16(-55) - 1));
+ c = (short)(Math.Abs(TestLibrary.Generator.GetInt16(-55) - 1));
+ g1 = new Guid(a, b, c, d);
+
+ // less than
+ switch (i)
+ {
+ case 0:
+ g2 = new Guid(a+1, b, c, d);
+ break;
+ case 1:
+ g2 = new Guid(a, (short)(b+1), c, d);
+ break;
+ case 2:
+ g2 = new Guid(a, b, (short)(c+1), d);
+ break;
+ default:
+ d[i-3] = (byte)(d[i-3] + 1);
+ g2 = new Guid(a, b, c, d);
+ break;
+ }
+
+ compare = g1.CompareTo(g2);
+
+ if (-1 != compare)
+ {
+ TestLibrary.TestFramework.LogError("008", "Guid1: " + g1);
+ TestLibrary.TestFramework.LogError("009", "Guid2: " + g2);
+ TestLibrary.TestFramework.LogError("010", "Compare mismatch: Exepcted(-1) Actual("+compare+")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("011", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+}
+
+
diff --git a/tests/src/CoreMangLib/cti/system/guid/guidctor1.cs b/tests/src/CoreMangLib/cti/system/guid/guidctor1.cs
new file mode 100644
index 0000000000..169479c361
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/guidctor1.cs
@@ -0,0 +1,142 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public class GuidCtor1
+{
+ public static int Main()
+ {
+ GuidCtor1 ac = new GuidCtor1();
+
+ TestLibrary.TestFramework.BeginTestCase("GuidCtor1");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Guid g;
+ byte[] b;
+ byte[] bAfter;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Guid.Ctor(byte[] b)");
+
+ try
+ {
+ b = new byte[16];
+
+ for(int i=0;i<b.Length; i++) b[i] = TestLibrary.Generator.GetByte(-55);
+
+ g = new Guid(b);
+
+ bAfter = g.ToByteArray();
+
+ for(int i=0;i<b.Length; i++)
+ {
+ if (b[i] != bAfter[i])
+ {
+ TestLibrary.TestFramework.LogError("000", "Guid byte["+i+"] mismatch: Exepcted("+b[i]+") Actual("+bAfter[i]+")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ Guid g;
+ byte[] b;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Guid.Ctor(byte[] b) pass in null");
+
+ try
+ {
+ b = null;
+
+ g = new Guid(b);
+
+ TestLibrary.TestFramework.LogError("002", "Exception expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ Guid g;
+ byte[] b;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Guid.Ctor(byte[] b) b.Length != 16");
+
+ try
+ {
+ b = new byte[19];
+
+ for(int i=0;i<b.Length; i++) b[i] = TestLibrary.Generator.GetByte(-55);
+
+ g = new Guid(b);
+
+ TestLibrary.TestFramework.LogError("004", "Exception expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/guid/guidctor1_cti.cs b/tests/src/CoreMangLib/cti/system/guid/guidctor1_cti.cs
new file mode 100644
index 0000000000..b804a0ee58
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/guidctor1_cti.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ctor(System.Byte[])
+/// </summary>
+public class GuidCtor1
+{
+ #region Private Fields
+ private const int c_GUID_BYTE_ARRAY_SIZE = 16;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string byteValue = null;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor with rand byte array");
+
+ try
+ {
+ byte[] bytes = new byte[c_GUID_BYTE_ARRAY_SIZE];
+ TestLibrary.Generator.GetBytes(-55, bytes);
+
+ for (int i = 0; i < bytes.Length; ++i)
+ {
+ byteValue += bytes[i] + ", ";
+ }
+
+ Guid guid = new Guid(bytes);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] byteValue = " + byteValue);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call ctor with valid empty byte array");
+
+ try
+ {
+ byte[] bytes = new byte[c_GUID_BYTE_ARRAY_SIZE];
+
+ Guid guid = new Guid(bytes);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException should be thrown when b is a null reference");
+
+ try
+ {
+ Guid guid = new Guid(null as byte[]);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown when b is a null reference");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ int arraySize = 0;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentException should be thrown when b is not 16 bytes long.");
+
+ try
+ {
+ do
+ {
+ arraySize = TestLibrary.Generator.GetByte(-55);
+ } while (arraySize == c_GUID_BYTE_ARRAY_SIZE);
+ byte[] bytes = new byte[arraySize];
+
+ Guid guid = new Guid(bytes);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentException is not thrown when b is not 16 bytes long.");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ GuidCtor1 test = new GuidCtor1();
+
+ TestLibrary.TestFramework.BeginTestCase("GuidCtor1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/guid/guidctor2_cti.cs b/tests/src/CoreMangLib/cti/system/guid/guidctor2_cti.cs
new file mode 100644
index 0000000000..2e457292f6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/guidctor2_cti.cs
@@ -0,0 +1,109 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ctor(System.Int32,System.Int16,System.Int16,System.Byte,System.Byte,System.Byte,System.Byte,System.Byte,System.Byte,System.Byte,System.Byte)
+/// </summary>
+public class GuidCtor2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor with all parameter set to zero");
+
+ try
+ {
+ Guid guid = new Guid(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ int a = 0;
+ short b = 0;
+ short c = 0;
+ byte d = 0;
+ byte e = 0;
+ byte f = 0;
+ byte g = 0;
+ byte h = 0;
+ byte i = 0;
+ byte j = 0;
+ byte k = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call ctor with all parameter set to zero");
+
+ try
+ {
+ a = TestLibrary.Generator.GetInt32(-55);
+ b = TestLibrary.Generator.GetInt16(-55);
+ c = TestLibrary.Generator.GetInt16(-55);
+ d = TestLibrary.Generator.GetByte(-55);
+ e = TestLibrary.Generator.GetByte(-55);
+ f = TestLibrary.Generator.GetByte(-55);
+ g = TestLibrary.Generator.GetByte(-55);
+ h = TestLibrary.Generator.GetByte(-55);
+ i = TestLibrary.Generator.GetByte(-55);
+ j = TestLibrary.Generator.GetByte(-55);
+ k = TestLibrary.Generator.GetByte(-55);
+
+ Guid guid = new Guid(a, b, c, d, e, f, g, h, i, j, k);
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + ex);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] a = " + a + ", b = " + b + ", c = " + c + ", d = " + d + ", e = " + e + ", f = " + f + ", g = " + g + ", i = " + i + ", j = " + j + ", k = " + k);
+ TestLibrary.TestFramework.LogInformation(ex.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ GuidCtor2 test = new GuidCtor2();
+
+ TestLibrary.TestFramework.BeginTestCase("GuidCtor2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/guid/guidctor3.cs b/tests/src/CoreMangLib/cti/system/guid/guidctor3.cs
new file mode 100644
index 0000000000..550c110f8a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/guidctor3.cs
@@ -0,0 +1,188 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public class GuidCtor3
+{
+ private const int c_MIN_RANGE = 64;
+ private const int c_MAX_RANGE = 128;
+ private const int c_DELTA_RANGE = 55;
+
+ public static int Main()
+ {
+ GuidCtor3 ac = new GuidCtor3();
+
+ TestLibrary.TestFramework.BeginTestCase("GuidCtor3");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Guid g;
+ int a;
+ short b;
+ short c;
+ byte[] d;
+ byte[] bAfter;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Guid.Ctor(int, short, short, byte[])");
+
+ try
+ {
+ d = new byte[8];
+
+ for(int i=0;i<d.Length; i++) d[i] = TestLibrary.Generator.GetByte(-55);
+ a = TestLibrary.Generator.GetInt32(-55);
+ b = TestLibrary.Generator.GetInt16(-55);
+ c = TestLibrary.Generator.GetInt16(-55);
+
+ g = new Guid(a, b, c, d);
+
+ bAfter = g.ToByteArray();
+
+ if ((byte)(a) != bAfter[0] || (byte)(a >> 8) != bAfter[1] || (byte)(a >> 16) != bAfter[2] || (byte)(a >> 24) != bAfter[3])
+ {
+ TestLibrary.TestFramework.LogError("000", "Guid byte[0,1,2,3] mismatch:");
+ TestLibrary.TestFramework.LogError("001", "Expected: " + (byte)(a) + " " + (byte)(a >> 8) + " " + (byte)(a >> 16) + " " + (byte)(a >> 24));
+ TestLibrary.TestFramework.LogError("002", "Actual : " + bAfter[0] + " " + bAfter[1] + " " + bAfter[2] + " " + bAfter[3]);
+ retVal = false;
+ }
+
+ if ((byte)(b) != bAfter[4] || (byte)(b >> 8) != bAfter[5])
+ {
+ TestLibrary.TestFramework.LogError("003", "Guid byte[4,5] mismatch:");
+ TestLibrary.TestFramework.LogError("004", "Expected: " + (byte)(b) + " " + (byte)(b >> 8));
+ TestLibrary.TestFramework.LogError("005", "Actual : " + bAfter[4] + " " + bAfter[5]);
+ retVal = false;
+ }
+
+ if ((byte)(c) != bAfter[6] || (byte)(c >> 8) != bAfter[7])
+ {
+ TestLibrary.TestFramework.LogError("006", "Guid byte[6,7] mismatch:");
+ TestLibrary.TestFramework.LogError("007", "Expected: " + (byte)(c) + " " + (byte)(c >> 8));
+ TestLibrary.TestFramework.LogError("008", "Actual : " + bAfter[6] + " " + bAfter[7]);
+ retVal = false;
+ }
+
+ for(int i=0;i<d.Length; i++)
+ {
+ if (d[i] != bAfter[i+8])
+ {
+ TestLibrary.TestFramework.LogError("009", "Guid byte["+i+"] mismatch: Exepcted("+d[i]+") Actual("+bAfter[i+8]+")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ Guid g;
+ int a;
+ short b;
+ short c;
+ byte[] d;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Guid.Ctor(int, short, short, byte[]) pass in null");
+
+ try
+ {
+ d = null;
+ a = TestLibrary.Generator.GetInt32(-55);
+ b = TestLibrary.Generator.GetInt16(-55);
+ c = TestLibrary.Generator.GetInt16(-55);
+
+ g = new Guid(a, b, c, d);
+
+ TestLibrary.TestFramework.LogError("011", "Exception expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ Guid g;
+ int a;
+ short b;
+ short c;
+ byte[] d;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Guid.Ctor(int, short, short, byte[]) b.Length != 16");
+
+ try
+ {
+ d = new byte[16];
+
+ for(int i=0;i<d.Length; i++) d[i] = TestLibrary.Generator.GetByte(-55);
+ a = TestLibrary.Generator.GetInt32(-55);
+ b = TestLibrary.Generator.GetInt16(-55);
+ c = TestLibrary.Generator.GetInt16(-55);
+
+ g = new Guid(a, b, c, d );
+
+ TestLibrary.TestFramework.LogError("013", "Exception expected");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/guid/guidctor3_cti.cs b/tests/src/CoreMangLib/cti/system/guid/guidctor3_cti.cs
new file mode 100644
index 0000000000..8f70c3c02e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/guidctor3_cti.cs
@@ -0,0 +1,172 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ctor(System.Int32,System.Int16,System.Int16,System.Byte[])
+/// </summary>
+public class GuidCtor3
+{
+ #region Private Fields
+ private const int c_GUID_BYTE_ARRAY_SIZE = 8;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string byteValue = null;
+ int a = 0;
+ short b = 0;
+ short c = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor with rand byte array");
+
+ try
+ {
+ byte[] bytes = new byte[c_GUID_BYTE_ARRAY_SIZE];
+ TestLibrary.Generator.GetBytes(-55, bytes);
+ a = TestLibrary.Generator.GetInt32(-55);
+ b = TestLibrary.Generator.GetInt16(-55);
+ c = TestLibrary.Generator.GetInt16(-55);
+
+ for (int i = 0; i < bytes.Length; ++i)
+ {
+ byteValue += bytes[i] + ", ";
+ }
+
+ Guid guid = new Guid(a, b, c, bytes);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] byteValue = " + byteValue + ", a = " + a + ", b = " + b + ", c = " + c);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call ctor with valid empty byte array");
+
+ try
+ {
+ byte[] bytes = new byte[c_GUID_BYTE_ARRAY_SIZE];
+
+ Guid guid = new Guid(0, 0, 0, bytes);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException should be thrown when b is a null reference");
+
+ try
+ {
+ Guid guid = new Guid(0, 0, 0, null as byte[]);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown when b is a null reference");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ int arraySize = 0;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentException should be thrown when b is not 16 bytes long.");
+
+ try
+ {
+ do
+ {
+ arraySize = TestLibrary.Generator.GetByte(-55);
+ } while (arraySize == c_GUID_BYTE_ARRAY_SIZE);
+ byte[] bytes = new byte[arraySize];
+
+ Guid guid = new Guid(0, 0, 0, bytes);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentException is not thrown when b is not 16 bytes long.");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ GuidCtor3 test = new GuidCtor3();
+
+ TestLibrary.TestFramework.BeginTestCase("GuidCtor3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/guid/guidempty.cs b/tests/src/CoreMangLib/cti/system/guid/guidempty.cs
new file mode 100644
index 0000000000..6ad475dfd4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/guidempty.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Empty
+/// </summary>
+public class GuidEmpty
+{
+ #region Private Fields
+ private const string c_EMPTY_GUID = "00000000-0000-0000-0000-000000000000";
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The values of Guid.Empty should be all zero");
+
+ try
+ {
+ string actual = Guid.Empty.ToString();
+
+ if (actual != c_EMPTY_GUID)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The values of Guid.Empty are not all zero");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ GuidEmpty test = new GuidEmpty();
+
+ TestLibrary.TestFramework.BeginTestCase("GuidEmpty");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/guid/guidequals1.cs b/tests/src/CoreMangLib/cti/system/guid/guidequals1.cs
new file mode 100644
index 0000000000..b00bf49130
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/guidequals1.cs
@@ -0,0 +1,278 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public class GuidEquals1
+{
+ public static int Main()
+ {
+ GuidEquals1 ac = new GuidEquals1();
+
+ TestLibrary.TestFramework.BeginTestCase("GuidEquals1");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Guid g1;
+ Guid g2;
+ int a;
+ short b;
+ short c;
+ byte[] d;
+ bool compare;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Guid.Equals(object) always equals");
+
+ try
+ {
+ d = new byte[8];
+ for(int i=0;i<d.Length; i++) d[i] = TestLibrary.Generator.GetByte(-55);
+ a = TestLibrary.Generator.GetInt32(-55);
+ b = TestLibrary.Generator.GetInt16(-55);
+ c = TestLibrary.Generator.GetInt16(-55);
+ g1 = new Guid(a, b, c, d);
+
+ // equals
+ g2 = new Guid(a, b, c, d);
+
+ compare = g1.Equals((object)g2);
+
+ if (!compare)
+ {
+ TestLibrary.TestFramework.LogError("000", "Guid1: " + g1);
+ TestLibrary.TestFramework.LogError("001", "Guid2: " + g2);
+ TestLibrary.TestFramework.LogError("002", "Compare failed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Guid g;
+ byte[] b;
+ bool compare;
+ object obj;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Guid.Equals(object) object is null");
+
+ try
+ {
+ b = new byte[16];
+ for(int i=0;i<b.Length; i++) b[i] = TestLibrary.Generator.GetByte(-55);
+ g = new Guid(b);
+
+ obj = null;
+ compare = g.Equals(obj);
+
+ if (compare)
+ {
+ TestLibrary.TestFramework.LogError("004", "Compare succeed unexpectedly");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ Guid g1;
+ Guid g2;
+ int a;
+ short b;
+ short c;
+ byte[] d;
+ bool compare;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Guid.Equals(object) always less than");
+
+ try
+ {
+ for (int i=0; i<11; i++)
+ {
+ d = new byte[8];
+ for(int j=0;j<d.Length; j++) d[j] = (byte)(Math.Abs(TestLibrary.Generator.GetByte(-55) - 1) + 1);
+ a = Math.Abs(TestLibrary.Generator.GetInt32(-55) - 1) + 1;
+ b = (short)(Math.Abs(TestLibrary.Generator.GetInt16(-55) - 1) + 1);
+ c = (short)(Math.Abs(TestLibrary.Generator.GetInt16(-55) - 1) + 1);
+ g1 = new Guid(a, b, c, d);
+
+ // less than
+ switch (i)
+ {
+ case 0:
+ g2 = new Guid(a-1, b, c, d);
+ break;
+ case 1:
+ g2 = new Guid(a, (short)(b-1), c, d);
+ break;
+ case 2:
+ g2 = new Guid(a, b, (short)(c-1), d);
+ break;
+ default:
+ d[i-3] = (byte)(d[i-3] - 1);
+ g2 = new Guid(a, b, c, d);
+ break;
+ }
+
+ compare = g1.Equals((object)g2);
+
+ if (compare)
+ {
+ TestLibrary.TestFramework.LogError("006", "Guid1: " + g1);
+ TestLibrary.TestFramework.LogError("007", "Guid2: " + g2);
+ TestLibrary.TestFramework.LogError("008", "Compare succeed unexpectedly");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ Guid g1;
+ Guid g2;
+ int a;
+ short b;
+ short c;
+ byte[] d;
+ bool compare;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Guid.Equals(object) always greater than");
+
+ try
+ {
+ for (int i=0; i<11; i++)
+ {
+ d = new byte[8];
+ for(int j=0;j<d.Length; j++) d[j] = (byte)(Math.Abs(TestLibrary.Generator.GetByte(-55) - 1));
+ a = Math.Abs(TestLibrary.Generator.GetInt32(-55) - 1);
+ b = (short)(Math.Abs(TestLibrary.Generator.GetInt16(-55) - 1));
+ c = (short)(Math.Abs(TestLibrary.Generator.GetInt16(-55) - 1));
+ g1 = new Guid(a, b, c, d);
+
+ // less than
+ switch (i)
+ {
+ case 0:
+ g2 = new Guid(a+1, b, c, d);
+ break;
+ case 1:
+ g2 = new Guid(a, (short)(b+1), c, d);
+ break;
+ case 2:
+ g2 = new Guid(a, b, (short)(c+1), d);
+ break;
+ default:
+ d[i-3] = (byte)(d[i-3] + 1);
+ g2 = new Guid(a, b, c, d);
+ break;
+ }
+
+ compare = g1.Equals((object)g2);
+
+ if (compare)
+ {
+ TestLibrary.TestFramework.LogError("010", "Guid1: " + g1);
+ TestLibrary.TestFramework.LogError("011", "Guid2: " + g2);
+ TestLibrary.TestFramework.LogError("012", "Compare succeed unexpectedly");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("013", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ Guid g;
+ byte[] b;
+ bool compare;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Guid.Equals(object) object is not a Guid");
+
+ try
+ {
+ b = new byte[16];
+ for(int i=0;i<b.Length; i++) b[i] = TestLibrary.Generator.GetByte(-55);
+ g = new Guid(b);
+
+ compare = g.Equals((object)this);
+
+ if (compare)
+ {
+ TestLibrary.TestFramework.LogError("014", "Compare succeed unexpectedly");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("015", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
+
diff --git a/tests/src/CoreMangLib/cti/system/guid/guidequals1_cti.cs b/tests/src/CoreMangLib/cti/system/guid/guidequals1_cti.cs
new file mode 100644
index 0000000000..d55efc3782
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/guidequals1_cti.cs
@@ -0,0 +1,209 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Equals(System.Guid)
+/// </summary>
+public class GuidEquals1
+{
+ #region Private Fields
+ private const int c_GUID_BYTE_ARRAY_SIZE = 16;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Equals with self instance");
+
+ try
+ {
+ Guid guid = Guid.Empty;
+
+ if (!guid.Equals(guid))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling Equals with self instance returns false");
+ retVal = false;
+ }
+
+ // double check
+ if (!guid.Equals(guid))
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Calling Equals with self instance returns false");
+ retVal = false;
+ }
+
+ byte[] bytes = new byte[c_GUID_BYTE_ARRAY_SIZE];
+ TestLibrary.Generator.GetBytes(-55, bytes);
+ guid = new Guid(bytes);
+
+ if (!guid.Equals(guid))
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Calling Equals with self instance returns false");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] guid = " + guid);
+ retVal = false;
+ }
+
+ // double check
+ if (!guid.Equals(guid))
+ {
+ TestLibrary.TestFramework.LogError("001.4", "Calling Equals with self instance returns false");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] guid = " + guid);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Equals with equal instance");
+
+ try
+ {
+ Guid guid1 = Guid.Empty;
+ Guid guid2 = new Guid("00000000-0000-0000-0000-000000000000");
+
+ if (!guid1.Equals(guid2))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling Equals with equal instance returns false");
+ retVal = false;
+ }
+
+ // double check
+ if (!guid1.Equals(guid2))
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Calling Equals with equal instance returns false");
+ retVal = false;
+ }
+
+ byte[] bytes = new byte[c_GUID_BYTE_ARRAY_SIZE];
+ TestLibrary.Generator.GetBytes(-55, bytes);
+ guid1 = new Guid(bytes);
+ guid2 = new Guid(bytes);
+
+ if (!guid1.Equals(guid2))
+ {
+ TestLibrary.TestFramework.LogError("002.3", "Calling Equals with equal instance returns false");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] guid1 = " + guid1 + ", guid2 = " + guid2);
+ retVal = false;
+ }
+
+ // double check
+ if (!guid1.Equals(guid2))
+ {
+ TestLibrary.TestFramework.LogError("002.4", "Calling Equals with equal instance returns false");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] guid1 = " + guid1 + ", guid2 = " + guid2);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call Equals with not equal instance");
+
+ try
+ {
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0000-0000-0000-000000000001"), false, "003.1") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0000-0000-0000-000000000100"), false, "003.2") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0000-0000-0000-000000010000"), false, "003.3") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0000-0000-0000-000001000000"), false, "003.4") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0000-0000-0000-000100000000"), false, "003.5") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0000-0000-0000-010000000000"), false, "003.6") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0000-0000-0001-000000000000"), false, "003.7") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0000-0000-0100-000000000000"), false, "003.8") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0000-0001-0000-000000000000"), false, "003.9") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0000-0100-0000-000000000000"), false, "003.10") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0001-0000-0000-000000000000"), false, "003.11") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0100-0000-0000-000000000000"), false, "003.12") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000001-0000-0000-0000-000000000000"), false, "003.13") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000100-0000-0000-0000-000000000000"), false, "003.14") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00010000-0000-0000-0000-000000000000"), false, "003.15") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("01000000-0000-0000-0000-000000000000"), false, "003.16") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ GuidEquals1 test = new GuidEquals1();
+
+ TestLibrary.TestFramework.BeginTestCase("GuidEquals1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(Guid guid1, Guid guid2, bool expected, string errorNo)
+ {
+ bool retVal = true;
+
+ bool actual = guid1.Equals(guid2);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError(errorNo, "Calling Equals returns wrong result");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] guid1 = " + guid1 + ", guid2 = " + guid2 + ", actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/guid/guidequals2.cs b/tests/src/CoreMangLib/cti/system/guid/guidequals2.cs
new file mode 100644
index 0000000000..81fb53d52c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/guidequals2.cs
@@ -0,0 +1,211 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public class GuidEquals2
+{
+ public static int Main()
+ {
+ GuidEquals2 ac = new GuidEquals2();
+
+ TestLibrary.TestFramework.BeginTestCase("GuidEquals2");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Guid g1;
+ Guid g2;
+ int a;
+ short b;
+ short c;
+ byte[] d;
+ bool compare;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Guid.Equals(Guid) always equals");
+
+ try
+ {
+ d = new byte[8];
+ for(int i=0;i<d.Length; i++) d[i] = TestLibrary.Generator.GetByte(-55);
+ a = TestLibrary.Generator.GetInt32(-55);
+ b = TestLibrary.Generator.GetInt16(-55);
+ c = TestLibrary.Generator.GetInt16(-55);
+ g1 = new Guid(a, b, c, d);
+
+ // equals
+ g2 = new Guid(a, b, c, d);
+
+ compare = g1.Equals(g2);
+
+ if (!compare)
+ {
+ TestLibrary.TestFramework.LogError("000", "Guid1: " + g1);
+ TestLibrary.TestFramework.LogError("001", "Guid2: " + g2);
+ TestLibrary.TestFramework.LogError("002", "Compare failed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Guid g1;
+ Guid g2;
+ int a;
+ short b;
+ short c;
+ byte[] d;
+ bool compare;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Guid.Equals(Guid) always less than");
+
+ try
+ {
+ for (int i=0; i<11; i++)
+ {
+ d = new byte[8];
+ for(int j=0;j<d.Length; j++) d[j] = (byte)(Math.Abs(TestLibrary.Generator.GetByte(-55) - 1) + 1);
+ a = Math.Abs(TestLibrary.Generator.GetInt32(-55) - 1) + 1;
+ b = (short)(Math.Abs(TestLibrary.Generator.GetInt16(-55) - 1) + 1);
+ c = (short)(Math.Abs(TestLibrary.Generator.GetInt16(-55) - 1) + 1);
+ g1 = new Guid(a, b, c, d);
+
+ // less than
+ switch (i)
+ {
+ case 0:
+ g2 = new Guid(a-1, b, c, d);
+ break;
+ case 1:
+ g2 = new Guid(a, (short)(b-1), c, d);
+ break;
+ case 2:
+ g2 = new Guid(a, b, (short)(c-1), d);
+ break;
+ default:
+ d[i-3] = (byte)(d[i-3] - 1);
+ g2 = new Guid(a, b, c, d);
+ break;
+ }
+
+ compare = g1.Equals(g2);
+
+ if (compare)
+ {
+ TestLibrary.TestFramework.LogError("004", "Guid1: " + g1);
+ TestLibrary.TestFramework.LogError("005", "Guid2: " + g2);
+ TestLibrary.TestFramework.LogError("006", "Compare succeeded unexpectedly");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ Guid g1;
+ Guid g2;
+ int a;
+ short b;
+ short c;
+ byte[] d;
+ bool compare;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Guid.Equals(Guid) always greater than");
+
+ try
+ {
+ for (int i=0; i<11; i++)
+ {
+ d = new byte[8];
+ for(int j=0;j<d.Length; j++) d[j] = (byte)(Math.Abs(TestLibrary.Generator.GetByte(-55) - 1));
+ a = Math.Abs(TestLibrary.Generator.GetInt32(-55) - 1);
+ b = (short)(Math.Abs(TestLibrary.Generator.GetInt16(-55) - 1));
+ c = (short)(Math.Abs(TestLibrary.Generator.GetInt16(-55) - 1));
+ g1 = new Guid(a, b, c, d);
+
+ // less than
+ switch (i)
+ {
+ case 0:
+ g2 = new Guid(a+1, b, c, d);
+ break;
+ case 1:
+ g2 = new Guid(a, (short)(b+1), c, d);
+ break;
+ case 2:
+ g2 = new Guid(a, b, (short)(c+1), d);
+ break;
+ default:
+ d[i-3] = (byte)(d[i-3] + 1);
+ g2 = new Guid(a, b, c, d);
+ break;
+ }
+
+ compare = g1.Equals(g2);
+
+ if (compare)
+ {
+ TestLibrary.TestFramework.LogError("008", "Guid1: " + g1);
+ TestLibrary.TestFramework.LogError("009", "Guid2: " + g2);
+ TestLibrary.TestFramework.LogError("010", "Compare succeeded unexpectedly");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("011", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+}
+
+
diff --git a/tests/src/CoreMangLib/cti/system/guid/guidequals2_cti.cs b/tests/src/CoreMangLib/cti/system/guid/guidequals2_cti.cs
new file mode 100644
index 0000000000..aa6cfe0069
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/guidequals2_cti.cs
@@ -0,0 +1,316 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Equals(System.Object)
+/// </summary>
+public class GuidEquals2
+{
+ #region Private Fields
+ private const int c_GUID_BYTE_ARRAY_SIZE = 16;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Equals with self instance");
+
+ try
+ {
+ Guid guid = Guid.Empty;
+
+ if (!guid.Equals((object)guid))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling Equals with self instance returns false");
+ retVal = false;
+ }
+
+ // double check
+ if (!guid.Equals((object)guid))
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Calling Equals with self instance returns false");
+ retVal = false;
+ }
+
+ byte[] bytes = new byte[c_GUID_BYTE_ARRAY_SIZE];
+ TestLibrary.Generator.GetBytes(-55, bytes);
+ guid = new Guid(bytes);
+
+ if (!guid.Equals((object)guid))
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Calling Equals with self instance returns false");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] guid = " + guid);
+ retVal = false;
+ }
+
+ // double check
+ if (!guid.Equals((object)guid))
+ {
+ TestLibrary.TestFramework.LogError("001.4", "Calling Equals with self instance returns false");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] guid = " + guid);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Equals with equal instance");
+
+ try
+ {
+ Guid guid1 = Guid.Empty;
+ Guid guid2 = new Guid("00000000-0000-0000-0000-000000000000");
+
+ if (!guid1.Equals((object)guid2))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling Equals with equal instance returns false");
+ retVal = false;
+ }
+
+ // double check
+ if (!guid1.Equals((object)guid2))
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Calling Equals with equal instance returns false");
+ retVal = false;
+ }
+
+ byte[] bytes = new byte[c_GUID_BYTE_ARRAY_SIZE];
+ TestLibrary.Generator.GetBytes(-55, bytes);
+ guid1 = new Guid(bytes);
+ guid2 = new Guid(bytes);
+
+ if (!guid1.Equals((object)guid2))
+ {
+ TestLibrary.TestFramework.LogError("002.3", "Calling Equals with equal instance returns false");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] guid1 = " + guid1 + ", guid2 = " + guid2);
+ retVal = false;
+ }
+
+ // double check
+ if (!guid1.Equals((object)guid2))
+ {
+ TestLibrary.TestFramework.LogError("002.4", "Calling Equals with equal instance returns false");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] guid1 = " + guid1 + ", guid2 = " + guid2);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call Equals with not equal instance");
+
+ try
+ {
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0000-0000-0000-000000000001"), false, "003.1") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0000-0000-0000-000000000100"), false, "003.2") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0000-0000-0000-000000010000"), false, "003.3") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0000-0000-0000-000001000000"), false, "003.4") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0000-0000-0000-000100000000"), false, "003.5") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0000-0000-0000-010000000000"), false, "003.6") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0000-0000-0001-000000000000"), false, "003.7") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0000-0000-0100-000000000000"), false, "003.8") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0000-0001-0000-000000000000"), false, "003.9") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0000-0100-0000-000000000000"), false, "003.10") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0001-0000-0000-000000000000"), false, "003.11") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000000-0100-0000-0000-000000000000"), false, "003.12") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000001-0000-0000-0000-000000000000"), false, "003.13") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00000100-0000-0000-0000-000000000000"), false, "003.14") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("00010000-0000-0000-0000-000000000000"), false, "003.15") && retVal;
+ retVal = VerificationHelper(Guid.Empty, new Guid("01000000-0000-0000-0000-000000000000"), false, "003.16") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call Equals with null reference");
+
+ try
+ {
+ Guid guid = Guid.Empty;
+
+ if (guid.Equals(null))
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Calling Equals with null reference returns true");
+ retVal = false;
+ }
+
+ // double check
+ if (guid.Equals(null))
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Calling Equals with null reference returns true");
+ retVal = false;
+ }
+
+ byte[] bytes = new byte[c_GUID_BYTE_ARRAY_SIZE];
+ TestLibrary.Generator.GetBytes(-55, bytes);
+ guid = new Guid(bytes);
+
+ if (guid.Equals(null))
+ {
+ TestLibrary.TestFramework.LogError("004.3", "Calling Equals with null reference returns true");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] guid = " + guid);
+ retVal = false;
+ }
+
+ // double check
+ if (guid.Equals(null))
+ {
+ TestLibrary.TestFramework.LogError("004.4", "Calling Equals with null reference returns true");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] guid = " + guid);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Call Equals with not a Guid instance");
+
+ try
+ {
+ Guid guid = Guid.Empty;
+ Object obj = new Object();
+
+ if (guid.Equals(obj))
+ {
+ TestLibrary.TestFramework.LogError("005.1", "Calling Equals with not a Guid instance returns true");
+ retVal = false;
+ }
+
+ // double check
+ if (guid.Equals(obj))
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Calling Equals with not a Guid instance returns true");
+ retVal = false;
+ }
+
+ byte[] bytes = new byte[c_GUID_BYTE_ARRAY_SIZE];
+ TestLibrary.Generator.GetBytes(-55, bytes);
+ guid = new Guid(bytes);
+
+ if (guid.Equals(obj))
+ {
+ TestLibrary.TestFramework.LogError("005.3", "Calling Equals with not a Guid instance returns true");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] guid = " + guid);
+ retVal = false;
+ }
+
+ // double check
+ if (guid.Equals(obj))
+ {
+ TestLibrary.TestFramework.LogError("005.4", "Calling Equals with not a Guid instance returns true");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] guid = " + guid);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ GuidEquals2 test = new GuidEquals2();
+
+ TestLibrary.TestFramework.BeginTestCase("GuidEquals2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(Guid guid1, object guid2, bool expected, string errorNo)
+ {
+ bool retVal = true;
+
+ bool actual = guid1.Equals(guid2);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError(errorNo, "Calling Equals returns wrong result");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] guid1 = " + guid1 + ", guid2 = " + guid2 + ", actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/guid/guidequals3.cs b/tests/src/CoreMangLib/cti/system/guid/guidequals3.cs
new file mode 100644
index 0000000000..e198c516f2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/guidequals3.cs
@@ -0,0 +1,211 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public class GuidEquals3
+{
+ public static int Main()
+ {
+ GuidEquals3 ac = new GuidEquals3();
+
+ TestLibrary.TestFramework.BeginTestCase("GuidEquals3");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Guid g1;
+ Guid g2;
+ int a;
+ short b;
+ short c;
+ byte[] d;
+ bool compare;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Guid == Guid always equals");
+
+ try
+ {
+ d = new byte[8];
+ for(int i=0;i<d.Length; i++) d[i] = TestLibrary.Generator.GetByte(-55);
+ a = TestLibrary.Generator.GetInt32(-55);
+ b = TestLibrary.Generator.GetInt16(-55);
+ c = TestLibrary.Generator.GetInt16(-55);
+ g1 = new Guid(a, b, c, d);
+
+ // equals
+ g2 = new Guid(a, b, c, d);
+
+ compare = (g1 == g2);
+
+ if (!compare)
+ {
+ TestLibrary.TestFramework.LogError("000", "Guid1: " + g1);
+ TestLibrary.TestFramework.LogError("001", "Guid2: " + g2);
+ TestLibrary.TestFramework.LogError("002", "Compare failed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Guid g1;
+ Guid g2;
+ int a;
+ short b;
+ short c;
+ byte[] d;
+ bool compare;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Guid == Guid always less than");
+
+ try
+ {
+ for (int i=0; i<11; i++)
+ {
+ d = new byte[8];
+ for(int j=0;j<d.Length; j++) d[j] = (byte)(Math.Abs(TestLibrary.Generator.GetByte(-55) - 1) + 1);
+ a = Math.Abs(TestLibrary.Generator.GetInt32(-55) - 1) + 1;
+ b = (short)(Math.Abs(TestLibrary.Generator.GetInt16(-55) - 1) + 1);
+ c = (short)(Math.Abs(TestLibrary.Generator.GetInt16(-55) - 1) + 1);
+ g1 = new Guid(a, b, c, d);
+
+ // less than
+ switch (i)
+ {
+ case 0:
+ g2 = new Guid(a-1, b, c, d);
+ break;
+ case 1:
+ g2 = new Guid(a, (short)(b-1), c, d);
+ break;
+ case 2:
+ g2 = new Guid(a, b, (short)(c-1), d);
+ break;
+ default:
+ d[i-3] = (byte)(d[i-3] - 1);
+ g2 = new Guid(a, b, c, d);
+ break;
+ }
+
+ compare = (g1 == g2);
+
+ if (compare)
+ {
+ TestLibrary.TestFramework.LogError("004", "Guid1: " + g1);
+ TestLibrary.TestFramework.LogError("005", "Guid2: " + g2);
+ TestLibrary.TestFramework.LogError("006", "Compare succeeded unexpectedly");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ Guid g1;
+ Guid g2;
+ int a;
+ short b;
+ short c;
+ byte[] d;
+ bool compare;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Guid == Guid always greater than");
+
+ try
+ {
+ for (int i=0; i<11; i++)
+ {
+ d = new byte[8];
+ for(int j=0;j<d.Length; j++) d[j] = (byte)(Math.Abs(TestLibrary.Generator.GetByte(-55) - 1));
+ a = Math.Abs(TestLibrary.Generator.GetInt32(-55) - 1);
+ b = (short)(Math.Abs(TestLibrary.Generator.GetInt16(-55) - 1));
+ c = (short)(Math.Abs(TestLibrary.Generator.GetInt16(-55) - 1));
+ g1 = new Guid(a, b, c, d);
+
+ // less than
+ switch (i)
+ {
+ case 0:
+ g2 = new Guid(a+1, b, c, d);
+ break;
+ case 1:
+ g2 = new Guid(a, (short)(b+1), c, d);
+ break;
+ case 2:
+ g2 = new Guid(a, b, (short)(c+1), d);
+ break;
+ default:
+ d[i-3] = (byte)(d[i-3] + 1);
+ g2 = new Guid(a, b, c, d);
+ break;
+ }
+
+ compare = (g1 == g2);
+
+ if (compare)
+ {
+ TestLibrary.TestFramework.LogError("008", "Guid1: " + g1);
+ TestLibrary.TestFramework.LogError("009", "Guid2: " + g2);
+ TestLibrary.TestFramework.LogError("010", "Compare succeeded unexpectedly");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("011", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+}
+
+
diff --git a/tests/src/CoreMangLib/cti/system/guid/guidgethashcode.cs b/tests/src/CoreMangLib/cti/system/guid/guidgethashcode.cs
new file mode 100644
index 0000000000..643b4bd6c7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/guidgethashcode.cs
@@ -0,0 +1,116 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// GetHashCode
+/// </summary>
+public class GuidGetHashCode
+{
+ #region Private Fields
+ private const int c_SIZE_OF_ARRAY = 16;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: GetHashCode should return the same value for two equal instances");
+
+ try
+ {
+ byte[] bytes = new byte[c_SIZE_OF_ARRAY];
+ TestLibrary.Generator.GetBytes(-55, bytes);
+
+ Guid guid1 = new Guid(bytes);
+ Guid guid2 = new Guid(bytes);
+
+ int hashCode1 = guid1.GetHashCode();
+ int hashCode2 = guid2.GetHashCode();
+
+ if (hashCode1 != hashCode2)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "GetHashCode does not return the same value for two equal instances");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] hashCode1 = " + hashCode1 + ", hashCode2 = " + hashCode2);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Calling GetHashCode multiple times should return the same hash value");
+
+ try
+ {
+ byte[] bytes = new byte[c_SIZE_OF_ARRAY];
+ TestLibrary.Generator.GetBytes(-55, bytes);
+
+ Guid guid = new Guid(bytes);
+
+ int hashCode1 = guid.GetHashCode();
+ int hashCode2 = guid.GetHashCode();
+
+ if (hashCode1 != hashCode2)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling GetHashCode multiple times does not return the same hash value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] hashCode1 = " + hashCode1 + ", hashCode2 = " + hashCode2);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ GuidGetHashCode test = new GuidGetHashCode();
+
+ TestLibrary.TestFramework.BeginTestCase("GuidGetHashCode");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/guid/guidnewguid.cs b/tests/src/CoreMangLib/cti/system/guid/guidnewguid.cs
new file mode 100644
index 0000000000..be137d76d1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/guidnewguid.cs
@@ -0,0 +1,70 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// NewGuid
+/// </summary>
+public class GuidNewGuid
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call NewGuid to create a new Guid instance");
+
+ try
+ {
+ Guid guid = Guid.NewGuid();
+
+ if (guid.Equals(Guid.Empty))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Call NewGuid to create a new Guid instance returns Guid.Empty");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ GuidNewGuid test = new GuidNewGuid();
+
+ TestLibrary.TestFramework.BeginTestCase("GuidNewGuid");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/guid/guidtobytearray.cs b/tests/src/CoreMangLib/cti/system/guid/guidtobytearray.cs
new file mode 100644
index 0000000000..a74e51e398
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/guidtobytearray.cs
@@ -0,0 +1,147 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToByteArray
+/// </summary>
+public class GuidToByteArray
+{
+ #region Private Fields
+ private const int c_SIZE_OF_ARRAY = 16;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ToByteArray on a guid instance");
+
+ try
+ {
+ do
+ {
+ byte[] expected = new byte[c_SIZE_OF_ARRAY];
+ TestLibrary.Generator.GetBytes(-55, expected);
+
+ Guid guid = new Guid(expected);
+ byte[] actual = guid.ToByteArray();
+
+ if (actual == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToByteArray return null reference");
+ retVal = false;
+ break;
+ }
+
+ if (actual.Length != expected.Length)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "The length of byte array returned by ToByteArray is not the same as original byte array's length");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual.Length = " + actual.Length + ", expected.Length = " + expected.Length);
+ retVal = false;
+ }
+
+ for (int i = 0; i < actual.Length; ++i)
+ {
+ if (actual[i] != expected[i])
+ {
+ TestLibrary.TestFramework.LogError("001.3", "The byte array returned by ToByteArray is not the same as original byte array");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual[i] = " + actual[i] + ", expected[i] = " + expected[i] + ", i = " + i);
+ retVal = false;
+ }
+ }
+ } while (false);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call ToByteArray on a Guid.Empty");
+
+ try
+ {
+ do
+ {
+ byte[] expected = new byte[c_SIZE_OF_ARRAY];
+ byte[] actual = Guid.Empty.ToByteArray();
+
+ if (actual == null)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToByteArray return null reference on a Guid.Empty");
+ retVal = false;
+ break;
+ }
+
+ if (actual.Length != expected.Length)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "The length of byte array returned by ToByteArray on a Guid.Empty is not the same as original byte array's length");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual.Length = " + actual.Length + ", expected.Length = " + expected.Length);
+ retVal = false;
+ }
+
+ for (int i = 0; i < actual.Length; ++i)
+ {
+ if (actual[i] != expected[i])
+ {
+ TestLibrary.TestFramework.LogError("002.3", "The byte array returned by ToByteArray on a Guid.Empty is not the same as original byte array");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual[i] = " + actual[i] + ", expected[i] = " + expected[i] + ", i = " + i);
+ retVal = false;
+ }
+ }
+ } while (false);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ GuidToByteArray test = new GuidToByteArray();
+
+ TestLibrary.TestFramework.BeginTestCase("GuidToByteArray");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/guid/guidtostring1.cs b/tests/src/CoreMangLib/cti/system/guid/guidtostring1.cs
new file mode 100644
index 0000000000..80be8d1d6a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/guid/guidtostring1.cs
@@ -0,0 +1,152 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToString
+/// </summary>
+public class GuidToString1
+{
+ #region Private Fields
+ private const int c_SIZE_OF_ARRAY = 16;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ToString should return a string formated in pattern xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");
+
+ try
+ {
+ byte[] expected = new byte[c_SIZE_OF_ARRAY];
+ TestLibrary.Generator.GetBytes(-55, expected);
+
+ Guid guid = new Guid(expected);
+ retVal = VerificationHelper(guid, expected, "001.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: ToString should return a string formated in pattern xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx on Guid.Empty");
+
+ try
+ {
+ byte[] expected = new byte[c_SIZE_OF_ARRAY];
+
+ retVal = VerificationHelper(Guid.Empty, expected, "002.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ GuidToString1 test = new GuidToString1();
+
+ TestLibrary.TestFramework.BeginTestCase("GuidToString1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private string ByteToHexString(int b)
+ {
+ string ret = String.Empty;
+
+ int h = b >> 4;
+ h = h & 0xf;
+ ret += (char)((h > 9) ? h - 10 + 0x61 : h + 0x30);
+ b = b & 0xf;
+ ret += (char)((b > 9) ? b - 10 + 0x61 : b + 0x30);
+
+ return ret;
+ }
+
+ private bool VerificationHelper(Guid guid, byte[] bytes, string errorNo)
+ {
+ bool retVal = true;
+
+ string val = guid.ToString();
+ string expected = String.Empty;
+
+ int[] fmt = new int[] { 4, 2, 2, 2, 6};
+ bool[] reverseOrder = new bool[] { true, true, true, false, false };
+ int index = 0;
+
+ for ( int f = 0; f < fmt.Length; ++f )
+ {
+ for (int i = fmt[f]; i > 0; --i)
+ {
+ int curIndex = 0;
+ if (reverseOrder[f])
+ curIndex = index + i - 1;
+ else
+ curIndex = index + fmt[f] - i;
+
+ expected += ByteToHexString(bytes[curIndex]);
+ }
+
+ if (f < fmt.Length - 1)
+ {
+ expected += '-';
+ }
+
+ index += fmt[f];
+ }
+
+ if (expected != val)
+ {
+ TestLibrary.TestFramework.LogError(errorNo, "ToString returns invalid guid string");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] expected = " + expected + ", val = " + val);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/icomparable/IComparableCompareTo.csproj b/tests/src/CoreMangLib/cti/system/icomparable/IComparableCompareTo.csproj
new file mode 100644
index 0000000000..66d540f300
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/icomparable/IComparableCompareTo.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="icomparablecompareto.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/icomparable/icomparablecompareto.cs b/tests/src/CoreMangLib/cti/system/icomparable/icomparablecompareto.cs
new file mode 100644
index 0000000000..524f2c21ae
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/icomparable/icomparablecompareto.cs
@@ -0,0 +1,136 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// CompareTo [v-jianq]
+/// </summary>
+
+#region Test Helper Class
+public class Temperature : IComparable
+{
+ protected double m_value;
+
+ public int CompareTo(object obj)
+ {
+ if (obj is Temperature)
+ {
+ Temperature temp = (Temperature)obj;
+ return m_value.CompareTo(temp.m_value);
+ }
+ throw new ArgumentException("object is not a Temperature");
+ }
+
+ public double Value
+ {
+ get { return m_value; }
+ set { m_value = value; }
+ }
+
+ public double Celsius
+ {
+ get { return (m_value - 32) / 1.8; }
+ set { m_value = (value * 1.8) + 32; }
+ }
+}
+
+#endregion
+
+public class IComparableCompareTo
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify interface IComparable .");
+
+ try
+ {
+ IComparable temp = new Temperature();
+
+ int expected = 0;
+ int actual = temp.CompareTo(temp);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method IComparable.CompareTo Err .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ IComparableCompareTo test = new IComparableCompareTo();
+
+ TestLibrary.TestFramework.BeginTestCase("IComparableCompareTo");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/icomparable_generic/IComparable_GenericCompareTo.csproj b/tests/src/CoreMangLib/cti/system/icomparable_generic/IComparable_GenericCompareTo.csproj
new file mode 100644
index 0000000000..e20e85b932
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/icomparable_generic/IComparable_GenericCompareTo.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="icomparable_genericcompareto.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/icomparable_generic/icomparable_genericcompareto.cs b/tests/src/CoreMangLib/cti/system/icomparable_generic/icomparable_genericcompareto.cs
new file mode 100644
index 0000000000..823adfc361
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/icomparable_generic/icomparable_genericcompareto.cs
@@ -0,0 +1,145 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// CompareTo [v-jianq]
+/// </summary>
+
+#region Test Helper Class
+public class Temperature : IComparable<Temperature>
+{
+ public int CompareTo(Temperature other)
+ {
+ return m_value.CompareTo(other.m_value);
+ }
+
+ protected double m_value = 0.0;
+
+ public double Celsius
+ {
+ get { return m_value - 273.15; }
+ }
+
+ public double Kelvin
+ {
+ get { return m_value; }
+ set
+ {
+ if (value < 0.0)
+ {
+ throw new ArgumentException("Temperature cannot be less than absolute zero.");
+ }
+ else
+ {
+ m_value = value;
+ }
+ }
+ }
+
+ public Temperature(double degreesKelvin)
+ {
+ this.Kelvin = degreesKelvin;
+ }
+}
+#endregion
+
+public class IComparable_GenericCompareTo
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify interface System.IComparable<T>.CompareTo(T)");
+
+ try
+ {
+ IComparable<Temperature> temp = new Temperature(10.0d);
+
+ int expected = 0;
+ int actual = temp.CompareTo((Temperature)temp);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method CompareTo Err .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ IComparable_GenericCompareTo test = new IComparable_GenericCompareTo();
+
+ TestLibrary.TestFramework.BeginTestCase("IComparable_GenericCompareTo");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToBoolean.csproj b/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToBoolean.csproj
new file mode 100644
index 0000000000..482b70923d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToBoolean.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="iconvertibletoboolean.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToByte.csproj b/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToByte.csproj
new file mode 100644
index 0000000000..c8344e7f41
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="iconvertibletobyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToChar.csproj b/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToChar.csproj
new file mode 100644
index 0000000000..abc4ca6686
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToChar.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="iconvertibletochar.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToDateTime.csproj b/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToDateTime.csproj
new file mode 100644
index 0000000000..5c07493163
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToDateTime.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="iconvertibletodatetime.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToDecimal.csproj b/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToDecimal.csproj
new file mode 100644
index 0000000000..917c4a0bce
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToDecimal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="iconvertibletodecimal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToDouble.csproj b/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToDouble.csproj
new file mode 100644
index 0000000000..03d6051b74
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToDouble.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="iconvertibletodouble.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToInt16.csproj b/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToInt16.csproj
new file mode 100644
index 0000000000..2db69b35fd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="iconvertibletoint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToInt32.csproj b/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToInt32.csproj
new file mode 100644
index 0000000000..f65d9a32f8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="iconvertibletoint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToInt64.csproj b/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToInt64.csproj
new file mode 100644
index 0000000000..109f869e4c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/iconvertible/IConvertibleToInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="iconvertibletoint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletoboolean.cs b/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletoboolean.cs
new file mode 100644
index 0000000000..88329cf9ce
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletoboolean.cs
@@ -0,0 +1,123 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class IConvertibleToBoolean
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToBoolean of interface IConvertible when value is true.");
+
+ try
+ {
+ if ((true as IConvertible).ToBoolean(null) != true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "expect (true as IConvertible).ToBoolean(null) == true");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToBoolean of interface IConvertible when value is false.");
+
+
+ try
+ {
+ if ((false as IConvertible).ToBoolean(null) != false)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "expect (false as IConvertible).ToBoolean(null) == false");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ IConvertibleToBoolean test = new IConvertibleToBoolean();
+
+ TestLibrary.TestFramework.BeginTestCase("IConvertibleToBoolean");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletobyte.cs b/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletobyte.cs
new file mode 100644
index 0000000000..c5e96a3f4a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletobyte.cs
@@ -0,0 +1,122 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class IConvertibleToByte
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToByte of interface IConvertible when value is true.");
+
+ try
+ {
+ if ((true as IConvertible).ToByte(null) != (byte)1)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "expect (true as IConvertible).ToByte(null) == (byte)1");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToByte of interface IConvertible when value is false.");
+
+ try
+ {
+ if ((false as IConvertible).ToByte(null) != (byte)0)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "expect (false as IConvertible).ToByte(null) == 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ IConvertibleToByte test = new IConvertibleToByte();
+
+ TestLibrary.TestFramework.BeginTestCase("IConvertibleToByte");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletochar.cs b/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletochar.cs
new file mode 100644
index 0000000000..94ca55aec9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletochar.cs
@@ -0,0 +1,121 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class IConvertibleToChar
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ //retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ //public bool PosTest1()
+ //{
+ // bool retVal = true;
+
+ // // Add your scenario description here
+ // TestLibrary.TestFramework.BeginScenario("PosTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Verify method ToChar of interface IConvertible when value is true.");
+
+ try
+ {
+ char v = (true as IConvertible).ToChar(null);
+ TestLibrary.TestFramework.LogError("101.1",
+ String.Format("expected a InvalidCastException on (true as IConvertible).ToChar(null)) but got {0}", v));
+ retVal = false;
+ }
+ catch (InvalidCastException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Verify method ToChar of interface IConvertible when value is false.");
+
+ try
+ {
+ char v = (false as IConvertible).ToChar(null);
+ TestLibrary.TestFramework.LogError("102.1",
+ String.Format("expected a InvalidCastException on (false as IConvertible).ToChar(null)) but got {0}", v));
+ retVal = false;
+ }
+ catch (InvalidCastException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ IConvertibleToChar test = new IConvertibleToChar();
+
+ TestLibrary.TestFramework.BeginTestCase("IConvertibleToChar");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletodatetime.cs b/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletodatetime.cs
new file mode 100644
index 0000000000..02383755c3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletodatetime.cs
@@ -0,0 +1,121 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class IConvertibleToDateTime
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ //retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ //public bool PosTest1()
+ //{
+ // bool retVal = true;
+
+ // // Add your scenario description here
+ // TestLibrary.TestFramework.BeginScenario("PosTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Verify method ToDateTime of interface IConvertible when value is true.");
+
+ try
+ {
+ DateTime v = (true as IConvertible).ToDateTime(null);
+ TestLibrary.TestFramework.LogError("101.1",
+ String.Format("expected a InvalidCastException on (true as IConvertible).ToDateTime(null)) but got {0}", v));
+ retVal = false;
+ }
+ catch (InvalidCastException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Verify method ToDateTime of interface IConvertible when value is false.");
+
+ try
+ {
+ DateTime v = (false as IConvertible).ToDateTime(null);
+ TestLibrary.TestFramework.LogError("102.1",
+ String.Format("expected a InvalidCastException on (false as IConvertible).ToDateTime(null)) but got {0}", v));
+ retVal = false;
+ }
+ catch (InvalidCastException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ IConvertibleToDateTime test = new IConvertibleToDateTime();
+
+ TestLibrary.TestFramework.BeginTestCase("IConvertibleToDateTime");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletodecimal.cs b/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletodecimal.cs
new file mode 100644
index 0000000000..eb63f030b7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletodecimal.cs
@@ -0,0 +1,122 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class IConvertibleToDecimal
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToDateTime of interface IConvertible when value is true.");
+
+ try
+ {
+ if ((true as IConvertible).ToDecimal(null) != 1)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "expect (true as IConvertible).ToDecimal(null) == 1");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToDateTime of interface IConvertible when value is false.");
+
+ try
+ {
+ if ((false as IConvertible).ToDecimal(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "expect (false as IConvertible).ToDecimal(null) == 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ IConvertibleToDecimal test = new IConvertibleToDecimal();
+
+ TestLibrary.TestFramework.BeginTestCase("IConvertibleToDecimal");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletodouble.cs b/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletodouble.cs
new file mode 100644
index 0000000000..360a733abf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletodouble.cs
@@ -0,0 +1,126 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToDouble [v-jianq]
+/// </summary>
+
+public class IConvertibleToDouble
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToDouble of interface IConvertible when value is true.");
+
+ try
+ {
+ if ((true as IConvertible).ToDouble(null) != 1.0)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "expect (true as IConvertible).ToDouble(null) == 1.0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToDouble of interface IConvertible when value is false.");
+
+ try
+ {
+ if ((false as IConvertible).ToDouble(null) != 0.0)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "expect (false as IConvertible).ToDouble(null) == 0.0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ IConvertibleToDouble test = new IConvertibleToDouble();
+
+ TestLibrary.TestFramework.BeginTestCase("IConvertibleToDouble");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletoint16.cs b/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletoint16.cs
new file mode 100644
index 0000000000..c7305316bc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletoint16.cs
@@ -0,0 +1,126 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt16 [v-jianq]
+/// </summary>
+
+public class IConvertibleToInt16
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt16 of interface IConvertible when value is true.");
+
+ try
+ {
+ if ((true as IConvertible).ToInt16(null) != (short)1)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "expect (true as IConvertible).ToInt16(null) == (short)1");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt16 of interface IConvertible when value is false.");
+
+ try
+ {
+ if ((false as IConvertible).ToInt16(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "expect (false as IConvertible).ToInt16(null) == 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ IConvertibleToInt16 test = new IConvertibleToInt16();
+
+ TestLibrary.TestFramework.BeginTestCase("IConvertibleToInt16");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletoint32.cs b/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletoint32.cs
new file mode 100644
index 0000000000..dfdba244a9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletoint32.cs
@@ -0,0 +1,126 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt32 [v-jianq]
+/// </summary>
+
+public class IConvertibleToInt32
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt32 of interface IConvertible when value is true.");
+
+ try
+ {
+ if ((true as IConvertible).ToInt32(null) != 1)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "expect (true as IConvertible).ToInt32(null) == 1");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt32 of interface IConvertible when value is false.");
+
+ try
+ {
+ if ((false as IConvertible).ToInt32(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "expect (false as IConvertible).ToInt32(null) == 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ IConvertibleToInt32 test = new IConvertibleToInt32();
+
+ TestLibrary.TestFramework.BeginTestCase("IConvertibleToInt32");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletoint64.cs b/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletoint64.cs
new file mode 100644
index 0000000000..f10ad06f36
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/iconvertible/iconvertibletoint64.cs
@@ -0,0 +1,126 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToInt64 [v-jianq]
+/// </summary>
+
+public class IConvertibleToInt64
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToInt64 of interface IConvertible when value is true.");
+
+ try
+ {
+ if ((true as IConvertible).ToInt64(null) != 1L)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "expect (true as IConvertible).ToInt64(null) == 1L");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method ToInt64 of interface IConvertible when value is false.");
+
+ try
+ {
+ if ((false as IConvertible).ToInt64(null) != 0L)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "expect (false as IConvertible).ToInt64(null) == 0L");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ IConvertibleToInt64 test = new IConvertibleToInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("IConvertibleToInt64");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/idisposable/IDisposableDispose.csproj b/tests/src/CoreMangLib/cti/system/idisposable/IDisposableDispose.csproj
new file mode 100644
index 0000000000..2085aac549
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/idisposable/IDisposableDispose.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="idisposabledispose.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/idisposable/idisposabledispose.cs b/tests/src/CoreMangLib/cti/system/idisposable/idisposabledispose.cs
new file mode 100644
index 0000000000..8f2b18810b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/idisposable/idisposabledispose.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using System.IO;
+
+
+public class MyResource : IDisposable
+{
+ public IntPtr handle;
+ private bool disposed = false;
+
+ public MyResource(IntPtr handle)
+ {
+ this.handle = handle;
+ }
+
+ public void Dispose()
+ {
+ Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+
+ [System.Security.SecuritySafeCritical]
+ private void Dispose(bool disposing)
+ {
+ if (!this.disposed)
+ {
+ if (disposing)
+ {
+ }
+
+ handle = IntPtr.Zero;
+ }
+ disposed = true;
+ }
+
+ ~MyResource()
+ {
+ Dispose(false);
+ }
+}
+
+/// <summary>
+/// System.IDisposable.Dispose()
+/// </summary>
+public class IDisposableDispose
+{
+ private const string c_FILE_NAME = "FileStream.txt";
+ public static int Main(string[] args)
+ {
+ IDisposableDispose dispose = new IDisposableDispose();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.IDisposable.Dispose()...");
+
+ if (dispose.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ [System.Security.SecuritySafeCritical]
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Dispose interface is implemented by Stream class...");
+
+ try
+ {
+ Stream stream = new FileStream(c_FILE_NAME,FileMode.OpenOrCreate);
+ IDisposable idisp = stream as IDisposable;
+
+ stream.Dispose();
+
+ try
+ {
+ stream.ReadByte();
+
+ TestLibrary.TestFramework.LogError("001","The stream object is not disposed yet!");
+ retVal = false;
+ }
+ catch (ObjectDisposedException)
+ {
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ [System.Security.SecuritySafeCritical]
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify dispose method can be called myltiple times without exception occurs...");
+
+ try
+ {
+ FileStream stream = new FileStream(c_FILE_NAME,FileMode.OpenOrCreate);
+ IDisposable idisp = stream as IDisposable;
+
+ idisp.Dispose();
+ idisp.Dispose();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify dispose interface is implemented in customer class...");
+
+ try
+ {
+ int i = TestLibrary.Generator.GetInt32(-55);
+ IntPtr ip = new IntPtr(i);
+ MyResource myRes = new MyResource(ip);
+
+ myRes.Dispose();
+
+ if (myRes.handle != IntPtr.Zero)
+ {
+ TestLibrary.TestFramework.LogError("004","The handle should be IntPtr.zero!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/iformatable/IFormatableToString.csproj b/tests/src/CoreMangLib/cti/system/iformatable/IFormatableToString.csproj
new file mode 100644
index 0000000000..939f1ae964
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/iformatable/IFormatableToString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="iformatabletostring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/iformatable/iformatabletostring.cs b/tests/src/CoreMangLib/cti/system/iformatable/iformatabletostring.cs
new file mode 100644
index 0000000000..33e10fc547
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/iformatable/iformatabletostring.cs
@@ -0,0 +1,91 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+///<summary>
+///System.IFormatable.ToString()
+///</summary>
+
+public class IFormatableToString
+{
+
+ public static int Main()
+ {
+ IFormatableToString testObj = new IFormatableToString();
+ TestLibrary.TestFramework.BeginTestCase("for interface of System.IFormatable.ToString()");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestClassIFormatable tIF = new TestClassIFormatable();
+ TestClassIFormatProvider tIFP = new TestClassIFormatProvider();
+
+ String format = TestLibrary.Generator.GetString(-55, false,0,255);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Override the interface and invoke it.");
+ try
+ {
+ if (tIF.ToString(format,tIFP)!=null)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(null) !=ActualValue(not null)");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+}
+
+#region Init Derive Class
+
+public class TestClassIFormatable:IFormattable
+{
+ public String ToString(String format, IFormatProvider formatProvider)
+ {
+ return null;
+ }
+
+}
+
+public class TestClassIFormatProvider : IFormatProvider
+{
+ public Object GetFormat(Type formatType)
+ {
+ return null;
+ }
+}
+
+#endregion
diff --git a/tests/src/CoreMangLib/cti/system/indexoutofrangeexception/IndexOutOfRangeExceptionctor1.csproj b/tests/src/CoreMangLib/cti/system/indexoutofrangeexception/IndexOutOfRangeExceptionctor1.csproj
new file mode 100644
index 0000000000..ec926ab8c0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/indexoutofrangeexception/IndexOutOfRangeExceptionctor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="indexoutofrangeexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/indexoutofrangeexception/IndexOutOfRangeExceptionctor2.csproj b/tests/src/CoreMangLib/cti/system/indexoutofrangeexception/IndexOutOfRangeExceptionctor2.csproj
new file mode 100644
index 0000000000..1a11fd18b8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/indexoutofrangeexception/IndexOutOfRangeExceptionctor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="indexoutofrangeexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/indexoutofrangeexception/IndexOutOfRangeExceptionctor3.csproj b/tests/src/CoreMangLib/cti/system/indexoutofrangeexception/IndexOutOfRangeExceptionctor3.csproj
new file mode 100644
index 0000000000..bae6af7969
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/indexoutofrangeexception/IndexOutOfRangeExceptionctor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="indexoutofrangeexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/indexoutofrangeexception/indexoutofrangeexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/indexoutofrangeexception/indexoutofrangeexceptionctor1.cs
new file mode 100644
index 0000000000..c60f9a7d49
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/indexoutofrangeexception/indexoutofrangeexceptionctor1.cs
@@ -0,0 +1,56 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// System.IndexOutOfRangeException.ctor() [v-minch]
+/// </summary>
+public class IndexOutOfRangeExceptionctor1
+{
+ public static int Main()
+ {
+ IndexOutOfRangeExceptionctor1 indexOutOfRangeExceptionctor1 = new IndexOutOfRangeExceptionctor1();
+ TestLibrary.TestFramework.BeginTestCase("IndexOutOfRangeExceptionctor1");
+ if (indexOutOfRangeExceptionctor1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Initialize the IndexOutOfRangeException instance");
+ try
+ {
+ IndexOutOfRangeException myException = new IndexOutOfRangeException();
+ if (myException == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "the IndexOutOfRangeException instance creating failed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/indexoutofrangeexception/indexoutofrangeexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/indexoutofrangeexception/indexoutofrangeexceptionctor2.cs
new file mode 100644
index 0000000000..a68474922a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/indexoutofrangeexception/indexoutofrangeexceptionctor2.cs
@@ -0,0 +1,81 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.IndexOutOfRangeException.ctor(string) [v-minch]
+/// </summary>
+public class IndexOutOfRangeExceptionctor2
+{
+ public static int Main()
+ {
+ IndexOutOfRangeExceptionctor2 indexOutOfRangeExceptionctor2 = new IndexOutOfRangeExceptionctor2();
+ TestLibrary.TestFramework.BeginTestCase("IndexOutOfRangeExceptionctor2");
+ if (indexOutOfRangeExceptionctor2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Initialize the IndexOutOfRangeException instance with message 1");
+ try
+ {
+ string message = "HelloWorld";
+ IndexOutOfRangeException myException = new IndexOutOfRangeException(message);
+ if (myException == null || myException.Message != message)
+ {
+ TestLibrary.TestFramework.LogError("001", "the IndexOutOfRangeException with message instance creating failed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Initialize the IndexOutOfRangeException instance with message 2");
+ try
+ {
+ string message = null;
+ IndexOutOfRangeException myException = new IndexOutOfRangeException(message);
+ if (myException == null || myException.Message == null)
+ {
+ TestLibrary.TestFramework.LogError("003", "Initialize the IndexOutOfRangeException instance with null message not create");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/indexoutofrangeexception/indexoutofrangeexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/indexoutofrangeexception/indexoutofrangeexceptionctor3.cs
new file mode 100644
index 0000000000..316200d35a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/indexoutofrangeexception/indexoutofrangeexceptionctor3.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// System.IndexOutOfRangeException.ctor(string,Exception) [v-minch]
+/// </summary>
+public class IndexOutOfRangeExceptionctor3
+{
+ public static int Main()
+ {
+ IndexOutOfRangeExceptionctor3 indexOutOfRangeExceptionctor3 = new IndexOutOfRangeExceptionctor3();
+ TestLibrary.TestFramework.BeginTestCase("IndexOutOfRangeExceptionctor3");
+ if (indexOutOfRangeExceptionctor3.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Initialize the IndexOutOfRangeException instance with message and InnerException 1");
+ try
+ {
+ string message = "HelloWorld";
+ ArgumentException innerException = new ArgumentException();
+ IndexOutOfRangeException myException = new IndexOutOfRangeException(message,innerException);
+ if (myException == null || myException.Message != message || !myException.InnerException.Equals(innerException))
+ {
+ TestLibrary.TestFramework.LogError("001", "the IndexOutOfRangeException with message and innerException instance creating failed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Initialize the IndexOutOfRangeException instance with message and InnerException 2");
+ try
+ {
+ string message = null;
+ ArgumentException innerException = new ArgumentException();
+ IndexOutOfRangeException myException = new IndexOutOfRangeException(message,innerException);
+ if (myException == null || myException.Message == null || !myException.InnerException.Equals(innerException))
+ {
+ TestLibrary.TestFramework.LogError("003", "Initialize the IndexOutOfRangeException instance with null message not succeed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Initialize the IndexOutOfRangeException instance with message and InnerException 3");
+ try
+ {
+ string message = null;
+ IndexOutOfRangeException myException = new IndexOutOfRangeException(message, null);
+ if (myException == null || myException.Message == null || myException.InnerException != null)
+ {
+ TestLibrary.TestFramework.LogError("005", "Initialize the IndexOutOfRangeException instance with null message and null InnerException not succeed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32CompareTo1.csproj b/tests/src/CoreMangLib/cti/system/int/Int32CompareTo1.csproj
new file mode 100644
index 0000000000..ce5264dc7a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32CompareTo1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32compareto1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32Equals1.csproj b/tests/src/CoreMangLib/cti/system/int/Int32Equals1.csproj
new file mode 100644
index 0000000000..322ea9d2c6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32Equals1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32equals1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32Equals2.csproj b/tests/src/CoreMangLib/cti/system/int/Int32Equals2.csproj
new file mode 100644
index 0000000000..eac9434701
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32Equals2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32equals2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32GetHashCode.csproj b/tests/src/CoreMangLib/cti/system/int/Int32GetHashCode.csproj
new file mode 100644
index 0000000000..ec3de7cd93
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32GetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32gethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToBoolean.csproj b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToBoolean.csproj
new file mode 100644
index 0000000000..e13276b367
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToBoolean.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32iconvertibletoboolean.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToByte.csproj b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToByte.csproj
new file mode 100644
index 0000000000..3d4553f71d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32iconvertibletobyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToChar.csproj b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToChar.csproj
new file mode 100644
index 0000000000..1a3caf4751
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToChar.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32iconvertibletochar.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToDateTime.csproj b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToDateTime.csproj
new file mode 100644
index 0000000000..750210cc30
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToDateTime.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32iconvertibletodatetime.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToDecimal.csproj b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToDecimal.csproj
new file mode 100644
index 0000000000..e65dc118cf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToDecimal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32iconvertibletodecimal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToDouble.csproj b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToDouble.csproj
new file mode 100644
index 0000000000..97ff5d3445
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToDouble.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32iconvertibletodouble.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToInt16.csproj b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToInt16.csproj
new file mode 100644
index 0000000000..1c1f39b5cd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32iconvertibletoint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToInt32.csproj b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToInt32.csproj
new file mode 100644
index 0000000000..796da93f25
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32iconvertibletoint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToInt64.csproj b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToInt64.csproj
new file mode 100644
index 0000000000..b40330bec4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32iconvertibletoint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToSByte.csproj b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToSByte.csproj
new file mode 100644
index 0000000000..3183e03bcb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToSByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32iconvertibletosbyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToSingle.csproj b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToSingle.csproj
new file mode 100644
index 0000000000..6099a92178
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToSingle.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32iconvertibletosingle.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToType.csproj b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToType.csproj
new file mode 100644
index 0000000000..30798c7ac6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToType.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32iconvertibletotype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToUInt16.csproj b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToUInt16.csproj
new file mode 100644
index 0000000000..57dc4eddcf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToUInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32iconvertibletouint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToUInt32.csproj b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToUInt32.csproj
new file mode 100644
index 0000000000..cd7ef56963
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToUInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32iconvertibletouint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToUInt64.csproj b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToUInt64.csproj
new file mode 100644
index 0000000000..c738b66676
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32IConvertibleToUInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32iconvertibletouint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32MaxValue.csproj b/tests/src/CoreMangLib/cti/system/int/Int32MaxValue.csproj
new file mode 100644
index 0000000000..c7dd4e1d67
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32MaxValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32maxvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32MinValue.csproj b/tests/src/CoreMangLib/cti/system/int/Int32MinValue.csproj
new file mode 100644
index 0000000000..275022f7d2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32MinValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32minvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32Parse1.csproj b/tests/src/CoreMangLib/cti/system/int/Int32Parse1.csproj
new file mode 100644
index 0000000000..39d734a9c5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32Parse1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32parse1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32Parse2.csproj b/tests/src/CoreMangLib/cti/system/int/Int32Parse2.csproj
new file mode 100644
index 0000000000..5324f84d4a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32Parse2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32parse2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32Parse3.csproj b/tests/src/CoreMangLib/cti/system/int/Int32Parse3.csproj
new file mode 100644
index 0000000000..e6d8537449
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32Parse3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32parse3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32Parse4.csproj b/tests/src/CoreMangLib/cti/system/int/Int32Parse4.csproj
new file mode 100644
index 0000000000..84086c58f5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32Parse4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32parse4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32ToString3.csproj b/tests/src/CoreMangLib/cti/system/int/Int32ToString3.csproj
new file mode 100644
index 0000000000..f3eac04f68
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32ToString3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32tostring3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/Int32TryParse.csproj b/tests/src/CoreMangLib/cti/system/int/Int32TryParse.csproj
new file mode 100644
index 0000000000..ae40884fa2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/Int32TryParse.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int32tryparse.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/int32compareto1.cs b/tests/src/CoreMangLib/cti/system/int/int32compareto1.cs
new file mode 100644
index 0000000000..ace0006b0e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32compareto1.cs
@@ -0,0 +1,128 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class Int32CompareTo1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: set the parameter to int32MaxValue");
+
+ try
+ {
+ Int32 intCase = Int32.MaxValue;
+ if (intCase.CompareTo(Int32.MaxValue) != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", " CompareTo method works incorrectly");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Compare to a less int");
+
+ try
+ {
+ Int32 intCase = TestLibrary.Generator.GetInt32(-55);
+ if(intCase == Int32.MinValue)
+ intCase = intCase+1; // To avoid the intCase = Int32.MinValue
+
+ if (intCase.CompareTo(Int32.MinValue) <= 0)
+ {
+ TestLibrary.TestFramework.LogError("003", " CompareTo method works incorrectly");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Compare to a big int");
+
+ try
+ {
+ Int32 intCase1 = TestLibrary.Generator.GetInt32(-55);
+ while (intCase1 == Int32.MaxValue)
+ {
+ intCase1 = TestLibrary.Generator.GetInt32(-55);
+ }
+
+ int intCase2 = intCase1 + 1;
+
+ if (intCase1.CompareTo(intCase2) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("005", " CompareTo method works incorrectly");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int32CompareTo1 test = new Int32CompareTo1();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32CompareTo1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int/int32equals1.cs b/tests/src/CoreMangLib/cti/system/int/int32equals1.cs
new file mode 100644
index 0000000000..78ec6f3954
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32equals1.cs
@@ -0,0 +1,138 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+//System.Int32.Equals(System.Int32)
+public class Int32Equals1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Test random number ");
+
+ try
+ {
+ Int32 i1, i2;
+ i1 = i2 = TestLibrary.Generator.GetInt32(-55);
+ if (!i1.Equals(i2))
+ {
+ TestLibrary.TestFramework.LogError("001", String.Format("equal two equal number {0} did not return true", i2));
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Test two different number");
+
+ try
+ {
+
+ Int32 i1 = TestLibrary.Generator.GetInt32(-55);
+ Int32 i2;
+ if (i1 == Int32.MaxValue)
+ {
+ i2 = i1-1;
+ }
+ else
+ {
+ i2 = i1+1;
+ }
+ if (i1.Equals(i2))
+ {
+
+ TestLibrary.TestFramework.LogError("003", String.Format("compare two number which is not equal did not return false: {0} and {1}",i1,i2 ));
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Test 0 equals 0 ");
+
+ try
+ {
+ Int32 i1, i2;
+ i1 = i2 = 0;
+ if (!i1.Equals(i2))
+ {
+ TestLibrary.TestFramework.LogError("005", "0!=0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int32Equals1 test = new Int32Equals1();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32Equals1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int/int32equals2.cs b/tests/src/CoreMangLib/cti/system/int/int32equals2.cs
new file mode 100644
index 0000000000..8202de6e00
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32equals2.cs
@@ -0,0 +1,209 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+//System.Int32.Equals(System.Object)
+public class Int32Equals2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: test two random Int32");
+
+ try
+ {
+ Int32 o1;
+ object o2 = o1 = TestLibrary.Generator.GetInt32(-55);
+ if (!o1.Equals(o2))
+ {
+ TestLibrary.TestFramework.LogError("001", "Equal error , random number: " + o1);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: test 0 = 0");
+
+ try
+ {
+ Int32 o1 = 0;
+ object o2 = 0;
+ if (!o1.Equals(o2))
+ {
+ TestLibrary.TestFramework.LogError("003", "Equal error 0 = 0 ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: test Int32.MaxValue");
+
+ try
+ {
+ Int32 o1 = Int32.MaxValue;
+ object o2 = Int32.MaxValue;
+ if (!o1.Equals(o2))
+ {
+ TestLibrary.TestFramework.LogError("005", "Equal error Int32.MaxValue ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: test Int32.MinValue");
+
+ try
+ {
+ Int32 o1 = Int32.MinValue;
+ object o2 = Int32.MinValue;
+ if (!o1.Equals(o2))
+ {
+ TestLibrary.TestFramework.LogError("007", "Equal error Int32.MinValue ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: test two different value");
+
+ try
+ {
+ Int32 o1 = 0;
+ object o2 = o1 + 1;
+
+ if (o1.Equals(o2))
+ {
+ TestLibrary.TestFramework.LogError("009", "Equal two different value get a true, error");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: test other parameter ");
+
+ try
+ {
+ double f1 = 3.00;
+ Int32 i1 = 3;
+ if (i1.Equals(f1))
+ {
+ TestLibrary.TestFramework.LogError("011", "different kind parameters is not equal");
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int32Equals2 test = new Int32Equals2();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32Equals2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/int/int32gethashcode.cs b/tests/src/CoreMangLib/cti/system/int/int32gethashcode.cs
new file mode 100644
index 0000000000..486b6f3c8d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32gethashcode.cs
@@ -0,0 +1,67 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class Int32GetHashCode
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: check that if the return value is equal to the int32 ");
+
+ try
+ {
+ Int32 i1 = TestLibrary.Generator.GetInt32(-55);
+ Int32 i2 = i1.GetHashCode();
+ if (i1 != i2)
+ {
+ TestLibrary.TestFramework.LogError("001", "int32.gethashcode is not equal to the int32 itself : " + i1);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ Int32GetHashCode test = new Int32GetHashCode();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32GetHashCode");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int/int32iconvertibletoboolean.cs b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletoboolean.cs
new file mode 100644
index 0000000000..8235b3b981
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletoboolean.cs
@@ -0,0 +1,154 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+//system.Int32.System.IConvertibleToBoolean
+public class Int32IConvertibleToBoolean
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: genarate a random int32 to boolean ");
+
+ try
+ {
+ Int32 i1 = 0;
+ while (i1 == 0)
+ {
+ i1 = TestLibrary.Generator.GetInt32(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToBoolean(null) != true)
+ {
+ TestLibrary.TestFramework.LogError("001", String.Format("The int32 {0} to boolean is not true as expected ", i1));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Zero to boolean ");
+
+ try
+ {
+ Int32 i1 = 0;
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToBoolean(null) != false)
+ {
+ TestLibrary.TestFramework.LogError("003", String.Format("The int32 {0} to boolean is not false as expected ", i1));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: convert negative number to boolean ");
+
+ try
+ {
+ Int32 i1 = 0;
+ while (i1 == 0)
+ {
+ i1 = TestLibrary.Generator.GetInt32(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(-i1);
+ if (Icon1.ToBoolean(null) != true)
+ {
+ TestLibrary.TestFramework.LogError("005", String.Format("The int32 {0} to boolean is not true as expected ", i1));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int32IConvertibleToBoolean test = new Int32IConvertibleToBoolean();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32IConvertibleToBoolean");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int/int32iconvertibletobyte.cs b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletobyte.cs
new file mode 100644
index 0000000000..c4c7cc00e0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletobyte.cs
@@ -0,0 +1,215 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+//System.Int32.System.IConvertibleToByte
+public class Int32IConvertibleToByte
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random int32 to byte ");
+
+ try
+ {
+ Int32 i1 = (Int32)TestLibrary.Generator.GetByte(-55);
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToByte(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert ByteMaxValue to byte ");
+
+ try
+ {
+ Int32 i1 = (Int32)Byte.MaxValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToByte(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Convert zero to byte ");
+
+ try
+ {
+ Int32 i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToByte(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not zero as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Convert a negative byte int32 to Byte ");
+
+ try
+ {
+ Int32 i1 = 0;
+ while (i1 == 0)
+ {
+ i1 = (Int32)TestLibrary.Generator.GetByte(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(-i1);
+ Byte b1 = Icon1.ToByte(null);
+ TestLibrary.TestFramework.LogError("101", "An overflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (System.OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Convert int32 to Byte ");
+
+ try
+ {
+ Int32 i1 = 0;
+ while (i1 <= 255)
+ {
+ i1 = (Int32)TestLibrary.Generator.GetInt32(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(i1);
+ Byte b1 = Icon1.ToByte(null);
+ TestLibrary.TestFramework.LogError("103", "An overflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (System.OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Check the border value ");
+
+ try
+ {
+ Int32 i1 = 256;
+ IConvertible Icon1 = (IConvertible)(i1);
+ Byte b1 = Icon1.ToByte(null);
+ TestLibrary.TestFramework.LogError("105", "An overflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (System.OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int32IConvertibleToByte test = new Int32IConvertibleToByte();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32IConvertibleToByte");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int/int32iconvertibletochar.cs b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletochar.cs
new file mode 100644
index 0000000000..8ee6bc4a1d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletochar.cs
@@ -0,0 +1,182 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class Int32IConvertibleToChar
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random (Int32)char to char ");
+
+ try
+ {
+ Int32 i1 = (Int32)TestLibrary.Generator.GetChar(-55);
+ IConvertible Icon1 = (IConvertible)i1;
+ char c1 = Icon1.ToChar(null);
+ if (c1 != i1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert zero to char ");
+
+ try
+ {
+ Int32 i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ char c1 = Icon1.ToChar(null);
+ if (c1 != i1)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check the border value of char ");
+
+ try
+ {
+ Int32 i1 = 65535;
+ IConvertible Icon1 = (IConvertible)i1;
+ char c1 = Icon1.ToChar(null);
+ if (c1 != i1)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Convert a negative int32 to char");
+
+ try
+ {
+ Int32 i1 = (Int32)TestLibrary.Generator.GetChar(-55);
+ IConvertible Icon1 = (IConvertible)(-i1);
+ char c1 = Icon1.ToChar(null);
+ TestLibrary.TestFramework.LogError("101", "OverflowException was not thrown as expected ");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Convert a int32 which is bigger than char to char ");
+
+ try
+ {
+ Int32 i1 = 65536;
+ IConvertible Icon1 = (IConvertible)i1;
+ char c1 = Icon1.ToChar(null);
+ TestLibrary.TestFramework.LogError("103", "OverflowException was not thrown as expected ");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int32IConvertibleToChar test = new Int32IConvertibleToChar();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32IConvertibleToChar");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int/int32iconvertibletodatetime.cs b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletodatetime.cs
new file mode 100644
index 0000000000..2927deeaf7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletodatetime.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class Int32IConvertibleToDateTime
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Convert an random int32 to DateTime ");
+
+ try
+ {
+ Int32 i1 = TestLibrary.Generator.GetInt32(-55);
+ IConvertible Icon1 = (IConvertible)i1;
+ DateTime d1 = Icon1.ToDateTime(null);
+ TestLibrary.TestFramework.LogError("101", "The InvalidCastException was not thrown as expected");
+ retVal = false;
+
+ }
+ catch (System.InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Convert zero to DateTime ");
+
+ try
+ {
+ Int32 i1 = 0;
+ DateTime d1 = (i1 as IConvertible).ToDateTime(null);
+ TestLibrary.TestFramework.LogError("103", "The InvalidCastException was not thrown as expected");
+ retVal = false;
+
+ }
+ catch (System.InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int32IConvertibleToDateTime test = new Int32IConvertibleToDateTime();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32IConvertibleToDateTime");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/int/int32iconvertibletodecimal.cs b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletodecimal.cs
new file mode 100644
index 0000000000..0abc45b9e0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletodecimal.cs
@@ -0,0 +1,152 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class Int32IConvertibleToDecimal
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random int32 to Decimal ");
+
+ try
+ {
+ Int32 i1 = TestLibrary.Generator.GetInt32(-55);
+ IConvertible Icon1 = (IConvertible)i1;
+ decimal d1 = Icon1.ToDecimal(null);
+ if (d1 != i1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not correct as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert zero to decimal");
+
+ try
+ {
+ Int32 i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ decimal d1 = Icon1.ToDecimal(null);
+ if (d1 != i1)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not correct as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check the border value Int32MaxValue");
+
+ try
+ {
+ Int32 i1 = Int32.MaxValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ decimal d1 = Icon1.ToDecimal(null);
+ if (d1 != i1)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not correct as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Check the border value Int32MinValue");
+
+ try
+ {
+ Int32 i1 = Int32.MinValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ decimal d1 = Icon1.ToDecimal(null);
+ if (d1 != i1)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not correct as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int32IConvertibleToDecimal test = new Int32IConvertibleToDecimal();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32IConvertibleToDecimal");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int/int32iconvertibletodouble.cs b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletodouble.cs
new file mode 100644
index 0000000000..d517b94af5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletodouble.cs
@@ -0,0 +1,175 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+//System.Int32.IConvertibleToDouble(System.IFormatProvider)
+public class Int32IConvertibleToDouble
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random int to double");
+
+ try
+ {
+ Int32 i1 = TestLibrary.Generator.GetInt32(-55);
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToDouble(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert a zero to double");
+
+ try
+ {
+ Int32 i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToDouble(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert a negative int to double");
+
+ try
+ {
+ Int32 i1 = 0;
+ while (i1 == 0)
+ {
+ i1 = TestLibrary.Generator.GetInt32(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(-i1);
+ if (Icon1.ToDouble(null) != (-i1))
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Check the boundary value1");
+
+ try
+ {
+ Int32 i1 = Int32.MaxValue;
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToDouble(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Check the boundary value2");
+
+ try
+ {
+ Int32 i1 = Int32.MinValue;
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToDouble(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int32IConvertibleToDouble test = new Int32IConvertibleToDouble();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32IConvertibleToDouble");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int/int32iconvertibletoint16.cs b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletoint16.cs
new file mode 100644
index 0000000000..7ec1c5a408
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletoint16.cs
@@ -0,0 +1,193 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+//System.Int32.ConvertibleToInt16(System.IFormatProvider)
+public class Int32IConvertibleToInt16
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a Int32 to int16");
+
+ try
+ {
+ int i1 = 0;
+ while (i1 == 0)
+ {
+ i1 = (Int32)TestLibrary.Generator.GetInt16(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToInt16(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert a negative int32 to int16");
+
+ try
+ {
+ int i1 = 0;
+ while (i1 == 0)
+ {
+ i1 = (Int32)TestLibrary.Generator.GetInt16(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(-i1);
+ if (Icon1.ToInt16(null) != (-i1))
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert zero to int16");
+
+ try
+ {
+ int i1 = 0;
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToInt16(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Convert a Int32 which is bigger than int16 to Int16 ");
+
+ try
+ {
+ Int32 i1 = 0;
+ while (i1 <= 32767)
+ {
+ i1 = TestLibrary.Generator.GetInt32(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToInt16(null) != i1)
+ {
+ }
+ TestLibrary.TestFramework.LogError("101", "An overflowException was not thrown as expected ");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Check the boundary value ");
+
+ try
+ {
+ Int32 i1 = (Int32)(Int16.MinValue - 1);
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToInt16(null) != i1)
+ {
+ }
+ TestLibrary.TestFramework.LogError("103", "An overflowException was not thrown as expected ");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int32IConvertibleToInt16 test = new Int32IConvertibleToInt16();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32IConvertibleToInt16");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int/int32iconvertibletoint32.cs b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletoint32.cs
new file mode 100644
index 0000000000..66adc0b276
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletoint32.cs
@@ -0,0 +1,152 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class Int32IConvertibleToInt32
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the int32.MaxValue ");
+
+ try
+ {
+ Int32 i1 = Int32.MaxValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToInt32(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Check Int32.MinValue ");
+
+ try
+ {
+ Int32 i1 = Int32.MinValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToInt32(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Check zero ");
+
+ try
+ {
+ Int32 i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToInt32(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Check a random Int32 number ");
+
+ try
+ {
+ Int32 i1 = TestLibrary.Generator.GetInt32(-55);
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToInt32(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("007", string.Format("The result is not the value {0} as expected", i1));
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int32IConvertibleToInt32 test = new Int32IConvertibleToInt32();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32IConvertibleToInt32");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int/int32iconvertibletoint64.cs b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletoint64.cs
new file mode 100644
index 0000000000..e1be7bb657
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletoint64.cs
@@ -0,0 +1,124 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class Int32IConvertibleToInt64
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: check a random int32 to int64");
+
+ try
+ {
+ Int32 i1 = TestLibrary.Generator.GetInt32(-55);
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToInt64(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: check zero");
+
+ try
+ {
+ Int32 i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToInt64(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int32IConvertibleToInt64 test = new Int32IConvertibleToInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32IConvertibleToInt64");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int/int32iconvertibletosbyte.cs b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletosbyte.cs
new file mode 100644
index 0000000000..29c70f04e4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletosbyte.cs
@@ -0,0 +1,198 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class Int32IConvertibleToSByte
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random int32 to sbyte ");
+
+ try
+ {
+ int i1 = 200;
+ while (i1 > 127)
+ {
+ i1 = (Int32)TestLibrary.Generator.GetByte(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToSByte(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert zero to sbyte ");
+
+ try
+ {
+ int i1 = 0;
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToSByte(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert a negative int32 to sbyte ");
+
+ try
+ {
+ int i1 = 200;
+ while (i1 > 127)
+ {
+ i1 = (Int32)TestLibrary.Generator.GetByte(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(-i1);
+ if (Icon1.ToSByte(null) != (-i1))
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Check the boundary value");
+
+ try
+ {
+
+ Int32 i1 = (Int32)sbyte.MinValue;
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToSByte(null) != (i1))
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Test the overflowException");
+
+ try
+ {
+ Int32 i1 = 0;
+ while (i1 <= 127)
+ {
+ i1 = TestLibrary.Generator.GetInt32(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToInt16(null) != i1)
+ {
+ }
+ TestLibrary.TestFramework.LogError("101", "An overflowException was not thrown as expected ");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int32IConvertibleToSByte test = new Int32IConvertibleToSByte();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32IConvertibleToSByte");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int/int32iconvertibletosingle.cs b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletosingle.cs
new file mode 100644
index 0000000000..158d6cd7b4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletosingle.cs
@@ -0,0 +1,164 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class Int32IConvertibleToSingle
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random int32 to single ");
+
+ try
+ {
+ int i1 = 0;
+ while (i1 == 0)
+ {
+ i1 = (Int32)TestLibrary.Generator.GetInt32(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToSingle(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert zero to single ");
+
+ try
+ {
+ int i1 = 0;
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToSingle(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert a negative int32 to single ");
+
+ try
+ {
+ int i1 = 0;
+ while (i1 == 0)
+ {
+ i1 = (Int32)TestLibrary.Generator.GetByte(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(-i1);
+ if (Icon1.ToSingle(null) != (-i1))
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Check the boundary value");
+
+ try
+ {
+
+ Int32 i1 = Int32.MinValue;
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToSingle(null) != (i1))
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int32IConvertibleToSingle test = new Int32IConvertibleToSingle();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32IConvertibleToSingle");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int/int32iconvertibletotype.cs b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletotype.cs
new file mode 100644
index 0000000000..0991cde798
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletotype.cs
@@ -0,0 +1,197 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+//System.Int32.System.IConvertible.ToType(System.Type,System.IFormatProvider)
+public class Int32IConvertibleToType
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random Int32 to String ");
+
+ try
+ {
+ Int32 i1 = TestLibrary.Generator.GetInt32(-55);
+ IConvertible Icon1 = (IConvertible)i1;
+ string s1 = Icon1.ToType(typeof(System.String), null) as string;
+ if (s1 != i1.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected.The random number is :" + i1.ToString());
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert a random Int32 to Boolean ");
+
+ try
+ {
+ Int32 i1 = 0;
+ while (i1 == 0)
+ {
+ i1 = TestLibrary.Generator.GetInt32(-55);
+ }
+ IConvertible Icon1 = (IConvertible)i1;
+ bool s1 = (bool)Icon1.ToType(typeof(System.Boolean), null);
+ if (s1 != true)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected.The random number is :" + i1.ToString());
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check the boundary value ");
+
+ try
+ {
+ Int32 i1 = Int32.MaxValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ long s1 = (long)Icon1.ToType(typeof(System.Int64), null);
+ if (s1 != i1)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert \'-0\' to char ");
+
+ try
+ {
+ Int32 i1 = -0;
+ IConvertible Icon1 = (IConvertible)i1;
+ char s1 = (char)Icon1.ToType(typeof(System.Char), null);
+ if (s1 != '\0')
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Test the overflowException ");
+
+ try
+ {
+ Int32 i1 = 0;
+ while (i1 <= 255)
+ {
+ i1 = TestLibrary.Generator.GetInt32(-55);
+ }
+ IConvertible Icon1 = (IConvertible)i1;
+ byte s1 = (byte)Icon1.ToType(typeof(System.Byte), null);
+ TestLibrary.TestFramework.LogError("101", "The overflow exception was not thrown as expected: ");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int32IConvertibleToType test = new Int32IConvertibleToType();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32IConvertibleToType");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/int/int32iconvertibletouint16.cs b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletouint16.cs
new file mode 100644
index 0000000000..5d76ed5ca5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletouint16.cs
@@ -0,0 +1,190 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+//System.Int32.System.IConvertible.ToUInt16(System.IFormatProvider)
+public class Int32IConvertibleToUInt16
+{
+ public const int c_UINT16_MAXVALUE = 65535;
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random Int32 to UInt16");
+
+ try
+ {
+ Int32 i1 = TestLibrary.Generator.GetInt16(-55);
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToUInt16(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert zero to UInt16 ");
+
+ try
+ {
+ Int32 i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToUInt16(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check the boundary value ");
+
+ try
+ {
+ Int32 i1 = c_UINT16_MAXVALUE;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToUInt16(null) != c_UINT16_MAXVALUE)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Test the overflowException ");
+
+ try
+ {
+ Int32 i1 = 0;
+ while (i1 <= c_UINT16_MAXVALUE)
+ {
+ i1 = TestLibrary.Generator.GetInt32(-55);
+ }
+ IConvertible Icon1 = (IConvertible)i1;
+ ushort s1 = Icon1.ToUInt16(null);
+ TestLibrary.TestFramework.LogError("101", "The overflow exception was not thrown as expected: ");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Test the negative int32 ");
+
+ try
+ {
+ Int32 i1 = TestLibrary.Generator.GetInt16(-55);
+ IConvertible Icon1 = (IConvertible)(-i1);
+ ushort s1 = Icon1.ToUInt16(null);
+ TestLibrary.TestFramework.LogError("103", "The overflow exception was not thrown as expected: ");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int32IConvertibleToUInt16 test = new Int32IConvertibleToUInt16();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32IConvertibleToUInt16");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
+
diff --git a/tests/src/CoreMangLib/cti/system/int/int32iconvertibletouint32.cs b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletouint32.cs
new file mode 100644
index 0000000000..f6448e4567
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletouint32.cs
@@ -0,0 +1,156 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+//System.Int32.System.IConvertible.ToUInt32(System.IFormatProvider)
+public class Int32IConvertibleToUInt32
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random Int32 to UInt32");
+
+ try
+ {
+ Int32 i1 = TestLibrary.Generator.GetInt32(-55);
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToUInt32(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected. The random number is: " + i1);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert zero to UInt32 ");
+
+ try
+ {
+ Int32 i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToUInt32(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check the boundary value ");
+
+ try
+ {
+ Int32 i1 = Int32.MaxValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToUInt32(null) != Int32.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Test the overflowException ");
+
+ try
+ {
+ Int32 i1 = TestLibrary.Generator.GetInt32(-55);
+ IConvertible Icon1 = (IConvertible)(-i1);
+ UInt32 s1 = Icon1.ToUInt32(null);
+ TestLibrary.TestFramework.LogError("101", "The overflow exception was not thrown as expected: ");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int32IConvertibleToUInt32 test = new Int32IConvertibleToUInt32();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32IConvertibleToUInt32");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/int/int32iconvertibletouint64.cs b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletouint64.cs
new file mode 100644
index 0000000000..5c867793fa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32iconvertibletouint64.cs
@@ -0,0 +1,155 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+//System.Int32.System.IConvertible.ToUInt64(System.IFormatProvider)
+public class Int32IConvertibleToUInt64
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random Int32 to UInt64");
+
+ try
+ {
+ Int32 i1 = TestLibrary.Generator.GetInt32(-55);
+ IConvertible Icon1 = (IConvertible)i1;
+ ulong u1 = (ulong)i1;
+ if (Icon1.ToUInt64(null) != u1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected. The random number is: " + i1);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert zero to UInt64 ");
+
+ try
+ {
+ Int32 i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToUInt64(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check the boundary value ");
+
+ try
+ {
+ Int32 i1 = Int32.MaxValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToUInt64(null) != (ulong)Int32.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Test the overflowException ");
+
+ try
+ {
+ Int32 i1 = TestLibrary.Generator.GetInt32(-55);
+ IConvertible Icon1 = (IConvertible)(-i1);
+ ulong s1 = Icon1.ToUInt64(null);
+ TestLibrary.TestFramework.LogError("101", "The overflow exception was not thrown as expected: ");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int32IConvertibleToUInt64 test = new Int32IConvertibleToUInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32IConvertibleToUInt64");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/int/int32maxvalue.cs b/tests/src/CoreMangLib/cti/system/int/int32maxvalue.cs
new file mode 100644
index 0000000000..259dbb03fc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32maxvalue.cs
@@ -0,0 +1,55 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class Int32MaxValue
+{
+ private const int c_Int32MaxValue = 2147483647;
+
+ public static int Main()
+ {
+ Int32MaxValue testCase = new Int32MaxValue();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32MaxValue");
+
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test Int32MaxValue");
+#pragma warning disable 0162
+ if (Int32.MaxValue != c_Int32MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "expected Int32MaxValue is not equal to 2147483647 ");
+ retVal = false;
+ }
+#pragma warning restore
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/int/int32minvalue.cs b/tests/src/CoreMangLib/cti/system/int/int32minvalue.cs
new file mode 100644
index 0000000000..e2b5013187
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32minvalue.cs
@@ -0,0 +1,56 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+class Int32MinValue
+{
+ private const int c_Int32MinValue = -2147483648;
+
+ public static int Main()
+ {
+ Int32MinValue testCase = new Int32MinValue();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32MinValue");
+
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test Int32MinValue ");
+#pragma warning disable 0162
+ if (Int32.MinValue != c_Int32MinValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "expected Int32MaxValue is not equal to -2147483648 ");
+ retVal = false;
+ }
+#pragma warning restore
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/int/int32parse1.cs b/tests/src/CoreMangLib/cti/system/int/int32parse1.cs
new file mode 100644
index 0000000000..d8eb2c0cd9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32parse1.cs
@@ -0,0 +1,289 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+//system.Int32.Parse(system.string)
+public class Int32Parse1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: normal test basic function of the method ");
+
+ try
+ {
+ string s1 = Int32.MaxValue.ToString();
+ if (Int32.MaxValue != Int32.Parse(s1))
+ {
+ TestLibrary.TestFramework.LogError("001", "the result is not the int32.maxvalue as expected ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: normal test about int32.minvalue ");
+
+ try
+ {
+ string s1 = Int32.MinValue.ToString();
+ if (Int32.MinValue != Int32.Parse(s1))
+ {
+ TestLibrary.TestFramework.LogError("003", "the result is not the int32.minvalue as expected ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: test the parameter of white space in both of the beginning and end of the string");
+
+ try
+ {
+ string s1 = " 12125684 ";
+ Int32 i1 = Int32.Parse(s1);
+ if (i1 != 12125684)
+ {
+ TestLibrary.TestFramework.LogError("005", "the result is not the int32 as expected ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: test the parameter (-0)");
+
+ try
+ {
+ string s1 = "-0";
+ Int32 i1 = Int32.Parse(s1);
+ if (i1 != 0)
+ {
+ TestLibrary.TestFramework.LogError("007", "the result is not the 0 as expected ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: null reference parameter ");
+
+ try
+ {
+ string s1 = null;
+ Int32 i1 = Int32.Parse(s1);
+ TestLibrary.TestFramework.LogError("101", "the Method did not throw a ArgumentNullException");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: test FormatException1 ");
+
+ string s1 = "-321-677";
+ try
+ {
+ Int32 i1 = Int32.Parse(s1);
+ TestLibrary.TestFramework.LogError("103", "the Method did not throw a FormatException,patameter is: " + s1);
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: test FormatException2, parameter:43dce6a");
+
+ try
+ {
+ string s1 = "43dce6a";
+ Int32 i1 = Int32.Parse(s1);
+ TestLibrary.TestFramework.LogError("105", "the Method did not throw a FormatException,patameter is: " + s1);
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: test FormatException3 by setting the parameter white space");
+
+ try
+ {
+ string s1 = " ";
+ Int32 i1 = Int32.Parse(s1);
+ TestLibrary.TestFramework.LogError("107", "the Method did not throw a FormatException,patameter is: white space");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: test OverFlowException");
+
+ try
+ {
+ string s1 = "2147483648";
+ Int32 i1 = Int32.Parse(s1);
+ TestLibrary.TestFramework.LogError("109", "the Method did not throw an OverflowException ,patameter is: Int32.MaxValue+1");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("110", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int32Parse1 test = new Int32Parse1();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32Parse");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int/int32parse2.cs b/tests/src/CoreMangLib/cti/system/int/int32parse2.cs
new file mode 100644
index 0000000000..a7c2b1d749
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32parse2.cs
@@ -0,0 +1,360 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+//System.Int32.Parse(System.String,System.Globalization.NumberStyles)
+public class Int32Parse2
+{
+ #region Privates
+ private CultureInfo CurrentCulture = TestLibrary.Utilities.CurrentCulture;
+ private CultureInfo CustomCulture = null;
+ private CultureInfo CustomCultureForNumberFormat
+ {
+ get
+ {
+ if (null == CustomCulture)
+ {
+ CustomCulture = new CultureInfo(CurrentCulture.Name);
+ NumberFormatInfo nfi = CustomCulture.NumberFormat;
+ //default is "," in most of the cultures, but in some cultures like DE, TR it is "."
+ //nfi.NumberGroupSeparator;
+ nfi.NumberGroupSizes = new int[] { 3 };
+ nfi.NegativeSign = "-"; //for NegTest5
+ nfi.NumberNegativePattern = 1; //for NegTest5
+
+ CustomCulture.NumberFormat = nfi;
+ }
+ return CustomCulture;
+ }
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Test the parameter NumberStyles.AllowThousands ");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = CustomCultureForNumberFormat;
+ String groupSeparator = CustomCultureForNumberFormat.NumberFormat.NumberGroupSeparator;
+
+ string s1 = "2" + groupSeparator + "147" + groupSeparator + "483" + groupSeparator + "647";
+ Int32 i1 = Int32.Parse(s1, System.Globalization.NumberStyles.AllowThousands);
+ if (i1 != Int32.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ finally
+ {
+ TestLibrary.Utilities.CurrentCulture = CurrentCulture;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Test the parameters NumberStyles.AllowParentheses ");
+
+ try
+ {
+ string s1 = "(105)";
+ Int32 i1 = Int32.Parse(s1, System.Globalization.NumberStyles.AllowParentheses);
+ if (i1 != -105)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Test the parameters with white space in both the beginning and the end ");
+
+ try
+ {
+ string s1 = " 8765 ";
+ Int32 i1 = Int32.Parse(s1, System.Globalization.NumberStyles.AllowLeadingWhite | System.Globalization.NumberStyles.AllowTrailingWhite);
+ if (i1 != 8765)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Test the parameters NumberStyles.AllowTrailingSign");
+
+ try
+ {
+ string s1 = "8765-";
+ Int32 i1 = Int32.Parse(s1, System.Globalization.NumberStyles.AllowTrailingSign);
+ if (i1 != -8765)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest5:Test the parameters NumberStyles.HexNumber");
+
+ try
+ {
+ string s1 = " 6a9fe7 ";
+ Int32 i1 = Int32.Parse(s1, System.Globalization.NumberStyles.HexNumber);
+ if (i1 != 6987751)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: null reference parameter");
+
+ try
+ {
+ string s1 = null;
+ Int32 i1 = Int32.Parse(s1, System.Globalization.NumberStyles.AllowLeadingSign);
+ TestLibrary.TestFramework.LogError("101", "the Method did not throw a ArgumentNullException");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: test FormatException1 ");
+
+ string s1 = " (321)677 ";
+ try
+ {
+ Int32 i1 = Int32.Parse(s1, System.Globalization.NumberStyles.AllowParentheses);
+ TestLibrary.TestFramework.LogError("103", "the Method did not throw a FormatException,patameter is: " + s1);
+ retVal = false;
+ }
+ catch (System.FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: test ArgumentException1");
+
+ try
+ {
+ string s1 = "43dce6a-";
+ Int32 i1 = Int32.Parse(s1, System.Globalization.NumberStyles.HexNumber | System.Globalization.NumberStyles.AllowTrailingSign);
+ TestLibrary.TestFramework.LogError("105", "the Method did not throw a FormatException,patameter is: " + s1);
+ retVal = false;
+ }
+ catch (System.ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: test ArgumentException2");
+
+ try
+ {
+ string s1 = "4346";
+ int i1 = 54543;
+ System.Globalization.NumberStyles Ns = (System.Globalization.NumberStyles)i1;
+ Int32 i2 = Int32.Parse(s1, Ns);
+ TestLibrary.TestFramework.LogError("107", "the Method did not throw a FormatException,patameter is: " + s1);
+ retVal = false;
+ }
+ catch (System.ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: test OverflowException ");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = CustomCultureForNumberFormat;
+ String groupSeparator = CustomCultureForNumberFormat.NumberFormat.NumberGroupSeparator;
+
+ string s1 = "-2" + groupSeparator + "147" + groupSeparator + "483" + groupSeparator + "650";
+ Int32 i1 = Int32.Parse(s1, System.Globalization.NumberStyles.AllowThousands | System.Globalization.NumberStyles.AllowLeadingSign);
+ TestLibrary.TestFramework.LogError("109", "the Method did not throw a FormatException,patameter is: " + s1);
+ retVal = false;
+ }
+ catch (System.OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("110", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ finally
+ {
+ TestLibrary.Utilities.CurrentCulture = CurrentCulture;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int32Parse2 test = new Int32Parse2();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32Parse2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int/int32parse3.cs b/tests/src/CoreMangLib/cti/system/int/int32parse3.cs
new file mode 100644
index 0000000000..d50f31d832
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32parse3.cs
@@ -0,0 +1,340 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+//Parse(System.String,System.Globalization.NumberStyles,System.IFormatProvider)
+public class Int32Parse3
+{
+ #region Privates
+ private CultureInfo CurrentCulture = TestLibrary.Utilities.CurrentCulture;
+ private CultureInfo customCulture = null;
+ private CultureInfo CustomCulture
+ {
+ get
+ {
+ if (null == customCulture)
+ {
+ customCulture = new CultureInfo(CurrentCulture.Name);
+ NumberFormatInfo nfi = CustomCulture.NumberFormat;
+ nfi.NumberGroupSeparator = ",";
+ nfi.NumberGroupSizes = new int[] { 3 };
+ nfi.NegativeSign = "-";
+ nfi.NumberNegativePattern = 1;
+
+ customCulture.NumberFormat = nfi;
+ }
+ return customCulture;
+ }
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+// retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Test the method with the cultureinfo parameter which implemented the IFormatProvider interface ");
+
+ try
+ {
+ string s1 = "1,000";
+ int i1 = Int32.Parse(s1, System.Globalization.NumberStyles.AllowThousands, CustomCulture);
+ if (i1 != 1000)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Test the method with the numberformatinfo parameter which implemented the IFormatProvider interface ");
+
+ try
+ {
+ // if NumberFormatInfo is null, created without any argument, Parse uses CurrrentCulture
+ TestLibrary.Utilities.CurrentCulture = CustomCulture;
+ string s1 = " 3,000 ";
+ int i1 = Int32.Parse(s1, System.Globalization.NumberStyles.AllowThousands | System.Globalization.NumberStyles.AllowLeadingWhite | System.Globalization.NumberStyles.AllowTrailingWhite, new NumberFormatInfo());
+ if (i1 != 3000)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ finally
+ {
+ TestLibrary.Utilities.CurrentCulture = CurrentCulture;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Test the method with the DateTimeFormatInfo parameter which implemented the IFormatProvider interface ");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = CustomCulture;
+ string s1 = "-56,466";
+ int i1 = Int32.Parse(s1, System.Globalization.NumberStyles.AllowThousands | System.Globalization.NumberStyles.AllowLeadingSign, new DateTimeFormatInfo());
+ if (i1 != -56466)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ finally
+ {
+ TestLibrary.Utilities.CurrentCulture = CurrentCulture;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Test special string \"-3.456.789\" using the cultureinfo parameter");
+
+ try
+ {
+ string s1 = "-3.456.789";
+ int i1 = Int32.Parse(s1, System.Globalization.NumberStyles.AllowThousands | System.Globalization.NumberStyles.AllowLeadingSign, new CultureInfo("pt-BR"));
+ if (i1 != -3456789)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+/*
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Test special string \" 3 456 78\" using the cultureinfo parameter");
+
+ try
+ {
+ string s1 = " 3 456 78";
+ int i1 = Int32.Parse(s1, System.Globalization.NumberStyles.AllowThousands | System.Globalization.NumberStyles.AllowLeadingWhite, new CultureInfo("sma-SE"));
+ if (i1 != 345678)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+*/
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Using the null reference as the third parameter IFormatProvider");
+
+ try
+ {
+ string s1 = " 345678";
+ int i1 = Int32.Parse(s1, System.Globalization.NumberStyles.AllowThousands | System.Globalization.NumberStyles.AllowLeadingWhite, null);
+ if (i1 != 345678)
+ {
+ TestLibrary.TestFramework.LogError("011", "The result is not the value as expected. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Set the parameter string to null reference ");
+
+ try
+ {
+ String s1 = null;
+ int i1 = Int32.Parse(s1, System.Globalization.NumberStyles.AllowThousands, new CultureInfo("en-US"));
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2:Test the ArgumentException");
+
+ try
+ {
+ String s1 = "1000";
+ int i1 = 54543;
+ System.Globalization.NumberStyles Ns = (System.Globalization.NumberStyles)i1;
+ Int32 i2 = Int32.Parse(s1, Ns, new CultureInfo("en-US"));
+ TestLibrary.TestFramework.LogError("103", "the Method did not throw a ArgumentException,patameter is: " + s1);
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3:Using improper cultureinfo");
+
+ try
+ {
+ String s1 = "1 000";
+ Int32 i2 = Int32.Parse(s1, System.Globalization.NumberStyles.AllowThousands, CustomCulture);
+ TestLibrary.TestFramework.LogError("105", "the Method did not throw a FormatException,patameter is: " + s1);
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4:Test the OverflowException");
+
+ try
+ {
+ String s1 = "2,147,483,650";
+ Int32 i2 = Int32.Parse(s1, System.Globalization.NumberStyles.AllowThousands, CustomCulture);
+ TestLibrary.TestFramework.LogError("107", "the Method did not throw an OverflowException,patameter is: " + s1);
+ retVal = false;
+ }
+ catch (System.OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int32Parse3 test = new Int32Parse3();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32Parse3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int/int32parse4.cs b/tests/src/CoreMangLib/cti/system/int/int32parse4.cs
new file mode 100644
index 0000000000..79dc5a395f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32parse4.cs
@@ -0,0 +1,238 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+//Parse(System.String,System.IFormatProvider)
+public class Int32Parse4
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test the IFormatInfo parameter.");
+
+ try
+ {
+ string s1 = " #1345";
+ NumberFormatInfo n1 = new NumberFormatInfo();
+ n1.NegativeSign = "#";
+ int i1 = Int32.Parse(s1, n1);
+ if (i1 != -1345)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test the string with white space in both the beginning and the end");
+
+ try
+ {
+ int i2 = TestLibrary.Generator.GetInt32(-55);
+ string s1 = " " + i2.ToString() + " ";
+ NumberFormatInfo n1 = new NumberFormatInfo();
+ n1.NegativeSign = "#";
+ int i1 = Int32.Parse(s1, n1);
+ if (i1 != i2)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Using number as the negative sign");
+
+ try
+ {
+ int i2 = TestLibrary.Generator.GetInt32(-55);
+ string s1 = " 00" + i2;
+ NumberFormatInfo n1 = new NumberFormatInfo();
+ n1.NegativeSign = "00";
+ int i1 = Int32.Parse(s1, n1);
+ if (i1 != -i2)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Using null reference as the second parameter");
+
+ try
+ {
+ int i2 = TestLibrary.Generator.GetInt32(-55);
+ string s1 = i2.ToString();
+ NumberFormatInfo n1 = null;
+ int i1 = Int32.Parse(s1, n1);
+ if (i1 != i2)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Set the parameter string to null reference ");
+
+ try
+ {
+ String s1 = null;
+ int i1 = Int32.Parse(s1, new NumberFormatInfo());
+ TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Test FormatException ");
+
+ string s1 = " (321)677 ";
+ try
+ {
+ Int32 i1 = Int32.Parse(s1, new NumberFormatInfo());
+ TestLibrary.TestFramework.LogError("103", "the Method did not throw a FormatException,patameter is: " + s1);
+ retVal = false;
+ }
+ catch (System.FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Test OverflowException ");
+
+ try
+ {
+ string s1 = "2147483650";
+ Int32 i1 = Int32.Parse(s1, new NumberFormatInfo());
+ TestLibrary.TestFramework.LogError("105", "the Method did not throw a FormatException,patameter is: " + s1);
+ retVal = false;
+ }
+ catch (System.OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int32Parse4 test = new Int32Parse4();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32Parse4");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int/int32tostring3.cs b/tests/src/CoreMangLib/cti/system/int/int32tostring3.cs
new file mode 100644
index 0000000000..436a520310
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32tostring3.cs
@@ -0,0 +1,176 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using TestLibrary;
+
+//System.Int32.ToString(System.String);
+public class Int32ToString3
+{
+ #region Private Methods
+ private CultureInfo CurrentCulture = TestLibrary.Utilities.CurrentCulture;
+ private CultureInfo customCulture = null;
+
+ private CultureInfo CustomCulture
+ {
+ get
+ {
+ if (null == customCulture)
+ {
+ customCulture = new CultureInfo(CultureInfo.CurrentCulture.Name);
+ NumberFormatInfo nfi = customCulture.NumberFormat;
+ //For "G"
+ // NegativeSign, NumberDecimalSeparator, NumberDecimalDigits, PositiveSign
+ nfi.NegativeSign = "@"; //Default: "-"
+ nfi.NumberDecimalSeparator = ","; //Default: "."
+ nfi.NumberDecimalDigits = 3; //Default: 2
+ nfi.PositiveSign = "++"; //Default: "+"
+
+ //For "E"
+ // PositiveSign, NegativeSign, and NumberDecimalSeparator.
+ // If precision specifier is omitted, a default of six digits after the decimal point is used.
+
+ //For "R"
+ // NegativeSign, NumberDecimalSeparator and PositiveSign
+
+ //For "X", The result string isn't affected by the formatting information of the current NumberFormatInfo
+
+ //For "C"
+ // CurrencyPositivePattern, CurrencySymbol, CurrencyDecimalDigits, CurrencyDecimalSeparator, CurrencyGroupSeparator, CurrencyGroupSizes, NegativeSign and CurrencyNegativePattern
+ nfi.CurrencyDecimalDigits = 3; //Default: 2
+ nfi.CurrencyDecimalSeparator = ","; //Default: ","
+ nfi.CurrencyGroupSeparator = "."; //Default: "."
+ nfi.CurrencyGroupSizes = new int[] { 2 }; //Default: new int[]{3}
+ nfi.CurrencyNegativePattern = 2; //Default: 0
+ nfi.CurrencyPositivePattern = 1; //Default: 0
+ nfi.CurrencySymbol = "USD"; //Default: "$"
+
+ //For "D"
+ // NegativeSign
+
+ //For "E"
+ // PositiveSign, NumberDecimalSeparator and NegativeSign.
+ // If precision specifier is omitted, a default of six digits after the decimal point is used.
+ nfi.PositiveSign = "++"; //Default: "+"
+ nfi.NumberDecimalSeparator = ","; //Default: "."
+
+ //For "F"
+ // NumberDecimalDigits, and NumberDecimalSeparator and NegativeSign.
+ nfi.NumberDecimalDigits = 3; //Default: 2
+
+ //For "N"
+ // NumberGroupSizes, NumberGroupSeparator, NumberDecimalSeparator, NumberDecimalDigits, NumberNegativePattern and NegativeSign.
+ nfi.NumberGroupSizes = new int[] { 2 }; //Default: 3
+ nfi.NumberGroupSeparator = "#"; //Default: ","
+
+ //For "P"
+ // PercentPositivePattern, PercentNegativePattern, NegativeSign, PercentSymbol, PercentDecimalDigits, PercentDecimalSeparator, PercentGroupSeparator and PercentGroupSizes
+ nfi.PercentPositivePattern = 1; //Default: 0
+ nfi.PercentNegativePattern = 2; //Default: 0
+ nfi.PercentSymbol = "~"; //Default: "%"
+ nfi.PercentDecimalDigits = 4; //Default: 2
+ nfi.PercentDecimalSeparator = ","; //Default: "."
+ nfi.PercentGroupSizes[0] = 2; //Default: 3
+ nfi.PercentGroupSeparator = ","; //Default: "," in most languages, "." in DE and TR
+
+ customCulture.NumberFormat = nfi;
+ }
+ return customCulture;
+ }
+ }
+
+ private bool VerifyToString(String id, Int32 myInt, String format, String expected)
+ {
+ try
+ {
+ String actual = myInt.ToString(format);
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError(id + "_001", "Expected: " + expected + " Actual: " + actual);
+ return false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(id + "_002", "Unexpected exception occurs: " + e);
+ return false;
+ }
+ return true;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal &= VerifyToString("PostTest1", Int32.MinValue, "X", "80000000");
+ retVal &= VerifyToString("PostTest2", -0, "d", "0");
+
+ TestLibrary.Utilities.CurrentCulture = CustomCulture;
+ retVal &= VerifyToString("PostTest3", Int32.MaxValue, "G", "2147483647");
+ retVal &= VerifyToString("PostTest4", -1, "d", "@1");
+ retVal &= VerifyToString("PostTest5", -00000765, "f", "@765,000");
+ retVal &= VerifyToString("PostTest6", -76500, "c", "USD@7.65.00,000");
+ retVal &= VerifyToString("PostTest7", -1800000000, "e", TestLibrary.Utilities.IsWindows ? "@1,800000e++009" : "@1,800000e9");
+ retVal &= VerifyToString("PostTest8", 1886000000, "n", "18#86#00#00#00,000");
+ retVal &= VerifyToString("PostTest9", -1987, "p", "@~198,700,0000");
+
+ TestLibrary.Utilities.CurrentCulture = CurrentCulture;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal &= NegTest1();
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Input an invalid argument\"K\"");
+
+ try
+ {
+ Int32 i1 = TestLibrary.Generator.GetInt32();
+ string s1 = i1.ToString("k");
+ TestLibrary.TestFramework.LogError("101", "The FormatException was not thrown as expected ");
+ retVal = false;
+ }
+ catch (System.FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ public static int Main()
+ {
+ Int32ToString3 test = new Int32ToString3();
+
+ TestLibrary.TestFramework.BeginTestCase("Int32ToString3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int/int32tryparse.cs b/tests/src/CoreMangLib/cti/system/int/int32tryparse.cs
new file mode 100644
index 0000000000..a5b9a6081d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int/int32tryparse.cs
@@ -0,0 +1,565 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+// Ported to CoreCLR from Co7527TryParse_all.cs
+// Tests Int32.TryParse(String), Int32.TryParse(String, NumberStyles, IFormatProvider, ref Int32)
+// 2003/04/01 KatyK
+// 2007/06/28 adapted by MarielY
+
+public class Int32TryParse
+{
+ static bool verbose = false;
+
+ public static int Main()
+ {
+ bool passed = true;
+
+ try
+ {
+ // Make the test culture independent
+ TestLibrary.Utilities.CurrentCulture = CultureInfo.InvariantCulture;
+
+ // Set up NFIs to use
+ NumberFormatInfo goodNFI = new NumberFormatInfo();
+
+ NumberFormatInfo corruptNFI = new NumberFormatInfo(); // DecimalSeparator == GroupSeparator
+ corruptNFI.NumberDecimalSeparator = ".";
+ corruptNFI.NumberGroupSeparator = ".";
+ corruptNFI.CurrencyDecimalSeparator = ".";
+ corruptNFI.CurrencyGroupSeparator = ".";
+ corruptNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo swappedNFI = new NumberFormatInfo(); // DecimalSeparator & GroupSeparator swapped
+ swappedNFI.NumberDecimalSeparator = ".";
+ swappedNFI.NumberGroupSeparator = ",";
+ swappedNFI.CurrencyDecimalSeparator = ",";
+ swappedNFI.CurrencyGroupSeparator = ".";
+ swappedNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo distinctNFI = new NumberFormatInfo(); // DecimalSeparator & GroupSeparator distinct
+ distinctNFI.NumberDecimalSeparator = ".";
+ distinctNFI.NumberGroupSeparator = ",";
+ distinctNFI.CurrencyDecimalSeparator = ":";
+ distinctNFI.CurrencyGroupSeparator = ";";
+ distinctNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo customNFI = new NumberFormatInfo();
+ customNFI.NegativeSign = "^";
+
+ NumberFormatInfo ambigNFI = new NumberFormatInfo();
+ ambigNFI.NegativeSign = "^";
+ ambigNFI.CurrencySymbol = "^";
+
+ CultureInfo germanCulture = new CultureInfo("de-DE");
+ CultureInfo japaneseCulture;
+
+ try
+ {
+ japaneseCulture = new CultureInfo("ja-JP");
+ }
+ catch (Exception)
+ {
+ TestLibrary.Logging.WriteLine("East Asian Languages are not installed. Skiping Japanese culture tests.");
+ japaneseCulture = null;
+ }
+
+ // Parse tests included for comparison/regression
+ passed &= VerifyInt32Parse("5", 5);
+ passed &= VerifyInt32Parse("-5", -5);
+ passed &= VerifyInt32Parse("5 ", 5);
+ passed &= VerifyInt32Parse("5\0", 5);
+ passed &= VerifyInt32Parse("893382737", 893382737);
+ passed &= VerifyInt32Parse("-893382737", -893382737);
+ passed &= VerifyInt32Parse("1234567891", 1234567891);
+ passed &= VerifyInt32Parse("-1234567891", -1234567891);
+ passed &= VerifyInt32Parse("5", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyInt32Parse("-5", NumberStyles.Integer, CultureInfo.InvariantCulture, -5);
+ passed &= VerifyInt32Parse("5 \0", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyInt32Parse("5\0\0\0", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyInt32Parse("12", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0x12);
+ passed &= VerifyInt32Parse("fF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFF);
+ passed &= VerifyInt32Parse("5", NumberStyles.Integer, goodNFI, 5);
+ passed &= VerifyInt32Parse("5.0", NumberStyles.AllowDecimalPoint, goodNFI, 5);
+ passed &= VerifyInt32Parse("123", NumberStyles.Integer, germanCulture, 123);
+ passed &= VerifyInt32Parse("123", NumberStyles.Integer, japaneseCulture, 123);
+ passed &= VerifyInt32Parse("123.000", NumberStyles.Any, germanCulture, 123000);
+ passed &= VerifyInt32Parse("123,000", NumberStyles.Any, japaneseCulture, 123000);
+ passed &= VerifyInt32Parse("123,000", NumberStyles.AllowDecimalPoint, germanCulture, 123);
+ passed &= VerifyInt32Parse("123.000", NumberStyles.AllowDecimalPoint, japaneseCulture, 123);
+ passed &= VerifyInt32Parse("5,00" + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 5); // currency
+ //
+ passed &= VerifyInt32Parse("5", NumberStyles.Integer, corruptNFI, 5);
+ passed &= VerifyInt32Parse("5", NumberStyles.Number, corruptNFI, 5);
+ passed &= VerifyInt32Parse("5.0", NumberStyles.Number, corruptNFI, 5);
+ passed &= VerifyInt32ParseException("5,0", NumberStyles.Number, corruptNFI, typeof(FormatException));
+ passed &= VerifyInt32ParseException("5.0.0", NumberStyles.Number, corruptNFI, typeof(FormatException));
+ passed &= VerifyInt32Parse("$5.0", NumberStyles.Currency, corruptNFI, 5);
+ passed &= VerifyInt32ParseException("$5,0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyInt32ParseException("$5.0.0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyInt32Parse("5.0", NumberStyles.Currency, corruptNFI, 5);
+ passed &= VerifyInt32ParseException("5,0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyInt32ParseException("5.0.0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyInt32Parse("5.0", NumberStyles.Any, corruptNFI, 5);
+ passed &= VerifyInt32ParseException("5,0", NumberStyles.Any, corruptNFI, typeof(FormatException));
+ passed &= VerifyInt32ParseException("5.0.0", NumberStyles.Any, corruptNFI, typeof(FormatException));
+ //
+ passed &= VerifyInt32Parse("5", NumberStyles.Integer, swappedNFI, 5);
+ passed &= VerifyInt32ParseException("1,234", NumberStyles.Integer, swappedNFI, typeof(FormatException));
+ passed &= VerifyInt32Parse("5", NumberStyles.Number, swappedNFI, 5);
+ passed &= VerifyInt32Parse("5.0", NumberStyles.Number, swappedNFI, 5);
+ passed &= VerifyInt32Parse("1,234", NumberStyles.Number, swappedNFI, 1234);
+ passed &= VerifyInt32Parse("1,234.0", NumberStyles.Number, swappedNFI, 1234);
+ passed &= VerifyInt32ParseException("5.000.000", NumberStyles.Number, swappedNFI, typeof(FormatException));
+ passed &= VerifyInt32ParseException("5.000,00", NumberStyles.Number, swappedNFI, typeof(FormatException));
+ passed &= VerifyInt32Parse("5.000", NumberStyles.Currency, swappedNFI, 5); //???
+ passed &= VerifyInt32ParseException("5.000,00", NumberStyles.Currency, swappedNFI, typeof(FormatException)); //???
+ passed &= VerifyInt32Parse("$5.000", NumberStyles.Currency, swappedNFI, 5000);
+ passed &= VerifyInt32Parse("$5.000,00", NumberStyles.Currency, swappedNFI, 5000);
+ passed &= VerifyInt32Parse("5.000", NumberStyles.Any, swappedNFI, 5); //?
+ passed &= VerifyInt32ParseException("5.000,00", NumberStyles.Any, swappedNFI, typeof(FormatException)); //?
+ passed &= VerifyInt32Parse("$5.000", NumberStyles.Any, swappedNFI, 5000);
+ passed &= VerifyInt32Parse("$5.000,00", NumberStyles.Any, swappedNFI, 5000);
+ passed &= VerifyInt32Parse("5,0", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyInt32Parse("$5,0", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyInt32Parse("5,000", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyInt32Parse("$5,000", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyInt32ParseException("5,000.0", NumberStyles.Currency, swappedNFI, typeof(FormatException));
+ passed &= VerifyInt32ParseException("$5,000.0", NumberStyles.Currency, swappedNFI, typeof(FormatException));
+ passed &= VerifyInt32Parse("5,000", NumberStyles.Any, swappedNFI, 5);
+ passed &= VerifyInt32Parse("$5,000", NumberStyles.Any, swappedNFI, 5);
+ passed &= VerifyInt32ParseException("5,000.0", NumberStyles.Any, swappedNFI, typeof(FormatException));
+ passed &= VerifyInt32ParseException("$5,000.0", NumberStyles.Any, swappedNFI, typeof(FormatException));
+ //
+ passed &= VerifyInt32Parse("5.0", NumberStyles.Number, distinctNFI, 5);
+ passed &= VerifyInt32Parse("1,234.0", NumberStyles.Number, distinctNFI, 1234);
+ passed &= VerifyInt32Parse("5.0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyInt32Parse("1,234.0", NumberStyles.Currency, distinctNFI, 1234);
+ passed &= VerifyInt32Parse("5.0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyInt32Parse("1,234.0", NumberStyles.Any, distinctNFI, 1234);
+ passed &= VerifyInt32ParseException("$5.0", NumberStyles.Currency, distinctNFI, typeof(FormatException));
+ passed &= VerifyInt32ParseException("$5.0", NumberStyles.Any, distinctNFI, typeof(FormatException));
+ passed &= VerifyInt32ParseException("5:0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyInt32ParseException("5;0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyInt32ParseException("$5:0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyInt32Parse("5:0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyInt32Parse("5:000", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyInt32Parse("5;000", NumberStyles.Currency, distinctNFI, 5000);
+ passed &= VerifyInt32Parse("$5:0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyInt32Parse("$5;0", NumberStyles.Currency, distinctNFI, 50);
+ passed &= VerifyInt32Parse("5:0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyInt32Parse("5;0", NumberStyles.Any, distinctNFI, 50);
+ passed &= VerifyInt32Parse("$5:0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyInt32Parse("$5;0", NumberStyles.Any, distinctNFI, 50);
+ passed &= VerifyInt32ParseException("123,456;789.0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyInt32Parse("123,456;789.0", NumberStyles.Currency, distinctNFI, 123456789);
+ passed &= VerifyInt32Parse("123,456;789.0", NumberStyles.Any, distinctNFI, 123456789);
+ passed &= VerifyInt32ParseException("$123,456;789.0", NumberStyles.Any, distinctNFI, typeof(FormatException));
+ //
+ passed &= VerifyInt32ParseException("12345678912", typeof(OverflowException));
+ passed &= VerifyInt32ParseException("-12345678912", typeof(OverflowException));
+ passed &= VerifyInt32ParseException("3123456789", typeof(OverflowException));
+ passed &= VerifyInt32ParseException("5.3", NumberStyles.AllowDecimalPoint, goodNFI, typeof(OverflowException)); //weird that it's Overflow, but consistent with v1
+ passed &= VerifyInt32ParseException("Garbage", typeof(FormatException));
+ passed &= VerifyInt32ParseException("5\0Garbage", typeof(FormatException));
+ passed &= VerifyInt32ParseException(null, typeof(ArgumentNullException));
+ passed &= VerifyInt32ParseException("893382737", NumberStyles.HexNumber, CultureInfo.InvariantCulture, typeof(OverflowException));
+ passed &= VerifyInt32ParseException("5", NumberStyles.AllowHexSpecifier | NumberStyles.AllowParentheses, null, typeof(ArgumentException));
+ passed &= VerifyInt32ParseException("4", (NumberStyles)(-1), typeof(ArgumentException));
+ passed &= VerifyInt32ParseException("4", (NumberStyles)0x10000, typeof(ArgumentException));
+ passed &= VerifyInt32ParseException("4", (NumberStyles)(-1), CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyInt32ParseException("4", (NumberStyles)0x10000, CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyInt32ParseException("123.000.000.000", NumberStyles.Any, germanCulture, typeof(OverflowException));
+ passed &= VerifyInt32ParseException("123,000,000,000", NumberStyles.Any, japaneseCulture, typeof(OverflowException));
+ passed &= VerifyInt32ParseException("123,000,000,000", NumberStyles.Integer, germanCulture, typeof(FormatException));
+ passed &= VerifyInt32ParseException("123.000.000.000", NumberStyles.Integer, japaneseCulture, typeof(FormatException));
+ passed &= VerifyInt32ParseException("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Integer, germanCulture, typeof(FormatException)); // currency
+
+ /////////// TryParse(String)
+ //// Pass cases
+ passed &= VerifyInt32TryParse("5", 5, true);
+ passed &= VerifyInt32TryParse("-5", -5, true);
+ passed &= VerifyInt32TryParse(" 5 ", 5, true);
+ passed &= VerifyInt32TryParse("5\0", 5, true);
+ passed &= VerifyInt32TryParse("5 \0", 5, true);
+ passed &= VerifyInt32TryParse("5\0\0\0", 5, true);
+ passed &= VerifyInt32TryParse("10000", 10000, true);
+ passed &= VerifyInt32TryParse("893382737", 893382737, true);
+ passed &= VerifyInt32TryParse("-893382737", -893382737, true);
+ passed &= VerifyInt32TryParse("1234567891", 1234567891, true);
+ passed &= VerifyInt32TryParse("-1234567891", -1234567891, true);
+ passed &= VerifyInt32TryParse(Int32.MaxValue.ToString(), Int32.MaxValue, true);
+ passed &= VerifyInt32TryParse(Int32.MinValue.ToString(), Int32.MinValue, true);
+
+ //// Fail cases
+ passed &= VerifyInt32TryParse(null, 0, false);
+ passed &= VerifyInt32TryParse("", 0, false);
+ passed &= VerifyInt32TryParse("Garbage", 0, false);
+ passed &= VerifyInt32TryParse("5\0Garbage", 0, false);
+ passed &= VerifyInt32TryParse("3123456789", 0, false);
+ passed &= VerifyInt32TryParse("12345678912", 0, false);
+ passed &= VerifyInt32TryParse("-12345678912", 0, false);
+ passed &= VerifyInt32TryParse("FF", 0, false);
+ passed &= VerifyInt32TryParse("27.3", 0, false);
+ passed &= VerifyInt32TryParse("23 5", 0, false);
+
+
+ /////////// TryParse(TryParse(String, NumberStyles, IFormatProvider, ref Int32)
+ //// Pass cases
+ passed &= VerifyInt32TryParse("5", NumberStyles.Integer, CultureInfo.InvariantCulture, 5, true);
+ passed &= VerifyInt32TryParse("-5", NumberStyles.Integer, CultureInfo.InvariantCulture, -5, true);
+ // Variations on NumberStyles
+ passed &= VerifyInt32TryParse("12", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0x12, true);
+ passed &= VerifyInt32TryParse("FF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFF, true);
+ passed &= VerifyInt32TryParse("fF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFF, true);
+ passed &= VerifyInt32TryParse("FFFFFFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, -1, true);
+ passed &= VerifyInt32TryParse(" 5", NumberStyles.AllowLeadingWhite, goodNFI, 5, true);
+ passed &= VerifyInt32TryParse("5", NumberStyles.Number, goodNFI, 5, true);
+ passed &= VerifyInt32TryParse("5.0", NumberStyles.AllowDecimalPoint, goodNFI, 5, true);
+ // Variations on IFP
+ passed &= VerifyInt32TryParse("5", NumberStyles.Integer, goodNFI, 5, true);
+ passed &= VerifyInt32TryParse("5", NumberStyles.Integer, null, 5, true);
+ passed &= VerifyInt32TryParse("5", NumberStyles.Integer, new DateTimeFormatInfo(), 5, true);
+ passed &= VerifyInt32TryParse("^42", NumberStyles.Any, customNFI, -42, true);
+ passed &= VerifyInt32TryParse("123", NumberStyles.Integer, germanCulture, 123, true);
+ passed &= VerifyInt32TryParse("123", NumberStyles.Integer, japaneseCulture, 123, true);
+ passed &= VerifyInt32TryParse("123.000", NumberStyles.Any, germanCulture, 123000, true);
+ passed &= VerifyInt32TryParse("123,000", NumberStyles.Any, japaneseCulture, 123000, true);
+ passed &= VerifyInt32TryParse("123,000", NumberStyles.AllowDecimalPoint, germanCulture, 123, true);
+ passed &= VerifyInt32TryParse("123.000", NumberStyles.AllowDecimalPoint, japaneseCulture, 123, true);
+ passed &= VerifyInt32TryParse("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 5, true); // currency
+
+ //// Fail cases
+ passed &= VerifyInt32TryParse("FF", NumberStyles.Integer, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifyInt32TryParse("893382737", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifyInt32TryParse("-42", NumberStyles.Any, customNFI, 0, false);
+ passed &= VerifyInt32TryParse("5.3", NumberStyles.AllowDecimalPoint, goodNFI, 0, false);
+ passed &= VerifyInt32TryParse("5 ", NumberStyles.AllowLeadingWhite, goodNFI, 0, false);
+ passed &= VerifyInt32TryParse("123.000.000.000", NumberStyles.Any, germanCulture, 0, false);
+ passed &= VerifyInt32TryParse("123,000,000,000", NumberStyles.Any, japaneseCulture, 0, false);
+ passed &= VerifyInt32TryParse("123,000,000,000", NumberStyles.Integer, germanCulture, 0, false);
+ passed &= VerifyInt32TryParse("123.000.000.000", NumberStyles.Integer, japaneseCulture, 0, false);
+ passed &= VerifyInt32TryParse("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Integer, germanCulture, 0, false); // currency
+
+ //// Exception cases
+ passed &= VerifyInt32TryParseException("5", NumberStyles.AllowHexSpecifier | NumberStyles.AllowParentheses, null, typeof(ArgumentException));
+ passed &= VerifyInt32TryParseException("4", (NumberStyles)(-1), CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyInt32TryParseException("4", (NumberStyles)0x10000, CultureInfo.InvariantCulture, typeof(ArgumentException));
+
+ // NumberStyles/NFI variations
+ //
+ //
+ passed &= VerifyInt32TryParse("5", NumberStyles.Integer, corruptNFI, 5, true);
+ passed &= VerifyInt32TryParse("5", NumberStyles.Number, corruptNFI, 5, true);
+ passed &= VerifyInt32TryParse("5.0", NumberStyles.Number, corruptNFI, 5, true);
+ passed &= VerifyInt32TryParse("5,0", NumberStyles.Number, corruptNFI, 0, false);
+ passed &= VerifyInt32TryParse("5.0.0", NumberStyles.Number, corruptNFI, 0, false);
+ passed &= VerifyInt32TryParse("$5.0", NumberStyles.Currency, corruptNFI, 5, true);
+ passed &= VerifyInt32TryParse("$5,0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyInt32TryParse("$5.0.0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyInt32TryParse("5.0", NumberStyles.Currency, corruptNFI, 5, true);
+ passed &= VerifyInt32TryParse("5,0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyInt32TryParse("5.0.0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyInt32TryParse("5.0", NumberStyles.Any, corruptNFI, 5, true);
+ passed &= VerifyInt32TryParse("5,0", NumberStyles.Any, corruptNFI, 0, false);
+ passed &= VerifyInt32TryParse("5.0.0", NumberStyles.Any, corruptNFI, 0, false);
+ //
+ passed &= VerifyInt32TryParse("5", NumberStyles.Integer, swappedNFI, 5, true);
+ passed &= VerifyInt32TryParse("1,234", NumberStyles.Integer, swappedNFI, 0, false);
+ passed &= VerifyInt32TryParse("5", NumberStyles.Number, swappedNFI, 5, true);
+ passed &= VerifyInt32TryParse("5.0", NumberStyles.Number, swappedNFI, 5, true);
+ passed &= VerifyInt32TryParse("1,234", NumberStyles.Number, swappedNFI, 1234, true);
+ passed &= VerifyInt32TryParse("1,234.0", NumberStyles.Number, swappedNFI, 1234, true);
+ passed &= VerifyInt32TryParse("5.000.000", NumberStyles.Number, swappedNFI, 0, false);
+ passed &= VerifyInt32TryParse("5.000,00", NumberStyles.Number, swappedNFI, 0, false);
+ passed &= VerifyInt32TryParse("5.000", NumberStyles.Currency, swappedNFI, 5, true); //???
+ passed &= VerifyInt32TryParse("5.000,00", NumberStyles.Currency, swappedNFI, 0, false); //???
+ passed &= VerifyInt32TryParse("$5.000", NumberStyles.Currency, swappedNFI, 5000, true);
+ passed &= VerifyInt32TryParse("$5.000,00", NumberStyles.Currency, swappedNFI, 5000, true);
+ passed &= VerifyInt32TryParse("5.000", NumberStyles.Any, swappedNFI, 5, true); //?
+ passed &= VerifyInt32TryParse("5.000,00", NumberStyles.Any, swappedNFI, 0, false); //?
+ passed &= VerifyInt32TryParse("$5.000", NumberStyles.Any, swappedNFI, 5000, true);
+ passed &= VerifyInt32TryParse("$5.000,00", NumberStyles.Any, swappedNFI, 5000, true);
+ passed &= VerifyInt32TryParse("5,0", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyInt32TryParse("$5,0", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyInt32TryParse("5,000", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyInt32TryParse("$5,000", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyInt32TryParse("5,000.0", NumberStyles.Currency, swappedNFI, 0, false);
+ passed &= VerifyInt32TryParse("$5,000.0", NumberStyles.Currency, swappedNFI, 0, false);
+ passed &= VerifyInt32TryParse("5,000", NumberStyles.Any, swappedNFI, 5, true);
+ passed &= VerifyInt32TryParse("$5,000", NumberStyles.Any, swappedNFI, 5, true);
+ passed &= VerifyInt32TryParse("5,000.0", NumberStyles.Currency, swappedNFI, 0, false);
+ passed &= VerifyInt32TryParse("$5,000.0", NumberStyles.Currency, swappedNFI, 0, false);
+ //
+ passed &= VerifyInt32TryParse("5.0", NumberStyles.Number, distinctNFI, 5, true);
+ passed &= VerifyInt32TryParse("1,234.0", NumberStyles.Number, distinctNFI, 1234, true);
+ passed &= VerifyInt32TryParse("5.0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyInt32TryParse("1,234.0", NumberStyles.Currency, distinctNFI, 1234, true);
+ passed &= VerifyInt32TryParse("5.0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyInt32TryParse("1,234.0", NumberStyles.Any, distinctNFI, 1234, true);
+ passed &= VerifyInt32TryParse("$5.0", NumberStyles.Currency, distinctNFI, 0, false);
+ passed &= VerifyInt32TryParse("$5.0", NumberStyles.Any, distinctNFI, 0, false);
+ passed &= VerifyInt32TryParse("5:0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyInt32TryParse("5;0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyInt32TryParse("$5:0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyInt32TryParse("5:0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyInt32TryParse("5:000", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyInt32TryParse("5;000", NumberStyles.Currency, distinctNFI, 5000, true);
+ passed &= VerifyInt32TryParse("$5:0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyInt32TryParse("$5;0", NumberStyles.Currency, distinctNFI, 50, true);
+ passed &= VerifyInt32TryParse("5:0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyInt32TryParse("5;0", NumberStyles.Any, distinctNFI, 50, true);
+ passed &= VerifyInt32TryParse("$5:0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyInt32TryParse("$5;0", NumberStyles.Any, distinctNFI, 50, true);
+ passed &= VerifyInt32TryParse("123,456;789.0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyInt32TryParse("123,456;789.0", NumberStyles.Currency, distinctNFI, 123456789, true);
+ passed &= VerifyInt32TryParse("123,456;789.0", NumberStyles.Any, distinctNFI, 123456789, true);
+ passed &= VerifyInt32TryParse("$123,456;789.0", NumberStyles.Any, distinctNFI, 0, false);
+
+
+ // Should these pass or fail? Current parse behavior is to pass, so they might be
+ // parse bugs, but they're not tryparse bugs.
+ passed &= VerifyInt32Parse("5", NumberStyles.Float, goodNFI, 5);
+ passed &= VerifyInt32TryParse("5", NumberStyles.Float, goodNFI, 5, true);
+ passed &= VerifyInt32Parse("5", NumberStyles.AllowDecimalPoint, goodNFI, 5);
+ passed &= VerifyInt32TryParse("5", NumberStyles.AllowDecimalPoint, goodNFI, 5, true);
+ // I expect ArgumentException with an ambiguous NFI
+ passed &= VerifyInt32Parse("^42", NumberStyles.Any, ambigNFI, -42);
+ passed &= VerifyInt32TryParse("^42", NumberStyles.Any, ambigNFI, -42, true);
+
+ /// END TEST CASES
+ }
+ catch (Exception e)
+ {
+ TestLibrary.Logging.WriteLine("Unexpected exception!! " + e.ToString());
+ passed = false;
+ }
+
+ if (passed)
+ {
+ TestLibrary.Logging.WriteLine("paSs");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.Logging.WriteLine("FAiL");
+ return 1;
+ }
+ }
+
+ public static bool VerifyInt32TryParse(string value, Int32 expectedResult, bool expectedReturn)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int32.TryParse, Value = '{0}', Expected Result = {1}, Expected Return = {2}",
+ value, expectedResult, expectedReturn);
+ }
+ Int32 result = 0;
+ try
+ {
+ bool returnValue = Int32.TryParse(value, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedReturn, returnValue);
+ return false;
+ }
+ if (result != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, result);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyInt32TryParse(string value, NumberStyles style, IFormatProvider provider, Int32 expectedResult, bool expectedReturn)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int32.TryParse, Value = '{0}', Style = {1}, Provider = {2}, Expected Result = {3}, Expected Return = {4}",
+ value, style, provider, expectedResult, expectedReturn);
+ }
+ Int32 result = 0;
+ try
+ {
+ bool returnValue = Int32.TryParse(value, style, provider, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Style = {1}, Provider = {2}, Expected Return = {3}, Actual Return = {4}",
+ value, style, provider, expectedReturn, returnValue);
+ return false;
+ }
+ if (result != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, result);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyInt32TryParseException(string value, NumberStyles style, IFormatProvider provider, Type exceptionType)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int32.TryParse, Value = '{0}', Style = {1}, Provider = {2}, Expected Exception = {3}",
+ value, style, provider, exceptionType);
+ }
+ try
+ {
+ Int32 result = 0;
+ Boolean returnValue = Int32.TryParse(value, style, provider, out result);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyInt32Parse(string value, Int32 expectedResult)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int32.Parse, Value = '{0}', Expected Result, {1}",
+ value, expectedResult);
+ }
+ try
+ {
+ Int32 returnValue = Int32.Parse(value);
+ if (returnValue != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, returnValue);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyInt32Parse(string value, NumberStyles style, IFormatProvider provider, Int32 expectedResult)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int32.Parse, Value = '{0}', Style = {1}, provider = {2}, Expected Result = {3}",
+ value, style, provider, expectedResult);
+ }
+ try
+ {
+ Int32 returnValue = Int32.Parse(value, style, provider);
+ if (returnValue != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, returnValue);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyInt32ParseException(string value, Type exceptionType)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int32.Parse, Value = '{0}', Expected Exception, {1}",
+ value, exceptionType);
+ }
+ try
+ {
+ Int32 returnValue = Int32.Parse(value);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyInt32ParseException(string value, NumberStyles style, Type exceptionType)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int32.Parse, Value = '{0}', Style = {1}, Expected Exception = {3}",
+ value, style, exceptionType);
+ }
+ try
+ {
+ Int32 returnValue = Int32.Parse(value, style);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyInt32ParseException(string value, NumberStyles style, IFormatProvider provider, Type exceptionType)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int32.Parse, Value = '{0}', Style = {1}, Provider = {2}, Expected Exception = {3}",
+ value, style, provider, exceptionType);
+ }
+ try
+ {
+ Int32 returnValue = Int32.Parse(value, style, provider);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16Equals1.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16Equals1.csproj
new file mode 100644
index 0000000000..04a44e1f4b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16Equals1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16equals1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16Equals2.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16Equals2.csproj
new file mode 100644
index 0000000000..82461a2aa1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16Equals2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16equals2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16GetHashCode.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16GetHashCode.csproj
new file mode 100644
index 0000000000..79e713a66f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16GetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16gethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToBoolean.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToBoolean.csproj
new file mode 100644
index 0000000000..2b04967520
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToBoolean.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16iconvertibletoboolean.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToByte.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToByte.csproj
new file mode 100644
index 0000000000..c2daa34dab
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16iconvertibletobyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToChar.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToChar.csproj
new file mode 100644
index 0000000000..1910c353ae
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToChar.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16iconvertibletochar.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToDateTime.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToDateTime.csproj
new file mode 100644
index 0000000000..02ce251856
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToDateTime.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16iconvertibletodatetime.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToDecimal.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToDecimal.csproj
new file mode 100644
index 0000000000..c70132d86a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToDecimal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16iconvertibletodecimal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToDouble.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToDouble.csproj
new file mode 100644
index 0000000000..4f572017b0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToDouble.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16iconvertibletodouble.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToInt16.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToInt16.csproj
new file mode 100644
index 0000000000..6db031dd01
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16iconvertibletoint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToInt32.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToInt32.csproj
new file mode 100644
index 0000000000..6250da6f61
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16iconvertibletoint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToInt64.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToInt64.csproj
new file mode 100644
index 0000000000..1b1890a57d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16iconvertibletoint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToSByte.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToSByte.csproj
new file mode 100644
index 0000000000..1a259a6091
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToSByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16iconvertibletosbyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToSingle.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToSingle.csproj
new file mode 100644
index 0000000000..285f1dc626
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToSingle.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16iconvertibletosingle.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToType.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToType.csproj
new file mode 100644
index 0000000000..2f1275877b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToType.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16iconvertibletotype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToUInt16.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToUInt16.csproj
new file mode 100644
index 0000000000..097a14c501
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToUInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16iconvertibletouint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToUInt32.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToUInt32.csproj
new file mode 100644
index 0000000000..c885fe6973
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToUInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16iconvertibletouint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToUInt64.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToUInt64.csproj
new file mode 100644
index 0000000000..356f611a12
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16IConvertibleToUInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16iconvertibletouint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16MaxValue.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16MaxValue.csproj
new file mode 100644
index 0000000000..e6f0585f39
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16MaxValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16maxvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16MinValue.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16MinValue.csproj
new file mode 100644
index 0000000000..57a66d8b17
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16MinValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16minvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16Parse1.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16Parse1.csproj
new file mode 100644
index 0000000000..d72a9901cf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16Parse1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16parse1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16Parse2.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16Parse2.csproj
new file mode 100644
index 0000000000..eeb0610ed4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16Parse2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16parse2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16Parse3.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16Parse3.csproj
new file mode 100644
index 0000000000..d73aee0719
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16Parse3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16parse3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/Int16TryParse.csproj b/tests/src/CoreMangLib/cti/system/int16/Int16TryParse.csproj
new file mode 100644
index 0000000000..133b9c3717
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/Int16TryParse.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int16tryparse.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16equals1.cs b/tests/src/CoreMangLib/cti/system/int16/int16equals1.cs
new file mode 100644
index 0000000000..bddab2e4b6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16equals1.cs
@@ -0,0 +1,145 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Int16Equals(Int16)
+/// </summary>
+public class Int16Equals1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test two equal random int16");
+
+ try
+ {
+ Int16 number1, number2;
+ number1 = number2 = TestLibrary.Generator.GetInt16(-55);
+ if (!number1.Equals(number2))
+ {
+ TestLibrary.TestFramework.LogError("001", String.Format("equal two equal number {0} did not return true", number2));
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test two different int16");
+
+ try
+ {
+ Int16 i = TestLibrary.Generator.GetInt16(-55);
+ Int16 number1 = this.GetInt16(Int16.MinValue, (Int16)(i - 1));
+ Int16 number2 = this.GetInt16(i, Int16.MaxValue);
+ if (number1.Equals(number2))
+ {
+ TestLibrary.TestFramework.LogError("003", String.Format("equal two unqual number did not return false,the two number is {0}and{1}", number1, number2));
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Test zero equals zero");
+
+ try
+ {
+ Int16 i1 = 0;
+ Int16 i2 = 0;
+ if (!i1.Equals(i2))
+ {
+ TestLibrary.TestFramework.LogError("005", "0!=0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int16Equals1 test = new Int16Equals1();
+
+ TestLibrary.TestFramework.BeginTestCase("Int16Equals1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int16 GetInt16(Int16 minValue, Int16 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return (Int16)(minValue + TestLibrary.Generator.GetInt16(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16equals2.cs b/tests/src/CoreMangLib/cti/system/int16/int16equals2.cs
new file mode 100644
index 0000000000..1b62e2bb96
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16equals2.cs
@@ -0,0 +1,223 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Int16Equals(Object)
+/// </summary>
+public class Int16Equals2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test two equal random int16");
+
+ try
+ {
+ Int16 number1 = TestLibrary.Generator.GetInt16(-55);
+ Object ob = number1;
+ if (!number1.Equals(ob))
+ {
+ TestLibrary.TestFramework.LogError("001", String.Format("equal two equal number {0} did not return true", number1));
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test two different int16");
+
+ try
+ {
+ Int16 i = TestLibrary.Generator.GetInt16(-55);
+ Int16 number1 = this.GetInt16(Int16.MinValue, (Int16)(i - 1));
+ object ob = this.GetInt16(i, Int16.MaxValue);
+ if (number1.Equals(ob))
+ {
+ TestLibrary.TestFramework.LogError("003", String.Format("equal two unqual number did not return false,the two number is {0}and{1}", number1, ob.ToString()));
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Test zero equals zero");
+
+ try
+ {
+ Int16 i1 = 0;
+ object ob = (Int16)0;
+ if (!i1.Equals(ob))
+ {
+ TestLibrary.TestFramework.LogError("005", "0!=0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Test int16MinValue");
+
+ try
+ {
+ Int16 i1 = Int16.MinValue;
+ object ob = Int16.MinValue;
+ if (!i1.Equals(ob))
+ {
+ TestLibrary.TestFramework.LogError("007", "equals error int16MinValue");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Test int16MaxValue");
+
+ try
+ {
+ Int16 i1 = Int16.MaxValue;
+ object ob = Int16.MaxValue;
+ if (!i1.Equals(ob))
+ {
+ TestLibrary.TestFramework.LogError("009", "equals error int16MinValue");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: The argument is not int16 type");
+
+ try
+ {
+ Int16 i1 = TestLibrary.Generator.GetInt16(-55);
+ object ob = Convert.ToInt32(i1);
+ if (i1.Equals(ob))
+ {
+ TestLibrary.TestFramework.LogError("011", "equals error int16MinValue");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int16Equals2 test = new Int16Equals2();
+
+ TestLibrary.TestFramework.BeginTestCase("Int16Equals2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int16 GetInt16(Int16 minValue, Int16 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return (Int16)(minValue + TestLibrary.Generator.GetInt16(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16gethashcode.cs b/tests/src/CoreMangLib/cti/system/int16/int16gethashcode.cs
new file mode 100644
index 0000000000..67fcf37587
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16gethashcode.cs
@@ -0,0 +1,69 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class Int16GetHashCode
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the return hash code");
+
+ try
+ {
+ Int16 i1 = TestLibrary.Generator.GetInt16(-55);
+ int hash = i1.GetHashCode();
+ if (i1 == hash)
+ {
+ TestLibrary.TestFramework.LogError("001", "int16.gethashcode is equal to the int16 itself : " + i1);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int16GetHashCode test = new Int16GetHashCode();
+
+ TestLibrary.TestFramework.BeginTestCase("Int16GetHashCode");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletoboolean.cs b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletoboolean.cs
new file mode 100644
index 0000000000..528987e0c4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletoboolean.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+//system.Int16.System.IConvertibleToBoolean
+public class Int16IConvertibleToBoolean
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: genarate a random int16 to boolean ");
+
+ try
+ {
+ Int16 i1 = 0;
+ while (i1 == 0)
+ {
+ i1 = TestLibrary.Generator.GetInt16(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToBoolean(null) != true)
+ {
+ TestLibrary.TestFramework.LogError("001", String.Format("The int16{0} to boolean is not true as expected ", i1));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Zero to boolean ");
+
+ try
+ {
+ Int16 i1 = 0;
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToBoolean(null) != false)
+ {
+ TestLibrary.TestFramework.LogError("003", String.Format("The int16 {0} to boolean is not false as expected ", i1));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: convert negative number to boolean ");
+
+ try
+ {
+ Int16 i1 = 0;
+ while (i1 == 0)
+ {
+ i1 = TestLibrary.Generator.GetInt16(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(-i1);
+ if (Icon1.ToBoolean(null) != true)
+ {
+ TestLibrary.TestFramework.LogError("005", String.Format("The int16 {0} to boolean is not true as expected ", i1));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int16IConvertibleToBoolean test = new Int16IConvertibleToBoolean();
+
+ TestLibrary.TestFramework.BeginTestCase("Int16IConvertibleToBoolean");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int16 GetInt16(Int16 minValue, Int16 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return Convert.ToInt16(minValue + TestLibrary.Generator.GetInt16(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletobyte.cs b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletobyte.cs
new file mode 100644
index 0000000000..5758bcb195
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletobyte.cs
@@ -0,0 +1,216 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+//System.Int16.System.IConvertibleToByte
+public class Int16IConvertibleToByte
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random int16 to byte ");
+
+ try
+ {
+ Byte by = TestLibrary.Generator.GetByte(-55);
+ Int16 i1 = (Int16)by;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToByte(null) != by)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert ByteMaxValue to byte ");
+
+ try
+ {
+ Int16 i1 = (Int16)Byte.MaxValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToByte(null) != Byte.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Convert zero to byte ");
+
+ try
+ {
+ Int16 i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToByte(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not zero as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Convert a negative byte int16 to Byte ");
+
+ try
+ {
+ Int16 i1 = 0;
+ while (i1 == 0)
+ {
+ i1 = (Int16)TestLibrary.Generator.GetByte(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(-i1);
+ Byte b1 = Icon1.ToByte(null);
+ TestLibrary.TestFramework.LogError("101", "An overflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (System.OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Convert int16 to Byte ");
+
+ try
+ {
+ Int16 i1 = 0;
+ while (i1 <= 255)
+ {
+ i1 = (Int16)TestLibrary.Generator.GetInt16(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(i1);
+ Byte b1 = Icon1.ToByte(null);
+ TestLibrary.TestFramework.LogError("103", "An overflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (System.OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Check the border value ");
+
+ try
+ {
+ Int16 i1 = 256;
+ IConvertible Icon1 = (IConvertible)(i1);
+ Byte b1 = Icon1.ToByte(null);
+ TestLibrary.TestFramework.LogError("105", "An overflowException was not thrown as expected");
+ retVal = false;
+ }
+ catch (System.OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int16IConvertibleToByte test = new Int16IConvertibleToByte();
+
+ TestLibrary.TestFramework.BeginTestCase("Int16IConvertibleToByte");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletochar.cs b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletochar.cs
new file mode 100644
index 0000000000..6b221f5384
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletochar.cs
@@ -0,0 +1,129 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.IConvertible.ToChar(System.IFormatProvider)
+/// </summary>
+public class Int16IConvertibleToChar
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random (Int16)char to char ");
+
+ try
+ {
+
+ Int16 i1 = TestLibrary.Generator.GetInt16(-55);
+ IConvertible Icon1 = (IConvertible)i1;
+ char c1 = Icon1.ToChar(null);
+ if (c1 != i1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert zero to char ");
+
+ try
+ {
+ Int16 i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ char c1 = Icon1.ToChar(null);
+ if (c1 != i1)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Convert a negative int16 to char");
+
+ try
+ {
+ Int16 i1 = TestLibrary.Generator.GetInt16(-55);
+ IConvertible Icon1 = (IConvertible)(-i1);
+ char c1 = Icon1.ToChar(null);
+ TestLibrary.TestFramework.LogError("101", "OverflowException was not thrown as expected ");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int16IConvertibleToChar test = new Int16IConvertibleToChar();
+
+ TestLibrary.TestFramework.BeginTestCase("Int16IConvertibleToChar");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletodatetime.cs b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletodatetime.cs
new file mode 100644
index 0000000000..7020074407
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletodatetime.cs
@@ -0,0 +1,98 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Int16.IConvertible.ToDateTime(IFormatProvider)
+/// </summary>
+public class Int16IConvertibleToDateTime
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Convert a random int16 number to dateTime");
+
+ try
+ {
+ Int16 i1 = TestLibrary.Generator.GetInt16(-55);
+ DateTime datetime = (i1 as IConvertible).ToDateTime(null);
+ TestLibrary.TestFramework.LogError("101", "The InvalidCastException was not thrown as expected");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Convert a zero to dateTime");
+
+ try
+ {
+ Int16 i1 = 0;
+ DateTime datetime = (i1 as IConvertible).ToDateTime(null);
+ TestLibrary.TestFramework.LogError("103", "The InvalidCastException was not thrown as expected");
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int16IConvertibleToDateTime test = new Int16IConvertibleToDateTime();
+
+ TestLibrary.TestFramework.BeginTestCase("Int16IConvertibleToDateTime");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletodecimal.cs b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletodecimal.cs
new file mode 100644
index 0000000000..d0f477501c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletodecimal.cs
@@ -0,0 +1,155 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Int16.IConvertilbe.ToDecimal
+/// </summary>
+public class Int16IConvertibleToDecimal
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random int16 to Decimal ");
+
+ try
+ {
+ Int16 i1 = TestLibrary.Generator.GetInt16(-55);
+ IConvertible Icon1 = (IConvertible)i1;
+ decimal d1 = Icon1.ToDecimal(null);
+ if (d1 != i1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not correct as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert zero to decimal");
+
+ try
+ {
+ Int16 i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ decimal d1 = Icon1.ToDecimal(null);
+ if (d1 != i1)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not correct as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check the border value Int16MaxValue");
+
+ try
+ {
+ Int16 i1 = Int16.MaxValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ decimal d1 = Icon1.ToDecimal(null);
+ if (d1 != i1)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not correct as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Check the border value Int16MinValue");
+
+ try
+ {
+ Int16 i1 = Int16.MinValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ decimal d1 = Icon1.ToDecimal(null);
+ if (d1 != i1)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not correct as expected");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int16IConvertibleToDecimal test = new Int16IConvertibleToDecimal();
+
+ TestLibrary.TestFramework.BeginTestCase("Int16IConvertibleToDecimal");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletodouble.cs b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletodouble.cs
new file mode 100644
index 0000000000..721b56313c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletodouble.cs
@@ -0,0 +1,175 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+//System.Int16.IConvertibleToDouble(System.IFormatProvider)
+public class Int16IConvertibleToDouble
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random int16 to double");
+
+ try
+ {
+ Int16 i1 = TestLibrary.Generator.GetInt16(-55);
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToDouble(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert a zero to double");
+
+ try
+ {
+ Int16 i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToDouble(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert a negative int16 to double");
+
+ try
+ {
+ Int16 i1 = 0;
+ while (i1 == 0)
+ {
+ i1 = TestLibrary.Generator.GetInt16(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(-i1);
+ if (Icon1.ToDouble(null) != (-i1))
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Check the boundary value1");
+
+ try
+ {
+ Int16 i1 = Int16.MaxValue;
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToDouble(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Check the boundary value2");
+
+ try
+ {
+ Int16 i1 = Int16.MinValue;
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToDouble(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int16IConvertibleToDouble test = new Int16IConvertibleToDouble();
+
+ TestLibrary.TestFramework.BeginTestCase("Int16IConvertibleToDouble");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletoint16.cs b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletoint16.cs
new file mode 100644
index 0000000000..90d6c9f3bb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletoint16.cs
@@ -0,0 +1,155 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Int16.IConverible.ToInt16(IFormatProvider)
+/// </summary>
+public class Int16IConvertibleToInt16
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the int16.MaxValue ");
+
+ try
+ {
+ Int16 i1 = Int16.MaxValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToInt16(null) != Int16.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Check Int16.MinValue ");
+
+ try
+ {
+ Int16 i1 = Int16.MinValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToInt16(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Check zero ");
+
+ try
+ {
+ Int16 i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToInt16(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Check a random Int16 number ");
+
+ try
+ {
+ Int16 i1 = TestLibrary.Generator.GetInt16(-55);
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToInt16(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("007", string.Format("The result is not the value {0} as expected", i1));
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int16IConvertibleToInt16 test = new Int16IConvertibleToInt16();
+
+ TestLibrary.TestFramework.BeginTestCase("Int16IConvertibleToInt16");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletoint32.cs b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletoint32.cs
new file mode 100644
index 0000000000..aa2d24bda5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletoint32.cs
@@ -0,0 +1,155 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Int16.IConvertible.ToInt32(IFormatProvider)
+/// </summary>
+public class Int16IConvertibleToInt32
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the int16.MaxValue ");
+
+ try
+ {
+ Int16 i1 = Int16.MaxValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToInt32(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Check Int16.MinValue ");
+
+ try
+ {
+ Int16 i1 = Int16.MinValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToInt32(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Check zero ");
+
+ try
+ {
+ Int16 i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToInt32(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Check a random Int16 number ");
+
+ try
+ {
+ Int16 i1 = TestLibrary.Generator.GetInt16(-55);
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToInt32(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("007", string.Format("The result is not the value {0} as expected", i1));
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int16IConvertibleToInt32 test = new Int16IConvertibleToInt32();
+
+ TestLibrary.TestFramework.BeginTestCase("Int16IConvertibleToInt32");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletoint64.cs b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletoint64.cs
new file mode 100644
index 0000000000..217de2759b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletoint64.cs
@@ -0,0 +1,120 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Int16.IConvertible.ToInt64(IFormatProvider)
+/// </summary>
+public class Int16IConvertibleToInt64
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: check a random int16 to int64");
+
+ try
+ {
+ Int16 i1 = this.GetInt16(Int16.MinValue, Int16.MaxValue);
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToInt64(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: check zero");
+
+ try
+ {
+ Int16 i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToInt64(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int16IConvertibleToInt64 test = new Int16IConvertibleToInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("Int16IConvertibleToInt64");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private Int16 GetInt16(Int16 minValue, Int16 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return (Int16)(minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletosbyte.cs b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletosbyte.cs
new file mode 100644
index 0000000000..0ecfd8984f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletosbyte.cs
@@ -0,0 +1,229 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Int16.IConverible.ToSbyte(IFormatProvider)
+/// </summary>
+public class Int16IConvertibleToSByte
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random int16 to sbyte ");
+
+ try
+ {
+ Int16 i1 = 200;
+ while (i1 > 127)
+ {
+ i1 = (Int16)TestLibrary.Generator.GetByte(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToSByte(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,tht int16 is:" + i1);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert zero to sbyte ");
+
+ try
+ {
+ Int16 i1 = 0;
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToSByte(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert a negative int16 to sbyte ");
+
+ try
+ {
+ Int16 i1 = 200;
+ while (i1 > 127)
+ {
+ i1 = (Int16)TestLibrary.Generator.GetByte(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(-i1);
+ if (Icon1.ToSByte(null) != (-i1))
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected,the int16 is:" + i1);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Check the boundary value of sbyte.MinValue");
+
+ try
+ {
+
+ Int16 i1 = (Int16)sbyte.MinValue;
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToSByte(null) != (i1))
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Check the boundary value of sbyte.MaxValue");
+
+ try
+ {
+
+ Int16 i1 = (Int16)sbyte.MaxValue;
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToSByte(null) != (i1))
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Test the overflowException");
+
+ try
+ {
+ Int16 i1 = 0;
+ while (i1 <= 127)
+ {
+ i1 = TestLibrary.Generator.GetInt16(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToSByte(null) != i1)
+ {
+ }
+ TestLibrary.TestFramework.LogError("101", "An overflowException was not thrown as expected ");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int16IConvertibleToSByte test = new Int16IConvertibleToSByte();
+
+ TestLibrary.TestFramework.BeginTestCase("Int16IConvertibleToSByte");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletosingle.cs b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletosingle.cs
new file mode 100644
index 0000000000..16b75740f0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletosingle.cs
@@ -0,0 +1,167 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Int16.IConvertibleToSingle(IFormatPorvider)
+/// </summary>
+public class Int16IConvertibleToSingle
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random int16 to single ");
+
+ try
+ {
+ Int16 i1 = 0;
+ while (i1 == 0)
+ {
+ i1 = TestLibrary.Generator.GetInt16(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToSingle(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert zero to single ");
+
+ try
+ {
+ Int16 i1 = 0;
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToSingle(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert a negative int16 to single ");
+
+ try
+ {
+ Int16 i1 = 0;
+ while (i1 == 0)
+ {
+ i1 = TestLibrary.Generator.GetInt16(-55);
+ }
+ IConvertible Icon1 = (IConvertible)(-i1);
+ if (Icon1.ToSingle(null) != (-i1))
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Check the boundary value");
+
+ try
+ {
+
+ Int16 i1 = Int16.MinValue;
+ IConvertible Icon1 = (IConvertible)(i1);
+ if (Icon1.ToSingle(null) != (i1))
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int16IConvertibleToSingle test = new Int16IConvertibleToSingle();
+
+ TestLibrary.TestFramework.BeginTestCase("Int16IConvertibleToSingle");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletotype.cs b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletotype.cs
new file mode 100644
index 0000000000..d58c2fba99
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletotype.cs
@@ -0,0 +1,234 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// System.Int16.System.IConvertible.ToType(System.Type,System.IFormatProvider)
+/// </summary>
+public class Int16IConvertibleToType
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random Int16 to String ");
+
+ try
+ {
+ Int16 i1 = TestLibrary.Generator.GetInt16(-55);
+ IConvertible Icon1 = (IConvertible)i1;
+ CultureInfo cultureinfo = new CultureInfo("en-US");
+ string s1 = Icon1.ToType(typeof(System.String), cultureinfo) as string;
+ if (s1 != i1.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected.The random number is :" + i1.ToString());
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert a random Int16 to Boolean ");
+
+ try
+ {
+ Int16 i1 = 0;
+ while (i1 == 0)
+ {
+ i1 = TestLibrary.Generator.GetInt16(-55);
+ }
+ IConvertible Icon1 = (IConvertible)i1;
+ CultureInfo cultureinfo = new CultureInfo("en-US");
+ bool s1 = (bool)Icon1.ToType(typeof(System.Boolean), cultureinfo);
+ if (s1 != true)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected.The random number is :" + i1.ToString());
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check the boundary value ");
+
+ try
+ {
+ Int16 i1 = Int16.MaxValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ CultureInfo cultureinfo = new CultureInfo("en-US");
+ long s1 = (long)Icon1.ToType(typeof(System.Int64), cultureinfo);
+ if (s1 != i1)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert \'-0\' to char ");
+
+ try
+ {
+ Int16 i1 = -0;
+ IConvertible Icon1 = (IConvertible)i1;
+ char s1 = (char)Icon1.ToType(typeof(System.Char), null);
+ if (s1 != '\0')
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Test the overflowException ");
+
+ try
+ {
+ Int16 i1 = 0;
+ while (i1 <= 255)
+ {
+ i1 = TestLibrary.Generator.GetInt16(-55);
+ }
+ IConvertible Icon1 = (IConvertible)i1;
+ byte s1 = (byte)Icon1.ToType(typeof(System.Byte), null);
+ TestLibrary.TestFramework.LogError("101", "The overflow exception was not thrown as expected: ");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Convert an int16 to a custom class type ");
+
+ try
+ {
+ Int16 i1 = TestLibrary.Generator.GetInt16(-55);
+ IConvertible Icon1 = (IConvertible)i1;
+ CultureInfo cultureinfo = new CultureInfo("en-US");
+ TestClass testclass = Icon1.ToType(typeof(TestClass), cultureinfo) as TestClass;
+ TestLibrary.TestFramework.LogError("103", "The InvalidCastException was not thrown as expected: " + i1);
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int16IConvertibleToType test = new Int16IConvertibleToType();
+
+ TestLibrary.TestFramework.BeginTestCase("Int16IConvertibleToType");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+public class TestClass
+{
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletouint16.cs b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletouint16.cs
new file mode 100644
index 0000000000..e89f90bf25
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletouint16.cs
@@ -0,0 +1,159 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+//System.Int16.System.IConvertible.ToUInt16(System.IFormatProvider)
+public class Int16IConvertibleToUInt16
+{
+ public const int c_UINT16_MAXVALUE = 65535;
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random Int16 to UInt16");
+
+ try
+ {
+ Int16 i1 = TestLibrary.Generator.GetInt16(-55);
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToUInt16(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert zero to UInt16 ");
+
+ try
+ {
+ Int16 i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToUInt16(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check the boundary value ");
+
+ try
+ {
+ Int16 i1 = Int16.MaxValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToUInt16(null) != Int16.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Test the negative int16 ");
+
+ try
+ {
+ Int16 i1 = TestLibrary.Generator.GetInt16(-55);
+ IConvertible Icon1 = (IConvertible)(-i1);
+ ushort s1 = Icon1.ToUInt16(null);
+ TestLibrary.TestFramework.LogError("101", "The overflow exception was not thrown as expected: ");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int16IConvertibleToUInt16 test = new Int16IConvertibleToUInt16();
+
+ TestLibrary.TestFramework.BeginTestCase("Int16IConvertibleToUInt16");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
+
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletouint32.cs b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletouint32.cs
new file mode 100644
index 0000000000..8937044204
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletouint32.cs
@@ -0,0 +1,156 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+//System.Int16.System.IConvertible.ToUInt32(System.IFormatProvider)
+public class Int16IConvertibleToUInt32
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random Int16 to UInt32");
+
+ try
+ {
+ Int16 i1 = TestLibrary.Generator.GetInt16(-55);
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToUInt32(null) != i1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected. The random number is: " + i1);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert zero to UInt32 ");
+
+ try
+ {
+ Int16 i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToUInt32(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check the boundary value ");
+
+ try
+ {
+ Int16 i1 = Int16.MaxValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToUInt32(null) != Int16.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Test the overflowException ");
+
+ try
+ {
+ Int16 i1 = TestLibrary.Generator.GetInt16(-55);
+ IConvertible Icon1 = (IConvertible)(-i1);
+ UInt32 s1 = Icon1.ToUInt32(null);
+ TestLibrary.TestFramework.LogError("101", "The overflow exception was not thrown as expected: ");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int16IConvertibleToUInt32 test = new Int16IConvertibleToUInt32();
+
+ TestLibrary.TestFramework.BeginTestCase("Int16IConvertibleToUInt32");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletouint64.cs b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletouint64.cs
new file mode 100644
index 0000000000..5cf0031a4e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16iconvertibletouint64.cs
@@ -0,0 +1,155 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+//System.Int16.System.IConvertible.ToUInt64(System.IFormatProvider)
+public class Int16IConvertibleToUInt64
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert a random Int16 to UInt64");
+
+ try
+ {
+ Int16 i1 = TestLibrary.Generator.GetInt16(-55);
+ IConvertible Icon1 = (IConvertible)i1;
+ ulong u1 = (ulong)i1;
+ if (Icon1.ToUInt64(null) != u1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected. The random number is: " + i1);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert zero to UInt64 ");
+
+ try
+ {
+ Int16 i1 = 0;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToUInt64(null) != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check the boundary value ");
+
+ try
+ {
+ Int16 i1 = Int16.MaxValue;
+ IConvertible Icon1 = (IConvertible)i1;
+ if (Icon1.ToUInt64(null) != (ulong)Int16.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Test the overflowException ");
+
+ try
+ {
+ Int16 i1 = TestLibrary.Generator.GetInt16(-55);
+ IConvertible Icon1 = (IConvertible)(-i1);
+ ulong s1 = Icon1.ToUInt64(null);
+ TestLibrary.TestFramework.LogError("101", "The overflow exception was not thrown as expected: ");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int16IConvertibleToUInt64 test = new Int16IConvertibleToUInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("Int16IConvertibleToUInt64");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16maxvalue.cs b/tests/src/CoreMangLib/cti/system/int16/int16maxvalue.cs
new file mode 100644
index 0000000000..945e4538a6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16maxvalue.cs
@@ -0,0 +1,69 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class Int16MaxValue
+{
+ private int c_INT16_MAXVALUE = 32767;
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test Int16MaxValue");
+
+ try
+ {
+ if (Int16.MaxValue != c_INT16_MAXVALUE)
+ {
+ TestLibrary.TestFramework.LogError("001", "expected Int16MaxValue is not equal to 32767 ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int16MaxValue test = new Int16MaxValue();
+
+ TestLibrary.TestFramework.BeginTestCase("Int16MaxValue");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16minvalue.cs b/tests/src/CoreMangLib/cti/system/int16/int16minvalue.cs
new file mode 100644
index 0000000000..21769313dd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16minvalue.cs
@@ -0,0 +1,69 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class Int16MinValue
+{
+ private int c_INT16_MINVALUE = -32768;
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test Int16MinValue");
+
+ try
+ {
+ if (Int16.MinValue != c_INT16_MINVALUE)
+ {
+ TestLibrary.TestFramework.LogError("001", "expected Int16MinValue is not equal to -32768 ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int16MinValue test = new Int16MinValue();
+
+ TestLibrary.TestFramework.BeginTestCase("Int16MinValue");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16parse1.cs b/tests/src/CoreMangLib/cti/system/int16/int16parse1.cs
new file mode 100644
index 0000000000..f3816ae6e7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16parse1.cs
@@ -0,0 +1,337 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Int16.Parse(String)
+/// </summary>
+public class Int16Parse1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Normally test a random string of int16 ");
+
+ try
+ {
+ string str = TestLibrary.Generator.GetInt16(-55).ToString();
+ Int16 i1 = Int16.Parse(str);
+ Int16 i2 = Convert.ToInt16(str);
+ if (i1 != i2)
+ {
+ TestLibrary.TestFramework.LogError("001", "the result is not the value as expected, the string is " + str);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test the int16.MaxValue");
+
+ try
+ {
+ string str = "32767";
+ Int16 i1 = Int16.Parse(str);
+ if (i1 != 32767)
+ {
+ TestLibrary.TestFramework.LogError("003", "the result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Test the int16.MinValue");
+
+ try
+ {
+ string str = "-32768";
+ Int16 i1 = Int16.Parse(str);
+ if (i1 != -32768)
+ {
+ TestLibrary.TestFramework.LogError("005", "the result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: The argument with white space in both beginning and the end");
+
+ try
+ {
+ string str2;
+ string str = str2 = TestLibrary.Generator.GetInt16(-55).ToString();
+ str = " " + str;
+ str = str + " ";
+ Int16 i1 = Int16.Parse(str);
+ Int16 i2 = Int16.Parse(str2);
+ if (i1 != i2)
+ {
+ TestLibrary.TestFramework.LogError("007", "the result is not the value as expected,the string is :" + str);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Test the parameter \"-0\"");
+
+ try
+ {
+ Int16 i1 = Int16.Parse("-0");
+ if (i1 != 0)
+ {
+ TestLibrary.TestFramework.LogError("009", "the result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The argument is null reference");
+
+ try
+ {
+ string str = null;
+ Int16 i1 = Int16.Parse(str);
+ TestLibrary.TestFramework.LogError("101", "the Method did not throw an ArgumentNullException");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Test format exception 1");
+
+ try
+ {
+ string str = "-123-567";
+ Int16 i1 = Int16.Parse(str);
+ TestLibrary.TestFramework.LogError("103", "the Method did not throw a FormatException");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Test format exception 2");
+
+ try
+ {
+ string str = "98d5t6w7";
+ Int16 i1 = Int16.Parse(str);
+ TestLibrary.TestFramework.LogError("105", "the Method did not throw a FormatException");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: Test format exception 3, the string is white space");
+
+ try
+ {
+ string str = " ";
+ Int16 i1 = Int16.Parse(str);
+ TestLibrary.TestFramework.LogError("107", "the Method did not throw a FormatException");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: The string represents a number less than int16.minvalue");
+
+ try
+ {
+ string str = (Int16.MinValue - 1).ToString();
+ Int16 i1 = Int16.Parse(str);
+ TestLibrary.TestFramework.LogError("109", "the Method did not throw a OverflowException");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("110", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: The string represents a number greater than int16.maxvalue");
+
+ try
+ {
+ string str = (Int16.MaxValue + 1).ToString();
+ Int16 i1 = Int16.Parse(str);
+ TestLibrary.TestFramework.LogError("111", "the Method did not throw a OverflowException");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("112", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int16Parse1 test = new Int16Parse1();
+
+ TestLibrary.TestFramework.BeginTestCase("Int16Parse1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16parse2.cs b/tests/src/CoreMangLib/cti/system/int16/int16parse2.cs
new file mode 100644
index 0000000000..958a412885
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16parse2.cs
@@ -0,0 +1,584 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Int16.Parse(String,System.Globalization.NumberStyles)
+/// </summary>
+public class Int16Parse2
+{
+ #region Privates
+ private CultureInfo CurrentCulture = TestLibrary.Utilities.CurrentCulture;
+ private CultureInfo customCulture = null;
+ private CultureInfo CustomCulture
+ {
+ get
+ {
+ if (null == customCulture)
+ {
+ customCulture = new CultureInfo(CurrentCulture.Name);
+ NumberFormatInfo nfi = customCulture.NumberFormat;
+ //default is "," in most of the cultures, but in some cultures like DE, TR it is "."
+ //nfi.NumberGroupSeparator = ",";
+ nfi.NumberGroupSizes = new int[] { 3 };
+ nfi.NegativeSign = "-";
+ nfi.NumberNegativePattern = 1;
+ customCulture.NumberFormat = nfi;
+ }
+ return customCulture;
+ }
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Normally test a random string of int16 ");
+
+ try
+ {
+ string str = TestLibrary.Generator.GetInt16().ToString();
+ NumberStyles numberstyle = NumberStyles.Any;
+ Int16 i1 = Int16.Parse(str, numberstyle);
+ Int16 i2 = Convert.ToInt16(str);
+ if (i1 != i2)
+ {
+ TestLibrary.TestFramework.LogError("001", "the result is not the value as expected, the string is " + str);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Test the int16.MaxValue");
+
+ try
+ {
+ string str = "32767";
+ NumberStyles numberstyle = NumberStyles.Any;
+ Int16 i1 = Int16.Parse(str, numberstyle);
+ if (i1 != 32767)
+ {
+ TestLibrary.TestFramework.LogError("003", "the result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Test the int16.MinValue");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = CustomCulture; //NegativeSign may differ
+ string str = "-32768";
+ NumberStyles numberstyle = NumberStyles.Any;
+ Int16 i1 = Int16.Parse(str, numberstyle);
+ if (i1 != -32768)
+ {
+ TestLibrary.TestFramework.LogError("005", "the result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ finally
+ {
+ TestLibrary.Utilities.CurrentCulture = CurrentCulture;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: The argument with white space in both beginning and the end");
+
+ try
+ {
+ string str2;
+ string str = str2 = TestLibrary.Generator.GetInt16().ToString();
+ str = " " + str;
+ str = str + " ";
+ NumberStyles numberstyle = NumberStyles.Any;
+ Int16 i1 = Int16.Parse(str, numberstyle);
+ Int16 i2 = Int16.Parse(str2, numberstyle);
+ if (i1 != i2)
+ {
+ TestLibrary.TestFramework.LogError("007", "the result is not the value as expected,the string is :" + str);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Test the parameter \"-0\"");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = CustomCulture; //NegativeSign may differ
+ NumberStyles numberstyle = NumberStyles.Any;
+ Int16 i1 = Int16.Parse("-0", numberstyle);
+ if (i1 != 0)
+ {
+ TestLibrary.TestFramework.LogError("009", "the result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ finally
+ {
+ TestLibrary.Utilities.CurrentCulture = CurrentCulture;
+ }
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Test the parameter NumberStyles.AllowThousands");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = CustomCulture; //NumberGroupSeparator may different than ","
+ string str = "32" + CustomCulture.NumberFormat.NumberGroupSeparator + "700";
+ NumberStyles numberstyle = NumberStyles.AllowThousands;
+ Int16 i1 = Int16.Parse(str, numberstyle);
+ if (i1 != 32700)
+ {
+ TestLibrary.TestFramework.LogError("011", "the result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ finally
+ {
+ TestLibrary.Utilities.CurrentCulture = CurrentCulture;
+ }
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Test the parameter NumberStyles.AllowParentheses");
+
+ try
+ {
+ Int16 int16 = TestLibrary.Generator.GetInt16();
+ string str = "(" + int16.ToString() + ")";
+ NumberStyles numberstyle = NumberStyles.AllowParentheses;
+ Int16 i1 = Int16.Parse(str, numberstyle);
+ if (i1 != (-int16))
+ {
+ TestLibrary.TestFramework.LogError("013", "the result is not the value as expected,the int16 is: " + int16);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest8: The string with white space in both the beginning and the end");
+
+ try
+ {
+ Int16 int16 = TestLibrary.Generator.GetInt16();
+ string str = " " + int16.ToString() + " ";
+ NumberStyles numberstyle = NumberStyles.AllowLeadingWhite | System.Globalization.NumberStyles.AllowTrailingWhite;
+ Int16 i1 = Int16.Parse(str, numberstyle);
+ if (i1 != int16)
+ {
+ TestLibrary.TestFramework.LogError("015", "the result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest9: Test the parameters NumberStyles.AllowTrailingSign");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = CustomCulture; //NegativeSign may be different
+ string str = "8765-";
+ NumberStyles numberstyle = NumberStyles.AllowTrailingSign;
+ Int16 i1 = Int16.Parse(str, numberstyle);
+ if (i1 != -8765)
+ {
+ TestLibrary.TestFramework.LogError("017", "the result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ finally
+ {
+ TestLibrary.Utilities.CurrentCulture = CurrentCulture; //NegativeSign may be different
+ }
+ return retVal;
+ }
+
+ public bool PosTest10()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest10: Test the parameters NumberStyles.HexNumber");
+
+ try
+ {
+ string str = "5e81";
+ NumberStyles numberstyle = NumberStyles.HexNumber;
+ Int16 i1 = Int16.Parse(str, numberstyle);
+ if (i1 != 24193)
+ {
+ TestLibrary.TestFramework.LogError("019", "the result is not the value as expected ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The argument is null reference");
+
+ try
+ {
+ string str = null;
+ NumberStyles numberstyle = NumberStyles.Any;
+ Int16 i1 = Int16.Parse(str, numberstyle);
+ TestLibrary.TestFramework.LogError("101", "the Method did not throw an ArgumentNullException");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Test format exception 1");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = CustomCulture; //NegativeSign may be different
+ string str = "-123567";
+ NumberStyles numberstyle = NumberStyles.AllowTrailingSign;
+ Int16 i1 = Int16.Parse(str, numberstyle);
+ TestLibrary.TestFramework.LogError("103", "the Method did not throw a FormatException");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ finally
+ {
+ TestLibrary.Utilities.CurrentCulture = CurrentCulture;
+ }
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Test format exception 2");
+
+ try
+ {
+ string str = "98d5t6w7";
+ NumberStyles numberstyle = NumberStyles.Currency;
+ Int16 i1 = Int16.Parse(str, numberstyle);
+ TestLibrary.TestFramework.LogError("105", "the Method did not throw a FormatException");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: Test format exception 3, the string is white space");
+
+ try
+ {
+ string str = " ";
+ NumberStyles numberstyle = NumberStyles.None;
+ Int16 i1 = Int16.Parse(str, numberstyle);
+ TestLibrary.TestFramework.LogError("107", "the Method did not throw a FormatException");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: The string represents a number less than int16.minvalue");
+
+ try
+ {
+ string str = (Int16.MinValue - 1).ToString();
+ NumberStyles numberstyle = NumberStyles.Currency;
+ Int16 i1 = Int16.Parse(str, numberstyle);
+ TestLibrary.TestFramework.LogError("109", "the Method did not throw a OverflowException");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("110", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: The string represents a number greater than int16.maxvalue");
+
+ try
+ {
+ string str = (Int16.MaxValue + 1).ToString();
+ NumberStyles numberstyle = NumberStyles.Currency;
+ Int16 i1 = Int16.Parse(str, numberstyle);
+ TestLibrary.TestFramework.LogError("111", "the Method did not throw a OverflowException");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("112", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest7: style is not a NumberStyles value");
+
+ try
+ {
+ string str = TestLibrary.Generator.GetInt16().ToString();
+ int i2 = 24568;
+ NumberStyles numberstyle = (NumberStyles)i2;
+ Int16 i1 = Int16.Parse(str, numberstyle);
+ TestLibrary.TestFramework.LogError("113", "the Method did not throw an ArgumentException,the string is:" + str);
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("114", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest8()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest8: style is not a combination of AllowHexSpecifier and HexNumber");
+
+ try
+ {
+ string str = "1df6";
+ NumberStyles numberstyle = NumberStyles.HexNumber | NumberStyles.AllowTrailingSign;
+ Int16 i1 = Int16.Parse(str, numberstyle);
+ TestLibrary.TestFramework.LogError("115", "the Method did not throw an ArgumentException,the string is:");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("116", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int16Parse2 test = new Int16Parse2();
+
+ TestLibrary.TestFramework.BeginTestCase("Int16Parse2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16parse3.cs b/tests/src/CoreMangLib/cti/system/int16/int16parse3.cs
new file mode 100644
index 0000000000..1d889db032
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16parse3.cs
@@ -0,0 +1,454 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// Int16.Parse(string,numberstyle,iformatprovider)
+/// </summary>
+public class Int16Parse3
+{
+ #region Privates
+ private CultureInfo CurrentCulture = TestLibrary.Utilities.CurrentCulture;
+ private CultureInfo customCulture = null;
+ private CultureInfo CustomCulture
+ {
+ get
+ {
+ if (null == customCulture)
+ {
+ customCulture = new CultureInfo(CurrentCulture.Name);
+ NumberFormatInfo nfi = customCulture.NumberFormat;
+ nfi.NumberGroupSeparator = ",";
+ nfi.NumberGroupSizes = new int[] { 3 };
+ nfi.NegativeSign = "-";
+ nfi.NumberNegativePattern = 1;
+ customCulture.NumberFormat = nfi;
+ }
+ return customCulture;
+ }
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Test the method with the cultureinfo parameter which implemented the IFormatProvider interface ");
+
+ try
+ {
+ string s1 = "1,000";
+ int i1 = Int16.Parse(s1, System.Globalization.NumberStyles.AllowThousands, CustomCulture);
+ if (i1 != 1000)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Test the method with the numberformatinfo parameter which implemented the IFormatProvider interface ");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = CustomCulture; //Parse uses CurrentCulture since numberFormatInfo is created without any parameter.
+ string s1 = " 3,000 ";
+ int i1 = Int16.Parse(s1, System.Globalization.NumberStyles.AllowThousands | System.Globalization.NumberStyles.AllowLeadingWhite | System.Globalization.NumberStyles.AllowTrailingWhite, new NumberFormatInfo());
+ if (i1 != 3000)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ finally
+ {
+ TestLibrary.Utilities.CurrentCulture = CurrentCulture;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Test the method with the DateTimeFormatInfo parameter which implemented the IFormatProvider interface ");
+
+ try
+ {
+ TestLibrary.Utilities.CurrentCulture = CustomCulture;
+ string s1 = "-16,466";
+ int i1 = Int16.Parse(s1, System.Globalization.NumberStyles.AllowThousands | System.Globalization.NumberStyles.AllowLeadingSign, new DateTimeFormatInfo());
+ if (i1 != -16466)
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ finally
+ {
+ TestLibrary.Utilities.CurrentCulture = CurrentCulture;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Test special string \"-3.456\" using the cultureinfo parameter");
+
+ try
+ {
+ string s1 = "-3.456";
+ int i1 = Int16.Parse(s1, System.Globalization.NumberStyles.AllowThousands | System.Globalization.NumberStyles.AllowLeadingSign, new CultureInfo("pt-BR"));
+ if (i1 != -3456)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Test special string \" 3 01 78\" using the cultureinfo parameter");
+
+ try
+ {
+ string s1 = " 3 01 78";
+ NumberFormatInfo nfi = new CultureInfo("pt-BR").NumberFormat;
+ nfi.NumberGroupSizes = new int[] { 2 };
+ nfi.NumberGroupSeparator = " ";
+ int i1 = Int16.Parse(s1, System.Globalization.NumberStyles.AllowThousands | System.Globalization.NumberStyles.AllowLeadingWhite, nfi);
+ if (i1 != 30178)
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Using the null reference as the third parameter IFormatProvider");
+
+ try
+ {
+ string s1 = " 3678";
+ int i1 = Int16.Parse(s1, System.Globalization.NumberStyles.AllowThousands | System.Globalization.NumberStyles.AllowLeadingWhite, null);
+ if (i1 != 3678)
+ {
+ TestLibrary.TestFramework.LogError("011", "The result is not the value as expected. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The argument is null reference");
+
+ try
+ {
+ string str = null;
+ NumberStyles numberstyle = NumberStyles.Any;
+ Int16 i1 = Int16.Parse(str, numberstyle, new CultureInfo("en-US"));
+ TestLibrary.TestFramework.LogError("101", "the Method did not throw an ArgumentNullException");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Test format exception 1");
+
+ try
+ {
+ string str = "-123567";
+ NumberStyles numberstyle = NumberStyles.AllowTrailingSign;
+ Int16 i1 = Int16.Parse(str, numberstyle, CustomCulture);
+ TestLibrary.TestFramework.LogError("103", "the Method did not throw a FormatException");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Test format exception 2");
+
+ try
+ {
+ string str = "98d5t6w7";
+ NumberStyles numberstyle = NumberStyles.Currency;
+ Int16 i1 = Int16.Parse(str, numberstyle, new CultureInfo("en-US"));
+ TestLibrary.TestFramework.LogError("105", "the Method did not throw a FormatException");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: Test format exception 3, the string is white space");
+
+ try
+ {
+ string str = " ";
+ NumberStyles numberstyle = NumberStyles.None;
+ Int16 i1 = Int16.Parse(str, numberstyle, new CultureInfo("en-US"));
+ TestLibrary.TestFramework.LogError("107", "the Method did not throw a FormatException");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: The string represents a number less than int16.minvalue");
+
+ try
+ {
+ string str = (Int16.MinValue - 1).ToString();
+ NumberStyles numberstyle = NumberStyles.Currency;
+ Int16 i1 = Int16.Parse(str, numberstyle, new CultureInfo("en-US"));
+ TestLibrary.TestFramework.LogError("109", "the Method did not throw a OverflowException");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("110", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: The string represents a number greater than int16.maxvalue");
+
+ try
+ {
+ string str = (Int16.MaxValue + 1).ToString();
+ NumberStyles numberstyle = NumberStyles.Currency;
+ Int16 i1 = Int16.Parse(str, numberstyle, new CultureInfo("en-US"));
+ TestLibrary.TestFramework.LogError("111", "the Method did not throw a OverflowException");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("112", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest7: style is not a NumberStyles value");
+
+ try
+ {
+ string str = TestLibrary.Generator.GetInt16().ToString();
+ int i2 = 24568;
+ NumberStyles numberstyle = (NumberStyles)i2;
+ Int16 i1 = Int16.Parse(str, numberstyle, new CultureInfo("en-US"));
+ TestLibrary.TestFramework.LogError("113", "the Method did not throw an ArgumentException,the string is:" + str);
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("114", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest8()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest8: style is not a combination of AllowHexSpecifier and HexNumber");
+
+ try
+ {
+ string str = "1df6";
+ NumberStyles numberstyle = NumberStyles.HexNumber | NumberStyles.AllowTrailingSign;
+ Int16 i1 = Int16.Parse(str, numberstyle, new CultureInfo("en-US"));
+ TestLibrary.TestFramework.LogError("115", "the Method did not throw an ArgumentException,the string is:");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("116", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ Int16Parse3 test = new Int16Parse3();
+
+ TestLibrary.TestFramework.BeginTestCase("Int16Parse3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/int16/int16tryparse.cs b/tests/src/CoreMangLib/cti/system/int16/int16tryparse.cs
new file mode 100644
index 0000000000..58e14bcffe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int16/int16tryparse.cs
@@ -0,0 +1,553 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+// Ported to CoreCLR from Co7525TryParse_all.cs
+// Tests Int16.TryParse(String), Int16.TryParse(String, NumberStyles, IFormatProvider, ref Int16)
+// 2003/04/01 KatyK
+// 2007/06/28 adapted by MarielY
+
+public class Int16TryParse
+{
+ static bool verbose = false;
+
+ public static int Main()
+ {
+ bool passed = true;
+
+ try
+ {
+ // Make the test culture independent
+ TestLibrary.Utilities.CurrentCulture = CultureInfo.InvariantCulture;
+
+ // Set up NFIs to use
+ NumberFormatInfo goodNFI = new NumberFormatInfo();
+
+ NumberFormatInfo corruptNFI = new NumberFormatInfo(); // DecimalSeparator == GroupSeparator
+ corruptNFI.NumberDecimalSeparator = ".";
+ corruptNFI.NumberGroupSeparator = ".";
+ corruptNFI.CurrencyDecimalSeparator = ".";
+ corruptNFI.CurrencyGroupSeparator = ".";
+ corruptNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo swappedNFI = new NumberFormatInfo(); // DecimalSeparator & GroupSeparator swapped
+ swappedNFI.NumberDecimalSeparator = ".";
+ swappedNFI.NumberGroupSeparator = ",";
+ swappedNFI.CurrencyDecimalSeparator = ",";
+ swappedNFI.CurrencyGroupSeparator = ".";
+ swappedNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo distinctNFI = new NumberFormatInfo(); // DecimalSeparator & GroupSeparator distinct
+ distinctNFI.NumberDecimalSeparator = ".";
+ distinctNFI.NumberGroupSeparator = ",";
+ distinctNFI.CurrencyDecimalSeparator = ":";
+ distinctNFI.CurrencyGroupSeparator = ";";
+ distinctNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo customNFI = new NumberFormatInfo();
+ customNFI.NegativeSign = "^";
+
+ NumberFormatInfo ambigNFI = new NumberFormatInfo();
+ ambigNFI.NegativeSign = "^";
+ ambigNFI.CurrencySymbol = "^";
+
+ CultureInfo germanCulture = new CultureInfo("de-DE");
+ CultureInfo japaneseCulture;
+
+ try
+ {
+ japaneseCulture = new CultureInfo("ja-JP");
+ }
+ catch (Exception)
+ {
+ TestLibrary.Logging.WriteLine("East Asian Languages are not installed. Skiping Japanese culture tests.");
+ japaneseCulture = null;
+ }
+
+ // Parse tests included for comparison/regression
+ passed &= VerifyInt16Parse("5", 5);
+ passed &= VerifyInt16Parse("-5", -5);
+ passed &= VerifyInt16Parse("5 ", 5);
+ passed &= VerifyInt16Parse("5\0", 5);
+ passed &= VerifyInt16Parse("10000", 10000);
+ passed &= VerifyInt16Parse("-10000", -10000);
+ passed &= VerifyInt16Parse("5", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyInt16Parse("-5", NumberStyles.Integer, CultureInfo.InvariantCulture, -5);
+ passed &= VerifyInt16Parse("5 \0", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyInt16Parse("5\0\0\0", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyInt16Parse("12", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0x12);
+ passed &= VerifyInt16Parse("fF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFF);
+ passed &= VerifyInt16Parse("fFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, -1);
+ passed &= VerifyInt16Parse("123", NumberStyles.Integer, germanCulture, 123);
+ passed &= VerifyInt16Parse("123", NumberStyles.Integer, japaneseCulture, 123);
+ passed &= VerifyInt16Parse("123,000", NumberStyles.AllowDecimalPoint, germanCulture, 123);
+ passed &= VerifyInt16Parse("123.000", NumberStyles.AllowDecimalPoint, japaneseCulture, 123);
+ passed &= VerifyInt16Parse("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 5); // currency
+ passed &= VerifyInt16Parse("5", NumberStyles.Integer, goodNFI, 5);
+ //
+ passed &= VerifyInt16Parse("5", NumberStyles.Integer, corruptNFI, 5);
+ passed &= VerifyInt16Parse("5", NumberStyles.Number, corruptNFI, 5);
+ passed &= VerifyInt16Parse("5.0", NumberStyles.Number, corruptNFI, 5);
+ passed &= VerifyInt16ParseException("5,0", NumberStyles.Number, corruptNFI, typeof(FormatException));
+ passed &= VerifyInt16ParseException("5.0.0", NumberStyles.Number, corruptNFI, typeof(FormatException));
+ passed &= VerifyInt16Parse("$5.0", NumberStyles.Currency, corruptNFI, 5);
+ passed &= VerifyInt16ParseException("$5,0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyInt16ParseException("$5.0.0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyInt16Parse("5.0", NumberStyles.Currency, corruptNFI, 5);
+ passed &= VerifyInt16ParseException("5,0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyInt16ParseException("5.0.0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyInt16Parse("5.0", NumberStyles.Any, corruptNFI, 5);
+ passed &= VerifyInt16ParseException("5,0", NumberStyles.Any, corruptNFI, typeof(FormatException));
+ passed &= VerifyInt16ParseException("5.0.0", NumberStyles.Any, corruptNFI, typeof(FormatException));
+ //
+ passed &= VerifyInt16Parse("5", NumberStyles.Integer, swappedNFI, 5);
+ passed &= VerifyInt16ParseException("1,234", NumberStyles.Integer, swappedNFI, typeof(FormatException));
+ passed &= VerifyInt16Parse("5", NumberStyles.Number, swappedNFI, 5);
+ passed &= VerifyInt16Parse("5.0", NumberStyles.Number, swappedNFI, 5);
+ passed &= VerifyInt16Parse("1,234", NumberStyles.Number, swappedNFI, 1234);
+ passed &= VerifyInt16Parse("1,234.0", NumberStyles.Number, swappedNFI, 1234);
+ passed &= VerifyInt16ParseException("5.000.000", NumberStyles.Number, swappedNFI, typeof(FormatException));
+ passed &= VerifyInt16ParseException("5.000,00", NumberStyles.Number, swappedNFI, typeof(FormatException));
+ passed &= VerifyInt16Parse("5.000", NumberStyles.Currency, swappedNFI, 5); //???
+ passed &= VerifyInt16ParseException("5.000,00", NumberStyles.Currency, swappedNFI, typeof(FormatException)); //???
+ passed &= VerifyInt16Parse("$5.000", NumberStyles.Currency, swappedNFI, 5000);
+ passed &= VerifyInt16Parse("$5.000,00", NumberStyles.Currency, swappedNFI, 5000);
+ passed &= VerifyInt16Parse("5.000", NumberStyles.Any, swappedNFI, 5); //?
+ passed &= VerifyInt16Parse("$5.000", NumberStyles.Any, swappedNFI, 5000);
+ passed &= VerifyInt16ParseException("5.000,00", NumberStyles.Any, swappedNFI, typeof(FormatException)); //?
+ passed &= VerifyInt16Parse("$5.000", NumberStyles.Any, swappedNFI, 5000);
+ passed &= VerifyInt16Parse("$5.000,00", NumberStyles.Any, swappedNFI, 5000);
+ passed &= VerifyInt16Parse("5,0", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyInt16Parse("$5,0", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyInt16Parse("5,000", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyInt16Parse("$5,000", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyInt16ParseException("5,000.0", NumberStyles.Currency, swappedNFI, typeof(FormatException));
+ passed &= VerifyInt16ParseException("$5,000.0", NumberStyles.Currency, swappedNFI, typeof(FormatException));
+ passed &= VerifyInt16Parse("5,000", NumberStyles.Any, swappedNFI, 5);
+ passed &= VerifyInt16Parse("$5,000", NumberStyles.Any, swappedNFI, 5);
+ //
+ passed &= VerifyInt16Parse("5.0", NumberStyles.Number, distinctNFI, 5);
+ passed &= VerifyInt16Parse("1,234.0", NumberStyles.Number, distinctNFI, 1234);
+ passed &= VerifyInt16Parse("5.0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyInt16Parse("1,234.0", NumberStyles.Currency, distinctNFI, 1234);
+ passed &= VerifyInt16Parse("5.0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyInt16Parse("1,234.0", NumberStyles.Any, distinctNFI, 1234);
+ passed &= VerifyInt16ParseException("$5.0", NumberStyles.Currency, distinctNFI, typeof(FormatException));
+ passed &= VerifyInt16ParseException("$5.0", NumberStyles.Any, distinctNFI, typeof(FormatException));
+ passed &= VerifyInt16ParseException("5:0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyInt16ParseException("5;0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyInt16ParseException("$5:0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyInt16Parse("5:0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyInt16Parse("5:000", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyInt16Parse("5;000", NumberStyles.Currency, distinctNFI, 5000);
+ passed &= VerifyInt16Parse("$5:0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyInt16Parse("$5;0", NumberStyles.Currency, distinctNFI, 50);
+ passed &= VerifyInt16Parse("5:0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyInt16Parse("5;0", NumberStyles.Any, distinctNFI, 50);
+ passed &= VerifyInt16Parse("$5:0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyInt16Parse("$5;0", NumberStyles.Any, distinctNFI, 50);
+ passed &= VerifyInt16ParseException("1,23;45.0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyInt16Parse("1,23;45.0", NumberStyles.Currency, distinctNFI, 12345);
+ passed &= VerifyInt16Parse("1,23;45.0", NumberStyles.Any, distinctNFI, 12345);
+ passed &= VerifyInt16ParseException("$1,23;45.0", NumberStyles.Any, distinctNFI, typeof(FormatException));
+ //
+ passed &= VerifyInt16ParseException("100000", typeof(OverflowException));
+ passed &= VerifyInt16ParseException("-100000", typeof(OverflowException));
+ passed &= VerifyInt16ParseException("Garbage", typeof(FormatException));
+ passed &= VerifyInt16ParseException("5\0Garbage", typeof(FormatException));
+ passed &= VerifyInt16ParseException(null, typeof(ArgumentNullException));
+ passed &= VerifyInt16ParseException("1FFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, typeof(OverflowException));
+ passed &= VerifyInt16ParseException("FFFFFFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, typeof(OverflowException));
+ passed &= VerifyInt16ParseException("5", NumberStyles.AllowHexSpecifier | NumberStyles.AllowParentheses, null, typeof(ArgumentException));
+ passed &= VerifyInt16ParseException("4", (NumberStyles)(-1), typeof(ArgumentException));
+ passed &= VerifyInt16ParseException("4", (NumberStyles)0x10000, typeof(ArgumentException));
+ passed &= VerifyInt16ParseException("4", (NumberStyles)(-1), CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyInt16ParseException("4", (NumberStyles)0x10000, CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyInt16ParseException("123.000", NumberStyles.Any, germanCulture, typeof(OverflowException));
+ passed &= VerifyInt16ParseException("123,000", NumberStyles.Any, japaneseCulture, typeof(OverflowException));
+ passed &= VerifyInt16ParseException("123,000", NumberStyles.Integer, germanCulture, typeof(FormatException));
+ passed &= VerifyInt16ParseException("123.000", NumberStyles.Integer, japaneseCulture, typeof(FormatException));
+ passed &= VerifyInt16ParseException("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Integer, germanCulture, typeof(FormatException)); // currency
+
+ /////////// TryParse(String)
+ //// Pass cases
+ passed &= VerifyInt16TryParse("5", 5, true);
+ passed &= VerifyInt16TryParse("-5", -5, true);
+ passed &= VerifyInt16TryParse(" 5 ", 5, true);
+ passed &= VerifyInt16TryParse("5\0", 5, true);
+ passed &= VerifyInt16TryParse("5 \0", 5, true);
+ passed &= VerifyInt16TryParse("5\0\0\0", 5, true);
+ passed &= VerifyInt16TryParse("10000", 10000, true);
+ passed &= VerifyInt16TryParse("-10000", -10000, true);
+ passed &= VerifyInt16TryParse(Int16.MaxValue.ToString(), Int16.MaxValue, true);
+ passed &= VerifyInt16TryParse(Int16.MinValue.ToString(), Int16.MinValue, true);
+
+ //// Fail cases
+ passed &= VerifyInt16TryParse(null, 0, false);
+ passed &= VerifyInt16TryParse("", 0, false);
+ passed &= VerifyInt16TryParse("Garbage", 0, false);
+ passed &= VerifyInt16TryParse("5\0Garbage", 0, false);
+ passed &= VerifyInt16TryParse("100000", 0, false);
+ passed &= VerifyInt16TryParse("-100000", 0, false);
+ passed &= VerifyInt16TryParse("FF", 0, false);
+ passed &= VerifyInt16TryParse("27.3", 0, false);
+ passed &= VerifyInt16TryParse("23 5", 0, false);
+
+
+ /////////// TryParse(TryParse(String, NumberStyles, IFormatProvider, ref Int16)
+ //// Pass cases
+ passed &= VerifyInt16TryParse("5", NumberStyles.Integer, CultureInfo.InvariantCulture, 5, true);
+ passed &= VerifyInt16TryParse("-5", NumberStyles.Integer, CultureInfo.InvariantCulture, -5, true);
+ // Variations on NumberStyles
+ passed &= VerifyInt16TryParse("12", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0x12, true);
+ passed &= VerifyInt16TryParse("FF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFF, true);
+ passed &= VerifyInt16TryParse("fF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFF, true);
+ passed &= VerifyInt16TryParse("fFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, -1, true);
+ passed &= VerifyInt16TryParse(" 5", NumberStyles.AllowLeadingWhite, goodNFI, 5, true);
+ passed &= VerifyInt16TryParse("5", NumberStyles.Number, goodNFI, 5, true);
+ // Variations on IFP
+ passed &= VerifyInt16TryParse("5", NumberStyles.Integer, goodNFI, 5, true);
+ passed &= VerifyInt16TryParse("5", NumberStyles.Integer, null, 5, true);
+ passed &= VerifyInt16TryParse("5", NumberStyles.Integer, new DateTimeFormatInfo(), 5, true);
+ passed &= VerifyInt16TryParse("^42", NumberStyles.Any, customNFI, -42, true);
+ passed &= VerifyInt16TryParse("123", NumberStyles.Integer, germanCulture, 123, true);
+ passed &= VerifyInt16TryParse("123", NumberStyles.Integer, japaneseCulture, 123, true);
+ passed &= VerifyInt16TryParse("123,000", NumberStyles.AllowDecimalPoint, germanCulture, 123, true);
+ passed &= VerifyInt16TryParse("123.000", NumberStyles.AllowDecimalPoint, japaneseCulture, 123, true);
+ passed &= VerifyInt16TryParse("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 5, true); // currency
+
+ //// Fail cases
+ passed &= VerifyInt16TryParse("FF", NumberStyles.Integer, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifyInt16TryParse("1FFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifyInt16TryParse("FFFFFFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifyInt16TryParse("-42", NumberStyles.Any, customNFI, 0, false);
+ passed &= VerifyInt16TryParse("5.3", NumberStyles.AllowDecimalPoint, goodNFI, 0, false);
+ passed &= VerifyInt16TryParse("5 ", NumberStyles.AllowLeadingWhite, goodNFI, 0, false);
+ passed &= VerifyInt16TryParse("123.000", NumberStyles.Any, germanCulture, 0, false);
+ passed &= VerifyInt16TryParse("123,000", NumberStyles.Any, japaneseCulture, 0, false);
+ passed &= VerifyInt16TryParse("123,000", NumberStyles.Integer, germanCulture, 0, false);
+ passed &= VerifyInt16TryParse("123.000", NumberStyles.Integer, japaneseCulture, 0, false);
+ passed &= VerifyInt16TryParse("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Integer, germanCulture, 0, false); // currency
+
+ //// Exception cases
+ passed &= VerifyInt16TryParseException("5", NumberStyles.AllowHexSpecifier | NumberStyles.AllowParentheses, null, typeof(ArgumentException));
+ passed &= VerifyInt16TryParseException("4", (NumberStyles)(-1), CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyInt16TryParseException("4", (NumberStyles)0x10000, CultureInfo.InvariantCulture, typeof(ArgumentException));
+
+ // NumberStyles/NFI variations
+ //
+ passed &= VerifyInt16TryParse("5", NumberStyles.Integer, corruptNFI, 5, true);
+ passed &= VerifyInt16TryParse("5", NumberStyles.Number, corruptNFI, 5, true);
+ passed &= VerifyInt16TryParse("5.0", NumberStyles.Number, corruptNFI, 5, true);
+ passed &= VerifyInt16TryParse("5,0", NumberStyles.Number, corruptNFI, 0, false);
+ passed &= VerifyInt16TryParse("5.0.0", NumberStyles.Number, corruptNFI, 0, false);
+ passed &= VerifyInt16TryParse("$5.0", NumberStyles.Currency, corruptNFI, 5, true);
+ passed &= VerifyInt16TryParse("$5,0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyInt16TryParse("$5.0.0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyInt16TryParse("5.0", NumberStyles.Currency, corruptNFI, 5, true);
+ passed &= VerifyInt16TryParse("5,0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyInt16TryParse("5.0.0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyInt16TryParse("5.0", NumberStyles.Any, corruptNFI, 5, true);
+ passed &= VerifyInt16TryParse("5,0", NumberStyles.Any, corruptNFI, 0, false);
+ passed &= VerifyInt16TryParse("5.0.0", NumberStyles.Any, corruptNFI, 0, false);
+ //
+ passed &= VerifyInt16TryParse("5", NumberStyles.Integer, swappedNFI, 5, true);
+ passed &= VerifyInt16TryParse("1,234", NumberStyles.Integer, swappedNFI, 0, false);
+ passed &= VerifyInt16TryParse("5", NumberStyles.Number, swappedNFI, 5, true);
+ passed &= VerifyInt16TryParse("5.0", NumberStyles.Number, swappedNFI, 5, true);
+ passed &= VerifyInt16TryParse("1,234", NumberStyles.Number, swappedNFI, 1234, true);
+ passed &= VerifyInt16TryParse("1,234.0", NumberStyles.Number, swappedNFI, 1234, true);
+ passed &= VerifyInt16TryParse("5.000.000", NumberStyles.Number, swappedNFI, 0, false);
+ passed &= VerifyInt16TryParse("5.000,00", NumberStyles.Number, swappedNFI, 0, false);
+ passed &= VerifyInt16TryParse("5.000", NumberStyles.Currency, swappedNFI, 5, true); //???
+ passed &= VerifyInt16TryParse("5.000,00", NumberStyles.Currency, swappedNFI, 0, false); //???
+ passed &= VerifyInt16TryParse("$5.000", NumberStyles.Currency, swappedNFI, 5000, true);
+ passed &= VerifyInt16TryParse("$5.000,00", NumberStyles.Currency, swappedNFI, 5000, true);
+ passed &= VerifyInt16TryParse("5.000", NumberStyles.Any, swappedNFI, 5, true); //?
+ passed &= VerifyInt16TryParse("5.000,00", NumberStyles.Any, swappedNFI, 0, false); //?
+ passed &= VerifyInt16TryParse("$5.000", NumberStyles.Any, swappedNFI, 5000, true);
+ passed &= VerifyInt16TryParse("$5.000,00", NumberStyles.Any, swappedNFI, 5000, true);
+ passed &= VerifyInt16TryParse("5,0", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyInt16TryParse("$5,0", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyInt16TryParse("5,000", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyInt16TryParse("$5,000", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyInt16TryParse("5,000.0", NumberStyles.Currency, swappedNFI, 0, false);
+ passed &= VerifyInt16TryParse("$5,000.0", NumberStyles.Currency, swappedNFI, 0, false);
+ passed &= VerifyInt16TryParse("5,000", NumberStyles.Any, swappedNFI, 5, true);
+ passed &= VerifyInt16TryParse("$5,000", NumberStyles.Any, swappedNFI, 5, true);
+ passed &= VerifyInt16TryParse("5,000.0", NumberStyles.Any, swappedNFI, 0, false);
+ passed &= VerifyInt16TryParse("$5,000.0", NumberStyles.Any, swappedNFI, 0, false);
+ //
+ passed &= VerifyInt16TryParse("5.0", NumberStyles.Number, distinctNFI, 5, true);
+ passed &= VerifyInt16TryParse("1,234.0", NumberStyles.Number, distinctNFI, 1234, true);
+ passed &= VerifyInt16TryParse("5.0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyInt16TryParse("1,234.0", NumberStyles.Currency, distinctNFI, 1234, true);
+ passed &= VerifyInt16TryParse("5.0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyInt16TryParse("1,234.0", NumberStyles.Any, distinctNFI, 1234, true);
+ passed &= VerifyInt16TryParse("$5.0", NumberStyles.Currency, distinctNFI, 0, false);
+ passed &= VerifyInt16TryParse("$5.0", NumberStyles.Any, distinctNFI, 0, false);
+ passed &= VerifyInt16TryParse("5:0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyInt16TryParse("5;0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyInt16TryParse("$5:0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyInt16TryParse("5:0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyInt16TryParse("5:000", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyInt16TryParse("5;000", NumberStyles.Currency, distinctNFI, 5000, true);
+ passed &= VerifyInt16TryParse("$5:0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyInt16TryParse("$5;0", NumberStyles.Currency, distinctNFI, 50, true);
+ passed &= VerifyInt16TryParse("5:0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyInt16TryParse("5;0", NumberStyles.Any, distinctNFI, 50, true);
+ passed &= VerifyInt16TryParse("$5:0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyInt16TryParse("$5;0", NumberStyles.Any, distinctNFI, 50, true);
+ passed &= VerifyInt16TryParse("1,23;45.0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyInt16TryParse("1,23;45.0", NumberStyles.Currency, distinctNFI, 12345, true);
+ passed &= VerifyInt16TryParse("1,23;45.0", NumberStyles.Any, distinctNFI, 12345, true);
+ passed &= VerifyInt16TryParse("$1,23;45.0", NumberStyles.Any, distinctNFI, 0, false);
+
+
+ // Should these pass or fail? Current parse behavior is to pass, so they might be
+ // parse bugs, but they're not tryparse bugs.
+ passed &= VerifyInt16Parse("5", NumberStyles.Float, goodNFI, 5);
+ passed &= VerifyInt16TryParse("5", NumberStyles.Float, goodNFI, 5, true);
+ passed &= VerifyInt16Parse("5", NumberStyles.AllowDecimalPoint, goodNFI, 5);
+ passed &= VerifyInt16TryParse("5", NumberStyles.AllowDecimalPoint, goodNFI, 5, true);
+ // I expect ArgumentException with an ambiguous NFI
+ passed &= VerifyInt16Parse("^42", NumberStyles.Any, ambigNFI, -42);
+ passed &= VerifyInt16TryParse("^42", NumberStyles.Any, ambigNFI, -42, true);
+
+ /// END TEST CASES
+ }
+ catch (Exception e)
+ {
+ TestLibrary.Logging.WriteLine("Unexpected exception!! " + e.ToString());
+ passed = false;
+ }
+
+ if (passed)
+ {
+ TestLibrary.Logging.WriteLine("paSs");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.Logging.WriteLine("FAiL");
+ return 1;
+ }
+ }
+
+ public static bool VerifyInt16TryParse(string value, Int16 expectedResult, bool expectedReturn)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int16.TryParse, Value = '{0}', Expected Result = {1}, Expected Return = {2}",
+ value, expectedResult, expectedReturn);
+ }
+ Int16 result = 0;
+ try
+ {
+ bool returnValue = Int16.TryParse(value, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedReturn, returnValue);
+ return false;
+ }
+ if (result != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, result);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyInt16TryParse(string value, NumberStyles style, IFormatProvider provider, Int16 expectedResult, bool expectedReturn)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int16.TryParse, Value = '{0}', Style = {1}, Provider = {2}, Expected Result = {3}, Expected Return = {4}",
+ value, style, provider, expectedResult, expectedReturn);
+ }
+ Int16 result = 0;
+ try
+ {
+ bool returnValue = Int16.TryParse(value, style, provider, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Style = {1}, Provider = {2}, Expected Return = {3}, Actual Return = {4}",
+ value, style, provider, expectedReturn, returnValue);
+ return false;
+ }
+ if (result != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, result);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyInt16TryParseException(string value, NumberStyles style, IFormatProvider provider, Type exceptionType)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int16.TryParse, Value = '{0}', Style = {1}, Provider = {2}, Expected Exception = {3}",
+ value, style, provider, exceptionType);
+ }
+ try
+ {
+ Int16 result = 0;
+ Boolean returnValue = Int16.TryParse(value, style, provider, out result);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyInt16Parse(string value, Int16 expectedResult)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int16.Parse, Value = '{0}', Expected Result, {1}",
+ value, expectedResult);
+ }
+ try
+ {
+ Int16 returnValue = Int16.Parse(value);
+ if (returnValue != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, returnValue);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyInt16Parse(string value, NumberStyles style, IFormatProvider provider, Int16 expectedResult)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int16.Parse, Value = '{0}', Style = {1}, provider = {2}, Expected Result = {3}",
+ value, style, provider, expectedResult);
+ }
+ try
+ {
+ Int16 returnValue = Int16.Parse(value, style, provider);
+ if (returnValue != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, returnValue);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyInt16ParseException(string value, Type exceptionType)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int16.Parse, Value = '{0}', Expected Exception, {1}",
+ value, exceptionType);
+ }
+ try
+ {
+ Int16 returnValue = Int16.Parse(value);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyInt16ParseException(string value, NumberStyles style, Type exceptionType)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int16.Parse, Value = '{0}', Style = {1}, Expected Exception = {3}",
+ value, style, exceptionType);
+ }
+ try
+ {
+ Int16 returnValue = Int16.Parse(value, style);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyInt16ParseException(string value, NumberStyles style, IFormatProvider provider, Type exceptionType)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int16.Parse, Value = '{0}', Style = {1}, Provider = {2}, Expected Exception = {3}",
+ value, style, provider, exceptionType);
+ }
+ try
+ {
+ Int16 returnValue = Int16.Parse(value, style, provider);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64CompareTo1.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64CompareTo1.csproj
new file mode 100644
index 0000000000..e04d554fda
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64CompareTo1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64compareto1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64Equals1.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64Equals1.csproj
new file mode 100644
index 0000000000..8ff30e1fe5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64Equals1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64equals1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64Equals2.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64Equals2.csproj
new file mode 100644
index 0000000000..e1fd605000
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64Equals2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64equals2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64GetHashCode.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64GetHashCode.csproj
new file mode 100644
index 0000000000..24ce1f2644
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64GetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64gethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToBoolean.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToBoolean.csproj
new file mode 100644
index 0000000000..f2453d901d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToBoolean.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64iconvertibletoboolean.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToByte.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToByte.csproj
new file mode 100644
index 0000000000..1a25af457f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64iconvertibletobyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToChar.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToChar.csproj
new file mode 100644
index 0000000000..5fb7ba1c45
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToChar.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64iconvertibletochar.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToDateTime.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToDateTime.csproj
new file mode 100644
index 0000000000..538f05f701
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToDateTime.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64iconvertibletodatetime.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToDecimal.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToDecimal.csproj
new file mode 100644
index 0000000000..0fafb606c0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToDecimal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64iconvertibletodecimal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToDouble.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToDouble.csproj
new file mode 100644
index 0000000000..1c3f7e454c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToDouble.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64iconvertibletodouble.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToInt16.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToInt16.csproj
new file mode 100644
index 0000000000..2d0ae36988
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64iconvertibletoint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToInt32.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToInt32.csproj
new file mode 100644
index 0000000000..7f0e8619b8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64iconvertibletoint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToInt64.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToInt64.csproj
new file mode 100644
index 0000000000..3a27671f22
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64iconvertibletoint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToSByte.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToSByte.csproj
new file mode 100644
index 0000000000..9ce48b389f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToSByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64iconvertibletosbyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToSingle.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToSingle.csproj
new file mode 100644
index 0000000000..b541729436
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToSingle.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64iconvertibletosingle.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToType.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToType.csproj
new file mode 100644
index 0000000000..7a8ad0f206
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToType.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64iconvertibletotype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToUInt16.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToUInt16.csproj
new file mode 100644
index 0000000000..99e79bbdb2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToUInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64iconvertibletouint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToUInt32.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToUInt32.csproj
new file mode 100644
index 0000000000..179acb8d96
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToUInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64iconvertibletouint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToUInt64.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToUInt64.csproj
new file mode 100644
index 0000000000..ecb5286a53
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64IConvertibleToUInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64iconvertibletouint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64MaxValue.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64MaxValue.csproj
new file mode 100644
index 0000000000..d02dbb72d1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64MaxValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64maxvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64MinValue.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64MinValue.csproj
new file mode 100644
index 0000000000..fa0e24b908
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64MinValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64minvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64Parse1.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64Parse1.csproj
new file mode 100644
index 0000000000..cce9d0651f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64Parse1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64parse1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64Parse2.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64Parse2.csproj
new file mode 100644
index 0000000000..16bcd77491
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64Parse2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64parse2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64Parse3.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64Parse3.csproj
new file mode 100644
index 0000000000..e0aec68729
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64Parse3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64parse3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64ToString3.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64ToString3.csproj
new file mode 100644
index 0000000000..12f6e32670
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64ToString3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64tostring3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/Int64TryParse.csproj b/tests/src/CoreMangLib/cti/system/int64/Int64TryParse.csproj
new file mode 100644
index 0000000000..8356072b6f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/Int64TryParse.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="int64tryparse.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64compareto1.cs b/tests/src/CoreMangLib/cti/system/int64/int64compareto1.cs
new file mode 100644
index 0000000000..ab1f95e225
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64compareto1.cs
@@ -0,0 +1,131 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// System.Int64.CompareTo(Int64)
+/// </summary>
+public class Int64CompareTo1
+{
+ private long c_INT64_MaxValue_10 = 9223372036854775807;
+ public static int Main()
+ {
+ Int64CompareTo1 int64ct1 = new Int64CompareTo1();
+ TestLibrary.TestFramework.BeginTestCase("Int64CompareTo1");
+ if (int64ct1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: long Value is less than the instance");
+
+ try
+ {
+ long value = TestLibrary.Generator.GetInt64(-55);
+ long int64A = Int64.MinValue;
+ if (int64A.CompareTo(value) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: long Value is larger than the instance");
+
+ try
+ {
+ long value = TestLibrary.Generator.GetInt64(-55);
+ long int64A = Int64.MaxValue;
+ if (int64A.CompareTo(value) <= 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: long Value is equal the instance");
+ try
+ {
+ long value = c_INT64_MaxValue_10;
+ long int64A = Int64.MaxValue;
+ if (int64A.CompareTo(value) != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: long Value is not equal the instance");
+ try
+ {
+ long value = TestLibrary.Generator.GetInt64(-55);
+ long int64A1 = value + 1;
+ long int64A2 = value - 1;
+ if (int64A1.CompareTo(value) <= 0 || int64A2.CompareTo(value) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64equals1.cs b/tests/src/CoreMangLib/cti/system/int64/int64equals1.cs
new file mode 100644
index 0000000000..7d7dc3ac7e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64equals1.cs
@@ -0,0 +1,129 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// System.Int64.Equals(int64)
+/// </summary>
+public class Int64Equals1
+{
+ private long c_INT64_MaxValue_10 = 9223372036854775807;
+ private long c_INT64_MaxValue_16 = 0x7fffffffffffffff;
+ public static int Main()
+ {
+ Int64Equals1 int64equ1 = new Int64Equals1();
+ TestLibrary.TestFramework.BeginTestCase("Int64Equals1");
+ if (int64equ1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Verify Int64 MinValue equals to zero");
+
+ try
+ {
+ long minValue = Int64.MinValue;
+ long int64A = 0;
+ if (int64A.Equals(minValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Verify Int64 MaxValue decimal equals hexadecimal");
+
+ try
+ {
+ long maxValue = c_INT64_MaxValue_10;
+ long int64A = c_INT64_MaxValue_16;
+ if (!int64A.Equals(maxValue))
+ {
+ TestLibrary.TestFramework.LogError("003", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Verify Int64 +0 equals-0");
+
+ try
+ {
+ long maxValue = +0;
+ long int64A = -0;
+ if (!int64A.Equals(maxValue))
+ {
+ TestLibrary.TestFramework.LogError("005", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Verify Int64 minValue equals maxValue");
+
+ try
+ {
+ long int64A = Int64.MinValue;
+ long maxValue = Int64.MaxValue;
+ if (int64A.Equals(maxValue))
+ {
+ TestLibrary.TestFramework.LogError("007", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64equals2.cs b/tests/src/CoreMangLib/cti/system/int64/int64equals2.cs
new file mode 100644
index 0000000000..5f95cb54c1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64equals2.cs
@@ -0,0 +1,147 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// System.Int64.Equals(Object)
+/// </summary>
+public class Int64Equals2
+{
+ private long c_INT64_MaxValue_10 = 9223372036854775807;
+ private long c_INT64_MaxValue_16 = 0x7fffffffffffffff;
+ public static int Main()
+ {
+ Int64Equals2 int64equ2 = new Int64Equals2();
+ TestLibrary.TestFramework.BeginTestCase("Int64Equals2");
+ if (int64equ2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Verify Int64 MaxValue decimal equals hexadecimal");
+ try
+ {
+ long int64A = c_INT64_MaxValue_16;
+ object objValue = c_INT64_MaxValue_10;
+ if (!int64A.Equals(objValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Verify Int64 minValue equals maxValue");
+ try
+ {
+ long int64A = Int64.MinValue;
+ object objValue = Int64.MaxValue;
+ if (int64A.Equals(objValue))
+ {
+ TestLibrary.TestFramework.LogError("003", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Verify Int64 maxValue string format equals maxValue");
+ try
+ {
+ long int64A = Int64.MaxValue;
+ object objValue = Int64.MaxValue.ToString();
+ if (int64A.Equals(objValue))
+ {
+ TestLibrary.TestFramework.LogError("005", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Verify a random Int64 equals a new object");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ object objValue = new object();
+ if (int64A.Equals(objValue))
+ {
+ TestLibrary.TestFramework.LogError("007", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5:Verify a random Int64 equals null");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ object objValue = null;
+ if (int64A.Equals(objValue))
+ {
+ TestLibrary.TestFramework.LogError("009", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64gethashcode.cs b/tests/src/CoreMangLib/cti/system/int64/int64gethashcode.cs
new file mode 100644
index 0000000000..4bba66de03
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64gethashcode.cs
@@ -0,0 +1,175 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Int64.GetHashCode()
+/// </summary>
+public class Int64GetHashCode
+{
+ public static int Main()
+ {
+ Int64GetHashCode int64ghc = new Int64GetHashCode();
+ TestLibrary.TestFramework.BeginTestCase("Int64GetHashCode");
+ if (int64ghc.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the Int64'minValue hash code");
+ try
+ {
+ long int64A = Int64.MinValue;
+ Int32 hashCode = int64A.GetHashCode();
+ if (hashCode != Int32.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify the Int64'maxValue hash code");
+ try
+ {
+ long int64A = Int64.MaxValue;
+ Int32 hashCode = int64A.GetHashCode();
+ if (hashCode != Int32.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify the a random Int64 which is out of Int32.MaxValue or Int32.MinValue hash code");
+ try
+ {
+ Int32 temp = this.GetInt32(1, Int32.MaxValue);
+ long int64A = (long)(Int64.MaxValue - temp);
+ long int64A2 = (long)(Int64.MinValue + temp);
+ Int32 hashCode = int64A.GetHashCode();
+ Int32 hashCode2 = int64A2.GetHashCode();
+ if (hashCode != Int32.MinValue + temp|| hashCode2!= Int32.MinValue + temp)
+ {
+ TestLibrary.TestFramework.LogError("005", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify the Int64 which is in the Int32.MinValue and Int32.MaxValue hash code");
+ try
+ {
+ Int32 temp = this.GetInt32(0, Int32.MaxValue);
+ long int64A = temp;
+ long int64A2 = temp * (-1);
+ Int32 hashCode = int64A.GetHashCode();
+ Int32 hashCode2 = int64A2.GetHashCode();
+ if (hashCode != temp || hashCode2 != temp - 1)
+ {
+ TestLibrary.TestFramework.LogError("007", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify the Int64 which is equal the Int32.MinValue or Int32.MaxValue hash code");
+ try
+ {
+ long int64A = Int32.MaxValue;
+ long int64A2 = Int32.MinValue ;
+ Int32 hashCode = int64A.GetHashCode();
+ Int32 hashCode2 = int64A2.GetHashCode();
+ if (hashCode != Int32.MaxValue || hashCode2 != Int32.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("009", "The ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletoboolean.cs b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletoboolean.cs
new file mode 100644
index 0000000000..aa7645fad2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletoboolean.cs
@@ -0,0 +1,179 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Int64.System.IConvertible.ToBoolean(IFormatProvider)
+/// </summary>
+public class Int64IConvertibleToBoolean
+{
+ public static int Main()
+ {
+ Int64IConvertibleToBoolean ui64IContBool = new Int64IConvertibleToBoolean();
+ TestLibrary.TestFramework.BeginTestCase("Int64IConvertibleToBoolean");
+ if (ui64IContBool.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:The Int64 MaxValue IConvertible To Boolean");
+ try
+ {
+ long int64A = Int64.MaxValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ bool boolA = iConvert.ToBoolean(provider);
+ if (boolA!= true)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:The Int64 MinValue IConvertible To Boolean");
+ try
+ {
+ long int64A = Int64.MinValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ bool boolA = iConvert.ToBoolean(null);
+ if (boolA != true)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:The random Int64 IConvertible To Boolean 1");
+ try
+ {
+ long int64A = 0;
+ IConvertible iConvert = (IConvertible)(int64A);
+ bool boolA = iConvert.ToBoolean(null);
+ if (boolA != false)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:The random Int64 IConvertible To Boolean 2");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ IConvertible iConvert = (IConvertible)(int64A);
+ bool boolA = iConvert.ToBoolean(null);
+ if (int64A == 0)
+ {
+ if (boolA != false)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (boolA != true)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest5:The random Int64 IConvertible To Boolean 3");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55) * (-1);
+ IConvertible iConvert = (IConvertible)(int64A);
+ bool boolA = iConvert.ToBoolean(provider);
+ if (int64A == 0)
+ {
+ if (boolA != false)
+ {
+ TestLibrary.TestFramework.LogError("009", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (boolA != true)
+ {
+ TestLibrary.TestFramework.LogError("009", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletobyte.cs b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletobyte.cs
new file mode 100644
index 0000000000..45297f1a56
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletobyte.cs
@@ -0,0 +1,216 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Int64.System.IConvertible.ToByte(IFormatProvider)
+/// </summary>
+public class Int64IConvertibleToByte
+{
+ public static int Main()
+ {
+ Int64IConvertibleToByte ui64IContByte = new Int64IConvertibleToByte();
+ TestLibrary.TestFramework.BeginTestCase("Int64IConvertibleToByte");
+
+ if (ui64IContByte.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[NegTest]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:The Int64 value which is in the range of Byte IConvertible To Byte 1");
+ try
+ {
+ long int64A = (long)Byte.MaxValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ byte byteA = iConvert.ToByte(provider);
+ if (byteA != 255)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:The Int64 value which is in the range of Byte IConvertible To Byte 2");
+ try
+ {
+ long int64A = (long)Byte.MinValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ byte byteA = iConvert.ToByte(null);
+ if (byteA != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:The Int64 value which is in the range of Byte IConvertible To Byte 3");
+ try
+ {
+ long int64A = this.GetInt32(1, 255);
+ IConvertible iConvert = (IConvertible)(int64A);
+ byte byteA = iConvert.ToByte(provider);
+ if (byteA != (Byte)int64A)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The Int64 value which is out the range of Byte IConvertible To Byte 1");
+ try
+ {
+ long int64A = Int64.MaxValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ byte byteA = iConvert.ToByte(provider);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N001", "Int64 value out of the range of Byte but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:The Int64 value which is out the range of Byte IConvertible To Byte 2");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ if (int64A == 0)
+ {
+ int64A = (int64A + 1) * (-1);
+ }
+ else
+ {
+ int64A = int64A * (-1);
+ }
+ IConvertible iConvert = (IConvertible)(int64A);
+ byte byteA = iConvert.ToByte(provider);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N003", "Int64 value out of the range of Byte but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("NegTest3:The Int64 value which is out the range of Byte IConvertible To Byte 3");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ if (int64A <= 255)
+ {
+ int64A = int64A + 256;
+ }
+ IConvertible iConvert = (IConvertible)(int64A);
+ byte byteA = iConvert.ToByte(provider);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N005", "Int64 value out of the range of Byte but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletochar.cs b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletochar.cs
new file mode 100644
index 0000000000..6ca6817813
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletochar.cs
@@ -0,0 +1,217 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Int64.System.IConvertible.ToChar(IFormatProvider)
+/// </summary>
+public class Int64IConvertibleToChar
+{
+ public static int Main()
+ {
+ Int64IConvertibleToChar ui64IContChar = new Int64IConvertibleToChar();
+ TestLibrary.TestFramework.BeginTestCase("Int64IConvertibleToChar");
+
+ if (ui64IContChar.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[NegTest]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:The Int64 value which is in the range of Char IConvertible To Char 1");
+ try
+ {
+ long int64A = (long)Char.MaxValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ char charA = iConvert.ToChar(provider);
+ if (charA != Char.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:The Int64 value which is in the range of Char IConvertible To Char 2");
+ try
+ {
+ long int64A = (long)Char.MinValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ char charA = iConvert.ToChar(null);
+ if (charA != Char.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:The Int64 value which is in the range of Char IConvertible To Char 3");
+ try
+ {
+ long int64A = (long)this.GetInt32(1, 65535);
+ IConvertible iConvert = (IConvertible)(int64A);
+ char charA = iConvert.ToChar(provider);
+ if (charA != (char)(int64A))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The Int64 value which is out the range of Char IConvertible To Char 1");
+ try
+ {
+ long int64A = Int64.MaxValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ char charA = iConvert.ToChar(provider);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N001", "Int64 value out of the range of char but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:The Int64 value which is out the range of Char IConvertible To Char 2");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ if (int64A == 0)
+ {
+ int64A = (int64A + 1) * (-1);
+ }
+ else
+ {
+ int64A = int64A * (-1);
+ }
+ IConvertible iConvert = (IConvertible)(int64A);
+ char charA = iConvert.ToChar(provider);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N003", "Int64 value out of the range of char but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("NegTest3:The Int64 value which is out the range of Char IConvertible To Char 3");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ if (int64A <= 65535)
+ {
+ int64A = int64A + 65536;
+ }
+ IConvertible iConvert = (IConvertible)(int64A);
+ char charA = iConvert.ToChar(provider);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N005", "Int64 value out of the range of char but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletodatetime.cs b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletodatetime.cs
new file mode 100644
index 0000000000..16075a56ac
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletodatetime.cs
@@ -0,0 +1,123 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Int64.System.IConvertible.ToDateTime(IFormatProvider)
+/// </summary>
+public class Int64IConvertibleToDateTime
+{
+ public static int Main()
+ {
+ Int64IConvertibleToDateTime ui64IContDT = new Int64IConvertibleToDateTime();
+ TestLibrary.TestFramework.BeginTestCase("Int64IConvertibleToDateTime");
+
+ if (ui64IContDT.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[NegTest]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ return retVal;
+ }
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.DateTimeFormat;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The Int64 MaxValue IConvertible To DateTime");
+ try
+ {
+ long int64A = Int64.MaxValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ DateTime dtA = iConvert.ToDateTime(provider);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N001", "The InvalidCastException was not thrown as expected");
+ }
+ catch (InvalidCastException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:The Int64 MinValue IConvertible To DateTime");
+ try
+ {
+ long int64A = Int64.MinValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ DateTime dtA = iConvert.ToDateTime(null);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N003", "The InvalidCastException was not thrown as expected");
+ }
+ catch (InvalidCastException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3:The random Int64 IConvertible To DateTime");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ IConvertible iConvert = (IConvertible)(int64A);
+ DateTime dtA = iConvert.ToDateTime(null);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N005", "The InvalidCastException was not thrown as expected");
+ }
+ catch (InvalidCastException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4:The Int64 zero IConvertible To DateTime");
+ try
+ {
+ long int64A = 0;
+ IConvertible iConvert = (IConvertible)(int64A);
+ DateTime dtA = iConvert.ToDateTime(null);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N007", "The InvalidCastException was not thrown as expected");
+ }
+ catch (InvalidCastException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletodecimal.cs b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletodecimal.cs
new file mode 100644
index 0000000000..9fa73a8cd5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletodecimal.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Int64.System.IConvertible.ToDecimal(IFormatProvider)
+/// </summary>
+public class Int64IConvertibleToDecimal
+{
+ public static int Main()
+ {
+ Int64IConvertibleToDecimal ui64IContDecimal = new Int64IConvertibleToDecimal();
+ TestLibrary.TestFramework.BeginTestCase("Int64IConvertibleToDecimal");
+ if (ui64IContDecimal.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:The Int64 MaxValue IConvertible To Decimal");
+ try
+ {
+ long int64A = Int64.MaxValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ decimal decimalA = iConvert.ToDecimal(provider);
+ if (decimalA != int64A)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:The Int64 MinValue IConvertible To Decimal");
+ try
+ {
+ long int64A = Int64.MinValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ decimal decimalA = iConvert.ToDecimal(null);
+ if (decimalA != int64A)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:The random Int64 IConvertible To Decimal 1");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ IConvertible iConvert = (IConvertible)(int64A);
+ decimal decimalA = iConvert.ToDecimal(provider);
+ if (decimalA != int64A)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:The random Int64 IConvertible To Decimal 2");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ IConvertible iConvert = (IConvertible)(int64A);
+ decimal decimalA = iConvert.ToDecimal(null);
+ if (decimalA != int64A)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletodouble.cs b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletodouble.cs
new file mode 100644
index 0000000000..321a2d5205
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletodouble.cs
@@ -0,0 +1,157 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Int64.System.IConvertible.ToDouble(IFormatProvider)
+/// </summary>
+public class Int64IConvertibleToDouble
+{
+ public static int Main()
+ {
+ Int64IConvertibleToDouble ui64IContDouble = new Int64IConvertibleToDouble();
+ TestLibrary.TestFramework.BeginTestCase("Int64IConvertibleToDouble");
+ if (ui64IContDouble.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:The Int64 MaxValue IConvertible To Double");
+ try
+ {
+ long int64A = Int64.MaxValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ double doubleA = iConvert.ToDouble(provider);
+ if (doubleA != 9.2233720368547758E+18)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:The Int64 MinValue IConvertible To Double");
+ try
+ {
+ long int64A = Int64.MinValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ double doubleA = iConvert.ToDouble(provider);
+ if (doubleA != -9.2233720368547758E+18)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:The random Int64 IConvertible To Double 1");
+ try
+ {
+ long int64A = 0;
+ IConvertible iConvert = (IConvertible)(int64A);
+ double doubleA = iConvert.ToDouble(null);
+ if (doubleA != 0.0)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:The random Int64 IConvertible To Double 2");
+ try
+ {
+ long int64A = 123456789;
+ IConvertible iConvert = (IConvertible)(int64A);
+ double doubleA = iConvert.ToDouble(provider);
+ if (doubleA != 123456789.0)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5:The random Int64 IConvertible To Double 3");
+ try
+ {
+ long int64A = -123456789;
+ IConvertible iConvert = (IConvertible)(int64A);
+ double doubleA = iConvert.ToDouble(null);
+ if (doubleA != -123456789.0)
+ {
+ TestLibrary.TestFramework.LogError("009", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletoint16.cs b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletoint16.cs
new file mode 100644
index 0000000000..228ab7e878
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletoint16.cs
@@ -0,0 +1,201 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Int64.System.IConvertible.ToInt16()
+/// </summary>
+public class Int64IConvertibleToInt16
+{
+ public static int Main()
+ {
+ Int64IConvertibleToInt16 ui64IContInt16 = new Int64IConvertibleToInt16();
+ TestLibrary.TestFramework.BeginTestCase("Int64IConvertibleToInt16");
+ if (ui64IContInt16.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[NegTest]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:The Int64 value which in the range of Int16 IConvertible To Int16 1");
+ try
+ {
+ long int64A = Int16.MaxValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ short int16A = iConvert.ToInt16(provider);
+ if (int16A != int64A)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:The Int64 value which in the range of Int16 IConvertible To Int16 2");
+ try
+ {
+ long int64A = Int16.MinValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ short int16A = iConvert.ToInt16(provider);
+ if (int16A != int64A)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:The Int64 value which in the range of Int16 IConvertible To Int16 3");
+ try
+ {
+ long int64A = this.GetInt32(0, Int16.MaxValue);
+ IConvertible iConvert = (IConvertible)(int64A);
+ short int16A = iConvert.ToInt16(null);
+ if (int16A != int64A)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:The Int64 value which in the range of Int16 IConvertible To Int16 4");
+ try
+ {
+ long int64A = (this.GetInt32(0, Int16.MaxValue) + 1) * (-1);
+ IConvertible iConvert = (IConvertible)(int64A);
+ short int16A = iConvert.ToInt16(null);
+ if (int16A != int64A)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The current Int64 value is out of Int16 range 1");
+ try
+ {
+ long int64A = (long)Int16.MaxValue + (long)(this.GetInt32(1, Int16.MaxValue));
+ IConvertible iConvert = (IConvertible)(int64A);
+ short int16A = iConvert.ToInt16(provider);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N001", "The current Int64 value is out of Int16 range but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The current Int64 value is out of Int16 range 2");
+ try
+ {
+ long int64A = (long)Int16.MinValue + (long)(this.GetInt32(1, Int16.MaxValue) + 1) * (-1);
+ IConvertible iConvert = (IConvertible)(int64A);
+ short int16A = iConvert.ToInt16(null);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N003", "The current Int64 value is out of Int16 range but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletoint32.cs b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletoint32.cs
new file mode 100644
index 0000000000..5f6db3aef4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletoint32.cs
@@ -0,0 +1,201 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Int64.System.IConvertible.ToInt32()
+/// </summary>
+public class Int64IConvertibleToInt32
+{
+ public static int Main()
+ {
+ Int64IConvertibleToInt32 ui64IContInt32 = new Int64IConvertibleToInt32();
+ TestLibrary.TestFramework.BeginTestCase("Int64IConvertibleToInt32");
+ if (ui64IContInt32.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[NegTest]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:The Int64 value which in the range of Int32 IConvertible To Int32 1");
+ try
+ {
+ long int64A = Int32.MaxValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ int int32A = iConvert.ToInt32(provider);
+ if (int32A != int64A)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:The Int64 value which in the range of Int32 IConvertible To Int32 2");
+ try
+ {
+ long int64A = Int32.MinValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ int int32A = iConvert.ToInt32(provider);
+ if (int32A != int64A)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:The Int64 value which in the range of Int32 IConvertible To Int32 3");
+ try
+ {
+ long int64A = this.GetInt32(0, Int32.MaxValue);
+ IConvertible iConvert = (IConvertible)(int64A);
+ int int32A = iConvert.ToInt32(null);
+ if (int32A != int64A)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:The Int64 value which in the range of Int32 IConvertible To Int32 4");
+ try
+ {
+ long int64A = (this.GetInt32(0, Int32.MaxValue) + 1) * (-1);
+ IConvertible iConvert = (IConvertible)(int64A);
+ int int32A = iConvert.ToInt32(null);
+ if (int32A != int64A)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The current Int64 value is out of Int32 range 1");
+ try
+ {
+ long int64A = (long)Int32.MaxValue + (long)this.GetInt32(1, Int32.MaxValue);
+ IConvertible iConvert = (IConvertible)(int64A);
+ int int32A = iConvert.ToInt32(provider);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N001", "The current Int64 value is out of Int32 range but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The current Int64 value is out of Int32 range 2");
+ try
+ {
+ long int64A = (long)Int32.MinValue + (long)(this.GetInt32(0, Int32.MaxValue) + 1) * (-1);
+ IConvertible iConvert = (IConvertible)(int64A);
+ int int32A = iConvert.ToInt32(null);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N003", "The current Int64 value is out of Int32 range but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletoint64.cs b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletoint64.cs
new file mode 100644
index 0000000000..b89ac8c222
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletoint64.cs
@@ -0,0 +1,109 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Int64.System.IConvertible.ToInt64()
+/// </summary>
+public class Int64IConvertibleToInt64
+{
+ public static int Main()
+ {
+ Int64IConvertibleToInt64 ui64IContInt64 = new Int64IConvertibleToInt64();
+ TestLibrary.TestFramework.BeginTestCase("Int64IConvertibleToInt64");
+ if (ui64IContInt64.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Int64 MaxValue IConvertible To Int64");
+ try
+ {
+ long int64A = Int64.MaxValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ long int64B = iConvert.ToInt64(provider);
+ if (int64B != int64A)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Int64 MinValue IConvertible To Int64");
+ try
+ {
+ long int64A = Int64.MinValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ long int64B = iConvert.ToInt64(provider);
+ if (int64B != int64A)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Random Int64 IConvertible To Int64");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ IConvertible iConvert = (IConvertible)(int64A);
+ long int64B = iConvert.ToInt64(null);
+ if (int64B != int64A)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletosbyte.cs b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletosbyte.cs
new file mode 100644
index 0000000000..73a5993000
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletosbyte.cs
@@ -0,0 +1,238 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Int64.System.IConvertible.ToSByte(IFormatProvider)
+/// </summary>
+public class Int64IConvertibleToSByte
+{
+ public static int Main()
+ {
+ Int64IConvertibleToSByte ui64IContSByte = new Int64IConvertibleToSByte();
+ TestLibrary.TestFramework.BeginTestCase("Int64IConvertibleToSByte");
+ if (ui64IContSByte.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[NegTest]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:The Int64 value which is in the range of SByte IConvertible To SByte 1");
+ try
+ {
+ long int64A = (long)SByte.MaxValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ sbyte sbyteA = iConvert.ToSByte(provider);
+ if (sbyteA != 127)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:The Int64 value which is in the range of SByte IConvertible To SByte 2");
+ try
+ {
+ long int64A = (long)SByte.MinValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ sbyte sbyteA = iConvert.ToSByte(null);
+ if (sbyteA != (SByte)int64A)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:The Int64 value which is in the range of SByte IConvertible To SByte 3");
+ try
+ {
+ long int64A = this.GetInt32(0, 127);
+ IConvertible iConvert = (IConvertible)(int64A);
+ sbyte sbyteA = iConvert.ToSByte(provider);
+ if (sbyteA != (SByte)int64A)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:The Int64 value which is in the range of SByte IConvertible To SByte 4");
+ try
+ {
+ long int64A = this.GetInt32(1, 129) * (-1);
+ IConvertible iConvert = (IConvertible)(int64A);
+ sbyte sbyteA = iConvert.ToSByte(null);
+ if (sbyteA != (SByte)int64A)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The Int64 value which is out the range of SByte IConvertible To SByte 1");
+ try
+ {
+ long int64A = Int64.MaxValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ sbyte sbyteA = iConvert.ToSByte(provider);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N001", "Int64 value out of the range of SByte but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:The Int64 value which is out the range of SByte IConvertible To SByte 2");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ if (int64A <= 127)
+ {
+ int64A = int64A + 127;
+ }
+ IConvertible iConvert = (IConvertible)(int64A);
+ sbyte sbyteA = iConvert.ToSByte(provider);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N004", "Int64 value out of the range of Byte but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("NegTest3:The Int64 value which is out the range of Byte IConvertible To Byte 3");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ if (int64A <=128)
+ {
+ int64A = (int64A + 129) * (-1);
+ }
+ else
+ {
+ int64A = int64A * (-1);
+ }
+ IConvertible iConvert = (IConvertible)(int64A);
+ sbyte sbyteA = iConvert.ToSByte(provider);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N003", "Int64 value out of the range of Byte but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletosingle.cs b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletosingle.cs
new file mode 100644
index 0000000000..f1a4f1f519
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletosingle.cs
@@ -0,0 +1,107 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Int64.System.IConvertible.ToSingle(IFormatProvider)
+/// </summary>
+public class Int64IConvertibleToSingle
+{
+ public static int Main()
+ {
+ Int64IConvertibleToSingle i64ictsingle = new Int64IConvertibleToSingle();
+ TestLibrary.TestFramework.BeginTestCase("Int64IConvertibleToSingle");
+ if (i64ictsingle.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:The Int64 MaxValue IConvertible To Single");
+ try
+ {
+ long int64A = Int64.MaxValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ Single singleA = iConvert.ToSingle(provider);
+ if (singleA != (Single)int64A)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:The Int64 MinValue IConvertible To Single");
+ try
+ {
+ long int64A = Int64.MinValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ Single singleA = iConvert.ToSingle(null);
+ if (singleA != (Single)int64A)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:The random Int64 IConvertible To Single");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ IConvertible iConvert = (IConvertible)(int64A);
+ Single singleA = iConvert.ToSingle(null);
+ if (singleA != (Single)int64A)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletotype.cs b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletotype.cs
new file mode 100644
index 0000000000..09243bee49
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletotype.cs
@@ -0,0 +1,390 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Int64.System.IConvertible.ToType(IFormatProvider)
+/// </summary>
+public class Int64IConvertibleToType
+{
+ private long c_INT64_MaxValue = 9223372036854775807;
+ private long c_INT64_MinValue = -9223372036854775808;
+ public static int Main()
+ {
+ Int64IConvertibleToType ui64IContType = new Int64IConvertibleToType();
+ TestLibrary.TestFramework.BeginTestCase("Int64IConvertibleToType");
+
+ if (ui64IContType.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+ TestLibrary.TestFramework.LogInformation("[NegTest]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:The Int64 MinValue IConvertible to Type 1");
+ try
+ {
+ long int64A = Int64.MinValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ object objA = iConvert.ToType(typeof(Int64),provider);
+ if ((long)objA != c_INT64_MinValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:The Int64 MinValue IConvertible to Type 2");
+ try
+ {
+ long int64A = Int64.MinValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ object objA = iConvert.ToType(typeof(double), null);
+ if ((Double)objA != (Double)(int64A))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:The Int64 MinValue IConvertible to Type 3");
+ try
+ {
+ long int64A = Int64.MinValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ object objA = iConvert.ToType(typeof(decimal), provider);
+ if ((Decimal)objA != int64A)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:The Int64 MinValue IConvertible to Type 4");
+ try
+ {
+ long int64A = Int64.MinValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ object objA = iConvert.ToType(typeof(Single), provider);
+ if ((Single)objA != (Single)(int64A))
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5:The Int64 MinValue IConvertible to Type 5");
+ try
+ {
+ long int64A = Int64.MinValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ object objA = iConvert.ToType(typeof(string), null);
+ if ((string)objA != int64A.ToString())
+ {
+ TestLibrary.TestFramework.LogError("009", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest6:The Int64 MaxValue IConvertible to Type 1");
+ try
+ {
+ long int64A = Int64.MaxValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ object objA = iConvert.ToType(typeof(Int64), provider);
+ if ((long)objA != c_INT64_MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("011", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest7:The Int64 MaxValue IConvertible to Type 2");
+ try
+ {
+ long int64A = Int64.MaxValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ object objA = iConvert.ToType(typeof(UInt64), null);
+ if ((ulong)objA != (ulong)int64A)
+ {
+ TestLibrary.TestFramework.LogError("013", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest8:The random Int64 IConvertible to Type 1");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ IConvertible iConvert = (IConvertible)(int64A);
+ object objA = iConvert.ToType(typeof(Int64), null);
+ if ((long)objA != int64A)
+ {
+ TestLibrary.TestFramework.LogError("015", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest9()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest9:The random Int64 IConvertible to Type 2");
+ try
+ {
+ long int64A = (long)this.GetInt32(0, Int32.MaxValue);
+ IConvertible iConvert = (IConvertible)(int64A);
+ object objA = iConvert.ToType(typeof(Int32), null);
+ if ((Int32)objA != (Int32)int64A)
+ {
+ TestLibrary.TestFramework.LogError("017", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest10()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest10:The random Int64 IConvertible to Type 3");
+ try
+ {
+ long int64A = (long)this.GetInt32(0, Int16.MaxValue);
+ IConvertible iConvert = (IConvertible)(int64A);
+ object objA = iConvert.ToType(typeof(Int16), null);
+ if ((Int16)objA != (Int16)int64A)
+ {
+ TestLibrary.TestFramework.LogError("019", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest11()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest11:The random Int64 IConvertible to Type 4");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ IConvertible iConvert = (IConvertible)(int64A);
+ object objA = iConvert.ToType(typeof(string), null);
+ if ((string)objA != int64A.ToString())
+ {
+ TestLibrary.TestFramework.LogError("021", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("022", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The current Int64 out of the range of Type which IConverted to 1");
+ try
+ {
+ long int64A = Int64.MinValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ object objA = iConvert.ToType(typeof(Int32), provider);
+ TestLibrary.TestFramework.LogError("N001", "The current Int64 out of the range of Type which IConverted to but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:The current Int64 out of the range of Type which IConverted to 2");
+ try
+ {
+ long int64A = Int64.MaxValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ object objA = iConvert.ToType(typeof(Int32), null);
+ TestLibrary.TestFramework.LogError("N003", "The current Int64 out of the range of Type which IConverted to but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3:The current Int64 can not IConvertibleTo the Type");
+ try
+ {
+ long int64A = Int64.MaxValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ object objA = iConvert.ToType(typeof(DateTime), null);
+ TestLibrary.TestFramework.LogError("N005", "The current Int64 can not IConvertibleTo the Type but not throw exception");
+ retVal = false;
+ }
+ catch (InvalidCastException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletouint16.cs b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletouint16.cs
new file mode 100644
index 0000000000..ebbbc6e9d6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletouint16.cs
@@ -0,0 +1,178 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Int64.System.IConvertible.ToUInt16()
+/// </summary>
+public class Int64IConvertibleToUInt16
+{
+ public static int Main()
+ {
+ Int64IConvertibleToUInt16 ui64IContUInt16 = new Int64IConvertibleToUInt16();
+ TestLibrary.TestFramework.BeginTestCase("Int64IConvertibleToUInt16");
+ if (ui64IContUInt16.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[NegTest]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:The Int64 value which in the range of UInt16 IConvertible To UInt16 1");
+ try
+ {
+ long int64A = UInt16.MaxValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ ushort uint16A = iConvert.ToUInt16(provider);
+ if (uint16A != int64A)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:The Int64 value which in the range of UInt16 IConvertible To UInt16 2");
+ try
+ {
+ long int64A = this.GetInt32(0,UInt16.MaxValue);
+ IConvertible iConvert = (IConvertible)(int64A);
+ ushort uint16A = iConvert.ToUInt16(provider);
+ if (uint16A != int64A)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:The Int64 value which in the range of UInt16 IConvertible To UInt16 3");
+ try
+ {
+ long int64A = this.GetInt32(0, UInt16.MaxValue);
+ IConvertible iConvert = (IConvertible)(int64A);
+ ushort uint16A = iConvert.ToUInt16(null);
+ if (uint16A != int64A)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The current Int64 value is out of UInt16 range 1");
+ try
+ {
+ long int64A = UInt16.MaxValue + this.GetInt32(1, Int32.MaxValue);
+ IConvertible iConvert = (IConvertible)(int64A);
+ ushort uint16A = iConvert.ToUInt16(provider);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N001", "The current Int64 value is out of UInt16 range but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The current Int64 value is out of UInt16 range 2");
+ try
+ {
+ long int64A = (this.GetInt32(0, Int32.MaxValue) + 1) * (-1);
+ IConvertible iConvert = (IConvertible)(int64A);
+ ushort uint16A = iConvert.ToUInt16(null);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N003", "The current Int64 value is out of UInt16 range but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletouint32.cs b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletouint32.cs
new file mode 100644
index 0000000000..db9c8d9405
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletouint32.cs
@@ -0,0 +1,178 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Int64.System.IConvertible.ToUInt32()
+/// </summary>
+public class Int64IConvertibleToUInt32
+{
+ public static int Main()
+ {
+ Int64IConvertibleToUInt32 ui64IContUInt32 = new Int64IConvertibleToUInt32();
+ TestLibrary.TestFramework.BeginTestCase("Int64IConvertibleToUInt32");
+ if (ui64IContUInt32.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[NegTest]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:The Int64 value which in the range of UInt32 IConvertible To UInt32 1");
+ try
+ {
+ long int64A = UInt32.MaxValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ uint uint32A = iConvert.ToUInt32(provider);
+ if (uint32A != int64A)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:The Int64 value which in the range of UInt32 IConvertible To UInt32 2");
+ try
+ {
+ long int64A = this.GetInt32(0, Int32.MaxValue);
+ IConvertible iConvert = (IConvertible)(int64A);
+ uint uint32A = iConvert.ToUInt32(provider);
+ if (uint32A != int64A)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:The Int64 value which in the range of UInt32 IConvertible To UInt32 3");
+ try
+ {
+ long int64A = this.GetInt32(0, Int32.MaxValue);
+ IConvertible iConvert = (IConvertible)(int64A);
+ uint uint32A = iConvert.ToUInt32(null);
+ if (uint32A != int64A)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The current Int64 value is out of UInt32 range 1");
+ try
+ {
+ long int64A = UInt32.MaxValue + this.GetInt32(1, Int32.MaxValue);
+ IConvertible iConvert = (IConvertible)(int64A);
+ uint uint32A = iConvert.ToUInt32(provider);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N001", "The current Int64 value is out of UInt32 range but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The current Int64 value is out of UInt32 range 2");
+ try
+ {
+ long int64A = (this.GetInt32(0,Int32.MaxValue) + 1) * (-1);
+ IConvertible iConvert = (IConvertible)(int64A);
+ uint uint32A = iConvert.ToUInt32(null);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N003", "The current Int64 value is out of UInt32 range but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletouint64.cs b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletouint64.cs
new file mode 100644
index 0000000000..f13648ea1c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64iconvertibletouint64.cs
@@ -0,0 +1,158 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Int64.System.IConvertible.ToUInt64()
+/// </summary>
+public class Int64IConvertibleToUInt64
+{
+ public static int Main()
+ {
+ Int64IConvertibleToUInt64 ui64IContUInt64 = new Int64IConvertibleToUInt64();
+ TestLibrary.TestFramework.BeginTestCase("Int64IConvertibleToUInt64");
+ if (ui64IContUInt64.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[NegTest]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Int64 MaxValue IConvertible To UInt64");
+ try
+ {
+ long int64A = Int64.MaxValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ ulong uint64A = iConvert.ToUInt64(provider);
+ if ((long)uint64A != int64A)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Random Int64 IConvertible To UInt64 1");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ IConvertible iConvert = (IConvertible)(int64A);
+ ulong uint64A = iConvert.ToUInt64(provider);
+ if ((long)uint64A != int64A)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Random Int64 IConvertible To UInt64 2");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ IConvertible iConvert = (IConvertible)(int64A);
+ ulong uint64A = iConvert.ToUInt64(provider);
+ if ((long)uint64A != int64A)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The current Int64 value is out of UInt64 range 1");
+ try
+ {
+ long int64A = Int64.MinValue;
+ IConvertible iConvert = (IConvertible)(int64A);
+ ulong uint64 = iConvert.ToUInt64(provider);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N001", "The current Int64 value is out of UInt64 range but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The current Int64 value is out of UInt64 range 2");
+ try
+ {
+ long int64A = (TestLibrary.Generator.GetInt64(-55) + 1) * (-1);
+ IConvertible iConvert = (IConvertible)(int64A);
+ ulong uint64 = iConvert.ToUInt64(null);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N003", "The current Int64 value is out of UInt64 range but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64maxvalue.cs b/tests/src/CoreMangLib/cti/system/int64/int64maxvalue.cs
new file mode 100644
index 0000000000..d04bbf731b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64maxvalue.cs
@@ -0,0 +1,81 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// System.Int64.MaxValue
+/// </summary>
+public class Int64MaxValue
+{
+ private long c_INT64_MaxValue_10 = 9223372036854775807;
+ private long c_INT64_MaxValue_16 = 0x7fffffffffffffff;
+ public static int Main()
+ {
+ Int64MaxValue int64Max = new Int64MaxValue();
+
+ TestLibrary.TestFramework.BeginTestCase("Int64MaxValue");
+
+ if (int64Max.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Int64.MaxValue should return the Int64' maxValue 1");
+ try
+ {
+ Int64 int64A = Int64.MaxValue;
+ if (int64A != c_INT64_MaxValue_10)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Int64.MaxValue should return the Int64' maxValue 2");
+ try
+ {
+ Int64 int64A = Int64.MaxValue;
+ if (int64A != c_INT64_MaxValue_16)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64minvalue.cs b/tests/src/CoreMangLib/cti/system/int64/int64minvalue.cs
new file mode 100644
index 0000000000..dc4e6ec66d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64minvalue.cs
@@ -0,0 +1,82 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// System.Int64.MinValue
+/// </summary>
+public class Int64MinValue
+{
+ private long c_INT64_MinValue_10 = -9223372036854775808;
+ //private long c_INT64_MinValue_16 = 0x8000000000000000;
+ public static int Main()
+ {
+ Int64MinValue int64Min = new Int64MinValue();
+
+ TestLibrary.TestFramework.BeginTestCase("Int64MinValue");
+
+ if (int64Min.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ //retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Int64.MinValue should return the Int64' minValue 1");
+ try
+ {
+ Int64 int64A = Int64.MinValue;
+ if (int64A != c_INT64_MinValue_10)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+
+ }
+ //public bool PosTest2()
+ //{
+ // bool retVal = true;
+ // TestLibrary.TestFramework.BeginScenario("PosTest1: Int64.MinValue should return the Int64' minValue 2");
+ // try
+ // {
+ // Int64 int64A = Int64.MinValue;
+ // if (int64A != c_INT64_MinValue_16)
+ // {
+ // TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ // retVal = false;
+ // }
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ // retVal = false;
+ // }
+ // return retVal;
+ //}
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64parse1.cs b/tests/src/CoreMangLib/cti/system/int64/int64parse1.cs
new file mode 100644
index 0000000000..3b27436a44
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64parse1.cs
@@ -0,0 +1,341 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Int64.Parse(string)
+/// </summary>
+public class Int64Parse1
+{
+ private long c_INT64_MinValue = -9223372036854775808;
+ private long c_INT64_MaxValue = 9223372036854775807;
+ public static int Main()
+ {
+ Int64Parse1 int64parse1 = new Int64Parse1();
+ TestLibrary.TestFramework.BeginTestCase("Int64Parse1");
+ if (int64parse1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ TestLibrary.TestFramework.LogInformation("[NegTest]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: the string corresponding Int64 is Int64 MinValue");
+
+ try
+ {
+ string strA = Int64.MinValue.ToString();
+ long int64A = Int64.Parse(strA);
+ if (int64A != c_INT64_MinValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Int64 int64A;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: the string corresponding Int64 is Int64 MaxValue ");
+
+ try
+ {
+ string strA = Int64.MaxValue.ToString();
+ int64A = Int64.Parse(strA);
+ if (int64A != c_INT64_MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: the string corresponding Int64 is normal Int64 ");
+
+ try
+ {
+ long intTest = TestLibrary.Generator.GetInt64(-55);
+ string strA = intTest.ToString();
+ long int64A= Int64.Parse(strA);
+ if (int64A != intTest)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: the string format is [ws][sign]digits[ws] 1");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ string strA = "+" + int64A.ToString();
+ long result = Int64.Parse(strA);
+ if (result != int64A)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: the string format is [ws][sign]digits[ws] 2");
+
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ string strA = "-" + int64A.ToString();
+ long result = Int64.Parse(strA);
+ long int64B = int64A * (-1);
+ if (result != int64B)
+ {
+ TestLibrary.TestFramework.LogError("009", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: the string format is [ws][sign]digits[ws] 3");
+
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ string strA = "\u0020"+ "-" + int64A.ToString();
+ long result = Int64.Parse(strA);
+ long int64B = int64A * (-1);
+ if (result != int64B)
+ {
+ TestLibrary.TestFramework.LogError("011", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: the string format is [ws][sign]digits[ws] 4");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ string strA = "\u0020" + "-" + int64A.ToString() + "\u0020";
+ long result = Int64.Parse(strA);
+ long int64B = int64A * (-1);
+ if (result != int64B)
+ {
+ TestLibrary.TestFramework.LogError("013", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest8: the string formed by acceptable charactors");
+ try
+ {
+ long int64A = 0xabcdefabcdeffff;
+ string strA = "\u0020" + "-" + int64A.ToString() + "\u0020";
+ long result = Int64.Parse(strA);
+ long int64B = int64A * (-1);
+ if (result != int64B)
+ {
+ TestLibrary.TestFramework.LogError("013", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ long int64A;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the parameter string is null");
+
+ try
+ {
+ string strA = null;
+ int64A = Int64.Parse(strA);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N001", "the param string is null but not throw exception");
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ long int64A;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the parameter string is not correct format");
+
+ try
+ {
+ string strA = "#$%abc";
+ int64A = Int64.Parse(strA);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N003", "the param string is null but not throw exception");
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: the parameter string parsed number is less than the Int64 minValue");
+
+ try
+ {
+ string strA = "-9223372036854775809";
+ Int64 int64A = Int64.Parse(strA);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N005", "the param string parsed number is less than MinValue but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ long int64A;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: the parameter string parsed number is greater than the Int64 maxValue");
+
+ try
+ {
+ string strA = "9223372036854775808";
+ int64A = Int64.Parse(strA);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N007", "the param string parsed number is greater than MaxValue but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64parse2.cs b/tests/src/CoreMangLib/cti/system/int64/int64parse2.cs
new file mode 100644
index 0000000000..c20c71c129
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64parse2.cs
@@ -0,0 +1,326 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Int64.Parse(string,NumberStyles)
+/// </summary>
+public class Int64Parse2
+{
+ private long c_INT64_MinValue = -9223372036854775808;
+ private long c_INT64_MaxValue = 9223372036854775807;
+ public static int Main()
+ {
+ Int64Parse2 int64parse2 = new Int64Parse2();
+ TestLibrary.TestFramework.BeginTestCase("Int64Parse2");
+ if (int64parse2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ TestLibrary.TestFramework.LogInformation("[NegTest]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: the string corresponding Int64 is Int64 MaxValue 1");
+ try
+ {
+ string strA = Int64.MaxValue.ToString();
+ NumberStyles style = NumberStyles.Any;
+ long int64A = Int64.Parse(strA, style);
+ if (int64A != c_INT64_MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: the string corresponding Int64 is Int64 MaxValue 2");
+ try
+ {
+ string strA = "7fffffffffffffff";
+ NumberStyles style = NumberStyles.HexNumber;
+ long int64A = Int64.Parse(strA, style);
+ if (int64A != c_INT64_MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: the string corresponding Int64 is Int64 MinValue");
+ try
+ {
+ string strA = Int64.MinValue.ToString();
+ NumberStyles style = NumberStyles.Any;
+ long int64A = Int64.Parse(strA, style);
+ if (int64A != c_INT64_MinValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: the string format is [ws][sign]digits[ws] 1");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ string strA = "\u0020" + "+" + int64A.ToString();
+ NumberStyles style = NumberStyles.Any;
+ long result = Int64.Parse(strA, style);
+ if (result != int64A)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: the string format is [ws][sign]digits[ws] 2");
+
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ string strA = "\u0020" + "-" + int64A.ToString();
+ NumberStyles style = NumberStyles.Any;
+ long result = Int64.Parse(strA, style);
+ long int64B = int64A * (-1);
+ if (result != int64B)
+ {
+ TestLibrary.TestFramework.LogError("009", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: the string format is [ws][sign]digits[ws] 3");
+
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ string strA = "\u0020" + "-" + int64A.ToString() + "\u0020";
+ NumberStyles style = NumberStyles.Any;
+ long result = Int64.Parse(strA,style);
+ long int64B = int64A * (-1);
+ if (result != int64B)
+ {
+ TestLibrary.TestFramework.LogError("011", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: the string format is [ws][sign]digits[ws] 4");
+
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ string strA = "\u0020" + "-0" + int64A.ToString() + "\u0020";
+ NumberStyles style = NumberStyles.Any;
+ long result = Int64.Parse(strA, style);
+ long int64B = int64A * (-1);
+ if (result != int64B)
+ {
+ TestLibrary.TestFramework.LogError("013", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ long int64A;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the parameter string is null");
+
+ try
+ {
+ string strA = null;
+ NumberStyles style = NumberStyles.Any;
+ int64A = Int64.Parse(strA, style);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N001", "the param string is null but not throw exception");
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ long int64A;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the parameter string is not correct format");
+
+ try
+ {
+ string strA = "#$%abc";
+ NumberStyles style = NumberStyles.Any;
+ int64A = Int64.Parse(strA, style);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N003", "the param string is null but not throw exception");
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: the parameter string parsed number is less than the Int64 minValue");
+
+ try
+ {
+ string strA = "-9223372036854775809";
+ NumberStyles style = NumberStyles.Any;
+ Int64 int64A = Int64.Parse(strA, style);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N005", "the param string parsed number is less than MinValue but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ long int64A;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: the parameter string parsed number is greater than the Int64 maxValue");
+
+ try
+ {
+ string strA = "9223372036854775808";
+ NumberStyles style = NumberStyles.Any;
+ int64A = Int64.Parse(strA, style);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N007", "the param string parsed number is greater than MaxValue but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ long int64A;
+ TestLibrary.TestFramework.BeginScenario("NegTest5: the param of style is not NumberStyles value");
+
+ try
+ {
+ string strA = TestLibrary.Generator.GetInt64(-55).ToString();
+ NumberStyles style = (NumberStyles)(Int32.MaxValue);
+ int64A = Int64.Parse(strA, style);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N009", "the param of style is not NumberStyles value but not throw exception");
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64parse3.cs b/tests/src/CoreMangLib/cti/system/int64/int64parse3.cs
new file mode 100644
index 0000000000..870320b963
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64parse3.cs
@@ -0,0 +1,398 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// Int64.Parse(string,NumberStyle,IFormatProvider)
+/// </summary>
+public class Int64Parse3
+{
+ private long c_INT64_MinValue = -9223372036854775808;
+ private long c_INT64_MaxValue = 9223372036854775807;
+ public static int Main()
+ {
+ Int64Parse3 int64parse3 = new Int64Parse3();
+ TestLibrary.TestFramework.BeginTestCase("Int64Parse3");
+ if (int64parse3.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[PosTest]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ TestLibrary.TestFramework.LogInformation("[NegTest]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: the string corresponding Int64 is Int64 MaxValue 1");
+ try
+ {
+ string strA = Int64.MaxValue.ToString();
+ NumberStyles style = NumberStyles.Any;
+ long int64A = Int64.Parse(strA, style, provider);
+ if (int64A != c_INT64_MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: the string corresponding Int64 is Int64 MaxValue 2");
+ try
+ {
+ string strA = Int64.MaxValue.ToString();
+ NumberStyles style = NumberStyles.Any;
+ long int64A = Int64.Parse(strA, style, provider);
+ if (int64A != c_INT64_MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: the string corresponding Int64 is Int64 MinValue 1");
+ try
+ {
+ string strA = Int64.MinValue.ToString();
+ NumberStyles style = NumberStyles.Any;
+ long int64A = Int64.Parse(strA, style, provider);
+ if (int64A != c_INT64_MinValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: the string corresponding Int64 is Int64 MinValue 2");
+ try
+ {
+ string strA = Int64.MinValue.ToString();
+ NumberStyles style = NumberStyles.Any;
+ long int64A = Int64.Parse(strA, style, provider);
+ if (int64A != c_INT64_MinValue)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ CultureInfo mycultrue = new CultureInfo("en-us");
+ IFormatProvider provider = mycultrue.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: the string format is [ws][sign]digits[ws] 1");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ string strA = "\u0020" + "+" + int64A.ToString();
+ NumberStyles style = NumberStyles.Any;
+ long result = Int64.Parse(strA, style, provider);
+ if (result != int64A)
+ {
+ TestLibrary.TestFramework.LogError("009", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ CultureInfo mycultrue = new CultureInfo("en-us");
+ IFormatProvider provider = mycultrue.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: the string format is [ws][sign]digits[ws] 2");
+
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ string strA = "\u0020" + "-" + int64A.ToString();
+ NumberStyles style = NumberStyles.Any;
+ long result = Int64.Parse(strA, style, provider);
+ long int64B = int64A * (-1);
+ if (result != int64B)
+ {
+ TestLibrary.TestFramework.LogError("011", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ CultureInfo mycultrue = new CultureInfo("en-us");
+ IFormatProvider provider = mycultrue.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: the string format is [ws][sign]digits[ws] 3");
+
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ string strA = "\u0020" + "-" + int64A.ToString() + "\u0020";
+ NumberStyles style = NumberStyles.Any;
+ long result = Int64.Parse(strA, style, provider);
+ long int64B = int64A * (-1);
+ if (result != int64B)
+ {
+ TestLibrary.TestFramework.LogError("013", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ CultureInfo mycultrue = new CultureInfo("en-us");
+ IFormatProvider provider = mycultrue.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest8: the string format is [ws][sign]digits[ws] 4");
+
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64(-55);
+ string strA = "\u0020" + "-0" + int64A.ToString() + "\u0020";
+ NumberStyles style = NumberStyles.Any;
+ long result = Int64.Parse(strA, style, provider);
+ long int64B = int64A * (-1);
+ if (result != int64B)
+ {
+ TestLibrary.TestFramework.LogError("015", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest9()
+ {
+ bool retVal = true;
+ CultureInfo mycultrue = new CultureInfo("en-us");
+ IFormatProvider provider = mycultrue.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest9: the string formed with acceptable characters");
+
+ try
+ {
+ long int64A = 0xabcdfffffabc;
+ string strA = "\u0020" + "-0" + int64A.ToString() + "\u0020";
+ NumberStyles style = NumberStyles.Any;
+ long result = Int64.Parse(strA, style, provider);
+ long int64B = int64A * (-1);
+ if (result != int64B)
+ {
+ TestLibrary.TestFramework.LogError("017", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ long int64A;
+ IFormatProvider provider = null;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the parameter string is null");
+
+ try
+ {
+ string strA = null;
+ NumberStyles style = NumberStyles.Any;
+ int64A = Int64.Parse(strA, style, provider);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N001", "the param string is null but not throw exception");
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ long int64A;
+ IFormatProvider provider = null;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the parameter string is not correct format");
+
+ try
+ {
+ string strA = "#$%abc";
+ NumberStyles style = NumberStyles.Any;
+ int64A = Int64.Parse(strA, style, provider);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N003", "the param string is null but not throw exception");
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ IFormatProvider provider = null;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: the parameter string parsed number is less than the Int64 minValue");
+
+ try
+ {
+ string strA = "-9223372036854775809";
+ NumberStyles style = NumberStyles.Any;
+ Int64 int64A = Int64.Parse(strA, style, provider);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N005", "the param string parsed number is less than MinValue but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ long int64A;
+ IFormatProvider provider = null;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: the parameter string parsed number is greater than the Int64 maxValue");
+
+ try
+ {
+ string strA = "9223372036854775808";
+ NumberStyles style = NumberStyles.Any;
+ int64A = Int64.Parse(strA, style, provider);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N007", "the param string parsed number is greater than MaxValue but not throw exception");
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ long int64A;
+ IFormatProvider provider = null;
+ TestLibrary.TestFramework.BeginScenario("NegTest5: the param of style is not NumberStyles value");
+
+ try
+ {
+ string strA = TestLibrary.Generator.GetInt64(-55).ToString();
+ NumberStyles style = (NumberStyles)(Int32.MaxValue);
+ int64A = Int64.Parse(strA, style, provider);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N009", "the param of style is not NumberStyles value but not throw exception");
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64tostring3.cs b/tests/src/CoreMangLib/cti/system/int64/int64tostring3.cs
new file mode 100644
index 0000000000..e4868254bf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64tostring3.cs
@@ -0,0 +1,180 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using TestLibrary;
+/// <summary>
+/// Int64.ToString(System.String)
+/// </summary>
+public class Int64ToString3
+{
+ public static int Main()
+ {
+ Int64ToString3 int64ts3 = new Int64ToString3();
+ TestLibrary.TestFramework.BeginTestCase("Int64ToString3");
+ if (int64ts3.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest(2, Int64.MinValue, "Int64.MinValue", "x", "8000000000000000") && retVal;
+
+ TestLibrary.Utilities.CurrentCulture = CustomCulture;
+ retVal &= PosTest(1, Int64.MinValue, "Int64.MinValue", "g", "@9223372036854775808");
+ retVal &= PosTest(3, Int64.MaxValue, "Int64.MaxValue", "g", "9223372036854775807");
+ retVal &= PosTest(4, Int64.MaxValue, "Int64.MaxValue", "x", "7fffffffffffffff");
+ retVal &= PosTest(5, Int64.MaxValue, "Int64.MaxValue", "f", "9223372036854775807,000");
+ retVal &= PosTest(6, Int64.MaxValue, "Int64.MaxValue", "E", TestLibrary.Utilities.IsWindows ? "9,223372E++018" : "9,223372E18");
+ retVal &= PosTest(7, Int64.MaxValue, "Int64.MaxValue", "N", "9#22#33#72#03#68#54#77#58#07,000");
+ retVal &= PosTest(8, Int64.MaxValue, "Int64.MaxValue", "P", "922,337,203,685,477,580,700,0000~");
+ retVal &= PosTest(9, Int64.MaxValue, "Int64.MaxValue", "D", "9223372036854775807");
+ retVal &= PosTest(10, 00065536, "00065536", "G", "65536");
+ retVal &= PosTest(11, 00065536, "00065536", "P", "6,553,600,0000~");
+ retVal &= PosTest(12, 00065536, "00065536", "E", TestLibrary.Utilities.IsWindows ? "6,553600E++004" : "6,553600E4");
+ retVal &= PosTest(13, 00065536, "00065536", string.Empty, "65536");
+ retVal &= PosTest(14, 00065536, "00065536", null, "65536");
+ retVal &= PosTest(15, -00065536, "-00065536", "P", "@~6,553,600,0000");
+ retVal &= PosTest(16, -00065536, "-00065536", "E", TestLibrary.Utilities.IsWindows ? "@6,553600E++004" : "@6,553600E4");
+
+ TestLibrary.Utilities.CurrentCulture = CurrentCulture;
+
+ TestLibrary.TestFramework.LogInformation("[NegTest]");
+ retVal &= NegTest1();
+ return retVal;
+ }
+
+ #region Private Methods
+ private CultureInfo CurrentCulture = TestLibrary.Utilities.CurrentCulture;
+ private CultureInfo customCulture = null;
+
+ private CultureInfo CustomCulture
+ {
+ get
+ {
+ if (null == customCulture)
+ {
+ customCulture = new CultureInfo(CultureInfo.CurrentCulture.Name);
+ NumberFormatInfo nfi = customCulture.NumberFormat;
+ //For "G"
+ // NegativeSign, NumberDecimalSeparator, NumberDecimalDigits, PositiveSign
+ nfi.NegativeSign = "@"; //Default: "-"
+ nfi.NumberDecimalSeparator = ","; //Default: "."
+ nfi.NumberDecimalDigits = 3; //Default: 2
+ nfi.PositiveSign = "++"; //Default: "+"
+
+ //For "E"
+ // PositiveSign, NegativeSign, and NumberDecimalSeparator.
+ // If precision specifier is omitted, a default of six digits after the decimal point is used.
+
+ //For "R"
+ // NegativeSign, NumberDecimalSeparator and PositiveSign
+
+ //For "X", The result string isn't affected by the formatting information of the current NumberFormatInfo
+
+ //For "C"
+ // CurrencyPositivePattern, CurrencySymbol, CurrencyDecimalDigits, CurrencyDecimalSeparator, CurrencyGroupSeparator, CurrencyGroupSizes, NegativeSign and CurrencyNegativePattern
+ nfi.CurrencyDecimalDigits = 3; //Default: 2
+ nfi.CurrencyDecimalSeparator = ","; //Default: ","
+ nfi.CurrencyGroupSeparator = "."; //Default: "."
+ nfi.CurrencyGroupSizes = new int[] { 2 }; //Default: new int[]{3}
+ nfi.CurrencyNegativePattern = 2; //Default: 0
+ nfi.CurrencyPositivePattern = 1; //Default: 0
+ nfi.CurrencySymbol = "USD"; //Default: "$"
+
+ //For "D"
+ // NegativeSign
+
+ //For "E"
+ // PositiveSign, NumberDecimalSeparator and NegativeSign.
+ // If precision specifier is omitted, a default of six digits after the decimal point is used.
+ nfi.PositiveSign = "++"; //Default: "+"
+ nfi.NumberDecimalSeparator = ","; //Default: "."
+
+ //For "F"
+ // NumberDecimalDigits, and NumberDecimalSeparator and NegativeSign.
+ nfi.NumberDecimalDigits = 3; //Default: 2
+
+ //For "N"
+ // NumberGroupSizes, NumberGroupSeparator, NumberDecimalSeparator, NumberDecimalDigits, NumberNegativePattern and NegativeSign.
+ nfi.NumberGroupSizes = new int[] { 2 }; //Default: 3
+ nfi.NumberGroupSeparator = "#"; //Default: ","
+
+ //For "P"
+ // PercentPositivePattern, PercentNegativePattern, NegativeSign, PercentSymbol, PercentDecimalDigits, PercentDecimalSeparator, PercentGroupSeparator and PercentGroupSizes
+ nfi.PercentPositivePattern = 1; //Default: 0
+ nfi.PercentNegativePattern = 2; //Default: 0
+ nfi.PercentSymbol = "~"; //Default: "%"
+ nfi.PercentDecimalDigits = 4; //Default: 2
+ nfi.PercentDecimalSeparator = ","; //Default: "."
+ nfi.PercentGroupSizes[0] = 2; //Default: 3
+ nfi.PercentGroupSeparator = ","; //Default: "," in most cultures, but "." in TR and DE
+
+ customCulture.NumberFormat = nfi;
+ }
+ return customCulture;
+ }
+ }
+ #endregion
+
+ #region PositiveTest
+ public bool PosTest(int seqNumber, long value, string description, string formatString, string expectedValue)
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest " + seqNumber.ToString() + ": " + description + ".ToString('" + formatString + "')");
+ try
+ {
+ string actual = value.ToString(formatString);
+ if (formatString == null) formatString = "G";
+
+ if (!actual.Equals(expectedValue))
+ {
+ TestLibrary.TestFramework.LogError("00" + seqNumber.ToString() + ".1",
+ "Expected: " + expectedValue + ", Actual: " + actual);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("00" + seqNumber.ToString() + ".2", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The Format parameter is Invalid");
+ try
+ {
+ long int64A = TestLibrary.Generator.GetInt64();
+ String strA = int64A.ToString("Q");
+ retVal = false;
+ TestLibrary.TestFramework.LogError("N001", "the format param is Invalid but not throw exception");
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/int64/int64tryparse.cs b/tests/src/CoreMangLib/cti/system/int64/int64tryparse.cs
new file mode 100644
index 0000000000..6e8834af31
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/int64/int64tryparse.cs
@@ -0,0 +1,571 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+// Ported over to CoreCLR from Co7529TryParse_all.cs
+// Tests Int64.TryParse(String), Int64.TryParse(String, NumberStyles, IFormatProvider, ref Int64)
+// 2003/04/01 KatyK
+// 2007/06/28 adapted by MarielY
+
+public class Int64TryParse
+{
+ static bool verbose = false;
+
+ public static int Main()
+ {
+ bool passed = true;
+
+ try
+ {
+ // Make the test culture independent
+ TestLibrary.Utilities.CurrentCulture = CultureInfo.InvariantCulture;
+
+ // Set up NFIs to use
+ NumberFormatInfo goodNFI = new NumberFormatInfo();
+
+ NumberFormatInfo corruptNFI = new NumberFormatInfo(); // DecimalSeparator == GroupSeparator
+ corruptNFI.NumberDecimalSeparator = ".";
+ corruptNFI.NumberGroupSeparator = ".";
+ corruptNFI.CurrencyDecimalSeparator = ".";
+ corruptNFI.CurrencyGroupSeparator = ".";
+ corruptNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo swappedNFI = new NumberFormatInfo(); // DecimalSeparator & GroupSeparator swapped
+ swappedNFI.NumberDecimalSeparator = ".";
+ swappedNFI.NumberGroupSeparator = ",";
+ swappedNFI.CurrencyDecimalSeparator = ",";
+ swappedNFI.CurrencyGroupSeparator = ".";
+ swappedNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo distinctNFI = new NumberFormatInfo(); // DecimalSeparator & GroupSeparator distinct
+ distinctNFI.NumberDecimalSeparator = ".";
+ distinctNFI.NumberGroupSeparator = ",";
+ distinctNFI.CurrencyDecimalSeparator = ":";
+ distinctNFI.CurrencyGroupSeparator = ";";
+ distinctNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo customNFI = new NumberFormatInfo();
+ customNFI.NegativeSign = "^";
+
+ NumberFormatInfo ambigNFI = new NumberFormatInfo();
+ ambigNFI.NegativeSign = "^";
+ ambigNFI.CurrencySymbol = "^";
+
+ CultureInfo germanCulture = new CultureInfo("de-DE");
+ CultureInfo japaneseCulture;
+
+ try
+ {
+ japaneseCulture = new CultureInfo("ja-JP");
+ }
+ catch (Exception)
+ {
+ TestLibrary.Logging.WriteLine("East Asian Languages are not installed. Skiping Japanese culture tests.");
+ japaneseCulture = null;
+ }
+
+ // Parse tests included for comparison/regression
+ passed &= VerifyInt64Parse("5", 5);
+ passed &= VerifyInt64Parse("-5", -5);
+ passed &= VerifyInt64Parse("5 ", 5);
+ passed &= VerifyInt64Parse("5\0", 5);
+ passed &= VerifyInt64Parse("893382737", 893382737);
+ passed &= VerifyInt64Parse("-893382737", -893382737);
+ passed &= VerifyInt64Parse("1234567891", 1234567891);
+ passed &= VerifyInt64Parse("-1234567891", -1234567891);
+ passed &= VerifyInt64Parse("123456789123456789", 123456789123456789);
+ passed &= VerifyInt64Parse("-123456789123456789", -123456789123456789);
+ passed &= VerifyInt64Parse("5", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyInt64Parse("-5", NumberStyles.Integer, CultureInfo.InvariantCulture, -5);
+ passed &= VerifyInt64Parse("5 \0", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyInt64Parse("5\0\0\0", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyInt64Parse("12", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0x12);
+ passed &= VerifyInt64Parse("fF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFF);
+ passed &= VerifyInt64Parse("FFFFFFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFFFFFFFF);
+ passed &= VerifyInt64Parse("FFFFFFFFFFFFFFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, -1);
+ passed &= VerifyInt64Parse("123", NumberStyles.Integer, germanCulture, 123);
+ passed &= VerifyInt64Parse("123", NumberStyles.Integer, japaneseCulture, 123);
+ passed &= VerifyInt64Parse("123.000", NumberStyles.Any, germanCulture, 123000);
+ passed &= VerifyInt64Parse("123,000", NumberStyles.Any, japaneseCulture, 123000);
+ passed &= VerifyInt64Parse("123,000", NumberStyles.AllowDecimalPoint, germanCulture, 123);
+ passed &= VerifyInt64Parse("123.000", NumberStyles.AllowDecimalPoint, japaneseCulture, 123);
+ passed &= VerifyInt64Parse("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 5); // currency
+ passed &= VerifyInt64Parse("5", NumberStyles.Integer, goodNFI, 5);
+ passed &= VerifyInt64Parse("5.0", NumberStyles.AllowDecimalPoint, goodNFI, 5);
+ //
+ passed &= VerifyInt64Parse("5", NumberStyles.Integer, corruptNFI, 5);
+ passed &= VerifyInt64Parse("5", NumberStyles.Number, corruptNFI, 5);
+ passed &= VerifyInt64Parse("5.0", NumberStyles.Number, corruptNFI, 5);
+ passed &= VerifyInt64ParseException("5,0", NumberStyles.Number, corruptNFI, typeof(FormatException));
+ passed &= VerifyInt64ParseException("5.0.0", NumberStyles.Number, corruptNFI, typeof(FormatException));
+ passed &= VerifyInt64Parse("$5.0", NumberStyles.Currency, corruptNFI, 5);
+ passed &= VerifyInt64ParseException("$5,0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyInt64ParseException("$5.0.0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyInt64Parse("5.0", NumberStyles.Currency, corruptNFI, 5);
+ passed &= VerifyInt64ParseException("5,0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyInt64ParseException("5.0.0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyInt64Parse("5.0", NumberStyles.Any, corruptNFI, 5);
+ passed &= VerifyInt64ParseException("5,0", NumberStyles.Any, corruptNFI, typeof(FormatException));
+ passed &= VerifyInt64ParseException("5.0.0", NumberStyles.Any, corruptNFI, typeof(FormatException));
+ //
+ passed &= VerifyInt64Parse("5", NumberStyles.Integer, swappedNFI, 5);
+ passed &= VerifyInt64ParseException("1,234", NumberStyles.Integer, swappedNFI, typeof(FormatException));
+ passed &= VerifyInt64Parse("5", NumberStyles.Number, swappedNFI, 5);
+ passed &= VerifyInt64Parse("5.0", NumberStyles.Number, swappedNFI, 5);
+ passed &= VerifyInt64Parse("1,234", NumberStyles.Number, swappedNFI, 1234);
+ passed &= VerifyInt64Parse("1,234.0", NumberStyles.Number, swappedNFI, 1234);
+ passed &= VerifyInt64ParseException("5.000.000", NumberStyles.Number, swappedNFI, typeof(FormatException));
+ passed &= VerifyInt64ParseException("5.000,00", NumberStyles.Number, swappedNFI, typeof(FormatException));
+ passed &= VerifyInt64Parse("5.000", NumberStyles.Currency, swappedNFI, 5); //???
+ passed &= VerifyInt64ParseException("5.000,00", NumberStyles.Currency, swappedNFI, typeof(FormatException)); //???
+ passed &= VerifyInt64Parse("$5.000", NumberStyles.Currency, swappedNFI, 5000);
+ passed &= VerifyInt64Parse("$5.000,00", NumberStyles.Currency, swappedNFI, 5000);
+ passed &= VerifyInt64Parse("5.000", NumberStyles.Any, swappedNFI, 5); //?
+ passed &= VerifyInt64ParseException("5.000,00", NumberStyles.Any, swappedNFI, typeof(FormatException)); //?
+ passed &= VerifyInt64Parse("$5.000", NumberStyles.Any, swappedNFI, 5000);
+ passed &= VerifyInt64Parse("$5.000,00", NumberStyles.Any, swappedNFI, 5000);
+ passed &= VerifyInt64Parse("5,0", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyInt64Parse("$5,0", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyInt64Parse("5,000", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyInt64Parse("$5,000", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyInt64ParseException("5,000.0", NumberStyles.Currency, swappedNFI, typeof(FormatException));
+ passed &= VerifyInt64ParseException("$5,000.0", NumberStyles.Currency, swappedNFI, typeof(FormatException));
+ passed &= VerifyInt64Parse("5,000", NumberStyles.Any, swappedNFI, 5);
+ passed &= VerifyInt64Parse("$5,000", NumberStyles.Any, swappedNFI, 5);
+ passed &= VerifyInt64ParseException("5,000.0", NumberStyles.Any, swappedNFI, typeof(FormatException));
+ passed &= VerifyInt64ParseException("$5,000.0", NumberStyles.Any, swappedNFI, typeof(FormatException));
+ //
+ passed &= VerifyInt64Parse("5.0", NumberStyles.Number, distinctNFI, 5);
+ passed &= VerifyInt64Parse("1,234.0", NumberStyles.Number, distinctNFI, 1234);
+ passed &= VerifyInt64Parse("5.0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyInt64Parse("1,234.0", NumberStyles.Currency, distinctNFI, 1234);
+ passed &= VerifyInt64Parse("5.0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyInt64Parse("1,234.0", NumberStyles.Any, distinctNFI, 1234);
+ passed &= VerifyInt64ParseException("$5.0", NumberStyles.Currency, distinctNFI, typeof(FormatException));
+ passed &= VerifyInt64ParseException("$5.0", NumberStyles.Any, distinctNFI, typeof(FormatException));
+ passed &= VerifyInt64ParseException("5:0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyInt64ParseException("5;0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyInt64ParseException("$5:0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyInt64Parse("5:0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyInt64Parse("5:000", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyInt64Parse("5;000", NumberStyles.Currency, distinctNFI, 5000);
+ passed &= VerifyInt64Parse("$5:0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyInt64Parse("$5;0", NumberStyles.Currency, distinctNFI, 50);
+ passed &= VerifyInt64Parse("5:0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyInt64Parse("5;0", NumberStyles.Any, distinctNFI, 50);
+ passed &= VerifyInt64Parse("$5:0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyInt64Parse("$5;0", NumberStyles.Any, distinctNFI, 50);
+ passed &= VerifyInt64ParseException("123,456;789.0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyInt64Parse("123,456;789.0", NumberStyles.Currency, distinctNFI, 123456789);
+ passed &= VerifyInt64Parse("123,456;789.0", NumberStyles.Any, distinctNFI, 123456789);
+ passed &= VerifyInt64ParseException("$123,456;789.0", NumberStyles.Any, distinctNFI, typeof(FormatException));
+ //
+ passed &= VerifyInt64ParseException("123456789123456789123", typeof(OverflowException));
+ passed &= VerifyInt64ParseException("-123456789123456789123", typeof(OverflowException));
+ passed &= VerifyInt64ParseException("18446744073709551615", typeof(OverflowException));
+ passed &= VerifyInt64ParseException("Garbage", typeof(FormatException));
+ passed &= VerifyInt64ParseException("5\0Garbage", typeof(FormatException));
+ passed &= VerifyInt64ParseException(null, typeof(ArgumentNullException));
+ passed &= VerifyInt64ParseException("123456789123456789", NumberStyles.HexNumber, CultureInfo.InvariantCulture, typeof(OverflowException));
+ passed &= VerifyInt64ParseException("5.3", NumberStyles.AllowDecimalPoint, goodNFI, typeof(OverflowException)); //weird that it's Overflow, but consistent with v1
+ passed &= VerifyInt64ParseException("5", NumberStyles.AllowHexSpecifier | NumberStyles.AllowParentheses, null, typeof(ArgumentException));
+ passed &= VerifyInt64ParseException("4", (NumberStyles)(-1), typeof(ArgumentException));
+ passed &= VerifyInt64ParseException("4", (NumberStyles)0x10000, typeof(ArgumentException));
+ passed &= VerifyInt64ParseException("4", (NumberStyles)(-1), CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyInt64ParseException("4", (NumberStyles)0x10000, CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyInt64ParseException("123.000.000.000.000.000.000", NumberStyles.Any, germanCulture, typeof(OverflowException));
+ passed &= VerifyInt64ParseException("123,000,000,000,000,000,000", NumberStyles.Any, japaneseCulture, typeof(OverflowException));
+ passed &= VerifyInt64ParseException("123,000,000,000,000,000,000", NumberStyles.Integer, germanCulture, typeof(FormatException));
+ passed &= VerifyInt64ParseException("123.000.000.000.000.000.000", NumberStyles.Integer, japaneseCulture, typeof(FormatException));
+ passed &= VerifyInt64ParseException("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Integer, germanCulture, typeof(FormatException)); // currency
+
+
+ /////////// TryParse(String)
+ //// Pass cases
+ passed &= VerifyInt64TryParse("5", 5, true);
+ passed &= VerifyInt64TryParse("-5", -5, true);
+ passed &= VerifyInt64TryParse(" 5 ", 5, true);
+ passed &= VerifyInt64TryParse("5\0", 5, true);
+ passed &= VerifyInt64TryParse("5 \0", 5, true);
+ passed &= VerifyInt64TryParse("5\0\0\0", 5, true);
+ passed &= VerifyInt64TryParse("10000", 10000, true);
+ passed &= VerifyInt64TryParse("893382737", 893382737, true);
+ passed &= VerifyInt64TryParse("-893382737", -893382737, true);
+ passed &= VerifyInt64TryParse("1234567891", 1234567891, true);
+ passed &= VerifyInt64TryParse("-1234567891", -1234567891, true);
+ passed &= VerifyInt64TryParse("123456789123456789", 123456789123456789, true);
+ passed &= VerifyInt64TryParse("-123456789123456789", -123456789123456789, true);
+ passed &= VerifyInt64TryParse(Int64.MaxValue.ToString(), Int64.MaxValue, true);
+ passed &= VerifyInt64TryParse(Int64.MinValue.ToString(), Int64.MinValue, true);
+
+ //// Fail cases
+ passed &= VerifyInt64TryParse(null, 0, false);
+ passed &= VerifyInt64TryParse("", 0, false);
+ passed &= VerifyInt64TryParse("Garbage", 0, false);
+ passed &= VerifyInt64TryParse("5\0Garbage", 0, false);
+ passed &= VerifyInt64TryParse("18446744073709551615", 0, false);
+ passed &= VerifyInt64TryParse("123456789123456789123", 0, false);
+ passed &= VerifyInt64TryParse("-123456789123456789123", 0, false);
+ passed &= VerifyInt64TryParse("FF", 0, false);
+ passed &= VerifyInt64TryParse("27.3", 0, false);
+ passed &= VerifyInt64TryParse("23 5", 0, false);
+
+
+ /////////// TryParse(TryParse(String, NumberStyles, IFormatProvider, ref Int64)
+ //// Pass cases
+ passed &= VerifyInt64TryParse("5", NumberStyles.Integer, CultureInfo.InvariantCulture, 5, true);
+ passed &= VerifyInt64TryParse("-5", NumberStyles.Integer, CultureInfo.InvariantCulture, -5, true);
+ // Variations on NumberStyles
+ passed &= VerifyInt64TryParse("12", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0x12, true);
+ passed &= VerifyInt64TryParse("FF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFF, true);
+ passed &= VerifyInt64TryParse("fF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFF, true);
+ passed &= VerifyInt64TryParse("FFFFFFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFFFFFFFF, true);
+ passed &= VerifyInt64TryParse("FFFFFFFFFFFFFFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, -1, true);
+ passed &= VerifyInt64TryParse(" 5", NumberStyles.AllowLeadingWhite, goodNFI, 5, true);
+ passed &= VerifyInt64TryParse("5", NumberStyles.Number, goodNFI, 5, true);
+ passed &= VerifyInt64TryParse("5.0", NumberStyles.AllowDecimalPoint, goodNFI, 5, true);
+ // Variations on IFP
+ passed &= VerifyInt64TryParse("5", NumberStyles.Integer, goodNFI, 5, true);
+ passed &= VerifyInt64TryParse("5", NumberStyles.Integer, null, 5, true);
+ passed &= VerifyInt64TryParse("5", NumberStyles.Integer, new DateTimeFormatInfo(), 5, true);
+ passed &= VerifyInt64TryParse("^42", NumberStyles.Any, customNFI, -42, true);
+ passed &= VerifyInt64TryParse("123", NumberStyles.Integer, germanCulture, 123, true);
+ passed &= VerifyInt64TryParse("123", NumberStyles.Integer, japaneseCulture, 123, true);
+ passed &= VerifyInt64TryParse("123.000", NumberStyles.Any, germanCulture, 123000, true);
+ passed &= VerifyInt64TryParse("123,000", NumberStyles.Any, japaneseCulture, 123000, true);
+ passed &= VerifyInt64TryParse("123,000", NumberStyles.AllowDecimalPoint, germanCulture, 123, true);
+ passed &= VerifyInt64TryParse("123.000", NumberStyles.AllowDecimalPoint, japaneseCulture, 123, true);
+ passed &= VerifyInt64TryParse("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 5, true); // currency
+
+ //// Fail cases
+ passed &= VerifyInt64TryParse("FF", NumberStyles.Integer, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifyInt64TryParse("123456789123456789", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifyInt64TryParse("-42", NumberStyles.Any, customNFI, 0, false);
+ passed &= VerifyInt64TryParse("5.3", NumberStyles.AllowDecimalPoint, goodNFI, 0, false);
+ passed &= VerifyInt64TryParse("5 ", NumberStyles.AllowLeadingWhite, goodNFI, 0, false);
+ passed &= VerifyInt64TryParse("123.000.000.000.000.000.000", NumberStyles.Any, germanCulture, 0, false);
+ passed &= VerifyInt64TryParse("123,000,000,000,000,000,000", NumberStyles.Any, japaneseCulture, 0, false);
+ passed &= VerifyInt64TryParse("123,000,000,000,000,000,000", NumberStyles.Integer, germanCulture, 0, false);
+ passed &= VerifyInt64TryParse("123.000.000.000.000.000.000", NumberStyles.Integer, japaneseCulture, 0, false);
+
+ //// Exception cases
+ passed &= VerifyInt64TryParseException("5", NumberStyles.AllowHexSpecifier | NumberStyles.AllowParentheses, null, typeof(ArgumentException));
+ passed &= VerifyInt64TryParseException("4", (NumberStyles)(-1), CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyInt64TryParseException("4", (NumberStyles)0x10000, CultureInfo.InvariantCulture, typeof(ArgumentException));
+
+ // NumberStyles/NFI variations
+ //
+ passed &= VerifyInt64TryParse("5", NumberStyles.Integer, corruptNFI, 5, true);
+ passed &= VerifyInt64TryParse("5", NumberStyles.Number, corruptNFI, 5, true);
+ passed &= VerifyInt64TryParse("5.0", NumberStyles.Number, corruptNFI, 5, true);
+ passed &= VerifyInt64TryParse("5,0", NumberStyles.Number, corruptNFI, 0, false);
+ passed &= VerifyInt64TryParse("5.0.0", NumberStyles.Number, corruptNFI, 0, false);
+ passed &= VerifyInt64TryParse("$5.0", NumberStyles.Currency, corruptNFI, 5, true);
+ passed &= VerifyInt64TryParse("$5,0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyInt64TryParse("$5.0.0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyInt64TryParse("5.0", NumberStyles.Currency, corruptNFI, 5, true);
+ passed &= VerifyInt64TryParse("5,0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyInt64TryParse("5.0.0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyInt64TryParse("5.0", NumberStyles.Any, corruptNFI, 5, true);
+ passed &= VerifyInt64TryParse("5,0", NumberStyles.Any, corruptNFI, 0, false);
+ passed &= VerifyInt64TryParse("5.0.0", NumberStyles.Any, corruptNFI, 0, false);
+ //
+ passed &= VerifyInt64TryParse("5", NumberStyles.Integer, swappedNFI, 5, true);
+ passed &= VerifyInt64TryParse("1,234", NumberStyles.Integer, swappedNFI, 0, false);
+ passed &= VerifyInt64TryParse("5", NumberStyles.Number, swappedNFI, 5, true);
+ passed &= VerifyInt64TryParse("5.0", NumberStyles.Number, swappedNFI, 5, true);
+ passed &= VerifyInt64TryParse("1,234", NumberStyles.Number, swappedNFI, 1234, true);
+ passed &= VerifyInt64TryParse("1,234.0", NumberStyles.Number, swappedNFI, 1234, true);
+ passed &= VerifyInt64TryParse("5.000.000", NumberStyles.Number, swappedNFI, 0, false);
+ passed &= VerifyInt64TryParse("5.000,00", NumberStyles.Number, swappedNFI, 0, false);
+ passed &= VerifyInt64TryParse("5.000", NumberStyles.Currency, swappedNFI, 5, true); //???
+ passed &= VerifyInt64TryParse("5.000,00", NumberStyles.Currency, swappedNFI, 0, false); //???
+ passed &= VerifyInt64TryParse("$5.000", NumberStyles.Currency, swappedNFI, 5000, true);
+ passed &= VerifyInt64TryParse("$5.000,00", NumberStyles.Currency, swappedNFI, 5000, true);
+ passed &= VerifyInt64TryParse("5.000", NumberStyles.Any, swappedNFI, 5, true); //?
+ passed &= VerifyInt64TryParse("5.000,00", NumberStyles.Any, swappedNFI, 0, false); //?
+ passed &= VerifyInt64TryParse("$5.000", NumberStyles.Any, swappedNFI, 5000, true);
+ passed &= VerifyInt64TryParse("$5.000,00", NumberStyles.Any, swappedNFI, 5000, true);
+ passed &= VerifyInt64TryParse("5,0", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyInt64TryParse("$5,0", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyInt64TryParse("5,000", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyInt64TryParse("$5,000", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyInt64TryParse("5,000.0", NumberStyles.Currency, swappedNFI, 0, false);
+ passed &= VerifyInt64TryParse("$5,000.0", NumberStyles.Currency, swappedNFI, 0, false);
+ passed &= VerifyInt64TryParse("5,000", NumberStyles.Any, swappedNFI, 5, true);
+ passed &= VerifyInt64TryParse("$5,000", NumberStyles.Any, swappedNFI, 5, true);
+ passed &= VerifyInt64TryParse("5,000.0", NumberStyles.Any, swappedNFI, 0, false);
+ passed &= VerifyInt64TryParse("$5,000.0", NumberStyles.Any, swappedNFI, 0, false);
+ //
+ passed &= VerifyInt64TryParse("5.0", NumberStyles.Number, distinctNFI, 5, true);
+ passed &= VerifyInt64TryParse("1,234.0", NumberStyles.Number, distinctNFI, 1234, true);
+ passed &= VerifyInt64TryParse("5.0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyInt64TryParse("1,234.0", NumberStyles.Currency, distinctNFI, 1234, true);
+ passed &= VerifyInt64TryParse("5.0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyInt64TryParse("1,234.0", NumberStyles.Any, distinctNFI, 1234, true);
+ passed &= VerifyInt64TryParse("$5.0", NumberStyles.Currency, distinctNFI, 0, false);
+ passed &= VerifyInt64TryParse("$5.0", NumberStyles.Any, distinctNFI, 0, false);
+ passed &= VerifyInt64TryParse("5:0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyInt64TryParse("5;0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyInt64TryParse("$5:0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyInt64TryParse("5:0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyInt64TryParse("5:000", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyInt64TryParse("5;000", NumberStyles.Currency, distinctNFI, 5000, true);
+ passed &= VerifyInt64TryParse("$5:0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyInt64TryParse("$5;0", NumberStyles.Currency, distinctNFI, 50, true);
+ passed &= VerifyInt64TryParse("5:0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyInt64TryParse("5;0", NumberStyles.Any, distinctNFI, 50, true);
+ passed &= VerifyInt64TryParse("$5:0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyInt64TryParse("$5;0", NumberStyles.Any, distinctNFI, 50, true);
+ passed &= VerifyInt64TryParse("123,456;789.0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyInt64TryParse("123,456;789.0", NumberStyles.Currency, distinctNFI, 123456789, true);
+ passed &= VerifyInt64TryParse("123,456;789.0", NumberStyles.Any, distinctNFI, 123456789, true);
+ passed &= VerifyInt64TryParse("$123,456;789.0", NumberStyles.Any, distinctNFI, 0, false);
+
+
+ // Should these pass or fail? Current parse behavior is to pass, so they might be
+ // parse bugs, but they're not tryparse bugs.
+ passed &= VerifyInt64Parse("5", NumberStyles.Float, goodNFI, 5);
+ passed &= VerifyInt64TryParse("5", NumberStyles.Float, goodNFI, 5, true);
+ passed &= VerifyInt64Parse("5", NumberStyles.AllowDecimalPoint, goodNFI, 5);
+ passed &= VerifyInt64TryParse("5", NumberStyles.AllowDecimalPoint, goodNFI, 5, true);
+ // I expect ArgumentException with an ambiguous NFI
+ passed &= VerifyInt64Parse("^42", NumberStyles.Any, ambigNFI, -42);
+ passed &= VerifyInt64TryParse("^42", NumberStyles.Any, ambigNFI, -42, true);
+
+ /// END TEST CASES
+ }
+ catch (Exception e)
+ {
+ TestLibrary.Logging.WriteLine("Unexpected exception!! " + e.ToString());
+ passed = false;
+ }
+
+ if (passed)
+ {
+ TestLibrary.Logging.WriteLine("paSs");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.Logging.WriteLine("FAiL");
+ return 1;
+ }
+ }
+
+ public static bool VerifyInt64TryParse(string value, Int64 expectedResult, bool expectedReturn)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int64.TryParse, Value = '{0}', Expected Result = {1}, Expected Return = {2}",
+ value, expectedResult, expectedReturn);
+ }
+ Int64 result = 0;
+ try
+ {
+ bool returnValue = Int64.TryParse(value, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedReturn, returnValue);
+ return false;
+ }
+ if (result != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, result);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyInt64TryParse(string value, NumberStyles style, IFormatProvider provider, Int64 expectedResult, bool expectedReturn)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int64.TryParse, Value = '{0}', Style = {1}, Provider = {2}, Expected Result = {3}, Expected Return = {4}",
+ value, style, provider, expectedResult, expectedReturn);
+ }
+ Int64 result = 0;
+ try
+ {
+ bool returnValue = Int64.TryParse(value, style, provider, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Style = {1}, Provider = {2}, Expected Return = {3}, Actual Return = {4}",
+ value, style, provider, expectedReturn, returnValue);
+ return false;
+ }
+ if (result != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, result);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyInt64TryParseException(string value, NumberStyles style, IFormatProvider provider, Type exceptionType)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int64.TryParse, Value = '{0}', Style = {1}, Provider = {2}, Expected Exception = {3}",
+ value, style, provider, exceptionType);
+ }
+ try
+ {
+ Int64 result = 0;
+ Boolean returnValue = Int64.TryParse(value, style, provider, out result);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyInt64Parse(string value, Int64 expectedResult)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int64.Parse, Value = '{0}', Expected Result, {1}",
+ value, expectedResult);
+ }
+ try
+ {
+ Int64 returnValue = Int64.Parse(value);
+ if (returnValue != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, returnValue);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyInt64Parse(string value, NumberStyles style, IFormatProvider provider, Int64 expectedResult)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int64.Parse, Value = '{0}', Style = {1}, provider = {2}, Expected Result = {3}",
+ value, style, provider, expectedResult);
+ }
+ try
+ {
+ Int64 returnValue = Int64.Parse(value, style, provider);
+ if (returnValue != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, returnValue);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyInt64ParseException(string value, Type exceptionType)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int64.Parse, Value = '{0}', Expected Exception, {1}",
+ value, exceptionType);
+ }
+ try
+ {
+ Int64 returnValue = Int64.Parse(value);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyInt64ParseException(string value, NumberStyles style, Type exceptionType)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int64.Parse, Value = '{0}', Style = {1}, Expected Exception = {3}",
+ value, style, exceptionType);
+ }
+ try
+ {
+ Int64 returnValue = Int64.Parse(value, style);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyInt64ParseException(string value, NumberStyles style, IFormatProvider provider, Type exceptionType)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Int64.Parse, Value = '{0}', Style = {1}, Provider = {2}, Expected Exception = {3}",
+ value, style, provider, exceptionType);
+ }
+ try
+ {
+ Int64 returnValue = Int64.Parse(value, style, provider);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/intptr/IntPtrCtor_Int32.csproj b/tests/src/CoreMangLib/cti/system/intptr/IntPtrCtor_Int32.csproj
new file mode 100644
index 0000000000..38aee082eb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/intptr/IntPtrCtor_Int32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="intptrctor_int32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/intptr/IntPtrCtor_Int64.csproj b/tests/src/CoreMangLib/cti/system/intptr/IntPtrCtor_Int64.csproj
new file mode 100644
index 0000000000..d732404b1c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/intptr/IntPtrCtor_Int64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="intptrctor_int64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/intptr/IntPtrCtor_Void.csproj b/tests/src/CoreMangLib/cti/system/intptr/IntPtrCtor_Void.csproj
new file mode 100644
index 0000000000..72dee39a59
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/intptr/IntPtrCtor_Void.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="intptrctor_void.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/intptr/IntPtrEquals.csproj b/tests/src/CoreMangLib/cti/system/intptr/IntPtrEquals.csproj
new file mode 100644
index 0000000000..5b40945386
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/intptr/IntPtrEquals.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="intptrequals.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/intptr/IntPtrGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/intptr/IntPtrGetHashCode.csproj
new file mode 100644
index 0000000000..734b84f666
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/intptr/IntPtrGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="intptrgethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/intptr/IntPtrToInt32.csproj b/tests/src/CoreMangLib/cti/system/intptr/IntPtrToInt32.csproj
new file mode 100644
index 0000000000..3f4b9bbaaa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/intptr/IntPtrToInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="intptrtoint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/intptr/IntPtrToInt64.csproj b/tests/src/CoreMangLib/cti/system/intptr/IntPtrToInt64.csproj
new file mode 100644
index 0000000000..85fe0996cf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/intptr/IntPtrToInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="intptrtoint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/intptr/IntPtrToPointer.csproj b/tests/src/CoreMangLib/cti/system/intptr/IntPtrToPointer.csproj
new file mode 100644
index 0000000000..aa4c2eb5ac
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/intptr/IntPtrToPointer.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="intptrtopointer.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/intptr/IntPtrToString.csproj b/tests/src/CoreMangLib/cti/system/intptr/IntPtrToString.csproj
new file mode 100644
index 0000000000..df4030d6ff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/intptr/IntPtrToString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="intptrtostring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/intptr/IntPtrZero.csproj b/tests/src/CoreMangLib/cti/system/intptr/IntPtrZero.csproj
new file mode 100644
index 0000000000..5a8a7cac13
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/intptr/IntPtrZero.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="intptrzero.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/intptr/intptrctor_int32.cs b/tests/src/CoreMangLib/cti/system/intptr/intptrctor_int32.cs
new file mode 100644
index 0000000000..44115a527d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/intptr/intptrctor_int32.cs
@@ -0,0 +1,70 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class IntPtrCtor_Int32
+{
+
+ public static int Main()
+ {
+ IntPtrCtor_Int32 testCase = new IntPtrCtor_Int32();
+
+ TestLibrary.TestFramework.BeginTestCase("IntPtr.ctor(Int32)");
+
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1("001", Int32.MaxValue) && retVal;
+ retVal = PosTest1("002", Int32.MinValue) && retVal;
+ retVal = PosTest1("003", 0) && retVal;
+ retVal = PosTest1("004", Int32.MaxValue-1) && retVal;
+ retVal = PosTest1("005", Int32.MinValue+1) && retVal;
+ retVal = PosTest1("006", TestLibrary.Generator.GetInt32(-55)) && retVal;
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// for testing
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest1(string id, int i)
+ {
+ bool retVal = true;
+ try
+ {
+ System.IntPtr ip = new IntPtr(i);
+ if (ip.ToInt32() != i)
+ {
+ TestLibrary.TestFramework.LogError(id,
+ String.Format("IntPtr value expect {0}", i));
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(id, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/intptr/intptrctor_int64.cs b/tests/src/CoreMangLib/cti/system/intptr/intptrctor_int64.cs
new file mode 100644
index 0000000000..280bca3d47
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/intptr/intptrctor_int64.cs
@@ -0,0 +1,119 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class IntPtrCtor_Int64
+{
+
+ public static int Main()
+ {
+ IntPtrCtor_Int64 testCase = new IntPtrCtor_Int64();
+
+ TestLibrary.TestFramework.BeginTestCase("IntPtr.ctor(Int64)");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1("001", 0) && retVal;
+ retVal = PosTest1("002", Int32.MinValue) && retVal;
+ retVal = PosTest1("003", Int32.MaxValue) && retVal;
+ retVal = PosTest1("004", Int32.MinValue+1) && retVal;
+ retVal = PosTest1("005", Int32.MaxValue-1) && retVal;
+ retVal = PosTest1("006", TestLibrary.Generator.GetInt32(-55)) && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1("001", Int64.MaxValue) && retVal;
+ retVal = NegTest1("002", Int64.MinValue) && retVal;
+ retVal = NegTest1("003", (long)Int32.MinValue - 1) && retVal;
+ retVal = NegTest1("004", (long)Int32.MaxValue + 1) && retVal;
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// for positive testing
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest1(string id, long i)
+ {
+ bool retVal = true;
+ try
+ {
+ System.IntPtr ip = new IntPtr(i);
+ if (ip.ToInt64() != i)
+ {
+ TestLibrary.TestFramework.LogError(id,
+ String.Format("IntPtr value expect {0}", i));
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(id, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ /// <summary>
+ /// for negative testing
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest1(string id, long i)
+ {
+ bool retVal = true;
+ try
+ {
+ System.IntPtr ip = new IntPtr(i);
+ }
+ catch (System.OverflowException ex)
+ {
+ if (System.IntPtr.Size == 4)
+ {
+ // ok, that's what it should be
+ return retVal;
+ }
+ else
+ {
+ TestLibrary.TestFramework.LogError(id, String.Format("IntPtr should not have thrown an OverflowException for value {0}: ", i) + ex.ToString());
+ return false;
+ }
+ }
+ catch (Exception e)
+ {
+ if (System.IntPtr.Size == 4)
+ {
+ TestLibrary.TestFramework.LogError(id, "Unexpected exception: " + e);
+ retVal = false;
+ }
+ }
+
+ // no exception, ERROR!
+ if (System.IntPtr.Size == 4)
+ {
+ TestLibrary.TestFramework.LogError(id, String.Format("IntPtr should throw an OverflowException for value {0}", i));
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/intptr/intptrctor_void.cs b/tests/src/CoreMangLib/cti/system/intptr/intptrctor_void.cs
new file mode 100644
index 0000000000..5297bf4f45
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/intptr/intptrctor_void.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Security;
+
+public class IntPtrCtor_Void
+{
+
+ public static int Main()
+ {
+ IntPtrCtor_Void testCase = new IntPtrCtor_Void();
+
+ TestLibrary.TestFramework.BeginTestCase("IntPtr.ctor(void*)");
+
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1("001", 0);
+ retVal = PosTest1("002", Int64.MaxValue) && retVal;
+ retVal = PosTest1("003", Int64.MinValue) && retVal;
+ retVal = PosTest1("004", Int64.MaxValue) && retVal;
+ retVal = PosTest1("005", TestLibrary.Generator.GetInt64(-55)) && retVal;
+
+
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// for positive testing
+ /// </summary>
+ /// <returns></returns>
+ [SecuritySafeCritical]
+ unsafe public bool PosTest1(string id, long anyValue)
+ {
+ bool retVal = true;
+ try
+ {
+ System.IntPtr ip = new IntPtr((void *)anyValue);
+ if (ip.ToPointer() != (void*)anyValue)
+ {
+ TestLibrary.TestFramework.LogError(id, String.Format("expect IntPtr value is {0}", anyValue));
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(id, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/intptr/intptrequals.cs b/tests/src/CoreMangLib/cti/system/intptr/intptrequals.cs
new file mode 100644
index 0000000000..592fd0af5c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/intptr/intptrequals.cs
@@ -0,0 +1,190 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Security;
+
+public class IntPtrEquals
+{
+
+ public static int Main()
+ {
+ IntPtrEquals testCase = new IntPtrEquals();
+
+ TestLibrary.TestFramework.BeginTestCase("IntPtr.Equals(Object)");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ System.IntPtr ip = new IntPtr(0);
+ if (ip.Equals(null))
+ {
+ TestLibrary.TestFramework.LogError("001", "expect new IntPtr(0).Equals(null)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ [SecuritySafeCritical]
+ unsafe public bool PosTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ byte* mem = stackalloc byte[1024];
+ System.IntPtr ip1 = new IntPtr((void*)mem);
+ System.IntPtr ip2 = new IntPtr((void*)mem);
+ if (!ip1.Equals(ip2))
+ {
+ TestLibrary.TestFramework.LogError("002", "expect two IntPtr equals");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ try
+ {
+ int anyAddr = TestLibrary.Generator.GetInt32(-55);
+ System.IntPtr ip1 = new IntPtr(anyAddr);
+ System.IntPtr ip2 = new IntPtr(anyAddr);
+ if (!ip1.Equals(ip2))
+ {
+ TestLibrary.TestFramework.LogError("003", "expect two IntPtr equals");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ [SecuritySafeCritical]
+ unsafe public bool NegTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ byte* mem1 = stackalloc byte[1];
+ byte* mem2 = stackalloc byte[1];
+ mem1[0] = mem1[0] = TestLibrary.Generator.GetByte(-55);
+ System.IntPtr ip1 = new IntPtr((void*)mem1);
+ System.IntPtr ip2 = new IntPtr((void*)mem2);
+ if (ip1.Equals(ip2))
+ {
+ TestLibrary.TestFramework.LogError("001", "expect two IntPtrs NOT equals");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ int anyAddr = TestLibrary.Generator.GetInt32(-55);
+ if (anyAddr == Int32.MaxValue)
+ anyAddr -= 1;
+ else if (anyAddr == Int32.MinValue)
+ anyAddr += 1;
+
+ System.IntPtr ip1 = new IntPtr(anyAddr);
+ System.IntPtr ip2 = new IntPtr(anyAddr + 1);
+ System.IntPtr ip3 = new IntPtr(anyAddr - 1);
+ if (ip1.Equals(ip2))
+ {
+ TestLibrary.TestFramework.LogError("002", "expect two IntPtrs NOT equals");
+ retVal = false;
+ }
+
+ if (ip1.Equals(ip3))
+ {
+ TestLibrary.TestFramework.LogError("002", "expect two IntPtrs NOT equals");
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ [SecuritySafeCritical]
+ unsafe public bool NegTest3()
+ {
+ bool retVal = true;
+ try
+ {
+ object o = new Object();
+ System.IntPtr ip = new IntPtr(TestLibrary.Generator.GetInt32(-55));
+ if (ip.Equals(o))
+ {
+ TestLibrary.TestFramework.LogError("003", "expect IntPtr NOT equals an object referece");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/intptr/intptrgethashcode.cs b/tests/src/CoreMangLib/cti/system/intptr/intptrgethashcode.cs
new file mode 100644
index 0000000000..ffc46c7d58
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/intptr/intptrgethashcode.cs
@@ -0,0 +1,156 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Security;
+
+public class IntPtrGetHashCode
+{
+
+ public static int Main()
+ {
+ IntPtrGetHashCode testCase = new IntPtrGetHashCode();
+
+ TestLibrary.TestFramework.BeginTestCase("IntPtr.GetHashCode()");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ System.IntPtr ip = new IntPtr(0);
+ if (ip.GetHashCode() != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "expect IntPtr(0).GetHashCode() == 0");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ [SecuritySafeCritical]
+ unsafe public bool PosTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ byte* mem = stackalloc byte[1024];
+ System.IntPtr ip = new IntPtr((void*)mem);
+ if (System.IntPtr.Size == 4)
+ {
+ if (ip.GetHashCode() != (int)mem)
+ {
+ TestLibrary.TestFramework.LogError("002", "expect IntPtr.GetHashCode() equals the address");
+ retVal = false;
+ }
+ }
+ else if (System.IntPtr.Size == 8)
+ {
+ if (ip.GetHashCode() != ((int)mem ^ (int)((long)mem >> 32)))
+ {
+ TestLibrary.TestFramework.LogError("002", "expect IntPtr.GetHashCode() equals the address xor halves");
+ retVal = false;
+ }
+ }
+ else
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected IntPtr.Size: " + System.IntPtr.Size);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ try
+ {
+ int anyAddr = TestLibrary.Generator.GetInt32(-55);
+ System.IntPtr ip = new IntPtr(anyAddr);
+ if (ip.GetHashCode() != anyAddr )
+ {
+ TestLibrary.TestFramework.LogError("003", String.Format("expect IntPtr.GetHashCode() == {0}", anyAddr));
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ try
+ {
+ long addressOne = 0x123456FFFFFFFFL;
+ long addressTwo = 0x654321FFFFFFFFL;
+ System.IntPtr ipOne = new IntPtr(addressOne);
+ System.IntPtr ipTwo = new IntPtr(addressTwo);
+ if (ipOne.GetHashCode() == ipTwo.GetHashCode())
+ {
+ TestLibrary.TestFramework.LogError("004", "expect different hashcodes.");
+ retVal = false;
+ }
+ }
+ catch (System.OverflowException ex)
+ {
+ if (System.IntPtr.Size == 4)
+ {
+ // ok, that's what it should be
+ return retVal;
+ }
+ else
+ {
+ TestLibrary.TestFramework.LogError("004", "IntPtr should not have thrown an OverflowException: " + ex.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/intptr/intptrtoint32.cs b/tests/src/CoreMangLib/cti/system/intptr/intptrtoint32.cs
new file mode 100644
index 0000000000..bd9e3d867b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/intptr/intptrtoint32.cs
@@ -0,0 +1,146 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+
+
+namespace ToInt32
+{
+ class IntPtrToInt32
+ {
+ public static int Main()
+ {
+ IntPtrToInt32 dek = new IntPtrToInt32();
+ TestLibrary.TestFramework.BeginTestCase("IntPtrToInt32");
+ if (dek.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+
+
+ }
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: int32.minvalue");
+ try
+ {
+ IntPtr ip = new IntPtr(Int32.MinValue);
+ if (ip.ToInt32() != Int32.MinValue)
+ {
+
+ TestLibrary.TestFramework.LogError("001", "value is not int32.minvalue as expected");
+
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+
+ }
+ return retVal;
+
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: int32.maxvalue");
+ try
+ {
+ IntPtr ip = new IntPtr(Int32.MaxValue);
+ if (ip.ToInt32() != Int32.MaxValue)
+ {
+
+ TestLibrary.TestFramework.LogError("003", "value is not int32.maxvalue as expected");
+
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+
+ }
+ return retVal;
+
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: int32.maxvalue-1");
+ try
+ {
+ IntPtr ip = new IntPtr(Int32.MaxValue - 1);
+ if (ip.ToInt32() != Int32.MaxValue - 1)
+ {
+
+ TestLibrary.TestFramework.LogError("005", "value is not int32.maxvalue-1 as expected");
+
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+
+ }
+ return retVal;
+
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: random int32 ");
+ try
+ {
+ int i = TestLibrary.Generator.GetInt32(-55);
+ IntPtr ip = new IntPtr(i);
+ if (ip.ToInt32() != i)
+ {
+
+ TestLibrary.TestFramework.LogError("007", "value is not the random number as expected");
+
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+
+ }
+ return retVal;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/intptr/intptrtoint64.cs b/tests/src/CoreMangLib/cti/system/intptr/intptrtoint64.cs
new file mode 100644
index 0000000000..c853bcbe07
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/intptr/intptrtoint64.cs
@@ -0,0 +1,139 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ToInt64
+{
+ class IntPtrToInt64
+ {
+ public static int Main()
+ {
+ IntPtrToInt64 dek = new IntPtrToInt64();
+ TestLibrary.TestFramework.BeginTestCase(" IntPtrToInt64");
+ if (dek.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: int32.minvalue");
+ try
+ {
+ IntPtr ip = new IntPtr(Int32.MinValue);
+ if (ip.ToInt64() != Int32.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "value is not int32.minvalue as expected");
+
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: int32.maxvalue");
+ try
+ {
+ IntPtr ip = new IntPtr(Int32.MaxValue);
+ if (ip.ToInt64() != Int32.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "value is not int32.maxvalue as expected");
+
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: random int32 ");
+ try
+ {
+ int i = TestLibrary.Generator.GetInt32(-55);
+ IntPtr ip = new IntPtr(i);
+ if (ip.ToInt64() != i)
+ {
+ TestLibrary.TestFramework.LogError("005", "value is not the random number as expected");
+
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: int64.maxvalue");
+ try
+ {
+ long i = Int64.MaxValue;
+ System.IntPtr ip = new IntPtr(i);
+ }
+ catch (System.OverflowException)
+ {
+ if (IntPtr.Size == 8)
+ {
+ TestLibrary.TestFramework.LogError("007", "64bit machine would not be Overflowed! ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/intptr/intptrtopointer.cs b/tests/src/CoreMangLib/cti/system/intptr/intptrtopointer.cs
new file mode 100644
index 0000000000..10105ecefe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/intptr/intptrtopointer.cs
@@ -0,0 +1,137 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Security;
+
+namespace ToPointer
+{
+ class IntPtrToPointer
+ {
+ static int Main()
+ {
+ IntPtrToPointer dek = new IntPtrToPointer();
+ TestLibrary.TestFramework.BeginTestCase("IntPtrToPointer");
+ if (dek.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+
+ return retVal;
+
+
+ }
+
+ [SecuritySafeCritical]
+ unsafe public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: int*");
+ try
+ {
+ int i = Int32.MaxValue;
+ IntPtr ptr1 = new IntPtr((void*)&i);
+ int* iAddress = (int*)ptr1.ToPointer();
+ if (iAddress != &i)
+ {
+ TestLibrary.TestFramework.LogError("001", "the address is not equal to the i ");
+ }
+
+
+
+
+
+ }
+ catch(Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+
+ }
+ return retVal;
+
+ }
+
+ [SecuritySafeCritical]
+ unsafe public bool PosTest2()
+ {
+ bool retVal = true;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: char*");
+ try
+ {
+
+ char i = 'h';
+
+ IntPtr ptr1 = new IntPtr((void*)&i);
+
+ char* iAddress = (char*)ptr1.ToPointer();
+
+ if (iAddress != &i)
+ {
+ TestLibrary.TestFramework.LogError("003", "the address is not equal to the i ");
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+
+ }
+
+ [SecuritySafeCritical]
+ unsafe public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: read bool address ");
+ try
+ {
+
+ bool i = true ;
+
+ IntPtr ptr1 = new IntPtr((void*)&i);
+
+ bool* iAddress = (bool*)ptr1.ToPointer();
+
+ if (*iAddress != true)
+ {
+ TestLibrary.TestFramework.LogError("005", "the value match the address is not equal to the value of i ");
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/intptr/intptrtostring.cs b/tests/src/CoreMangLib/cti/system/intptr/intptrtostring.cs
new file mode 100644
index 0000000000..09c2bd4d8c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/intptr/intptrtostring.cs
@@ -0,0 +1,109 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace IntPtrToString
+{
+ class IntPtrToString
+ {
+ public static int Main()
+ {
+ IntPtrToString dek = new IntPtrToString();
+ TestLibrary.TestFramework.BeginTestCase(" IntPtrToString");
+ if (dek.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+
+
+ }
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: test ToString()");
+ try
+ {
+ int i = 0;
+ IntPtr ip = new IntPtr(i);
+ if (ip.ToString() != i.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "not equal!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: check the value of string");
+ try
+ {
+ long long1 = 123456789;
+
+ if (long1.ToString() != "123456789" )
+ {
+
+ TestLibrary.TestFramework.LogError("003", "ToString() did not works correctly");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: check ToString() is equal to Int64.ToString() ");
+ try
+ {
+ int ip = 010234;
+ IntPtr ptr = new IntPtr(ip);
+ if ( ptr.ToInt64().ToString() != ip.ToString())
+ {
+
+ TestLibrary.TestFramework.LogError("005", "Int64.ToString() is not equivalent to IntPtr.ToString()");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+
+ }
+ return retVal;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/intptr/intptrzero.cs b/tests/src/CoreMangLib/cti/system/intptr/intptrzero.cs
new file mode 100644
index 0000000000..4b907b7a7e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/intptr/intptrzero.cs
@@ -0,0 +1,101 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class IntPtrZero
+{
+
+ public static int Main()
+ {
+ IntPtrZero testCase = new IntPtrZero();
+
+ TestLibrary.TestFramework.BeginTestCase("IntPtr.Zero");
+ if (testCase.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ System.IntPtr ip = new IntPtr(0);
+ if (ip != IntPtr.Zero)
+ {
+ TestLibrary.TestFramework.LogError("001", "expect new IntPtr(0) == IntPtr.Zero");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ try
+ {
+ System.IntPtr ip = new IntPtr((long)0);
+ if (ip != IntPtr.Zero)
+ {
+ TestLibrary.TestFramework.LogError("002", "expect new IntPtr((long)0) == IntPtr.Zero");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ try
+ {
+ System.IntPtr ip = new IntPtr(123);
+ if (ip == IntPtr.Zero)
+ {
+ TestLibrary.TestFramework.LogError("001", "expect new IntPtr(123) != IntPtr.Zero");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/invalidcastexception/InvalidCastExceptionctor1.csproj b/tests/src/CoreMangLib/cti/system/invalidcastexception/InvalidCastExceptionctor1.csproj
new file mode 100644
index 0000000000..ebc10103c6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/invalidcastexception/InvalidCastExceptionctor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="invalidcastexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/invalidcastexception/InvalidCastExceptionctor2.csproj b/tests/src/CoreMangLib/cti/system/invalidcastexception/InvalidCastExceptionctor2.csproj
new file mode 100644
index 0000000000..f0f006a34e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/invalidcastexception/InvalidCastExceptionctor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="invalidcastexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/invalidcastexception/InvalidCastExceptionctor3.csproj b/tests/src/CoreMangLib/cti/system/invalidcastexception/InvalidCastExceptionctor3.csproj
new file mode 100644
index 0000000000..882d567602
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/invalidcastexception/InvalidCastExceptionctor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="invalidcastexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/invalidcastexception/invalidcastexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/invalidcastexception/invalidcastexceptionctor1.cs
new file mode 100644
index 0000000000..609e049581
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/invalidcastexception/invalidcastexceptionctor1.cs
@@ -0,0 +1,56 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// System.InvalidCastException.ctor()
+/// </summary>
+public class InvalidCastExceptionctor1
+{
+ public static int Main()
+ {
+ InvalidCastExceptionctor1 invalidCastExceptionctor1 = new InvalidCastExceptionctor1();
+ TestLibrary.TestFramework.BeginTestCase("InvalidCastExceptionctor1");
+ if (invalidCastExceptionctor1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Initialize the InvalidCastException instance");
+ try
+ {
+ InvalidCastException myException = new InvalidCastException();
+ if (myException == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "the InvalidCastException instance creating failed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/invalidcastexception/invalidcastexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/invalidcastexception/invalidcastexceptionctor2.cs
new file mode 100644
index 0000000000..0349ba40be
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/invalidcastexception/invalidcastexceptionctor2.cs
@@ -0,0 +1,79 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// System.InvalidCastException.ctor(String) [v-minch]
+/// </summary>
+public class InvalidCastExceptionctor2
+{
+ public static int Main()
+ {
+ InvalidCastExceptionctor2 invalidCastExceptionctor2 = new InvalidCastExceptionctor2();
+ TestLibrary.TestFramework.BeginTestCase("InvalidCastExceptionctor2");
+ if (invalidCastExceptionctor2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Initialize the InvalidCastException instance with message 1");
+ try
+ {
+ string message = "HelloWorld";
+ InvalidCastException myException = new InvalidCastException(message);
+ if (myException == null || myException.Message != message)
+ {
+ TestLibrary.TestFramework.LogError("001", "the InvalidCastException with message instance creating failed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Initialize the InvalidCastException instance with message 2");
+ try
+ {
+ string message = null;
+ InvalidCastException myException = new InvalidCastException(message);
+ if (myException == null || myException.Message == null)
+ {
+ TestLibrary.TestFramework.LogError("003", "Initialize the InvalidCastException instance with null message not create");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/invalidcastexception/invalidcastexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/invalidcastexception/invalidcastexceptionctor3.cs
new file mode 100644
index 0000000000..9ce234f905
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/invalidcastexception/invalidcastexceptionctor3.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// System.InvalidCastException.ctor(String,Exception) [v-minch]
+/// </summary>
+public class InvalidCastExceptionctor3
+{
+ public static int Main()
+ {
+ InvalidCastExceptionctor3 invalidCastExceptionctor3 = new InvalidCastExceptionctor3();
+ TestLibrary.TestFramework.BeginTestCase("InvalidCastExceptionctor3");
+ if (invalidCastExceptionctor3.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Initialize the InvalidCastException instance with message and InnerException 1");
+ try
+ {
+ string message = "HelloWorld";
+ ArgumentException innerException = new ArgumentException();
+ InvalidCastException myException = new InvalidCastException(message, innerException);
+ if (myException == null || myException.Message != message || !myException.InnerException.Equals(innerException))
+ {
+ TestLibrary.TestFramework.LogError("001", "the InvalidCastException with message and innerException instance creating failed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Initialize the InvalidCastException instance with message and InnerException 2");
+ try
+ {
+ string message = null;
+ ArgumentException innerException = new ArgumentException();
+ InvalidCastException myException = new InvalidCastException(message, innerException);
+ if (myException == null || myException.Message == null || !myException.InnerException.Equals(innerException))
+ {
+ TestLibrary.TestFramework.LogError("003", "Initialize the InvalidCastException instance with null message not succeed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Initialize the InvalidCastException instance with message and InnerException 3");
+ try
+ {
+ string message = null;
+ InvalidCastException myException = new InvalidCastException(message, null);
+ if (myException == null || myException.Message == null || myException.InnerException != null)
+ {
+ TestLibrary.TestFramework.LogError("005", "Initialize the InvalidCastException instance with null message and null InnerException not succeed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/invalidoperationexception/InvalidOperationExceptionctor1.csproj b/tests/src/CoreMangLib/cti/system/invalidoperationexception/InvalidOperationExceptionctor1.csproj
new file mode 100644
index 0000000000..a4d4789ab3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/invalidoperationexception/InvalidOperationExceptionctor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="invalidoperationexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/invalidoperationexception/InvalidOperationExceptionctor2.csproj b/tests/src/CoreMangLib/cti/system/invalidoperationexception/InvalidOperationExceptionctor2.csproj
new file mode 100644
index 0000000000..f1d889deb5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/invalidoperationexception/InvalidOperationExceptionctor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="invalidoperationexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/invalidoperationexception/InvalidOperationExceptionctor3.csproj b/tests/src/CoreMangLib/cti/system/invalidoperationexception/InvalidOperationExceptionctor3.csproj
new file mode 100644
index 0000000000..a54db9d67e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/invalidoperationexception/InvalidOperationExceptionctor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="invalidoperationexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/invalidoperationexception/invalidoperationexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/invalidoperationexception/invalidoperationexceptionctor1.cs
new file mode 100644
index 0000000000..12b9da20b1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/invalidoperationexception/invalidoperationexceptionctor1.cs
@@ -0,0 +1,56 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// InvalidOperationException.ctor() [v-minch]
+/// </summary>
+public class InvalidOperationExceptionctor1
+{
+ public static int Main()
+ {
+ InvalidOperationExceptionctor1 invalidOperationExceptionctor1 = new InvalidOperationExceptionctor1();
+ TestLibrary.TestFramework.BeginTestCase("InvalidOperationExceptionctor1");
+ if (invalidOperationExceptionctor1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Initialize the InvalidOperationException instance");
+ try
+ {
+ InvalidOperationException myException = new InvalidOperationException();
+ if (myException == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "the InvalidOperationException instance creating failed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/invalidoperationexception/invalidoperationexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/invalidoperationexception/invalidoperationexceptionctor2.cs
new file mode 100644
index 0000000000..6a0082c377
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/invalidoperationexception/invalidoperationexceptionctor2.cs
@@ -0,0 +1,80 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// InvalidOperationException.ctor(String) [v-minch]
+/// </summary>
+public class InvalidOperationExceptionctor2
+{
+ public static int Main()
+ {
+ InvalidOperationExceptionctor2 invalidOperationExceptionctor2 = new InvalidOperationExceptionctor2();
+ TestLibrary.TestFramework.BeginTestCase("InvalidOperationExceptionctor2");
+ if (invalidOperationExceptionctor2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Initialize the InvalidOperationException instance with message 1");
+ try
+ {
+ string message = "HelloWorld";
+ InvalidOperationException myException = new InvalidOperationException(message);
+ if (myException == null || myException.Message != message)
+ {
+ TestLibrary.TestFramework.LogError("001", "the InvalidOperationException with message instance creating failed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Initialize the InvalidOperationException instance with message 2");
+ try
+ {
+ string message = null;
+ InvalidOperationException myException = new InvalidOperationException(message);
+ if (myException == null || myException.Message == null)
+ {
+ TestLibrary.TestFramework.LogError("003", "Initialize the InvalidOperationException instance with null message not create");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/invalidoperationexception/invalidoperationexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/invalidoperationexception/invalidoperationexceptionctor3.cs
new file mode 100644
index 0000000000..2743f11d70
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/invalidoperationexception/invalidoperationexceptionctor3.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// InvalidOperationException.ctor(String,Exception) [v-minch]
+/// </summary>
+public class InvalidOperationExceptionctor3
+{
+ public static int Main()
+ {
+ InvalidOperationExceptionctor3 invalidOperationExceptionctor3 = new InvalidOperationExceptionctor3();
+ TestLibrary.TestFramework.BeginTestCase("InvalidOperationExceptionctor3");
+ if (invalidOperationExceptionctor3.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Initialize the InvalidOperationException instance with message and InnerException 1");
+ try
+ {
+ string message = "HelloWorld";
+ ArgumentException innerException = new ArgumentException();
+ InvalidOperationException myException = new InvalidOperationException(message, innerException);
+ if (myException == null || myException.Message != message || !myException.InnerException.Equals(innerException))
+ {
+ TestLibrary.TestFramework.LogError("001", "the InvalidOperationException with message and innerException instance creating failed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Initialize the InvalidOperationException instance with message and InnerException 2");
+ try
+ {
+ string message = null;
+ ArgumentException innerException = new ArgumentException();
+ InvalidOperationException myException = new InvalidOperationException(message, innerException);
+ if (myException == null || myException.Message == null || !myException.InnerException.Equals(innerException))
+ {
+ TestLibrary.TestFramework.LogError("003", "Initialize the InvalidOperationException instance with null message not succeed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Initialize the InvalidOperationException instance with message and InnerException 3");
+ try
+ {
+ string message = null;
+ InvalidOperationException myException = new InvalidOperationException(message, null);
+ if (myException == null || myException.Message == null || myException.InnerException != null)
+ {
+ TestLibrary.TestFramework.LogError("005", "Initialize the InvalidOperationException instance with null message and null InnerException not succeed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/invalidprogramexception/InvalidProgramExceptionctor1.csproj b/tests/src/CoreMangLib/cti/system/invalidprogramexception/InvalidProgramExceptionctor1.csproj
new file mode 100644
index 0000000000..ac93cb9c35
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/invalidprogramexception/InvalidProgramExceptionctor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="invalidprogramexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/invalidprogramexception/InvalidProgramExceptionctor2.csproj b/tests/src/CoreMangLib/cti/system/invalidprogramexception/InvalidProgramExceptionctor2.csproj
new file mode 100644
index 0000000000..3575b285b1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/invalidprogramexception/InvalidProgramExceptionctor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="invalidprogramexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/invalidprogramexception/InvalidProgramExceptionctor3.csproj b/tests/src/CoreMangLib/cti/system/invalidprogramexception/InvalidProgramExceptionctor3.csproj
new file mode 100644
index 0000000000..da6b87d733
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/invalidprogramexception/InvalidProgramExceptionctor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="invalidprogramexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/invalidprogramexception/invalidprogramexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/invalidprogramexception/invalidprogramexceptionctor1.cs
new file mode 100644
index 0000000000..e150c5612d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/invalidprogramexception/invalidprogramexceptionctor1.cs
@@ -0,0 +1,56 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// InvalidProgramException.ctor() [v-minch]
+/// </summary>
+public class InvalidProgramExceptionctor1
+{
+ public static int Main()
+ {
+ InvalidProgramExceptionctor1 invalidProgramExceptionctor1 = new InvalidProgramExceptionctor1();
+ TestLibrary.TestFramework.BeginTestCase("InvalidProgramExceptionctor1");
+ if (invalidProgramExceptionctor1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Initialize the InvalidProgramException instance");
+ try
+ {
+ InvalidProgramException myException = new InvalidProgramException();
+ if (myException == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "the InvalidProgramException instance creating failed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/invalidprogramexception/invalidprogramexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/invalidprogramexception/invalidprogramexceptionctor2.cs
new file mode 100644
index 0000000000..c1c5860b70
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/invalidprogramexception/invalidprogramexceptionctor2.cs
@@ -0,0 +1,79 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// InvalidProgramException.ctor(String) [v-minch]
+/// </summary>
+public class InvalidProgramExceptionctor2
+{
+ public static int Main()
+ {
+ InvalidProgramExceptionctor2 invalidProgramExceptionctor2 = new InvalidProgramExceptionctor2();
+ TestLibrary.TestFramework.BeginTestCase("InvalidProgramExceptionctor2");
+ if (invalidProgramExceptionctor2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Initialize the InvalidProgramException instance with message 1");
+ try
+ {
+ string message = "HelloWorld";
+ InvalidProgramException myException = new InvalidProgramException(message);
+ if (myException == null || myException.Message != message)
+ {
+ TestLibrary.TestFramework.LogError("001", "the InvalidProgramException with message instance creating failed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Initialize the InvalidProgramException instance with message 2");
+ try
+ {
+ string message = null;
+ InvalidProgramException myException = new InvalidProgramException(message);
+ if (myException == null || myException.Message == null)
+ {
+ TestLibrary.TestFramework.LogError("003", "Initialize the InvalidProgramException instance with null message not create");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/invalidprogramexception/invalidprogramexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/invalidprogramexception/invalidprogramexceptionctor3.cs
new file mode 100644
index 0000000000..f93785f27c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/invalidprogramexception/invalidprogramexceptionctor3.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// InvalidProgramException.ctor(String,Exception) [v-minch]
+/// </summary>
+public class InvalidProgramExceptionctor3
+{
+ public static int Main()
+ {
+ InvalidProgramExceptionctor3 invalidProgramExceptionctor3 = new InvalidProgramExceptionctor3();
+ TestLibrary.TestFramework.BeginTestCase("InvalidProgramExceptionctor3");
+ if (invalidProgramExceptionctor3.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Initialize the InvalidProgramException instance with message and InnerException 1");
+ try
+ {
+ string message = "HelloWorld";
+ ArgumentException innerException = new ArgumentException();
+ InvalidProgramException myException = new InvalidProgramException(message, innerException);
+ if (myException == null || myException.Message != message || !myException.InnerException.Equals(innerException))
+ {
+ TestLibrary.TestFramework.LogError("001", "the InvalidProgramException with message and innerException instance creating failed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Initialize the InvalidProgramException instance with message and InnerException 2");
+ try
+ {
+ string message = null;
+ ArgumentException innerException = new ArgumentException();
+ InvalidProgramException myException = new InvalidProgramException(message, innerException);
+ if (myException == null || myException.Message == null || !myException.InnerException.Equals(innerException))
+ {
+ TestLibrary.TestFramework.LogError("003", "Initialize the InvalidProgramException instance with null message not succeed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Initialize the InvalidProgramException instance with message and InnerException 3");
+ try
+ {
+ string message = null;
+ InvalidProgramException myException = new InvalidProgramException(message, null);
+ if (myException == null || myException.Message == null || myException.InnerException != null)
+ {
+ TestLibrary.TestFramework.LogError("005", "Initialize the InvalidProgramException instance with null message and null InnerException not succeed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/binarywriter/BinaryWriterOutStream_PSC.csproj b/tests/src/CoreMangLib/cti/system/io/binarywriter/BinaryWriterOutStream_PSC.csproj
new file mode 100644
index 0000000000..7d53d43895
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/binarywriter/BinaryWriterOutStream_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="binarywriteroutstream.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/binarywriter/binarywriteroutstream.cs b/tests/src/CoreMangLib/cti/system/io/binarywriter/binarywriteroutstream.cs
new file mode 100644
index 0000000000..62a9ba6fc8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/binarywriter/binarywriteroutstream.cs
@@ -0,0 +1,194 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.IO;
+
+[SecuritySafeCritical]
+public class TestSubBinaryWriter : BinaryWriter
+{
+ public Stream GetOutStream
+ {
+ get
+ {
+ return OutStream;
+ }
+ }
+
+ public TestSubBinaryWriter(Stream output) : base(output)
+ {
+ }
+
+ public TestSubBinaryWriter() : base()
+ {
+ }
+}
+
+[SecuritySafeCritical]
+public class TestBinaryWriterOutStreamStream : Stream
+{
+ public const int c_DEFAULT_VALUE = 0;
+ public int m_Value = c_DEFAULT_VALUE;
+
+ public override bool CanRead
+ {
+ [SecuritySafeCritical]
+ get { return true; }
+ }
+
+ public override bool CanSeek
+ {
+ [SecuritySafeCritical]
+ get { return true; }
+ }
+
+ public override bool CanWrite
+ {
+ [SecuritySafeCritical]
+ get { return true; }
+ }
+
+ [SecuritySafeCritical]
+ public override void Flush()
+ {
+ }
+
+ public override long Length
+ {
+ [SecuritySafeCritical]
+ get { return 0L; }
+ }
+
+ public override long Position
+ {
+ [SecuritySafeCritical]
+ get
+ {
+ return 0L;
+ }
+ [SecuritySafeCritical]
+ set
+ {
+ }
+ }
+
+ [SecuritySafeCritical]
+ public override int Read(byte[] buffer, int offset, int count)
+ {
+ return count;
+ }
+
+ [SecuritySafeCritical]
+ public override long Seek(long offset, SeekOrigin origin)
+ {
+ return 0L;
+ }
+
+ [SecuritySafeCritical]
+ public override void SetLength(long value)
+ {
+ }
+
+ [SecuritySafeCritical]
+ public override void Write(byte[] buffer, int offset, int count)
+ {
+ m_Value++;
+ }
+}
+
+/// <summary>
+/// OutStream
+/// </summary>
+[SecuritySafeCritical]
+public class BinaryWriterOutStream
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check to see whether OutStream is set correctly");
+
+ try
+ {
+ TestSubBinaryWriter writer = new TestSubBinaryWriter(Stream.Null);
+
+ if (writer.GetOutStream != Stream.Null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "OutStream is not set correctly");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check to see whether OutStream works");
+
+ try
+ {
+ TestBinaryWriterOutStreamStream stream = new TestBinaryWriterOutStreamStream();
+ TestSubBinaryWriter writer = new TestSubBinaryWriter(stream);
+ writer.Write(TestLibrary.Generator.GetInt32(-55));
+
+ if (stream.m_Value != TestBinaryWriterOutStreamStream.c_DEFAULT_VALUE + 1)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "OutStream does not work");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ BinaryWriterOutStream test = new BinaryWriterOutStream();
+
+ TestLibrary.TestFramework.BeginTestCase("BinaryWriterOutStream");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/directorynotfoundexception/DirectoryNotFoundExceptionctor1.csproj b/tests/src/CoreMangLib/cti/system/io/directorynotfoundexception/DirectoryNotFoundExceptionctor1.csproj
new file mode 100644
index 0000000000..bc4acbb5eb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/directorynotfoundexception/DirectoryNotFoundExceptionctor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="directorynotfoundexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/directorynotfoundexception/DirectoryNotFoundExceptionctor2.csproj b/tests/src/CoreMangLib/cti/system/io/directorynotfoundexception/DirectoryNotFoundExceptionctor2.csproj
new file mode 100644
index 0000000000..1f3a4c0b25
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/directorynotfoundexception/DirectoryNotFoundExceptionctor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="directorynotfoundexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/directorynotfoundexception/directorynotfoundexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/io/directorynotfoundexception/directorynotfoundexceptionctor1.cs
new file mode 100644
index 0000000000..987a6bb135
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/directorynotfoundexception/directorynotfoundexceptionctor1.cs
@@ -0,0 +1,123 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+///ctor(System.String)
+/// </summary>
+public class DirectoryNotFoundExceptionctor1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Create a new DirectoryNotFoundException instance.");
+
+ try
+ {
+ string expectString = "This is an error";
+ DirectoryNotFoundException myException = new DirectoryNotFoundException(expectString);
+ if (myException.Message != expectString)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "the DirectoryNotFoundException ctor error occurred.the message should be " + expectString);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Create a new DirectoryNotFoundException instance,string is empty.");
+
+ try
+ {
+ string expectString = string.Empty;
+ DirectoryNotFoundException myException = new DirectoryNotFoundException(expectString);
+ if (myException.Message != expectString)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "the DirectoryNotFoundException ctor error occurred. the message should be " + expectString);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Create a new DirectoryNotFoundException instance,string is null.");
+
+ try
+ {
+ string expectString = null;
+ DirectoryNotFoundException myException = new DirectoryNotFoundException(expectString);
+ if (myException == null)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "the DirectoryNotFoundException ctor error occurred. the message should be null");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DirectoryNotFoundExceptionctor1 test = new DirectoryNotFoundExceptionctor1();
+
+ TestLibrary.TestFramework.BeginTestCase("DirectoryNotFoundExceptionctor1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/directorynotfoundexception/directorynotfoundexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/io/directorynotfoundexception/directorynotfoundexceptionctor2.cs
new file mode 100644
index 0000000000..6d67bd416d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/directorynotfoundexception/directorynotfoundexceptionctor2.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+///ctor
+/// </summary>
+public class DirectoryNotFoundExceptionctor2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Create a new DirectoryNotFoundException instance.");
+
+ try
+ {
+ DirectoryNotFoundException myException = new DirectoryNotFoundException();
+ if (myException==null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "the DirectoryNotFoundException ctor error occurred. ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ DirectoryNotFoundExceptionctor2 test = new DirectoryNotFoundExceptionctor2();
+
+ TestLibrary.TestFramework.BeginTestCase("DirectoryNotFoundExceptionctor2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/endofstreamexception/endofstreamexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/io/endofstreamexception/endofstreamexceptionctor1.cs
new file mode 100644
index 0000000000..f7fca75b30
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/endofstreamexception/endofstreamexceptionctor1.cs
@@ -0,0 +1,74 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.IO;
+
+[SecuritySafeCritical]
+/// <summary>
+///ctor
+/// </summary>
+public class EndOfStreamExceptionctor1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Create a new EndOfStreamException instance.");
+
+ try
+ {
+ //Create the application domain setup information.
+ EndOfStreamException myEndOfStreamException = new EndOfStreamException();
+ if (myEndOfStreamException == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "the EndOfStreamException ctor error occurred. ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ EndOfStreamExceptionctor1 test = new EndOfStreamExceptionctor1();
+
+ TestLibrary.TestFramework.BeginTestCase("EndOfStreamExceptionctor1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/endofstreamexception/endofstreamexceptionctor1_PSC.csproj b/tests/src/CoreMangLib/cti/system/io/endofstreamexception/endofstreamexceptionctor1_PSC.csproj
new file mode 100644
index 0000000000..22876c4a35
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/endofstreamexception/endofstreamexceptionctor1_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="endofstreamexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/endofstreamexception/endofstreamexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/io/endofstreamexception/endofstreamexceptionctor2.cs
new file mode 100644
index 0000000000..fb9699b7a1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/endofstreamexception/endofstreamexceptionctor2.cs
@@ -0,0 +1,128 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.IO;
+
+[SecuritySafeCritical]
+/// <summary>
+///ctor(System.String)
+/// </summary>
+public class EndOfStreamExceptionctor2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Create a new EndofStreamException instance.");
+
+ try
+ {
+ string expectString = "this is a error";
+ //Create the application domain setup information.
+ EndOfStreamException myEndOfStreamException = new EndOfStreamException(expectString);
+ if (myEndOfStreamException.Message != expectString)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "the EndofStreamException ctor error occurred,the message should be " + expectString);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Create a new EndofStreamException instance,string is empty.");
+
+ try
+ {
+ string expectString = string.Empty;
+ //Create the application domain setup information.
+ EndOfStreamException myEndOfStreamException = new EndOfStreamException(expectString);
+ if (myEndOfStreamException.Message != expectString)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "the EndofStreamException ctor error occurred.the message should be " + expectString);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Create a new EndofStreamException instance,string is null,then its inner exception set to a null reference .");
+
+ try
+ {
+ string expectString = null;
+ //Create the application domain setup information.
+ EndOfStreamException myEndOfStreamException = new EndOfStreamException(expectString);
+ if (myEndOfStreamException == null)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "the EndofStreamException ctor error occurred. the message should be null" );
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ EndOfStreamExceptionctor2 test = new EndOfStreamExceptionctor2();
+
+ TestLibrary.TestFramework.BeginTestCase("EndOfStreamExceptionctor2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/endofstreamexception/endofstreamexceptionctor2_PSC.csproj b/tests/src/CoreMangLib/cti/system/io/endofstreamexception/endofstreamexceptionctor2_PSC.csproj
new file mode 100644
index 0000000000..90bd0a1dc6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/endofstreamexception/endofstreamexceptionctor2_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="endofstreamexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileaccess/FileAccessEnum.csproj b/tests/src/CoreMangLib/cti/system/io/fileaccess/FileAccessEnum.csproj
new file mode 100644
index 0000000000..6482386565
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileaccess/FileAccessEnum.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fileaccessenum.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileaccess/FileAccessRead.csproj b/tests/src/CoreMangLib/cti/system/io/fileaccess/FileAccessRead.csproj
new file mode 100644
index 0000000000..cf95f4415d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileaccess/FileAccessRead.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fileaccessread.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileaccess/FileAccessReadWrite.csproj b/tests/src/CoreMangLib/cti/system/io/fileaccess/FileAccessReadWrite.csproj
new file mode 100644
index 0000000000..342a6e429e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileaccess/FileAccessReadWrite.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fileaccessreadwrite.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileaccess/FileAccessWrite.csproj b/tests/src/CoreMangLib/cti/system/io/fileaccess/FileAccessWrite.csproj
new file mode 100644
index 0000000000..cae58e4ab2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileaccess/FileAccessWrite.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fileaccesswrite.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileaccess/fileaccessenum.cs b/tests/src/CoreMangLib/cti/system/io/fileaccess/fileaccessenum.cs
new file mode 100644
index 0000000000..6024f3b36d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileaccess/fileaccessenum.cs
@@ -0,0 +1,68 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+using System.Reflection;
+
+public class FileAccessEnum
+{
+ public static int Main()
+ {
+ FileAccessEnum ac = new FileAccessEnum();
+
+ TestLibrary.TestFramework.BeginTestCase("FileAccessEnum");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ int enumValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: FileAccessEnum");
+
+ try
+ {
+ enumValue = (int)FileAccess.Read;
+
+ if (1 != enumValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected value: Expected(1) Actual("+enumValue+")");
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/fileaccess/fileaccessread.cs b/tests/src/CoreMangLib/cti/system/io/fileaccess/fileaccessread.cs
new file mode 100644
index 0000000000..3b7e0b7b5a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileaccess/fileaccessread.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+/// System.IO.FileAccess.Read
+/// </summary>
+public class FileAccessRead
+{
+ static public int Main()
+ {
+ FileAccessRead test = new FileAccessRead();
+
+ TestLibrary.TestFramework.BeginTestCase("System.IO.FileAccess.Read");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the FileAccess.Read value is 1...";
+ const string c_TEST_ID = "P001";
+ FileAccess FLAG_VALUE = (FileAccess)1;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (FileAccess.Read != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + FileAccess.Read.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileaccess/fileaccessreadwrite.cs b/tests/src/CoreMangLib/cti/system/io/fileaccess/fileaccessreadwrite.cs
new file mode 100644
index 0000000000..02d086848a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileaccess/fileaccessreadwrite.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+/// System.IO.FileAccess.ReadWrite
+/// </summary>
+public class FileAccessReadWrite
+{
+ static public int Main()
+ {
+ FileAccessReadWrite test = new FileAccessReadWrite();
+
+ TestLibrary.TestFramework.BeginTestCase("System.IO.FileAccess.ReadWrite");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the FileAccess.ReadWrite value is 3...";
+ const string c_TEST_ID = "P001";
+ FileAccess FLAG_VALUE = (FileAccess)3;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (FileAccess.ReadWrite != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + FileAccess.ReadWrite.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileaccess/fileaccesswrite.cs b/tests/src/CoreMangLib/cti/system/io/fileaccess/fileaccesswrite.cs
new file mode 100644
index 0000000000..87223f4c8f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileaccess/fileaccesswrite.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+/// System.IO.FileAccess.Write
+/// </summary>
+public class FileAccessWrite
+{
+ static public int Main()
+ {
+ FileAccessWrite test = new FileAccessWrite();
+
+ TestLibrary.TestFramework.BeginTestCase("System.IO.FileAccess.Write");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the FileAccess.Write value is 2...";
+ const string c_TEST_ID = "P001";
+ FileAccess FLAG_VALUE = (FileAccess)2;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (FileAccess.Write != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + FileAccess.Write.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesArchive.csproj b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesArchive.csproj
new file mode 100644
index 0000000000..0a43864c6d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesArchive.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fileattributesarchive.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesCompressed.csproj b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesCompressed.csproj
new file mode 100644
index 0000000000..05654dc037
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesCompressed.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fileattributescompressed.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesDeivce.csproj b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesDeivce.csproj
new file mode 100644
index 0000000000..d393db84d1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesDeivce.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fileattributesdeivce.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesDirectory.csproj b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesDirectory.csproj
new file mode 100644
index 0000000000..088733412e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesDirectory.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fileattributesdirectory.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesEncrypted.csproj b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesEncrypted.csproj
new file mode 100644
index 0000000000..7aba6ace0a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesEncrypted.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fileattributesencrypted.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesEnum.csproj b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesEnum.csproj
new file mode 100644
index 0000000000..4771e8d41e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesEnum.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fileattributesenum.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesHidden.csproj b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesHidden.csproj
new file mode 100644
index 0000000000..5c3265c5ca
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesHidden.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fileattributeshidden.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesNormal.csproj b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesNormal.csproj
new file mode 100644
index 0000000000..f40da41d49
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesNormal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fileattributesnormal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesNotContentIndexed.csproj b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesNotContentIndexed.csproj
new file mode 100644
index 0000000000..ac4048b395
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesNotContentIndexed.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fileattributesnotcontentindexed.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesOffline.csproj b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesOffline.csproj
new file mode 100644
index 0000000000..f165f8cacf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesOffline.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fileattributesoffline.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesReadOnly.csproj b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesReadOnly.csproj
new file mode 100644
index 0000000000..58ba24f050
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesReadOnly.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fileattributesreadonly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesReparsePoint.csproj b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesReparsePoint.csproj
new file mode 100644
index 0000000000..25d8b2e095
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesReparsePoint.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fileattributesreparsepoint.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesSystem.csproj b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesSystem.csproj
new file mode 100644
index 0000000000..bcaa378381
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesSystem.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fileattributessystem.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesTemporary.csproj b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesTemporary.csproj
new file mode 100644
index 0000000000..33a973693d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/FileAttributesTemporary.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fileattributestemporary.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesarchive.cs b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesarchive.cs
new file mode 100644
index 0000000000..896d9c4480
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesarchive.cs
@@ -0,0 +1,97 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+/// FileAttributes.Archive
+/// </summary>
+public class FileAttributesTest
+{
+ [Flags]
+ [System.Runtime.InteropServices.ComVisible(true)]
+ internal enum MyFileAttributes
+ {
+ ReadOnly = 0x1,
+ Hidden = 0x2,
+ System = 0x4,
+ Directory = 0x10,
+ Archive = 0x20,
+ Device = 0x40,
+ Normal = 0x80,
+ Temporary = 0x100,
+ SparseFile = 0x200,
+ ReparsePoint = 0x400,
+ Compressed = 0x800,
+ Offline = 0x1000,
+ NotContentIndexed = 0x2000,
+ Encrypted = 0x4000,
+ }
+
+ public static int Main()
+ {
+ FileAttributesTest testObj = new FileAttributesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for enumeration: FileAttributes.Archive");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: File attributes is Archive";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyFileAttributes.Archive;
+ actualValue = (int)FileAttributes.Archive;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Archive value of file attributes is not " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributescompressed.cs b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributescompressed.cs
new file mode 100644
index 0000000000..8a260a9590
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributescompressed.cs
@@ -0,0 +1,97 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+/// FileAttributes.Compressed
+/// </summary>
+public class FileAttributesTest
+{
+ [Flags]
+ [System.Runtime.InteropServices.ComVisible(true)]
+ internal enum MyFileAttributes
+ {
+ ReadOnly = 0x1,
+ Hidden = 0x2,
+ System = 0x4,
+ Directory = 0x10,
+ Archive = 0x20,
+ Device = 0x40,
+ Normal = 0x80,
+ Temporary = 0x100,
+ SparseFile = 0x200,
+ ReparsePoint = 0x400,
+ Compressed = 0x800,
+ Offline = 0x1000,
+ NotContentIndexed = 0x2000,
+ Encrypted = 0x4000,
+ }
+
+ public static int Main()
+ {
+ FileAttributesTest testObj = new FileAttributesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for enumeration: FileAttributes.Compressed");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: File attributes is Compressed";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyFileAttributes.Compressed;
+ actualValue = (int)FileAttributes.Compressed;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Compressed value of file attributes is not " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesdeivce.cs b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesdeivce.cs
new file mode 100644
index 0000000000..36e63896a9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesdeivce.cs
@@ -0,0 +1,97 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+/// FileAttributes.Device
+/// </summary>
+public class FileAttributesTest
+{
+ [Flags]
+ [System.Runtime.InteropServices.ComVisible(true)]
+ internal enum MyFileAttributes
+ {
+ ReadOnly = 0x1,
+ Hidden = 0x2,
+ System = 0x4,
+ Directory = 0x10,
+ Archive = 0x20,
+ Device = 0x40,
+ Normal = 0x80,
+ Temporary = 0x100,
+ SparseFile = 0x200,
+ ReparsePoint = 0x400,
+ Compressed = 0x800,
+ Offline = 0x1000,
+ NotContentIndexed = 0x2000,
+ Encrypted = 0x4000,
+ }
+
+ public static int Main()
+ {
+ FileAttributesTest testObj = new FileAttributesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for enumeration: FileAttributes.Device");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: File attributes is Device";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyFileAttributes.Device;
+ actualValue = (int)FileAttributes.Device;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Device value of file attributes is not " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesdirectory.cs b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesdirectory.cs
new file mode 100644
index 0000000000..6b01481157
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesdirectory.cs
@@ -0,0 +1,97 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+/// FileAttributes.Directory
+/// </summary>
+public class FileAttributesTest
+{
+ [Flags]
+ [System.Runtime.InteropServices.ComVisible(true)]
+ internal enum MyFileAttributes
+ {
+ ReadOnly = 0x1,
+ Hidden = 0x2,
+ System = 0x4,
+ Directory = 0x10,
+ Archive = 0x20,
+ Device = 0x40,
+ Normal = 0x80,
+ Temporary = 0x100,
+ SparseFile = 0x200,
+ ReparsePoint = 0x400,
+ Compressed = 0x800,
+ Offline = 0x1000,
+ NotContentIndexed = 0x2000,
+ Encrypted = 0x4000,
+ }
+
+ public static int Main()
+ {
+ FileAttributesTest testObj = new FileAttributesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for enumeration: FileAttributes.Directory");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: File attributes is Directory";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyFileAttributes.Directory;
+ actualValue = (int)FileAttributes.Directory;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Directory value of file attributes is not " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesencrypted.cs b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesencrypted.cs
new file mode 100644
index 0000000000..8bc0c43016
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesencrypted.cs
@@ -0,0 +1,97 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+/// FileAttributes.Encrypted
+/// </summary>
+public class FileAttributesTest
+{
+ [Flags]
+ [System.Runtime.InteropServices.ComVisible(true)]
+ internal enum MyFileAttributes
+ {
+ ReadOnly = 0x1,
+ Hidden = 0x2,
+ System = 0x4,
+ Directory = 0x10,
+ Archive = 0x20,
+ Device = 0x40,
+ Normal = 0x80,
+ Temporary = 0x100,
+ SparseFile = 0x200,
+ ReparsePoint = 0x400,
+ Compressed = 0x800,
+ Offline = 0x1000,
+ NotContentIndexed = 0x2000,
+ Encrypted = 0x4000,
+ }
+
+ public static int Main()
+ {
+ FileAttributesTest testObj = new FileAttributesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for enumeration: FileAttributes.Encrypted");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: File attributes is Encrypted";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyFileAttributes.Encrypted;
+ actualValue = (int)FileAttributes.Encrypted;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Encrypted value of file attributes is not " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesenum.cs b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesenum.cs
new file mode 100644
index 0000000000..442ce6cadc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesenum.cs
@@ -0,0 +1,66 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+using System.Reflection;
+
+public class FileAttributesEnum
+{
+ public static int Main()
+ {
+ FileAttributesEnum ac = new FileAttributesEnum();
+
+ TestLibrary.TestFramework.BeginTestCase("FileAttributesEnum");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ int enumValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: FileAttributesEnum");
+
+ try
+ {
+ enumValue = (int)FileAttributes.Directory;
+
+ if (16 != enumValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected value: Expected(16) Actual("+enumValue+")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributeshidden.cs b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributeshidden.cs
new file mode 100644
index 0000000000..bec820cfb7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributeshidden.cs
@@ -0,0 +1,97 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+/// FileAttributes.Hidden
+/// </summary>
+public class FileAttributesTest
+{
+ [Flags]
+ [System.Runtime.InteropServices.ComVisible(true)]
+ internal enum MyFileAttributes
+ {
+ ReadOnly = 0x1,
+ Hidden = 0x2,
+ System = 0x4,
+ Directory = 0x10,
+ Archive = 0x20,
+ Device = 0x40,
+ Normal = 0x80,
+ Temporary = 0x100,
+ SparseFile = 0x200,
+ ReparsePoint = 0x400,
+ Compressed = 0x800,
+ Offline = 0x1000,
+ NotContentIndexed = 0x2000,
+ Encrypted = 0x4000,
+ }
+
+ public static int Main()
+ {
+ FileAttributesTest testObj = new FileAttributesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for enumeration: FileAttributes.Hidden");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: File attributes is Hidden";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyFileAttributes.Hidden;
+ actualValue = (int)FileAttributes.Hidden;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Hidden value of file attributes is not " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesnormal.cs b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesnormal.cs
new file mode 100644
index 0000000000..ff2837dab6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesnormal.cs
@@ -0,0 +1,97 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+/// FileAttributes.Normal
+/// </summary>
+public class FileAttributesTest
+{
+ [Flags]
+ [System.Runtime.InteropServices.ComVisible(true)]
+ internal enum MyFileAttributes
+ {
+ ReadOnly = 0x1,
+ Hidden = 0x2,
+ System = 0x4,
+ Directory = 0x10,
+ Archive = 0x20,
+ Device = 0x40,
+ Normal = 0x80,
+ Temporary = 0x100,
+ SparseFile = 0x200,
+ ReparsePoint = 0x400,
+ Compressed = 0x800,
+ Offline = 0x1000,
+ NotContentIndexed = 0x2000,
+ Encrypted = 0x4000,
+ }
+
+ public static int Main()
+ {
+ FileAttributesTest testObj = new FileAttributesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for enumeration: FileAttributes.Normal");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: File attributes is Normal";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyFileAttributes.Normal;
+ actualValue = (int)FileAttributes.Normal;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Normal value of file attributes is not " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesnotcontentindexed.cs b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesnotcontentindexed.cs
new file mode 100644
index 0000000000..32f98c6a0a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesnotcontentindexed.cs
@@ -0,0 +1,97 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+/// FileAttributes.NotContentIndexed
+/// </summary>
+public class FileAttributesTest
+{
+ [Flags]
+ [System.Runtime.InteropServices.ComVisible(true)]
+ internal enum MyFileAttributes
+ {
+ ReadOnly = 0x1,
+ Hidden = 0x2,
+ System = 0x4,
+ Directory = 0x10,
+ Archive = 0x20,
+ Device = 0x40,
+ Normal = 0x80,
+ Temporary = 0x100,
+ SparseFile = 0x200,
+ ReparsePoint = 0x400,
+ Compressed = 0x800,
+ Offline = 0x1000,
+ NotContentIndexed = 0x2000,
+ Encrypted = 0x4000,
+ }
+
+ public static int Main()
+ {
+ FileAttributesTest testObj = new FileAttributesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for enumeration: FileAttributes.NotContentIndexed");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: File attributes is NotContentIndexed";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyFileAttributes.NotContentIndexed;
+ actualValue = (int)FileAttributes.NotContentIndexed;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "NotContentIndexed value of file attributes is not " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesoffline.cs b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesoffline.cs
new file mode 100644
index 0000000000..577e9f13d7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesoffline.cs
@@ -0,0 +1,97 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+/// FileAttributes.Offline
+/// </summary>
+public class FileAttributesTest
+{
+ [Flags]
+ [System.Runtime.InteropServices.ComVisible(true)]
+ internal enum MyFileAttributes
+ {
+ ReadOnly = 0x1,
+ Hidden = 0x2,
+ System = 0x4,
+ Directory = 0x10,
+ Archive = 0x20,
+ Device = 0x40,
+ Normal = 0x80,
+ Temporary = 0x100,
+ SparseFile = 0x200,
+ ReparsePoint = 0x400,
+ Compressed = 0x800,
+ Offline = 0x1000,
+ NotContentIndexed = 0x2000,
+ Encrypted = 0x4000,
+ }
+
+ public static int Main()
+ {
+ FileAttributesTest testObj = new FileAttributesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for enumeration: FileAttributes.Offline");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: File attributes is Offline";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyFileAttributes.Offline;
+ actualValue = (int)FileAttributes.Offline;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Offline value of file attributes is not " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesreadonly.cs b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesreadonly.cs
new file mode 100644
index 0000000000..baec169a80
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesreadonly.cs
@@ -0,0 +1,97 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+/// FileAttributes.ReadOnly
+/// </summary>
+public class FileAttributesTest
+{
+ [Flags]
+ [System.Runtime.InteropServices.ComVisible(true)]
+ internal enum MyFileAttributes
+ {
+ ReadOnly = 0x1,
+ Hidden = 0x2,
+ System = 0x4,
+ Directory = 0x10,
+ Archive = 0x20,
+ Device = 0x40,
+ Normal = 0x80,
+ Temporary = 0x100,
+ SparseFile = 0x200,
+ ReparsePoint = 0x400,
+ Compressed = 0x800,
+ Offline = 0x1000,
+ NotContentIndexed = 0x2000,
+ Encrypted = 0x4000,
+ }
+
+ public static int Main()
+ {
+ FileAttributesTest testObj = new FileAttributesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for enumeration: FileAttributes.ReadOnly");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: File attributes is ReadOnly";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyFileAttributes.ReadOnly;
+ actualValue = (int)FileAttributes.ReadOnly;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "ReadOnly value of file attributes is not " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesreparsepoint.cs b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesreparsepoint.cs
new file mode 100644
index 0000000000..91b5bf0a73
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributesreparsepoint.cs
@@ -0,0 +1,97 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+/// FileAttributes.ReparsePoint
+/// </summary>
+public class FileAttributesTest
+{
+ [Flags]
+ [System.Runtime.InteropServices.ComVisible(true)]
+ internal enum MyFileAttributes
+ {
+ ReadOnly = 0x1,
+ Hidden = 0x2,
+ System = 0x4,
+ Directory = 0x10,
+ Archive = 0x20,
+ Device = 0x40,
+ Normal = 0x80,
+ Temporary = 0x100,
+ SparseFile = 0x200,
+ ReparsePoint = 0x400,
+ Compressed = 0x800,
+ Offline = 0x1000,
+ NotContentIndexed = 0x2000,
+ Encrypted = 0x4000,
+ }
+
+ public static int Main()
+ {
+ FileAttributesTest testObj = new FileAttributesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for enumeration: FileAttributes.ReparsePoint");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: File attributes is ReparsePoint";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyFileAttributes.ReparsePoint;
+ actualValue = (int)FileAttributes.ReparsePoint;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "ReparsePoint value of file attributes is not " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributessystem.cs b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributessystem.cs
new file mode 100644
index 0000000000..6fcb23c111
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributessystem.cs
@@ -0,0 +1,96 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+/// FileAttributes.System
+/// </summary>
+public class FileAttributesTest
+{
+ [System.Runtime.InteropServices.ComVisible(true)]
+ internal enum MyFileAttributes
+ {
+ ReadOnly = 0x1,
+ Hidden = 0x2,
+ System = 0x4,
+ Directory = 0x10,
+ Archive = 0x20,
+ Device = 0x40,
+ Normal = 0x80,
+ Temporary = 0x100,
+ SparseFile = 0x200,
+ ReparsePoint = 0x400,
+ Compressed = 0x800,
+ Offline = 0x1000,
+ NotContentIndexed = 0x2000,
+ Encrypted = 0x4000,
+ }
+
+ public static int Main()
+ {
+ FileAttributesTest testObj = new FileAttributesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for enumeration: FileAttributes.System");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: File attributes is System";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyFileAttributes.System;
+ actualValue = (int)FileAttributes.System;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "System value of file attributes is not " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributestemporary.cs b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributestemporary.cs
new file mode 100644
index 0000000000..e4a2ec81c2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileattributes/fileattributestemporary.cs
@@ -0,0 +1,96 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+/// FileAttributes.Temporary
+/// </summary>
+public class FileAttributesTest
+{
+ [System.Runtime.InteropServices.ComVisible(true)]
+ internal enum MyFileAttributes
+ {
+ ReadOnly = 0x1,
+ Hidden = 0x2,
+ System = 0x4,
+ Directory = 0x10,
+ Archive = 0x20,
+ Device = 0x40,
+ Normal = 0x80,
+ Temporary = 0x100,
+ SparseFile = 0x200,
+ ReparsePoint = 0x400,
+ Compressed = 0x800,
+ Offline = 0x1000,
+ NotContentIndexed = 0x2000,
+ Encrypted = 0x4000,
+ }
+
+ public static int Main()
+ {
+ FileAttributesTest testObj = new FileAttributesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for enumeration: FileAttributes.Temporary");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: File attributes is Temporary";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyFileAttributes.Temporary;
+ actualValue = (int)FileAttributes.Temporary;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Temporary value of file attributes is not " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/filemode/FileModeAppend.csproj b/tests/src/CoreMangLib/cti/system/io/filemode/FileModeAppend.csproj
new file mode 100644
index 0000000000..bf89abb4d1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filemode/FileModeAppend.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="filemodeappend.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/filemode/FileModeCreate.csproj b/tests/src/CoreMangLib/cti/system/io/filemode/FileModeCreate.csproj
new file mode 100644
index 0000000000..90ab544519
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filemode/FileModeCreate.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="filemodecreate.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/filemode/FileModeCreateNew.csproj b/tests/src/CoreMangLib/cti/system/io/filemode/FileModeCreateNew.csproj
new file mode 100644
index 0000000000..29c779d600
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filemode/FileModeCreateNew.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="filemodecreatenew.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/filemode/FileModeEnum.csproj b/tests/src/CoreMangLib/cti/system/io/filemode/FileModeEnum.csproj
new file mode 100644
index 0000000000..103669fb4a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filemode/FileModeEnum.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="filemodeenum.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/filemode/FileModeOpen.csproj b/tests/src/CoreMangLib/cti/system/io/filemode/FileModeOpen.csproj
new file mode 100644
index 0000000000..ab54c1a470
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filemode/FileModeOpen.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="filemodeopen.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/filemode/FileModeOpenOrCreate.csproj b/tests/src/CoreMangLib/cti/system/io/filemode/FileModeOpenOrCreate.csproj
new file mode 100644
index 0000000000..bece32bc60
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filemode/FileModeOpenOrCreate.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="filemodeopenorcreate.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/filemode/FileModeTruncate.csproj b/tests/src/CoreMangLib/cti/system/io/filemode/FileModeTruncate.csproj
new file mode 100644
index 0000000000..174898c2cd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filemode/FileModeTruncate.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="filemodetruncate.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/filemode/filemodeappend.cs b/tests/src/CoreMangLib/cti/system/io/filemode/filemodeappend.cs
new file mode 100644
index 0000000000..9a664c8f2b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filemode/filemodeappend.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+/// System.IO.FileMode.Append
+/// </summary>
+public class FileModeAppend
+{
+ static public int Main()
+ {
+ FileModeAppend test = new FileModeAppend();
+
+ TestLibrary.TestFramework.BeginTestCase("System.IO.FileMode.Append");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the FileMode.Append value is 6...";
+ const string c_TEST_ID = "P001";
+ FileMode FLAG_VALUE = (FileMode)6;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (FileMode.Append != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + FileMode.Append.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/filemode/filemodecreate.cs b/tests/src/CoreMangLib/cti/system/io/filemode/filemodecreate.cs
new file mode 100644
index 0000000000..9cbd9a8e63
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filemode/filemodecreate.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+/// System.IO.FileMode.Create
+/// </summary>
+public class FileModeCreate
+{
+ static public int Main()
+ {
+ FileModeCreate test = new FileModeCreate();
+
+ TestLibrary.TestFramework.BeginTestCase("System.IO.FileMode.Create");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the FileMode.Append value is 6...";
+ const string c_TEST_ID = "P001";
+ FileMode FLAG_VALUE = (FileMode)2;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (FileMode.Create != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + FileMode.Create.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/filemode/filemodecreatenew.cs b/tests/src/CoreMangLib/cti/system/io/filemode/filemodecreatenew.cs
new file mode 100644
index 0000000000..c15ecde078
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filemode/filemodecreatenew.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+/// System.IO.FileMode.CreateNew
+/// </summary>
+public class FileModeCreateNew
+{
+ static public int Main()
+ {
+ FileModeCreateNew test = new FileModeCreateNew();
+
+ TestLibrary.TestFramework.BeginTestCase("System.IO.FileMode.CreateNew");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the FileMode.CreateNew value is 1...";
+ const string c_TEST_ID = "P001";
+ FileMode FLAG_VALUE = (FileMode)1;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (FileMode.CreateNew != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + FileMode.CreateNew.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/filemode/filemodeenum.cs b/tests/src/CoreMangLib/cti/system/io/filemode/filemodeenum.cs
new file mode 100644
index 0000000000..5148c6476e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filemode/filemodeenum.cs
@@ -0,0 +1,67 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+using System.Reflection;
+
+public class FileModeEnum
+{
+ public static int Main()
+ {
+ FileModeEnum ac = new FileModeEnum();
+
+ TestLibrary.TestFramework.BeginTestCase("FileModeEnum");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ int enumValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: FileModeEnum");
+
+ try
+ {
+ enumValue = (int)FileMode.Create;
+
+ if (2 != enumValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected value: Expected(2) Actual("+enumValue+")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/filemode/filemodeopen.cs b/tests/src/CoreMangLib/cti/system/io/filemode/filemodeopen.cs
new file mode 100644
index 0000000000..461a1263d1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filemode/filemodeopen.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+/// System.IO.FileMode.Open
+/// </summary>
+public class FileModeOpen
+{
+ static public int Main()
+ {
+ FileModeOpen test = new FileModeOpen();
+
+ TestLibrary.TestFramework.BeginTestCase("System.IO.FileMode.Open");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the FileMode.Open value is 3...";
+ const string c_TEST_ID = "P001";
+ FileMode FLAG_VALUE = (FileMode)3;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (FileMode.Open != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + FileMode.Open.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/filemode/filemodeopenorcreate.cs b/tests/src/CoreMangLib/cti/system/io/filemode/filemodeopenorcreate.cs
new file mode 100644
index 0000000000..1c78a681ee
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filemode/filemodeopenorcreate.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+/// System.IO.FileMode.OpenOrCreate
+/// </summary>
+public class FileModeOpenOrCreate
+{
+ static public int Main()
+ {
+ FileModeOpenOrCreate test = new FileModeOpenOrCreate();
+
+ TestLibrary.TestFramework.BeginTestCase("System.IO.FileMode.OpenOrCreate");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the FileMode.OpenOrCreate value is 4...";
+ const string c_TEST_ID = "P001";
+ FileMode FLAG_VALUE = (FileMode)4;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (FileMode.OpenOrCreate != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + FileMode.OpenOrCreate.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/filemode/filemodetruncate.cs b/tests/src/CoreMangLib/cti/system/io/filemode/filemodetruncate.cs
new file mode 100644
index 0000000000..9b1657e444
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filemode/filemodetruncate.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+/// System.IO.FileMode.Truncate
+/// </summary>
+public class FileModeTruncate
+{
+ static public int Main()
+ {
+ FileModeTruncate test = new FileModeTruncate();
+
+ TestLibrary.TestFramework.BeginTestCase("System.IO.FileMode.Truncate");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the FileMode.Truncate value is 5...";
+ const string c_TEST_ID = "P001";
+ FileMode FLAG_VALUE = (FileMode)5;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (FileMode.Truncate != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + FileMode.Truncate.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionCtor.csproj b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionCtor.csproj
new file mode 100644
index 0000000000..626a72fdb9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="filenotfoundexceptionctor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionCtor2.csproj
new file mode 100644
index 0000000000..e017d67d42
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="filenotfoundexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionGetMessage.csproj b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionGetMessage.csproj
new file mode 100644
index 0000000000..bcedc9d1e9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionGetMessage.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="filenotfoundexceptiongetmessage.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionMessage.csproj b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionMessage.csproj
new file mode 100644
index 0000000000..afb4c84b3e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionMessage.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="filenotfoundexceptionmessage.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionToString.csproj b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionToString.csproj
new file mode 100644
index 0000000000..608928a6e8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionToString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="filenotfoundexceptiontostring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionctor1.csproj b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionctor1.csproj
new file mode 100644
index 0000000000..adb235b820
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/FileNotFoundExceptionctor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="filenotfoundexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptionctor.cs b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptionctor.cs
new file mode 100644
index 0000000000..e7db945fa6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptionctor.cs
@@ -0,0 +1,66 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+using System.Reflection;
+
+public class FileNotFoundExceptionCtor
+{
+ public static int Main()
+ {
+ FileNotFoundExceptionCtor ac = new FileNotFoundExceptionCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("FileNotFoundExceptionCtor");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ FileNotFoundException fnfe;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: FileNotFoundException.Ctor");
+
+ try
+ {
+ fnfe = new FileNotFoundException();
+
+ if (null == fnfe.Message)
+ {
+ TestLibrary.TestFramework.LogError("001", "Message is null!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptionctor1.cs
new file mode 100644
index 0000000000..525724217c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptionctor1.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptionctor2.cs
new file mode 100644
index 0000000000..67df4704ec
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptionctor2.cs
@@ -0,0 +1,71 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+using System.Reflection;
+
+public class FileNotFoundExceptionCtor2
+{
+ private const int c_MIN_STRLEN = 64;
+ private const int c_MAX_STRLEN = 2048;
+
+ public static int Main()
+ {
+ FileNotFoundExceptionCtor2 ac = new FileNotFoundExceptionCtor2();
+
+ TestLibrary.TestFramework.BeginTestCase("FileNotFoundExceptionCtor2");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ FileNotFoundException fnfe;
+ string str;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: FileNotFoundException.Ctor(string)");
+
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRLEN, c_MAX_STRLEN);
+ fnfe = new FileNotFoundException(str);
+
+ if (!fnfe.Message.Equals(str))
+ {
+ TestLibrary.TestFramework.LogError("001", "Message is not expected: Expected("+str+") Actual("+fnfe.Message+")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptiongetmessage.cs b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptiongetmessage.cs
new file mode 100644
index 0000000000..12270fa19a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptiongetmessage.cs
@@ -0,0 +1,66 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+using System.Reflection;
+
+public class FileNotFoundExceptionGetMessage
+{
+ public static int Main()
+ {
+ FileNotFoundExceptionGetMessage ac = new FileNotFoundExceptionGetMessage();
+
+ TestLibrary.TestFramework.BeginTestCase("FileNotFoundExceptionGetMessage");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ FileNotFoundException fnfe;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: FileNotFoundException.get_Message");
+
+ try
+ {
+ fnfe = (FileNotFoundException)TestLibrary.Generator.GetType(typeof(FileNotFoundException));
+
+ if (null == fnfe.Message)
+ {
+ TestLibrary.TestFramework.LogError("001", "Message is null!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptionmessage.cs b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptionmessage.cs
new file mode 100644
index 0000000000..ac32c0ccc6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptionmessage.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptiontostring.cs b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptiontostring.cs
new file mode 100644
index 0000000000..d95c184035
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filenotfoundexception/filenotfoundexceptiontostring.cs
@@ -0,0 +1,66 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+using System.Reflection;
+
+public class FileNotFoundExceptionToString
+{
+ public static int Main()
+ {
+ FileNotFoundExceptionToString ac = new FileNotFoundExceptionToString();
+
+ TestLibrary.TestFramework.BeginTestCase("FileNotFoundExceptionToString");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ FileNotFoundException fnfe;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: FileNotFoundException.ToString()");
+
+ try
+ {
+ fnfe = (FileNotFoundException)TestLibrary.Generator.GetType(typeof(FileNotFoundException));
+
+ if (null == fnfe.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "ToString() is null!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/fileshare/FileShareEnum.csproj b/tests/src/CoreMangLib/cti/system/io/fileshare/FileShareEnum.csproj
new file mode 100644
index 0000000000..f2ccd6927b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileshare/FileShareEnum.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fileshareenum.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileshare/FileShareNone.csproj b/tests/src/CoreMangLib/cti/system/io/fileshare/FileShareNone.csproj
new file mode 100644
index 0000000000..abd8ffb5ec
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileshare/FileShareNone.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="filesharenone.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileshare/FileShareRead.csproj b/tests/src/CoreMangLib/cti/system/io/fileshare/FileShareRead.csproj
new file mode 100644
index 0000000000..4ea388b2a6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileshare/FileShareRead.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fileshareread.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileshare/FileShareReadWrite.csproj b/tests/src/CoreMangLib/cti/system/io/fileshare/FileShareReadWrite.csproj
new file mode 100644
index 0000000000..dc9c988feb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileshare/FileShareReadWrite.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="filesharereadwrite.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileshare/FileShareWrite.csproj b/tests/src/CoreMangLib/cti/system/io/fileshare/FileShareWrite.csproj
new file mode 100644
index 0000000000..2554ef5b27
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileshare/FileShareWrite.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="filesharewrite.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/fileshare/fileshareenum.cs b/tests/src/CoreMangLib/cti/system/io/fileshare/fileshareenum.cs
new file mode 100644
index 0000000000..0368f3d6e2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileshare/fileshareenum.cs
@@ -0,0 +1,66 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+using System.Reflection;
+
+public class FileShareEnum
+{
+ public static int Main()
+ {
+ FileShareEnum ac = new FileShareEnum();
+
+ TestLibrary.TestFramework.BeginTestCase("FileShareEnum");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ int enumValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: FileShareEnum");
+
+ try
+ {
+ enumValue = (int)FileShare.Read;
+
+ if (1 != enumValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected value: Expected(1) Actual("+enumValue+")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/fileshare/filesharenone.cs b/tests/src/CoreMangLib/cti/system/io/fileshare/filesharenone.cs
new file mode 100644
index 0000000000..81e0f678c3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileshare/filesharenone.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+/// System.IO.FileShare.None
+/// </summary>
+public class FileShareNone
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the FileShare.None value is 0...";
+ const string c_TEST_ID = "P001";
+ FileShare FLAG_VALUE = (FileShare)0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (FileShare.None != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + FileShare.None.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ FileShareNone test = new FileShareNone();
+
+ TestLibrary.TestFramework.BeginTestCase("System.IO.FileShare.None");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/fileshare/fileshareread.cs b/tests/src/CoreMangLib/cti/system/io/fileshare/fileshareread.cs
new file mode 100644
index 0000000000..8996cc582d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileshare/fileshareread.cs
@@ -0,0 +1,71 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+public class FileShareRead
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1:check the FileShare.Read value is 1...";
+ const string c_TEST_ID = "P001";
+ FileShare FLAG_VALUE = (FileShare)1;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (FileShare.Read != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + FileShare.Read.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ FileShareRead test = new FileShareRead();
+
+ TestLibrary.TestFramework.BeginTestCase("System.IO.FileShare.Read");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/fileshare/filesharereadwrite.cs b/tests/src/CoreMangLib/cti/system/io/fileshare/filesharereadwrite.cs
new file mode 100644
index 0000000000..bac3d769bd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileshare/filesharereadwrite.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+public class FileShareReadWrite
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the FileShare.ReadWrite value is 3...";
+ const string c_TEST_ID = "P001";
+ FileShare FLAG_VALUE = (FileShare)3;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (FileShare.ReadWrite != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + FileShare.ReadWrite.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ FileShareReadWrite test = new FileShareReadWrite();
+
+ TestLibrary.TestFramework.BeginTestCase("System.IO.FileShare.ReadWrite");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/fileshare/filesharewrite.cs b/tests/src/CoreMangLib/cti/system/io/fileshare/filesharewrite.cs
new file mode 100644
index 0000000000..1118bba39f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/fileshare/filesharewrite.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+public class FileShareWrite
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the FileShare.Write value is 2...";
+ const string c_TEST_ID = "P001";
+ FileShare FLAG_VALUE = (FileShare)2;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (FileShare.Write != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + FileShare.Write.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+
+ #endregion
+
+ public static int Main()
+ {
+ FileShareWrite test = new FileShareWrite();
+
+ TestLibrary.TestFramework.BeginTestCase("System.IO.FileShare.Write");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/filestream/FileStreamDispose_PSC.csproj b/tests/src/CoreMangLib/cti/system/io/filestream/FileStreamDispose_PSC.csproj
new file mode 100644
index 0000000000..21cd9655ce
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filestream/FileStreamDispose_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="filestreamdispose.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/filestream/filestreamdispose.cs b/tests/src/CoreMangLib/cti/system/io/filestream/filestreamdispose.cs
new file mode 100644
index 0000000000..ef0a1d423d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/filestream/filestreamdispose.cs
@@ -0,0 +1,276 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.IO;
+
+[SecuritySafeCritical]
+public class TestFileStream : FileStream
+{
+ public TestFileStream(string path, FileMode mode)
+ : base(path, mode)
+ {
+ }
+
+ public void DisposeWrapper(bool disposing)
+ {
+ Dispose(disposing);
+ }
+
+ public override bool CanRead
+ {
+ [SecuritySafeCritical]
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public override bool CanSeek
+ {
+ [SecuritySafeCritical]
+ get { return base.CanSeek; }
+ }
+
+ public override bool CanWrite
+ {
+ [SecuritySafeCritical]
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ [SecuritySafeCritical]
+ public override void Flush()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public override long Length
+ {
+ [SecuritySafeCritical]
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public override long Position
+ {
+ [SecuritySafeCritical]
+ get
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ [SecuritySafeCritical]
+ set
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ }
+
+ [SecuritySafeCritical]
+ public override int Read(byte[] buffer, int offset, int count)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ [SecuritySafeCritical]
+ public override long Seek(long offset, SeekOrigin origin)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ [SecuritySafeCritical]
+ public override void SetLength(long value)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ [SecuritySafeCritical]
+ public override void Write(byte[] buffer, int offset, int count)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+}
+
+[SecuritySafeCritical]
+public class FileStreamDispose
+{
+ #region Private Fileds
+ const string c_DEFAULT_FILE_PATH = "TestFile";
+ #endregion
+
+ #region Public Methods
+ public bool RunTesfs()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Dispose with disposing set to true");
+
+ try
+ {
+ TestFileStream tfs = new TestFileStream(c_DEFAULT_FILE_PATH,FileMode.Append);
+ tfs.DisposeWrapper(true);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Dispose twice with disposing set to true");
+
+ try
+ {
+ TestFileStream tfs = new TestFileStream(c_DEFAULT_FILE_PATH, FileMode.Append);
+
+ tfs.DisposeWrapper(true);
+ tfs.DisposeWrapper(true);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call Dispose with disposing set to false");
+
+ try
+ {
+ TestFileStream tfs = new TestFileStream(c_DEFAULT_FILE_PATH, FileMode.Append);
+
+ tfs.DisposeWrapper(false);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call Dispose twice with disposing set to false");
+
+ try
+ {
+ TestFileStream tfs = new TestFileStream(c_DEFAULT_FILE_PATH, FileMode.Append);
+
+ tfs.DisposeWrapper(false);
+ tfs.DisposeWrapper(false);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Call Dispose twice with disposing set to false once and another time set to true");
+
+ try
+ {
+ TestFileStream tfs = new TestFileStream(c_DEFAULT_FILE_PATH, FileMode.Append);
+
+ tfs.DisposeWrapper(false);
+ tfs.DisposeWrapper(true);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Call Dispose twice with disposing set to true once and another time set to false");
+
+ try
+ {
+ TestFileStream tfs = new TestFileStream(c_DEFAULT_FILE_PATH, FileMode.Append);
+
+ tfs.DisposeWrapper(true);
+ tfs.DisposeWrapper(false);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FileStreamDispose test = new FileStreamDispose();
+
+ TestLibrary.TestFramework.BeginTestCase("FileStreamDispose");
+
+ if (test.RunTesfs())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/ioexception/IOExceptionctor1.csproj b/tests/src/CoreMangLib/cti/system/io/ioexception/IOExceptionctor1.csproj
new file mode 100644
index 0000000000..b0e15e8a38
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/ioexception/IOExceptionctor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="ioexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/ioexception/IOExceptionctor2.csproj b/tests/src/CoreMangLib/cti/system/io/ioexception/IOExceptionctor2.csproj
new file mode 100644
index 0000000000..e426122b93
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/ioexception/IOExceptionctor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="ioexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/ioexception/ioexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/io/ioexception/ioexceptionctor1.cs
new file mode 100644
index 0000000000..c996742b02
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/ioexception/ioexceptionctor1.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+
+/// <summary>
+///ctor
+/// </summary>
+public class IOExceptionctor1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Create a new IOExection instance.");
+
+ try
+ {
+ //Create the application domain setup information.
+ IOException myIOExection = new IOException();
+ if (myIOExection == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "the IOExection ctor error occurred. ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ IOExceptionctor1 test = new IOExceptionctor1();
+
+ TestLibrary.TestFramework.BeginTestCase("IOExceptionctor1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/ioexception/ioexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/io/ioexception/ioexceptionctor2.cs
new file mode 100644
index 0000000000..575657e267
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/ioexception/ioexceptionctor2.cs
@@ -0,0 +1,126 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+///ctor(System.String)
+/// </summary>
+public class IOExceptionctor2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Create a new IOExection instance.");
+
+ try
+ {
+ string expectString = "this is a error";
+ //Create the application domain setup information.
+ IOException myIOExection = new IOException(expectString);
+ if (myIOExection.Message != expectString)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "the IOExection ctor error occurred. ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Create a new IOExection instance,string is empty.");
+
+ try
+ {
+ string expectString = string.Empty;
+ //Create the application domain setup information.
+ IOException myIOExection = new IOException(expectString);
+ if (myIOExection.Message != expectString)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "the IOExection ctor error occurred. ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Create a new IOExection instance,string is null,then its inner exception set to a null reference .");
+
+ try
+ {
+ string expectString =null;
+ //Create the application domain setup information.
+ IOException myIOExection = new IOException(expectString);
+ if (myIOExection== null)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "the IOExection ctor error occurred. ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ IOExceptionctor2 test = new IOExceptionctor2();
+
+ TestLibrary.TestFramework.BeginTestCase("IOExceptionctor2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor.csproj b/tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor.csproj
new file mode 100644
index 0000000000..8738f18269
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="memorystreamctor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor2.csproj b/tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor2.csproj
new file mode 100644
index 0000000000..0234777c25
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="memorystreamctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor3.csproj b/tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor3.csproj
new file mode 100644
index 0000000000..8396f2e1d4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor3.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="memorystreamctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor4.csproj b/tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor4.csproj
new file mode 100644
index 0000000000..5f42fd3868
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor4.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="memorystreamctor4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor5.csproj b/tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor5.csproj
new file mode 100644
index 0000000000..ec6daa58a8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor5.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="memorystreamctor5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor6.csproj b/tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor6.csproj
new file mode 100644
index 0000000000..bd6096da84
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor6.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="memorystreamctor6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor7.csproj b/tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor7.csproj
new file mode 100644
index 0000000000..eea79ddbb8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/memorystream/MemoryStreamCtor7.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="memorystreamctor7.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor.cs b/tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor.cs
new file mode 100644
index 0000000000..e74418bdb2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor.cs
@@ -0,0 +1,66 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+using System.Reflection;
+
+public class MemoryStreamCtor
+{
+ public static int Main()
+ {
+ MemoryStreamCtor ac = new MemoryStreamCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("MemoryStreamCtor");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ MemoryStream mem;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: MemoryStream.Ctor");
+
+ try
+ {
+ mem = new MemoryStream();
+
+ if (null == mem)
+ {
+ TestLibrary.TestFramework.LogError("001", "MemoryStream failed to load");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor2.cs b/tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor2.cs
new file mode 100644
index 0000000000..11abd39c7d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor2.cs
@@ -0,0 +1,68 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+using System.Reflection;
+
+public class MemoryStreamCtor2
+{
+ public static int Main()
+ {
+ MemoryStreamCtor2 ac = new MemoryStreamCtor2();
+
+ TestLibrary.TestFramework.BeginTestCase("MemoryStreamCtor2");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ MemoryStream mem;
+ int capacity;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: MemoryStream.Ctor(int)");
+
+ try
+ {
+ capacity = (TestLibrary.Generator.GetInt32(-55) % 2048) + 1;
+ mem = new MemoryStream(capacity);
+
+ if (capacity != mem.Capacity)
+ {
+ TestLibrary.TestFramework.LogError("001", "Capacity mixmatch: Expected("+capacity+") Actual("+mem.Capacity+")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor3.cs b/tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor3.cs
new file mode 100644
index 0000000000..a7ddb0e3b0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor3.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.IO;
+using System.Reflection;
+
+public class MemoryStreamCtor3
+{
+ public static int Main()
+ {
+ MemoryStreamCtor3 ac = new MemoryStreamCtor3();
+
+ TestLibrary.TestFramework.BeginTestCase("MemoryStreamCtor3");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ [SecuritySafeCritical]
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ MemoryStream mem;
+ int capacity;
+ byte[] array;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: MemoryStream.Ctor(byte[])");
+
+ try
+ {
+ capacity = (TestLibrary.Generator.GetInt32(-55) % 2048) + 1;
+ array = new byte[ capacity ];
+
+ for (int i=0; i<array.Length; i++) array[i] = TestLibrary.Generator.GetByte(-55);
+
+ mem = new MemoryStream(array);
+
+ for (int i=0; i<array.Length; i++)
+ {
+ byte val = (byte)mem.ReadByte();
+ if (array[i] != val)
+ {
+ TestLibrary.TestFramework.LogError("001", "Stream mismatch["+i+"]: Expected("+array[i]+") Actual("+val+")");
+ retVal = false;
+ }
+ }
+
+ if (capacity != mem.Capacity)
+ {
+ TestLibrary.TestFramework.LogError("002", "Capacity mixmatch: Expected("+capacity+") Actual("+mem.Capacity+")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor4.cs b/tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor4.cs
new file mode 100644
index 0000000000..18edc8b18d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor4.cs
@@ -0,0 +1,93 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.IO;
+using System.Reflection;
+
+public class MemoryStreamCtor4
+{
+ public static int Main()
+ {
+ MemoryStreamCtor4 ac = new MemoryStreamCtor4();
+
+ TestLibrary.TestFramework.BeginTestCase("MemoryStreamCtor4");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ [SecuritySafeCritical]
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ MemoryStream mem;
+ int capacity;
+ byte[] array;
+ bool canWrite;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: MemoryStream.Ctor(byte[], bool)");
+
+ try
+ {
+ canWrite = (TestLibrary.Generator.GetByte(-55) % 2) == 0;
+ capacity = (TestLibrary.Generator.GetInt32(-55) % 2048) + 1;
+ array = new byte[ capacity ];
+
+ for (int i=0; i<array.Length; i++) array[i] = TestLibrary.Generator.GetByte(-55);
+
+ mem = new MemoryStream(array, canWrite);
+
+ for (int i=0; i<array.Length; i++)
+ {
+ byte val = (byte)mem.ReadByte();
+ if (array[i] != val)
+ {
+ TestLibrary.TestFramework.LogError("001", "Stream mismatch["+i+"]: Expected("+array[i]+") Actual("+val+")");
+ retVal = false;
+ }
+ }
+
+ if (capacity != mem.Capacity)
+ {
+ TestLibrary.TestFramework.LogError("002", "Capacity mixmatch: Expected("+capacity+") Actual("+mem.Capacity+")");
+ retVal = false;
+ }
+
+ if (canWrite != mem.CanWrite)
+ {
+ TestLibrary.TestFramework.LogError("003", "Can write unexpected: Expected("+canWrite+") Actual("+mem.CanWrite+")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor5.cs b/tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor5.cs
new file mode 100644
index 0000000000..7592a01efa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor5.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.IO;
+using System.Reflection;
+
+public class MemoryStreamCtor5
+{
+ public static int Main()
+ {
+ MemoryStreamCtor5 ac = new MemoryStreamCtor5();
+
+ TestLibrary.TestFramework.BeginTestCase("MemoryStreamCtor5");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ [SecuritySafeCritical]
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ MemoryStream mem;
+ int capacity;
+ byte[] array;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: MemoryStream.Ctor(byte[],int,int)");
+
+ try
+ {
+ capacity = (TestLibrary.Generator.GetInt32(-55) % 2048) + 1;
+ array = new byte[ capacity ];
+
+ for (int i=0; i<array.Length; i++) array[i] = TestLibrary.Generator.GetByte(-55);
+
+ mem = new MemoryStream(array, 0, array.Length);
+
+ for (int i=0; i<array.Length; i++)
+ {
+ byte val = (byte)mem.ReadByte();
+ if (array[i] != val)
+ {
+ TestLibrary.TestFramework.LogError("001", "Stream mismatch["+i+"]: Expected("+array[i]+") Actual("+val+")");
+ retVal = false;
+ }
+ }
+
+ if (capacity != mem.Capacity)
+ {
+ TestLibrary.TestFramework.LogError("002", "Capacity mixmatch: Expected("+capacity+") Actual("+mem.Capacity+")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor6.cs b/tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor6.cs
new file mode 100644
index 0000000000..b510fcb4a1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor6.cs
@@ -0,0 +1,93 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.IO;
+using System.Reflection;
+
+public class MemoryStreamCtor6
+{
+ public static int Main()
+ {
+ MemoryStreamCtor6 ac = new MemoryStreamCtor6();
+
+ TestLibrary.TestFramework.BeginTestCase("MemoryStreamCtor6");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ [SecuritySafeCritical]
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ MemoryStream mem;
+ int capacity;
+ byte[] array;
+ bool canWrite;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: MemoryStream.Ctor(byte[],int,int,bool)");
+
+ try
+ {
+ canWrite = (TestLibrary.Generator.GetByte(-55) % 2) == 0;
+ capacity = (TestLibrary.Generator.GetInt32(-55) % 2048) + 1;
+ array = new byte[ capacity ];
+
+ for (int i=0; i<array.Length; i++) array[i] = TestLibrary.Generator.GetByte(-55);
+
+ mem = new MemoryStream(array, 0, array.Length, canWrite);
+
+ for (int i=0; i<array.Length; i++)
+ {
+ byte val = (byte)mem.ReadByte();
+ if (array[i] != val)
+ {
+ TestLibrary.TestFramework.LogError("001", "Stream mismatch["+i+"]: Expected("+array[i]+") Actual("+val+")");
+ retVal = false;
+ }
+ }
+
+ if (capacity != mem.Capacity)
+ {
+ TestLibrary.TestFramework.LogError("002", "Capacity mixmatch: Expected("+capacity+") Actual("+mem.Capacity+")");
+ retVal = false;
+ }
+
+ if (canWrite != mem.CanWrite)
+ {
+ TestLibrary.TestFramework.LogError("003", "Can write unexpected: Expected("+canWrite+") Actual("+mem.CanWrite+")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor7.cs b/tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor7.cs
new file mode 100644
index 0000000000..12b9ca368c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor7.cs
@@ -0,0 +1,93 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.IO;
+using System.Reflection;
+
+public class MemoryStreamCtor7
+{
+ public static int Main()
+ {
+ MemoryStreamCtor7 ac = new MemoryStreamCtor7();
+
+ TestLibrary.TestFramework.BeginTestCase("MemoryStreamCtor7");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ [SecuritySafeCritical]
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ MemoryStream mem;
+ int capacity;
+ byte[] array;
+ bool canWrite;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: MemoryStream.Ctor(byte[],int,int,bool,bool)");
+
+ try
+ {
+ canWrite = (TestLibrary.Generator.GetByte(-55) % 2) == 0;
+ capacity = (TestLibrary.Generator.GetInt32(-55) % 2048) + 1;
+ array = new byte[ capacity ];
+
+ for (int i=0; i<array.Length; i++) array[i] = TestLibrary.Generator.GetByte(-55);
+
+ mem = new MemoryStream(array, 0, array.Length, canWrite, true);
+
+ for (int i=0; i<array.Length; i++)
+ {
+ byte val = (byte)mem.ReadByte();
+ if (array[i] != val)
+ {
+ TestLibrary.TestFramework.LogError("001", "Stream mismatch["+i+"]: Expected("+array[i]+") Actual("+val+")");
+ retVal = false;
+ }
+ }
+
+ if (capacity != mem.Capacity)
+ {
+ TestLibrary.TestFramework.LogError("002", "Capacity mixmatch: Expected("+capacity+") Actual("+mem.Capacity+")");
+ retVal = false;
+ }
+
+ if (canWrite != mem.CanWrite)
+ {
+ TestLibrary.TestFramework.LogError("003", "Can write unexpected: Expected("+canWrite+") Actual("+mem.CanWrite+")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/pathtoolongexception/PathTooLongExceptionctor1.csproj b/tests/src/CoreMangLib/cti/system/io/pathtoolongexception/PathTooLongExceptionctor1.csproj
new file mode 100644
index 0000000000..7b79fea0f7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/pathtoolongexception/PathTooLongExceptionctor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="pathtoolongexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/pathtoolongexception/PathTooLongExceptionctor2.csproj b/tests/src/CoreMangLib/cti/system/io/pathtoolongexception/PathTooLongExceptionctor2.csproj
new file mode 100644
index 0000000000..158916841d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/pathtoolongexception/PathTooLongExceptionctor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="pathtoolongexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/pathtoolongexception/pathtoolongexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/io/pathtoolongexception/pathtoolongexceptionctor1.cs
new file mode 100644
index 0000000000..94b8af2b4d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/pathtoolongexception/pathtoolongexceptionctor1.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+///ctor
+/// </summary>
+public class PathTooLongExceptionctor1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Create a new PathTooLongException instance.");
+
+ try
+ {
+ PathTooLongException myException = new PathTooLongException();
+ if (myException==null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "the PathTooLongException ctor error occurred. ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ PathTooLongExceptionctor1 test = new PathTooLongExceptionctor1();
+
+ TestLibrary.TestFramework.BeginTestCase("PathTooLongExceptionctor1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/pathtoolongexception/pathtoolongexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/io/pathtoolongexception/pathtoolongexceptionctor2.cs
new file mode 100644
index 0000000000..d5f8153730
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/pathtoolongexception/pathtoolongexceptionctor2.cs
@@ -0,0 +1,123 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+/// <summary>
+///ctor(System.String)
+/// </summary>
+public class PathTooLongExceptionctor2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Create a new PathTooLongException instance.");
+
+ try
+ {
+ string expectString = "This is an error";
+ PathTooLongException myException = new PathTooLongException(expectString);
+ if (myException.Message != expectString)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "the PathTooLongException ctor error occurred. ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Create a new PathTooLongException instance,string is empty.");
+
+ try
+ {
+ string expectString = string.Empty;
+ PathTooLongException myException = new PathTooLongException(expectString);
+ if (myException.Message != expectString)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "the PathTooLongException ctor error occurred. ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Create a new PathTooLongException instance,string is null.");
+
+ try
+ {
+ string expectString = null;
+ PathTooLongException myException = new PathTooLongException(expectString);
+ if (myException == null)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "the PathTooLongException ctor error occurred. ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ PathTooLongExceptionctor2 test = new PathTooLongExceptionctor2();
+
+ TestLibrary.TestFramework.BeginTestCase("PathTooLongExceptionctor2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/seekorigin/SeekOriginBegin.csproj b/tests/src/CoreMangLib/cti/system/io/seekorigin/SeekOriginBegin.csproj
new file mode 100644
index 0000000000..23781eb6ec
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/seekorigin/SeekOriginBegin.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="seekoriginbegin.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/seekorigin/SeekOriginCurrent.csproj b/tests/src/CoreMangLib/cti/system/io/seekorigin/SeekOriginCurrent.csproj
new file mode 100644
index 0000000000..fe78321b8a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/seekorigin/SeekOriginCurrent.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="seekorigincurrent.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/seekorigin/SeekOriginEnd.csproj b/tests/src/CoreMangLib/cti/system/io/seekorigin/SeekOriginEnd.csproj
new file mode 100644
index 0000000000..4971aae814
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/seekorigin/SeekOriginEnd.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="seekoriginend.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/seekorigin/SeekOriginEnum.csproj b/tests/src/CoreMangLib/cti/system/io/seekorigin/SeekOriginEnum.csproj
new file mode 100644
index 0000000000..a219e51c9b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/seekorigin/SeekOriginEnum.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="seekoriginenum.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/seekorigin/seekoriginbegin.cs b/tests/src/CoreMangLib/cti/system/io/seekorigin/seekoriginbegin.cs
new file mode 100644
index 0000000000..462347eb9d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/seekorigin/seekoriginbegin.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+/// <summary>
+/// System.IO.SeekOrigin.Begin
+/// </summary>
+public class SeekOriginBegin
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the value of SeekOriginBegin");
+
+ try
+ {
+ SeekOrigin seekOrigin = (SeekOrigin)0;
+ if (SeekOrigin.Begin != seekOrigin)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,The value is: " + (Int32)SeekOrigin.Begin);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ SeekOriginBegin test = new SeekOriginBegin();
+
+ TestLibrary.TestFramework.BeginTestCase("SeekOriginBegin");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/seekorigin/seekorigincurrent.cs b/tests/src/CoreMangLib/cti/system/io/seekorigin/seekorigincurrent.cs
new file mode 100644
index 0000000000..88cc0d1bc1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/seekorigin/seekorigincurrent.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+/// <summary>
+/// System.IO.SeekOrigin.Current
+/// </summary>
+public class SeekOriginCurrent
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the value of SeekOriginCurrent");
+
+ try
+ {
+ SeekOrigin seekOrigin = (SeekOrigin)1;
+ if (SeekOrigin.Current != seekOrigin)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,The value is: " + (Int32)SeekOrigin.Current);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ SeekOriginCurrent test = new SeekOriginCurrent();
+
+ TestLibrary.TestFramework.BeginTestCase("SeekOriginCurrent");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/seekorigin/seekoriginend.cs b/tests/src/CoreMangLib/cti/system/io/seekorigin/seekoriginend.cs
new file mode 100644
index 0000000000..01b6d8ccec
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/seekorigin/seekoriginend.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+/// <summary>
+/// System.IO.SeekOrigin.End
+/// </summary>
+public class SeekOriginEnd
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the value of SeekOriginEnd");
+
+ try
+ {
+ SeekOrigin seekOrigin = (SeekOrigin)2;
+ if (SeekOrigin.End != seekOrigin)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,The value is: " + (Int32)SeekOrigin.End);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ SeekOriginEnd test = new SeekOriginEnd();
+
+ TestLibrary.TestFramework.BeginTestCase("SeekOriginEnd");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/seekorigin/seekoriginenum.cs b/tests/src/CoreMangLib/cti/system/io/seekorigin/seekoriginenum.cs
new file mode 100644
index 0000000000..832d2ba24b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/seekorigin/seekoriginenum.cs
@@ -0,0 +1,66 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+using System.Reflection;
+
+public class SeekOriginEnum
+{
+ public static int Main()
+ {
+ SeekOriginEnum ac = new SeekOriginEnum();
+
+ TestLibrary.TestFramework.BeginTestCase("SeekOriginEnum");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ int enumValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: SeekOriginEnum");
+
+ try
+ {
+ enumValue = (int)SeekOrigin.Begin;
+
+ if (0 != enumValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected value: Expected(0) Actual("+enumValue+")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/io/stream/StreamDispose1_PSC.csproj b/tests/src/CoreMangLib/cti/system/io/stream/StreamDispose1_PSC.csproj
new file mode 100644
index 0000000000..fbfc92c491
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/stream/StreamDispose1_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="streamdispose1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/stream/StreamDispose2_PSC.csproj b/tests/src/CoreMangLib/cti/system/io/stream/StreamDispose2_PSC.csproj
new file mode 100644
index 0000000000..0abd37abc3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/stream/StreamDispose2_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="streamdispose2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/stream/StreamNull_PSC.csproj b/tests/src/CoreMangLib/cti/system/io/stream/StreamNull_PSC.csproj
new file mode 100644
index 0000000000..a265fdf3d3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/stream/StreamNull_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="streamnull.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/stream/StreamReadTimeOut_PSC.csproj b/tests/src/CoreMangLib/cti/system/io/stream/StreamReadTimeOut_PSC.csproj
new file mode 100644
index 0000000000..77972734cb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/stream/StreamReadTimeOut_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="streamreadtimeout.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/stream/StreamWriteTimeOut_PSC.csproj b/tests/src/CoreMangLib/cti/system/io/stream/StreamWriteTimeOut_PSC.csproj
new file mode 100644
index 0000000000..1514904fc5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/stream/StreamWriteTimeOut_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="streamwritetimeout.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/stream/streamdispose1.cs b/tests/src/CoreMangLib/cti/system/io/stream/streamdispose1.cs
new file mode 100644
index 0000000000..ea28c6253e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/stream/streamdispose1.cs
@@ -0,0 +1,129 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.IO; // For Stream
+
+[SecuritySafeCritical]
+public class StreamDispose1
+{
+ #region Private Fields
+ private const string c_READ_FILE_NAME = "EmptyFile.txt";
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Make sure Dispose can be called");
+
+ try
+ {
+ Stream stream = new FileStream(c_READ_FILE_NAME, FileMode.OpenOrCreate);
+
+ stream.Dispose();
+
+ try
+ {
+ stream.ReadByte();
+
+ TestLibrary.TestFramework.LogError("001.1", "Call Dispose takes no effect");
+ retVal = false;
+ }
+ catch (ObjectDisposedException)
+ {
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Make sure Dispose can be called twice times");
+
+ try
+ {
+ Stream stream = new FileStream(c_READ_FILE_NAME, FileMode.OpenOrCreate);
+
+ stream.Dispose();
+ stream.Dispose();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Make sure Dispose can be called through IDisposable interface");
+
+ try
+ {
+ Stream stream = new FileStream(c_READ_FILE_NAME, FileMode.OpenOrCreate);
+ IDisposable idisp = stream as IDisposable;
+
+ idisp.Dispose();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StreamDispose1 test = new StreamDispose1();
+
+ TestLibrary.TestFramework.BeginTestCase("StreamDispose1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/stream/streamdispose2.cs b/tests/src/CoreMangLib/cti/system/io/stream/streamdispose2.cs
new file mode 100644
index 0000000000..a0717ed7dc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/stream/streamdispose2.cs
@@ -0,0 +1,262 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.IO; // For Stream
+
+[SecuritySafeCritical]
+public class TestStream : Stream
+{
+ public void DisposeWrapper(bool disposing)
+ {
+ Dispose(disposing);
+ }
+
+ public override bool CanRead
+ {
+ [SecuritySafeCritical]
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public override bool CanSeek
+ {
+ [SecuritySafeCritical]
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public override bool CanWrite
+ {
+ [SecuritySafeCritical]
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ [SecuritySafeCritical]
+ public override void Flush()
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public override long Length
+ {
+ [SecuritySafeCritical]
+ get { throw new Exception("The method or operation is not implemented."); }
+ }
+
+ public override long Position
+ {
+ [SecuritySafeCritical]
+ get
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ [SecuritySafeCritical]
+ set
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+ }
+
+ [SecuritySafeCritical]
+ public override int Read(byte[] buffer, int offset, int count)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ [SecuritySafeCritical]
+ public override long Seek(long offset, SeekOrigin origin)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ [SecuritySafeCritical]
+ public override void SetLength(long value)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ [SecuritySafeCritical]
+ public override void Write(byte[] buffer, int offset, int count)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+}
+
+[SecuritySafeCritical]
+public class StreamDispose2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Dispose with disposing set to true");
+
+ try
+ {
+ TestStream ts = new TestStream();
+
+ ts.DisposeWrapper(true);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Dispose twice with disposing set to true");
+
+ try
+ {
+ TestStream ts = new TestStream();
+
+ ts.DisposeWrapper(true);
+ ts.DisposeWrapper(true);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call Dispose with disposing set to false");
+
+ try
+ {
+ TestStream ts = new TestStream();
+
+ ts.DisposeWrapper(false);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call Dispose twice with disposing set to false");
+
+ try
+ {
+ TestStream ts = new TestStream();
+
+ ts.DisposeWrapper(false);
+ ts.DisposeWrapper(false);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Call Dispose twice with disposing set to false once and another time set to true");
+
+ try
+ {
+ TestStream ts = new TestStream();
+
+ ts.DisposeWrapper(false);
+ ts.DisposeWrapper(true);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Call Dispose twice with disposing set to true once and another time set to false");
+
+ try
+ {
+ TestStream ts = new TestStream();
+
+ ts.DisposeWrapper(true);
+ ts.DisposeWrapper(false);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StreamDispose2 test = new StreamDispose2();
+
+ TestLibrary.TestFramework.BeginTestCase("StreamDispose2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/stream/streamnull.cs b/tests/src/CoreMangLib/cti/system/io/stream/streamnull.cs
new file mode 100644
index 0000000000..0e8bb2284b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/stream/streamnull.cs
@@ -0,0 +1,245 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO; // For Stream
+using System.Security;
+
+[SecuritySafeCritical]
+public class StreamNull
+{
+ #region Private Fields
+ private const int c_ARRAY_SIZE = 1024;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Ensure Stream.Null can be used");
+
+ try
+ {
+ if (null == Stream.Null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Stream.Null is a null reference");
+ retVal = false;
+ }
+
+ if (!Stream.Null.CanRead)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Stream.Null.CanRead returns false");
+ retVal = false;
+ }
+
+ if (!Stream.Null.CanWrite)
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Stream.Null.CanWrite returns false");
+ retVal = false;
+ }
+
+ if (!Stream.Null.CanSeek)
+ {
+ TestLibrary.TestFramework.LogError("001.4", "Stream.Null.CanSeek returns false");
+ retVal = false;
+ }
+
+ if (Stream.Null.Length != 0 )
+ {
+ TestLibrary.TestFramework.LogError("001.5", "Stream.Null.Length returns " + Stream.Null.Length);
+ retVal = false;
+ }
+
+ int ret = Stream.Null.ReadByte();
+ if (ret != -1)
+ {
+ TestLibrary.TestFramework.LogError("001.6", "Stream.Null.ReadByte() returns " + ret);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.7", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Ensure Stream.Null.Position can not be changed");
+
+ try
+ {
+ long randValue = TestLibrary.Generator.GetInt64(-55);
+
+ if (Stream.Null.Position != 0)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Stream.Null.Position returns " + Stream.Null.Position);
+ retVal = false;
+ }
+
+ Stream.Null.Position = randValue;
+ if (Stream.Null.Position != 0)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Stream.Null.Position returns " + Stream.Null.Position);
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] randValue = " + randValue);
+ retVal = false;
+ }
+
+ Stream.Null.Position = randValue;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Ensure Stream.Null.Read takes no effect");
+
+ try
+ {
+ Byte[] randByteArray = new Byte[c_ARRAY_SIZE] ;
+ int offset = TestLibrary.Generator.GetInt32(-55);
+ int count = TestLibrary.Generator.GetInt32(-55);
+
+ int readCount = Stream.Null.Read(randByteArray, offset, count);
+ if (readCount != 0)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Stream.Null.Read returns " + readCount);
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] randByteArray = " + randByteArray + ", offset = " + offset + ", count = " + count);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ Byte[] randByteArray = null;
+ int offset = 0;
+ int count = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Ensure Stream.Null.Write takes no effect");
+
+ try
+ {
+ randByteArray = new Byte[c_ARRAY_SIZE];
+ offset = TestLibrary.Generator.GetInt32(-55);
+ count = TestLibrary.Generator.GetInt32(-55);
+
+ Stream.Null.Write(randByteArray, offset, count);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] randByteArray = " + randByteArray + ", offset = " + offset + ", count = " + count);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Ensure Stream.Null.Seek takes no effect");
+
+ try
+ {
+ long offset = TestLibrary.Generator.GetInt64(-55);
+
+ long retOffset = Stream.Null.Seek(offset, SeekOrigin.Begin);
+ if (retOffset != 0)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "Stream.Null.Seek returns " + retOffset);
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] offset = " + offset);
+ retVal = false;
+ }
+
+ retOffset = Stream.Null.Seek(offset, SeekOrigin.Current);
+ if (retOffset != 0)
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Stream.Null.Seek returns " + retOffset);
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] offset = " + offset);
+ retVal = false;
+ }
+
+ retOffset = Stream.Null.Seek(offset, SeekOrigin.End);
+ if (retOffset != 0)
+ {
+ TestLibrary.TestFramework.LogError("005.3", "Stream.Null.Seek returns " + retOffset);
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] offset = " + offset);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.4", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StreamNull test = new StreamNull();
+
+ TestLibrary.TestFramework.BeginTestCase("StreamNull");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/stream/streamreadtimeout.cs b/tests/src/CoreMangLib/cti/system/io/stream/streamreadtimeout.cs
new file mode 100644
index 0000000000..52aa034846
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/stream/streamreadtimeout.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.Collections;
+using System.IO;
+
+[SecuritySafeCritical]
+public class StreamReadTimeOut
+{
+ public static int Main(string[] args)
+ {
+ StreamReadTimeOut readTimeOut = new StreamReadTimeOut();
+ TestLibrary.TestFramework.BeginScenario("Testing System.IO.Stream.ReadTimeOut property...");
+
+ if (readTimeOut.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ //retVal = PosTest1() && retVal;
+ //retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify InvalidOperationException is thrown when get ReadTimeOut property...");
+
+ try
+ {
+ Stream s = new MemoryStream();
+ for (int i = 0; i < 100; i++)
+ s.WriteByte((byte)i);
+ s.Position = 0;
+
+ int len = s.ReadTimeout;
+
+ TestLibrary.TestFramework.LogError("001","No exception occurs!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify InvalidOperationException is thrown when set ReadTimeOut property...");
+
+ try
+ {
+ Stream s = new MemoryStream();
+ for (int i = 0; i < 100; i++)
+ s.WriteByte((byte)i);
+ s.Position = 0;
+
+ s.ReadTimeout = 10;
+
+ TestLibrary.TestFramework.LogError("001", "No exception occurs!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/stream/streamwritetimeout.cs b/tests/src/CoreMangLib/cti/system/io/stream/streamwritetimeout.cs
new file mode 100644
index 0000000000..842f35f9ad
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/stream/streamwritetimeout.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.Collections;
+using System.IO;
+
+[SecuritySafeCritical]
+public class StreamWriteTimeOut
+{
+ public static int Main(string[] args)
+ {
+ StreamWriteTimeOut writeTimeOut = new StreamWriteTimeOut();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.IO.Stream.WriteTimeOut property...");
+
+ if (writeTimeOut.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify InvalidOperationException is thrown when get WriteTimeOut property...");
+
+ try
+ {
+ Stream s = new MemoryStream();
+ for (int i = 0; i < 100; i++)
+ s.WriteByte((byte)i);
+ s.Position = 0;
+
+ int len = s.WriteTimeout;
+
+ TestLibrary.TestFramework.LogError("001", "No exception occurs!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify InvalidOperationException is thrown when set WriteTimeOut property...");
+
+ try
+ {
+ Stream s = new MemoryStream();
+ for (int i = 0; i < 100; i++)
+ s.WriteByte((byte)i);
+ s.Position = 0;
+
+ s.WriteTimeout = 10;
+
+ TestLibrary.TestFramework.LogError("001", "No exception occurs!");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/streamreader/StreamReaderNull_PSC.csproj b/tests/src/CoreMangLib/cti/system/io/streamreader/StreamReaderNull_PSC.csproj
new file mode 100644
index 0000000000..1e24e41b9a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/streamreader/StreamReaderNull_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="streamreadernull.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/streamreader/streamreadernull.cs b/tests/src/CoreMangLib/cti/system/io/streamreader/streamreadernull.cs
new file mode 100644
index 0000000000..bb4adb4f1a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/streamreader/streamreadernull.cs
@@ -0,0 +1,144 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.IO;
+
+[SecuritySafeCritical]
+public class StreamReaderNull
+{
+ public static int Main()
+ {
+ StreamReaderNull srNull = new StreamReaderNull();
+ TestLibrary.TestFramework.BeginTestCase("StreamReaderNull");
+ if (srNull.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ //retVal = PosTest3() && retVal;may be a bug
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Null StreamReader is not null");
+ try
+ {
+ if (StreamReader.Null == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect Exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Null StreamReader Invoke ReadLine method");
+ try
+ {
+ if (StreamReader.Null.ReadLine() != null)
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect Exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Null StreamReader Invoke some other methods");
+ try
+ {
+ if (StreamReader.Null.Peek() != 0)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "The ExpectResult is not ActualResult");
+ retVal = false;
+ }
+ if (StreamReader.Null.Read() != 0)
+ {
+ TestLibrary.TestFramework.LogError("005.2", "The ExpectResult is not ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect Exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Null StreamReader Invoke ReadBlock method");
+ try
+ {
+ char[] buffer = new char[] { 'a', 'b', 'c' };
+ int index = 0;
+ int count = buffer.Length;
+ if (StreamReader.Null.ReadBlock(buffer,index,count) != 0)
+ {
+ TestLibrary.TestFramework.LogError("007", "The ExpectResult is not ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect Exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Null StreamReader Invoke ToString method");
+ try
+ {
+ if (StreamReader.Null.ToString() != "System.IO.StreamReader+NullStreamReader")
+ {
+ TestLibrary.TestFramework.LogError("009", "The ExpectResult is not ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect Exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/stringwriter/StringWriterEncoding_PSC.csproj b/tests/src/CoreMangLib/cti/system/io/stringwriter/StringWriterEncoding_PSC.csproj
new file mode 100644
index 0000000000..e32fa18046
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/stringwriter/StringWriterEncoding_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringwriterencoding.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/stringwriter/stringwriterencoding.cs b/tests/src/CoreMangLib/cti/system/io/stringwriter/stringwriterencoding.cs
new file mode 100644
index 0000000000..9266894c74
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/stringwriter/stringwriterencoding.cs
@@ -0,0 +1,79 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.IO;
+using System.Text;
+
+[SecuritySafeCritical]
+public class StringWriterEncoding
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property Encoding.");
+
+ try
+ {
+ StringWriter sw = new StringWriter();
+
+ if (sw.Encoding.ToString() != Encoding.Unicode.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property Encoding Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ StringWriterEncoding test = new StringWriterEncoding();
+
+ TestLibrary.TestFramework.BeginTestCase("StringWriterEncoding");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/textreader/TextReaderNull_PSC.csproj b/tests/src/CoreMangLib/cti/system/io/textreader/TextReaderNull_PSC.csproj
new file mode 100644
index 0000000000..18c69d9a31
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/textreader/TextReaderNull_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="textreadernull.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/textreader/textreadernull.cs b/tests/src/CoreMangLib/cti/system/io/textreader/textreadernull.cs
new file mode 100644
index 0000000000..b6946c7c0d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/textreader/textreadernull.cs
@@ -0,0 +1,61 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+
+public class TextReaderNull
+{
+
+ public static int Main()
+ {
+ TextReaderNull TextReaderNull = new TextReaderNull();
+
+ TestLibrary.TestFramework.BeginTestCase("TextReaderNull");
+ if (TextReaderNull.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Compare TextReader.Null to null.");
+ try
+ {
+ TextReader myReader = TextReader.Null;
+ if (myReader.ReadLine()!=null )
+ {
+ TestLibrary.TestFramework.LogError("001.1", "myReader.ReadLine() should return null.");
+ retVal = false;
+
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/io/textwriter/TextWriterNull_PSC.csproj b/tests/src/CoreMangLib/cti/system/io/textwriter/TextWriterNull_PSC.csproj
new file mode 100644
index 0000000000..7214cb76eb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/textwriter/TextWriterNull_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="textwriternull.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/io/textwriter/textwriternull.cs b/tests/src/CoreMangLib/cti/system/io/textwriter/textwriternull.cs
new file mode 100644
index 0000000000..9d11f59345
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/io/textwriter/textwriternull.cs
@@ -0,0 +1,59 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.IO;
+
+[SecuritySafeCritical]
+public class TextWriterNull
+{
+ public static int Main()
+ {
+ TextWriterNull test = new TextWriterNull();
+
+ TestLibrary.TestFramework.BeginTestCase("TextWriterNull");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ");
+
+ try
+ {
+ TextWriter.Null.Write("abc");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/MathAbs1.csproj b/tests/src/CoreMangLib/cti/system/math/MathAbs1.csproj
new file mode 100644
index 0000000000..01e2fc15e8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathAbs1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathabs1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathAbs2.csproj b/tests/src/CoreMangLib/cti/system/math/MathAbs2.csproj
new file mode 100644
index 0000000000..f644cecbb6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathAbs2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathabs2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathAbs3.csproj b/tests/src/CoreMangLib/cti/system/math/MathAbs3.csproj
new file mode 100644
index 0000000000..71b28c7ccc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathAbs3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathabs3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathAbs4.csproj b/tests/src/CoreMangLib/cti/system/math/MathAbs4.csproj
new file mode 100644
index 0000000000..0d602ceaf2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathAbs4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathabs4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathAbs5.csproj b/tests/src/CoreMangLib/cti/system/math/MathAbs5.csproj
new file mode 100644
index 0000000000..599ee56758
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathAbs5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathabs5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathAbs6.csproj b/tests/src/CoreMangLib/cti/system/math/MathAbs6.csproj
new file mode 100644
index 0000000000..c0e8b060db
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathAbs6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathabs6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathAbs7.csproj b/tests/src/CoreMangLib/cti/system/math/MathAbs7.csproj
new file mode 100644
index 0000000000..cfee604fdf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathAbs7.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathabs7.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathAcos.csproj b/tests/src/CoreMangLib/cti/system/math/MathAcos.csproj
new file mode 100644
index 0000000000..58a5df1c83
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathAcos.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathacos.cs" />
+ <Compile Include="mathtestlib.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathAtan.csproj b/tests/src/CoreMangLib/cti/system/math/MathAtan.csproj
new file mode 100644
index 0000000000..35ed661869
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathAtan.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathatan.cs" />
+ <Compile Include="mathtestlib.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathAtan2.csproj b/tests/src/CoreMangLib/cti/system/math/MathAtan2.csproj
new file mode 100644
index 0000000000..1f95698a14
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathAtan2.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathatan2.cs" />
+ <Compile Include="mathtestlib.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathCeiling.csproj b/tests/src/CoreMangLib/cti/system/math/MathCeiling.csproj
new file mode 100644
index 0000000000..3f161d2921
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathCeiling.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathceiling.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathCos.csproj b/tests/src/CoreMangLib/cti/system/math/MathCos.csproj
new file mode 100644
index 0000000000..d148975025
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathCos.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathcos.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathCosh.csproj b/tests/src/CoreMangLib/cti/system/math/MathCosh.csproj
new file mode 100644
index 0000000000..73afb0ce96
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathCosh.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathcosh.cs" />
+ <Compile Include="mathtestlib.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathE.csproj b/tests/src/CoreMangLib/cti/system/math/MathE.csproj
new file mode 100644
index 0000000000..d9437729dd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathE.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathe.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathExp.csproj b/tests/src/CoreMangLib/cti/system/math/MathExp.csproj
new file mode 100644
index 0000000000..46a3593a3e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathExp.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathexp.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathFloor.csproj b/tests/src/CoreMangLib/cti/system/math/MathFloor.csproj
new file mode 100644
index 0000000000..5b61a708c2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathFloor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathfloor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathIEEERemainder.csproj b/tests/src/CoreMangLib/cti/system/math/MathIEEERemainder.csproj
new file mode 100644
index 0000000000..904d5b7e5d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathIEEERemainder.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathieeeremainder.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathLog.csproj b/tests/src/CoreMangLib/cti/system/math/MathLog.csproj
new file mode 100644
index 0000000000..3d28bfba51
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathLog.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathlog.cs" />
+ <Compile Include="mathtestlib.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathLog10.csproj b/tests/src/CoreMangLib/cti/system/math/MathLog10.csproj
new file mode 100644
index 0000000000..ba0dbb7fb5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathLog10.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathlog10.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathMax1.csproj b/tests/src/CoreMangLib/cti/system/math/MathMax1.csproj
new file mode 100644
index 0000000000..52dd951681
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathMax1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathmax1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathMax10.csproj b/tests/src/CoreMangLib/cti/system/math/MathMax10.csproj
new file mode 100644
index 0000000000..e5ff91ed67
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathMax10.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathmax10.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathMax11.csproj b/tests/src/CoreMangLib/cti/system/math/MathMax11.csproj
new file mode 100644
index 0000000000..5729dc0e18
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathMax11.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathmax11.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathMax2.csproj b/tests/src/CoreMangLib/cti/system/math/MathMax2.csproj
new file mode 100644
index 0000000000..db47f6cd49
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathMax2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathmax2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathMax3.csproj b/tests/src/CoreMangLib/cti/system/math/MathMax3.csproj
new file mode 100644
index 0000000000..051910e041
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathMax3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathmax3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathMax4.csproj b/tests/src/CoreMangLib/cti/system/math/MathMax4.csproj
new file mode 100644
index 0000000000..ce013144b8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathMax4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathmax4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathMax5.csproj b/tests/src/CoreMangLib/cti/system/math/MathMax5.csproj
new file mode 100644
index 0000000000..c83a029e2a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathMax5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathmax5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathMax6.csproj b/tests/src/CoreMangLib/cti/system/math/MathMax6.csproj
new file mode 100644
index 0000000000..5e09ae1463
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathMax6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathmax6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathMax7.csproj b/tests/src/CoreMangLib/cti/system/math/MathMax7.csproj
new file mode 100644
index 0000000000..c06f11631e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathMax7.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathmax7.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathMax8.csproj b/tests/src/CoreMangLib/cti/system/math/MathMax8.csproj
new file mode 100644
index 0000000000..d9c7015553
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathMax8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathmax8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathMax9.csproj b/tests/src/CoreMangLib/cti/system/math/MathMax9.csproj
new file mode 100644
index 0000000000..bd1329ad15
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathMax9.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathmax9.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathMin1.csproj b/tests/src/CoreMangLib/cti/system/math/MathMin1.csproj
new file mode 100644
index 0000000000..52c4d5ca07
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathMin1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathmin1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathMin10.csproj b/tests/src/CoreMangLib/cti/system/math/MathMin10.csproj
new file mode 100644
index 0000000000..6411bee3ec
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathMin10.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathmin10.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathMin11.csproj b/tests/src/CoreMangLib/cti/system/math/MathMin11.csproj
new file mode 100644
index 0000000000..c2beb42c7f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathMin11.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathmin11.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathMin2.csproj b/tests/src/CoreMangLib/cti/system/math/MathMin2.csproj
new file mode 100644
index 0000000000..513a58d5c4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathMin2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathmin2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathMin3.csproj b/tests/src/CoreMangLib/cti/system/math/MathMin3.csproj
new file mode 100644
index 0000000000..08c7919443
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathMin3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathmin3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathMin4.csproj b/tests/src/CoreMangLib/cti/system/math/MathMin4.csproj
new file mode 100644
index 0000000000..8c3072407f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathMin4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathmin4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathMin5.csproj b/tests/src/CoreMangLib/cti/system/math/MathMin5.csproj
new file mode 100644
index 0000000000..e224b0b67c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathMin5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathmin5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathMin6.csproj b/tests/src/CoreMangLib/cti/system/math/MathMin6.csproj
new file mode 100644
index 0000000000..a0d0043fb7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathMin6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathmin6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathMin7.csproj b/tests/src/CoreMangLib/cti/system/math/MathMin7.csproj
new file mode 100644
index 0000000000..8a189f261e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathMin7.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathmin7.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathMin8.csproj b/tests/src/CoreMangLib/cti/system/math/MathMin8.csproj
new file mode 100644
index 0000000000..f17f657c53
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathMin8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathmin8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathMin9.csproj b/tests/src/CoreMangLib/cti/system/math/MathMin9.csproj
new file mode 100644
index 0000000000..819ea9f750
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathMin9.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathmin9.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathPI.csproj b/tests/src/CoreMangLib/cti/system/math/MathPI.csproj
new file mode 100644
index 0000000000..e5dc61ba4c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathPI.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathpi.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathPow.csproj b/tests/src/CoreMangLib/cti/system/math/MathPow.csproj
new file mode 100644
index 0000000000..3c70e7a02c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathPow.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathpow.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathRound2.csproj b/tests/src/CoreMangLib/cti/system/math/MathRound2.csproj
new file mode 100644
index 0000000000..3056ccdcfc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathRound2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathround2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathRound3.csproj b/tests/src/CoreMangLib/cti/system/math/MathRound3.csproj
new file mode 100644
index 0000000000..fed781d31f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathRound3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathround3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathRound4.csproj b/tests/src/CoreMangLib/cti/system/math/MathRound4.csproj
new file mode 100644
index 0000000000..440958e2db
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathRound4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathround4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathSign1.csproj b/tests/src/CoreMangLib/cti/system/math/MathSign1.csproj
new file mode 100644
index 0000000000..47305371a7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathSign1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathsign1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathSign2.csproj b/tests/src/CoreMangLib/cti/system/math/MathSign2.csproj
new file mode 100644
index 0000000000..d94bf86ba3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathSign2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathsign2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathSign3.csproj b/tests/src/CoreMangLib/cti/system/math/MathSign3.csproj
new file mode 100644
index 0000000000..2a038b2666
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathSign3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathsign3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathSign4.csproj b/tests/src/CoreMangLib/cti/system/math/MathSign4.csproj
new file mode 100644
index 0000000000..d46241e76f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathSign4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathsign4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathSign5.csproj b/tests/src/CoreMangLib/cti/system/math/MathSign5.csproj
new file mode 100644
index 0000000000..fe1cd8c44a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathSign5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathsign5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathSign6.csproj b/tests/src/CoreMangLib/cti/system/math/MathSign6.csproj
new file mode 100644
index 0000000000..a8fcffff35
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathSign6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathsign6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathSign7.csproj b/tests/src/CoreMangLib/cti/system/math/MathSign7.csproj
new file mode 100644
index 0000000000..e7663af9b2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathSign7.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathsign7.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathSin.csproj b/tests/src/CoreMangLib/cti/system/math/MathSin.csproj
new file mode 100644
index 0000000000..f133a98a3c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathSin.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathsin.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathSinh.csproj b/tests/src/CoreMangLib/cti/system/math/MathSinh.csproj
new file mode 100644
index 0000000000..b8934fe6b7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathSinh.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathsinh.cs" />
+ <Compile Include="mathtestlib.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathSqrt.csproj b/tests/src/CoreMangLib/cti/system/math/MathSqrt.csproj
new file mode 100644
index 0000000000..6b4225aecf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathSqrt.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathsqrt.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathTan.csproj b/tests/src/CoreMangLib/cti/system/math/MathTan.csproj
new file mode 100644
index 0000000000..c575203e1d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathTan.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathtan.cs" />
+ <Compile Include="mathtestlib.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/MathTanh.csproj b/tests/src/CoreMangLib/cti/system/math/MathTanh.csproj
new file mode 100644
index 0000000000..fbe2853fea
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/MathTanh.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathtanh.cs" />
+ <Compile Include="mathtestlib.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/mathRound1.csproj b/tests/src/CoreMangLib/cti/system/math/mathRound1.csproj
new file mode 100644
index 0000000000..ebbf272e62
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathRound1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="mathround1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/mathabs1.cs b/tests/src/CoreMangLib/cti/system/math/mathabs1.cs
new file mode 100644
index 0000000000..43d8482c3f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathabs1.cs
@@ -0,0 +1,135 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Abs(System.Decimal)
+/// </summary>
+public class MathAbs1
+{
+ public static int Main(string[] args)
+ {
+ MathAbs1 abs1 = new MathAbs1();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Abs(System.Decimal)...");
+
+ if (abs1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the max value of Decimal is equal to its Abs value...");
+
+ try
+ {
+ Decimal dec = Decimal.MaxValue;
+ if (Math.Abs(dec) != dec)
+ {
+ TestLibrary.TestFramework.LogError("001","The Abs of max value should be equal to itself!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify the Abs of min value should be equal to it's contrary value...");
+
+ try
+ {
+ Decimal dec = Decimal.MinValue;
+ if (Math.Abs(dec) != -dec)
+ {
+ TestLibrary.TestFramework.LogError("003","The Abs of min value should be equal to it's contrary value!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify the Abs of MinusOne should be equal to it's contrary value...");
+
+ try
+ {
+ Decimal dec = Decimal.MinusOne;
+ if (Math.Abs(dec) != -dec)
+ {
+ TestLibrary.TestFramework.LogError("005", "The Abs of MinusOne should be equal to it's contrary value!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify Abs value of zero should be equal to both itself and its contrary value...");
+
+ try
+ {
+ Decimal zero = 0;
+ if (Math.Abs(zero) != zero || Math.Abs(zero) != -zero)
+ {
+ TestLibrary.TestFramework.LogError("007", "Abs value of zero should be equal to both itself and its contrary value!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathabs2.cs b/tests/src/CoreMangLib/cti/system/math/mathabs2.cs
new file mode 100644
index 0000000000..1ee1567c82
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathabs2.cs
@@ -0,0 +1,183 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Abs(System.Double)
+/// </summary>
+public class MathAbs2
+{
+ public static int Main(string[] args)
+ {
+ MathAbs2 abs2 = new MathAbs2();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Abs(System.Double)...");
+
+ if (abs2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the max value of Double should be equal to its Abs value...");
+
+ try
+ {
+ Double doubleParam = Double.MaxValue;
+ if (Math.Abs(doubleParam) != doubleParam)
+ {
+ TestLibrary.TestFramework.LogError("001", "The Abs of max value should be equal to itself!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify the Abs of min value of Double should be equal to it's contrary value...");
+
+ try
+ {
+ Double doubleParam = Double.MinValue;
+ if (Math.Abs(doubleParam) != -doubleParam)
+ {
+ TestLibrary.TestFramework.LogError("003", "The Abs of min value should be equal to it's contrary value!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify the Abs of NegativeInfinity should be equal to it's contrary value...");
+
+ try
+ {
+ Double doubleParam = Double.NegativeInfinity;
+ if (Math.Abs(doubleParam) != -doubleParam)
+ {
+ TestLibrary.TestFramework.LogError("005", "The Abs of NegativeInfinity should be equal to it's contrary value!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify the Abs of PositiveInfinity should be equal to itself...");
+
+ try
+ {
+ Double doubleParam = Double.PositiveInfinity;
+ if (Math.Abs(doubleParam) != doubleParam)
+ {
+ TestLibrary.TestFramework.LogError("007", "The Abs of PositiveInfinity should be equal to itself!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify Abs value of zero should be equal to both itself and its contrary value...");
+
+ try
+ {
+ Double zero = 0;
+ if (Math.Abs(zero) != zero || Math.Abs(zero) != -zero)
+ {
+ TestLibrary.TestFramework.LogError("009", "Abs value of zero should be equal to both itself and its contrary value!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Verify Abs value of Epsilon ");
+
+ try
+ {
+ Double epsilon = Double.Epsilon;
+ if (Math.Abs(epsilon) != epsilon)
+ {
+ TestLibrary.TestFramework.LogError("011","Abs value of epsilon should be equal to itself...");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathabs3.cs b/tests/src/CoreMangLib/cti/system/math/mathabs3.cs
new file mode 100644
index 0000000000..80711f64b2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathabs3.cs
@@ -0,0 +1,116 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Math.Abs(System.Int16)
+/// </summary>
+public class MathAbs3
+{
+ public static int Main(string[] args)
+ {
+ MathAbs3 abs3 = new MathAbs3();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Abs(System.Int16)...");
+
+ if (abs3.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the max value of Int16 should be equal to its Abs value...");
+
+ try
+ {
+ Int16 min = Int16.MaxValue;
+ if (Math.Abs(min) != min)
+ {
+ TestLibrary.TestFramework.LogError("001", "The Abs of max value should be equal to itself!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify Abs value of zero should be equal to both itself and its contrary value...");
+
+ try
+ {
+ Int16 zero = 0;
+ if (Math.Abs(zero) != zero || Math.Abs(zero) != -zero)
+ {
+ TestLibrary.TestFramework.LogError("003", "Abs value of zero should be equal to both itself and its contrary value!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Verify the Abs of min value of Int16...");
+
+ try
+ {
+ Int16 min = Int16.MinValue;
+ if (Math.Abs(min) != -min)
+ {
+ TestLibrary.TestFramework.LogError("101", "The Abs of min value should be equal to it's contrary value!");
+ retVal = false;
+ }
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathabs4.cs b/tests/src/CoreMangLib/cti/system/math/mathabs4.cs
new file mode 100644
index 0000000000..2d3963346a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathabs4.cs
@@ -0,0 +1,116 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Abs(System.Int32)
+/// </summary>
+public class MathAbs4
+{
+ public static int Main(string[] args)
+ {
+ MathAbs4 abs4 = new MathAbs4();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Abs(System.Int32)...");
+
+ if (abs4.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the max value of Int32 should be equal to its Abs value...");
+
+ try
+ {
+ Int32 max = Int32.MaxValue;
+ if (Math.Abs(max) != max)
+ {
+ TestLibrary.TestFramework.LogError("001", "The Abs of max value should be equal to itself!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify Abs value of zero should be equal to both itself and its contrary value...");
+
+ try
+ {
+ Int32 zero = 0;
+ if (Math.Abs(zero) != zero || Math.Abs(zero) != -zero)
+ {
+ TestLibrary.TestFramework.LogError("003", "Abs value of zero should be equal to both itself and its contrary value!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Verify the Abs of min value of Int32...");
+
+ try
+ {
+ Int32 min = Int32.MinValue;
+ if (Math.Abs(min) != -min)
+ {
+ TestLibrary.TestFramework.LogError("101", "The Abs of min value should be equal to it's contrary value!");
+ retVal = false;
+ }
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathabs5.cs b/tests/src/CoreMangLib/cti/system/math/mathabs5.cs
new file mode 100644
index 0000000000..b4b035da1a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathabs5.cs
@@ -0,0 +1,116 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// System.Math.Abs(System.Int64)
+/// </summary>
+public class MathAbs5
+{
+ public static int Main(string[] args)
+ {
+ MathAbs5 abs5 = new MathAbs5();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Abs(System.Int64)...");
+
+ if (abs5.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the max value of Int64 should be equal to its Abs value...");
+
+ try
+ {
+ Int64 max = Int64.MaxValue;
+ if (Math.Abs(max) != max)
+ {
+ TestLibrary.TestFramework.LogError("001", "The Abs of max value should be equal to itself!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify Abs value of zero should be equal to both itself and its contrary value...");
+
+ try
+ {
+ Int64 zero = 0;
+ if (Math.Abs(zero) != zero || Math.Abs(zero) != -zero)
+ {
+ TestLibrary.TestFramework.LogError("003", "Abs value of zero should be equal to both itself and its contrary value!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Verify the Abs of min value of Int64...");
+
+ try
+ {
+ Int64 min = Int64.MinValue;
+ Math.Abs(min);
+
+ TestLibrary.TestFramework.LogError("101", "The Abs of min value should be equal to it's contrary value!");
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathabs6.cs b/tests/src/CoreMangLib/cti/system/math/mathabs6.cs
new file mode 100644
index 0000000000..a99d9a3dee
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathabs6.cs
@@ -0,0 +1,114 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+
+public class MathAbs6
+{
+ public static int Main(string[] args)
+ {
+ MathAbs6 abs6 = new MathAbs6();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Abs(System.SByte)...");
+
+ if (abs6.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the max value of Int32 should be equal to its Abs value...");
+
+ try
+ {
+ SByte mySByte = SByte.MaxValue;
+ if (Math.Abs(mySByte) != mySByte)
+ {
+ TestLibrary.TestFramework.LogError("001", "The Abs of max value should be equal to itself!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify Abs value of zero should be equal to both itself and its contrary value...");
+
+ try
+ {
+ SByte zero = 0;
+ if (Math.Abs(zero) != zero || Math.Abs(zero) != -zero)
+ {
+ TestLibrary.TestFramework.LogError("003", "Abs value of zero should be equal to both itself and its contrary value!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Verify the Abs of min value of SByte...");
+
+ try
+ {
+ SByte mySByte = SByte.MinValue;
+ Math.Abs(mySByte);
+
+ TestLibrary.TestFramework.LogError("101", "The Abs of min value should be equal to it's contrary value!");
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathabs7.cs b/tests/src/CoreMangLib/cti/system/math/mathabs7.cs
new file mode 100644
index 0000000000..101be6429d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathabs7.cs
@@ -0,0 +1,185 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+
+/// <summary>
+/// System.Math.Abs(System.Single)
+/// </summary>
+public class MathAbs7
+{
+ public static int Main(string[] args)
+ {
+ MathAbs7 abs7 = new MathAbs7();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Abs(System.Single)...");
+
+ if (abs7.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the max value of Single should be equal to its Abs value");
+
+ try
+ {
+ Single max = Single.MaxValue;
+ if (Math.Abs(max) != max)
+ {
+ TestLibrary.TestFramework.LogError("001", "The Abs of max value should be equal to itself!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify the min value of Single should be equal to its Abs value");
+
+ try
+ {
+ Single min = Single.MinValue;
+ if (Math.Abs(min) != -min)
+ {
+ TestLibrary.TestFramework.LogError("003", "The Abs of max value should be equal to it's contrary!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify the NegativeInfinity of Single should be equal to its contrary...");
+
+ try
+ {
+ Single negInfinit = Single.NegativeInfinity;
+ if (Math.Abs(negInfinit) != -negInfinit)
+ {
+ TestLibrary.TestFramework.LogError("005", "The Abs of max value should be equal to it's contrary!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify the PositiveInfinity of Single should be equal to its Abs value");
+
+ try
+ {
+ Single posInfinit = Single.PositiveInfinity;
+ if (Math.Abs(posInfinit) != posInfinit)
+ {
+ TestLibrary.TestFramework.LogError("007", "The Abs of max value should be equal to itself!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify Abs value of zero should be equal to both itself and its contrary value...");
+
+ try
+ {
+ Single zero = 0;
+ if (Math.Abs(zero) != zero || Math.Abs(zero) != -zero)
+ {
+ TestLibrary.TestFramework.LogError("009", "Abs value of zero should be equal to both itself and its contrary value!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Verify Abs value of Epsilon ");
+
+ try
+ {
+ Single epsilon = Single.Epsilon;
+ if (Math.Abs(epsilon) != epsilon)
+ {
+ TestLibrary.TestFramework.LogError("011", "Abs value of epsilon should be equal to itself...");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathacos.cs b/tests/src/CoreMangLib/cti/system/math/mathacos.cs
new file mode 100644
index 0000000000..fcd714d1be
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathacos.cs
@@ -0,0 +1,214 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+
+/// <summary>
+/// System.Math.Acos(System.Double)
+/// </summary>
+public class MathAcos
+{
+
+
+ public static int Main(string[] args)
+ {
+ MathAcos Acos = new MathAcos();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Acos(System.Double)...");
+
+ if (Acos.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ //TestLibrary.TestFramework.LogInformation("[Negtive]");
+ //retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Arccos(-1) is Math.PI...");
+
+ try
+ {
+ double angle = Math.Acos(-1);
+ if (!MathTestLib.DoubleIsWithinEpsilon(angle ,Math.PI))
+ {
+ TestLibrary.TestFramework.LogError("001","Expected Math.Acos(-1) = " + Math.PI.ToString() +", received "+
+ angle.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify the value of Arccos(0) is Math.PI/2...");
+
+ try
+ {
+ double angle = Math.Acos(0);
+ if (!MathTestLib.DoubleIsWithinEpsilon(angle, Math.PI/2))
+ {
+ TestLibrary.TestFramework.LogError("003", "Expected pi/2, got " + angle.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify the value of Arccos(1) is 0...");
+
+ try
+ {
+ double angle = Math.Acos(1);
+ if (!MathTestLib.DoubleIsWithinEpsilon(angle ,0))
+ {
+ TestLibrary.TestFramework.LogError("005", "Expected 1, got " + angle.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify the value of Arccos(0.5) is Math.PI/3...");
+
+ try
+ {
+ double angle = Math.Acos(0.5);
+ if (!MathTestLib.DoubleIsWithinEpsilon(angle, 1.0471975511965979))
+ {
+ TestLibrary.TestFramework.LogError("007","Expected 1.0471975511965979, got "+angle.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify the value of Arccos(-0.5) is 2*Math.PI/3...");
+
+ try
+ {
+ double angle = Math.Acos(-0.5);
+ if (!MathTestLib.DoubleIsWithinEpsilon(angle, 2.0943951023931957))
+ {
+ TestLibrary.TestFramework.LogError("009", "Expected: 2.09439510239319573, actual: " + angle.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Verify the value of Arccos(Math.Sqrt(3)/2) is Math.PI/6...");
+
+ try
+ {
+ double angle = Math.Acos(Math.Sqrt(3)/2);
+ if (!MathTestLib.DoubleIsWithinEpsilon(angle, 0.52359877559829893))
+ {
+ TestLibrary.TestFramework.LogError("011", "Expected: 0.52359877559829893, actual: " + angle.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Verify the value of Arccos(-Math.Sqrt(3)/2) is 5*Math.PI/6...");
+
+ try
+ {
+ double angle = Math.Acos(-Math.Sqrt(3) / 2);
+ if (!MathTestLib.DoubleIsWithinEpsilon(angle, 2.6179938779914944))
+ {
+ TestLibrary.TestFramework.LogError("013", "Expected: 2.617993877991494, actual: " + angle.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathatan.cs b/tests/src/CoreMangLib/cti/system/math/mathatan.cs
new file mode 100644
index 0000000000..ebeea75a96
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathatan.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Atan(System.Double)
+/// </summary>
+public class MathAtan
+{
+ public static int Main(string[] args)
+ {
+ MathAtan arctan = new MathAtan();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Atan(System.Double)...");
+
+ if (arctan.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of arctan(NegativeInfinity) is -Math.PI/2...");
+
+ try
+ {
+ double angle = Math.Atan(double.NegativeInfinity);
+ if (!MathTestLib.DoubleIsWithinEpsilon(angle ,-Math.PI / 2))
+ {
+ TestLibrary.TestFramework.LogError("001", "Expected: -pi/2, actual: " +
+ angle.ToString() + " diff>epsilon= " + MathTestLib.Epsilon.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify the value of arctan(PositiveInfinity) is Math.PI/2...");
+
+ try
+ {
+ double angle = Math.Atan(double.PositiveInfinity);
+ if (!MathTestLib.DoubleIsWithinEpsilon(angle, Math.PI / 2))
+ {
+ TestLibrary.TestFramework.LogError("003", "Expected: pi/2, actual: " +
+ angle.ToString() + " diff>epsilon= " + MathTestLib.Epsilon.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify the value of arctan(0) is zero...");
+
+ try
+ {
+ double angle = Math.Atan(0);
+ if (!MathTestLib.DoubleIsWithinEpsilon(angle ,0))
+ {
+ TestLibrary.TestFramework.LogError("005", "Expected: 0, actual: " +
+ angle.ToString() + " diff>epsilon= " + MathTestLib.Epsilon.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify the value of atn(inf+1)=atn(inf)");
+
+ try
+ {
+ double angle = Math.Atan(double.PositiveInfinity +1);
+ double baseline = Math.Atan(double.PositiveInfinity);
+ if (!MathTestLib.DoubleIsWithinEpsilon(angle ,baseline))
+ {
+ TestLibrary.TestFramework.LogError("007", "Expected: "+baseline.ToString()+", actual: " +
+ angle.ToString() + " diff>epsilon= " + MathTestLib.Epsilon.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify atn(-inf -1)=atn(-inf)");
+
+ try
+ {
+ double angle = Math.Atan(double.NegativeInfinity - 1);
+ double baseline = Math.Atan(double.NegativeInfinity);
+ if (!MathTestLib.DoubleIsWithinEpsilon(angle ,baseline))
+ {
+ TestLibrary.TestFramework.LogError("009", "Expected " + baseline.ToString()+ ", actual: " + angle.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathatan2.cs b/tests/src/CoreMangLib/cti/system/math/mathatan2.cs
new file mode 100644
index 0000000000..c4db101bb1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathatan2.cs
@@ -0,0 +1,274 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Atan2(System.Double,System.Double)
+/// </summary>
+public class MathAtan2
+{
+ public static int Main(string[] args)
+ {
+ MathAtan2 arctan2 = new MathAtan2();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Atan2(System.Double,System.Double)...");
+
+ if (arctan2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the angle of arctan(x,y) when the point in quadrant one...");
+
+ try
+ {
+ double x = TestLibrary.Generator.GetDouble(-55);
+ while (x <= 0)
+ {
+ x = TestLibrary.Generator.GetDouble(-55);
+ }
+ double y = TestLibrary.Generator.GetDouble(-55);
+ while (y <= 0)
+ {
+ y = TestLibrary.Generator.GetDouble(-55);
+ }
+
+ double angle = Math.Atan2(y,x);
+ if (angle > Math.PI / 2 || angle < 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "The angle should be between 0 and Math.PI/2, actual: " +
+ angle.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify the angle of arctan(x,y) when the point in quadrant four...");
+
+ try
+ {
+ double x = TestLibrary.Generator.GetDouble(-55);
+ while (x <= 0)
+ {
+ x = TestLibrary.Generator.GetDouble(-55);
+ }
+ double y = TestLibrary.Generator.GetDouble(-55);
+ while (y >= 0)
+ {
+ y = -TestLibrary.Generator.GetDouble(-55);
+ }
+
+ double angle = Math.Atan2(y, x);
+ if (angle > 0 || angle < -Math.PI / 2)
+ {
+ TestLibrary.TestFramework.LogError("003", "The angle should be between 0 and -Math.PI/2, actual: " +
+ angle.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify the angle of arctan(x,y) when the point in forward direction of X axis...");
+
+ try
+ {
+ double x = TestLibrary.Generator.GetDouble(-55);
+ while (x <= 0)
+ {
+ x = TestLibrary.Generator.GetDouble(-55);
+ }
+
+ double y = 0;
+ double angle = Math.Atan2(y, x);
+ if (!MathTestLib.DoubleIsWithinEpsilon(angle ,0.0))
+ {
+ TestLibrary.TestFramework.LogError("005", "The angle should be zero,actual: "+angle.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify the angle of arctan(x,y) when the point in forward direction of Y axis...");
+
+ try
+ {
+ double x = 0;
+ double y = TestLibrary.Generator.GetDouble(-55);
+ while (y <= 0)
+ {
+ y = TestLibrary.Generator.GetDouble(-55);
+ }
+ double angle = Math.Atan2(y, x);
+ if (!MathTestLib.DoubleIsWithinEpsilon(angle ,Math.PI / 2))
+ {
+ TestLibrary.TestFramework.LogError("007", "The angle should be pi/2, actual:"+angle.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify the angle of arctan(x,y) when the point in negative direction of Y axis...");
+
+ try
+ {
+ double x = 0;
+ double y = TestLibrary.Generator.GetDouble(-55);
+ while (y >= 0)
+ {
+ y = -TestLibrary.Generator.GetDouble(-55);
+ }
+ double angle = Math.Atan2(y, x);
+ if (!MathTestLib.DoubleIsWithinEpsilon(angle ,-Math.PI / 2))
+ {
+ TestLibrary.TestFramework.LogError("009", "The angle should be -pi/2, actual: "+angle.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Verify the angle of arctan(x,y) when the point in quadrant two...");
+
+ try
+ {
+ double x = TestLibrary.Generator.GetDouble(-55);
+ while (x >= 0)
+ {
+ x = -TestLibrary.Generator.GetDouble(-55);
+ }
+ double y = TestLibrary.Generator.GetDouble(-55);
+ while (y <= 0)
+ {
+ y = TestLibrary.Generator.GetDouble(-55);
+ }
+
+ double angle = Math.Atan2(y, x);
+ if (angle < Math.PI / 2 || angle > Math.PI)
+ {
+ TestLibrary.TestFramework.LogError("011", "The angle should be between 0 and Math.PI/2, actual: " + angle.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Verify the angle of arctan(x,y) when the point in quadrant three...");
+
+ try
+ {
+ double x = TestLibrary.Generator.GetDouble(-55);
+ while (x >= 0)
+ {
+ x = -TestLibrary.Generator.GetDouble(-55);
+ }
+ double y = TestLibrary.Generator.GetDouble(-55);
+ while (y >= 0)
+ {
+ y = -TestLibrary.Generator.GetDouble(-55);
+ }
+
+ double angle = Math.Atan2(y, x);
+ if (angle > -Math.PI / 2 || angle < -Math.PI)
+ {
+ TestLibrary.TestFramework.LogError("013", "The angle should be between 0 and Math.PI/2, actual: " +
+ angle.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathceiling.cs b/tests/src/CoreMangLib/cti/system/math/mathceiling.cs
new file mode 100644
index 0000000000..0839173611
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathceiling.cs
@@ -0,0 +1,208 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+
+/// <summary>
+/// System.Math.Ceiling(System.Double)
+/// </summary>
+public class MathCeiling
+{
+ public static int Main(string[] args)
+ {
+ MathCeiling ceiling = new MathCeiling();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Ceiling(System.Double)...");
+
+ if (ceiling.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Ceiling number should be equal to the integer part of negative number...");
+
+ try
+ {
+ double number = TestLibrary.Generator.GetDouble(-55);
+ while (number >= 0)
+ {
+ number = (-TestLibrary.Generator.GetDouble(-55))*100;
+ }
+
+ double ceilingNumber = Math.Ceiling(number);
+ if (ceilingNumber < number || ceilingNumber > number + 1)
+ {
+ TestLibrary.TestFramework.LogError("001","The Ceiling number should be equal to the integer part of negative number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify Ceiling number should be equal to itself when number is negative integer");
+
+ try
+ {
+ double number = TestLibrary.Generator.GetDouble(-55);
+ while (number >= 0)
+ {
+ number = (-TestLibrary.Generator.GetDouble(-55)) * 100;
+ }
+
+ double ceilingNumber = Math.Ceiling(number);
+ if (ceilingNumber != Math.Ceiling(ceilingNumber))
+ {
+ TestLibrary.TestFramework.LogError("003","The Ceiling number should be equal to itself when number is negative integer...");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify Ceiling number should be equal to the integer part plus one of positive number...");
+
+ try
+ {
+ double number = TestLibrary.Generator.GetDouble(-55);
+ while (number <= 0)
+ {
+ number = (TestLibrary.Generator.GetDouble(-55)) * 100;
+ }
+
+ double ceilingNumber = Math.Ceiling(number);
+ if (ceilingNumber < number || ceilingNumber > number + 1)
+ {
+ TestLibrary.TestFramework.LogError("005", "The Ceiling number should be equal to the integer part plus one of positive number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify Ceiling number should be equal to itself when number is positive integer");
+
+ try
+ {
+ double number = TestLibrary.Generator.GetDouble(-55);
+ while (number <= 0)
+ {
+ number = (TestLibrary.Generator.GetDouble(-55)) * 100;
+ }
+
+ double ceilingNumber = Math.Ceiling(number);
+ if (ceilingNumber != Math.Ceiling(ceilingNumber))
+ {
+ TestLibrary.TestFramework.LogError("007", "The Ceiling number should be equal to itself when number is positive integer...");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify Ceiling number should be equal to itself when number is maxvalue...");
+
+ try
+ {
+ double ceilingMax = Math.Ceiling(double.MaxValue);
+ if (ceilingMax != double.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("009", "The Ceiling number should be equal to itself when number is maxvalue!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Verify Ceiling number should be equal to itself when number is minvalue...");
+
+ try
+ {
+ double ceilingMax = Math.Ceiling(double.MinValue);
+ if (ceilingMax != double.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("011", "The Ceiling number should be equal to itself when number is minvalue!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathcos.cs b/tests/src/CoreMangLib/cti/system/math/mathcos.cs
new file mode 100644
index 0000000000..418a62b871
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathcos.cs
@@ -0,0 +1,185 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Cos(System.Double)
+/// </summary>
+public class MathCos
+{
+ public static int Main(string[] args)
+ {
+ MathCos cos = new MathCos();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Cos(System.Double)...");
+
+ if (cos.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of cosine(0)...");
+
+ try
+ {
+ double value = Math.Cos(0);
+ if (value != 1)
+ {
+ TestLibrary.TestFramework.LogError("001", "cosine(0) should be 1!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify the value of cosine(Math.PI/2)...");
+
+ try
+ {
+ double value = Math.Cos(Math.PI/2);
+ if (Math.Abs(1000000000*value) >= 0.1)
+ {
+ TestLibrary.TestFramework.LogError("003", "cosine(Math.PI/2) should be 0!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify the value of cosine(Math.PI)...");
+
+ try
+ {
+ double value = Math.Cos(Math.PI);
+ if (value != -1)
+ {
+ TestLibrary.TestFramework.LogError("005", "cosine(Math.PI) should be -1!");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify the value of cosine(3*Math.PI/2)...");
+
+ try
+ {
+ double value = Math.Cos(3*Math.PI/2);
+ if (Math.Abs(1000000000 * value) >= 0.1)
+ {
+ TestLibrary.TestFramework.LogError("007", "cosine(3*Math.PI/2) should be 0!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify the value of cosine(2*Math.PI) is equal to cosine(0)...");
+
+ try
+ {
+ double value1 = Math.Cos(0);
+ double value2 = Math.Cos(2*Math.PI);
+ if (value1 != value2)
+ {
+ TestLibrary.TestFramework.LogError("009", "cosine(3*Math.PI/2) should be 0!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Verify the value of cosine(number) is between -1 and 1...");
+
+ try
+ {
+ double coefficient = TestLibrary.Generator.GetDouble(-55);
+ if (Math.Cos(2 * coefficient * Math.PI) > 1 || Math.Cos(2 * coefficient * Math.PI) < -1)
+ {
+ TestLibrary.TestFramework.LogError("011","The scale of cosine is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathcosh.cs b/tests/src/CoreMangLib/cti/system/math/mathcosh.cs
new file mode 100644
index 0000000000..2e75afbfa8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathcosh.cs
@@ -0,0 +1,170 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Cosh(System.Double)
+/// </summary>
+public class MathCosh
+{
+ public static int Main(string[] args)
+ {
+ MathCosh cosh = new MathCosh();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Cosh(System.Double)...");
+
+ if (cosh.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the monotonicity of cosh function...");
+
+ try
+ {
+ double variable = TestLibrary.Generator.GetDouble(-55);
+ double value1 = Math.Cosh(variable);
+ double positiveoffset = Math.Exp(-20);
+ double value2 = Math.Cosh(variable + positiveoffset);
+
+ if (value2 <= value1)
+ {
+ TestLibrary.TestFramework.LogError("001", "the monotonicity of cosh function [x>=y -> cosh(x)>=cosh(y)]");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify the evenness of cosh function [cosh(x)=cosh(-x)]");
+
+ try
+ {
+ double variable = TestLibrary.Generator.GetDouble(-55);
+ double value1 = Math.Cosh(variable);
+ double value2 = Math.Cosh(-variable);
+
+ if (!MathTestLib.DoubleIsWithinEpsilon(value1, value2))
+ {
+ TestLibrary.TestFramework.LogError("003", "The parity of cosh should be even function!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify the value of cosh(0) = 1...");
+
+ try
+ {
+ double zero = 0;
+ double value = Math.Cosh(zero);
+ if (!MathTestLib.DoubleIsWithinEpsilon(value ,1))
+ {
+ TestLibrary.TestFramework.LogError("005", "The value of cosh(0) should be 1, actual: "+value.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify the cosh(+inf)=+inf...");
+
+ try
+ {
+ double variable = double.MaxValue;
+ double value = Math.Cosh(variable);
+ if (value != double.PositiveInfinity)
+ {
+ TestLibrary.TestFramework.LogError("007", "The value should be double.PositiveInfinity, actual: "+value.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify the value of cosh(Double.MinValue)=+inf");
+
+ try
+ {
+ double variable = double.MinValue;
+ double value = Math.Cosh(variable);
+ if (value != double.PositiveInfinity)
+ {
+ TestLibrary.TestFramework.LogError("009", "The value should be double.PositiveInfinity, actual: " +
+ value.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathe.cs b/tests/src/CoreMangLib/cti/system/math/mathe.cs
new file mode 100644
index 0000000000..404e242b02
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathe.cs
@@ -0,0 +1,64 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+
+/// <summary>
+/// System.Math.E
+/// </summary>
+public class MathE
+{
+ public static int Main(string[] args)
+ {
+ MathE mathE = new MathE();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.E...");
+
+ if (mathE.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Math.E...");
+
+ try
+ {
+ double constantE = Math.E;
+ if (constantE != 2.7182818284590451)
+ {
+ TestLibrary.TestFramework.LogError("001","The value of E is not correct!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathexp.cs b/tests/src/CoreMangLib/cti/system/math/mathexp.cs
new file mode 100644
index 0000000000..791e50eb88
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathexp.cs
@@ -0,0 +1,172 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Exp(System.Double)
+/// </summary>
+public class MathExp
+{
+ public static int Main(string[] args)
+ {
+ MathExp exp = new MathExp();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Exp(System.Double)...");
+
+ if (exp.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify monotonicity of Exp function");
+
+ try
+ {
+ double variable = TestLibrary.Generator.GetDouble(-55);
+ double value1 = Math.Exp(variable);
+ double positiveoffset = Math.Exp(-20);
+ double value2 = Math.Exp(variable + positiveoffset);
+
+ if (value2 <= value1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The monotonicity of chx function should be increase by degree!");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify Exp is neither odd function nor even function...");
+
+ try
+ {
+ double variable = TestLibrary.Generator.GetDouble(-55);
+ double value1 = Math.Exp(variable);
+ double value2 = Math.Exp(-variable);
+
+ if (value1 == value2 || value1 == -value2)
+ {
+ TestLibrary.TestFramework.LogError("003","The exp function should not be symmetry!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify the value of Exp(0) is 1...");
+
+ try
+ {
+ double value = Math.Exp(0);
+
+ if (value != 1)
+ {
+ TestLibrary.TestFramework.LogError("005","The value of Exp(0) is 1!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify the value of Exp(double.MaxValue)...");
+
+ try
+ {
+ double variable = double.MaxValue;
+ double value = Math.Exp(variable);
+
+ if (value != double.PositiveInfinity)
+ {
+ TestLibrary.TestFramework.LogError("007", "The value of Exp(double.MaxValue) should be PositiveInfinity!");
+ retVal = true;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify the value of Exp(double.MaxValue)");
+
+ try
+ {
+ double variable = double.MinValue;
+ double value = Math.Exp(variable);
+
+ if (value != 0)
+ {
+ TestLibrary.TestFramework.LogError("009", "The value of Exp(double.MaxValue) should be PositiveInfinity!");
+ retVal = true;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathfloor.cs b/tests/src/CoreMangLib/cti/system/math/mathfloor.cs
new file mode 100644
index 0000000000..e85cd656b4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathfloor.cs
@@ -0,0 +1,209 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Floor(System.Double)
+/// </summary>
+public class MathFloor
+{
+ public static int Main(string[] args)
+ {
+ MathFloor floor = new MathFloor();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Floor(System.Double)...");
+
+ if (floor.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify floor number should be equal to intefer part subtract one of negative number...");
+
+ try
+ {
+ double number = TestLibrary.Generator.GetDouble(-55);
+ while (number >= 0)
+ {
+ number = (-TestLibrary.Generator.GetDouble(-55)) * 100;
+ }
+
+ double floorNumber = Math.Floor(number);
+ if (floorNumber < number - 1 || floorNumber > number)
+ {
+ TestLibrary.TestFramework.LogError("001", "The Ceiling number should be equal to the integer part of negative number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify floor number should be equal to itself when number is negative integer...");
+
+ try
+ {
+ double number = TestLibrary.Generator.GetDouble(-55);
+ while (number >= 0)
+ {
+ number = (-TestLibrary.Generator.GetDouble(-55)) * 100;
+ }
+
+ double floorNumber = Math.Floor(number);
+ if (floorNumber != Math.Floor(floorNumber))
+ {
+ TestLibrary.TestFramework.LogError("003", "The floor number should be equal to itself when number is negative integer...");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify floor number should be equal to the integer part of positive number...");
+
+ try
+ {
+ double number = TestLibrary.Generator.GetDouble(-55);
+ while (number <= 0)
+ {
+ number = (TestLibrary.Generator.GetDouble(-55)) * 100;
+ }
+
+ double floorNumber = Math.Floor(number);
+ if (floorNumber < number - 1 || floorNumber > number)
+ {
+ TestLibrary.TestFramework.LogError("005", "The floor number should be equal to the integer part plus one of positive number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify floor number should be equal to itself when number is positive integer...");
+
+ try
+ {
+ double number = TestLibrary.Generator.GetDouble(-55);
+ while (number <= 0)
+ {
+ number = (TestLibrary.Generator.GetDouble(-55)) * 100;
+ }
+
+ double floorNumber = Math.Floor(number);
+ if (floorNumber != Math.Floor(floorNumber))
+ {
+ TestLibrary.TestFramework.LogError("007", "The floor number should be equal to itself when number is positive integer...");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify floor number should be equal to itself when number is maxvalue...");
+
+ try
+ {
+ double floorMax = Math.Floor(double.MaxValue);
+ if (floorMax != double.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("009", "The floor number should be equal to itself when number is maxvalue!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Verify floor number should be equal to itself when number is minvalue...");
+
+ try
+ {
+ double floorMin = Math.Floor(double.MinValue);
+ if (floorMin != double.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("011", "The floor number should be equal to itself when number is minvalue!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathieeeremainder.cs b/tests/src/CoreMangLib/cti/system/math/mathieeeremainder.cs
new file mode 100644
index 0000000000..8f1b4ab276
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathieeeremainder.cs
@@ -0,0 +1,149 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.IEEERemainder(System.Double,System.Double)
+/// </summary>
+public class MathIEEERemainder
+{
+ public static int Main(string[] args)
+ {
+ MathIEEERemainder ieeeRemainder = new MathIEEERemainder();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.IEEERemainder(System.Double,System.Double)...");
+
+ if (ieeeRemainder.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify x / y fails halfway between two integer,the even integer is less than odd integer...");
+
+ try
+ {
+ Double x = 5;
+ Double y = 2;
+ Double remainder = Math.IEEERemainder(x,y);
+
+ // When x=5,y=2,the quotient should be equal to the even nember 2, therefore the IEEERemainder is positive
+ if (remainder != x - Math.Floor(x / y) * y)
+ {
+ TestLibrary.TestFramework.LogError("001", "The remainder should be x - (y*quotient)!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify x/y fails halfway between two integer,the add integer is less than even integer...");
+
+ try
+ {
+ Double x = 7;
+ Double y = 2;
+ Double remainder = Math.IEEERemainder(x,y);
+
+ //When x=7,y=2,the quotient should be equal to the even number 4,therefore the IEEERemainder is negative
+ if (remainder != x - Math.Ceiling(x / y) * y)
+ {
+ TestLibrary.TestFramework.LogError("003", "The remainder should be x - (y*quotient)!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify divisor is zero...");
+
+ try
+ {
+ Double x = TestLibrary.Generator.GetDouble(-55);
+ Double y = 0;
+ Double remainder = Math.IEEERemainder(x,y);
+
+ if (!Double.IsNaN(remainder))
+ {
+ TestLibrary.TestFramework.LogError("005","The value should be Double.NaN!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify the value 0 is returned when x - (y*quotient) is zero...");
+
+ try
+ {
+ Double x = 6;
+ Double y = 2;
+ Double remainder = Math.IEEERemainder(x,y);
+
+ if (remainder != 0)
+ {
+ TestLibrary.TestFramework.LogError("007", "The value should be zero!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathlog.cs b/tests/src/CoreMangLib/cti/system/math/mathlog.cs
new file mode 100644
index 0000000000..fef85961ab
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathlog.cs
@@ -0,0 +1,247 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Log(System.Double)
+/// </summary>
+public class MathLog
+{
+ public static int Main(string[] args)
+ {
+ MathLog log = new MathLog();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Log(System.Double)...");
+
+ if (log.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the monotonicity of ln(d)...");
+
+ try
+ {
+ double var1 = 100.1 * TestLibrary.Generator.GetDouble(-55);
+ double var2 = 100.1 * TestLibrary.Generator.GetDouble(-55);
+
+ if (var1 < var2)
+ {
+ if (Math.Log(var1) >= Math.Log(var2))
+ {
+ TestLibrary.TestFramework.LogError("001", "The value of ln(var1)=" + Math.Log(var1).ToString() +
+ " should be less than ln(var2)=" + Math.Log(var2).ToString());
+ retVal = false;
+ }
+ }
+ else if (var1 > var2)
+ {
+ if (Math.Log(var1) <= Math.Log(var2))
+ {
+ TestLibrary.TestFramework.LogError("002", "The value of ln(var1)=" + Math.Log(var1).ToString() +
+ " should be larger than ln(var2)=" + Math.Log(var2).ToString());
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (!MathTestLib.DoubleIsWithinEpsilon(Math.Log(var1) ,Math.Log(var2)))
+ {
+ TestLibrary.TestFramework.LogError("003", "The value of ln(var1)=" + Math.Log(var1).ToString() +
+ " should be equal to ln(var2)=" + Math.Log(var2).ToString());
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify the value is negative when var is between o and 1...");
+
+ try
+ {
+ double var = 0;
+ while (var <= 0 && var >= 1)
+ {
+ var = TestLibrary.Generator.GetDouble(-55);
+ }
+
+ if (Math.Log(var) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "The value should be negative, is " + Math.Log(var).ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify the value of ln(1) is 0...");
+
+ try
+ {
+ double var = 1;
+ if (!MathTestLib.DoubleIsWithinEpsilon(Math.Log(var),0))
+ {
+ TestLibrary.TestFramework.LogError("007", "The value of ln(1) should be zero, is " + Math.Log(var).ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify the value of ln(var) is larger than zero...");
+
+ try
+ {
+ double var = TestLibrary.Generator.GetDouble(-55);
+ while (var <= 1)
+ {
+ var *= 10 ;
+ }
+
+ if (Math.Log(var) < 0)
+ {
+ TestLibrary.TestFramework.LogError("009", "The value should be larger than zero, is " + Math.Log(var).ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify the value of ln(0)...");
+
+ try
+ {
+ double var = 0;
+ if (!double.IsNegativeInfinity(Math.Log(var)))
+ {
+ TestLibrary.TestFramework.LogError("011", "the value of ln(0) should be negativeInfinity, is " +
+ Math.Log(var).ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Verify the value of ln(var) when var is negative...");
+
+ try
+ {
+ double var = -TestLibrary.Generator.GetDouble(-55);
+ while (var >= 0)
+ {
+ var = TestLibrary.Generator.GetDouble(-55);
+ }
+
+ if (!double.IsNaN(Math.Log(var)))
+ {
+ TestLibrary.TestFramework.LogError("013", "The value should be NaN, is " + Math.Log(var).ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Verify the value of ln(e)...");
+
+ try
+ {
+ double var = Math.E;
+ if (!MathTestLib.DoubleIsWithinEpsilon(Math.Log(var) ,1))
+ {
+ TestLibrary.TestFramework.LogError("015", "The value should be equal to 1, is " + Math.Log(var).ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathlog10.cs b/tests/src/CoreMangLib/cti/system/math/mathlog10.cs
new file mode 100644
index 0000000000..694c3b6858
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathlog10.cs
@@ -0,0 +1,243 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Log10(System.Double)
+/// </summary>
+public class MathLog10
+{
+ public static int Main(string[] args)
+ {
+ MathLog10 log10 = new MathLog10();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Log10(System.Double)...");
+
+ if (log10.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the monotonicity of Log10(var)...");
+
+ try
+ {
+ double var1 = 100.1 * TestLibrary.Generator.GetDouble(-55);
+ double var2 = 100.1 * TestLibrary.Generator.GetDouble(-55);
+
+ if (var1 < var2)
+ {
+ if (Math.Log10(var1) >= Math.Log10(var2))
+ {
+ TestLibrary.TestFramework.LogError("001", "The value of Log10(var1) should be less than In(var2)...");
+ retVal = false;
+ }
+ }
+ else if (var1 > var2)
+ {
+ if (Math.Log10(var1) <= Math.Log10(var2))
+ {
+ TestLibrary.TestFramework.LogError("002", "The value of Log10(var1) should be larger than In(var2)...");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (Math.Log10(var1) != Math.Log10(var2))
+ {
+ TestLibrary.TestFramework.LogError("003", "The value of Log10(var1) should be equal to In(var2)...");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify the value is negative when var is between o and 1...");
+
+ try
+ {
+ double var = 0;
+ while (var <= 0 && var >= 1)
+ {
+ var = TestLibrary.Generator.GetDouble(-55);
+ }
+
+ if (Math.Log10(var) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "The value should be negative!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify the value of Log10(1) is 0...");
+
+ try
+ {
+ double var = 1;
+ if (Math.Log10(var) != 0)
+ {
+ TestLibrary.TestFramework.LogError("007", "The value of Log10(1) should be zero!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify the value of Log10(var) is larger than zero...");
+
+ try
+ {
+ double var = TestLibrary.Generator.GetDouble(-55);
+ while (var <= 1)
+ {
+ var *= 10;
+ }
+
+ if (Math.Log10(var) < 0)
+ {
+ TestLibrary.TestFramework.LogError("009", "The value should be larger than zero!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify the value of Log10(0)...");
+
+ try
+ {
+ double var = 0;
+ if (!double.IsNegativeInfinity(Math.Log10(var)))
+ {
+ TestLibrary.TestFramework.LogError("011", "the value of Log10(0) should be negativeInfinity!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Verify the value of Log10(var) when var is negative...");
+
+ try
+ {
+ double var = -TestLibrary.Generator.GetDouble(-55);
+ while (var >= 0)
+ {
+ var = TestLibrary.Generator.GetDouble(-55);
+ }
+
+ if (!double.IsNaN(Math.Log10(var)))
+ {
+ TestLibrary.TestFramework.LogError("013", "The value should be NaN!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Verify the value of Log10(10)...");
+
+ try
+ {
+ double var = 10;
+ if (Math.Log10(var) != 1)
+ {
+ TestLibrary.TestFramework.LogError("015","the value should be equal to 1!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathmax1.cs b/tests/src/CoreMangLib/cti/system/math/mathmax1.cs
new file mode 100644
index 0000000000..ff38b0e27f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathmax1.cs
@@ -0,0 +1,77 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Max(System.Byte,System.Byte)
+/// </summary>
+public class MathMax1
+{
+ public static int Main(string[] args)
+ {
+ MathMax1 max1 = new MathMax1();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Max(System.Byte,System.Byte)...");
+
+ if (max1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the return value of max function...");
+
+ try
+ {
+ byte byte1 = TestLibrary.Generator.GetByte(-55);
+ byte byte2 = TestLibrary.Generator.GetByte(-55);
+
+ if (byte1 < byte2)
+ {
+ if (Math.Max(byte1, byte2) != byte2)
+ {
+ TestLibrary.TestFramework.LogError("001", "the max value should be byte2!");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (Math.Max(byte1, byte2) != byte1)
+ {
+ TestLibrary.TestFramework.LogError("002","the max value should be byte1!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/math/mathmax10.cs b/tests/src/CoreMangLib/cti/system/math/mathmax10.cs
new file mode 100644
index 0000000000..36f6d53b17
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathmax10.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Max(System.UInt32,System.UInt32)
+/// </summary>
+public class MathMax10
+{
+ public static int Main(string[] args)
+ {
+ MathMax10 max10 = new MathMax10();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Max(System.UInt32,System.UInt32)...");
+
+ if (max10.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the return value of max function...");
+
+ try
+ {
+ UInt32 var1 = (UInt32)TestLibrary.Generator.GetInt32(-55);
+ UInt32 var2 = (UInt32)TestLibrary.Generator.GetInt32(-55);
+
+ if (var1 < var2)
+ {
+ if (Math.Max(var1, var2) != var2)
+ {
+ TestLibrary.TestFramework.LogError("001", "The return value should be var2!");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (Math.Max(var1, var2) != var1)
+ {
+ TestLibrary.TestFramework.LogError("002", "The return value should be var1!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathmax11.cs b/tests/src/CoreMangLib/cti/system/math/mathmax11.cs
new file mode 100644
index 0000000000..4d5e192cb9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathmax11.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Max(System.UInt64,System.UInt64)
+/// </summary>
+public class MathMax11
+{
+ public static int Main(string[] args)
+ {
+ MathMax11 max11 = new MathMax11();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Max(System.UInt64,System.UInt64)...");
+
+ if (max11.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the return value of max function...");
+
+ try
+ {
+ UInt64 var1 = (UInt64)TestLibrary.Generator.GetInt64(-55);
+ UInt64 var2 = (UInt64)TestLibrary.Generator.GetInt64(-55);
+
+ if (var1 < var2)
+ {
+ if (Math.Max(var1, var2) != var2)
+ {
+ TestLibrary.TestFramework.LogError("001", "The return value should be var2!");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (Math.Max(var1, var2) != var1)
+ {
+ TestLibrary.TestFramework.LogError("002", "The return value should be var1!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathmax2.cs b/tests/src/CoreMangLib/cti/system/math/mathmax2.cs
new file mode 100644
index 0000000000..72419536f3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathmax2.cs
@@ -0,0 +1,78 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Max(System.Decimal,System.Decimal)
+/// </summary>
+public class MathMax2
+{
+ public static int Main(string[] args)
+ {
+ MathMax2 max2 = new MathMax2();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Max(System.Decimal,System.Decimal)...");
+
+ if (max2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the return value of max function...");
+
+ try
+ {
+ double dVar1 = TestLibrary.Generator.GetDouble(-55);
+ decimal var1 = new decimal(dVar1);
+ double dVar2 = TestLibrary.Generator.GetDouble(-55);
+ decimal var2 = new decimal(dVar2);
+
+ if (decimal.Compare(var1, var2) < 0)
+ {
+ if (Math.Max(var1, var2) != var2)
+ {
+ TestLibrary.TestFramework.LogError("001", "the max value should be var2!");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (Math.Max(var1, var2) != var1)
+ {
+ TestLibrary.TestFramework.LogError("002","The max value should be var1!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathmax3.cs b/tests/src/CoreMangLib/cti/system/math/mathmax3.cs
new file mode 100644
index 0000000000..b441e060bc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathmax3.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Max(System.Double,System.Double)
+/// </summary>
+public class MathMax3
+{
+ public static int Main(string[] args)
+ {
+ MathMax3 max3 = new MathMax3();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Max(System.Double,System.Double)");
+
+ if (max3.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the return value of max function when double parameters are not NaN...");
+
+ try
+ {
+ double var1 = TestLibrary.Generator.GetDouble(-55);
+ double var2 = TestLibrary.Generator.GetDouble(-55);
+
+ if (var1 > var2 && !double.IsNaN(var1) && !double.IsNaN(var2))
+ {
+ if (Math.Max(var1, var2) != var1)
+ {
+ TestLibrary.TestFramework.LogError("001","The value should equal to var1!");
+ retVal = false;
+ }
+ }
+ else if (!double.IsNaN(var1) && !double.IsNaN(var2))
+ {
+ if (Math.Max(var1, var2) != var2)
+ {
+ TestLibrary.TestFramework.LogError("002", "The value should equal to var2!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify var1 is double.NaN...");
+
+ try
+ {
+ double var1 = double.NaN;
+ double var2 = double.PositiveInfinity;
+
+ if (!double.IsNaN(Math.Max(var1, var2)))
+ {
+ TestLibrary.TestFramework.LogError("003","The value should be var1!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathmax4.cs b/tests/src/CoreMangLib/cti/system/math/mathmax4.cs
new file mode 100644
index 0000000000..c450f802af
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathmax4.cs
@@ -0,0 +1,77 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Max(System.Int16,System.Int16)
+/// </summary>
+public class MathMax4
+{
+ public static int Main(string[] args)
+ {
+ MathMax4 max4 = new MathMax4();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Max(System.Int16,System.Int16)...");
+
+ if (max4.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the return value of max function...");
+
+ try
+ {
+ Int16 var1 = TestLibrary.Generator.GetInt16(-55);
+ Int16 var2 = TestLibrary.Generator.GetInt16(-55);
+
+ if (var1 < var2)
+ {
+ if (Math.Max(var1, var2) != var2)
+ {
+ TestLibrary.TestFramework.LogError("001", "The value should be var1!");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (Math.Max(var1, var2) != var1)
+ {
+ TestLibrary.TestFramework.LogError("002", "The value should be var2!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/math/mathmax5.cs b/tests/src/CoreMangLib/cti/system/math/mathmax5.cs
new file mode 100644
index 0000000000..06e20e0e8b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathmax5.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Max(System.Int32,System.Int32)
+/// </summary>
+public class MathMax5
+{
+ public static int Main(string[] args)
+ {
+ MathMax5 max5 = new MathMax5();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Max(System.Int32,System.Int32)...");
+
+ if (max5.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the return value of max function...");
+
+ try
+ {
+ Int32 var1 = TestLibrary.Generator.GetInt32(-55);
+ Int32 var2 = TestLibrary.Generator.GetInt32(-55);
+
+ if (var1 < var2)
+ {
+ if (Math.Max(var1, var2) != var2)
+ {
+ TestLibrary.TestFramework.LogError("001", "The value should be equal to var2!");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (Math.Max(var1, var2) != var1)
+ {
+ TestLibrary.TestFramework.LogError("002", "The value should be equal to var1!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathmax6.cs b/tests/src/CoreMangLib/cti/system/math/mathmax6.cs
new file mode 100644
index 0000000000..5ef954f95d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathmax6.cs
@@ -0,0 +1,77 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Max(System.Int64,System.Int64)
+/// </summary>
+public class MathMax6
+{
+ public static int Main(string[] args)
+ {
+ MathMax6 max6 = new MathMax6();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Max(System.Int64,System.Int64)...");
+
+ if (max6.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the return value of max function...");
+
+ try
+ {
+ Int64 var1 = TestLibrary.Generator.GetInt64(-55);
+ Int64 var2 = TestLibrary.Generator.GetInt64(-55);
+
+ if (var1 < var2)
+ {
+ if (Math.Max(var1, var2) != var2)
+ {
+ TestLibrary.TestFramework.LogError("001", "The value should be var2!");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (Math.Max(var1, var2) != var1)
+ {
+ TestLibrary.TestFramework.LogError("002","The value should be equal to var1!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/math/mathmax7.cs b/tests/src/CoreMangLib/cti/system/math/mathmax7.cs
new file mode 100644
index 0000000000..8d978c5e47
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathmax7.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Max(System.SByte,System.SByte)
+/// </summary>
+public class MathMax7
+{
+ public static int Main(string[] args)
+ {
+ MathMax7 max7 = new MathMax7();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Max(System.SByte,System.SByte)...");
+
+ if (max7.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify ");
+
+ try
+ {
+ SByte var1 = (SByte)TestLibrary.Generator.GetByte(-55);
+ SByte var2 = (SByte)TestLibrary.Generator.GetByte(-55);
+
+ if (var1 < var2)
+ {
+ if (Math.Max(var1, var2) != var2)
+ {
+ TestLibrary.TestFramework.LogError("001", "The return value should be var2!");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (Math.Max(var1, var2) != var1)
+ {
+ TestLibrary.TestFramework.LogError("002","The return value should be var1!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathmax8.cs b/tests/src/CoreMangLib/cti/system/math/mathmax8.cs
new file mode 100644
index 0000000000..24a33cb3bd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathmax8.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Max(System.Single,System.Single)
+/// </summary>
+public class MathMax8
+{
+ public static int Main(string[] args)
+ {
+ MathMax8 max8 = new MathMax8();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Max(System.Single,System.Single)...");
+
+ if (max8.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the return value of max function...");
+
+ try
+ {
+ Single var1 = TestLibrary.Generator.GetSingle(-55);
+ Single var2 = TestLibrary.Generator.GetSingle(-55);
+
+ if (var1 > var2 && !Single.IsNaN(var1) && !Single.IsNaN(var2))
+ {
+ if (Math.Max(var1, var2) != var1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The return value should be var1!");
+ retVal = false;
+ }
+ }
+ else if (!Single.IsNaN(var1) && !Single.IsNaN(var2))
+ {
+ if (Math.Max(var1, var2) != var2)
+ {
+ TestLibrary.TestFramework.LogError("002", "The return value should be var2!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify the max value of Single.NaN and Single.PositiveInfinity...");
+
+ try
+ {
+ Single var1 = Single.NaN;
+ Single var2 = Single.PositiveInfinity;
+
+ if (!Single.IsNaN(Math.Max(var1, var2)))
+ {
+ TestLibrary.TestFramework.LogError("004", "The return value should be single.NaN!");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathmax9.cs b/tests/src/CoreMangLib/cti/system/math/mathmax9.cs
new file mode 100644
index 0000000000..7c0a124108
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathmax9.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Max(System.UInt16,System.UInt16)
+/// </summary>
+public class MathMax9
+{
+ public static int Main(string[] args)
+ {
+ MathMax9 max9 = new MathMax9();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Max(System.UInt16,System.UInt16)...");
+
+ if (max9.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the return value of max function...");
+
+ try
+ {
+ UInt16 var1 = (UInt16)TestLibrary.Generator.GetInt16(-55);
+ UInt16 var2 = (UInt16)TestLibrary.Generator.GetInt16(-55);
+
+ if (var1 < var2)
+ {
+ if (Math.Max(var1, var2) != var2)
+ {
+ TestLibrary.TestFramework.LogError("001", "The return value should be var2!");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (Math.Max(var1, var2) != var1)
+ {
+ TestLibrary.TestFramework.LogError("002","The return value should be var1!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathmin1.cs b/tests/src/CoreMangLib/cti/system/math/mathmin1.cs
new file mode 100644
index 0000000000..bc1af42613
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathmin1.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Min(System.Byte,System.Byte)
+/// </summary>
+public class MathMin1
+{
+ public static int Main(string[] args)
+ {
+ MathMin1 min1 = new MathMin1();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Min(System.Byte,System.Byte)...");
+
+ if (min1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the return value of min function...");
+
+ try
+ {
+ Byte var1 = TestLibrary.Generator.GetByte(-55);
+ Byte var2 = TestLibrary.Generator.GetByte(-55);
+
+ if (var1 > var2)
+ {
+ if (Math.Min(var1, var2) != var2)
+ {
+ TestLibrary.TestFramework.LogError("001", "The return value should be var2!");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (Math.Min(var1, var2) != var1)
+ {
+ TestLibrary.TestFramework.LogError("002","The return value should be var1!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathmin10.cs b/tests/src/CoreMangLib/cti/system/math/mathmin10.cs
new file mode 100644
index 0000000000..e219ddeb3d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathmin10.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Min(System.UInt32,System.UInt32)
+/// </summary>
+public class MathMin10
+{
+ public static int Main(string[] args)
+ {
+ MathMin10 min10 = new MathMin10();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Min(System.UInt32,System.UInt32)...");
+
+ if (min10.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the return value of Min function...");
+
+ try
+ {
+ UInt32 var1 = (UInt32)TestLibrary.Generator.GetInt32(-55);
+ UInt32 var2 = (UInt32)TestLibrary.Generator.GetInt32(-55);
+
+ if (var1 > var2)
+ {
+ if (Math.Min(var1, var2) != var2)
+ {
+ TestLibrary.TestFramework.LogError("001", "The return value should be var2!");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (Math.Min(var1, var2) != var1)
+ {
+ TestLibrary.TestFramework.LogError("002", "The return value should be var1!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathmin11.cs b/tests/src/CoreMangLib/cti/system/math/mathmin11.cs
new file mode 100644
index 0000000000..b9c199d614
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathmin11.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Min(System.UInt64,System.UInt64)
+/// </summary>
+public class MathMin11
+{
+ public static int Main(string[] args)
+ {
+ MathMin11 min11 = new MathMin11();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Min(System.UInt64,System.UInt64)...");
+
+ if (min11.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the return value of Min function...");
+
+ try
+ {
+ UInt64 var1 = (UInt64)TestLibrary.Generator.GetInt64(-55);
+ UInt64 var2 = (UInt64)TestLibrary.Generator.GetInt64(-55);
+
+ if (var1 > var2)
+ {
+ if (Math.Min(var1, var2) != var2)
+ {
+ TestLibrary.TestFramework.LogError("001", "The return value should be var2!");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (Math.Min(var1, var2) != var1)
+ {
+ TestLibrary.TestFramework.LogError("002", "The return value should be var1!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathmin2.cs b/tests/src/CoreMangLib/cti/system/math/mathmin2.cs
new file mode 100644
index 0000000000..86773f906c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathmin2.cs
@@ -0,0 +1,78 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Min(System.Decimal,System.Decimal)
+/// </summary>
+public class MathMin2
+{
+ public static int Main(string[] args)
+ {
+ MathMin2 min2 = new MathMin2();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Min(System.Decimal,System.Decimal)...");
+
+ if (min2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the return value of min function...");
+
+ try
+ {
+ double dvar1 = TestLibrary.Generator.GetDouble(-55);
+ decimal var1 = (decimal)dvar1;
+ double dvar2 = TestLibrary.Generator.GetDouble(-55);
+ decimal var2 = (decimal)dvar2;
+
+ if (decimal.Compare(var1, var2) >= 0)
+ {
+ if (Math.Min(var1, var2) != var2)
+ {
+ TestLibrary.TestFramework.LogError("001", "The return value should be var2!");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (Math.Min(var1, var2) != var1)
+ {
+ TestLibrary.TestFramework.LogError("002","The return value should be var1!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003","Unexpected exception coours; " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathmin3.cs b/tests/src/CoreMangLib/cti/system/math/mathmin3.cs
new file mode 100644
index 0000000000..7fa5334dcd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathmin3.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Min(System.Double,System.Double)
+/// </summary>
+public class MathMin3
+{
+ public static int Main(string[] args)
+ {
+ MathMin3 min3 = new MathMin3();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Min(System.Double,System.Double)...");
+
+ if (min3.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the return value of min function...");
+
+ try
+ {
+ double var1 = TestLibrary.Generator.GetDouble(-55);
+ double var2 = TestLibrary.Generator.GetDouble(-55);
+
+ if (var1 < var2 && !double.IsNaN(var1) && !double.IsNaN(var2))
+ {
+ if (Math.Min(var1, var2) != var1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The return value is var1!");
+ retVal = false;
+ }
+ }
+ else if (!double.IsNaN(var1) && !double.IsNaN(var2))
+ {
+ if (Math.Min(var1, var2) != var2)
+ {
+ TestLibrary.TestFramework.LogError("002","The return value is var2");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify the min value of double.NaN and double.PositiveInfinity...");
+
+ try
+ {
+ double var1 = double.NaN;
+ double var2 = double.PositiveInfinity;
+
+ if (!double.IsNaN(Math.Min(var1, var2)))
+ {
+ TestLibrary.TestFramework.LogError("004","The return value should be double.NaN!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathmin4.cs b/tests/src/CoreMangLib/cti/system/math/mathmin4.cs
new file mode 100644
index 0000000000..54709704dc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathmin4.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Min(System.Int16,System.Int16)
+/// </summary>
+public class MathMin4
+{
+ public static int Main(string[] args)
+ {
+ MathMin4 min4 = new MathMin4();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Min(System.Int16,System.Int16)...");
+
+ if (min4.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the return value of Min function...");
+
+ try
+ {
+ Int16 var1 = TestLibrary.Generator.GetInt16(-55);
+ Int16 var2 = TestLibrary.Generator.GetInt16(-55);
+
+ if (var1 > var2)
+ {
+ if (Math.Min(var1, var2) != var2)
+ {
+ TestLibrary.TestFramework.LogError("001", "The return value should be var2!");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (Math.Min(var1, var2) != var1)
+ {
+ TestLibrary.TestFramework.LogError("002", "The return value should be var1!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathmin5.cs b/tests/src/CoreMangLib/cti/system/math/mathmin5.cs
new file mode 100644
index 0000000000..c407e25b7c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathmin5.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Min(System.Int32,System.Int32)
+/// </summary>
+public class MathMin5
+{
+ public static int Main(string[] args)
+ {
+ MathMin5 min5 = new MathMin5();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Min(System.Int32,System.Int32)...");
+
+ if (min5.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the return value of Min function...");
+
+ try
+ {
+ Int32 var1 = TestLibrary.Generator.GetInt32(-55);
+ Int32 var2 = TestLibrary.Generator.GetInt32(-55);
+
+ if (var1 > var2)
+ {
+ if (Math.Min(var1, var2) != var2)
+ {
+ TestLibrary.TestFramework.LogError("001", "The return value should be var2!");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (Math.Min(var1, var2) != var1)
+ {
+ TestLibrary.TestFramework.LogError("002", "The return value should be var1!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathmin6.cs b/tests/src/CoreMangLib/cti/system/math/mathmin6.cs
new file mode 100644
index 0000000000..1fd1feb98d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathmin6.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Min(System.Int64,System.Int64)
+/// </summary>
+public class MathMin6
+{
+ public static int Main(string[] args)
+ {
+ MathMin6 min6 = new MathMin6();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Min(System.Int64,System.Int64)...");
+
+ if (min6.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the return value of Min function...");
+
+ try
+ {
+ Int64 var1 = TestLibrary.Generator.GetInt64(-55);
+ Int64 var2 = TestLibrary.Generator.GetInt64(-55);
+
+ if (var1 > var2)
+ {
+ if (Math.Min(var1, var2) != var2)
+ {
+ TestLibrary.TestFramework.LogError("001", "The return value should be var2!");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (Math.Min(var1, var2) != var1)
+ {
+ TestLibrary.TestFramework.LogError("002", "The return value should be var1!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathmin7.cs b/tests/src/CoreMangLib/cti/system/math/mathmin7.cs
new file mode 100644
index 0000000000..959aa7f401
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathmin7.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Min(System.SByte,System.SByte)
+/// </summary>
+public class MathMin7
+{
+ public static int Main(string[] args)
+ {
+ MathMin7 min7 = new MathMin7();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Min(System.SByte,System.SByte)...");
+
+ if (min7.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the return value of Min function...");
+
+ try
+ {
+ SByte var1 = (SByte)TestLibrary.Generator.GetByte(-55);
+ SByte var2 = (SByte)TestLibrary.Generator.GetByte(-55);
+
+ if (var1 > var2)
+ {
+ if (Math.Min(var1, var2) != var2)
+ {
+ TestLibrary.TestFramework.LogError("001", "The return value should be var2!");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (Math.Min(var1, var2) != var1)
+ {
+ TestLibrary.TestFramework.LogError("002", "The return value should be var1!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathmin8.cs b/tests/src/CoreMangLib/cti/system/math/mathmin8.cs
new file mode 100644
index 0000000000..a0f9501710
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathmin8.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Min(System.Single,System.Single)
+/// </summary>
+public class MathMin8
+{
+ public static int Main(string[] args)
+ {
+ MathMin8 min8 = new MathMin8();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Min(System.Single,System.Single)...");
+
+ if (min8.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the return value of min function...");
+
+ try
+ {
+ Single var1 = TestLibrary.Generator.GetSingle(-55);
+ Single var2 = TestLibrary.Generator.GetSingle(-55);
+
+ if (var1 < var2 && !Single.IsNaN(var1) && !Single.IsNaN(var2))
+ {
+ if (Math.Min(var1, var2) != var1)
+ {
+ TestLibrary.TestFramework.LogError("001", "The return value should be var1!");
+ retVal = false;
+ }
+ }
+ else if (!Single.IsNaN(var1) && !Single.IsNaN(var2))
+ {
+ if (Math.Min(var1, var2) != var2)
+ {
+ TestLibrary.TestFramework.LogError("002","The return value should be var2!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify the min value of Single.NaN and Single.NegativeInfinity...");
+
+ try
+ {
+ Single var1 = Single.NaN;
+ Single var2 = Single.NegativeInfinity;
+
+ if (!Single.IsNaN(Math.Min(var1, var2)))
+ {
+ TestLibrary.TestFramework.LogError("004", "The return value should be Single.NaN!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathmin9.cs b/tests/src/CoreMangLib/cti/system/math/mathmin9.cs
new file mode 100644
index 0000000000..6eb8aa3f9a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathmin9.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.Min(System.UInt16,System.UInt16)
+/// </summary>
+public class MathMin9
+{
+ public static int Main(string[] args)
+ {
+ MathMin9 min9 = new MathMin9();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Min(System.UInt16,System.UInt16)...");
+
+ if (min9.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the return value of Min function...");
+
+ try
+ {
+ UInt16 var1 = (UInt16)TestLibrary.Generator.GetInt16(-55);
+ UInt16 var2 = (UInt16)TestLibrary.Generator.GetInt16(-55);
+
+ if (var1 > var2)
+ {
+ if (Math.Min(var1, var2) != var2)
+ {
+ TestLibrary.TestFramework.LogError("001", "The return value should be var2!");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (Math.Min(var1, var2) != var1)
+ {
+ TestLibrary.TestFramework.LogError("002", "The return value should be var1!");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathpi.cs b/tests/src/CoreMangLib/cti/system/math/mathpi.cs
new file mode 100644
index 0000000000..7b49aea9ab
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathpi.cs
@@ -0,0 +1,63 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// System.Math.PI
+/// </summary>
+public class MathPI
+{
+ public static int Main(string[] args)
+ {
+ MathPI mathPI = new MathPI();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.PI...");
+
+ if (mathPI.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify the value of Math.PI...");
+
+ try
+ {
+ double mathPI = Math.PI;
+ if (mathPI != 3.1415926535897931)
+ {
+ TestLibrary.TestFramework.LogError("001","The value of Math.PI is not correct!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathpow.cs b/tests/src/CoreMangLib/cti/system/math/mathpow.cs
new file mode 100644
index 0000000000..c9b02c3e9d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathpow.cs
@@ -0,0 +1,524 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Pow(System.Double, System.Double)
+/// </summary>
+
+public class MathPow
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+ retVal = PosTest12() && retVal;
+ retVal = PosTest13() && retVal;
+ retVal = PosTest14() && retVal;
+ retVal = PosTest15() && retVal;
+ retVal = PosTest16() && retVal;
+
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Pow when one of args is NaN .");
+
+ try
+ {
+ double d = Math.Pow(double.NaN, TestLibrary.Generator.GetByte(-55));
+
+ if (!double.IsNaN(d))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Return value is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify Pow when second arg is zero .");
+
+ try
+ {
+ double d = Math.Pow(TestLibrary.Generator.GetByte(-55),0);
+
+ if (d != 1)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Return value is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify Pow(NegativeInfinity, < 0) .");
+
+ try
+ {
+ double d = Math.Pow(double.NegativeInfinity,-TestLibrary.Generator.GetDouble(-55));
+
+ if (d != 0)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Return value is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify Pow(NegativeInfinity, positive odd int) .");
+
+ try
+ {
+ double d = Math.Pow(double.NegativeInfinity, TestLibrary.Generator.GetByte(-55) * 2 + 1);
+
+ if (d != double.NegativeInfinity)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Return value is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify Pow(NegativeInfinity, positive non-odd int) .");
+
+ try
+ {
+ int e = (TestLibrary.Generator.GetByte(-55) +1) * 2;
+ double d = Math.Pow(double.NegativeInfinity, e);
+
+ if (d != double.PositiveInfinity)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "Return value is wrong: expected Double.PositiveInfinity, actual: "+
+ d.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Verify Pow(< 0, non-int) .");
+
+ try
+ {
+ double d = Math.Pow(-TestLibrary.Generator.GetByte(-55) - 1, TestLibrary.Generator.GetDouble() + 0.1);
+
+ if (!double.IsNaN(d))
+ {
+ TestLibrary.TestFramework.LogError("006.1", "Return value is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Verify Pow(-1, NegativeInfinity) .");
+
+ try
+ {
+ double d = Math.Pow(- 1, double.NegativeInfinity);
+
+ if (!double.IsNaN(d))
+ {
+ TestLibrary.TestFramework.LogError("007.1", "Return value is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest8: Verify Pow(-1<x<1, NegativeInfinity) .");
+
+ try
+ {
+ double d = Math.Pow(TestLibrary.Generator.GetDouble(-55), double.NegativeInfinity);
+
+ if (!double.IsPositiveInfinity(d))
+ {
+ TestLibrary.TestFramework.LogError("008.1", "Return value is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest9: Verify Pow(-1<x<1, PositiveInfinity) .");
+
+ try
+ {
+ double d = Math.Pow(TestLibrary.Generator.GetDouble(-55), double.PositiveInfinity);
+
+ if (d != 0)
+ {
+ TestLibrary.TestFramework.LogError("009.1", "Return value is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest10()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest10: Verify Pow(>1, NegativeInfinity) .");
+
+ try
+ {
+ double d = Math.Pow(TestLibrary.Generator.GetDouble(-55) + 1, double.NegativeInfinity);
+
+ if (d != 0)
+ {
+ TestLibrary.TestFramework.LogError("010.1", "Return value is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest11()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest11: Verify Pow(>1, PositiveInfinity) .");
+
+ try
+ {
+ double d = Math.Pow(TestLibrary.Generator.GetDouble(-55) + 1, double.PositiveInfinity);
+
+ if (!double.IsPositiveInfinity(d))
+ {
+ TestLibrary.TestFramework.LogError("011.1", "Return value is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("011.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest12()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest12: Verify Pow( 0, < 0) .");
+
+ try
+ {
+ double d = Math.Pow(0, -TestLibrary.Generator.GetDouble(-55) - 0.1);
+
+ if (!double.IsPositiveInfinity(d))
+ {
+ TestLibrary.TestFramework.LogError("012.1", "Return value is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest13()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest13: Verify Pow( 0, > 0) .");
+
+ try
+ {
+ double d = Math.Pow(0, TestLibrary.Generator.GetDouble(-55) + 0.1);
+
+ if (d != 0)
+ {
+ TestLibrary.TestFramework.LogError("013.1", "Return value is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("013.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest14()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest14: Verify Pow( 1, any value) .");
+
+ try
+ {
+ double d = Math.Pow(1, TestLibrary.Generator.GetDouble(-55));
+
+ if (d != 1)
+ {
+ TestLibrary.TestFramework.LogError("014.1", "Return value is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest15()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest15: Verify Pow( PositiveInfinity, < 0) .");
+
+ try
+ {
+ double d = Math.Pow(double.PositiveInfinity, -TestLibrary.Generator.GetDouble(-55) - 0.1);
+
+ if (d != 0)
+ {
+ TestLibrary.TestFramework.LogError("015.1", "Return value is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("015.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest16()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest16: Verify Pow( PositiveInfinity, > 0) .");
+
+ try
+ {
+ double d = Math.Pow(double.PositiveInfinity, TestLibrary.Generator.GetDouble(-55) + 0.1);
+
+ if (!double.IsPositiveInfinity(d))
+ {
+ TestLibrary.TestFramework.LogError("015.1", "Return value is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("015.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ MathPow test = new MathPow();
+
+ TestLibrary.TestFramework.BeginTestCase("MathPow");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathround1.cs b/tests/src/CoreMangLib/cti/system/math/mathround1.cs
new file mode 100644
index 0000000000..85b56ca41d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathround1.cs
@@ -0,0 +1,151 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Round(System.Decimal)
+/// </summary>
+
+public class mathRound1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Round(System.Decimal) when decimal part of arg d < 0.5 .");
+
+ try
+ {
+ Int64 tempInt64Var = TestLibrary.Generator.GetInt64(-55);
+
+ double tempDoubleVar;
+ do
+ tempDoubleVar = TestLibrary.Generator.GetDouble(-55);
+ while (tempDoubleVar >= 0.5);
+
+ decimal d = decimal.Parse(tempInt64Var.ToString() + tempDoubleVar.ToString().Substring(1));
+
+ if (Math.Round(d) != decimal.Parse(tempInt64Var.ToString()))
+ {
+ Console.WriteLine("actual value = " + decimal.Parse(tempInt64Var.ToString()));
+ Console.WriteLine("expected value = " + Math.Round(d));
+ TestLibrary.TestFramework.LogError("001.1", "Return value is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify Round(System.Decimal) when decimal part of arg d >= 0.5 .");
+
+ try
+ {
+ Int64 tempInt64Var;
+ do
+ tempInt64Var = TestLibrary.Generator.GetInt64(-55);
+ while (tempInt64Var == Int64.MaxValue);
+
+ double tempDoubleVar;
+ do
+ tempDoubleVar = TestLibrary.Generator.GetDouble(-55);
+ while (tempDoubleVar < 0.5);
+
+ decimal d = decimal.Parse(tempInt64Var.ToString() + tempDoubleVar.ToString().Substring(1));
+
+ if (Math.Round(d) != decimal.Parse((tempInt64Var + 1).ToString()))
+ {
+ Console.WriteLine("actual value = " + decimal.Parse((tempInt64Var + 1).ToString()));
+ Console.WriteLine("expected value = " + Math.Round(d));
+ TestLibrary.TestFramework.LogError("002.1", "Return value is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException is not thrown.");
+
+ try
+ {
+ decimal result = Math.Round(decimal.Parse(decimal.MaxValue.ToString() + "1"));
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ mathRound1 test = new mathRound1();
+
+ TestLibrary.TestFramework.BeginTestCase("mathRound1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathround2.cs b/tests/src/CoreMangLib/cti/system/math/mathround2.cs
new file mode 100644
index 0000000000..539c931b27
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathround2.cs
@@ -0,0 +1,199 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Round(System.Decimal, System.Int32)
+/// </summary>
+
+public class MathRound2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Round(d ,0) .");
+
+ try
+ {
+ if (Math.Round(3.45, 0) != 3 || Math.Round(3.55,0) != 4)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Return value is wrong!");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify Round(d ,1) .");
+
+ try
+ {
+ if (Math.Round(3.44, 1) != 3.4 || Math.Round(3.45, 1) != 3.4 || Math.Round(3.46, 1) != 3.5)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Return value is wrong!");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify Round(d ,28) .");
+
+ try
+ {
+ decimal d1 = 3.12345678901234567890123456744M;
+ decimal expectedResult1 = 3.1234567890123456789012345674M;
+
+ decimal d2 = 3.12345678901234567890123456745M;
+ decimal expectedResult2 = 3.1234567890123456789012345674M;
+
+ decimal d3 = 3.12345678901234567890123456746M;
+ decimal expectedResult3 = 3.1234567890123456789012345675M;
+
+ int i = 28;
+
+ if (Math.Round(d1, i) != expectedResult1 || Math.Round(d2, i) != expectedResult2 || Math.Round(d3, i) != expectedResult3)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Return value is wrong!");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentOutOfRangeException is not thrown.");
+
+ try
+ {
+ decimal d1 = 3.123456789012345678901234567890M;
+ decimal result = Math.Round(d1, -1);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentOutOfRangeException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentOutOfRangeException is not thrown.");
+
+ try
+ {
+ decimal d1 = 3.123456789012345678901234567890M;
+ decimal result = Math.Round(d1, 29);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentOutOfRangeException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ MathRound2 test = new MathRound2();
+
+ TestLibrary.TestFramework.BeginTestCase("MathRound2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathround3.cs b/tests/src/CoreMangLib/cti/system/math/mathround3.cs
new file mode 100644
index 0000000000..b48766d4ff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathround3.cs
@@ -0,0 +1,142 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class MathRound3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Round(System.double) when decimal part of arg d < =0.5 .");
+
+ try
+ {
+ int tempIntVar = TestLibrary.Generator.GetInt32(-55);
+
+ double tempDoubleVar;
+ do
+ tempDoubleVar = TestLibrary.Generator.GetDouble(-55);
+ while (tempDoubleVar > 0.5);
+
+ double d = tempIntVar + tempDoubleVar;
+
+ if (Math.Round(d) != tempIntVar)
+ {
+ Console.WriteLine("actual value = " + tempIntVar);
+ Console.WriteLine("expected value = " + Math.Round(d));
+ TestLibrary.TestFramework.LogError("001.1", "Return value is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify Round(System.double) when decimal part of arg d > 0.5 .");
+
+ try
+ {
+ int tempIntVar = TestLibrary.Generator.GetInt32(-55);
+
+ double tempDoubleVar;
+ do
+ tempDoubleVar = TestLibrary.Generator.GetDouble(-55);
+ while (tempDoubleVar <= 0.5);
+
+ double d = tempIntVar + tempDoubleVar;
+
+ if (Math.Round(d) != tempIntVar + 1)
+ {
+ Console.WriteLine("actual value = " + (tempIntVar + 1));
+ Console.WriteLine("expected value = " + Math.Round(d));
+ TestLibrary.TestFramework.LogError("001.1", "Return value is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException is not thrown.");
+
+ try
+ {
+ double result = Math.Round(double.Parse(double.MaxValue.ToString() + "1"));
+ TestLibrary.TestFramework.LogError("101.1", " OverflowException is not thrown.");
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ MathRound3 test = new MathRound3();
+
+ TestLibrary.TestFramework.BeginTestCase("MathRound3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathround4.cs b/tests/src/CoreMangLib/cti/system/math/mathround4.cs
new file mode 100644
index 0000000000..e02101fb25
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathround4.cs
@@ -0,0 +1,189 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Round(System.Double,System.Int32)
+/// </summary>
+
+public class MathRound4
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Round(d, 0)");
+
+ try
+ {
+ int i = 0;
+ if (Math.Round(3.4d, i) != 3 || Math.Round(3.5d, i) != 4 || Math.Round(3.6d, i) != 4)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Return value is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify Round(d, 1)");
+
+ try
+ {
+ if (Math.Round(3.44d, 1) != 3.4 || Math.Round(3.45d, 1) != 3.4 || Math.Round(3.46d, 1) != 3.5)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Return value is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify Round(d, 15)");
+
+ try
+ {
+ double d1 = 1234567890.123454;
+ double expectedResult1 = 1234567890.12345;
+
+ double d2 = 1234567890.123455;
+ double expectedResult2 = 1234567890.12346;
+
+ double d3 = 1234567890.123456;
+ double expectedResult3 = 1234567890.12346;
+
+ int i = 15;
+
+ if (Math.Round(d1, i).ToString() != expectedResult1.ToString()
+ || Math.Round(d2, i).ToString() != expectedResult2.ToString()
+ || Math.Round(d3, i).ToString() != expectedResult3.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Return value is wrong!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentOutOfRangeException is not thrown.");
+
+ try
+ {
+ double d = Math.Round(3.45, -1);
+ TestLibrary.TestFramework.LogError("101.1", " OverflowException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentOutOfRangeException is not thrown.");
+
+ try
+ {
+ double d = Math.Round(1234567890.1234567, 16);
+ TestLibrary.TestFramework.LogError("102.1", " OverflowException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ MathRound4 test = new MathRound4();
+
+ TestLibrary.TestFramework.BeginTestCase("MathRound4");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathsign1.cs b/tests/src/CoreMangLib/cti/system/math/mathsign1.cs
new file mode 100644
index 0000000000..d9058b1b84
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathsign1.cs
@@ -0,0 +1,208 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// Sign(System.Decimal)
+/// </summary>
+
+public class MathSign1
+{
+ public static int Main(string[] args)
+ {
+ MathSign1 test = new MathSign1();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Sign(System.Decimal)...");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Decimal.MaxValue is a positive number.");
+
+ try
+ {
+ Decimal dec = Decimal.MaxValue;
+ if (Math.Sign(dec) != 1)
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "Decimal.MaxValue is not a positive number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify Decimal.MinValue is a negative number.");
+
+ try
+ {
+ Decimal dec = Decimal.MinValue;
+ if (Math.Sign(dec) != -1)
+ {
+ TestLibrary.TestFramework.LogError("P02.1", "Decimal.MinValue is not a negative number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P02.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify Decimal.One is a positive number.");
+
+ try
+ {
+ Decimal dec = Decimal.One;
+ if (Math.Sign(dec) != 1)
+ {
+ TestLibrary.TestFramework.LogError("P03.1", "Decimal.One is not a positive number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P03.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify Decimal.MinusOne is a negative number.");
+
+ try
+ {
+ Decimal dec = Decimal.MinusOne;
+ if (Math.Sign(dec) != -1)
+ {
+ TestLibrary.TestFramework.LogError("P04.1", "Decimal.MinusOne is not a negative number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P04.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify Decimal.Zero is zero.");
+
+ try
+ {
+ Decimal zero = 0M;
+ if (Math.Sign(zero) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P05.1", "Decimal.Zero is not zero!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P05.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Verify the return value should be 1 when the decimal is positive.");
+
+ try
+ {
+ Decimal dec = 123.456M;
+ if (Math.Sign(dec) != 1)
+ {
+ TestLibrary.TestFramework.LogError("P06.1", "The return value is not 1 when the decimal is positive!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P06.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Verify the return value should be -1 when the decimal is negative.");
+
+ try
+ {
+ Decimal dec = -123.456M;
+ if (Math.Sign(dec) != -1)
+ {
+ TestLibrary.TestFramework.LogError("P07.1", "The return value is not -1 when the decimal is negative!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P07.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathsign2.cs b/tests/src/CoreMangLib/cti/system/math/mathsign2.cs
new file mode 100644
index 0000000000..5c75bb175a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathsign2.cs
@@ -0,0 +1,272 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// Sign(System.Double)
+/// </summary>
+
+public class MathSign2
+{
+ public static int Main(string[] args)
+ {
+ MathSign2 test = new MathSign2();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Sign(System.Double).");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Double.MaxValue is a positive number.");
+
+ try
+ {
+ Double d = Double.MaxValue;
+ if (Math.Sign(d) != 1)
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "Double.MaxValue is not a positive number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify Double.MinValue is a negative number.");
+
+ try
+ {
+ Double d = Double.MinValue;
+ if (Math.Sign(d) != -1)
+ {
+ TestLibrary.TestFramework.LogError("P02.1", "Double.MinValue is not a negative number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P02.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify Double.PositiveInfinity is a positive number.");
+
+ try
+ {
+ Double d = Double.PositiveInfinity;
+ if (Math.Sign(d) != 1)
+ {
+ TestLibrary.TestFramework.LogError("P03.1", "Double.PositiveInfinity is not a positive number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P03.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify Double.NegativeInfinity is a negative number.");
+
+ try
+ {
+ Double d = Double.NegativeInfinity;
+ if (Math.Sign(d) != -1)
+ {
+ TestLibrary.TestFramework.LogError("P04.1", "Double.NegativeInfinity is not a negative number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P04.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify Double.Epsilon is a positive number.");
+
+ try
+ {
+ Double d = Double.Epsilon;
+ if (Math.Sign(d) != 1)
+ {
+ TestLibrary.TestFramework.LogError("P05.1", "Double.Epsilon is not a positive number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P05.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Verify the return value should be 1 when the Double is positive.");
+
+ try
+ {
+ Double d = TestLibrary.Generator.GetDouble(-55);
+ while (d <= 0)
+ {
+ d = TestLibrary.Generator.GetDouble(-55);
+ }
+
+ if (Math.Sign(d) != 1)
+ {
+ TestLibrary.TestFramework.LogError("P06.1", "The return value is not 1 when the Double is positive!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P06.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Verify the return value should be -1 when the Double is negative.");
+
+ try
+ {
+ Double d = TestLibrary.Generator.GetDouble(-55);
+ while (d <= 0)
+ {
+ d = TestLibrary.Generator.GetDouble(-55);
+ }
+
+ if (Math.Sign(-d) != -1)
+ {
+ TestLibrary.TestFramework.LogError("P07.1", "The return value is not -1 when the Double is negative!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P07.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest8: Verify the return value should be 0 when the Double is zero.");
+
+ try
+ {
+ Double d = 0.0d;
+
+ if (Math.Sign(d) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P08.1", "The return value is not -1 when the Double is negative!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P08.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArithmeticException should be thrown when value is equal to NaN.");
+
+ try
+ {
+ Double d = Double.NaN;
+ Math.Sign(d);
+
+ TestLibrary.TestFramework.LogError("N01.1", "ArithmeticException is not thrown when value is equal to NaN!");
+ retVal = false;
+
+ }
+ catch (ArithmeticException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N01.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathsign3.cs b/tests/src/CoreMangLib/cti/system/math/mathsign3.cs
new file mode 100644
index 0000000000..efbe66b6c8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathsign3.cs
@@ -0,0 +1,171 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// Sign(System.Int16)
+/// </summary>
+
+public class MathSign3
+{
+ public static int Main(string[] args)
+ {
+ MathSign3 test = new MathSign3();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Sign(System.Int16).");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Int16.MaxValue is a positive number.");
+
+ try
+ {
+ Int16 i = Int16.MaxValue;
+ if (Math.Sign(i) != 1)
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "Int16.MaxValue is not a positive number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify Int16.MinValue is a negative number.");
+
+ try
+ {
+ Int16 i = Int16.MinValue;
+ if (Math.Sign(i) != -1)
+ {
+ TestLibrary.TestFramework.LogError("P02.1", "Int16.MinValue is not a negative number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P02.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify the return value should be 1 when the Int16 is positive.");
+
+ try
+ {
+ Int16 i = TestLibrary.Generator.GetInt16(-55);
+ while (i <= 0)
+ {
+ i = TestLibrary.Generator.GetInt16(-55);
+ }
+
+ if (Math.Sign(i) != 1)
+ {
+ TestLibrary.TestFramework.LogError("P03.1", "The return value is not 1 when the Int16 is positive!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P03.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify the return value should be -1 when the Int16 is negative.");
+
+ try
+ {
+ Int16 i = TestLibrary.Generator.GetInt16(-55);
+ while (i <= 0)
+ {
+ i = TestLibrary.Generator.GetInt16(-55);
+ }
+
+ if (Math.Sign(-i) != -1)
+ {
+ TestLibrary.TestFramework.LogError("P04.1", "The return value is not -1 when the Int16 is negative!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P04.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify the return value should be 0 when the Int16 is zero.");
+
+ try
+ {
+ Int16 i = 0;
+
+ if (Math.Sign(i) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P05.1", "The return value is not -1 when the Int16 is negative!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P05.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathsign4.cs b/tests/src/CoreMangLib/cti/system/math/mathsign4.cs
new file mode 100644
index 0000000000..ae5d7fe13f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathsign4.cs
@@ -0,0 +1,171 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// Sign(System.Int32)
+/// </summary>
+
+public class MathSign4
+{
+ public static int Main(string[] args)
+ {
+ MathSign4 test = new MathSign4();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Sign(System.Int32).");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Int32.MaxValue is a positive number.");
+
+ try
+ {
+ Int32 i = Int32.MaxValue;
+ if (Math.Sign(i) != 1)
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "Int32.MaxValue is not a positive number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify Int32.MinValue is a negative number.");
+
+ try
+ {
+ Int32 i = Int32.MinValue;
+ if (Math.Sign(i) != -1)
+ {
+ TestLibrary.TestFramework.LogError("P02.1", "Int32.MinValue is not a negative number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P02.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify the return value should be 1 when the Int32 is positive.");
+
+ try
+ {
+ Int32 i = TestLibrary.Generator.GetInt32(-55);
+ while (i <= 0)
+ {
+ i = TestLibrary.Generator.GetInt32(-55);
+ }
+
+ if (Math.Sign(i) != 1)
+ {
+ TestLibrary.TestFramework.LogError("P03.1", "The return value is not 1 when the Int32 is positive!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P03.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify the return value should be -1 when the Int32 is negative.");
+
+ try
+ {
+ Int32 i = TestLibrary.Generator.GetInt32(-55);
+ while (i <= 0)
+ {
+ i = TestLibrary.Generator.GetInt32(-55);
+ }
+
+ if (Math.Sign(-i) != -1)
+ {
+ TestLibrary.TestFramework.LogError("P04.1", "The return value is not -1 when the Int32 is negative!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P04.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify the return value should be 0 when the Int32 is zero.");
+
+ try
+ {
+ Int32 i = 0;
+
+ if (Math.Sign(i) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P05.1", "The return value is not -1 when the Int32 is negative!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P05.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathsign5.cs b/tests/src/CoreMangLib/cti/system/math/mathsign5.cs
new file mode 100644
index 0000000000..5741325988
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathsign5.cs
@@ -0,0 +1,171 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// Sign(System.Int64)
+/// </summary>
+
+public class MathSign5
+{
+ public static int Main(string[] args)
+ {
+ MathSign5 test = new MathSign5();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Sign(System.Int64).");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Int64.MaxValue is a positive number.");
+
+ try
+ {
+ Int64 i = Int64.MaxValue;
+ if (Math.Sign(i) != 1)
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "Int64.MaxValue is not a positive number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify Int64.MinValue is a negative number.");
+
+ try
+ {
+ Int64 i = Int64.MinValue;
+ if (Math.Sign(i) != -1)
+ {
+ TestLibrary.TestFramework.LogError("P02.1", "Int64.MinValue is not a negative number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P02.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify the return value should be 1 when the Int64 is positive.");
+
+ try
+ {
+ Int64 i = TestLibrary.Generator.GetInt64(-55);
+ while (i <= 0)
+ {
+ i = TestLibrary.Generator.GetInt64(-55);
+ }
+
+ if (Math.Sign(i) != 1)
+ {
+ TestLibrary.TestFramework.LogError("P03.1", "The return value is not 1 when the Int64 is positive!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P03.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify the return value should be -1 when the Int64 is negative.");
+
+ try
+ {
+ Int64 i = TestLibrary.Generator.GetInt64(-55);
+ while (i <= 0)
+ {
+ i = TestLibrary.Generator.GetInt64(-55);
+ }
+
+ if (Math.Sign(-i) != -1)
+ {
+ TestLibrary.TestFramework.LogError("P04.1", "The return value is not -1 when the Int64 is negative!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P04.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify the return value should be 0 when the Int64 is zero.");
+
+ try
+ {
+ Int64 i = 0;
+
+ if (Math.Sign(i) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P05.1", "The return value is not -1 when the Int64 is negative!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P05.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathsign6.cs b/tests/src/CoreMangLib/cti/system/math/mathsign6.cs
new file mode 100644
index 0000000000..a693cab10a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathsign6.cs
@@ -0,0 +1,171 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// Sign(System.SByte)
+/// </summary>
+
+public class MathSign6
+{
+ public static int Main(string[] args)
+ {
+ MathSign6 test = new MathSign6();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Sign(System.SByte).");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify SByte.MaxValue is a positive number.");
+
+ try
+ {
+ SByte i = SByte.MaxValue;
+ if (Math.Sign(i) != 1)
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "SByte.MaxValue is not a positive number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify SByte.MinValue is a negative number.");
+
+ try
+ {
+ SByte i = SByte.MinValue;
+ if (Math.Sign(i) != -1)
+ {
+ TestLibrary.TestFramework.LogError("P02.1", "SByte.MinValue is not a negative number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P02.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify the return value should be 1 when the SByte is positive.");
+
+ try
+ {
+ SByte s = (SByte)TestLibrary.Generator.GetByte(-55);
+ while (s <= 0)
+ {
+ s = (SByte)TestLibrary.Generator.GetByte(-55);
+ }
+
+ if (Math.Sign(s) != 1)
+ {
+ TestLibrary.TestFramework.LogError("P03.1", "The return value is not 1 when the SByte is positive!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P03.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify the return value should be -1 when the SByte is negative.");
+
+ try
+ {
+ SByte s = (SByte)TestLibrary.Generator.GetByte(-55);
+ while (s <= 0)
+ {
+ s = (SByte)TestLibrary.Generator.GetByte(-55);
+ }
+
+ if (Math.Sign(-s) != -1)
+ {
+ TestLibrary.TestFramework.LogError("P04.1", "The return value is not -1 when the SByte is negative!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P04.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify the return value should be 0 when the SByte is zero.");
+
+ try
+ {
+ SByte s = 0;
+
+ if (Math.Sign(s) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P05.1", "The return value is not 0 when the SByte is zero!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P05.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathsign7.cs b/tests/src/CoreMangLib/cti/system/math/mathsign7.cs
new file mode 100644
index 0000000000..eeb0e7032d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathsign7.cs
@@ -0,0 +1,272 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// Sign(System.Single)
+/// </summary>
+
+public class MathSign7
+{
+ public static int Main(string[] args)
+ {
+ MathSign7 test = new MathSign7();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Sign(System.Single).");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Single.MaxValue is a positive number.");
+
+ try
+ {
+ Single s = Single.MaxValue;
+ if (Math.Sign(s) != 1)
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "Single.MaxValue is not a positive number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify Single.MinValue is a negative number.");
+
+ try
+ {
+ Single s = Single.MinValue;
+ if (Math.Sign(s) != -1)
+ {
+ TestLibrary.TestFramework.LogError("P02.1", "Single.MinValue is not a negative number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P02.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify Single.PositiveInfinity is a positive number.");
+
+ try
+ {
+ Single s = Single.PositiveInfinity;
+ if (Math.Sign(s) != 1)
+ {
+ TestLibrary.TestFramework.LogError("P03.1", "Single.PositiveInfinity is not a positive number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P03.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify Single.NegativeInfinity is a negative number.");
+
+ try
+ {
+ Single s = Single.NegativeInfinity;
+ if (Math.Sign(s) != -1)
+ {
+ TestLibrary.TestFramework.LogError("P04.1", "Single.NegativeInfinity is not a negative number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P04.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify Single.Epsilon is a positive number.");
+
+ try
+ {
+ Single s = Single.Epsilon;
+ if (Math.Sign(s) != 1)
+ {
+ TestLibrary.TestFramework.LogError("P05.1", "Single.Epsilon is not a positive number!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P05.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Verify the return value should be 1 when the Single is positive.");
+
+ try
+ {
+ Single s = TestLibrary.Generator.GetSingle(-55);
+ while (s <= 0)
+ {
+ s = TestLibrary.Generator.GetSingle(-55);
+ }
+
+ if (Math.Sign(s) != 1)
+ {
+ TestLibrary.TestFramework.LogError("P06.1", "The return value is not 1 when the Single is positive!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P06.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Verify the return value should be -1 when the Single is negative.");
+
+ try
+ {
+ Single s = TestLibrary.Generator.GetSingle(-55);
+ while (s <= 0)
+ {
+ s = TestLibrary.Generator.GetSingle(-55);
+ }
+
+ if (Math.Sign(-s) != -1)
+ {
+ TestLibrary.TestFramework.LogError("P07.1", "The return value is not -1 when the Single is negative!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P07.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest8: Verify the return value should be 0 when the Single is zero.");
+
+ try
+ {
+ Single s = 0.0f;
+
+ if (Math.Sign(s) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P08.1", "The return value is not -1 when the Single is negative!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P08.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArithmeticException should be thrown when value is equal to NaN.");
+
+ try
+ {
+ Single s = Single.NaN;
+ Math.Sign(s);
+
+ TestLibrary.TestFramework.LogError("N01.1", "ArithmeticException is not thrown when value is equal to NaN!");
+ retVal = false;
+
+ }
+ catch (ArithmeticException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N01.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathsin.cs b/tests/src/CoreMangLib/cti/system/math/mathsin.cs
new file mode 100644
index 0000000000..84b20e0272
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathsin.cs
@@ -0,0 +1,232 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// Sin(System.Double)
+/// </summary>
+
+public class MathSin
+{
+ public static int Main(string[] args)
+ {
+ MathSin test = new MathSin();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Sin(System.Double).");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the result when radian is 0.");
+
+ try
+ {
+ Double d = Math.Sin(0);
+ if (d != 0)
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "The result is error when radian is 0!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify the result is 1 when radian is Math.PI/2.");
+
+ try
+ {
+ Double d = Math.Sin(Math.PI/2);
+ if ( d != 1)
+ {
+ TestLibrary.TestFramework.LogError("P02.1", "The result is error when radian is Math.PI/2!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P02.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify the result is -1 when radian is -Math.PI/2.");
+
+ try
+ {
+ Double d = Math.Sin(-Math.PI / 2);
+ if (d != -1)
+ {
+ TestLibrary.TestFramework.LogError("P03.1", "The result is error when radian is -Math.PI/2!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P03.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify the result is 1/2 when radian is Math.PI/6.");
+
+ try
+ {
+ Double d = Math.Round(Math.Sin(Math.PI / 6), 2);
+ if (d != 0.5d)
+ {
+ TestLibrary.TestFramework.LogError("P04.1", "The result is error when radian is Math.PI/6!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P04.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify the result is -1/2 when radian is -Math.PI/6.");
+
+ try
+ {
+ Double d = Math.Round(Math.Sin(-Math.PI / 6), 2);
+ if (d != -0.5d)
+ {
+ TestLibrary.TestFramework.LogError("P05.1", "The result is error when radian is -Math.PI/6!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P05.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Verify the result is NaN when radian is PositiveInfinity.");
+
+ try
+ {
+ Double d = Math.Sin(Double.PositiveInfinity);
+ if (d.CompareTo(Double.NaN) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P06.1", "The result is error when radian is PositiveInfinity!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P06.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Verify the result is NaN when radian is NegativeInfinity.");
+
+ try
+ {
+ Double d = Math.Sin(Double.NegativeInfinity);
+ if (d.CompareTo(Double.NaN) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P07.1", "The result is error when radian is NegativeInfinity!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P07.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest8: Verify the result is NaN when radian is NaN.");
+
+ try
+ {
+ Double d = Math.Sin(Double.NaN);
+ if (d.CompareTo(Double.NaN) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P08.1", "The result is error when radian is NaN!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P08.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathsinh.cs b/tests/src/CoreMangLib/cti/system/math/mathsinh.cs
new file mode 100644
index 0000000000..411c4b58d0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathsinh.cs
@@ -0,0 +1,232 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// Sinh(System.Double)
+/// </summary>
+
+public class MathSinh
+{
+ public static int Main(string[] args)
+ {
+ MathSinh test = new MathSinh();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.Math.Sinh(System.Double).");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the result when radian is 0.");
+
+ try
+ {
+ Double d = Math.Sinh(0);
+ if (!MathTestLib.DoubleIsWithinEpsilon(d, 0))
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "The result is error when radian is 0!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify the result when radian is Math.PI/2.");
+
+ try
+ {
+ Double d = Math.Sinh(Math.PI / 2);
+ if (!MathTestLib.DoubleIsWithinEpsilon(d ,2.3012989023072947))
+ {
+ TestLibrary.TestFramework.LogError("P02.1", "The result is error when radian is Math.PI/2!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P02.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify the result when radian is -Math.PI/2.");
+
+ try
+ {
+ Double d = Math.Sinh(-Math.PI / 2);
+ if (!MathTestLib.DoubleIsWithinEpsilon(d ,-2.3012989023072947))
+ {
+ TestLibrary.TestFramework.LogError("P03.1", "The result is error when radian is -Math.PI/2!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P03.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify the result when radian is Math.PI/6.");
+
+ try
+ {
+ Double d = Math.Sinh(Math.PI / 6);
+ if (!MathTestLib.DoubleIsWithinEpsilon(d,0.54785347388803973))
+ {
+ TestLibrary.TestFramework.LogError("P04.1", "The result is error when radian is Math.PI/6!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P04.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Verify the result when radian is -Math.PI/6.");
+
+ try
+ {
+ Double d = Math.Sinh(-Math.PI / 6);
+ if (!MathTestLib.DoubleIsWithinEpsilon(d ,-0.54785347388803973))
+ {
+ TestLibrary.TestFramework.LogError("P05.1", "The result is error when radian is -Math.PI/6!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P05.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Verify the result is PositiveInfinity when radian is PositiveInfinity.");
+
+ try
+ {
+ Double d = Math.Sinh(Double.PositiveInfinity);
+ if (d.CompareTo(Double.PositiveInfinity) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P06.1", "The result is error when radian is PositiveInfinity!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P06.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Verify the result is NegativeInfinity when radian is NegativeInfinity.");
+
+ try
+ {
+ Double d = Math.Sinh(Double.NegativeInfinity);
+ if (d.CompareTo(Double.NegativeInfinity) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P07.1", "The result is error when radian is NegativeInfinity!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P07.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest8: Verify the result is NaN when radian is NaN.");
+
+ try
+ {
+ Double d = Math.Sinh(Double.NaN);
+ if (d.CompareTo(Double.NaN) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P08.1", "The result is error when radian is NaN!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P08.2", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathsqrt.cs b/tests/src/CoreMangLib/cti/system/math/mathsqrt.cs
new file mode 100644
index 0000000000..f6108a4dcb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathsqrt.cs
@@ -0,0 +1,167 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// System.Math.Sqrt(double)
+/// </summary>
+public class MathSqrt
+{
+ public static int Main()
+ {
+ MathSqrt mathSqrt = new MathSqrt();
+ TestLibrary.TestFramework.BeginTestCase("MathSqrt");
+ if (mathSqrt.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Calculate the zero sqrt");
+ try
+ {
+ double source = 0;
+ double des = Math.Sqrt(source);
+ if (des != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Calculate the positive number sqrt");
+ try
+ {
+ double source = 100;
+ double des = Math.Sqrt(source);
+ if (des != 10)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Calculate the negative number sqrt");
+ try
+ {
+ double source = -1;
+ double des = Math.Sqrt(source);
+ if (!double.IsNaN(des))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Calculate the double NaN sqrt");
+ try
+ {
+ double source = double.NaN;
+ double des = Math.Sqrt(source);
+ if (!double.IsNaN(des))
+ {
+ TestLibrary.TestFramework.LogError("007", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5:Calculate the double PositiveInfinity sqrt");
+ try
+ {
+ double source = double.PositiveInfinity;
+ double des = Math.Sqrt(source);
+ if (!double.IsPositiveInfinity(des))
+ {
+ TestLibrary.TestFramework.LogError("009", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6:Calculate the double NegativeInfinity sqrt");
+ try
+ {
+ double source = double.NegativeInfinity;
+ double des = Math.Sqrt(source);
+ if (!double.IsNaN(des))
+ {
+ TestLibrary.TestFramework.LogError("011", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/math/mathtan.cs b/tests/src/CoreMangLib/cti/system/math/mathtan.cs
new file mode 100644
index 0000000000..1028bd5334
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathtan.cs
@@ -0,0 +1,191 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// System.Math.Tan(Double)
+/// </summary>
+public class MathTan
+{
+ private const double c_DELTA = 0.000005d;
+
+ public static int Main()
+ {
+ MathTan mathTan = new MathTan();
+ TestLibrary.TestFramework.BeginTestCase("MathTan");
+ if (mathTan.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Caculate the tangent of 0 degrees");
+ try
+ {
+ double sourceA = (double)0;
+ double desA = Math.Tan(sourceA);
+ if (!MathTestLib.DoubleIsWithinEpsilon(desA , (double)0))
+ {
+ TestLibrary.TestFramework.LogError("001", "Expected: 0, actual: " + desA.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Calculate the tangent of 90 degrees");
+ try
+ {
+ double sourceA = 90;
+ double desA = Math.Tan(sourceA * (Math.PI / 180));
+ if ((desA - 16331778728383844.0) > c_DELTA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult: Expected("+16331778728383844.0+") Actual("+desA+")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Calculate the tangent of 180 degrees");
+ try
+ {
+ double sourceA = 180;
+ double desA = Math.Tan(sourceA * (Math.PI / 180));
+ if ((desA + 0.00000000000000012246063538223773) > c_DELTA)
+ {
+ TestLibrary.TestFramework.LogError("005", "Expected: 0.00000000000000012246063538223773, actual: " + desA.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Calculate the tangent of 45 degrees");
+ try
+ {
+ double sourceA = 45.0;
+ double desA = Math.Tan(sourceA * (Math.PI / 180));
+ if (!MathTestLib.DoubleIsWithinEpsilon(desA , 0.99999999999999989))
+ {
+ TestLibrary.TestFramework.LogError("007", "Expected: 0.99999999999999989, actual: " + desA.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: The Double is Double NaN");
+ try
+ {
+ double sourceA = Double.NaN;
+ double desA = Math.Tan(sourceA);
+ if (!double.IsNaN(desA))
+ {
+ TestLibrary.TestFramework.LogError("009", "the ExpectResult is not the ActualResult: Expected(NaN) Actual("+desA+")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: The Double is Double NegativeInfinity");
+ try
+ {
+ double sourceA = Double.NegativeInfinity;
+ double desA = Math.Tan(sourceA);
+ if (!double.IsNaN(desA))
+ {
+ TestLibrary.TestFramework.LogError("011", "Expected: NaN, actual: " + desA.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: The Double is Double PositiveInfinity");
+ try
+ {
+ double sourceA = Double.PositiveInfinity;
+ double desA = Math.Tan(sourceA);
+ if (!double.IsNaN(desA))
+ {
+ TestLibrary.TestFramework.LogError("013", "Expected: NaN, actual: " + desA.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/mathtanh.cs b/tests/src/CoreMangLib/cti/system/math/mathtanh.cs
new file mode 100644
index 0000000000..a117b0962c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathtanh.cs
@@ -0,0 +1,193 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// Math.Tanh(bouble)
+/// </summary>
+public class MathTanh
+{
+ public static int Main()
+ {
+ MathTanh mathTanh = new MathTanh();
+ TestLibrary.TestFramework.BeginTestCase("MathTanh");
+ if (mathTanh.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Caculate the tanh of 0 degrees");
+ try
+ {
+ double sourceA = 0;
+ double desA = Math.Tanh(sourceA);
+ if (!MathTestLib.DoubleIsWithinEpsilon(desA, sourceA))
+ {
+ TestLibrary.TestFramework.LogError("001", "Expected: 0, actual: "+desA.ToString()+"; diff > epsilon = "+
+ MathTestLib.Epsilon.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Calculate the tanh of 90 degrees");
+ try
+ {
+ double sourceA = 90;
+ double desA = Math.Tanh(sourceA * (Math.PI / 180));
+ if (!MathTestLib.DoubleIsWithinEpsilon(desA ,0.91715233566727439))
+ {
+ TestLibrary.TestFramework.LogError("003", "Expected: 0.91715233566727439, actual: " + desA.ToString() + "; diff > epsilon = " +
+ MathTestLib.Epsilon.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Calculate the tanh of 180 degrees");
+ try
+ {
+ double sourceA = 180;
+ double desA = Math.Tan(sourceA * (Math.PI / 180));
+ if (!MathTestLib.DoubleIsWithinEpsilon(desA,-0.00000000000000012246063538223773))
+ {
+ TestLibrary.TestFramework.LogError("005", "Expected: -0.00000000000000012246063538223773, actual: " + desA.ToString() + "; diff > epsilon = " +
+ MathTestLib.Epsilon.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Calculate the tanh of 45 degrees");
+ try
+ {
+ double sourceA = 45.0;
+ double desA = Math.Tanh(sourceA * (Math.PI / 180));
+ if (!MathTestLib.DoubleIsWithinEpsilon(desA ,0.65579420263267241))
+ {
+ TestLibrary.TestFramework.LogError("007", "Expected: 0.65579420263267241, actual: " + desA.ToString() + "; diff > epsilon = " +
+ MathTestLib.Epsilon.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: tanh(NaN)=NaN");
+ try
+ {
+ double sourceA = Double.NaN;
+ double desA = Math.Tanh(sourceA);
+ if (!double.IsNaN(desA))
+ {
+ TestLibrary.TestFramework.LogError("009", "Expected: NaN, actual: " + desA.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: tanh(-inf)=-1");
+ try
+ {
+ double sourceA = Double.NegativeInfinity;
+ double desA = Math.Tanh(sourceA);
+ if (!MathTestLib.DoubleIsWithinEpsilon(desA ,-1))
+ {
+ TestLibrary.TestFramework.LogError("011", "Expected: -1, actual: " + desA.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: tanh(+inf) = 1");
+ try
+ {
+ double sourceA = Double.PositiveInfinity;
+ double desA = Math.Tanh(sourceA);
+ if (!MathTestLib.DoubleIsWithinEpsilon(desA ,1))
+ {
+ TestLibrary.TestFramework.LogError("013", "Expected 1, actual: "+desA.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/math/mathtestlib.cs b/tests/src/CoreMangLib/cti/system/math/mathtestlib.cs
new file mode 100644
index 0000000000..50e1ed17ec
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/math/mathtestlib.cs
@@ -0,0 +1,40 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Summary description for Class1
+/// </summary>
+public class MathTestLib
+{
+ private static Decimal epsilon = new Decimal(0.000001D);
+
+ public static Decimal Epsilon
+ {
+ get
+ {
+ return epsilon;
+ }
+ set
+ {
+ epsilon = Convert.ToDecimal(value);
+ }
+ }
+
+ public static bool DoubleIsWithinEpsilon(double x, double y)
+ {
+ Decimal dx = new Decimal(x);
+ Decimal dy = new Decimal(y);
+ Decimal diff = Math.Abs(Decimal.Subtract(dx, dy));
+ return diff.CompareTo(Epsilon) <= 0;
+ }
+
+ public static bool FloatIsWithinEpsilon(float x, float y)
+ {
+ Decimal dx = new Decimal(x);
+ Decimal dy = new Decimal(y);
+ Decimal diff = Math.Abs(Decimal.Subtract(dx, dy));
+ return diff.CompareTo(Epsilon) <= 0;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/memberaccessexception/MemberAccessExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/memberaccessexception/MemberAccessExceptionCtor1.csproj
new file mode 100644
index 0000000000..6955bdd95a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/memberaccessexception/MemberAccessExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="memberaccessexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/memberaccessexception/MemberAccessExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/memberaccessexception/MemberAccessExceptionCtor2.csproj
new file mode 100644
index 0000000000..3136b98148
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/memberaccessexception/MemberAccessExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="memberaccessexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/memberaccessexception/MemberAccessExceptionCtor3.csproj b/tests/src/CoreMangLib/cti/system/memberaccessexception/MemberAccessExceptionCtor3.csproj
new file mode 100644
index 0000000000..f890ef66df
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/memberaccessexception/MemberAccessExceptionCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="memberaccessexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/memberaccessexception/memberaccessexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/memberaccessexception/memberaccessexceptionctor1.cs
new file mode 100644
index 0000000000..67e10e23f8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/memberaccessexception/memberaccessexceptionctor1.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/memberaccessexception/memberaccessexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/memberaccessexception/memberaccessexceptionctor2.cs
new file mode 100644
index 0000000000..0db7de18fe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/memberaccessexception/memberaccessexceptionctor2.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/memberaccessexception/memberaccessexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/memberaccessexception/memberaccessexceptionctor3.cs
new file mode 100644
index 0000000000..aac3afe5cf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/memberaccessexception/memberaccessexceptionctor3.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/methodaccessexception/MethodAccessExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/methodaccessexception/MethodAccessExceptionCtor1.csproj
new file mode 100644
index 0000000000..3f790ba65c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/methodaccessexception/MethodAccessExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodaccessexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/methodaccessexception/MethodAccessExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/methodaccessexception/MethodAccessExceptionCtor2.csproj
new file mode 100644
index 0000000000..9d272b0424
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/methodaccessexception/MethodAccessExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodaccessexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/methodaccessexception/MethodAccessExceptionCtor3.csproj b/tests/src/CoreMangLib/cti/system/methodaccessexception/MethodAccessExceptionCtor3.csproj
new file mode 100644
index 0000000000..ae89ec47da
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/methodaccessexception/MethodAccessExceptionCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodaccessexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/methodaccessexception/methodaccessexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/methodaccessexception/methodaccessexceptionctor1.cs
new file mode 100644
index 0000000000..960a153ca2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/methodaccessexception/methodaccessexceptionctor1.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/methodaccessexception/methodaccessexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/methodaccessexception/methodaccessexceptionctor2.cs
new file mode 100644
index 0000000000..389b87b608
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/methodaccessexception/methodaccessexceptionctor2.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/methodaccessexception/methodaccessexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/methodaccessexception/methodaccessexceptionctor3.cs
new file mode 100644
index 0000000000..1866e36a41
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/methodaccessexception/methodaccessexceptionctor3.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/missingfieldexception/MissingFieldExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/missingfieldexception/MissingFieldExceptionCtor1.csproj
new file mode 100644
index 0000000000..4696cc7fc9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingfieldexception/MissingFieldExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="missingfieldexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/missingfieldexception/MissingFieldExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/missingfieldexception/MissingFieldExceptionCtor2.csproj
new file mode 100644
index 0000000000..6249203236
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingfieldexception/MissingFieldExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="missingfieldexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/missingfieldexception/MissingFieldExceptionCtor3.csproj b/tests/src/CoreMangLib/cti/system/missingfieldexception/MissingFieldExceptionCtor3.csproj
new file mode 100644
index 0000000000..888feef0f4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingfieldexception/MissingFieldExceptionCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="missingfieldexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/missingfieldexception/MissingFieldExceptionMessage.csproj b/tests/src/CoreMangLib/cti/system/missingfieldexception/MissingFieldExceptionMessage.csproj
new file mode 100644
index 0000000000..426e2d835e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingfieldexception/MissingFieldExceptionMessage.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="missingfieldexceptionmessage.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/missingfieldexception/missingfieldexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/missingfieldexception/missingfieldexceptionctor1.cs
new file mode 100644
index 0000000000..baf93568c1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingfieldexception/missingfieldexceptionctor1.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/missingfieldexception/missingfieldexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/missingfieldexception/missingfieldexceptionctor2.cs
new file mode 100644
index 0000000000..090e0b442d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingfieldexception/missingfieldexceptionctor2.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/missingfieldexception/missingfieldexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/missingfieldexception/missingfieldexceptionctor3.cs
new file mode 100644
index 0000000000..aa71deb938
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingfieldexception/missingfieldexceptionctor3.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/missingfieldexception/missingfieldexceptionmessage.cs b/tests/src/CoreMangLib/cti/system/missingfieldexception/missingfieldexceptionmessage.cs
new file mode 100644
index 0000000000..403470a368
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingfieldexception/missingfieldexceptionmessage.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/missingmemberexception/MissingMemberExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/missingmemberexception/MissingMemberExceptionCtor1.csproj
new file mode 100644
index 0000000000..231d41ba48
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingmemberexception/MissingMemberExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="missingmemberexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/missingmemberexception/MissingMemberExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/missingmemberexception/MissingMemberExceptionCtor2.csproj
new file mode 100644
index 0000000000..f6bc2c0f3c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingmemberexception/MissingMemberExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="missingmemberexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/missingmemberexception/MissingMemberExceptionCtor3.csproj b/tests/src/CoreMangLib/cti/system/missingmemberexception/MissingMemberExceptionCtor3.csproj
new file mode 100644
index 0000000000..d9404a1b43
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingmemberexception/MissingMemberExceptionCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="missingmemberexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/missingmemberexception/MissingMemberExceptionMessage.csproj b/tests/src/CoreMangLib/cti/system/missingmemberexception/MissingMemberExceptionMessage.csproj
new file mode 100644
index 0000000000..f5dce2ec2e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingmemberexception/MissingMemberExceptionMessage.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="missingmemberexceptionmessage.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/missingmemberexception/missingmemberexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/missingmemberexception/missingmemberexceptionctor1.cs
new file mode 100644
index 0000000000..2b85b88d51
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingmemberexception/missingmemberexceptionctor1.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/missingmemberexception/missingmemberexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/missingmemberexception/missingmemberexceptionctor2.cs
new file mode 100644
index 0000000000..0d42206793
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingmemberexception/missingmemberexceptionctor2.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/missingmemberexception/missingmemberexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/missingmemberexception/missingmemberexceptionctor3.cs
new file mode 100644
index 0000000000..082d780175
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingmemberexception/missingmemberexceptionctor3.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/missingmemberexception/missingmemberexceptionmessage.cs b/tests/src/CoreMangLib/cti/system/missingmemberexception/missingmemberexceptionmessage.cs
new file mode 100644
index 0000000000..26a51fd3c6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingmemberexception/missingmemberexceptionmessage.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/missingmethodexception/MissingMethodExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/missingmethodexception/MissingMethodExceptionCtor1.csproj
new file mode 100644
index 0000000000..4390e50edb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingmethodexception/MissingMethodExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="missingmethodexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/missingmethodexception/MissingMethodExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/missingmethodexception/MissingMethodExceptionCtor2.csproj
new file mode 100644
index 0000000000..9f3fb5a708
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingmethodexception/MissingMethodExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="missingmethodexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/missingmethodexception/MissingMethodExceptionCtor3.csproj b/tests/src/CoreMangLib/cti/system/missingmethodexception/MissingMethodExceptionCtor3.csproj
new file mode 100644
index 0000000000..3641bec93e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingmethodexception/MissingMethodExceptionCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="missingmethodexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/missingmethodexception/MissingMethodExceptionMessage.csproj b/tests/src/CoreMangLib/cti/system/missingmethodexception/MissingMethodExceptionMessage.csproj
new file mode 100644
index 0000000000..2555272357
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingmethodexception/MissingMethodExceptionMessage.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="missingmethodexceptionmessage.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/missingmethodexception/missingmethodexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/missingmethodexception/missingmethodexceptionctor1.cs
new file mode 100644
index 0000000000..95d172be29
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingmethodexception/missingmethodexceptionctor1.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/missingmethodexception/missingmethodexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/missingmethodexception/missingmethodexceptionctor2.cs
new file mode 100644
index 0000000000..dd4e0e6479
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingmethodexception/missingmethodexceptionctor2.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/missingmethodexception/missingmethodexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/missingmethodexception/missingmethodexceptionctor3.cs
new file mode 100644
index 0000000000..415228f2fe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingmethodexception/missingmethodexceptionctor3.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/missingmethodexception/missingmethodexceptionmessage.cs b/tests/src/CoreMangLib/cti/system/missingmethodexception/missingmethodexceptionmessage.cs
new file mode 100644
index 0000000000..595aef20c6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/missingmethodexception/missingmethodexceptionmessage.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/multicastdelegate/MulticastDelegateCombineImpl.csproj b/tests/src/CoreMangLib/cti/system/multicastdelegate/MulticastDelegateCombineImpl.csproj
new file mode 100644
index 0000000000..2a8f4eebc4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/multicastdelegate/MulticastDelegateCombineImpl.csproj
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="delegatedefinitions.cs" />
+ <Compile Include="multicastdelegatecombineimpl.cs" />
+ <Compile Include="verificationagent.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/multicastdelegate/MulticastDelegateEquals.csproj b/tests/src/CoreMangLib/cti/system/multicastdelegate/MulticastDelegateEquals.csproj
new file mode 100644
index 0000000000..eaecb9282b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/multicastdelegate/MulticastDelegateEquals.csproj
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="delegatedefinitions.cs" />
+ <Compile Include="multicastdelegateequals.cs" />
+ <Compile Include="verificationagent.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/multicastdelegate/MulticastDelegateGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/multicastdelegate/MulticastDelegateGetHashCode.csproj
new file mode 100644
index 0000000000..dcd26022f7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/multicastdelegate/MulticastDelegateGetHashCode.csproj
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="delegatedefinitions.cs" />
+ <Compile Include="multicastdelegategethashcode.cs" />
+ <Compile Include="verificationagent.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/multicastdelegate/MulticastDelegateGetInvocationList.csproj b/tests/src/CoreMangLib/cti/system/multicastdelegate/MulticastDelegateGetInvocationList.csproj
new file mode 100644
index 0000000000..5d44c4fdc2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/multicastdelegate/MulticastDelegateGetInvocationList.csproj
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="delegatedefinitions.cs" />
+ <Compile Include="multicastdelegategetinvocationlist.cs" />
+ <Compile Include="verificationagent.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/multicastdelegate/delegatedefinitions.cs b/tests/src/CoreMangLib/cti/system/multicastdelegate/delegatedefinitions.cs
new file mode 100644
index 0000000000..2936eeeff9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/multicastdelegate/delegatedefinitions.cs
@@ -0,0 +1,509 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices; // for DllImportAttribute
+
+#region Delegates Definitions
+public delegate void ValueParameterVoidDelegate(int val);
+
+public delegate void ReferenceParameterVoidDelegate(object val);
+
+public delegate void VoidParameterVoidDelegate();
+
+public delegate int ValueParameterValueDelegate(int val);
+
+public delegate object ReferenceParameterReferenceDelegate(object val);
+
+public delegate object ValueParameterReferenceDelegate(int val);
+
+public delegate int ReferenceParameterValueDelegate(object val);
+
+public delegate int VoidParameterValueDelegate();
+
+public delegate object VoidParameterReferenceDelegate();
+
+public delegate void TwoValueParameterVoidDelegate(int val1, int val2);
+
+public delegate void ValueReferenceParameterVoidDelegate(int val1, object val2);
+
+public delegate void ReferenceValueParameterVoidDelegate(object val1, int val2);
+
+public delegate object ReferenceValueParameterReferenceDelegate(object val1, int val2);
+#endregion
+
+public class DelegateDefinitions
+{
+ #region Public Constaints
+ public const int c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER = 1;
+ public const int c_DELEGATE_TEST_ADDITIONAL_VALUE_PARAMETER = 2;
+ public const string c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER = "abcdefg";
+ #endregion
+
+ #region Public Properties
+ public ValueParameterVoidDelegate ValueParameterVoidDelegate
+ {
+ get
+ {
+ return m_ValueParameterVoidDelegate;
+ }
+ set
+ {
+ m_ValueParameterVoidDelegate = value;
+ }
+ }
+
+ public ReferenceParameterVoidDelegate ReferenceParameterVoidDelegate
+ {
+ get
+ {
+ return m_ReferenceParameterVoidDelegate;
+ }
+ set
+ {
+ m_ReferenceParameterVoidDelegate = value;
+ }
+ }
+
+ public VoidParameterVoidDelegate VoidParameterVoidDelegate
+ {
+ get
+ {
+ return m_VoidParameterVoidDelegate;
+ }
+ set
+ {
+ m_VoidParameterVoidDelegate = value;
+ }
+ }
+
+ public ValueParameterValueDelegate ValueParameterValueDelegate
+ {
+ get
+ {
+ return m_ValueParameterValueDelegate;
+ }
+ set
+ {
+ m_ValueParameterValueDelegate = value;
+ }
+ }
+
+ public ReferenceParameterReferenceDelegate ReferenceParameterReferenceDelegate
+ {
+ get
+ {
+ return m_ReferenceParameterReferenceDelegate;
+ }
+ set
+ {
+ m_ReferenceParameterReferenceDelegate = value;
+ }
+ }
+
+ public ValueParameterReferenceDelegate ValueParameterReferenceDelegate
+ {
+ get
+ {
+ return m_ValueParameterReferenceDelegate;
+ }
+ set
+ {
+ m_ValueParameterReferenceDelegate = value;
+ }
+ }
+
+ public ReferenceParameterValueDelegate ReferenceParameterValueDelegate
+ {
+ get
+ {
+ return m_ReferenceParameterValueDelegate;
+ }
+ set
+ {
+ m_ReferenceParameterValueDelegate = value;
+ }
+ }
+
+ public VoidParameterValueDelegate VoidParameterValueDelegate
+ {
+ get
+ {
+ return m_VoidParameterValueDelegate;
+ }
+ set
+ {
+ m_VoidParameterValueDelegate = value;
+ }
+ }
+
+ public VoidParameterReferenceDelegate VoidParameterReferenceDelegate
+ {
+ get
+ {
+ return m_VoidParameterReferenceDelegate;
+ }
+ set
+ {
+ m_VoidParameterReferenceDelegate = value;
+ }
+ }
+
+ public TwoValueParameterVoidDelegate TwoValueParameterVoidDelegate
+ {
+ get
+ {
+ return m_TwoValueParameterVoidDelegate;
+ }
+ set
+ {
+ m_TwoValueParameterVoidDelegate = value;
+ }
+ }
+
+ public ValueReferenceParameterVoidDelegate ValueReferenceParameterVoidDelegate
+ {
+ get
+ {
+ return m_ValueReferenceParameterVoidDelegate;
+ }
+ set
+ {
+ m_ValueReferenceParameterVoidDelegate = value;
+ }
+ }
+
+ public ReferenceValueParameterVoidDelegate ReferenceValueParameterVoidDelegate
+ {
+ get
+ {
+ return m_ReferenceValueParameterVoidDelegate;
+ }
+ set
+ {
+ m_ReferenceValueParameterVoidDelegate = value;
+ }
+ }
+
+ public ReferenceValueParameterReferenceDelegate ReferenceValueParameterReferenceDelegate
+ {
+ get
+ {
+ return m_ReferenceValueParameterReferenceDelegate;
+ }
+ set
+ {
+ m_ReferenceValueParameterReferenceDelegate = value;
+ }
+ }
+
+ public int VoidParameterVoidDelegateTestValue
+ {
+ get
+ {
+ return m_VoidParameterVoidDelegateTestValue;
+ }
+ }
+ #endregion
+
+ #region Private Properties
+ private ValueParameterVoidDelegate m_ValueParameterVoidDelegate;
+ private ReferenceParameterVoidDelegate m_ReferenceParameterVoidDelegate;
+ private VoidParameterVoidDelegate m_VoidParameterVoidDelegate;
+ private ValueParameterValueDelegate m_ValueParameterValueDelegate;
+ private ReferenceParameterReferenceDelegate m_ReferenceParameterReferenceDelegate;
+ private ValueParameterReferenceDelegate m_ValueParameterReferenceDelegate;
+ private ReferenceParameterValueDelegate m_ReferenceParameterValueDelegate;
+ private VoidParameterValueDelegate m_VoidParameterValueDelegate;
+ private VoidParameterReferenceDelegate m_VoidParameterReferenceDelegate;
+ private TwoValueParameterVoidDelegate m_TwoValueParameterVoidDelegate;
+ private ValueReferenceParameterVoidDelegate m_ValueReferenceParameterVoidDelegate;
+ private ReferenceValueParameterVoidDelegate m_ReferenceValueParameterVoidDelegate;
+ private ReferenceValueParameterReferenceDelegate m_ReferenceValueParameterReferenceDelegate;
+
+ private int m_VoidParameterVoidDelegateTestValue = c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER;
+ #endregion
+
+ #region Public Static Properties
+ public static int VoidParameterVoidDelegateStaticTestValue = c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER;
+ #endregion
+
+ #region Public Static Methods
+ // Need P/Invoke be tested?
+ [DllImport("kernel32.dll")]
+ public static extern int GetCurrentProcessId();
+
+ [DllImport("kernel32.dll")]
+ public static extern int GetCurrentThreadId();
+
+ public static void TestValueParameterVoidStaticCallback(int val)
+ {
+ if (val != c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER)
+ VerificationAgent.ThrowVerificationException(
+ "Input value parameter is not expected",
+ val,
+ c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+ }
+
+ public static void TestReferenceParameterVoidStaticCallback(object val)
+ {
+ if (!val.Equals(c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER))
+ VerificationAgent.ThrowVerificationException(
+ "Input reference parameter is not expected",
+ val,
+ c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER);
+ }
+
+ public static void TestVoidParameterVoidStaticCallback()
+ {
+ // increment a global value to ensure this call back function is called.
+ VoidParameterVoidDelegateStaticTestValue++;
+ }
+
+ public static int TestVoidParameterValueStaticCallback()
+ {
+ return c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER;
+ }
+
+ public static int TestValueParameterValueStaticCallback(int val)
+ {
+ if (val != c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER)
+ VerificationAgent.ThrowVerificationException(
+ "Input value parameter is not expected",
+ val,
+ c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+
+ return c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER;
+ }
+
+ public static object TestReferenceValueParameterReferenceStaticCallback(object val1, int val2)
+ {
+ if (!val1.Equals(c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER))
+ VerificationAgent.ThrowVerificationException(
+ "First input reference parameter is not expected",
+ val1,
+ c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER);
+
+ if (c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER != val2)
+ VerificationAgent.ThrowVerificationException(
+ "Second input value parameter is not expected",
+ val2,
+ c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+
+ return c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER;
+ }
+ #endregion
+
+ #region Public Methods
+ #region Positive Test Callback Methods
+ public void TestValueParameterVoidCallback(int val)
+ {
+ if (val != c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER)
+ VerificationAgent.ThrowVerificationException(
+ "Input value parameter is not expected",
+ val,
+ c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+ }
+
+ public void TestReferenceParameterVoidCallback(object val)
+ {
+ if (!val.Equals(c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER))
+ VerificationAgent.ThrowVerificationException(
+ "Input reference parameter is not expected",
+ val,
+ c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER);
+ }
+
+ public void TestVoidParameterVoidCallback()
+ {
+ // increment a global value to ensure this call back function is called.
+ m_VoidParameterVoidDelegateTestValue++;
+ }
+
+ public int TestValueParameterValueCallback(int val)
+ {
+ if (val != c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER)
+ VerificationAgent.ThrowVerificationException(
+ "Input value parameter is not expected",
+ val,
+ c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+
+ return c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER;
+ }
+
+ public object TestReferenceParameterReferenceCallback(object val)
+ {
+ if (!val.Equals(c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER))
+ VerificationAgent.ThrowVerificationException(
+ "Input reference parameter is not expected",
+ val,
+ c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER);
+
+ return c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER;
+ }
+
+ public object TestValueParameterReferenceCallback(int val)
+ {
+ if (c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER != val)
+ VerificationAgent.ThrowVerificationException(
+ "Input value parameter is not expected",
+ val,
+ c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+
+ return c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER;
+ }
+
+ public int TestReferenceParameterValueCallback(object val)
+ {
+ if (!val.Equals(c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER))
+ VerificationAgent.ThrowVerificationException(
+ "Input reference parameter is not expected",
+ val,
+ c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER);
+
+ return c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER;
+ }
+
+ public int TestVoidParameterValueCallback()
+ {
+ return c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER;
+ }
+
+ public object TestVoidParameterReferenceCallback()
+ {
+ return c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER;
+ }
+
+ public void TestTwoValueParameterVoidCallback(int val1, int val2)
+ {
+ if (c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER != val1)
+ VerificationAgent.ThrowVerificationException(
+ "First input value parameter is not expected",
+ val1,
+ c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+
+ if (c_DELEGATE_TEST_ADDITIONAL_VALUE_PARAMETER != val2)
+ VerificationAgent.ThrowVerificationException(
+ "Second input value parameter is not expected",
+ val2,
+ c_DELEGATE_TEST_ADDITIONAL_VALUE_PARAMETER);
+ }
+
+ public void TestValueReferenceParameterVoidCallback(int val1, object val2)
+ {
+ if (c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER != val1)
+ VerificationAgent.ThrowVerificationException(
+ "First input value parameter is not expected",
+ val1,
+ c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+
+ if (!val2.Equals(c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER))
+ VerificationAgent.ThrowVerificationException(
+ "Second input reference parameter is not expected",
+ val2,
+ c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER);
+ }
+
+ public void TestReferenceValueParameterVoidCallback(object val1, int val2)
+ {
+ if (!val1.Equals(c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER))
+ VerificationAgent.ThrowVerificationException(
+ "First input reference parameter is not expected",
+ val1,
+ c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER);
+
+ if (c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER != val2)
+ VerificationAgent.ThrowVerificationException(
+ "Second input value parameter is not expected",
+ val2,
+ c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+ }
+
+ public object TestReferenceValueParameterReferenceCallback(object val1, int val2)
+ {
+ if (!val1.Equals(c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER))
+ VerificationAgent.ThrowVerificationException(
+ "First input reference parameter is not expected",
+ val1,
+ c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER);
+
+ if (c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER != val2)
+ VerificationAgent.ThrowVerificationException(
+ "Second input value parameter is not expected",
+ val2,
+ c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+
+ return c_DELEGATE_TEST_DEFAUTL_REFERENCE_PARAMETER;
+ }
+ #endregion
+
+ #region Nagative Test Callback Methods
+ public void TestReferenceParameterVoidCallbackWithNullValue(object val)
+ {
+ if (null != val)
+ VerificationAgent.ThrowVerificationException(
+ "Input reference parameter is not expected",
+ val,
+ "null");
+ }
+
+ public object TestReferenceParameterReferenceCallbackWithNullValue(object val)
+ {
+ if (null != val)
+ VerificationAgent.ThrowVerificationException(
+ "Input reference parameter is not expected",
+ val,
+ "null");
+
+ return null;
+ }
+
+ public void TestValueReferenceParameterVoidCallbackWithNullValue(int val1, object val2)
+ {
+ if (c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER != val1)
+ VerificationAgent.ThrowVerificationException(
+ "First input value parameter is not expected",
+ val1,
+ c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+
+ if (null != val2)
+ VerificationAgent.ThrowVerificationException(
+ "Second input reference parameter is not expected",
+ val2,
+ "null");
+ }
+
+ public void TestReferenceValueParameterVoidCallbackWithNullValue(object val1, int val2)
+ {
+ if (null != val1)
+ VerificationAgent.ThrowVerificationException(
+ "First input reference parameter is not expected",
+ val1,
+ "null");
+
+ if (c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER != val2)
+ VerificationAgent.ThrowVerificationException(
+ "Second input value parameter is not expected",
+ val2,
+ c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+ }
+
+ public object TestReferenceValueParameterReferenceCallbackWithNullValue(object val1, int val2)
+ {
+ if (null != val1)
+ VerificationAgent.ThrowVerificationException(
+ "First input reference parameter is not expected",
+ val1,
+ "null");
+
+ if (c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER != val2)
+ VerificationAgent.ThrowVerificationException(
+ "Second input value parameter is not expected",
+ val2,
+ c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+
+ return null;
+ }
+ #endregion
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/multicastdelegate/multicastdelegatecombineimpl.cs b/tests/src/CoreMangLib/cti/system/multicastdelegate/multicastdelegatecombineimpl.cs
new file mode 100644
index 0000000000..a1098315f5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/multicastdelegate/multicastdelegatecombineimpl.cs
@@ -0,0 +1,445 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class MulticastDelegateCombineImpl
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ public void TestValueParameterVoidCallback(int val)
+ {
+ if (val != DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER)
+ VerificationAgent.ThrowVerificationException(
+ "Input value parameter is not expected",
+ val,
+ DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Combine two function from different type to a delegate");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.ValueParameterVoidDelegate =
+ new ValueParameterVoidDelegate(dd.TestValueParameterVoidCallback);
+ dd.ValueParameterVoidDelegate +=
+ new ValueParameterVoidDelegate(TestValueParameterVoidCallback);
+
+ dd.ValueParameterVoidDelegate(DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Combine two function from same type to a delegate");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.ValueParameterVoidDelegate =
+ new ValueParameterVoidDelegate(TestValueParameterVoidCallback1);
+ dd.ValueParameterVoidDelegate +=
+ new ValueParameterVoidDelegate(TestValueParameterVoidCallback);
+
+ dd.ValueParameterVoidDelegate(DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Combine a instance method and a class method from same type to a delegate");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.ValueParameterVoidDelegate =
+ new ValueParameterVoidDelegate(DelegateDefinitions.TestValueParameterVoidStaticCallback);
+ dd.ValueParameterVoidDelegate +=
+ new ValueParameterVoidDelegate(dd.TestValueParameterVoidCallback);
+
+ dd.ValueParameterVoidDelegate(DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Combine a public instance method and a public class method from different type to a delegate");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.ValueParameterVoidDelegate =
+ new ValueParameterVoidDelegate(DelegateDefinitions.TestValueParameterVoidStaticCallback);
+ dd.ValueParameterVoidDelegate +=
+ new ValueParameterVoidDelegate(TestValueParameterVoidCallback);
+
+ dd.ValueParameterVoidDelegate(DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Combine a private instance method and a private class method from the same type to a delegate");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.ValueParameterVoidDelegate =
+ new ValueParameterVoidDelegate(MulticastDelegateCombineImpl.TestValueParameterVoidStaticCallback);
+ dd.ValueParameterVoidDelegate +=
+ new ValueParameterVoidDelegate(TestValueParameterVoidCallback1);
+
+ dd.ValueParameterVoidDelegate(DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Combine two static methods from different class");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.ValueParameterVoidDelegate =
+ new ValueParameterVoidDelegate(MulticastDelegateCombineImpl.TestValueParameterVoidStaticCallback);
+ dd.ValueParameterVoidDelegate +=
+ new ValueParameterVoidDelegate(DelegateDefinitions.TestValueParameterVoidStaticCallback);
+
+ dd.ValueParameterVoidDelegate(DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Combine two anonymous methods");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ int i = DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER;
+
+ dd.ValueParameterValueDelegate = delegate(int val)
+ {
+ if (val != DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER)
+ VerificationAgent.ThrowVerificationException(
+ "Input value parameter is not expected",
+ val,
+ DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+
+ // Test the call order of multicast delegate
+ i++;
+
+ return DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER;
+ };
+ dd.ValueParameterValueDelegate += delegate(int val)
+ {
+ if (val != DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER)
+ VerificationAgent.ThrowVerificationException(
+ "Input value parameter is not expected",
+ val,
+ DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+
+ if (i != DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER + 1)
+ VerificationAgent.ThrowVerificationException(
+ "Value of out variable of anonymous method is not expected",
+ DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER + 1,
+ i);
+
+ return DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER;
+ };
+
+ int returnObject = dd.ValueParameterValueDelegate(DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+ if (returnObject != DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER)
+ {
+ TestLibrary.TestFramework.LogError("007", "Incorrect delegate return value: " + returnObject);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest8: Combine two multifunctions delegates");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.VoidParameterVoidDelegate =
+ new VoidParameterVoidDelegate(DelegateDefinitions.TestVoidParameterVoidStaticCallback);
+ dd.VoidParameterVoidDelegate +=
+ new VoidParameterVoidDelegate(dd.TestVoidParameterVoidCallback);
+
+ DelegateDefinitions dd1 = new DelegateDefinitions();
+ dd1.VoidParameterVoidDelegate =
+ new VoidParameterVoidDelegate(DelegateDefinitions.TestVoidParameterVoidStaticCallback);
+ dd1.VoidParameterVoidDelegate +=
+ new VoidParameterVoidDelegate(dd1.TestVoidParameterVoidCallback);
+
+ dd.VoidParameterVoidDelegate = (VoidParameterVoidDelegate)MulticastDelegate.Combine(dd.VoidParameterVoidDelegate, dd1.VoidParameterVoidDelegate);
+
+ dd.VoidParameterVoidDelegate();
+
+ if (dd.VoidParameterVoidDelegateTestValue != DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER + 1)
+ {
+ TestLibrary.TestFramework.LogError("009", "Combined delegate does not work: " + dd.VoidParameterVoidDelegateTestValue);
+ retVal = false;
+ }
+
+ if (dd1.VoidParameterVoidDelegateTestValue != DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER + 1)
+ {
+ TestLibrary.TestFramework.LogError("010", "Combined delegate does not work: " + dd1.VoidParameterVoidDelegateTestValue);
+ retVal = false;
+ }
+
+ if (DelegateDefinitions.VoidParameterVoidDelegateStaticTestValue != DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER + 2)
+ {
+ TestLibrary.TestFramework.LogError("011", "Combined delegate does not work: " + DelegateDefinitions.VoidParameterVoidDelegateStaticTestValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ finally
+ {
+ // reset the value of static variable
+ DelegateDefinitions.VoidParameterVoidDelegateStaticTestValue = 0;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Combine the same method twice");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.ValueParameterVoidDelegate =
+ new ValueParameterVoidDelegate(dd.TestValueParameterVoidCallback);
+ dd.ValueParameterVoidDelegate +=
+ new ValueParameterVoidDelegate(dd.TestValueParameterVoidCallback);
+
+ dd.ValueParameterVoidDelegate(DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Combine the null value");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.ValueParameterVoidDelegate =
+ new ValueParameterVoidDelegate(dd.TestValueParameterVoidCallback);
+ dd.ValueParameterVoidDelegate += null;
+ dd.ValueParameterVoidDelegate +=
+ new ValueParameterVoidDelegate(TestValueParameterVoidCallback);
+
+ dd.ValueParameterVoidDelegate(DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Return value of second method is different with first method");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.VoidParameterValueDelegate = delegate
+ {
+ return DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER;
+ };
+ dd.VoidParameterValueDelegate += delegate
+ {
+ return DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER + 1;
+ };
+
+ int returnObject = dd.VoidParameterValueDelegate();
+ if (returnObject != DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER + 1)
+ {
+ TestLibrary.TestFramework.LogError("103", "Incorrect delegate return value: " + returnObject);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ #region Private Methods
+ private void TestValueParameterVoidCallback1(int val)
+ {
+ if (val != DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER)
+ VerificationAgent.ThrowVerificationException(
+ "Input value parameter is not expected",
+ val,
+ DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+ }
+ #endregion
+
+ #region Private Static Methods
+ private static void TestValueParameterVoidStaticCallback(int val)
+ {
+ if (val != DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER)
+ VerificationAgent.ThrowVerificationException(
+ "Input value parameter is not expected",
+ val,
+ DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+ }
+ #endregion
+
+ public static int Main()
+ {
+ MulticastDelegateCombineImpl mdci = new MulticastDelegateCombineImpl();
+
+ TestLibrary.TestFramework.BeginTestCase("MulticastDelegateCombineImpl");
+
+ if (mdci.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/multicastdelegate/multicastdelegateequals.cs b/tests/src/CoreMangLib/cti/system/multicastdelegate/multicastdelegateequals.cs
new file mode 100644
index 0000000000..f20ae33fc2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/multicastdelegate/multicastdelegateequals.cs
@@ -0,0 +1,443 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Security;
+
+public class MulticastDelegateEquals
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Determine whether two delegate with the same function from same type are equals");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.ValueParameterVoidDelegate =
+ new ValueParameterVoidDelegate(dd.TestValueParameterVoidCallback);
+ DelegateDefinitions dd1 = new DelegateDefinitions();
+ dd1.ValueParameterVoidDelegate =
+ new ValueParameterVoidDelegate(dd.TestValueParameterVoidCallback);
+
+ if (!dd.ValueParameterVoidDelegate.Equals(dd1.ValueParameterVoidDelegate))
+ {
+ TestLibrary.TestFramework.LogError("001", "Two delegate with the same function from same type are equal");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Determine whether two delegate with the same class method from same type are equal");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.ValueParameterVoidDelegate =
+ new ValueParameterVoidDelegate(DelegateDefinitions.TestValueParameterVoidStaticCallback);
+ DelegateDefinitions dd1 = new DelegateDefinitions();
+ dd1.ValueParameterVoidDelegate =
+ new ValueParameterVoidDelegate(DelegateDefinitions.TestValueParameterVoidStaticCallback);
+
+ if (!dd.ValueParameterVoidDelegate.Equals(dd1.ValueParameterVoidDelegate))
+ {
+ TestLibrary.TestFramework.LogError("003", "Two delegate with the same class method from same type are not equal");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ [SecuritySafeCritical]
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Determine whether two delegate with the same P/Invoke method from same type are equal");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.VoidParameterValueDelegate =
+ new VoidParameterValueDelegate(DelegateDefinitions.GetCurrentProcessId);
+ DelegateDefinitions dd1 = new DelegateDefinitions();
+ dd1.VoidParameterValueDelegate =
+ new VoidParameterValueDelegate(DelegateDefinitions.GetCurrentProcessId);
+
+ if (!dd.VoidParameterValueDelegate.Equals(dd1.VoidParameterValueDelegate))
+ {
+ TestLibrary.TestFramework.LogError("005", "Two delegate with the same P/Invoke method from same type are not equal");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Determine whether an initialized delegate is not equal to null");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.ValueParameterVoidDelegate =
+ new ValueParameterVoidDelegate(dd.TestValueParameterVoidCallback);
+
+ if (dd.ValueParameterVoidDelegate.Equals(null))
+ {
+ TestLibrary.TestFramework.LogError("007", "An initiailzed delegate is equal to null");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Determine two delegate with same number of invoke list which is initialized with same instance methods are equal");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.ValueParameterVoidDelegate =
+ new ValueParameterVoidDelegate(dd.TestValueParameterVoidCallback);
+ dd.ValueParameterVoidDelegate +=
+ new ValueParameterVoidDelegate(TestValueParameterVoidCallback);
+
+ DelegateDefinitions dd1 = new DelegateDefinitions();
+ dd1.ValueParameterVoidDelegate =
+ new ValueParameterVoidDelegate(dd.TestValueParameterVoidCallback);
+ dd1.ValueParameterVoidDelegate +=
+ new ValueParameterVoidDelegate(TestValueParameterVoidCallback);
+
+ if (!dd.ValueParameterVoidDelegate.Equals(dd1.ValueParameterVoidDelegate))
+ {
+ TestLibrary.TestFramework.LogError("009", "two delegate with same number of invoke list which is initialized with same instance methods are not equal");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ [SecuritySafeCritical]
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Determine two delegate with same number of invoke list which is initialized with same multi-type functions are equal");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.VoidParameterValueDelegate =
+ new VoidParameterValueDelegate(dd.TestVoidParameterValueCallback);
+ dd.VoidParameterValueDelegate +=
+ new VoidParameterValueDelegate(DelegateDefinitions.TestVoidParameterValueStaticCallback);
+ dd.VoidParameterValueDelegate +=
+ new VoidParameterValueDelegate(DelegateDefinitions.GetCurrentProcessId);
+
+ DelegateDefinitions dd1 = new DelegateDefinitions();
+ dd1.VoidParameterValueDelegate =
+ new VoidParameterValueDelegate(dd.TestVoidParameterValueCallback);
+ dd1.VoidParameterValueDelegate +=
+ new VoidParameterValueDelegate(DelegateDefinitions.TestVoidParameterValueStaticCallback);
+ dd1.VoidParameterValueDelegate +=
+ new VoidParameterValueDelegate(DelegateDefinitions.GetCurrentProcessId);
+
+ if (!dd.VoidParameterValueDelegate.Equals(dd1.VoidParameterValueDelegate))
+ {
+ TestLibrary.TestFramework.LogError("009", "two delegate with same number of invoke list which is initialized with same multi-type functions are not equal");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Determine whether two delegate with different function from same type are not equal");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.ValueParameterVoidDelegate =
+ new ValueParameterVoidDelegate(TestValueParameterVoidCallback);
+ DelegateDefinitions dd1 = new DelegateDefinitions();
+ dd1.ValueParameterVoidDelegate =
+ new ValueParameterVoidDelegate(TestValueParameterVoidCallback1);
+
+ if (dd.ValueParameterVoidDelegate.Equals(dd1.ValueParameterVoidDelegate))
+ {
+ TestLibrary.TestFramework.LogError("101", "Two delegate with different function from same type are equal");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Determine whether two delegate with same name function from different type are not equal");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.ValueParameterVoidDelegate =
+ new ValueParameterVoidDelegate(dd.TestValueParameterVoidCallback);
+ DelegateDefinitions dd1 = new DelegateDefinitions();
+ dd1.ValueParameterVoidDelegate =
+ new ValueParameterVoidDelegate(TestValueParameterVoidCallback);
+
+ if (dd.ValueParameterVoidDelegate.Equals(dd1.ValueParameterVoidDelegate))
+ {
+ TestLibrary.TestFramework.LogError("103", "Two delegate with the same name function from different type are equal");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ [SecuritySafeCritical]
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Determine whether two delegate with different P/Invoke functions are not equal");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.VoidParameterValueDelegate =
+ new VoidParameterValueDelegate(DelegateDefinitions.GetCurrentProcessId);
+ DelegateDefinitions dd1 = new DelegateDefinitions();
+ dd1.VoidParameterValueDelegate =
+ new VoidParameterValueDelegate(DelegateDefinitions.GetCurrentThreadId);
+
+ if (dd.VoidParameterValueDelegate.Equals(dd1.VoidParameterValueDelegate))
+ {
+ TestLibrary.TestFramework.LogError("105", "Two delegate with the different P/Invoke functions are equal");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: Determine whether two delegate with different number of functions are not equal");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.ValueParameterVoidDelegate =
+ new ValueParameterVoidDelegate(dd.TestValueParameterVoidCallback);
+ dd.ValueParameterVoidDelegate +=
+ new ValueParameterVoidDelegate(TestValueParameterVoidCallback);
+
+ DelegateDefinitions dd1 = new DelegateDefinitions();
+ dd1.ValueParameterVoidDelegate =
+ new ValueParameterVoidDelegate(dd.TestValueParameterVoidCallback);
+ dd1.ValueParameterVoidDelegate +=
+ new ValueParameterVoidDelegate(TestValueParameterVoidCallback);
+ dd1.ValueParameterVoidDelegate +=
+ new ValueParameterVoidDelegate(TestValueParameterVoidCallback);
+
+ if (dd.ValueParameterVoidDelegate.Equals(dd1.ValueParameterVoidDelegate))
+ {
+ TestLibrary.TestFramework.LogError("107", "Two delegate with the different number of functions are equal");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("108", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ [SecuritySafeCritical]
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: Determine whether two delegate with same number of functions but with different order are not equal");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.VoidParameterValueDelegate =
+ new VoidParameterValueDelegate(dd.TestVoidParameterValueCallback);
+ dd.VoidParameterValueDelegate +=
+ new VoidParameterValueDelegate(DelegateDefinitions.TestVoidParameterValueStaticCallback);
+ dd.VoidParameterValueDelegate +=
+ new VoidParameterValueDelegate(DelegateDefinitions.GetCurrentProcessId);
+
+ DelegateDefinitions dd1 = new DelegateDefinitions();
+ dd1.VoidParameterValueDelegate =
+ new VoidParameterValueDelegate(dd.TestVoidParameterValueCallback);
+ dd1.VoidParameterValueDelegate +=
+ new VoidParameterValueDelegate(DelegateDefinitions.GetCurrentProcessId);
+ dd1.VoidParameterValueDelegate +=
+ new VoidParameterValueDelegate(DelegateDefinitions.TestVoidParameterValueStaticCallback);
+
+ if (dd.VoidParameterValueDelegate.Equals(dd1.VoidParameterValueDelegate))
+ {
+ TestLibrary.TestFramework.LogError("109", "two delegate with same number of functions but with different order are equal");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("110", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ MulticastDelegateEquals mde = new MulticastDelegateEquals();
+
+ TestLibrary.TestFramework.BeginTestCase("MulticastDelegateEquals");
+
+ if (mde.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private void TestValueParameterVoidCallback(int val)
+ {
+ if (val != DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER)
+ VerificationAgent.ThrowVerificationException(
+ "Input value parameter is not expected",
+ val,
+ DelegateDefinitions.c_DELEGATE_TEST_DEFAULT_VALUE_PARAMETER);
+ }
+
+ private void TestValueParameterVoidCallback1(int val)
+ {
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/multicastdelegate/multicastdelegategethashcode.cs b/tests/src/CoreMangLib/cti/system/multicastdelegate/multicastdelegategethashcode.cs
new file mode 100644
index 0000000000..72dfc9ec6e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/multicastdelegate/multicastdelegategethashcode.cs
@@ -0,0 +1,108 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Security;
+
+public class MulticastDelegateGetHashCode
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+
+ [SecuritySafeCritical]
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Hash code of two delegate with the same P/Invoke function from same type are equal");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.VoidParameterValueDelegate =
+ new VoidParameterValueDelegate(DelegateDefinitions.GetCurrentProcessId);
+ DelegateDefinitions dd1 = new DelegateDefinitions();
+ dd1.VoidParameterValueDelegate =
+ new VoidParameterValueDelegate(DelegateDefinitions.GetCurrentProcessId);
+
+ if (dd.VoidParameterValueDelegate.GetHashCode() != dd1.VoidParameterValueDelegate.GetHashCode())
+ {
+ TestLibrary.TestFramework.LogError("001", "Hash code of two delegate with the same P/Invoke function from same type are not equal");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Hash code of two delegate with the same instance function from same type are equal");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.ValueParameterVoidDelegate =
+ new ValueParameterVoidDelegate(dd.TestValueParameterVoidCallback);
+
+ DelegateDefinitions dd1 = new DelegateDefinitions();
+ dd1.ValueParameterVoidDelegate =
+ new ValueParameterVoidDelegate(dd.TestValueParameterVoidCallback);
+
+ if (dd.ValueParameterVoidDelegate.GetHashCode() != dd1.ValueParameterVoidDelegate.GetHashCode())
+ {
+ TestLibrary.TestFramework.LogError("003", "Hash code of two delegate with the same instance function from same type are not equal");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ MulticastDelegateGetHashCode mdghc = new MulticastDelegateGetHashCode();
+
+ TestLibrary.TestFramework.BeginTestCase("MulticastDelegateGetHashCode");
+
+ if (mdghc.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/multicastdelegate/multicastdelegategetinvocationlist.cs b/tests/src/CoreMangLib/cti/system/multicastdelegate/multicastdelegategetinvocationlist.cs
new file mode 100644
index 0000000000..23afb1906a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/multicastdelegate/multicastdelegategetinvocationlist.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Security;
+
+public class MulticastDelegateGetInvocationList
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NagTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+
+ [SecuritySafeCritical]
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call GetInvocationList against a delegate with one function");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.VoidParameterValueDelegate =
+ new VoidParameterValueDelegate(DelegateDefinitions.GetCurrentProcessId);
+ Delegate[] invocationList = dd.VoidParameterValueDelegate.GetInvocationList();
+
+ if (invocationList.Length != 1)
+ {
+ TestLibrary.TestFramework.LogError("001", "Call GetInvocationList against a delegate with one function returns wrong result: " + invocationList.Length);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ [SecuritySafeCritical]
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify the function order of the returned invocation list");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.VoidParameterValueDelegate =
+ new VoidParameterValueDelegate(DelegateDefinitions.GetCurrentProcessId);
+ dd.VoidParameterValueDelegate +=
+ new VoidParameterValueDelegate(DelegateDefinitions.TestVoidParameterValueStaticCallback);
+ dd.VoidParameterValueDelegate +=
+ new VoidParameterValueDelegate(dd.TestVoidParameterValueCallback);
+ Delegate[] invocationList = dd.VoidParameterValueDelegate.GetInvocationList();
+
+ if (invocationList.Length != 3)
+ {
+ TestLibrary.TestFramework.LogError("003", "Call GetInvocationList against a delegate with multiple functions returns wrong result: " + invocationList.Length);
+ retVal = false;
+ }
+
+ // Hack: I don't know how to iterater through the invocation list to verify the invocation order
+ // is correct. I have to hard code the desired invocation order
+ //if (invocationList[0].Method.Name != "GetCurrentProcessId" || ***** MikeRou 8/3: Method's getter is not supported
+ // invocationList[1].Method.Name != "TestVoidParameterValueStaticCallback" ||
+ // invocationList[2].Method.Name != "TestVoidParameterValueCallback")
+ //{
+ // TestLibrary.TestFramework.LogError("004", "Invocation order of the returned invocation list is wrong");
+ // retVal = false;
+ //}
+
+ // Test the invocation list can be invoked
+ for (int i = 0; i < invocationList.Length; ++i)
+ {
+ // invocationList[i].Method.Invoke(invocationList[i].Target, null); ***** MikeRou 8/3: Method's getter is not supported
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative Test Cases
+
+ [SecuritySafeCritical]
+ public bool NagTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NagTest1: Insert multiple functions with null embeded in the function list");
+
+ try
+ {
+ DelegateDefinitions dd = new DelegateDefinitions();
+ dd.VoidParameterValueDelegate =
+ new VoidParameterValueDelegate(DelegateDefinitions.GetCurrentProcessId);
+ dd.VoidParameterValueDelegate += null;
+ dd.VoidParameterValueDelegate +=
+ new VoidParameterValueDelegate(DelegateDefinitions.TestVoidParameterValueStaticCallback);
+ dd.VoidParameterValueDelegate +=
+ new VoidParameterValueDelegate(dd.TestVoidParameterValueCallback);
+ Delegate[] invocationList = dd.VoidParameterValueDelegate.GetInvocationList();
+
+ if (invocationList.Length != 3)
+ {
+ TestLibrary.TestFramework.LogError("101", "Call GetInvocationList against a delegate with one function returns wrong result: " + invocationList.Length);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ MulticastDelegateGetInvocationList mdgil = new MulticastDelegateGetInvocationList();
+
+ TestLibrary.TestFramework.BeginTestCase("MulticastDelegateGetInvocationList");
+
+ if (mdgil.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/multicastdelegate/verificationagent.cs b/tests/src/CoreMangLib/cti/system/multicastdelegate/verificationagent.cs
new file mode 100644
index 0000000000..e6662b2f9d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/multicastdelegate/verificationagent.cs
@@ -0,0 +1,26 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Summary description for Class1
+/// </summary>
+public class VerificationAgent
+{
+ #region Public Methods
+ /// <summary>
+ /// Throws System.Exception when test case failed.
+ /// </summary>
+ /// <param name="message">message want to be logged</param>
+ /// <param name="actual">actual result</param>
+ /// <param name="expected">expected result</param>
+ public static void ThrowVerificationException(string message, object actual, object expected)
+ {
+ throw new Exception(string.Format("{0}, actual: {1}, expected: {2}",
+ message,
+ actual,
+ expected));
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/notimplementedexception/NotImplementedExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/notimplementedexception/NotImplementedExceptionCtor1.csproj
new file mode 100644
index 0000000000..6fa4d7c809
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/notimplementedexception/NotImplementedExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="notimplementedexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/notimplementedexception/NotImplementedExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/notimplementedexception/NotImplementedExceptionCtor2.csproj
new file mode 100644
index 0000000000..f37043bb51
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/notimplementedexception/NotImplementedExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="notimplementedexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/notimplementedexception/NotImplementedExceptionCtor3.csproj b/tests/src/CoreMangLib/cti/system/notimplementedexception/NotImplementedExceptionCtor3.csproj
new file mode 100644
index 0000000000..4d1817ff7c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/notimplementedexception/NotImplementedExceptionCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="notimplementedexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/notimplementedexception/notimplementedexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/notimplementedexception/notimplementedexceptionctor1.cs
new file mode 100644
index 0000000000..3a91f97507
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/notimplementedexception/notimplementedexceptionctor1.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/notimplementedexception/notimplementedexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/notimplementedexception/notimplementedexceptionctor2.cs
new file mode 100644
index 0000000000..93e3aa35e1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/notimplementedexception/notimplementedexceptionctor2.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/notimplementedexception/notimplementedexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/notimplementedexception/notimplementedexceptionctor3.cs
new file mode 100644
index 0000000000..aa567e5a66
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/notimplementedexception/notimplementedexceptionctor3.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/notsupportedexception/NotSupportedExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/notsupportedexception/NotSupportedExceptionCtor1.csproj
new file mode 100644
index 0000000000..9cd219d25b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/notsupportedexception/NotSupportedExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="notsupportedexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/notsupportedexception/NotSupportedExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/notsupportedexception/NotSupportedExceptionCtor2.csproj
new file mode 100644
index 0000000000..734789f003
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/notsupportedexception/NotSupportedExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="notsupportedexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/notsupportedexception/NotSupportedExceptionCtor3.csproj b/tests/src/CoreMangLib/cti/system/notsupportedexception/NotSupportedExceptionCtor3.csproj
new file mode 100644
index 0000000000..348a97befc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/notsupportedexception/NotSupportedExceptionCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="notsupportedexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/notsupportedexception/notsupportedexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/notsupportedexception/notsupportedexceptionctor1.cs
new file mode 100644
index 0000000000..29a64a42be
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/notsupportedexception/notsupportedexceptionctor1.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/notsupportedexception/notsupportedexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/notsupportedexception/notsupportedexceptionctor2.cs
new file mode 100644
index 0000000000..64c2783dbf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/notsupportedexception/notsupportedexceptionctor2.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/notsupportedexception/notsupportedexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/notsupportedexception/notsupportedexceptionctor3.cs
new file mode 100644
index 0000000000..d46de0f79e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/notsupportedexception/notsupportedexceptionctor3.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/nullable/NullableCompare.csproj b/tests/src/CoreMangLib/cti/system/nullable/NullableCompare.csproj
new file mode 100644
index 0000000000..097aae54a0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullable/NullableCompare.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="nullablecompare.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/nullable/NullableCtor.csproj b/tests/src/CoreMangLib/cti/system/nullable/NullableCtor.csproj
new file mode 100644
index 0000000000..269e2d7b93
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullable/NullableCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="nullablector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/nullable/NullableEquals.csproj b/tests/src/CoreMangLib/cti/system/nullable/NullableEquals.csproj
new file mode 100644
index 0000000000..2d21c29de5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullable/NullableEquals.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="nullableequals.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/nullable/NullableEquals2.csproj b/tests/src/CoreMangLib/cti/system/nullable/NullableEquals2.csproj
new file mode 100644
index 0000000000..21c78f7694
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullable/NullableEquals2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="nullableequals2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/nullable/NullableGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/nullable/NullableGetHashCode.csproj
new file mode 100644
index 0000000000..04aad7f5f6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullable/NullableGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="nullablegethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/nullable/NullableGetUnderlyingType.csproj b/tests/src/CoreMangLib/cti/system/nullable/NullableGetUnderlyingType.csproj
new file mode 100644
index 0000000000..9a84a6c13c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullable/NullableGetUnderlyingType.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="nullablegetunderlyingtype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/nullable/NullableGetValueOrDefault1.csproj b/tests/src/CoreMangLib/cti/system/nullable/NullableGetValueOrDefault1.csproj
new file mode 100644
index 0000000000..c4fe1a21d6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullable/NullableGetValueOrDefault1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="nullablegetvalueordefault1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/nullable/NullableGetValueOrDefault2.csproj b/tests/src/CoreMangLib/cti/system/nullable/NullableGetValueOrDefault2.csproj
new file mode 100644
index 0000000000..4e87130eb0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullable/NullableGetValueOrDefault2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="nullablegetvalueordefault2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/nullable/NullableHasValue.csproj b/tests/src/CoreMangLib/cti/system/nullable/NullableHasValue.csproj
new file mode 100644
index 0000000000..fc4f887379
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullable/NullableHasValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="nullablehasvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/nullable/NullableToString.csproj b/tests/src/CoreMangLib/cti/system/nullable/NullableToString.csproj
new file mode 100644
index 0000000000..d85d2eb6c3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullable/NullableToString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="nullabletostring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/nullable/NullableValue.csproj b/tests/src/CoreMangLib/cti/system/nullable/NullableValue.csproj
new file mode 100644
index 0000000000..81698862b6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullable/NullableValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="nullablevalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/nullable/nullablecompare.cs b/tests/src/CoreMangLib/cti/system/nullable/nullablecompare.cs
new file mode 100644
index 0000000000..d13b46f784
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullable/nullablecompare.cs
@@ -0,0 +1,251 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Nullable.Compare<T>(Nullable<T>,Nullable<T>)[v-juwa]
+/// </summary>
+public class NullableCompare
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Verify two Nullable<T> objects are null";
+ const string c_TEST_ID = "P001";
+ char? n1 = null;
+ char? n2 = null;
+ int expectedResult = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int result = Nullable.Compare<char>(n1, n2);
+ if (expectedResult != result)
+ {
+ string errorDesc = "Return value is not " + expectedResult + " as expected: Actual(" + result + ")";
+ errorDesc += " when n1 and n2 are null ";
+ TestLibrary.TestFramework.LogError("001 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e+"\n n1 and n2 are null");
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Verify n1 is null and n2 has value";
+ const string c_TEST_ID = "P002";
+ int? n1 = null;
+ int? n2 = TestLibrary.Generator.GetInt32(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int result = Nullable.Compare<int>(n1, n2);
+ if (result>= 0)
+ {
+ string errorDesc = "Return value is less than zero as expected: Actual(" + result + ")";
+ errorDesc += " \n n1 is null ";
+ errorDesc += "\n n2 is " + n2;
+ TestLibrary.TestFramework.LogError("003 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e + "\n n1 is null and n2 is " + n2);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest3: Verify n1 has value and n2 is null";
+ const string c_TEST_ID = "P003";
+ int? n1 = TestLibrary.Generator.GetInt32(-55);
+ int? n2 = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int result = Nullable.Compare<int>(n1, n2);
+ if (result <= 0)
+ {
+ string errorDesc = "Return value is less than zero as expected: Actual(" + result + ")";
+ errorDesc += " \n n1 is "+ n1;
+ errorDesc += "\n n2 is null";
+ TestLibrary.TestFramework.LogError("005 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e + "\n n1 is "+ n1+" and n2 is null");
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest4: Verify n1 and n2 are euqal";
+ const string c_TEST_ID = "P004";
+ char? n1 = TestLibrary.Generator.GetChar(-55);
+ char? n2 = n1;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int result = Nullable.Compare<char>(n1, n2);
+ if (result != 0)
+ {
+ string errorDesc = "Return value is not zero as expected: Actual(" + result + ")";
+ errorDesc += " \n n1 is " + n1;
+ errorDesc += "\n n2 is " + n2 ;
+ TestLibrary.TestFramework.LogError("007 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e + "\n n1 is " + n1 + " and n2 is "+n2);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest5: Verify n1 less than n2";
+ const string c_TEST_ID = "P005";
+ Random rand = new Random(-55);
+ int? n1 =rand.Next(Int32.MinValue,Int32.MaxValue) ;
+ int? n2 = n1+1;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int result = Nullable.Compare<int>(n1, n2);
+ if (result >= 0)
+ {
+ string errorDesc = "Return value is not less than zero as expected: Actual(" + result + ")";
+ errorDesc += " \n n1 is " + n1;
+ errorDesc += "\n n2 is " + n2;
+ TestLibrary.TestFramework.LogError("009 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e + "\n n1 is " + n1 + " and n2 is " + n2);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest6: Verify n1 greater than n2";
+ const string c_TEST_ID = "P006";
+ Random rand = new Random(-55);
+ int? n1 = rand.Next(Int32.MinValue+1, Int32.MaxValue);
+ int? n2 = n1 - 1;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int result = Nullable.Compare<int>(n1, n2);
+ if (result <= 0)
+ {
+ string errorDesc = "Return value is not greater than zero as expected: Actual(" + result + ")";
+ errorDesc += " \n n1 is " + n1;
+ errorDesc += "\n n2 is " + n2;
+ TestLibrary.TestFramework.LogError("011 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e + "\n n1 is " + n1 + " and n2 is " + n2);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ NullableCompare test = new NullableCompare();
+
+ TestLibrary.TestFramework.BeginTestCase("Nullable.Compare<T>(Nullable<T>,Nullable<T>)");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/nullable/nullablector.cs b/tests/src/CoreMangLib/cti/system/nullable/nullablector.cs
new file mode 100644
index 0000000000..9dd5cc03a9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullable/nullablector.cs
@@ -0,0 +1,128 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Nullable<T>.Ctor(T)[v-juwa]
+/// </summary>
+public class NullableCtor
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Verify the value parameter is int";
+ const string c_TEST_ID = "P001";
+
+ int value = TestLibrary.Generator.GetInt32(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ int? nullObj = new Nullable<int>(value);
+
+ if (!nullObj.HasValue)
+ {
+ string errorDesc = "HasValue is true as expected: Actual(false)";
+ errorDesc += "\n value parameter is "+value;
+ TestLibrary.TestFramework.LogError("001 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (nullObj.Value != value)
+ {
+ string errorDesc = "Value is "+value+" as expected: Actual("+nullObj.Value+")";
+ errorDesc += "\n value parameter is " + value;
+ TestLibrary.TestFramework.LogError("002 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e+"\n value parameter is "+value);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Verify the value parameter is char";
+ const string c_TEST_ID = "P002";
+
+ char value = TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ char? nullObj = new Nullable<char>(value);
+
+ if (!nullObj.HasValue)
+ {
+ string errorDesc = "HasValue is true as expected: Actual(false)";
+ errorDesc += "\n value parameter is " + value;
+ TestLibrary.TestFramework.LogError("004 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (nullObj.Value != value)
+ {
+ string errorDesc = "Value is " + value + " as expected: Actual(" + nullObj.Value + ")";
+ errorDesc += "\n value parameter is " + value;
+ TestLibrary.TestFramework.LogError("005 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e + "\n value parameter is " + value);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ NullableCtor test = new NullableCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("For Method:System.Nullable<T>.Ctor(T)");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/nullable/nullableequals.cs b/tests/src/CoreMangLib/cti/system/nullable/nullableequals.cs
new file mode 100644
index 0000000000..730725ea57
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullable/nullableequals.cs
@@ -0,0 +1,173 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Nullable.Equals<T>(Nullable<T>,Nullable<T>)[v-juwa]
+/// </summary>
+public class NullableEquals
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Verify two Nullable<T> objects are null";
+ const string c_TEST_ID = "P001";
+ char? n1 = null;
+ char? n2 = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (!Nullable.Equals<char>(n1, n2))
+ {
+ string errorDesc = "Return value is true as expected: Actual(false)";
+ errorDesc += " when n1 and n2 are null ";
+ TestLibrary.TestFramework.LogError("001 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e + "\n n1 and n2 are null");
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Verify n1 is null and n2 is not null";
+ const string c_TEST_ID = "P002";
+ char? n1 = null;
+ char? n2 = TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (Nullable.Equals<char>(n1, n2))
+ {
+ string errorDesc = "Return value is false as expected: Actual(true)";
+ errorDesc += " when n1 is null and n2 is " + n2;
+ TestLibrary.TestFramework.LogError("003 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e + "\n n1 is null and n2 is " + n2);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest3: Verify n1 and n2 are eaual";
+ const string c_TEST_ID = "P003";
+ int? n1 = TestLibrary.Generator.GetInt32(-55);
+ int? n2 = n1;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (!Nullable.Equals<int>(n1, n2))
+ {
+ string errorDesc = "Return value is true as expected: Actual(false)";
+ errorDesc += " when n1 is " + n1 + " and n2 is " + n2;
+ TestLibrary.TestFramework.LogError("005 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e + "\n n1 is " + n1 + " and n2 is " + n2);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest4: Verify n1 and n2 are not eaual";
+ const string c_TEST_ID = "P004";
+ Random rand = new Random(-55);
+ int? n1 = rand.Next(Int32.MinValue, Int32.MaxValue);
+ int? n2 = n1 + 1;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (Nullable.Equals<int>(n1, n2))
+ {
+ string errorDesc = "Return value is false as expected: Actual(true)";
+ errorDesc += " when n1 is " + n1 + " and n2 is " + n2;
+ TestLibrary.TestFramework.LogError("007 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e + "\n n1 is " + n1 + " and n2 is " + n2);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ NullableEquals test = new NullableEquals();
+
+ TestLibrary.TestFramework.BeginTestCase("For method: System.Nullable.Equals<T>(Nullable<T>,Nullable<T>)");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/nullable/nullableequals2.cs b/tests/src/CoreMangLib/cti/system/nullable/nullableequals2.cs
new file mode 100644
index 0000000000..002e869bda
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullable/nullableequals2.cs
@@ -0,0 +1,243 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Nullable<T>.Equals(Object)[v-juwa]
+/// </summary>
+public class NullableEquals
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify the Nullable object's value equals the parameter";
+ const string c_TEST_ID = "P001";
+
+ int value = TestLibrary.Generator.GetInt32(-55);
+ int? nullObj = new Nullable<int>(value);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (!nullObj.Equals((object)value))
+ {
+ string errorDesc = "result is true as expected: Actual(false)";
+ errorDesc += "\n parameter value is " + value;
+ TestLibrary.TestFramework.LogError("001 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e+"parameter value is "+ value);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Verify the Nullable object's value doesn't equal the parameter";
+ const string c_TEST_ID = "P002";
+
+ Random rand = new Random(-55);
+ int value = rand.Next(Int32.MinValue,Int32.MaxValue);
+ int? nullObj = new Nullable<int>(value+1);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (nullObj.Equals((object)value))
+ {
+ string errorDesc = "result is false as expected: Actual(true)";
+ errorDesc += "\n parameter value is " + value;
+ errorDesc += "\n Nullable object's value is " + nullObj.Value;
+ TestLibrary.TestFramework.LogError("003 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e + "\n parameter value is " + value+"\n Nullable object's value is "+nullObj.Value);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: Verify the Nullable's hasValue is false";
+ const string c_TEST_ID = "P003";
+
+ int value = TestLibrary.Generator.GetInt32(-55);
+ int? nullObj = new Nullable<int>();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (nullObj.Equals((object)value))
+ {
+ string errorDesc = "result is false as expected: Actual(true)";
+ errorDesc += "\n parameter value is " + value;
+ errorDesc += "\n Nullable object's HasValue is false";
+ TestLibrary.TestFramework.LogError("005 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e + "\n parameter value is " + value + "\n Nullable object's HasValue is false");
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest4: Verify the Nullable's hasValue is true and parameter is null";
+ const string c_TEST_ID = "P004";
+
+ int value = TestLibrary.Generator.GetInt32(-55);
+ int? nullObj = new Nullable<int>(value);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (nullObj.Equals(null))
+ {
+ string errorDesc = "result is false as expected: Actual(true)";
+ errorDesc += "\n parameter is null";
+ errorDesc += "\n Nullable object's value is "+nullObj.Value;
+ TestLibrary.TestFramework.LogError("007 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e + "\n parameter value is " + value + "\n Nullable object's HasValue is false");
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest5: Verify the Nullable's hasValue is false and parameter is null";
+ const string c_TEST_ID = "P005";
+
+ object value = null;
+ int? nullObj = new Nullable<int>();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (!nullObj.Equals(value))
+ {
+ string errorDesc = "result is true as expected: Actual(fasle)";
+ errorDesc += "\n parameter value is null";
+ errorDesc += "\n Nullable object's HasValue is false";
+ TestLibrary.TestFramework.LogError("009 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e + "\n parameter value is null \n Nullable object's HasValue is false");
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest6: Verify the Nullable's type is int and parameter is string";
+ const string c_TEST_ID = "P006";
+
+ object value = TestLibrary.Generator.GetString(-55, false,1,10);
+ int i = TestLibrary.Generator.GetInt32(-55);
+ int? nullObj = new Nullable<int>(i);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (nullObj.Equals(value))
+ {
+ string errorDesc = "result is true as expected: Actual(fasle)";
+ errorDesc += "\n parameter value is "+value.ToString();
+ errorDesc += "\n Nullable object's value is "+ i;
+ TestLibrary.TestFramework.LogError("009 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e + "\n parameter value is "+value.ToString()+" \n Nullable object's value is "+i);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ NullableEquals test = new NullableEquals();
+
+ TestLibrary.TestFramework.BeginTestCase("For method:System.Nullable<T>.Equals(Object)");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/nullable/nullablegethashcode.cs b/tests/src/CoreMangLib/cti/system/nullable/nullablegethashcode.cs
new file mode 100644
index 0000000000..c37b04acdc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullable/nullablegethashcode.cs
@@ -0,0 +1,140 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Nullable<T>.GetHashCode()[v-juwa]
+/// </summary>
+public class NullableGetHashCode
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify the Nullable<T> type is int";
+ const string c_TEST_ID = "P001";
+
+ int value = TestLibrary.Generator.GetInt32(-55);
+ int? nullObj = new Nullable<int>(value);
+ int expectedValue = value.GetHashCode();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (nullObj.GetHashCode() != expectedValue)
+ {
+ string errorDesc = "HashCod is not "+expectedValue+" as expected: Actual("+nullObj.GetHashCode()+")";
+ errorDesc += "\n value is " + value;
+ TestLibrary.TestFramework.LogError("001 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001" + "TestID_" + c_TEST_ID, "Unexpected exception: " + e + "\n value is " + value);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Verify the Nullable<T> type is char";
+ const string c_TEST_ID = "P002";
+
+ char value = TestLibrary.Generator.GetChar(-55);
+ char? nullObj = new Nullable<char>(value);
+ int expectedValue = value.GetHashCode();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (nullObj.GetHashCode() != expectedValue)
+ {
+ string errorDesc = "HashCod is not " + expectedValue + " as expected: Actual(" + nullObj.GetHashCode() + ")";
+ errorDesc += "\n value is " + value;
+ TestLibrary.TestFramework.LogError("003 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004 ", "Unexpected exception: " + e + "\n value is " + value);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: Verify the Nullable<T> object's HasValue is false";
+ const string c_TEST_ID = "P003";
+
+ char? nullObj = new Nullable<char>();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (nullObj.GetHashCode() != 0)
+ {
+ string errorDesc = "HashCod is not 0 as expected: Actual(" + nullObj.GetHashCode() + ")";
+ TestLibrary.TestFramework.LogError("005 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006 ", "Unexpected exception: " + e );
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ NullableGetHashCode test = new NullableGetHashCode();
+
+ TestLibrary.TestFramework.BeginTestCase("For method:System.Nullable<T>.GetHashCode()");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/nullable/nullablegetunderlyingtype.cs b/tests/src/CoreMangLib/cti/system/nullable/nullablegetunderlyingtype.cs
new file mode 100644
index 0000000000..b623d648bd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullable/nullablegetunderlyingtype.cs
@@ -0,0 +1,144 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Nullable.GetUnderlyingType(System.Type)[v-juwa]
+/// </summary>
+public class NullableGetUnderlyingType
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Verify the Type is Nullable<int>";
+ const string c_TEST_ID = "P001";
+ Type type = typeof(Nullable<int>);
+ Type expectedType = typeof(int);
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Type result = Nullable.GetUnderlyingType(type);
+ if (!Type.Equals(result,expectedType))
+ {
+ string errorDesc = "Return value is " + expectedType.ToString() + " as expected: Actual(" + result.ToString() + ")";
+ errorDesc += " when type is " + type.ToString();
+ TestLibrary.TestFramework.LogError("001 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e + "\n Type is Nullable<int>");
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Verify the Type is int";
+ const string c_TEST_ID = "P002";
+ Type type = typeof(int);
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Type result = Nullable.GetUnderlyingType(type);
+ if (result != null)
+ {
+ string errorDesc = "Return value is null as expected: Actual(" + result.ToString() + ")";
+ errorDesc += " when type is " + type.ToString();
+ TestLibrary.TestFramework.LogError("003 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e + "\n Type is int");
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: type is a null reference";
+ const string c_TEST_ID = "N001";
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ Nullable.GetUnderlyingType(null);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, "ArgumentNullException is not thrown ");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NullableGetUnderlyingType test = new NullableGetUnderlyingType();
+
+ TestLibrary.TestFramework.BeginTestCase("For Method:System.Nullable.GetUnderlyingType(System.Type)");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/nullable/nullablegetvalueordefault1.cs b/tests/src/CoreMangLib/cti/system/nullable/nullablegetvalueordefault1.cs
new file mode 100644
index 0000000000..17e1a0491e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullable/nullablegetvalueordefault1.cs
@@ -0,0 +1,107 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Nullable<T>.GetValueOrDefault()[v-juwa]
+/// </summary>
+public class NullableGetValueOrDefault1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Verify the Nullable object's HasValue is true";
+ const string c_TEST_ID = "P001";
+
+ int value = TestLibrary.Generator.GetInt32(-55);
+ int? nullObj = new Nullable<int>(value);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (nullObj.GetValueOrDefault() != value)
+ {
+ string errorDesc = "value is not " + value + " as expected: Actual(" + nullObj.GetValueOrDefault() + ")";
+ TestLibrary.TestFramework.LogError("001 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e + "\n value is " + value);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTes2: Verify the Nullable object's HasValue is false";
+ const string c_TEST_ID = "P002";
+
+ int? nullObj = new Nullable<int>();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (nullObj.GetValueOrDefault() != 0)
+ {
+ string errorDesc = "value is not 0 as expected: Actual(" + nullObj.GetValueOrDefault() + ")";
+ TestLibrary.TestFramework.LogError("003 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ NullableGetValueOrDefault1 test = new NullableGetValueOrDefault1();
+
+ TestLibrary.TestFramework.BeginTestCase("For method :System.Nullable<T>.GetValueOrDefault()");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/nullable/nullablegetvalueordefault2.cs b/tests/src/CoreMangLib/cti/system/nullable/nullablegetvalueordefault2.cs
new file mode 100644
index 0000000000..1599082f57
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullable/nullablegetvalueordefault2.cs
@@ -0,0 +1,112 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Nullable<T>.GetValueOrDefault(T) [v-juwa]
+/// </summary>
+public class NullableGetValueOrDefault2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Verify the Nullable object's HasValue is true";
+ const string c_TEST_ID = "P001";
+
+ int value = TestLibrary.Generator.GetInt32(-55);
+ int? nullObj = new Nullable<int>(value);
+ int defaultValue = TestLibrary.Generator.GetInt32(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (nullObj.GetValueOrDefault(defaultValue) != value)
+ {
+ string errorDesc = "value is not " + value + " as expected: Actual(" + nullObj.GetValueOrDefault(defaultValue) + ")";
+ errorDesc += "\n defaultVaue is " + defaultValue;
+ TestLibrary.TestFramework.LogError("001 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e + "\n value is " + value +"\n default value is "+defaultValue);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Verify the Nullable object's HasValue is false";
+ const string c_TEST_ID = "P002";
+
+ int? nullObj = new Nullable<int>();
+ int defaultValue = TestLibrary.Generator.GetInt32(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (nullObj.GetValueOrDefault(defaultValue) != defaultValue)
+ {
+ string errorDesc = "value is not " + defaultValue + " as expected: Actual(" + nullObj.GetValueOrDefault(defaultValue) + ")";
+ errorDesc += "\n defaultVaue is " + defaultValue;
+ TestLibrary.TestFramework.LogError("003 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e + "\n default value is " + defaultValue);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ NullableGetValueOrDefault2 test = new NullableGetValueOrDefault2();
+
+ TestLibrary.TestFramework.BeginTestCase("For method:System.Nullable<T>.GetValueOrDefault(T)");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/nullable/nullablehasvalue.cs b/tests/src/CoreMangLib/cti/system/nullable/nullablehasvalue.cs
new file mode 100644
index 0000000000..93962fbc65
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullable/nullablehasvalue.cs
@@ -0,0 +1,108 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Nullable<T>.HasValue[v-juwa]
+/// </summary>
+public class NullableHasValue
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Verify the Nullable object's HasValue is true";
+ const string c_TEST_ID = "P001";
+
+ int value = TestLibrary.Generator.GetInt32(-55);
+ int? nullObj = new Nullable<int>(value);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (!nullObj.HasValue)
+ {
+ string errorDesc = "value is not true as expected: Actual(false)";
+ errorDesc += "\n value is " + value;
+ TestLibrary.TestFramework.LogError("001 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e + "\n value is " + value);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Verify the Nullable object's HasValue is false";
+ const string c_TEST_ID = "P002";
+
+ int? nullObj = new Nullable<int>();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (nullObj.HasValue)
+ {
+ string errorDesc = "value is not false as expected: Actual(true)";
+ TestLibrary.TestFramework.LogError("003 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e );
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ NullableHasValue test = new NullableHasValue();
+
+ TestLibrary.TestFramework.BeginTestCase("For property:System.Nullable<T>.HasValue");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/nullable/nullabletostring.cs b/tests/src/CoreMangLib/cti/system/nullable/nullabletostring.cs
new file mode 100644
index 0000000000..c44d7959a0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullable/nullabletostring.cs
@@ -0,0 +1,136 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Nullable<T>.ToString()[v-juwa]
+/// </summary>
+public class NullableToString
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify the Nullable object's HasValue is true";
+ const string c_TEST_ID = "P001";
+
+ int value = TestLibrary.Generator.GetInt32(-55);
+ int? nullObj = new Nullable<int>(value);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (nullObj.ToString() != value.ToString())
+ {
+ string errorDesc = "value is not " + value.ToString() + " as expected: Actual(" + nullObj.ToString() + ")";
+ TestLibrary.TestFramework.LogError("001 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e + "\n value is " + value);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: Verify the Nullable type is char";
+ const string c_TEST_ID = "P002";
+
+ char value = TestLibrary.Generator.GetChar(-55);
+ char? nullObj = new Nullable<char>(value);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (nullObj.ToString() != value.ToString())
+ {
+ string errorDesc = "value is not " + value.ToString() + " as expected: Actual(" + nullObj.ToString() + ")";
+ TestLibrary.TestFramework.LogError("003 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e + "\n value is " + value);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: Verify the Nullable object's HasValue is false";
+ const string c_TEST_ID = "P003";
+
+ int? nullObj = new Nullable<int>();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (nullObj.ToString() != "")
+ {
+ string errorDesc = "value is not empty as expected: Actual(" + nullObj.ToString() + ")";
+ TestLibrary.TestFramework.LogError("005 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e );
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ NullableToString test = new NullableToString();
+
+ TestLibrary.TestFramework.BeginTestCase("For Method:System.Nullable<T>.ToString()");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/nullable/nullablevalue.cs b/tests/src/CoreMangLib/cti/system/nullable/nullablevalue.cs
new file mode 100644
index 0000000000..3852401829
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullable/nullablevalue.cs
@@ -0,0 +1,142 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Nullable<T>.Value[v-juwa]
+/// </summary>
+public class NullableValue
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Verify the Nullable Type is int";
+ const string c_TEST_ID = "P001";
+
+ int value = TestLibrary.Generator.GetInt32(-55);
+ int? nullObj = new Nullable<int>(value);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (nullObj.Value != value)
+ {
+ string errorDesc = "value is not "+ value+" as expected: Actual("+nullObj.Value+")";
+ errorDesc += "\n value is " + value;
+ TestLibrary.TestFramework.LogError("001 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e + "\n value is " + value);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Verify the Nullable Type is char";
+ const string c_TEST_ID = "P002";
+
+ char value = TestLibrary.Generator.GetChar(-55);
+ char? nullObj = new Nullable<char>(value);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (nullObj.Value != value)
+ {
+ string errorDesc = "value is not " + value + " as expected: Actual(" + nullObj.Value + ")";
+ errorDesc += "\n value is " + value;
+ TestLibrary.TestFramework.LogError("003 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e + "\n value is " + value);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: the Nullable object's HasValue is true";
+ const string c_TEST_ID = "N001";
+
+ char? nullObj = new Nullable<char>();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ char value = nullObj.Value;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, "InvalidOperationException is not thrown ");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NullableValue test = new NullableValue();
+
+ TestLibrary.TestFramework.BeginTestCase("For property:System.Nullable<T>.Value");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/nullreferenceexception/NullReferenceExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/nullreferenceexception/NullReferenceExceptionCtor1.csproj
new file mode 100644
index 0000000000..5a0f4da28d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullreferenceexception/NullReferenceExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="nullreferenceexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/nullreferenceexception/nullreferenceexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/nullreferenceexception/nullreferenceexceptionctor1.cs
new file mode 100644
index 0000000000..ad73c6f556
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/nullreferenceexception/nullreferenceexceptionctor1.cs
@@ -0,0 +1,137 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.NullReferenceException.Ctor()[v-juwa]
+/// </summary>
+public class NullReferenceExceptionCtor1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Verify create the exception object is not null";
+ const string c_TEST_ID = "P001";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ NullReferenceException exception = new NullReferenceException();
+ if (exception == null)
+ {
+ string errorDesc = "created exception should not be null";
+ TestLibrary.TestFramework.LogError("001 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Verify createed exception object's InnerException is not null";
+ const string c_TEST_ID = "P002";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ NullReferenceException exception = new NullReferenceException();
+ if (exception.InnerException != null)
+ {
+ string errorDesc = "created exception's InnerException should be null";
+ TestLibrary.TestFramework.LogError("003 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest3: Verify create the exception object's Message is localized error message";
+ const string c_TEST_ID = "P003";
+
+ string message = "Object reference not set to an instance of an object.";
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ NullReferenceException exception = new NullReferenceException();
+ if ((exception.Message != message) &
+ (!exception.Message.Contains("[Arg_NullReferenceException]")))
+ {
+ string errorDesc = "Message is not \""+message+"\" as expected :Actual(\""+exception.Message+"\")";
+ TestLibrary.TestFramework.LogError("005 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ NullReferenceExceptionCtor1 test = new NullReferenceExceptionCtor1();
+
+ TestLibrary.TestFramework.BeginTestCase("For Method:System.NullReferenceException.Ctor()");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/object/ObjectCtor.csproj b/tests/src/CoreMangLib/cti/system/object/ObjectCtor.csproj
new file mode 100644
index 0000000000..39b1ab0230
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/object/ObjectCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="objectctor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/object/ObjectEquals1.csproj b/tests/src/CoreMangLib/cti/system/object/ObjectEquals1.csproj
new file mode 100644
index 0000000000..6ab0c74a45
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/object/ObjectEquals1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="objectequals1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/object/ObjectEquals2.csproj b/tests/src/CoreMangLib/cti/system/object/ObjectEquals2.csproj
new file mode 100644
index 0000000000..8feb4d225c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/object/ObjectEquals2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="objectequals2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/object/ObjectFinalize.csproj b/tests/src/CoreMangLib/cti/system/object/ObjectFinalize.csproj
new file mode 100644
index 0000000000..b5e6e5bbc0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/object/ObjectFinalize.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="objectfinalize.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/object/ObjectGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/object/ObjectGetHashCode.csproj
new file mode 100644
index 0000000000..c9dc6a6eb5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/object/ObjectGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="objectgethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/object/ObjectMemberwiseClone.csproj b/tests/src/CoreMangLib/cti/system/object/ObjectMemberwiseClone.csproj
new file mode 100644
index 0000000000..0720d4bf3d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/object/ObjectMemberwiseClone.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="objectmemberwiseclone.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/object/ObjectReferenceEquals.csproj b/tests/src/CoreMangLib/cti/system/object/ObjectReferenceEquals.csproj
new file mode 100644
index 0000000000..31b5e02b19
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/object/ObjectReferenceEquals.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="objectreferenceequals.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/object/ObjectToString.csproj b/tests/src/CoreMangLib/cti/system/object/ObjectToString.csproj
new file mode 100644
index 0000000000..ae45c27574
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/object/ObjectToString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="objecttostring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/object/objectctor.cs b/tests/src/CoreMangLib/cti/system/object/objectctor.cs
new file mode 100644
index 0000000000..47aa76246a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/object/objectctor.cs
@@ -0,0 +1,95 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class ObjectCtor
+{
+ #region Public Method
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Create a new Object instance");
+
+ try
+ {
+ Object obj = new Object();
+
+ if (null == obj)
+ {
+ TestLibrary.TestFramework.LogError("001", "Failed to instance a Object type");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Create two Object instances, make sure CLR does not use the memory occuppied by the first one to alloc the second one");
+
+ try
+ {
+ Object obj1 = new Object();
+ Object obj2 = new Object();
+
+ if (Object.ReferenceEquals(obj1, obj2))
+ {
+ TestLibrary.TestFramework.LogError("003", "CLR uses the memory occuppied by the first one to alloc the second one");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ObjectCtor oc = new ObjectCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("ObjectCtor");
+
+ if (oc.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/object/objectequals1.cs b/tests/src/CoreMangLib/cti/system/object/objectequals1.cs
new file mode 100644
index 0000000000..693a0c8e13
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/object/objectequals1.cs
@@ -0,0 +1,489 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class ObjectEquals1
+{
+ #region Private Constaints
+ private const int c_MIN_STRING_LENGTH = 0;
+ private const int c_MAX_STRING_LENGTH = 256;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+ retVal = PosTest12() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Compare two empty object instances");
+
+ try
+ {
+ Object obj1 = new Object();
+ Object obj2 = new Object();
+
+ if (obj1.Equals(obj2))
+ {
+ TestLibrary.TestFramework.LogError("001", "Two empty object instances are equal");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Boxed value type");
+
+ try
+ {
+ int i = TestLibrary.Generator.GetInt32(-55);
+ Object obj = i;
+
+ if (!obj.Equals(i))
+ {
+ TestLibrary.TestFramework.LogError("003", "Boxed type is not equal with the underlying value type");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Compare two object reference");
+
+ try
+ {
+ Object obj1 = new Object();
+ Object obj2 = obj1;
+
+ if (!obj1.Equals(obj2))
+ {
+ TestLibrary.TestFramework.LogError("005", "Compare two object reference failed");
+ retVal = false;
+ }
+
+ // Also make sure this case is true
+ if (!obj2.Equals(obj1))
+ {
+ TestLibrary.TestFramework.LogError("006", "Compare two object reference failed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Compare an object with itself");
+
+ try
+ {
+ Object obj = new Object();
+
+ if (!obj.Equals(obj))
+ {
+ TestLibrary.TestFramework.LogError("008", "An object does not equal with itself");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Compare two NaN instances");
+
+ try
+ {
+ Object obj1 = Double.NaN;
+ Object obj2 = Double.NaN;
+
+ if (!obj1.Equals(Double.NaN))
+ {
+ TestLibrary.TestFramework.LogError("010", "An object initialized with Double.NaN does not equal with Double.NaN");
+ retVal = false;
+ }
+
+ if (!obj1.Equals(obj2))
+ {
+ TestLibrary.TestFramework.LogError("011", "Two objects initialized with Double.NaN do not equal");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Successive calls to Equals return the same value for reference types");
+
+ try
+ {
+ Object obj1 = new Object();
+ Object obj2 = new Object();
+
+ if (obj1.Equals(obj2) || obj1.Equals(obj2) )
+ {
+ TestLibrary.TestFramework.LogError("013", "Successive calls to Equals do not return the same value");
+ retVal = false;
+ }
+
+ Object obj3 = TestLibrary.Generator.GetString(-55,
+ false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ // use !! instead of || to make sure the statement obj1.Equals(obj3) is evaluated twice
+ if ( !( !obj1.Equals(obj3) && !obj1.Equals(obj3)) )
+ {
+ TestLibrary.TestFramework.LogError("014", "Successive calls to Equals do not return the same value");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("015", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Successive calls to Equals return the same value for value types");
+
+ try
+ {
+ int i = TestLibrary.Generator.GetInt32(-55);
+ Object obj = i;
+
+ if (!obj.Equals(i) && obj.Equals(i))
+ {
+ TestLibrary.TestFramework.LogError("016", "Successive calls to Equals for value types do not return the same value");
+ retVal = false;
+ }
+
+ i++;
+ // use !! instead of || to make sure the statement obj.Equals(i) is evaluated twice
+ if (!(!obj.Equals(i) && !obj.Equals(i)))
+ {
+ TestLibrary.TestFramework.LogError("017", "Successive calls to Equals for value types do not return the same value");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest8: Upcast an type derivered from Object and compare with it");
+
+ try
+ {
+ String str = TestLibrary.Generator.GetString(-55,
+ false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ Object obj = str;
+
+ if (!obj.Equals(str))
+ {
+ TestLibrary.TestFramework.LogError("019", "Failed to compare with an upcast type");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest9: Upcast an type derivered from Object and compare with a different reference");
+
+ try
+ {
+ String str1 = TestLibrary.Generator.GetString(-55,
+ false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ String str2 = TestLibrary.Generator.GetString(-55,
+ false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+
+ // Make sure the two strings are different
+ if (str1.Length == str2.Length)
+ {
+ str1 += TestLibrary.Generator.GetCharLetter(-55);
+ }
+
+ Object obj1 = str1;
+ Object obj2 = str2;
+
+ if (obj1.Equals(obj2))
+ {
+ TestLibrary.TestFramework.LogError("021", "Upcast an type derivered from Object and compare with a different reference returns true");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("022", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest10()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest10: Compare two different value type");
+
+ try
+ {
+ int i1 = TestLibrary.Generator.GetInt32(-55);
+ int i2 = i1;
+
+ // Generate a different value type
+ while (i1 == i2)
+ {
+ i2 = TestLibrary.Generator.GetInt32(-55);
+ }
+
+ Object obj1 = i1;
+ Object obj2 = i2;
+
+ if (obj1.Equals(obj2))
+ {
+ TestLibrary.TestFramework.LogError("023", "Compare two different value type returns true");
+ retVal = false;
+ }
+
+ // Compare different type of value type
+ double d1 = TestLibrary.Generator.GetDouble(-55);
+ Object obj3 = d1;
+
+ if (obj1.Equals(d1))
+ {
+ TestLibrary.TestFramework.LogError("024", "Compare two different value type returns true");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("025", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest11()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest11: Compare an object instance with an array which contains the instance");
+
+ try
+ {
+ Object obj1 = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ Object[] array = new Object[] {
+ obj1
+ };
+ Object obj2 = array; // Upcast the array instance to an Object
+
+ if (obj1.Equals(obj2))
+ {
+ TestLibrary.TestFramework.LogError("026", "Compare an object instance with an array which contains the instance returns true");
+ retVal = false;
+ }
+
+ if (obj2.Equals(obj1))
+ {
+ TestLibrary.TestFramework.LogError("027", "Compare an object instance with an array which contains the instance returns true");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("028", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest12()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest12: Compare an value instance with an array which contains the instance");
+
+ try
+ {
+ int i1 = TestLibrary.Generator.GetInt32(-55);
+ int[] array = new int[] { i1 };
+ Object obj1 = i1;
+ Object obj2 = array; // Upcast the array instance to an Object
+
+ if (obj1.Equals(obj2))
+ {
+ TestLibrary.TestFramework.LogError("029", "Compare an value instance with an array which contains the instance returns true");
+ retVal = false;
+ }
+
+ if (obj2.Equals(obj1))
+ {
+ TestLibrary.TestFramework.LogError("030", "Compare an value instance with an array which contains the instance returns true");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("031", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Compare an object instance with null reference");
+
+ try
+ {
+ Object obj = new Object();
+
+ if (obj.Equals(null))
+ {
+ TestLibrary.TestFramework.LogError("101", "an object instance is equal with null reference");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ObjectEquals1 test = new ObjectEquals1();
+
+ TestLibrary.TestFramework.BeginTestCase("ObjectEquals1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/object/objectequals2.cs b/tests/src/CoreMangLib/cti/system/object/objectequals2.cs
new file mode 100644
index 0000000000..de9bacce4f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/object/objectequals2.cs
@@ -0,0 +1,391 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class ObjectEquals2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Compare two different object instances");
+
+ try
+ {
+ Object obj1 = new Object();
+ Object obj2 = new Object();
+
+ if (Object.Equals(obj1, obj2))
+ {
+ TestLibrary.TestFramework.LogError("001", "Object.Equals returns true when comparing two different object instances");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Compare two same object references");
+
+ try
+ {
+ Object obj1 = new Object();
+ Object obj2 = obj1;
+
+ if (!Object.Equals(obj1, obj2))
+ {
+ TestLibrary.TestFramework.LogError("003", "Object.Equals returns false when comparing two same object references");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Compare two same value type");
+
+ try
+ {
+ int i1 = TestLibrary.Generator.GetInt32(-55);
+ int i2 = i1;
+
+ Object obj1 = i1;
+ Object obj2 = i2;
+
+ if (!Object.Equals(obj1, obj2))
+ {
+ TestLibrary.TestFramework.LogError("005", "Object.Equals returns false when comparing two same value type");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Compare two different instance of same value type");
+
+ try
+ {
+ int i1 = TestLibrary.Generator.GetInt32(-55);
+ int i2 = i1;
+
+ // Generate a different value type
+ while (i1 == i2)
+ {
+ i2 = TestLibrary.Generator.GetInt32(-55);
+ }
+
+ Object obj1 = i1;
+ Object obj2 = i2;
+
+ if (Object.Equals(obj1, obj2))
+ {
+ TestLibrary.TestFramework.LogError("007", "Object.Equals returns true when comparing two different instance of same value type");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Compare two different instance of different value type");
+
+ try
+ {
+ int i1 = TestLibrary.Generator.GetInt32(-55);
+ double d1 = TestLibrary.Generator.GetDouble(-55);
+
+ Object obj1 = i1;
+ Object obj2 = d1;
+
+ if (Object.Equals(obj1, obj2))
+ {
+ TestLibrary.TestFramework.LogError("009", "Object.Equals returns true when comparing two different instance of different value type");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Compare two same instances of different value type");
+
+ try
+ {
+ int i1 = TestLibrary.Generator.GetInt32(-55);
+ double d1 = (double)i1;
+
+ Object obj1 = i1;
+ Object obj2 = d1;
+
+ if (Object.Equals(obj1, obj2))
+ {
+ TestLibrary.TestFramework.LogError("009", "Object.Equals returns true when comparing two same instances of different value type");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Compare an object with itself");
+
+ try
+ {
+ Object obj = new Object();
+
+ if (!Object.Equals(obj, obj))
+ {
+ TestLibrary.TestFramework.LogError("011", "An object does not equal with itself");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Compare two null references");
+
+ try
+ {
+ if (!Object.Equals(null, null))
+ {
+ TestLibrary.TestFramework.LogError("101", "Object.Equals return false when compare two null references");
+ retVal = false;
+ }
+
+ // Check successive call to Equals does not return different result
+ if (!Object.Equals(null, null))
+ {
+ TestLibrary.TestFramework.LogError("102", "Object.Equals return false when compare two null references");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Compare an object instance with null references");
+
+ try
+ {
+ Object obj1 = new Object();
+
+ if (Object.Equals(obj1, null))
+ {
+ TestLibrary.TestFramework.LogError("104", "Object.Equals return true when comparing an object instance with null references");
+ retVal = false;
+ }
+
+ // Check successive call to Equals does not return different result
+ if (Object.Equals(obj1, null))
+ {
+ TestLibrary.TestFramework.LogError("105", "Object.Equals return true when comparing an object instance with null references");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Compare null references with an object instance");
+
+ try
+ {
+ Object obj1 = new Object();
+
+ if (Object.Equals(null, obj1))
+ {
+ TestLibrary.TestFramework.LogError("107", "Object.Equals return true when comparing null references with an object instance");
+ retVal = false;
+ }
+
+ // Check successive call to Equals does not return different result
+ if (Object.Equals(null, obj1))
+ {
+ TestLibrary.TestFramework.LogError("108", "Object.Equals return true when comparing null references with an object instance");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("109", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: Compare a value instance with null reference");
+
+ try
+ {
+ Object obj1 = TestLibrary.Generator.GetInt32(-55);
+
+ if (Object.Equals(obj1, null))
+ {
+ TestLibrary.TestFramework.LogError("110", "Object.Equals return true when comparing a value instance with null reference");
+ retVal = false;
+ }
+
+ // Check successive call to Equals does not return different result
+ if (Object.Equals(obj1, null))
+ {
+ TestLibrary.TestFramework.LogError("111", "Object.Equals return true when comparing a value instance with null reference");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("112", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ObjectEquals2 test = new ObjectEquals2();
+
+ TestLibrary.TestFramework.BeginTestCase("ObjectEquals2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/object/objectfinalize.cs b/tests/src/CoreMangLib/cti/system/object/objectfinalize.cs
new file mode 100644
index 0000000000..a9668402da
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/object/objectfinalize.cs
@@ -0,0 +1,123 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.CompilerServices;
+
+public class TestObject
+{
+ #region Private Members
+ private const int c_MIN_STRING_LENGTH = 0;
+ private const int c_MAX_STRING_LENGTH = 1024;
+
+ private string m_Eat_Memory1 = null;
+ private int m_Eat_Memory2 = 0;
+ #endregion
+
+ #region Constructors
+ public TestObject()
+ {
+ m_Eat_Memory1 = TestLibrary.Generator.GetString(-55,
+ false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ m_Eat_Memory2 = TestLibrary.Generator.GetInt32(-55);
+ }
+ #endregion
+
+ #region Public Method
+ public void DoSomething()
+ {
+ int x = 4;
+ x += 5;
+ }
+ #endregion
+
+ ~TestObject()
+ {
+ ObjectFinalize.m_STATIC_VARIABLE++;
+ }
+}
+
+public class ObjectFinalize
+{
+ #region Public Static Member
+ public const int c_DEFAULT_INT_VALUE = 1;
+
+ public static volatile int m_STATIC_VARIABLE = c_DEFAULT_INT_VALUE;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Test destroying an object");
+
+ try
+ {
+ // Create an unreferenced object
+ UseTestObject();
+
+ // Force runtime to do Garbage collection
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+
+ if (ObjectFinalize.m_STATIC_VARIABLE != ObjectFinalize.c_DEFAULT_INT_VALUE + 1)
+ {
+ TestLibrary.TestFramework.LogError("001", "Call Object.Finalize failed: Execpted("+(ObjectFinalize.c_DEFAULT_INT_VALUE + 1)+") Actual("+ObjectFinalize.m_STATIC_VARIABLE+")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ObjectFinalize test = new ObjectFinalize();
+
+ TestLibrary.TestFramework.BeginTestCase("ObjectFinalize");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ [MethodImplAttribute(MethodImplOptions.NoInlining)]
+ private void UseTestObject()
+ {
+ TestObject testObject = new TestObject();
+
+ // Avoid used variable compiler warning.
+ testObject.DoSomething();
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/object/objectgethashcode.cs b/tests/src/CoreMangLib/cti/system/object/objectgethashcode.cs
new file mode 100644
index 0000000000..356f7d2eeb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/object/objectgethashcode.cs
@@ -0,0 +1,167 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public struct Empty
+{
+}
+
+public class ObjectGetHashCode
+{
+ #region Private Variables
+ private string m_String = null;
+ private int m_Int32 = 0;
+ #endregion
+
+ #region Private Constaints
+ private const int c_MIN_STRING_LENGTH = 1;
+ private const int c_MAX_STRING_LENGHT = 1024;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Hash code for two objects with same type and same value should be equal");
+
+ try
+ {
+ ObjectGetHashCode obj1 = new ObjectGetHashCode();
+ ObjectGetHashCode obj2 = new ObjectGetHashCode();
+
+ if (obj1.GetHashCode() == obj2.GetHashCode())
+ {
+ TestLibrary.TestFramework.LogError("001", "Hash code for two objects with same type and same value are not equal");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Hash function must return exactly the same value regardless of any changes that are made to the object");
+
+ try
+ {
+ // Hack: Implement of ObjectGetHashCode.GetHashCode is inheritted from Object
+ String str1 = TestLibrary.Generator.GetString(-55,
+ false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGHT);
+ ObjectGetHashCode oghc = new ObjectGetHashCode();
+ oghc.m_String = str1;
+ int hashCode1 = oghc.GetHashCode();
+
+ String str2 = TestLibrary.Generator.GetString(-55,
+ false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGHT);
+
+ if (str1.Length == str2.Length)
+ {
+ str2 += TestLibrary.Generator.GetChar(-55);
+ }
+
+ oghc.m_String = str2;
+ int hashCode2 = oghc.GetHashCode();
+
+ if (hashCode1 != hashCode2)
+ {
+ TestLibrary.TestFramework.LogError("003", "Hash function does not return exactly the same value regardless of any changes that are made to the object");
+ retVal = false;
+ }
+
+ // Change value type field should not change the hash code
+ oghc.m_Int32 = TestLibrary.Generator.GetInt32(-55);
+ hashCode2 = oghc.GetHashCode();
+
+ if (hashCode1 != hashCode2)
+ {
+ TestLibrary.TestFramework.LogError("004", "Hash function does not return exactly the same value regardless of any changes that are made to the object");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Get hash code for an empty struct");
+
+ try
+ {
+ Empty test = new Empty();
+ Empty test1 = new Empty();
+
+ if (test.GetHashCode() != test1.GetHashCode())
+ {
+ TestLibrary.TestFramework.LogError("101", "Hash code for two Empty struct instances does not equal");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ObjectGetHashCode test = new ObjectGetHashCode();
+
+ TestLibrary.TestFramework.BeginTestCase("ObjectGetHashCode");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/object/objectmemberwiseclone.cs b/tests/src/CoreMangLib/cti/system/object/objectmemberwiseclone.cs
new file mode 100644
index 0000000000..c4964bbac7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/object/objectmemberwiseclone.cs
@@ -0,0 +1,151 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public struct TestStruct
+{
+ public int Int32;
+ public long Long;
+ public double Double;
+ public float Float;
+}
+
+public class ObjectMemberwiseClone
+{
+ #region Private Fields
+ private string m_String = null;
+ private int m_Int32 = 0;
+ private TestStruct m_TestStruct;
+
+ private const int c_MIN_STRING_LENGTH = 0;
+ private const int c_MAX_STRING_LENGHT = 1024;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: MemberwiseClone do a bit-by-bit copy of a value type field");
+
+ try
+ {
+ ObjectMemberwiseClone omc1 = new ObjectMemberwiseClone();
+ omc1.m_Int32 = TestLibrary.Generator.GetInt32(-55);
+
+ ObjectMemberwiseClone omc2 = (ObjectMemberwiseClone)omc1.MemberwiseClone();
+ if (omc2.m_Int32 != omc1.m_Int32)
+ {
+ TestLibrary.TestFramework.LogError("001", "MemberwiseClone does not do a bit-by-bit copy of a value type field");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: MemberwiseClone copies reference for a reference type field");
+
+ try
+ {
+ ObjectMemberwiseClone omc1 = new ObjectMemberwiseClone();
+ omc1.m_String = TestLibrary.Generator.GetString(-55,
+ false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGHT);
+
+ ObjectMemberwiseClone omc2 = (ObjectMemberwiseClone)omc1.MemberwiseClone();
+ if (!Object.ReferenceEquals(omc1.m_String, omc2.m_String))
+ {
+ TestLibrary.TestFramework.LogError("003", "MemberwiseClone does not copy reference for a reference type field");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: MemberwiseClone do a bit-by-bit copy of a struct type field");
+
+ try
+ {
+ ObjectMemberwiseClone omc1 = new ObjectMemberwiseClone();
+ omc1.m_TestStruct.Int32 = TestLibrary.Generator.GetInt32(-55);
+ omc1.m_TestStruct.Long = TestLibrary.Generator.GetInt64(-55);
+ omc1.m_TestStruct.Double = TestLibrary.Generator.GetDouble(-55);
+ omc1.m_TestStruct.Float = TestLibrary.Generator.GetSingle(-55);
+
+ ObjectMemberwiseClone omc2 = (ObjectMemberwiseClone)omc1.MemberwiseClone();
+ if ((omc2.m_TestStruct.Int32 != omc1.m_TestStruct.Int32) ||
+ (omc2.m_TestStruct.Long != omc1.m_TestStruct.Long) ||
+ (omc2.m_TestStruct.Double != omc1.m_TestStruct.Double) ||
+ (omc2.m_TestStruct.Float != omc1.m_TestStruct.Float))
+ {
+ TestLibrary.TestFramework.LogError("005", "MemberwiseClone does not do a bit-by-bit copy of a value type field");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ObjectMemberwiseClone test = new ObjectMemberwiseClone();
+
+ TestLibrary.TestFramework.BeginTestCase("ObjectMemberwiseClone");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/object/objectreferenceequals.cs b/tests/src/CoreMangLib/cti/system/object/objectreferenceequals.cs
new file mode 100644
index 0000000000..e077f636b7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/object/objectreferenceequals.cs
@@ -0,0 +1,191 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class ObjectReferenceEquals
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Compare an object with itself");
+
+ try
+ {
+ Object obj = new Object();
+ if (!Object.ReferenceEquals(obj, obj))
+ {
+ TestLibrary.TestFramework.LogError("001", "ReferenceEquals returns false when comparing an object with itself");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Compare two object with same reference");
+
+ try
+ {
+ Object obj1 = new Object();
+ Object obj2 = obj1;
+ if (!Object.ReferenceEquals(obj1, obj2))
+ {
+ TestLibrary.TestFramework.LogError("003", "ReferenceEquals returns false when comparing two object with same reference");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Compare two value type instance with same value");
+
+ try
+ {
+ int i1 = TestLibrary.Generator.GetInt32(-55);
+ int i2 = i1;
+
+ while (i1 == i2)
+ {
+ i2 = TestLibrary.Generator.GetInt32(-55);
+ }
+
+ Object obj1 = i1;
+ Object obj2 = i2;
+
+ if (Object.ReferenceEquals(obj1, obj2))
+ {
+ TestLibrary.TestFramework.LogError("005", "ReferenceEquals returns true when compare two value type instance with same value");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Compare two null references");
+
+ try
+ {
+ if (!Object.ReferenceEquals(null, null))
+ {
+ TestLibrary.TestFramework.LogError("101", "Comparing two null references returns false");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Compare null reference with an object instance");
+
+ try
+ {
+ Object obj = new Object();
+ if (Object.ReferenceEquals(obj, null))
+ {
+ TestLibrary.TestFramework.LogError("103", "Compare null reference with an object instance returns true");
+ retVal = false;
+ }
+
+ // make sure this case is true
+ if (Object.ReferenceEquals(null, obj))
+ {
+ TestLibrary.TestFramework.LogError("104", "Compare null reference with an object instance returns true");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("105", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ObjectReferenceEquals test = new ObjectReferenceEquals();
+
+ TestLibrary.TestFramework.BeginTestCase("ObjectReferenceEquals");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/object/objecttostring.cs b/tests/src/CoreMangLib/cti/system/object/objecttostring.cs
new file mode 100644
index 0000000000..bf67fbced2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/object/objecttostring.cs
@@ -0,0 +1,66 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class ObjectToString
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ToString");
+
+ try
+ {
+ Object obj1 = new Object();
+ if (obj1.ToString() != "System.Object")
+ {
+ TestLibrary.TestFramework.LogError("001", "Call Object.ToString() does not return the fully qualified name of type Object");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ObjectToString test = new ObjectToString();
+
+ TestLibrary.TestFramework.BeginTestCase("ObjectToString");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/objectdisposedexception/ObjectDisposedExceptionMessage.csproj b/tests/src/CoreMangLib/cti/system/objectdisposedexception/ObjectDisposedExceptionMessage.csproj
new file mode 100644
index 0000000000..0955bfa452
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/objectdisposedexception/ObjectDisposedExceptionMessage.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="objectdisposedexceptionmessage.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/objectdisposedexception/ObjectDisposedExceptionObjectName.csproj b/tests/src/CoreMangLib/cti/system/objectdisposedexception/ObjectDisposedExceptionObjectName.csproj
new file mode 100644
index 0000000000..5e90e24d2a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/objectdisposedexception/ObjectDisposedExceptionObjectName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="objectdisposedexceptionobjectname.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/objectdisposedexception/objectdisposedexceptionmessage.cs b/tests/src/CoreMangLib/cti/system/objectdisposedexception/objectdisposedexceptionmessage.cs
new file mode 100644
index 0000000000..fa7a42d87d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/objectdisposedexception/objectdisposedexceptionmessage.cs
@@ -0,0 +1,138 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.ObjectDisposedException.Message[v-juwa]
+/// </summary>
+public class ObjectDisposedExceptionMessage
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Verify the objectName is random string";
+ const string c_TEST_ID = "P001";
+
+ string name = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ string message = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ ObjectDisposedException exception = new ObjectDisposedException(name,message);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (exception.Message != message)
+ {
+ int index = exception.Message.IndexOf(name);
+ if (index == -1)
+ {
+ string errorDesc = "Message shoule contains the object name";
+ errorDesc += Environment.NewLine + "objectName is " + name;
+ errorDesc += Environment.NewLine + "message is " + message;
+ errorDesc += Environment.NewLine + "exception's message is " + exception.Message;
+ TestLibrary.TestFramework.LogError("001 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ index = exception.Message.IndexOf(message);
+ if (index == -1)
+ {
+ string errorDesc = "Message shoule contains the message";
+ errorDesc += Environment.NewLine + "objectName is " + name;
+ errorDesc += Environment.NewLine + "message is " + message;
+ errorDesc += Environment.NewLine + "exception's message is " + exception.Message;
+ TestLibrary.TestFramework.LogError("001 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Verify the message parameter is empty";
+ const string c_TEST_ID = "P002";
+
+ string name = string.Empty;
+ string message = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ ObjectDisposedException exception = new ObjectDisposedException(name, message);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (exception.Message != "An error occurred.")
+ {
+ int index = exception.Message.IndexOf(message);
+ if (index == -1)
+ {
+ string errorDesc = "Message shoule contains the message";
+ errorDesc += Environment.NewLine + "objectName is empty";
+ errorDesc += Environment.NewLine + "message parameter" + message;
+ errorDesc += Environment.NewLine + "exception's message is " + exception.Message;
+ TestLibrary.TestFramework.LogError("003 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ ObjectDisposedExceptionMessage test = new ObjectDisposedExceptionMessage();
+
+ TestLibrary.TestFramework.BeginTestCase("For property:System.ObjectDisposedException.Message");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/objectdisposedexception/objectdisposedexceptionobjectname.cs b/tests/src/CoreMangLib/cti/system/objectdisposedexception/objectdisposedexceptionobjectname.cs
new file mode 100644
index 0000000000..3453722a77
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/objectdisposedexception/objectdisposedexceptionobjectname.cs
@@ -0,0 +1,143 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.ObjectDisposedException.ObjectName[v-juwa]
+/// </summary>
+public class ObjectDisposedExceptionObjectName
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Verify the objectName is random string";
+ const string c_TEST_ID = "P001";
+
+ string name = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ ObjectDisposedException exception = new ObjectDisposedException(name);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (exception.ObjectName != name)
+ {
+ string errorDesc = "ObjectName is not " + name + " as expected: Actual(" + exception.ObjectName+ ")";
+ TestLibrary.TestFramework.LogError("001 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + "TestID_" + c_TEST_ID, "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Verify the objectName is empty";
+ const string c_TEST_ID = "P002";
+
+ string name = String.Empty;
+ ObjectDisposedException exception = new ObjectDisposedException(name);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (exception.ObjectName != name)
+ {
+ string errorDesc = "ObjectName is not empty as expected: Actual(" + exception.ObjectName + ")";
+ TestLibrary.TestFramework.LogError("003 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest3: Verify the objectName parameter is null";
+ const string c_TEST_ID = "P003";
+
+ string name = null;
+ ObjectDisposedException exception = new ObjectDisposedException(name);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ if (exception.ObjectName != String.Empty)
+ {
+ string errorDesc = "ObjectName is not empty as expected: Actual(" + exception.ObjectName + ")";
+ TestLibrary.TestFramework.LogError("005 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ObjectDisposedExceptionObjectName test = new ObjectDisposedExceptionObjectName();
+
+ TestLibrary.TestFramework.BeginTestCase("For property:System.ObjectDisposedException.ObjectName");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/obsoleteattribute/ObsoleteAttributeCtor1.csproj b/tests/src/CoreMangLib/cti/system/obsoleteattribute/ObsoleteAttributeCtor1.csproj
new file mode 100644
index 0000000000..87e824532d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/obsoleteattribute/ObsoleteAttributeCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="obsoleteattributector1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/obsoleteattribute/ObsoleteAttributeCtor2.csproj b/tests/src/CoreMangLib/cti/system/obsoleteattribute/ObsoleteAttributeCtor2.csproj
new file mode 100644
index 0000000000..564ef034eb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/obsoleteattribute/ObsoleteAttributeCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="obsoleteattributector2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/obsoleteattribute/ObsoleteAttributeCtor3.csproj b/tests/src/CoreMangLib/cti/system/obsoleteattribute/ObsoleteAttributeCtor3.csproj
new file mode 100644
index 0000000000..a709dfd978
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/obsoleteattribute/ObsoleteAttributeCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="obsoleteattributector3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/obsoleteattribute/ObsoleteAttributeIsError.csproj b/tests/src/CoreMangLib/cti/system/obsoleteattribute/ObsoleteAttributeIsError.csproj
new file mode 100644
index 0000000000..57779274ac
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/obsoleteattribute/ObsoleteAttributeIsError.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="obsoleteattributeiserror.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/obsoleteattribute/ObsoleteAttributeMessage.csproj b/tests/src/CoreMangLib/cti/system/obsoleteattribute/ObsoleteAttributeMessage.csproj
new file mode 100644
index 0000000000..46d79eaa26
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/obsoleteattribute/ObsoleteAttributeMessage.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="obsoleteattributemessage.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/obsoleteattribute/obsoleteattributector1.cs b/tests/src/CoreMangLib/cti/system/obsoleteattribute/obsoleteattributector1.cs
new file mode 100644
index 0000000000..cf35c68d5c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/obsoleteattribute/obsoleteattributector1.cs
@@ -0,0 +1,158 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.ObsoleteAttribute.Ctor()[v-juwa]
+/// </summary>
+public class ObsoleteAttributeCtor1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Verify created the object is not null";
+ const string c_TEST_ID = "P001";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ObsoleteAttribute oa = new ObsoleteAttribute();
+ if (oa == null)
+ {
+ string errorDesc = "created ObsoleteAttribute should not be null";
+ TestLibrary.TestFramework.LogError("001 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Verify createed ObsoleteAttribute object's Message is null";
+ const string c_TEST_ID = "P002";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ObsoleteAttribute oa = new ObsoleteAttribute();
+ if (oa.Message != null)
+ {
+ string errorDesc = "created ObsoleteAttribute's Message should be null";
+ TestLibrary.TestFramework.LogError("003 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest3: Verify create the ObsoleteAttribute object's IsError property is false";
+ const string c_TEST_ID = "P003";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ObsoleteAttribute oa = new ObsoleteAttribute();
+ if (oa.IsError)
+ {
+ string errorDesc = "created ObsoleteAttribute IsError property should be false";
+ TestLibrary.TestFramework.LogError("005 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ObsoleteAttributeCtor1 test = new ObsoleteAttributeCtor1();
+
+ TestLibrary.TestFramework.BeginTestCase("For method:System.ObsoleteAttribute.Ctor()");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/obsoleteattribute/obsoleteattributector2.cs b/tests/src/CoreMangLib/cti/system/obsoleteattribute/obsoleteattributector2.cs
new file mode 100644
index 0000000000..4706a73da2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/obsoleteattribute/obsoleteattributector2.cs
@@ -0,0 +1,161 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.ObsoleteAttribute.Ctor(String)[v-juwa]
+/// </summary>
+public class ObsoleteAttributeCtor2
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Verify the message is the random string";
+ const string c_TEST_ID = "P001";
+
+ string message = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ObsoleteAttribute oa = new ObsoleteAttribute(message);
+ if (oa.Message != message)
+ {
+ string errorDesc = "Message is not \""+message+"\" as expected:Actual(\""+oa.Message+"\")";
+ TestLibrary.TestFramework.LogError("001 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (oa.IsError)
+ {
+ string errorDesc = "created ObsoleteAttribute IsError property should be false";
+ TestLibrary.TestFramework.LogError("002 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003 ", "Unexpected exception: " + e+"message is "+message);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Verify the message is empty";
+ const string c_TEST_ID = "P002";
+
+ string message = String.Empty;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ObsoleteAttribute oa = new ObsoleteAttribute(message);
+ if (oa.Message != message)
+ {
+ string errorDesc = "Message is not empty as expected:Actual(\"" + oa.Message + "\")";
+ TestLibrary.TestFramework.LogError("004 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (oa.IsError)
+ {
+ string errorDesc = "created ObsoleteAttribute IsError property should be false";
+ TestLibrary.TestFramework.LogError("005 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006 ", "Unexpected exception: " + e+"message is empty");
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest3: Verify the message is null";
+ const string c_TEST_ID = "P003";
+
+ string message = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ObsoleteAttribute oa = new ObsoleteAttribute(message);
+ if (oa.Message != null)
+ {
+ string errorDesc = "Message is not null as expected:Actual(\"" + oa.Message + "\")";
+ TestLibrary.TestFramework.LogError("007 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (oa.IsError)
+ {
+ string errorDesc = "created ObsoleteAttribute IsError property should be false";
+ TestLibrary.TestFramework.LogError("008 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009 ", "Unexpected exception: " + e+"message is null");
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ ObsoleteAttributeCtor2 test = new ObsoleteAttributeCtor2();
+
+ TestLibrary.TestFramework.BeginTestCase("For method:System.ObsoleteAttribute.Ctor(String)");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/obsoleteattribute/obsoleteattributector3.cs b/tests/src/CoreMangLib/cti/system/obsoleteattribute/obsoleteattributector3.cs
new file mode 100644
index 0000000000..3d473a4ad8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/obsoleteattribute/obsoleteattributector3.cs
@@ -0,0 +1,200 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class ObsoleteAttributeCtor3
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Verify the message is the random string and isError is false";
+ const string c_TEST_ID = "P001";
+
+ string message = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ObsoleteAttribute oa = new ObsoleteAttribute(message,false);
+ if (oa.Message != message)
+ {
+ string errorDesc = "Message is not \"" + message + "\" as expected:Actual(\"" + oa.Message + "\")";
+ TestLibrary.TestFramework.LogError("001 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (oa.IsError)
+ {
+ string errorDesc = "IsError should be false";
+ TestLibrary.TestFramework.LogError("002 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e +"IsError is false and message is "+message);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Verify the message is the random string and isError is true";
+ const string c_TEST_ID = "P002";
+
+ string message = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ObsoleteAttribute oa = new ObsoleteAttribute(message, true);
+ if (oa.Message != message)
+ {
+ string errorDesc = "Message is not \"" + message + "\" as expected:Actual(\"" + oa.Message + "\")";
+ TestLibrary.TestFramework.LogError("004 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (!oa.IsError)
+ {
+ string errorDesc = "IsError should be true";
+ TestLibrary.TestFramework.LogError("005 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e + "message is " + "IsError is true and message is " + message);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest3: Verify the message is empty and isError is true";
+ const string c_TEST_ID = "P003";
+
+ string message = String.Empty;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ObsoleteAttribute oa = new ObsoleteAttribute(message, true);
+ if (oa.Message != message)
+ {
+ string errorDesc = "Message is not empty as expected:Actual(\"" + oa.Message + "\")";
+ TestLibrary.TestFramework.LogError("007 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (!oa.IsError)
+ {
+ string errorDesc = "IsError should be true";
+ TestLibrary.TestFramework.LogError("008 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e + "message is " + "IsError is true and message is empty");
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest4: Verify the message is null and isError is true";
+ const string c_TEST_ID = "P004";
+
+ string message = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ObsoleteAttribute oa = new ObsoleteAttribute(message, true);
+ if (oa.Message != null)
+ {
+ string errorDesc = "Message is not null as expected:Actual(\"" + oa.Message + "\")";
+ TestLibrary.TestFramework.LogError("010 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ if (!oa.IsError)
+ {
+ string errorDesc = "IsError should be true";
+ TestLibrary.TestFramework.LogError("011 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e + "message is " + "IsError is true and message is null");
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ ObsoleteAttributeCtor3 test = new ObsoleteAttributeCtor3();
+
+ TestLibrary.TestFramework.BeginTestCase("For method:System.ObsoleteAttributeCtor(String,Boolean)");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/obsoleteattribute/obsoleteattributeiserror.cs b/tests/src/CoreMangLib/cti/system/obsoleteattribute/obsoleteattributeiserror.cs
new file mode 100644
index 0000000000..7596e28de3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/obsoleteattribute/obsoleteattributeiserror.cs
@@ -0,0 +1,141 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.ObsoleteAttribute.IsError[v-juwa]
+/// </summary>
+public class ObsoleteAttributeIsError
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Verify IsError property default value is false";
+ const string c_TEST_ID = "P001";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ObsoleteAttribute oa = new ObsoleteAttribute();
+ if (oa.IsError)
+ {
+ string errorDesc = "IsError property default value should be false";
+ TestLibrary.TestFramework.LogError("001 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002 "+"TestID_" + c_TEST_ID, "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Verify IsError property is false";
+ const string c_TEST_ID = "P002";
+
+ string message = TestLibrary.Generator.GetString(-55, false,c_MINI_STRING_LENGTH,c_MAX_STRING_LENGTH);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ObsoleteAttribute oa = new ObsoleteAttribute(message,false);
+ if (oa.IsError)
+ {
+ string errorDesc = "IsError property value should be false";
+ TestLibrary.TestFramework.LogError("003 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest3: Verify IsError property is true";
+ const string c_TEST_ID = "P003";
+
+ string message = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ObsoleteAttribute oa = new ObsoleteAttribute(message, true);
+ if (!oa.IsError)
+ {
+ string errorDesc = "IsError property value should be true";
+ TestLibrary.TestFramework.LogError("005 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ ObsoleteAttributeIsError test = new ObsoleteAttributeIsError();
+
+ TestLibrary.TestFramework.BeginTestCase("For property:System.ObsoleteAttribute.IsError");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/obsoleteattribute/obsoleteattributemessage.cs b/tests/src/CoreMangLib/cti/system/obsoleteattribute/obsoleteattributemessage.cs
new file mode 100644
index 0000000000..99f1533d67
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/obsoleteattribute/obsoleteattributemessage.cs
@@ -0,0 +1,196 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.ObsoleteAttribute.Message[v-juwa]
+/// </summary>
+public class ObsoleteAttributeMessage
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Verify Message property default value is null";
+ const string c_TEST_ID = "P001";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ObsoleteAttribute oa = new ObsoleteAttribute();
+ if (oa.Message != null)
+ {
+ string errorDesc = "Message default value is not null expected:Actual (\""+oa.Message+"\")";
+ TestLibrary.TestFramework.LogError("001 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Verify Message property is random string";
+ const string c_TEST_ID = "P002";
+
+ string message = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ObsoleteAttribute oa = new ObsoleteAttribute(message);
+ if (oa.Message != message)
+ {
+ string errorDesc = "Message value is not \""+message+"\" expected:Actual (\"" + oa.Message + "\")";
+ TestLibrary.TestFramework.LogError("003 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest3: Verify Message property is empty";
+ const string c_TEST_ID = "P003";
+
+ string message = String.Empty;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ObsoleteAttribute oa = new ObsoleteAttribute(message,false);
+ if (oa.Message != message)
+ {
+ string errorDesc = "Message value is not empty expected:Actual (\"" + oa.Message + "\")";
+ TestLibrary.TestFramework.LogError("005 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest4: Verify Message property is null";
+ const string c_TEST_ID = "P004";
+
+ string message = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ ObsoleteAttribute oa = new ObsoleteAttribute(message);
+ if (oa.Message != null)
+ {
+ string errorDesc = "Message value is not null expected:Actual (\"" + oa.Message + "\")";
+ TestLibrary.TestFramework.LogError("007 " + "TestID_" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008 " + "TestID_" + c_TEST_ID, "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ObsoleteAttributeMessage test = new ObsoleteAttributeMessage();
+
+ TestLibrary.TestFramework.BeginTestCase("For property:System.ObsoleteAttribute.Message");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/outofmemoryexception/OutOfMemoryExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/outofmemoryexception/OutOfMemoryExceptionCtor1.csproj
new file mode 100644
index 0000000000..025e5fbf71
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/outofmemoryexception/OutOfMemoryExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="outofmemoryexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/outofmemoryexception/OutOfMemoryExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/outofmemoryexception/OutOfMemoryExceptionCtor2.csproj
new file mode 100644
index 0000000000..86624eef2a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/outofmemoryexception/OutOfMemoryExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="outofmemoryexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/outofmemoryexception/OutOfMemoryExceptionCtor3.csproj b/tests/src/CoreMangLib/cti/system/outofmemoryexception/OutOfMemoryExceptionCtor3.csproj
new file mode 100644
index 0000000000..22e4ef01b4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/outofmemoryexception/OutOfMemoryExceptionCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="outofmemoryexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/outofmemoryexception/outofmemoryexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/outofmemoryexception/outofmemoryexceptionctor1.cs
new file mode 100644
index 0000000000..90bec8ac8a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/outofmemoryexception/outofmemoryexceptionctor1.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/outofmemoryexception/outofmemoryexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/outofmemoryexception/outofmemoryexceptionctor2.cs
new file mode 100644
index 0000000000..edc9909e92
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/outofmemoryexception/outofmemoryexceptionctor2.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/outofmemoryexception/outofmemoryexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/outofmemoryexception/outofmemoryexceptionctor3.cs
new file mode 100644
index 0000000000..1051d2b4a1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/outofmemoryexception/outofmemoryexceptionctor3.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/overflowexception/OverflowExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/overflowexception/OverflowExceptionCtor1.csproj
new file mode 100644
index 0000000000..3ef2f95659
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/overflowexception/OverflowExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="overflowexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/overflowexception/OverflowExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/overflowexception/OverflowExceptionCtor2.csproj
new file mode 100644
index 0000000000..8c68382fd6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/overflowexception/OverflowExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="overflowexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/overflowexception/OverflowExceptionCtor3.csproj b/tests/src/CoreMangLib/cti/system/overflowexception/OverflowExceptionCtor3.csproj
new file mode 100644
index 0000000000..14c8ddff71
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/overflowexception/OverflowExceptionCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="overflowexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/overflowexception/overflowexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/overflowexception/overflowexceptionctor1.cs
new file mode 100644
index 0000000000..9e2a972160
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/overflowexception/overflowexceptionctor1.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/overflowexception/overflowexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/overflowexception/overflowexceptionctor2.cs
new file mode 100644
index 0000000000..d2faf4431a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/overflowexception/overflowexceptionctor2.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/overflowexception/overflowexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/overflowexception/overflowexceptionctor3.cs
new file mode 100644
index 0000000000..410fccd15e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/overflowexception/overflowexceptionctor3.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/paramarrayattribute/ParamArrayAttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/paramarrayattribute/ParamArrayAttributeCtor.csproj
new file mode 100644
index 0000000000..497c5cb0e7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/paramarrayattribute/ParamArrayAttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="paramarrayattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/paramarrayattribute/paramarrayattributector.cs b/tests/src/CoreMangLib/cti/system/paramarrayattribute/paramarrayattributector.cs
new file mode 100644
index 0000000000..412b0c2526
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/paramarrayattribute/paramarrayattributector.cs
@@ -0,0 +1,71 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ParamArrayAttribute constructor [v-yaduoj]
+/// </summary>
+public class ParamArrayAttributeCtor
+{
+ public static int Main()
+ {
+ ParamArrayAttributeCtor testObj = new ParamArrayAttributeCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("for ParamArrayAttribute()");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: initialize an instance of type ParamArrayAttribute via default constructor";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ParamArrayAttribute paramArrayAtt = new ParamArrayAttribute();
+ if (null == paramArrayAtt)
+ {
+ errorDesc = "Failed to initialize an instance of type ParamArrayAttribute via default constructor.";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/platformnotsupportedexception/PlatformNotSupportedExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/platformnotsupportedexception/PlatformNotSupportedExceptionCtor1.csproj
new file mode 100644
index 0000000000..f89225ade0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/platformnotsupportedexception/PlatformNotSupportedExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="platformnotsupportedexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/platformnotsupportedexception/PlatformNotSupportedExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/platformnotsupportedexception/PlatformNotSupportedExceptionCtor2.csproj
new file mode 100644
index 0000000000..0aa3276995
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/platformnotsupportedexception/PlatformNotSupportedExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="platformnotsupportedexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/platformnotsupportedexception/PlatformNotSupportedExceptionCtor3.csproj b/tests/src/CoreMangLib/cti/system/platformnotsupportedexception/PlatformNotSupportedExceptionCtor3.csproj
new file mode 100644
index 0000000000..a8e71e4a3d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/platformnotsupportedexception/PlatformNotSupportedExceptionCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="platformnotsupportedexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/platformnotsupportedexception/platformnotsupportedexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/platformnotsupportedexception/platformnotsupportedexceptionctor1.cs
new file mode 100644
index 0000000000..46ad1337ed
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/platformnotsupportedexception/platformnotsupportedexceptionctor1.cs
@@ -0,0 +1,71 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// PlatformNotSupportedException constructor() [v-yaduoj]
+/// </summary>
+public class PlatformNotSupportedExceptionCtor
+{
+ public static int Main()
+ {
+ PlatformNotSupportedExceptionCtor testObj = new PlatformNotSupportedExceptionCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("for PlatformNotSupportedException()");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: initialize an instance of type PlatformNotSupportedException via default constructor";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ PlatformNotSupportedException e = new PlatformNotSupportedException();
+ if (null == e)
+ {
+ errorDesc = "Failed to initialize an instance of type PlatformNotSupportedException via default constructor.";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/platformnotsupportedexception/platformnotsupportedexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/platformnotsupportedexception/platformnotsupportedexceptionctor2.cs
new file mode 100644
index 0000000000..6c35a844fc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/platformnotsupportedexception/platformnotsupportedexceptionctor2.cs
@@ -0,0 +1,142 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// PlatformNotSupportedException constructor(string) [v-yaduoj]
+/// </summary>
+public class PlatformNotSupportedExceptionCtor
+{
+ public static int Main()
+ {
+ PlatformNotSupportedExceptionCtor testObj = new PlatformNotSupportedExceptionCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("for PlatformNotSupportedException(string)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: initialize an instance of type PlatformNotSupportedException using an emtpy string message";
+ string errorDesc;
+
+ string message = string.Empty;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ PlatformNotSupportedException e = new PlatformNotSupportedException(message);
+ if (null == e || e.Message != message)
+ {
+ errorDesc = "Failed to initialize an instance of type PlatformNotSupportedException.";
+ errorDesc += "\nInput message is emtpy string";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is emtpy string";
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string c_TEST_DESC = "PosTest2: initialize an instance of type PlatformNotSupportedException using a string containing special character";
+ string errorDesc;
+
+ string message = "Not supported exception occurs here \n\r\0\t\v";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ PlatformNotSupportedException e = new PlatformNotSupportedException(message);
+ if (null == e || e.Message != message)
+ {
+ errorDesc = "Failed to initialize an instance of type PlatformNotSupportedException.";
+ errorDesc += "\nInput message is \"" + message + "\"";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is \"" + message + "\"";
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ string c_TEST_DESC = "PosTest3: initialize an instance of type PlatformNotSupportedException using a null reference";
+ string errorDesc;
+
+ string message = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ PlatformNotSupportedException e = new PlatformNotSupportedException(message);
+ if (null == e)
+ {
+ errorDesc = "Failed to initialize an instance of type PlatformNotSupportedException.";
+ errorDesc += "\nInput message is a null reference.";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is a null reference.";
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/platformnotsupportedexception/platformnotsupportedexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/platformnotsupportedexception/platformnotsupportedexceptionctor3.cs
new file mode 100644
index 0000000000..af9c11c227
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/platformnotsupportedexception/platformnotsupportedexceptionctor3.cs
@@ -0,0 +1,188 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// PlatformNotSupportedException constructor(string, Exception) [v-yaduoj]
+/// </summary>
+public class PlatformNotSupportedExceptionCtor
+{
+ public static int Main()
+ {
+ PlatformNotSupportedExceptionCtor testObj = new PlatformNotSupportedExceptionCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("for PlatformNotSupportedException(string, Exception)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: initialize an instance of type PlatformNotSupportedException using an emtpy string message";
+ string errorDesc;
+
+ string message = string.Empty;
+ Exception innerException = new ArgumentNullException();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ PlatformNotSupportedException e = new PlatformNotSupportedException(message, innerException);
+ if (null == e || e.Message != message || e.InnerException != innerException)
+ {
+ errorDesc = "Failed to initialize an instance of type PlatformNotSupportedException.";
+ errorDesc += "\nInput message is emtpy string";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is emtpy string";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string c_TEST_DESC = "PosTest2: initialize an instance of type PlatformNotSupportedException using a string containing special character";
+ string errorDesc;
+
+ string message = "Not supported exception occurs here \n\r\0\t\v";
+ Exception innerException = new Exception();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ PlatformNotSupportedException e = new PlatformNotSupportedException(message, innerException);
+ if (null == e || e.Message != message || e.InnerException != innerException)
+ {
+ errorDesc = "Failed to initialize an instance of type PlatformNotSupportedException.";
+ errorDesc += "\nInput message is \"" + message + "\"";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is \"" + message + "\"";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ string c_TEST_DESC = "PosTest3: initialize an instance of type PlatformNotSupportedException using a null reference";
+ string errorDesc;
+
+ string message = null;
+ Exception innerException = new Exception();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ PlatformNotSupportedException e = new PlatformNotSupportedException(message, innerException);
+ if (null == e)
+ {
+ errorDesc = "Failed to initialize an instance of type PlatformNotSupportedException.";
+ errorDesc += "\nInput message is a null reference.";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is a null reference.";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P004";
+ string c_TEST_DESC = "PosTest4: message is a string containing special character and inner exception is a null reference";
+ string errorDesc;
+
+ string message = "Not supported exception occurs here";
+ Exception innerException = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ PlatformNotSupportedException e = new PlatformNotSupportedException(message, innerException);
+ if (null == e || e.Message != message || e.InnerException != innerException)
+ {
+ errorDesc = "Failed to initialize an instance of type PlatformNotSupportedException.";
+ errorDesc += "\nInput message is \"" + message + "\"";
+ errorDesc += "\nInner exception is a null reference.";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is \"" + message + "\"";
+ errorDesc += "\nInner exception is a null reference.";
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/predicate/PredicateBeginInvoke.csproj b/tests/src/CoreMangLib/cti/system/predicate/PredicateBeginInvoke.csproj
new file mode 100644
index 0000000000..04c0db26db
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/predicate/PredicateBeginInvoke.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="predicatebegininvoke.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/predicate/PredicateEndInvoke.csproj b/tests/src/CoreMangLib/cti/system/predicate/PredicateEndInvoke.csproj
new file mode 100644
index 0000000000..fb5d5a5ca4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/predicate/PredicateEndInvoke.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="predicateendinvoke.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/predicate/PredicateInvoke.csproj b/tests/src/CoreMangLib/cti/system/predicate/PredicateInvoke.csproj
new file mode 100644
index 0000000000..234e0bd1db
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/predicate/PredicateInvoke.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="predicateinvoke.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/predicate/predicatebegininvoke.cs b/tests/src/CoreMangLib/cti/system/predicate/predicatebegininvoke.cs
new file mode 100644
index 0000000000..2e43ce14c4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/predicate/predicatebegininvoke.cs
@@ -0,0 +1,100 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+///<summary>
+///System.Predicate.BeginInvoke [v-yaduoj]
+///</summary>
+
+public class PredicateBeginInvoke
+{
+ private const int c_CRITERIA = 80;
+
+ public static int Main()
+ {
+ PredicateBeginInvoke testObj = new PredicateBeginInvoke();
+ TestLibrary.TestFramework.BeginTestCase("for method of Predicate.BeginInvoke");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+ #region Negative tests
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ int count;
+ bool actualValue;
+ bool expectedValue;
+
+ count = 20;
+ expectedValue = count >= c_CRITERIA;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: call the method Predicate.BeginInvoke asynchronously");
+ try
+ {
+ MyClass myClass = new MyClass(count);
+ Predicate<int> selector = myClass.IsGreatEnough;
+ IAsyncResult asyncResult = selector.BeginInvoke(c_CRITERIA, null, null);
+ actualValue = selector.EndInvoke(asyncResult);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("003", "NotSupportedException expected");
+ }
+ catch (NotSupportedException)
+ {
+ //expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+}
+
+class MyClass
+{
+ private int m_count;
+
+ public MyClass(int count)
+ {
+ m_count = count;
+ }
+
+ public int Count
+ {
+ get
+ {
+ return m_count;
+ }
+ }
+
+ public bool IsGreatEnough(int criteria)
+ {
+ return m_count >= criteria;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/predicate/predicateendinvoke.cs b/tests/src/CoreMangLib/cti/system/predicate/predicateendinvoke.cs
new file mode 100644
index 0000000000..d541364070
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/predicate/predicateendinvoke.cs
@@ -0,0 +1,100 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+///<summary>
+///System.Predicate.EndInvoke [v-yaduoj]
+///</summary>
+
+public class PredicateEndInvoke
+{
+ private const int c_CRITERIA = 80;
+
+ public static int Main()
+ {
+ PredicateEndInvoke testObj = new PredicateEndInvoke();
+ TestLibrary.TestFramework.BeginTestCase("for method of Predicate.EndInvoke");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+ #region Negative tests
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ int count;
+ bool actualValue;
+ bool expectedValue;
+
+ count = 20;
+ expectedValue = count >= c_CRITERIA;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: call the method Predicate.EndInvoke asynchronously");
+ try
+ {
+ MyClass myClass = new MyClass(count);
+ Predicate<int> selector = myClass.IsGreatEnough;
+ IAsyncResult asyncResult = null;
+ actualValue = selector.EndInvoke(asyncResult);
+ retVal = false;
+ TestLibrary.TestFramework.LogError("003", "NotSupportedException expected");
+ }
+ catch (NotSupportedException)
+ {
+ // expected
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+}
+
+class MyClass
+{
+ private int m_count;
+
+ public MyClass(int count)
+ {
+ m_count = count;
+ }
+
+ public int Count
+ {
+ get
+ {
+ return m_count;
+ }
+ }
+
+ public bool IsGreatEnough(int criteria)
+ {
+ return m_count >= criteria;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/predicate/predicateinvoke.cs b/tests/src/CoreMangLib/cti/system/predicate/predicateinvoke.cs
new file mode 100644
index 0000000000..b3a2c05186
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/predicate/predicateinvoke.cs
@@ -0,0 +1,129 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+///<summary>
+///System.Predicate.Invoke [v-yaduoj]
+///</summary>
+
+public class PredicateInvoke
+{
+ private const int c_CRITERIA = 80;
+
+ public static int Main()
+ {
+ PredicateInvoke testObj = new PredicateInvoke();
+ TestLibrary.TestFramework.BeginTestCase("for method of Predicate.Invoke");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ int count;
+ bool actualValue;
+ bool expectedValue;
+
+ count = 20;
+ expectedValue = count >= c_CRITERIA;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: call the method Predicate.EndInvoke synchronously");
+ try
+ {
+ MyClass myClass = new MyClass(count);
+ Predicate<int> selector = myClass.IsGreatEnough;
+ actualValue = selector(c_CRITERIA);
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") != ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ int count;
+ bool actualValue;
+ bool expectedValue;
+
+ count = 99;
+ expectedValue = count >= c_CRITERIA;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: call the method Predicate.EndInvoke synchronously");
+ try
+ {
+ MyClass myClass = new MyClass(count);
+ Predicate<int> selector = myClass.IsGreatEnough;
+ actualValue = selector(c_CRITERIA);
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(" + expectedValue + ") != ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+class MyClass
+{
+ private int m_count;
+
+ public MyClass(int count)
+ {
+ m_count = count;
+ }
+
+ public int Count
+ {
+ get
+ {
+ return m_count;
+ }
+ }
+
+ public bool IsGreatEnough(int criteria)
+ {
+ return m_count >= criteria;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/random/RandomCtor1.csproj b/tests/src/CoreMangLib/cti/system/random/RandomCtor1.csproj
new file mode 100644
index 0000000000..8a8b28cb4c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/random/RandomCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="randomctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/random/RandomCtor2.csproj b/tests/src/CoreMangLib/cti/system/random/RandomCtor2.csproj
new file mode 100644
index 0000000000..90fd4a2f46
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/random/RandomCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="randomctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/random/RandomNext1.csproj b/tests/src/CoreMangLib/cti/system/random/RandomNext1.csproj
new file mode 100644
index 0000000000..9164596f62
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/random/RandomNext1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="randomnext1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/random/RandomNext2.csproj b/tests/src/CoreMangLib/cti/system/random/RandomNext2.csproj
new file mode 100644
index 0000000000..a197369f68
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/random/RandomNext2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="randomnext2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/random/RandomNext3.csproj b/tests/src/CoreMangLib/cti/system/random/RandomNext3.csproj
new file mode 100644
index 0000000000..88842a22f0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/random/RandomNext3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="randomnext3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/random/RandomNextBytes.csproj b/tests/src/CoreMangLib/cti/system/random/RandomNextBytes.csproj
new file mode 100644
index 0000000000..17d9ceff0b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/random/RandomNextBytes.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="randomnextbytes.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/random/RandomNextDouble.csproj b/tests/src/CoreMangLib/cti/system/random/RandomNextDouble.csproj
new file mode 100644
index 0000000000..ac23c02aa0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/random/RandomNextDouble.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="randomnextdouble.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/random/RandomSample.csproj b/tests/src/CoreMangLib/cti/system/random/RandomSample.csproj
new file mode 100644
index 0000000000..9a81345d67
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/random/RandomSample.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="randomsample.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/random/randomctor1.cs b/tests/src/CoreMangLib/cti/system/random/randomctor1.cs
new file mode 100644
index 0000000000..780efbb8ab
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/random/randomctor1.cs
@@ -0,0 +1,70 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Ctor
+/// </summary>
+public class RandomCtor1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor to construct a new instance");
+
+ try
+ {
+ Random random = new Random();
+
+ if (null == random)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Call ctor returns null reference");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ RandomCtor1 test = new RandomCtor1();
+
+ TestLibrary.TestFramework.BeginTestCase("RandomCtor1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/random/randomctor2.cs b/tests/src/CoreMangLib/cti/system/random/randomctor2.cs
new file mode 100644
index 0000000000..0e80e1b166
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/random/randomctor2.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ctor(System.Int32)
+/// </summary>
+public class RandomCtor2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor to construct a new instance");
+
+ try
+ {
+ int randValue = 0;
+
+ do
+ {
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ } while (randValue == Int32.MinValue);
+
+ Random random = new Random(randValue);
+
+ if (null == random)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Call ctor returns null reference");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] randValue = " + randValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ //Dev10 Bug#738987 && Bug#738988: Random throwed OverflowException because of Math.Abs limitations. That has been fixed.
+ TestLibrary.TestFramework.BeginScenario("PosTest2: OverflowException should NOT be thrown when Seed is Int32.MinValue, Dev10 Bug#738987 && Bug#738988");
+
+ try
+ {
+ Random rand = new Random(Int32.MinValue);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ RandomCtor2 test = new RandomCtor2();
+
+ TestLibrary.TestFramework.BeginTestCase("RandomCtor2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/random/randomnext1.cs b/tests/src/CoreMangLib/cti/system/random/randomnext1.cs
new file mode 100644
index 0000000000..a017e5da2d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/random/randomnext1.cs
@@ -0,0 +1,170 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Next
+/// </summary>
+public class RandomNext1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Next when the seed is default value");
+
+ try
+ {
+ Random random = new Random(-55);
+ int value = random.Next();
+
+ if ((value < 0) || (value == Int32.MaxValue))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Next returns a value less than 0 or equal to MaxValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] value = " + value);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Next when the seed is MaxValue");
+
+ try
+ {
+ Random random = new Random(Int32.MaxValue);
+ int value = random.Next();
+
+ if ((value < 0) || (value == Int32.MaxValue))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Next returns a value less than 0 or equal to MaxValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] value = " + value);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call Next when the seed is 0");
+
+ try
+ {
+ Random random = new Random(0);
+ int value = random.Next();
+
+ if ((value < 0) || (value == Int32.MaxValue))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Next returns a value less than 0 or equal to MaxValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] value = " + value);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call Next when the seed is a negative value");
+
+ try
+ {
+ int randValue = 0;
+ do
+ {
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ } while ((randValue == Int32.MinValue) || (randValue == 0) );
+
+ if (randValue > 0)
+ {
+ randValue *= -1;
+ }
+
+ Random random = new Random(randValue);
+ int value = random.Next();
+
+ if ((value < 0) || (value == Int32.MaxValue))
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Next returns a value less than 0 or equal to MaxValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] value = " + value);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ RandomNext1 test = new RandomNext1();
+
+ TestLibrary.TestFramework.BeginTestCase("RandomNext1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/random/randomnext2.cs b/tests/src/CoreMangLib/cti/system/random/randomnext2.cs
new file mode 100644
index 0000000000..3c35b407e0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/random/randomnext2.cs
@@ -0,0 +1,291 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Next(System.Int32)
+/// </summary>
+public class RandomNext2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Next when the seed is default value");
+
+ try
+ {
+ int maxValue = 0;
+ do
+ {
+ maxValue = TestLibrary.Generator.GetInt32(-55);
+ } while ((maxValue <= 0) || (maxValue == Int32.MaxValue));
+
+ Random random = new Random(-55);
+ int value = random.Next(maxValue);
+
+ if ((value < 0) || (value >= maxValue))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Next returns a value less than 0 or equal to maxValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] value = " + value + ", maxValue = " + maxValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Next when the seed is Int32.MaxValue");
+
+ try
+ {
+ int maxValue = 0;
+ do
+ {
+ maxValue = TestLibrary.Generator.GetInt32(-55);
+ } while ((maxValue <= 0) || (maxValue == Int32.MaxValue));
+
+ Random random = new Random(Int32.MaxValue);
+ int value = random.Next(maxValue);
+
+ if ((value < 0) || (value >= maxValue))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Next returns a value less than 0 or equal to maxValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] value = " + value + ", maxValue = " + maxValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call Next when the seed is 0");
+
+ try
+ {
+ int maxValue = 0;
+ do
+ {
+ maxValue = TestLibrary.Generator.GetInt32(-55);
+ } while ((maxValue <= 0) || (maxValue == Int32.MaxValue));
+
+ Random random = new Random(0);
+ int value = random.Next(maxValue);
+
+ if ((value < 0) || (value >= maxValue))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Next returns a value less than 0 or equal to maxValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] value = " + value + ", maxValue = " + maxValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call Next when the seed is a negative value");
+
+ try
+ {
+ int randValue = 0;
+ do
+ {
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ } while ((randValue == Int32.MinValue) || (randValue == 0));
+
+ if (randValue > 0)
+ {
+ randValue *= -1;
+ }
+
+ int maxValue = 0;
+ do
+ {
+ maxValue = TestLibrary.Generator.GetInt32(-55);
+ } while ((maxValue <= 0) || (maxValue == Int32.MaxValue));
+
+ Random random = new Random(randValue);
+ int value = random.Next(maxValue);
+
+ if ((value < 0) || (value >= maxValue))
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Next returns a value less than 0 or equal to maxValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] value = " + value + ", maxValue = " + maxValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Call Next when the seed is maxValue");
+
+ try
+ {
+ int maxValue = 0;
+ do
+ {
+ maxValue = TestLibrary.Generator.GetInt32(-55);
+ } while ((maxValue <= 0) || (maxValue == Int32.MaxValue));
+
+ Random random = new Random(maxValue);
+ int value = random.Next(maxValue);
+
+ if ((value < 0) || (value >= maxValue))
+ {
+ TestLibrary.TestFramework.LogError("005.1", "Next returns a value less than 0 or equal to maxValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] value = " + value + ", maxValue = " + maxValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Call Next when the seed is 0 and maxvalue is 0");
+
+ try
+ {
+ Random random = new Random(0);
+ int value = random.Next(0);
+
+ if (value != 0)
+ {
+ TestLibrary.TestFramework.LogError("006.1", "Next returns a value less than 0 or equal to maxValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] value = " + value);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentOutOfRangeException should be thrown when maxValue is less than zero.");
+
+ try
+ {
+ Random random = new Random(-55);
+ int value = random.Next(-1);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentOutOfRangeException is not thrown when maxValue is less than zero.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] value = " + value);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ RandomNext2 test = new RandomNext2();
+
+ TestLibrary.TestFramework.BeginTestCase("RandomNext2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/random/randomnext3.cs b/tests/src/CoreMangLib/cti/system/random/randomnext3.cs
new file mode 100644
index 0000000000..0e2779e874
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/random/randomnext3.cs
@@ -0,0 +1,338 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Next(System.Int32,System.Int32)
+/// </summary>
+public class RandomNext3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Next when the seed is default value");
+
+ try
+ {
+ int maxValue = 0;
+ do
+ {
+ maxValue = TestLibrary.Generator.GetInt32(-55);
+ } while (maxValue == Int32.MaxValue);
+
+ int minValue = 0;
+ do
+ {
+ minValue = TestLibrary.Generator.GetInt32(-55);
+ } while (minValue >= maxValue);
+
+ retVal = VerificationHelper(new Random(), minValue, maxValue, "001.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Next when the seed is Int32.MaxValue");
+
+ try
+ {
+ int maxValue = 0;
+ do
+ {
+ maxValue = TestLibrary.Generator.GetInt32(-55);
+ } while (maxValue == Int32.MaxValue);
+
+ int minValue = 0;
+ do
+ {
+ minValue = TestLibrary.Generator.GetInt32(-55);
+ } while (minValue >= maxValue);
+
+ retVal = VerificationHelper(new Random(Int32.MaxValue), minValue, maxValue, "002.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call Next when the seed is 0");
+
+ try
+ {
+ int maxValue = 0;
+ do
+ {
+ maxValue = TestLibrary.Generator.GetInt32(-55);
+ } while (maxValue == Int32.MaxValue);
+
+ int minValue = 0;
+ do
+ {
+ minValue = TestLibrary.Generator.GetInt32(-55);
+ } while (minValue >= maxValue);
+
+ Random random = new Random(0);
+
+ retVal = VerificationHelper(new Random(maxValue), minValue, maxValue, "003.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call Next when the seed is a negative value");
+
+ try
+ {
+ int randValue = 0;
+ do
+ {
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ } while ((randValue == Int32.MinValue) || (randValue == 0));
+
+ if (randValue > 0)
+ {
+ randValue *= -1;
+ }
+
+ int maxValue = 0;
+ do
+ {
+ maxValue = TestLibrary.Generator.GetInt32(-55);
+ } while (maxValue == Int32.MaxValue);
+
+ int minValue = 0;
+ do
+ {
+ minValue = TestLibrary.Generator.GetInt32(-55);
+ } while (minValue >= maxValue);
+
+ Random random = new Random(randValue);
+
+ retVal = VerificationHelper(new Random(maxValue), minValue, maxValue, "004.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Call Next when the seed is maxValue");
+
+ try
+ {
+ int maxValue = 0;
+ do
+ {
+ maxValue = TestLibrary.Generator.GetInt32(-55);
+ } while (maxValue == Int32.MaxValue);
+
+ int minValue = 0;
+ do
+ {
+ minValue = TestLibrary.Generator.GetInt32(-55);
+ } while (minValue >= maxValue);
+
+ Random random = new Random(maxValue);
+
+ retVal = VerificationHelper(new Random(maxValue), minValue, maxValue, "005.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Call Next when seed, minvalue or maxvalue is boundary");
+
+ try
+ {
+ retVal = VerificationHelper(new Random(0), 0, 0, "006.1") && retVal;
+ retVal = VerificationHelper(new Random(0), Int32.MaxValue, Int32.MaxValue, "006.2") && retVal;
+ retVal = VerificationHelper(new Random(0), Int32.MinValue, Int32.MaxValue, "006.3") && retVal;
+ retVal = VerificationHelper(new Random(0), Int32.MaxValue - 1, Int32.MaxValue, "006.4") && retVal;
+ retVal = VerificationHelper(new Random(Int32.MaxValue), Int32.MaxValue - 1, Int32.MaxValue, "006.5") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Call Next when the seed is minValue");
+
+ try
+ {
+ int maxValue = 0;
+ do
+ {
+ maxValue = TestLibrary.Generator.GetInt32(-55);
+ } while (maxValue == Int32.MaxValue);
+
+ int minValue = 0;
+ do
+ {
+ minValue = TestLibrary.Generator.GetInt32(-55);
+ } while (minValue >= maxValue);
+
+ Random random = new Random(minValue);
+
+ retVal = VerificationHelper(new Random(maxValue), minValue, maxValue, "005.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentOutOfRangeException should be thrown when minValue is greater than maxValue");
+
+ try
+ {
+ Random instance = new Random(-55);
+
+ int value = instance.Next(1, 0);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentOutOfRangeException is not thrown when maxValue is less than minValue.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] value = " + value);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ RandomNext3 test = new RandomNext3();
+
+ TestLibrary.TestFramework.BeginTestCase("RandomNext3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(Random instance, int minValue, int maxValue, string errorno)
+ {
+ bool retVal = true;
+
+ int value = instance.Next(minValue, maxValue);
+
+ // If minValue equals maxValue, minValue is returned
+ if ((value < minValue) || ((value >= maxValue) && (minValue != maxValue)) )
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Next returns a value less than minValue, or equal to maxValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] value = " + value + ", maxValue = " + maxValue + ", minValue = " + minValue);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/random/randomnextbytes.cs b/tests/src/CoreMangLib/cti/system/random/randomnextbytes.cs
new file mode 100644
index 0000000000..54b362b79d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/random/randomnextbytes.cs
@@ -0,0 +1,152 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// NextBytes(System.Byte[])
+/// </summary>
+public class RandomNextBytes
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call NextBytes to fill a byte array");
+
+ try
+ {
+ byte[] bytes = new byte[1024];
+ retVal = VerificationHelper(new Random(-55), bytes, "001.1") && retVal;
+ retVal = VerificationHelper(new Random(0), bytes, "001.2") && retVal;
+ retVal = VerificationHelper(new Random(Int32.MaxValue), bytes, "001.3") && retVal;
+ retVal = VerificationHelper(new Random(-1), bytes, "001.4") && retVal;
+ retVal = VerificationHelper(new Random(Byte.MaxValue), bytes, "001.5") && retVal;
+ retVal = VerificationHelper(new Random(Byte.MinValue), bytes, "001.6") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call NextBytes to fill a 1 byte array");
+
+ try
+ {
+ byte[] bytes = new byte[1];
+ retVal = VerificationHelper(new Random(-55), bytes, "002.1") && retVal;
+ retVal = VerificationHelper(new Random(0), bytes, "002.2") && retVal;
+ retVal = VerificationHelper(new Random(Int32.MaxValue), bytes, "002.3") && retVal;
+ retVal = VerificationHelper(new Random(-1), bytes, "002.4") && retVal;
+ retVal = VerificationHelper(new Random(Byte.MaxValue), bytes, "002.5") && retVal;
+ retVal = VerificationHelper(new Random(Byte.MinValue), bytes, "002.6") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException should be thrown when buffer is a null reference");
+
+ try
+ {
+ Random instance = new Random(-55);
+
+ instance.NextBytes(null);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown when buffer is a null reference");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ RandomNextBytes test = new RandomNextBytes();
+
+ TestLibrary.TestFramework.BeginTestCase("RandomNextBytes");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(Random instance, byte[] bytes, string errorno)
+ {
+ bool retVal = true;
+
+ instance.NextBytes(bytes);
+
+ for (int i = 0; i < bytes.Length; ++i)
+ {
+ byte b = bytes[i];
+ if (b < 0)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "NextBytes returns a value less than 0");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] b = " + b + ", i = " + i);
+ retVal = false;
+ }
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/random/randomnextdouble.cs b/tests/src/CoreMangLib/cti/system/random/randomnextdouble.cs
new file mode 100644
index 0000000000..415ebca310
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/random/randomnextdouble.cs
@@ -0,0 +1,171 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// NextDouble
+/// </summary>
+public class RandomNextDouble
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call NextDouble when the seed is default value");
+
+ try
+ {
+ Random random = new Random(-55);
+ double value = random.NextDouble();
+
+ if ((value < 0.0) || (value >= 1.0))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "NextDouble returns a value less than 0 or equal to 1.0");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] value = " + value);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call NextDouble when the seed is MaxValue");
+
+ try
+ {
+ Random random = new Random(Int32.MaxValue);
+ double value = random.NextDouble();
+
+ if ((value < 0.0) || (value >= 1.0))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "NextDouble returns a value less than 0 or equal to 1.0");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] value = " + value);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call NextDouble when the seed is 0");
+
+ try
+ {
+ Random random = new Random(0);
+ double value = random.NextDouble();
+
+ if ((value < 0.0) || (value >= 1.0))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "NextDouble returns a value less than 0 or equal to 1.0");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] value = " + value);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call NextDouble when the seed is a negative value");
+
+ try
+ {
+ int randValue = 0;
+ do
+ {
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ } while ((randValue == Int32.MinValue) || (randValue == 0));
+
+ if (randValue > 0)
+ {
+ randValue *= -1;
+ }
+
+ Random random = new Random(randValue);
+ double value = random.NextDouble();
+
+ if ((value < 0.0) || (value >= 1.0))
+ {
+ TestLibrary.TestFramework.LogError("004.1", "NextDouble returns a value less than 0 or equal to 1.0");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] value = " + value);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+
+ public static int Main()
+ {
+ RandomNextDouble test = new RandomNextDouble();
+
+ TestLibrary.TestFramework.BeginTestCase("RandomNextDouble");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/random/randomsample.cs b/tests/src/CoreMangLib/cti/system/random/randomsample.cs
new file mode 100644
index 0000000000..520d9afa3d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/random/randomsample.cs
@@ -0,0 +1,98 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class TestRandom : Random
+{
+ public TestRandom(int seed) : base(seed)
+ {
+ }
+
+ public double CallSample()
+ {
+ return Sample();
+ }
+
+ protected override double Sample()
+ {
+ return base.Sample() / 2.0;
+ }
+}
+
+/// <summary>
+/// Sample
+/// </summary>
+public class RandomSample
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call NextDouble to check the Sample works");
+
+ try
+ {
+ TestRandom random = new TestRandom(-55);
+ double value = random.NextDouble();
+
+ if ((value < 0.0) || (value >= 1.0))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "NextDouble returns a value less than 0 or equal to 1.0");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] value = " + value);
+ retVal = false;
+ }
+
+ value = random.CallSample();
+
+ if ((value < 0.0) || (value >= 1.0))
+ {
+ TestLibrary.TestFramework.LogError("001.2", "NextDouble returns a value less than 0 or equal to 1.0");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] value = " + value);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ RandomSample test = new RandomSample();
+
+ TestLibrary.TestFramework.BeginTestCase("RandomSample");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/rankexception/RankExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/rankexception/RankExceptionCtor1.csproj
new file mode 100644
index 0000000000..45e105a218
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/rankexception/RankExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="rankexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/rankexception/RankExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/rankexception/RankExceptionCtor2.csproj
new file mode 100644
index 0000000000..0d3a80f2b7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/rankexception/RankExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="rankexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/rankexception/RankExceptionCtor3.csproj b/tests/src/CoreMangLib/cti/system/rankexception/RankExceptionCtor3.csproj
new file mode 100644
index 0000000000..e0fa5b9ca4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/rankexception/RankExceptionCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="rankexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/rankexception/rankexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/rankexception/rankexceptionctor1.cs
new file mode 100644
index 0000000000..97373d8f1c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/rankexception/rankexceptionctor1.cs
@@ -0,0 +1,71 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// RankException constructor() [v-yaduoj]
+/// </summary>
+public class RankExceptionCtor
+{
+ public static int Main()
+ {
+ RankExceptionCtor testObj = new RankExceptionCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("for RankException()");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: initialize an instance of type RankException via default constructor";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ RankException e = new RankException();
+ if (null == e)
+ {
+ errorDesc = "Failed to initialize an instance of type RankException via default constructor.";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/rankexception/rankexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/rankexception/rankexceptionctor2.cs
new file mode 100644
index 0000000000..d12ebb2e1d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/rankexception/rankexceptionctor2.cs
@@ -0,0 +1,142 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// RankException constructor(string) [v-yaduoj]
+/// </summary>
+public class RankExceptionCtor
+{
+ public static int Main()
+ {
+ RankExceptionCtor testObj = new RankExceptionCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("for RankException(string)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: initialize an instance of type RankException using an emtpy string message";
+ string errorDesc;
+
+ string message = string.Empty;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ RankException e = new RankException(message);
+ if (null == e || e.Message != message)
+ {
+ errorDesc = "Failed to initialize an instance of type RankException.";
+ errorDesc += "\nInput message is emtpy string";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is emtpy string";
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string c_TEST_DESC = "PosTest2: initialize an instance of type RankException using a string containing special character";
+ string errorDesc;
+
+ string message = "Not supported exception occurs here \n\r\0\t\v";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ RankException e = new RankException(message);
+ if (null == e || e.Message != message)
+ {
+ errorDesc = "Failed to initialize an instance of type RankException.";
+ errorDesc += "\nInput message is \"" + message + "\"";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is \"" + message + "\"";
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ string c_TEST_DESC = "PosTest3: initialize an instance of type RankException using a null reference";
+ string errorDesc;
+
+ string message = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ RankException e = new RankException(message);
+ if (null == e)
+ {
+ errorDesc = "Failed to initialize an instance of type RankException.";
+ errorDesc += "\nInput message is a null reference.";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is a null reference.";
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/rankexception/rankexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/rankexception/rankexceptionctor3.cs
new file mode 100644
index 0000000000..ebb4cbf62f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/rankexception/rankexceptionctor3.cs
@@ -0,0 +1,188 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// RankException constructor(string, Exception) [v-yaduoj]
+/// </summary>
+public class RankExceptionCtor
+{
+ public static int Main()
+ {
+ RankExceptionCtor testObj = new RankExceptionCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("for RankException(string, Exception)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: initialize an instance of type RankException using an emtpy string message";
+ string errorDesc;
+
+ string message = string.Empty;
+ Exception innerException = new ArgumentNullException();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ RankException e = new RankException(message, innerException);
+ if (null == e || e.Message != message || e.InnerException != innerException)
+ {
+ errorDesc = "Failed to initialize an instance of type RankException.";
+ errorDesc += "\nInput message is emtpy string";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is emtpy string";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string c_TEST_DESC = "PosTest2: initialize an instance of type RankException using a string containing special character";
+ string errorDesc;
+
+ string message = "Not supported exception occurs here \n\r\0\t\v";
+ Exception innerException = new Exception();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ RankException e = new RankException(message, innerException);
+ if (null == e || e.Message != message || e.InnerException != innerException)
+ {
+ errorDesc = "Failed to initialize an instance of type RankException.";
+ errorDesc += "\nInput message is \"" + message + "\"";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is \"" + message + "\"";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ string c_TEST_DESC = "PosTest3: initialize an instance of type RankException using a null reference";
+ string errorDesc;
+
+ string message = null;
+ Exception innerException = new Exception();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ RankException e = new RankException(message, innerException);
+ if (null == e)
+ {
+ errorDesc = "Failed to initialize an instance of type RankException.";
+ errorDesc += "\nInput message is a null reference.";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is a null reference.";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P004";
+ string c_TEST_DESC = "PosTest4: message is a string containing special character and inner exception is a null reference";
+ string errorDesc;
+
+ string message = "Not supported exception occurs here";
+ Exception innerException = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ RankException e = new RankException(message, innerException);
+ if (null == e || e.Message != message || e.InnerException != innerException)
+ {
+ errorDesc = "Failed to initialize an instance of type RankException.";
+ errorDesc += "\nInput message is \"" + message + "\"";
+ errorDesc += "\nInner exception is a null reference.";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is \"" + message + "\"";
+ errorDesc += "\nInner exception is a null reference.";
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/AmbiguousMatchExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/AmbiguousMatchExceptionCtor1.csproj
new file mode 100644
index 0000000000..4e591bb168
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/AmbiguousMatchExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="ambiguousmatchexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/AmbiguousMatchExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/AmbiguousMatchExceptionCtor2.csproj
new file mode 100644
index 0000000000..5fcf822620
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/AmbiguousMatchExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="ambiguousmatchexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/AmbiguousMatchExceptionCtor3.csproj b/tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/AmbiguousMatchExceptionCtor3.csproj
new file mode 100644
index 0000000000..e09bfc3ba8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/AmbiguousMatchExceptionCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="ambiguousmatchexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/ambiguousmatchexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/ambiguousmatchexceptionctor1.cs
new file mode 100644
index 0000000000..468bf91449
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/ambiguousmatchexceptionctor1.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// AmbiguousMatchException constructor() [v-yaduoj]
+/// </summary>
+public class AmbiguousMatchExceptionCtor
+{
+ public static int Main()
+ {
+ AmbiguousMatchExceptionCtor testObj = new AmbiguousMatchExceptionCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("for AmbiguousMatchException()");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: initialize an instance of type AmbiguousMatchException via default constructor";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ AmbiguousMatchException e = new AmbiguousMatchException();
+ if (null == e)
+ {
+ errorDesc = "Failed to initialize an instance of type AmbiguousMatchException via default constructor.";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/ambiguousmatchexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/ambiguousmatchexceptionctor2.cs
new file mode 100644
index 0000000000..e64e69f2fb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/ambiguousmatchexceptionctor2.cs
@@ -0,0 +1,143 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// AmbiguousMatchException constructor(string) [v-yaduoj]
+/// </summary>
+public class AmbiguousMatchExceptionCtor
+{
+ public static int Main()
+ {
+ AmbiguousMatchExceptionCtor testObj = new AmbiguousMatchExceptionCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("for AmbiguousMatchException(string)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: initialize an instance of type AmbiguousMatchException using an emtpy string message";
+ string errorDesc;
+
+ string message = string.Empty;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ AmbiguousMatchException e = new AmbiguousMatchException(message);
+ if (null == e || e.Message != message)
+ {
+ errorDesc = "Failed to initialize an instance of type AmbiguousMatchException.";
+ errorDesc += "\nInput message is emtpy string";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is emtpy string";
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string c_TEST_DESC = "PosTest2: initialize an instance of type AmbiguousMatchException using a string containing special character";
+ string errorDesc;
+
+ string message = "Not supported exception occurs here \n\r\0\t\v";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ AmbiguousMatchException e = new AmbiguousMatchException(message);
+ if (null == e || e.Message != message)
+ {
+ errorDesc = "Failed to initialize an instance of type AmbiguousMatchException.";
+ errorDesc += "\nInput message is \"" + message + "\"";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is \"" + message + "\"";
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ string c_TEST_DESC = "PosTest3: initialize an instance of type AmbiguousMatchException using a null reference";
+ string errorDesc;
+
+ string message = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ AmbiguousMatchException e = new AmbiguousMatchException(message);
+ if (null == e)
+ {
+ errorDesc = "Failed to initialize an instance of type AmbiguousMatchException.";
+ errorDesc += "\nInput message is a null reference.";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is a null reference.";
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/ambiguousmatchexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/ambiguousmatchexceptionctor3.cs
new file mode 100644
index 0000000000..560ef54802
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/ambiguousmatchexception/ambiguousmatchexceptionctor3.cs
@@ -0,0 +1,189 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// AmbiguousMatchException constructor(string, Exception) [v-yaduoj]
+/// </summary>
+public class AmbiguousMatchExceptionCtor
+{
+ public static int Main()
+ {
+ AmbiguousMatchExceptionCtor testObj = new AmbiguousMatchExceptionCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("for AmbiguousMatchException(string, Exception)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: initialize an instance of type AmbiguousMatchException using an emtpy string message";
+ string errorDesc;
+
+ string message = string.Empty;
+ Exception innerException = new ArgumentNullException();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ AmbiguousMatchException e = new AmbiguousMatchException(message, innerException);
+ if (null == e || e.Message != message || e.InnerException != innerException)
+ {
+ errorDesc = "Failed to initialize an instance of type AmbiguousMatchException.";
+ errorDesc += "\nInput message is emtpy string";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is emtpy string";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string c_TEST_DESC = "PosTest2: initialize an instance of type AmbiguousMatchException using a string containing special character";
+ string errorDesc;
+
+ string message = "Not supported exception occurs here \n\r\0\t\v";
+ Exception innerException = new Exception();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ AmbiguousMatchException e = new AmbiguousMatchException(message, innerException);
+ if (null == e || e.Message != message || e.InnerException != innerException)
+ {
+ errorDesc = "Failed to initialize an instance of type AmbiguousMatchException.";
+ errorDesc += "\nInput message is \"" + message + "\"";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is \"" + message + "\"";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ string c_TEST_DESC = "PosTest3: initialize an instance of type AmbiguousMatchException using a null reference";
+ string errorDesc;
+
+ string message = null;
+ Exception innerException = new Exception();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ AmbiguousMatchException e = new AmbiguousMatchException(message, innerException);
+ if (null == e)
+ {
+ errorDesc = "Failed to initialize an instance of type AmbiguousMatchException.";
+ errorDesc += "\nInput message is a null reference.";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is a null reference.";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P004";
+ string c_TEST_DESC = "PosTest4: message is a string containing special character and inner exception is a null reference";
+ string errorDesc;
+
+ string message = "Not supported exception occurs here";
+ Exception innerException = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ AmbiguousMatchException e = new AmbiguousMatchException(message, innerException);
+ if (null == e || e.Message != message || e.InnerException != innerException)
+ {
+ errorDesc = "Failed to initialize an instance of type AmbiguousMatchException.";
+ errorDesc += "\nInput message is \"" + message + "\"";
+ errorDesc += "\nInner exception is a null reference.";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is \"" + message + "\"";
+ errorDesc += "\nInner exception is a null reference.";
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assembly/TestAssembly1.csproj b/tests/src/CoreMangLib/cti/system/reflection/assembly/TestAssembly1.csproj
new file mode 100644
index 0000000000..25435dd684
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assembly/TestAssembly1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="testassembly1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assembly/TestTarget2.csproj b/tests/src/CoreMangLib/cti/system/reflection/assembly/TestTarget2.csproj
new file mode 100644
index 0000000000..3982d0ffc8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assembly/TestTarget2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="testtarget.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assembly/testassembly1.cs b/tests/src/CoreMangLib/cti/system/reflection/assembly/testassembly1.cs
new file mode 100644
index 0000000000..f6132d0739
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assembly/testassembly1.cs
@@ -0,0 +1,16 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Security;
+using System.Collections.Generic;
+using System.Text;
+
+[assembly: SecurityCritical]
+
+namespace general
+{
+ class Class1
+ {
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assembly/testtarget.cs b/tests/src/CoreMangLib/cti/system/reflection/assembly/testtarget.cs
new file mode 100644
index 0000000000..73e4a83e86
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assembly/testtarget.cs
@@ -0,0 +1,14 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Security;
+
+[assembly: SecurityCritical]
+
+public class TestTarget
+{
+ public static void Main()
+ {
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblyconfigurationattribute/AssemblyConfigurationAttribute.csproj b/tests/src/CoreMangLib/cti/system/reflection/assemblyconfigurationattribute/AssemblyConfigurationAttribute.csproj
new file mode 100644
index 0000000000..8f7945ba11
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblyconfigurationattribute/AssemblyConfigurationAttribute.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="assemblyconfigurationattribute.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblyconfigurationattribute/AssemblyConfigurationAttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/reflection/assemblyconfigurationattribute/AssemblyConfigurationAttributeCtor.csproj
new file mode 100644
index 0000000000..5662bbd6f5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblyconfigurationattribute/AssemblyConfigurationAttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="assemblyconfigurationattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblyconfigurationattribute/assemblyconfigurationattribute.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblyconfigurationattribute/assemblyconfigurationattribute.cs
new file mode 100644
index 0000000000..03bc283e14
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblyconfigurationattribute/assemblyconfigurationattribute.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+/// <summary>
+/// AssemblyConfigurationAttribute.Configuration
+/// </summary>
+public class AssemblyConfigurationAttributeConfiguration
+{
+ private int c_MIN_STR_LENGTH = 8;
+ private int c_MAX_STR_LENGTH = 256;
+ public static int Main()
+ {
+ AssemblyConfigurationAttributeConfiguration assemConfigurationAttrConfig = new AssemblyConfigurationAttributeConfiguration();
+ TestLibrary.TestFramework.BeginTestCase("AssemblyConfigurationAttributeConfiguration");
+ if (assemConfigurationAttrConfig.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the configuration info from initialized the AssemblyConfigurationAttribute 1");
+ try
+ {
+ string configuration = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LENGTH, c_MAX_STR_LENGTH);
+ AssemblyConfigurationAttribute assemConfigAttr = new AssemblyConfigurationAttribute(configuration);
+ if (assemConfigAttr.Configuration != configuration)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the configuration info from initialized the AssemblyConfigurationAttribute 2");
+ try
+ {
+ string configuration = null;
+ AssemblyConfigurationAttribute assemConfigAttr = new AssemblyConfigurationAttribute(configuration);
+ if (assemConfigAttr.Configuration != null)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Return the configuration info from initialized the AssemblyConfigurationAttribute 3");
+ try
+ {
+ string configuration = string.Empty;
+ AssemblyConfigurationAttribute assemConfigAttr = new AssemblyConfigurationAttribute(configuration);
+ if (assemConfigAttr.Configuration != "")
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblyconfigurationattribute/assemblyconfigurationattributector.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblyconfigurationattribute/assemblyconfigurationattributector.cs
new file mode 100644
index 0000000000..750119d10c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblyconfigurationattribute/assemblyconfigurationattributector.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+public class AssemblyConfigurationAttributeCtor
+{
+ private int c_MIN_STR_LENGTH = 8;
+ private int c_MAX_STR_LENGTH = 256;
+ public static int Main()
+ {
+ AssemblyConfigurationAttributeCtor assemConfigurationAttrCtor = new AssemblyConfigurationAttributeCtor();
+ TestLibrary.TestFramework.BeginTestCase("AssemblyConfigurationAttributeCtor");
+ if (assemConfigurationAttrCtor.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Initialize the AssemblyConfigurationAttribute 1");
+ try
+ {
+ string configuration = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LENGTH, c_MAX_STR_LENGTH);
+ AssemblyConfigurationAttribute assemConfigAttr = new AssemblyConfigurationAttribute(configuration);
+ if (assemConfigAttr == null || assemConfigAttr.Configuration != configuration)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Initialize the AssemblyConfigurationAttribute 2");
+ try
+ {
+ string configuration = null;
+ AssemblyConfigurationAttribute assemConfigAttr = new AssemblyConfigurationAttribute(configuration);
+ if (assemConfigAttr == null || assemConfigAttr.Configuration != null)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Initialize the AssemblyConfigurationAttribute 3");
+ try
+ {
+ string configuration = string.Empty;
+ AssemblyConfigurationAttribute assemConfigAttr = new AssemblyConfigurationAttribute(configuration);
+ if (assemConfigAttr == null || assemConfigAttr.Configuration != "")
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblydefaultaliasattribute/AssemblyDefaultAliasAttribute.csproj b/tests/src/CoreMangLib/cti/system/reflection/assemblydefaultaliasattribute/AssemblyDefaultAliasAttribute.csproj
new file mode 100644
index 0000000000..74110b4577
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblydefaultaliasattribute/AssemblyDefaultAliasAttribute.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="assemblydefaultaliasattribute.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblydefaultaliasattribute/AssemblyDefaultAliasAttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/reflection/assemblydefaultaliasattribute/AssemblyDefaultAliasAttributeCtor.csproj
new file mode 100644
index 0000000000..5ff1fef95c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblydefaultaliasattribute/AssemblyDefaultAliasAttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="assemblydefaultaliasattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblydefaultaliasattribute/assemblydefaultaliasattribute.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblydefaultaliasattribute/assemblydefaultaliasattribute.cs
new file mode 100644
index 0000000000..4b5b83d2f3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblydefaultaliasattribute/assemblydefaultaliasattribute.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+/// <summary>
+/// AssemblyDefaultAliasAttribute.DefaultAlias
+/// </summary>
+public class AssemblyDefaultAliasAttributeDefaultAlias
+{
+ private int c_MIN_STR_LENGTH = 8;
+ private int c_MAX_STR_LENGTH = 256;
+ public static int Main()
+ {
+ AssemblyDefaultAliasAttributeDefaultAlias assemDefaultAliasAttrDefaultAlias = new AssemblyDefaultAliasAttributeDefaultAlias();
+ TestLibrary.TestFramework.BeginTestCase("AssemblyDefaultAliasAttributeDefaultAlias");
+ if (assemDefaultAliasAttrDefaultAlias.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the defaultAlias info from initialized the AssemblyDefaultAliasAttribute 1");
+ try
+ {
+ string defaultAlias = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LENGTH, c_MAX_STR_LENGTH);
+ AssemblyDefaultAliasAttribute assemDefaultAliasAttr = new AssemblyDefaultAliasAttribute(defaultAlias);
+ if (assemDefaultAliasAttr.DefaultAlias != defaultAlias)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the defaultAlias info from initialized the AssemblyDefaultAliasAttribute 2");
+ try
+ {
+ string defaultAlias = null;
+ AssemblyDefaultAliasAttribute assemDefaultAliasAttr = new AssemblyDefaultAliasAttribute(defaultAlias);
+ if (assemDefaultAliasAttr.DefaultAlias != null)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Return the defaultAlias info from initialized the AssemblyDefaultAliasAttribute 3");
+ try
+ {
+ string defaultAlias = string.Empty;
+ AssemblyDefaultAliasAttribute assemDefaultAliasAttr = new AssemblyDefaultAliasAttribute(defaultAlias);
+ if (assemDefaultAliasAttr.DefaultAlias != "")
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblydefaultaliasattribute/assemblydefaultaliasattributector.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblydefaultaliasattribute/assemblydefaultaliasattributector.cs
new file mode 100644
index 0000000000..b32506c2c3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblydefaultaliasattribute/assemblydefaultaliasattributector.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+/// <summary>
+/// AssemblyDefaultAliasAttribute(String)
+/// </summary>
+public class AssemblyDefaultAliasAttributeCtor
+{
+ private int c_MIN_STR_LENGTH = 8;
+ private int c_MAX_STR_LENGTH = 256;
+ public static int Main()
+ {
+ AssemblyDefaultAliasAttributeCtor assemDefaultAliasAttrCtor = new AssemblyDefaultAliasAttributeCtor();
+ TestLibrary.TestFramework.BeginTestCase("AssemblyDefaultAliasAttributeCtor");
+ if (assemDefaultAliasAttrCtor.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Initialize the AssemblyDefaultAliasAttribute 1");
+ try
+ {
+ string defaultAlias = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LENGTH, c_MAX_STR_LENGTH);
+ AssemblyDefaultAliasAttribute assemDefaultAliasAttr = new AssemblyDefaultAliasAttribute(defaultAlias);
+ if (assemDefaultAliasAttr == null || assemDefaultAliasAttr.DefaultAlias != defaultAlias)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Initialize the AssemblyDefaultAliasAttribute 2");
+ try
+ {
+ string defaultAlias = null;
+ AssemblyDefaultAliasAttribute assemDefaultAliasAttr = new AssemblyDefaultAliasAttribute(defaultAlias);
+ if (assemDefaultAliasAttr == null || assemDefaultAliasAttr.DefaultAlias != null)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Initialize the AssemblyDefaultAliasAttribute 3");
+ try
+ {
+ string defaultAlias = string.Empty;
+ AssemblyDefaultAliasAttribute assemDefaultAliasAttr = new AssemblyDefaultAliasAttribute(defaultAlias);
+ if (assemDefaultAliasAttr == null || assemDefaultAliasAttr.DefaultAlias != "")
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblydelaysignattribute/AssemblyDelaySignAttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/reflection/assemblydelaysignattribute/AssemblyDelaySignAttributeCtor.csproj
new file mode 100644
index 0000000000..1766719e75
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblydelaysignattribute/AssemblyDelaySignAttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="assemblydelaysignattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblydelaysignattribute/AssemblyDelaySignAttributeDelaySign.csproj b/tests/src/CoreMangLib/cti/system/reflection/assemblydelaysignattribute/AssemblyDelaySignAttributeDelaySign.csproj
new file mode 100644
index 0000000000..c30b8e5b03
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblydelaysignattribute/AssemblyDelaySignAttributeDelaySign.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="assemblydelaysignattributedelaysign.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblydelaysignattribute/assemblydelaysignattributector.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblydelaysignattribute/assemblydelaysignattributector.cs
new file mode 100644
index 0000000000..50a449e6fe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblydelaysignattribute/assemblydelaysignattributector.cs
@@ -0,0 +1,133 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// Ctor.
+/// </summary>
+
+public class AssemblyDelaySignAttributeCtor
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify AssemblyDelaySignAttribute Ctor .");
+
+ try
+ {
+ bool delaySign = true;
+ AssemblyDelaySignAttribute adsa = new AssemblyDelaySignAttribute(delaySign);
+
+ if (adsa.DelaySign != delaySign)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Ctor Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify AssemblyDelaySignAttribute Ctor .");
+
+ try
+ {
+ bool delaySign = false;
+ AssemblyDelaySignAttribute adsa = new AssemblyDelaySignAttribute(delaySign);
+
+ if (adsa.DelaySign != delaySign)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Ctor Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ AssemblyDelaySignAttributeCtor test = new AssemblyDelaySignAttributeCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("AssemblyDelaySignAttributeCtor");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblydelaysignattribute/assemblydelaysignattributedelaysign.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblydelaysignattribute/assemblydelaysignattributedelaysign.cs
new file mode 100644
index 0000000000..94e55744fe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblydelaysignattribute/assemblydelaysignattributedelaysign.cs
@@ -0,0 +1,133 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// DelaySign
+/// </summary>
+
+public class AssemblyDelaySignAttributeDelaySign
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property DelaySign .");
+
+ try
+ {
+ bool delaySign = true;
+ AssemblyDelaySignAttribute adsa = new AssemblyDelaySignAttribute(delaySign);
+
+ if (adsa.DelaySign != delaySign)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property DelaySign Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify property DelaySign .");
+
+ try
+ {
+ bool delaySign = false;
+ AssemblyDelaySignAttribute adsa = new AssemblyDelaySignAttribute(delaySign);
+
+ if (adsa.DelaySign != delaySign)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Property DelaySign Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ AssemblyDelaySignAttributeDelaySign test = new AssemblyDelaySignAttributeDelaySign();
+
+ TestLibrary.TestFramework.BeginTestCase("AssemblyDelaySignAttributeDelaySign");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblydescriptionattribute/AssemblyDescriptionAttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/reflection/assemblydescriptionattribute/AssemblyDescriptionAttributeCtor.csproj
new file mode 100644
index 0000000000..2c5217e40a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblydescriptionattribute/AssemblyDescriptionAttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="assemblydescriptionattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblydescriptionattribute/AssemblyDescriptionAttributeDescription.csproj b/tests/src/CoreMangLib/cti/system/reflection/assemblydescriptionattribute/AssemblyDescriptionAttributeDescription.csproj
new file mode 100644
index 0000000000..409c8c4298
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblydescriptionattribute/AssemblyDescriptionAttributeDescription.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="assemblydescriptionattributedescription.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblydescriptionattribute/assemblydescriptionattributector.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblydescriptionattribute/assemblydescriptionattributector.cs
new file mode 100644
index 0000000000..5f619b4c57
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblydescriptionattribute/assemblydescriptionattributector.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+public class AssemblyDescriptionAttributeCtor
+{
+ private int c_MIN_STR_LENGTH = 8;
+ private int c_MAX_STR_LENGTH = 256;
+ public static int Main()
+ {
+ AssemblyDescriptionAttributeCtor assemDescriptionAttrCtor = new AssemblyDescriptionAttributeCtor();
+ TestLibrary.TestFramework.BeginTestCase("AssemblyDescriptionAttributeCtor");
+ if (assemDescriptionAttrCtor.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Initialize the AssemblyDescriptionAttribute 1");
+ try
+ {
+ string description = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LENGTH, c_MAX_STR_LENGTH);
+ AssemblyDescriptionAttribute assemDescriptionAttr = new AssemblyDescriptionAttribute(description);
+ if (assemDescriptionAttr == null || assemDescriptionAttr.Description != description)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Initialize the AssemblyDescriptionAttribute 2");
+ try
+ {
+ string description = string.Empty;
+ AssemblyDescriptionAttribute assemDescriptionAttr = new AssemblyDescriptionAttribute(description);
+ if (assemDescriptionAttr == null || assemDescriptionAttr.Description != description)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Initialize the AssemblyDescriptionAttribute 3");
+ try
+ {
+ string description = null;
+ AssemblyDescriptionAttribute assemDescriptionAttr = new AssemblyDescriptionAttribute(description);
+ if (assemDescriptionAttr == null || assemDescriptionAttr.Description != description)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblydescriptionattribute/assemblydescriptionattributedescription.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblydescriptionattribute/assemblydescriptionattributedescription.cs
new file mode 100644
index 0000000000..65d61cfec0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblydescriptionattribute/assemblydescriptionattributedescription.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+/// <summary>
+/// AssemblyDescriptionAttribute.Description
+/// </summary>
+public class AssemblyDescriptionAttributeDescription
+{
+ private int c_MIN_STR_LENGTH = 8;
+ private int c_MAX_STR_LENGTH = 256;
+ public static int Main()
+ {
+ AssemblyDescriptionAttributeDescription assemDescriptionAttrDesprop = new AssemblyDescriptionAttributeDescription();
+ TestLibrary.TestFramework.BeginTestCase("AssemblyDescriptionAttributeDescription");
+ if (assemDescriptionAttrDesprop.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the description from initialized AssemblyDescriptionAttribute 1");
+ try
+ {
+ string description = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LENGTH, c_MAX_STR_LENGTH);
+ AssemblyDescriptionAttribute assemDescriptionAttr = new AssemblyDescriptionAttribute(description);
+ if (assemDescriptionAttr.Description != description)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the description from initialized AssemblyDescriptionAttribute 2");
+ try
+ {
+ string description = string.Empty;
+ AssemblyDescriptionAttribute assemDescriptionAttr = new AssemblyDescriptionAttribute(description);
+ if (assemDescriptionAttr.Description != "")
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Return the description from initialized AssemblyDescriptionAttribute 3");
+ try
+ {
+ string description = null;
+ AssemblyDescriptionAttribute assemDescriptionAttr = new AssemblyDescriptionAttribute(description);
+ if (assemDescriptionAttr.Description != null)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblykeyfileattribute/AssemblyKeyFileAttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/reflection/assemblykeyfileattribute/AssemblyKeyFileAttributeCtor.csproj
new file mode 100644
index 0000000000..d2afba8d40
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblykeyfileattribute/AssemblyKeyFileAttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="assemblykeyfileattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblykeyfileattribute/AssemblyKeyFileAttributeKeyFile.csproj b/tests/src/CoreMangLib/cti/system/reflection/assemblykeyfileattribute/AssemblyKeyFileAttributeKeyFile.csproj
new file mode 100644
index 0000000000..5acfa56029
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblykeyfileattribute/AssemblyKeyFileAttributeKeyFile.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="assemblykeyfileattributekeyfile.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblykeyfileattribute/assemblykeyfileattributector.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblykeyfileattribute/assemblykeyfileattributector.cs
new file mode 100644
index 0000000000..c4f2dc7904
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblykeyfileattribute/assemblykeyfileattributector.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// Ctor
+/// </summary>
+
+public class AssemblyKeyFileAttributeCtor
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Ctor.");
+
+ try
+ {
+ string keyFile = "keyfile";
+ AssemblyKeyFileAttribute akfa = new AssemblyKeyFileAttribute(keyFile);
+
+ if (akfa.KeyFile != keyFile)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Ctor Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ AssemblyKeyFileAttributeCtor test = new AssemblyKeyFileAttributeCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("AssemblyKeyFileAttributeCtor");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblykeyfileattribute/assemblykeyfileattributekeyfile.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblykeyfileattribute/assemblykeyfileattributekeyfile.cs
new file mode 100644
index 0000000000..e25469c10d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblykeyfileattribute/assemblykeyfileattributekeyfile.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// KeyFile
+/// </summary>
+
+public class AssemblyKeyFileAttributeKeyFile
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property KeyFile .");
+
+ try
+ {
+ string keyFile = "keyfile";
+ AssemblyKeyFileAttribute akfa = new AssemblyKeyFileAttribute(keyFile);
+
+ if (akfa.KeyFile != keyFile)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property KeyFile Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ AssemblyKeyFileAttributeKeyFile test = new AssemblyKeyFileAttributeKeyFile();
+
+ TestLibrary.TestFramework.BeginTestCase("AssemblyKeyFileAttributeKeyFile");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblykeynameattribute/AssemblyKeyNameAttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/reflection/assemblykeynameattribute/AssemblyKeyNameAttributeCtor.csproj
new file mode 100644
index 0000000000..0028ebc63e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblykeynameattribute/AssemblyKeyNameAttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="assemblykeynameattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblykeynameattribute/AssemblyKeyNameAttributeKeyName.csproj b/tests/src/CoreMangLib/cti/system/reflection/assemblykeynameattribute/AssemblyKeyNameAttributeKeyName.csproj
new file mode 100644
index 0000000000..0e1c19c596
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblykeynameattribute/AssemblyKeyNameAttributeKeyName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="assemblykeynameattributekeyname.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblykeynameattribute/assemblykeynameattributector.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblykeynameattribute/assemblykeynameattributector.cs
new file mode 100644
index 0000000000..710ad775bd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblykeynameattribute/assemblykeynameattributector.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+/// <summary>
+/// AssemblyKeyNameAttribute(String)
+/// </summary>
+public class AssemblyKeyNameAttributeCtor
+{
+ private int c_MIN_STR_LENGTH = 8;
+ private int c_MAX_STR_LENGTH = 256;
+ public static int Main()
+ {
+ AssemblyKeyNameAttributeCtor assemKeyNameAttrCtor = new AssemblyKeyNameAttributeCtor();
+ TestLibrary.TestFramework.BeginTestCase("AssemblyKeyNameAttributeCtor");
+ if (assemKeyNameAttrCtor.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Initialize the AssemblyKeyNameAttribute 1");
+ try
+ {
+ string keyname = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LENGTH, c_MAX_STR_LENGTH);
+ AssemblyKeyNameAttribute assemKeyNameAttr = new AssemblyKeyNameAttribute(keyname);
+ if (assemKeyNameAttr == null || assemKeyNameAttr.KeyName != keyname)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Initialize the AssemblyKeyNameAttribute 2");
+ try
+ {
+ string keyname = null;
+ AssemblyKeyNameAttribute assemKeyNameAttr = new AssemblyKeyNameAttribute(keyname);
+ if (assemKeyNameAttr == null || assemKeyNameAttr.KeyName != keyname)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Initialize the AssemblyKeyNameAttribute 3");
+ try
+ {
+ string keyname = string.Empty;
+ AssemblyKeyNameAttribute assemKeyNameAttr = new AssemblyKeyNameAttribute(keyname);
+ if (assemKeyNameAttr == null || assemKeyNameAttr.KeyName != keyname)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblykeynameattribute/assemblykeynameattributekeyname.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblykeynameattribute/assemblykeynameattributekeyname.cs
new file mode 100644
index 0000000000..a996168c2d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblykeynameattribute/assemblykeynameattributekeyname.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+/// <summary>
+/// AssemblyKeyNameAttribute.KeyName
+/// </summary>
+public class AssemblyKeyNameAttributeKeyName
+{
+ private int c_MIN_STR_LENGTH = 8;
+ private int c_MAX_STR_LENGTH = 256;
+ public static int Main()
+ {
+ AssemblyKeyNameAttributeKeyName assemKeyNameAttrKeyName = new AssemblyKeyNameAttributeKeyName();
+ TestLibrary.TestFramework.BeginTestCase("AssemblyKeyNameAttributeKeyName");
+ if (assemKeyNameAttrKeyName.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the KeyName info from initialized the AssemblyKeyNameAttribute 1");
+ try
+ {
+ string keyname = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LENGTH, c_MAX_STR_LENGTH);
+ AssemblyKeyNameAttribute assemKeyNameAttr = new AssemblyKeyNameAttribute(keyname);
+ if (assemKeyNameAttr.KeyName != keyname)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the KeyName info from initialized the AssemblyKeyNameAttribute 2");
+ try
+ {
+ string keyname = null;
+ AssemblyKeyNameAttribute assemKeyNameAttr = new AssemblyKeyNameAttribute(keyname);
+ if (assemKeyNameAttr.KeyName != null)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Return the KeyName info from initialized the AssemblyKeyNameAttribute 3");
+ try
+ {
+ string keyname = string.Empty;
+ AssemblyKeyNameAttribute assemKeyNameAttr = new AssemblyKeyNameAttribute(keyname);
+ if (assemKeyNameAttr.KeyName != "")
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblyname/AssemblyNameGetPublicKey.csproj b/tests/src/CoreMangLib/cti/system/reflection/assemblyname/AssemblyNameGetPublicKey.csproj
new file mode 100644
index 0000000000..3d57f609d2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblyname/AssemblyNameGetPublicKey.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="assemblynamegetpublickey.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblyname/AssemblyNameGetPublicKeyToken.csproj b/tests/src/CoreMangLib/cti/system/reflection/assemblyname/AssemblyNameGetPublicKeyToken.csproj
new file mode 100644
index 0000000000..b88e717afb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblyname/AssemblyNameGetPublicKeyToken.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="assemblynamegetpublickeytoken.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblyname/AssemblyNameSetPublicKey.csproj b/tests/src/CoreMangLib/cti/system/reflection/assemblyname/AssemblyNameSetPublicKey.csproj
new file mode 100644
index 0000000000..f45d1f7e8f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblyname/AssemblyNameSetPublicKey.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="assemblynamesetpublickey.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblyname/AssemblyNameSetPublicKeyToken.csproj b/tests/src/CoreMangLib/cti/system/reflection/assemblyname/AssemblyNameSetPublicKeyToken.csproj
new file mode 100644
index 0000000000..2d332162e8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblyname/AssemblyNameSetPublicKeyToken.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="assemblynamesetpublickeytoken.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblyname/AssemblyNameVersion.csproj b/tests/src/CoreMangLib/cti/system/reflection/assemblyname/AssemblyNameVersion.csproj
new file mode 100644
index 0000000000..0a4909b6d9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblyname/AssemblyNameVersion.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="assemblynameversion.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblyname/assemblynamegetpublickey.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblyname/assemblynamegetpublickey.cs
new file mode 100644
index 0000000000..e19f9213a5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblyname/assemblynamegetpublickey.cs
@@ -0,0 +1,118 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Security;
+using System.Reflection;
+
+[assembly: SecurityCritical]
+
+/// <summary>
+/// System.Reflection.AssembelyName.GetPublicKey()
+/// </summary>
+public class AssemblyNameGetPublicKey
+{
+ #region Main Entry
+ static public int Main()
+ {
+ AssemblyNameGetPublicKey test = new AssemblyNameGetPublicKey();
+
+ TestLibrary.TestFramework.BeginTestCase("AssembelyName.GetPublicKey");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #endregion
+
+ #region utility functions
+ string Key2String(byte[] key)
+ {
+ System.Text.StringBuilder result = new System.Text.StringBuilder(key.Length * 2);
+ for (int i = 0; i < key.Length; i++)
+ {
+ result.AppendFormat("{0:x2}", key[i]);
+ }
+ return result.ToString();
+ }
+
+ bool KeyEquals(byte[] k1, byte[] k2)
+ {
+ if (k1.Length != k2.Length)
+ return false;
+ for (int i = 0; i < k1.Length; i++)
+ {
+ if (k1[i] != k2[i])
+ return false;
+ }
+ return true;
+ }
+ #endregion
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ TestLibrary.TestFramework.BeginScenario("PosTest1: get default PublicKey");
+ bool retVal = true;
+ try
+ {
+ AssemblyName an = new AssemblyName();
+ byte[] key = an.GetPublicKey();
+ if (key != null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "expect (new AssemblyName()).GetPublicKey() == null");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ TestLibrary.TestFramework.BeginScenario("PosTest2: set then get and verify");
+ bool retVal = true;
+ try
+ {
+ byte[] key = new byte[TestLibrary.Generator.GetInt32(-55) % 255];
+
+ AssemblyName an = new AssemblyName();
+ an.SetPublicKey(key);
+
+ if (an.GetPublicKey() != key)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "expect AssemblyName.GetPublicKey() equals what it's been set");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblyname/assemblynamegetpublickeytoken.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblyname/assemblynamegetpublickeytoken.cs
new file mode 100644
index 0000000000..74960bdc3f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblyname/assemblynamegetpublickeytoken.cs
@@ -0,0 +1,118 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Security;
+using System.Reflection;
+
+[assembly: SecurityCritical]
+
+/// <summary>
+/// System.Reflection.AssembelyName.GetPublicKeyToken()
+/// </summary>
+public class AssemblyNameGetPublicKeyToken
+{
+ #region Main Entry
+ static public int Main()
+ {
+ AssemblyNameGetPublicKeyToken test = new AssemblyNameGetPublicKeyToken();
+
+ TestLibrary.TestFramework.BeginTestCase("AssembelyName.GetPublicKeyToken");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #endregion
+
+ #region utility functions
+ string Key2String(byte[] key)
+ {
+ System.Text.StringBuilder result = new System.Text.StringBuilder(key.Length * 2);
+ for (int i = 0; i < key.Length; i++)
+ {
+ result.AppendFormat("{0:x2}", key[i]);
+ }
+ return result.ToString();
+ }
+
+ bool KeyEquals(byte[] k1, byte[] k2)
+ {
+ if (k1.Length != k2.Length)
+ return false;
+ for (int i = 0; i < k1.Length; i++)
+ {
+ if (k1[i] != k2[i])
+ return false;
+ }
+ return true;
+ }
+ #endregion
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ TestLibrary.TestFramework.BeginScenario("PosTest1: get default PublicKeyToken");
+ bool retVal = true;
+ try
+ {
+ AssemblyName an = new AssemblyName();
+ byte[] key = an.GetPublicKeyToken();
+ if (key != null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "expect (new AssemblyName()).GetPublicKeyToken() == null");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ TestLibrary.TestFramework.BeginScenario("PosTest2: set then get and verify");
+ bool retVal = true;
+ try
+ {
+ byte[] key = new byte[TestLibrary.Generator.GetInt32(-55) % 255];
+
+ AssemblyName an = new AssemblyName();
+ an.SetPublicKeyToken(key);
+
+ if (an.GetPublicKeyToken() != key)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "expect AssemblyName.GetPublicKeyToken() equals what it's been set");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblyname/assemblynamesetpublickey.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblyname/assemblynamesetpublickey.cs
new file mode 100644
index 0000000000..b9b10bb5d5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblyname/assemblynamesetpublickey.cs
@@ -0,0 +1,124 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Security;
+using System.Reflection;
+
+[assembly: SecurityCritical]
+
+/// <summary>
+/// System.Reflection.AssembelyName.SetPublicKey(byte[])
+/// </summary>
+public class AssemblyNameSetPublicKey
+{
+ #region Main Entry
+ static public int Main()
+ {
+ AssemblyNameSetPublicKey test = new AssemblyNameSetPublicKey();
+
+ TestLibrary.TestFramework.BeginTestCase("AssembelyName.SetPublicKey(byte[])");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #endregion
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ TestLibrary.TestFramework.BeginScenario("PosTest1: set then get and verify");
+ bool retVal = true;
+ try
+ {
+ byte[] key = new byte[TestLibrary.Generator.GetInt32(-55) % 80 + 20];
+
+ AssemblyName an = new AssemblyName();
+ an.SetPublicKey(key);
+
+ if (an.GetPublicKey() != key)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "expect AssemblyName.GetPublicKey() equals what it's been set");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ TestLibrary.TestFramework.BeginScenario("PosTest2: set a 0 length key then get and verify");
+ bool retVal = true;
+ try
+ {
+ byte[] key = new byte[0];
+
+ AssemblyName an = new AssemblyName();
+ an.SetPublicKey(key);
+
+ if (an.GetPublicKey() != key)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "expect AssemblyName.GetPublicKey() equals what it's been set");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ TestLibrary.TestFramework.BeginScenario("PosTest2: set a null key then get and verify");
+ bool retVal = true;
+ try
+ {
+ byte[] key = null;
+
+ AssemblyName an = new AssemblyName();
+ an.SetPublicKey(key);
+
+ if (an.GetPublicKey() != key)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "expect AssemblyName.GetPublicKey() equals what it's been set");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblyname/assemblynamesetpublickeytoken.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblyname/assemblynamesetpublickeytoken.cs
new file mode 100644
index 0000000000..f065ea9572
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblyname/assemblynamesetpublickeytoken.cs
@@ -0,0 +1,123 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Security;
+using System.Reflection;
+
+[assembly: SecurityCritical]
+
+/// <summary>
+/// AssembelyName.SetPublicKeyToken(byte[])
+/// </summary>
+public class AssemblyNameSetPublicKeyToken
+{
+ #region Main Entry
+ static public int Main()
+ {
+ AssemblyNameSetPublicKeyToken test = new AssemblyNameSetPublicKeyToken();
+
+ TestLibrary.TestFramework.BeginTestCase("AssembelyName.SetPublicKeyToken");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #endregion
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ TestLibrary.TestFramework.BeginScenario("PosTest1: set then get and verify");
+ bool retVal = true;
+ try
+ {
+ byte[] key = new byte[TestLibrary.Generator.GetInt32(-55) % 255];
+ TestLibrary.Generator.GetBytes(-55, key);
+ AssemblyName an = new AssemblyName();
+ an.SetPublicKeyToken(key);
+
+ if (an.GetPublicKeyToken() != key)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "expect AssemblyName.GetPublicKeyToken() equals what it's been set");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ TestLibrary.TestFramework.BeginScenario("PosTest2: set a 0 length key then get and verify");
+ bool retVal = true;
+ try
+ {
+ byte[] key = new byte[0];
+
+ AssemblyName an = new AssemblyName();
+ an.SetPublicKeyToken(key);
+
+ if (an.GetPublicKeyToken() != key)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "expect AssemblyName.GetPublicKeyToken() equals what it's been set");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ TestLibrary.TestFramework.BeginScenario("PosTest2: set a null key then get and verify");
+ bool retVal = true;
+ try
+ {
+ byte[] key = null;
+
+ AssemblyName an = new AssemblyName();
+ an.SetPublicKeyToken(key);
+
+ if (an.GetPublicKeyToken() != key)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "expect AssemblyName.GetPublicKeyToken() equals what it's been set");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblyname/assemblynameversion.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblyname/assemblynameversion.cs
new file mode 100644
index 0000000000..30d1ca0a22
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblyname/assemblynameversion.cs
@@ -0,0 +1,125 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Security;
+using System.Reflection;
+
+[assembly: SecurityCritical]
+
+/// <summary>
+/// System.Reflection.AssembelyName.Version
+/// </summary>
+public class AssemblyNameVersion
+{
+ #region Main Entry
+ static public int Main()
+ {
+ AssemblyNameVersion test = new AssemblyNameVersion();
+
+ TestLibrary.TestFramework.BeginTestCase("AssembelyName.Version");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #endregion
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ TestLibrary.TestFramework.BeginScenario("PosTest1: check version which set in ctor");
+ bool retVal = true;
+ try
+ {
+ Version ver = new Version(1,0,0,1);
+ AssemblyName an = new AssemblyName("aa, Version="+ver.ToString());
+
+ if (!an.Version.Equals(ver))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "expect Version is " + ver.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ TestLibrary.TestFramework.BeginScenario("PosTest2: version in FullName");
+ bool retVal = true;
+ try
+ {
+ AssemblyName an = new AssemblyName("aa");
+ Version ver = new Version("10.100.1000.10000");
+
+ an.Version = ver;
+ if (!an.FullName.Contains("Version="+ver.ToString()))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "expect an.FullName.Contains " + ver.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ TestLibrary.TestFramework.BeginScenario("PosTest3: version set in ctor then set as null");
+ bool retVal = true;
+ try
+ {
+ Version ver = new Version("10.100.1000.10000");
+ AssemblyName an = new AssemblyName("aa, Version="+ver.ToString());
+
+ if (!an.Version.Equals(ver))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "expect Version is " + ver.ToString());
+ retVal = false;
+ }
+
+ an.Version = null;
+ if (an.Version != null)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "expect Version is " + ver.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.3", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/AssemblyNameFlagsNone.csproj b/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/AssemblyNameFlagsNone.csproj
new file mode 100644
index 0000000000..a7177b1a5c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/AssemblyNameFlagsNone.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="assemblynameflagsnone.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/AssemblyNameFlagsPublicKey.csproj b/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/AssemblyNameFlagsPublicKey.csproj
new file mode 100644
index 0000000000..41f85ebead
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/AssemblyNameFlagsPublicKey.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="assemblynameflagspublickey.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/AssemblyNameFlagsRetargetable.csproj b/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/AssemblyNameFlagsRetargetable.csproj
new file mode 100644
index 0000000000..bedd209f21
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/AssemblyNameFlagsRetargetable.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="assemblynameflagsretargetable.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/assemblynameflagsenablejitcompileoptimizer.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/assemblynameflagsenablejitcompileoptimizer.cs
new file mode 100644
index 0000000000..032069f42d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/assemblynameflagsenablejitcompileoptimizer.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// AssemblyNameFlags.EnableJITcompileOptimizer(v-yaduoj)
+/// </summary>
+public class AssemblyNameFlagsTest
+{
+ private enum MyAssemblyNameFlags
+ {
+ None = 0x0000,
+ PublicKey = 0x0001,
+ EnableJITcompileOptimizer = 0x4000,
+ EnableJITcompileTracking = 0x8000,
+ Retargetable = 0x0100,
+ }
+
+ public static int Main()
+ {
+ AssemblyNameFlagsTest testObj = new AssemblyNameFlagsTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: AssemblyNameFlags.EnableJITcompileOptimizer");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Assembly name flags is EnableJITcompileOptimizer";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyAssemblyNameFlags.EnableJITcompileOptimizer;
+ actualValue = (int)AssemblyNameFlags.EnableJITcompileOptimizer;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "EnableJITcompileOptimizer value of AssemblyNameFlags is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/assemblynameflagsenablejitcompiletracking.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/assemblynameflagsenablejitcompiletracking.cs
new file mode 100644
index 0000000000..13bc061900
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/assemblynameflagsenablejitcompiletracking.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// AssemblyNameFlags.EnableJITcompileTracking(v-yaduoj)
+/// </summary>
+public class AssemblyNameFlagsTest
+{
+ private enum MyAssemblyNameFlags
+ {
+ None = 0x0000,
+ PublicKey = 0x0001,
+ EnableJITcompileOptimizer = 0x4000,
+ EnableJITcompileTracking = 0x8000,
+ Retargetable = 0x0100,
+ }
+
+ public static int Main()
+ {
+ AssemblyNameFlagsTest testObj = new AssemblyNameFlagsTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: AssemblyNameFlags.EnableJITcompileTracking");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Assembly name flags is EnableJITcompileTracking";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyAssemblyNameFlags.EnableJITcompileTracking;
+ actualValue = (int)AssemblyNameFlags.EnableJITcompileTracking;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "EnableJITcompileTracking value of AssemblyNameFlags is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/assemblynameflagsnone.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/assemblynameflagsnone.cs
new file mode 100644
index 0000000000..95b490ed3e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/assemblynameflagsnone.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// AssemblyNameFlags.None(v-yaduoj)
+/// </summary>
+public class AssemblyNameFlagsTest
+{
+ private enum MyAssemblyNameFlags
+ {
+ None = 0x0000,
+ PublicKey = 0x0001,
+ EnableJITcompileOptimizer = 0x4000,
+ EnableJITcompileTracking = 0x8000,
+ Retargetable = 0x0100,
+ }
+
+ public static int Main()
+ {
+ AssemblyNameFlagsTest testObj = new AssemblyNameFlagsTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: AssemblyNameFlags.None");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Assembly name flags is None";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyAssemblyNameFlags.None;
+ actualValue = (int)AssemblyNameFlags.None;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "None value of AssemblyNameFlags is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/assemblynameflagspublickey.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/assemblynameflagspublickey.cs
new file mode 100644
index 0000000000..cbce308bab
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/assemblynameflagspublickey.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// AssemblyNameFlags.PublicKey(v-yaduoj)
+/// </summary>
+public class AssemblyNameFlagsTest
+{
+ private enum MyAssemblyNameFlags
+ {
+ None = 0x0000,
+ PublicKey = 0x0001,
+ EnableJITcompileOptimizer = 0x4000,
+ EnableJITcompileTracking = 0x8000,
+ Retargetable = 0x0100,
+ }
+
+ public static int Main()
+ {
+ AssemblyNameFlagsTest testObj = new AssemblyNameFlagsTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: AssemblyNameFlags.PublicKey");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Assembly name flags is PublicKey";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyAssemblyNameFlags.PublicKey;
+ actualValue = (int)AssemblyNameFlags.PublicKey;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "PublicKey value of AssemblyNameFlags is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/assemblynameflagsretargetable.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/assemblynameflagsretargetable.cs
new file mode 100644
index 0000000000..7c911688f2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblynameflags/assemblynameflagsretargetable.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// AssemblyNameFlags.Retargetable(v-yaduoj)
+/// </summary>
+public class AssemblyNameFlagsTest
+{
+ private enum MyAssemblyNameFlags
+ {
+ None = 0x0000,
+ PublicKey = 0x0001,
+ EnableJITcompileOptimizer = 0x4000,
+ EnableJITcompileTracking = 0x8000,
+ Retargetable = 0x0100,
+ }
+
+ public static int Main()
+ {
+ AssemblyNameFlagsTest testObj = new AssemblyNameFlagsTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: AssemblyNameFlags.Retargetable");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Assembly name flags is Retargetable";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyAssemblyNameFlags.Retargetable;
+ actualValue = (int)AssemblyNameFlags.Retargetable;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Retargetable value of AssemblyNameFlags is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblytitleattribute/AssemblyTitleAttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/reflection/assemblytitleattribute/AssemblyTitleAttributeCtor.csproj
new file mode 100644
index 0000000000..738e0e115d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblytitleattribute/AssemblyTitleAttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="assemblytitleattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblytitleattribute/AssemblyTitleAttributeTitle.csproj b/tests/src/CoreMangLib/cti/system/reflection/assemblytitleattribute/AssemblyTitleAttributeTitle.csproj
new file mode 100644
index 0000000000..7b7e78d746
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblytitleattribute/AssemblyTitleAttributeTitle.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="assemblytitleattributetitle.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblytitleattribute/assemblytitleattributector.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblytitleattribute/assemblytitleattributector.cs
new file mode 100644
index 0000000000..2f0dcd15dd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblytitleattribute/assemblytitleattributector.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+/// <summary>
+/// AssemblyTitleAttribute(String)
+/// </summary>
+public class AssemblyTitleAttributeCtor
+{
+ private int c_MIN_STR_LENGTH = 8;
+ private int c_MAX_STR_LENGTH = 256;
+ public static int Main()
+ {
+ AssemblyTitleAttributeCtor assemTitleAttrCtor = new AssemblyTitleAttributeCtor();
+ TestLibrary.TestFramework.BeginTestCase("AssemblyTitleAttributeCtor");
+ if (assemTitleAttrCtor.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Initialize the AssemblyTitleAttribute 1");
+ try
+ {
+ string title = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LENGTH, c_MAX_STR_LENGTH);
+ AssemblyTitleAttribute assemTitleAttr = new AssemblyTitleAttribute(title);
+ if (assemTitleAttr == null || assemTitleAttr.Title != title)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Initialize the AssemblyTitleAttribute 2");
+ try
+ {
+ string title = null;
+ AssemblyTitleAttribute assemTitleAttr = new AssemblyTitleAttribute(title);
+ if (assemTitleAttr == null || assemTitleAttr.Title != null)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Initialize the AssemblyTitleAttribute 3");
+ try
+ {
+ string title = string.Empty;
+ AssemblyTitleAttribute assemTitleAttr = new AssemblyTitleAttribute(title);
+ if (assemTitleAttr == null || assemTitleAttr.Title != "")
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/assemblytitleattribute/assemblytitleattributetitle.cs b/tests/src/CoreMangLib/cti/system/reflection/assemblytitleattribute/assemblytitleattributetitle.cs
new file mode 100644
index 0000000000..f2a306b84a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/assemblytitleattribute/assemblytitleattributetitle.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+/// <summary>
+/// AssemblyTitleAttribute.Title
+/// </summary>
+public class AssemblyTitleAttributeTitle
+{
+ private int c_MIN_STR_LENGTH = 8;
+ private int c_MAX_STR_LENGTH = 256;
+ public static int Main()
+ {
+ AssemblyTitleAttributeTitle assemTitleAttrTitle = new AssemblyTitleAttributeTitle();
+ TestLibrary.TestFramework.BeginTestCase("AssemblyTitleAttributeTitle");
+ if (assemTitleAttrTitle.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the Title info from initialized AssemblyTitleAttribute 1");
+ try
+ {
+ string title = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LENGTH, c_MAX_STR_LENGTH);
+ AssemblyTitleAttribute assemTitleAttr = new AssemblyTitleAttribute(title);
+ if (assemTitleAttr.Title != title)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the Title info from initialized AssemblyTitleAttribute 2");
+ try
+ {
+ string title = null;
+ AssemblyTitleAttribute assemTitleAttr = new AssemblyTitleAttribute(title);
+ if (assemTitleAttr.Title != null)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Return the Title info from initialized AssemblyTitleAttribute 3");
+ try
+ {
+ string title = string.Empty;
+ AssemblyTitleAttribute assemTitleAttr = new AssemblyTitleAttribute(title);
+ if (assemTitleAttr.Title != "")
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/callingconventions/CallingConventionsAny.csproj b/tests/src/CoreMangLib/cti/system/reflection/callingconventions/CallingConventionsAny.csproj
new file mode 100644
index 0000000000..7a2bee6878
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/callingconventions/CallingConventionsAny.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="callingconventionsany.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/callingconventions/CallingConventionsExplicitThis.csproj b/tests/src/CoreMangLib/cti/system/reflection/callingconventions/CallingConventionsExplicitThis.csproj
new file mode 100644
index 0000000000..301b8bbb3c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/callingconventions/CallingConventionsExplicitThis.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="callingconventionsexplicitthis.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/callingconventions/CallingConventionsHasThis.csproj b/tests/src/CoreMangLib/cti/system/reflection/callingconventions/CallingConventionsHasThis.csproj
new file mode 100644
index 0000000000..96c9501b9d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/callingconventions/CallingConventionsHasThis.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="callingconventionshasthis.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/callingconventions/CallingConventionsStandard.csproj b/tests/src/CoreMangLib/cti/system/reflection/callingconventions/CallingConventionsStandard.csproj
new file mode 100644
index 0000000000..14e3694410
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/callingconventions/CallingConventionsStandard.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="callingconventionsstandard.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/callingconventions/CallingConventionsVarArgs.csproj b/tests/src/CoreMangLib/cti/system/reflection/callingconventions/CallingConventionsVarArgs.csproj
new file mode 100644
index 0000000000..7240c0b39a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/callingconventions/CallingConventionsVarArgs.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="callingconventionsvarargs.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/callingconventions/callingconventionsany.cs b/tests/src/CoreMangLib/cti/system/reflection/callingconventions/callingconventionsany.cs
new file mode 100644
index 0000000000..21e727f4f9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/callingconventions/callingconventionsany.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// CallingConventions.Any [v-yaduoj]
+/// </summary>
+public class CallingConventionsTest
+{
+ private enum MyCallingConventions
+ {
+ Standard = 0x0001,
+ VarArgs = 0x0002,
+ Any = Standard | VarArgs,
+ HasThis = 0x0020,
+ ExplicitThis = 0x0040,
+ }
+
+ public static int Main()
+ {
+ CallingConventionsTest testObj = new CallingConventionsTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: CallingConventions.Any");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Calling convention is Any";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyCallingConventions.Any;
+ actualValue = (int)CallingConventions.Any;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Any value of CallingConventionsAny is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/callingconventions/callingconventionsexplicitthis.cs b/tests/src/CoreMangLib/cti/system/reflection/callingconventions/callingconventionsexplicitthis.cs
new file mode 100644
index 0000000000..7381fec3eb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/callingconventions/callingconventionsexplicitthis.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// CallingConventions.ExplicitThis [v-yaduoj]
+/// </summary>
+public class CallingConventionsTest
+{
+ private enum MyCallingConventions
+ {
+ Standard = 0x0001,
+ VarArgs = 0x0002,
+ Any = ExplicitThis | VarArgs,
+ HasThis = 0x0020,
+ ExplicitThis = 0x0040,
+ }
+
+ public static int Main()
+ {
+ CallingConventionsTest testObj = new CallingConventionsTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: CallingConventions.ExplicitThis");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Calling convention is ExplicitThis";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyCallingConventions.ExplicitThis;
+ actualValue = (int)CallingConventions.ExplicitThis;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "ExplicitThis value of CallingConventionsExplicitThis is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/callingconventions/callingconventionshasthis.cs b/tests/src/CoreMangLib/cti/system/reflection/callingconventions/callingconventionshasthis.cs
new file mode 100644
index 0000000000..eeaeeb7881
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/callingconventions/callingconventionshasthis.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// CallingConventions.HasThis [v-yaduoj]
+/// </summary>
+public class CallingConventionsTest
+{
+ private enum MyCallingConventions
+ {
+ Standard = 0x0001,
+ VarArgs = 0x0002,
+ Any = HasThis | VarArgs,
+ HasThis = 0x0020,
+ ExplicitThis = 0x0040,
+ }
+
+ public static int Main()
+ {
+ CallingConventionsTest testObj = new CallingConventionsTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: CallingConventions.HasThis");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Calling convention is HasThis";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyCallingConventions.HasThis;
+ actualValue = (int)CallingConventions.HasThis;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "HasThis value of CallingConventionsHasThis is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/callingconventions/callingconventionsstandard.cs b/tests/src/CoreMangLib/cti/system/reflection/callingconventions/callingconventionsstandard.cs
new file mode 100644
index 0000000000..dedf202525
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/callingconventions/callingconventionsstandard.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// CallingConventions.Standard [v-yaduoj]
+/// </summary>
+public class CallingConventionsTest
+{
+ private enum MyCallingConventions
+ {
+ Standard = 0x0001,
+ VarArgs = 0x0002,
+ Any = Standard | VarArgs,
+ HasThis = 0x0020,
+ ExplicitThis = 0x0040,
+ }
+
+ public static int Main()
+ {
+ CallingConventionsTest testObj = new CallingConventionsTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: CallingConventions.Standard");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Calling convention is Standard";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyCallingConventions.Standard;
+ actualValue = (int)CallingConventions.Standard;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Standard value of CallingConventionsStandard is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/callingconventions/callingconventionsvarargs.cs b/tests/src/CoreMangLib/cti/system/reflection/callingconventions/callingconventionsvarargs.cs
new file mode 100644
index 0000000000..c8ff50e1b8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/callingconventions/callingconventionsvarargs.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// CallingConventions.VarArgs [v-yaduoj]
+/// </summary>
+public class CallingConventionsTest
+{
+ private enum MyCallingConventions
+ {
+ Standard = 0x0001,
+ VarArgs = 0x0002,
+ Any = VarArgs | VarArgs,
+ HasThis = 0x0020,
+ ExplicitThis = 0x0040,
+ }
+
+ public static int Main()
+ {
+ CallingConventionsTest testObj = new CallingConventionsTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: CallingConventions.VarArgs");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Calling convention is VarArgs";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyCallingConventions.VarArgs;
+ actualValue = (int)CallingConventions.VarArgs;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "VarArgs value of CallingConventionsVarArgs is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/constructorinfo/ConstructorInfoConstructorName.csproj b/tests/src/CoreMangLib/cti/system/reflection/constructorinfo/ConstructorInfoConstructorName.csproj
new file mode 100644
index 0000000000..582389845a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/constructorinfo/ConstructorInfoConstructorName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="constructorinfoconstructorname.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/constructorinfo/ConstructorInfoTypeConstructorName.csproj b/tests/src/CoreMangLib/cti/system/reflection/constructorinfo/ConstructorInfoTypeConstructorName.csproj
new file mode 100644
index 0000000000..504f6f7c97
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/constructorinfo/ConstructorInfoTypeConstructorName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="constructorinfotypeconstructorname.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/constructorinfo/constructorinfoconstructorname.cs b/tests/src/CoreMangLib/cti/system/reflection/constructorinfo/constructorinfoconstructorname.cs
new file mode 100644
index 0000000000..d339518dd9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/constructorinfo/constructorinfoconstructorname.cs
@@ -0,0 +1,69 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// ConstructorName
+/// </summary>
+public class ConstructorInfoConstructorName
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Ensure ConstructorInfo.ContructorName is correct");
+
+ try
+ {
+ if (ConstructorInfo.ConstructorName != ".ctor")
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ConstructorName is not correct");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConstructorInfoConstructorName test = new ConstructorInfoConstructorName();
+
+ TestLibrary.TestFramework.BeginTestCase("ConstructorInfoConstructorName");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/constructorinfo/constructorinfotypeconstructorname.cs b/tests/src/CoreMangLib/cti/system/reflection/constructorinfo/constructorinfotypeconstructorname.cs
new file mode 100644
index 0000000000..ab67198cc9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/constructorinfo/constructorinfotypeconstructorname.cs
@@ -0,0 +1,70 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// TypeConstructorName
+/// </summary>
+
+public class ConstructorInfoTypeConstructorName
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Ensure ConstructorInfo.TypeContructorName is correct");
+
+ try
+ {
+ if (ConstructorInfo.TypeConstructorName != ".cctor")
+ {
+ TestLibrary.TestFramework.LogError("001.1", "TypeConstructorName is not correct");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ConstructorInfoTypeConstructorName test = new ConstructorInfoTypeConstructorName();
+
+ TestLibrary.TestFramework.BeginTestCase("ConstructorInfoTypeConstructorName");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/defaultmemberattribute/DefaultMemberAttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/reflection/defaultmemberattribute/DefaultMemberAttributeCtor.csproj
new file mode 100644
index 0000000000..ab6ca414c8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/defaultmemberattribute/DefaultMemberAttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="defaultmemberattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/defaultmemberattribute/DefaultMemberAttributeMemberName.csproj b/tests/src/CoreMangLib/cti/system/reflection/defaultmemberattribute/DefaultMemberAttributeMemberName.csproj
new file mode 100644
index 0000000000..c982ed5e81
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/defaultmemberattribute/DefaultMemberAttributeMemberName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="defaultmemberattributemembername.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/defaultmemberattribute/defaultmemberattributector.cs b/tests/src/CoreMangLib/cti/system/reflection/defaultmemberattribute/defaultmemberattributector.cs
new file mode 100644
index 0000000000..649bcbf756
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/defaultmemberattribute/defaultmemberattributector.cs
@@ -0,0 +1,140 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// DefaultMemberAttribute.Ctor(System.String)
+/// </summary>
+public class DefaultMemberAttributeCtor
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ public static int Main()
+ {
+ DefaultMemberAttributeCtor dmaCtor = new DefaultMemberAttributeCtor();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Method: System.Reflection.DefaultMemberAttribute.Ctor(System.String)...");
+
+ if (dmaCtor.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify the memberName is random string... ";
+ const string c_TEST_ID = "P001";
+
+ string memberName = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ DefaultMemberAttribute dma = new DefaultMemberAttribute(memberName);
+ if (dma == null)
+ {
+ string errorDesc = "the DefaultMemberAttribute ctor error occurred.)";
+ errorDesc += "\n parameter is " + memberName;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: the parameter is empty ... ";
+ const string c_TEST_ID = "P002";
+
+ string memberName = "";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ DefaultMemberAttribute dma = new DefaultMemberAttribute(memberName);
+ if (dma == null)
+ {
+ string errorDesc = "the DefaultMemberAttribute ctor error occurred.)";
+ errorDesc += "\n parameter is empty";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: the parameter is a null reference ... ";
+ const string c_TEST_ID = "P003";
+
+ string memberName = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ DefaultMemberAttribute dma = new DefaultMemberAttribute(memberName);
+ if (dma == null)
+ {
+ string errorDesc = "the DefaultMemberAttribute ctor error occurred.)";
+ errorDesc += "\n parameter is a null reference";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/defaultmemberattribute/defaultmemberattributemembername.cs b/tests/src/CoreMangLib/cti/system/reflection/defaultmemberattribute/defaultmemberattributemembername.cs
new file mode 100644
index 0000000000..b91b2cbfae
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/defaultmemberattribute/defaultmemberattributemembername.cs
@@ -0,0 +1,138 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.DefaultMemberAttribute.MemberName
+/// </summary>
+public class DefaultMemberAttributeMemberName
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ public static int Main()
+ {
+ DefaultMemberAttributeMemberName dmaMemberName = new DefaultMemberAttributeMemberName();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Method: DefaultMemberAttribute.Ctor()...");
+
+ if (dmaMemberName.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verfify property MemberName is random string ... ";
+ string c_TEST_ID = "P001";
+ string memberName = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ DefaultMemberAttribute dma = new DefaultMemberAttribute(memberName);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ if (dma.MemberName != memberName)
+ {
+ string errorDesc = "value is not " + memberName + " as expected: Actual is " + dma.MemberName;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verfify the MemberName is empty ... ";
+ string c_TEST_ID = "P002";
+ string memberName = "";
+
+ DefaultMemberAttribute dma = new DefaultMemberAttribute(memberName);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ if (dma.MemberName != memberName)
+ {
+ string errorDesc = "value is not " + memberName + " as expected: Actual is empty";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verfify the MemberName is a null reference ... ";
+ string c_TEST_ID = "P003";
+ string memberName = null;
+
+ DefaultMemberAttribute dma = new DefaultMemberAttribute(memberName);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ if (dma.MemberName != memberName)
+ {
+ string errorDesc = "value is not " + memberName + " as expected: Actual is null";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexcpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlBranch.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlBranch.csproj
new file mode 100644
index 0000000000..a32078f8f0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlBranch.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="flowcontrolbranch.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlCall.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlCall.csproj
new file mode 100644
index 0000000000..1de002acbe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlCall.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="flowcontrolcall.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlCond_Branch.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlCond_Branch.csproj
new file mode 100644
index 0000000000..64ffc94cff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlCond_Branch.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="flowcontrolcond_branch.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlMeta.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlMeta.csproj
new file mode 100644
index 0000000000..503257fd4c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlMeta.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="flowcontrolmeta.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlNext.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlNext.csproj
new file mode 100644
index 0000000000..8fd6bdb5f2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlNext.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="flowcontrolnext.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlReturn.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlReturn.csproj
new file mode 100644
index 0000000000..7fbadb67cd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlReturn.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="flowcontrolreturn.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlThrow.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlThrow.csproj
new file mode 100644
index 0000000000..32f5706e04
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/FlowControlThrow.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="flowcontrolthrow.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolbranch.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolbranch.cs
new file mode 100644
index 0000000000..bc21a77493
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolbranch.cs
@@ -0,0 +1,71 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Branch [v-yishi]
+/// </summary>
+public class FlowControlBranch
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The value of Branch should be 0");
+
+ try
+ {
+ int actual = (int)FlowControl.Branch;
+ if (actual != 0)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The value of Branch is not 0");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FlowControlBranch test = new FlowControlBranch();
+
+ TestLibrary.TestFramework.BeginTestCase("FlowControlBranch");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolcall.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolcall.cs
new file mode 100644
index 0000000000..94b058964e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolcall.cs
@@ -0,0 +1,71 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Call [v-yishi]
+/// </summary>
+public class FlowControlCall
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The value of Call should be 2");
+
+ try
+ {
+ int actual = (int)FlowControl.Call;
+ if (actual != 2)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The value of Call is not 2");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FlowControlCall test = new FlowControlCall();
+
+ TestLibrary.TestFramework.BeginTestCase("FlowControlCall");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolcond_branch.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolcond_branch.cs
new file mode 100644
index 0000000000..163dceecc4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolcond_branch.cs
@@ -0,0 +1,71 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Cond_Branch [v-yishi]
+/// </summary>
+public class FlowControlCond_Branch
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The value of Cond_Branch should be 3");
+
+ try
+ {
+ int actual = (int)FlowControl.Cond_Branch;
+ if (actual != 3)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The value of Cond_Branch is not 3");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FlowControlCond_Branch test = new FlowControlCond_Branch();
+
+ TestLibrary.TestFramework.BeginTestCase("FlowControlCond_Branch");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolmeta.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolmeta.cs
new file mode 100644
index 0000000000..e449eeecbc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolmeta.cs
@@ -0,0 +1,71 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Meta [v-yishi]
+/// </summary>
+public class FlowControlMeta
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The value of Meta should be 4");
+
+ try
+ {
+ int actual = (int)FlowControl.Meta;
+ if (actual != 4)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The value of Meta is not 4");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FlowControlMeta test = new FlowControlMeta();
+
+ TestLibrary.TestFramework.BeginTestCase("FlowControlMeta");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolnext.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolnext.cs
new file mode 100644
index 0000000000..e0fc03ed07
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolnext.cs
@@ -0,0 +1,71 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Next [v-yishi]
+/// </summary>
+public class FlowControlNext
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The value of Next should be 5");
+
+ try
+ {
+ int actual = (int)FlowControl.Next;
+ if (actual != 5)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The value of Next is not 5");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FlowControlNext test = new FlowControlNext();
+
+ TestLibrary.TestFramework.BeginTestCase("FlowControlNext");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolreturn.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolreturn.cs
new file mode 100644
index 0000000000..1682a5d05a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolreturn.cs
@@ -0,0 +1,71 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Return [v-yishi]
+/// </summary>
+public class FlowControlReturn
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The value of Return should be 7");
+
+ try
+ {
+ int actual = (int)FlowControl.Return;
+ if (actual != 7)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The value of Return is not 7");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FlowControlReturn test = new FlowControlReturn();
+
+ TestLibrary.TestFramework.BeginTestCase("FlowControlReturn");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolthrow.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolthrow.cs
new file mode 100644
index 0000000000..a69a54a106
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/flowcontrol/flowcontrolthrow.cs
@@ -0,0 +1,71 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Throw [v-yishi]
+/// </summary>
+public class FlowControlThrow
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The value of Throw should be 8");
+
+ try
+ {
+ int actual = (int)FlowControl.Throw;
+ if (actual != 8)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The value of Throw is not 8");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FlowControlThrow test = new FlowControlThrow();
+
+ TestLibrary.TestFramework.BeginTestCase("FlowControlThrow");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeEquals1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeEquals1.csproj
new file mode 100644
index 0000000000..7015bbcf82
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeEquals1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodeequals1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeEquals2.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeEquals2.csproj
new file mode 100644
index 0000000000..efac612ca3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeEquals2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodeequals2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeFlowControl.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeFlowControl.csproj
new file mode 100644
index 0000000000..73cfd056bb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeFlowControl.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodeflowcontrol.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeGetHashCode.csproj
new file mode 100644
index 0000000000..1f4cd5148f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodegethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeName.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeName.csproj
new file mode 100644
index 0000000000..fb595542d6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodename.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeOpCodeType.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeOpCodeType.csproj
new file mode 100644
index 0000000000..734b96b92a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeOpCodeType.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodeopcodetype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeOperandType.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeOperandType.csproj
new file mode 100644
index 0000000000..f53d7a2e04
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeOperandType.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodeoperandtype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeSize.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeSize.csproj
new file mode 100644
index 0000000000..9d53d50df8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeSize.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesize.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeStackBehaviourPop.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeStackBehaviourPop.csproj
new file mode 100644
index 0000000000..3216fc25e0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeStackBehaviourPop.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodestackbehaviourpop.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeStackBehaviourPush.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeStackBehaviourPush.csproj
new file mode 100644
index 0000000000..75b916a37a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeStackBehaviourPush.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodestackbehaviourpush.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeToString.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeToString.csproj
new file mode 100644
index 0000000000..ef5db01e76
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeToString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodetostring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeValue.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeValue.csproj
new file mode 100644
index 0000000000..e883f168ed
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodeValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodevalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesAdd_Ovf.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesAdd_Ovf.csproj
new file mode 100644
index 0000000000..55c1af1cf0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesAdd_Ovf.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesadd_ovf.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesAdd_Ovf_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesAdd_Ovf_Un.csproj
new file mode 100644
index 0000000000..cf0dd17997
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesAdd_Ovf_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesadd_ovf_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesAnd.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesAnd.csproj
new file mode 100644
index 0000000000..208578fd74
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesAnd.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesand.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesArglist.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesArglist.csproj
new file mode 100644
index 0000000000..690bb42dde
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesArglist.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesarglist.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBeq.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBeq.csproj
new file mode 100644
index 0000000000..3d57b0c25c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBeq.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesbeq.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBeq_S.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBeq_S.csproj
new file mode 100644
index 0000000000..6a3d64a27b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBeq_S.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesbeq_s.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBge.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBge.csproj
new file mode 100644
index 0000000000..5e0b877622
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBge.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesbge.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBge_S.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBge_S.csproj
new file mode 100644
index 0000000000..3391adb73e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBge_S.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesbge_s.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBge_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBge_Un.csproj
new file mode 100644
index 0000000000..639ad11a5d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBge_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesbge_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBge_Un_S.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBge_Un_S.csproj
new file mode 100644
index 0000000000..a462f27818
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBge_Un_S.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesbge_un_s.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBgt.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBgt.csproj
new file mode 100644
index 0000000000..515a115e38
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBgt.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesbgt.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBgt_S.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBgt_S.csproj
new file mode 100644
index 0000000000..2fec1e5d9f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBgt_S.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesbgt_s.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBgt_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBgt_Un.csproj
new file mode 100644
index 0000000000..dfec19da92
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBgt_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesbgt_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBgt_Un_S.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBgt_Un_S.csproj
new file mode 100644
index 0000000000..cb673dc88a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBgt_Un_S.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesbgt_un_s.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBle.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBle.csproj
new file mode 100644
index 0000000000..240ce5efad
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBle.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesble.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBle_S.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBle_S.csproj
new file mode 100644
index 0000000000..81cc2a5b59
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBle_S.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesble_s.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBle_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBle_Un.csproj
new file mode 100644
index 0000000000..b668e9ccd2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBle_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesble_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBle_Un_S.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBle_Un_S.csproj
new file mode 100644
index 0000000000..b78ef4f2f6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBle_Un_S.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesble_un_s.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBlt.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBlt.csproj
new file mode 100644
index 0000000000..c87ad162d4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBlt.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesblt.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBlt_S.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBlt_S.csproj
new file mode 100644
index 0000000000..efa8405b24
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBlt_S.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesblt_s.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBlt_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBlt_Un.csproj
new file mode 100644
index 0000000000..8e782d1677
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBlt_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesblt_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBlt_Un_S.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBlt_Un_S.csproj
new file mode 100644
index 0000000000..7e505399a5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBlt_Un_S.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesblt_un_s.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBne_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBne_Un.csproj
new file mode 100644
index 0000000000..0bee82de84
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBne_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesbne_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBne_Un_S.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBne_Un_S.csproj
new file mode 100644
index 0000000000..d84e6b5101
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBne_Un_S.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesbne_un_s.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBox.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBox.csproj
new file mode 100644
index 0000000000..7c17f3952e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBox.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesbox.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBr.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBr.csproj
new file mode 100644
index 0000000000..ca68026746
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBr.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesbr.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBr_S.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBr_S.csproj
new file mode 100644
index 0000000000..6b316251fc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBr_S.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesbr_s.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBreak.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBreak.csproj
new file mode 100644
index 0000000000..448aec43a7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBreak.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesbreak.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBrfalse.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBrfalse.csproj
new file mode 100644
index 0000000000..6f26167c14
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBrfalse.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesbrfalse.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBrfalse_S.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBrfalse_S.csproj
new file mode 100644
index 0000000000..528b96e0ae
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBrfalse_S.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesbrfalse_s.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBrtrue.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBrtrue.csproj
new file mode 100644
index 0000000000..f0e7ff0eda
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBrtrue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesbrtrue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBrtrue_S.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBrtrue_S.csproj
new file mode 100644
index 0000000000..37d32511a8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesBrtrue_S.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesbrtrue_s.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCall.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCall.csproj
new file mode 100644
index 0000000000..ead7451528
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCall.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodescall.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCalli.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCalli.csproj
new file mode 100644
index 0000000000..b209da4a04
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCalli.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodescalli.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCallvirt.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCallvirt.csproj
new file mode 100644
index 0000000000..78e9175eff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCallvirt.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodescallvirt.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCastclass.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCastclass.csproj
new file mode 100644
index 0000000000..2b296e8c64
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCastclass.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodescastclass.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCeq.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCeq.csproj
new file mode 100644
index 0000000000..1f8db339df
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCeq.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesceq.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCgt.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCgt.csproj
new file mode 100644
index 0000000000..216e11196f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCgt.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodescgt.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCgt_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCgt_Un.csproj
new file mode 100644
index 0000000000..22ff4f9b8d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCgt_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodescgt_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCkfinite.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCkfinite.csproj
new file mode 100644
index 0000000000..6e511ddf94
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCkfinite.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesckfinite.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesClt.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesClt.csproj
new file mode 100644
index 0000000000..e9cbe66dd9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesClt.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesclt.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesClt_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesClt_Un.csproj
new file mode 100644
index 0000000000..07a4b008eb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesClt_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesclt_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConstrained.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConstrained.csproj
new file mode 100644
index 0000000000..37c82dae58
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConstrained.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconstrained.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_I.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_I.csproj
new file mode 100644
index 0000000000..d4feda1441
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_I.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_i.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_I1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_I1.csproj
new file mode 100644
index 0000000000..badcf3bb12
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_I1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_i1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_I2.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_I2.csproj
new file mode 100644
index 0000000000..ec59e238bc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_I2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_i2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_I4.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_I4.csproj
new file mode 100644
index 0000000000..d643ea331b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_I4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_i4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_I8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_I8.csproj
new file mode 100644
index 0000000000..194111d99e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_I8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_i8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I.csproj
new file mode 100644
index 0000000000..a76a54b453
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_ovf_i.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I1.csproj
new file mode 100644
index 0000000000..2fee57fbea
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_ovf_i1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I1_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I1_Un.csproj
new file mode 100644
index 0000000000..1e4b152f16
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I1_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_ovf_i1_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I2.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I2.csproj
new file mode 100644
index 0000000000..f8b987f739
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_ovf_i2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I2_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I2_Un.csproj
new file mode 100644
index 0000000000..de2b128549
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I2_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_ovf_i2_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I4.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I4.csproj
new file mode 100644
index 0000000000..db23375f0e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_ovf_i4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I4_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I4_Un.csproj
new file mode 100644
index 0000000000..77c0ca50fa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I4_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_ovf_i4_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I8.csproj
new file mode 100644
index 0000000000..ef6dd01f2d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_ovf_i8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I8_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I8_Un.csproj
new file mode 100644
index 0000000000..9a20100a86
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I8_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_ovf_i8_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I_Un.csproj
new file mode 100644
index 0000000000..b82faf29c8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_I_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_ovf_i_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U.csproj
new file mode 100644
index 0000000000..b1a5ffef7f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_ovf_u.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U1.csproj
new file mode 100644
index 0000000000..49d93cfe9d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_ovf_u1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U1_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U1_Un.csproj
new file mode 100644
index 0000000000..d75f2c4c2e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U1_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_ovf_u1_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U2.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U2.csproj
new file mode 100644
index 0000000000..d1c9c1feb8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_ovf_u2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U2_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U2_Un.csproj
new file mode 100644
index 0000000000..44ad85c7f8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U2_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_ovf_u2_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U4.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U4.csproj
new file mode 100644
index 0000000000..00f9ada47d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_ovf_u4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U4_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U4_Un.csproj
new file mode 100644
index 0000000000..952a1e619f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U4_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_ovf_u4_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U8.csproj
new file mode 100644
index 0000000000..b936cd7490
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_ovf_u8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U8_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U8_Un.csproj
new file mode 100644
index 0000000000..eed2081bf9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U8_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_ovf_u8_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U_Un.csproj
new file mode 100644
index 0000000000..8be80addde
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_Ovf_U_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_ovf_u_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_R4.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_R4.csproj
new file mode 100644
index 0000000000..df84165fb3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_R4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_r4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_R8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_R8.csproj
new file mode 100644
index 0000000000..362d7d1087
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_R8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_r8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_R_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_R_Un.csproj
new file mode 100644
index 0000000000..b36efa17e3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_R_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_r_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_U.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_U.csproj
new file mode 100644
index 0000000000..b9848d1c91
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_U.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_u.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_U1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_U1.csproj
new file mode 100644
index 0000000000..4eb8ef63cb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_U1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_u1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_U2.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_U2.csproj
new file mode 100644
index 0000000000..2eb2089d8a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_U2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_u2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_U4.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_U4.csproj
new file mode 100644
index 0000000000..52742d1958
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_U4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_u4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_U8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_U8.csproj
new file mode 100644
index 0000000000..c05c604d06
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesConv_U8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesconv_u8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCpblk.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCpblk.csproj
new file mode 100644
index 0000000000..2b9d534255
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCpblk.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodescpblk.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCpobj.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCpobj.csproj
new file mode 100644
index 0000000000..f3bdb90f94
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesCpobj.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodescpobj.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesDiv.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesDiv.csproj
new file mode 100644
index 0000000000..dd8af4940e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesDiv.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesdiv.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesDiv_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesDiv_Un.csproj
new file mode 100644
index 0000000000..6b3c3dec43
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesDiv_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesdiv_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesDup.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesDup.csproj
new file mode 100644
index 0000000000..b623638df8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesDup.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesdup.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesEndfilter.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesEndfilter.csproj
new file mode 100644
index 0000000000..2634b24815
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesEndfilter.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesendfilter.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesEndfinally.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesEndfinally.csproj
new file mode 100644
index 0000000000..a8d2f3ab44
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesEndfinally.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesendfinally.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesInitblk.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesInitblk.csproj
new file mode 100644
index 0000000000..5154c74670
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesInitblk.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesinitblk.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesInitobj.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesInitobj.csproj
new file mode 100644
index 0000000000..8f5d9d3b40
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesInitobj.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesinitobj.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesIsinst.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesIsinst.csproj
new file mode 100644
index 0000000000..6674be129d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesIsinst.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesisinst.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesJmp.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesJmp.csproj
new file mode 100644
index 0000000000..3e51fbffc3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesJmp.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesjmp.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg.csproj
new file mode 100644
index 0000000000..aa8b46e444
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldarg.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg_0.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg_0.csproj
new file mode 100644
index 0000000000..186d45ec29
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg_0.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldarg_0.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg_1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg_1.csproj
new file mode 100644
index 0000000000..3a98e2934b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg_1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldarg_1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg_2.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg_2.csproj
new file mode 100644
index 0000000000..8c10400daf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg_2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldarg_2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg_3.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg_3.csproj
new file mode 100644
index 0000000000..3b7a145f19
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg_3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldarg_3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg_S.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg_S.csproj
new file mode 100644
index 0000000000..f97a2060e2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarg_S.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldarg_s.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarga.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarga.csproj
new file mode 100644
index 0000000000..bff752e27e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarga.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldarga.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarga_S.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarga_S.csproj
new file mode 100644
index 0000000000..9a1555d409
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdarga_S.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldarga_s.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4.csproj
new file mode 100644
index 0000000000..7dca2feab7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldc_i4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_0.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_0.csproj
new file mode 100644
index 0000000000..34b95e63c6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_0.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldc_i4_0.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_1.csproj
new file mode 100644
index 0000000000..7c99c79e4d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldc_i4_1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_2.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_2.csproj
new file mode 100644
index 0000000000..63523a97be
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldc_i4_2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_3.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_3.csproj
new file mode 100644
index 0000000000..62c23cc330
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldc_i4_3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_4.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_4.csproj
new file mode 100644
index 0000000000..dcff653a02
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldc_i4_4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_5.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_5.csproj
new file mode 100644
index 0000000000..f8a0767b4c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldc_i4_5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_6.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_6.csproj
new file mode 100644
index 0000000000..19585f268c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldc_i4_6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_7.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_7.csproj
new file mode 100644
index 0000000000..015872ec41
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_7.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldc_i4_7.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_8.csproj
new file mode 100644
index 0000000000..3e57778007
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldc_i4_8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_M1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_M1.csproj
new file mode 100644
index 0000000000..4c881bb75c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_M1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldc_i4_m1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_S.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_S.csproj
new file mode 100644
index 0000000000..a59116720c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I4_S.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldc_i4_s.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I8.csproj
new file mode 100644
index 0000000000..f5664e99f2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_I8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldc_i8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_R4.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_R4.csproj
new file mode 100644
index 0000000000..63e860e670
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_R4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldc_r4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_R8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_R8.csproj
new file mode 100644
index 0000000000..6ac882ebfc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdc_R8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldc_r8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem.csproj
new file mode 100644
index 0000000000..b8b5170422
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldelem.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_I.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_I.csproj
new file mode 100644
index 0000000000..4817e76bcd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_I.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldelem_i.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_I1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_I1.csproj
new file mode 100644
index 0000000000..81792bfb22
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_I1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldelem_i1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_I2.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_I2.csproj
new file mode 100644
index 0000000000..3b462a99ff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_I2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldelem_i2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_I4.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_I4.csproj
new file mode 100644
index 0000000000..f06991851d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_I4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldelem_i4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_I8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_I8.csproj
new file mode 100644
index 0000000000..034683da24
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_I8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldelem_i8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_R4.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_R4.csproj
new file mode 100644
index 0000000000..51d5f80ac4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_R4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldelem_r4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_R8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_R8.csproj
new file mode 100644
index 0000000000..5b133cae69
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_R8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldelem_r8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_Ref.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_Ref.csproj
new file mode 100644
index 0000000000..56981b512f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_Ref.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldelem_ref.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_U1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_U1.csproj
new file mode 100644
index 0000000000..6d386c7928
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_U1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldelem_u1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_U2.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_U2.csproj
new file mode 100644
index 0000000000..ab1fab34e6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_U2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldelem_u2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_U4.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_U4.csproj
new file mode 100644
index 0000000000..902c8e6b6e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelem_U4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldelem_u4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelema.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelema.csproj
new file mode 100644
index 0000000000..841f661e30
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdelema.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldelema.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdfld.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdfld.csproj
new file mode 100644
index 0000000000..6cff1ebbf7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdfld.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldfld.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdflda.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdflda.csproj
new file mode 100644
index 0000000000..26144710d6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdflda.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldflda.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdftn.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdftn.csproj
new file mode 100644
index 0000000000..894c4943ba
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdftn.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldftn.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_I.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_I.csproj
new file mode 100644
index 0000000000..a99cdab455
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_I.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldind_i.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_I1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_I1.csproj
new file mode 100644
index 0000000000..242c115052
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_I1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldind_i1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_I2.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_I2.csproj
new file mode 100644
index 0000000000..47f3a90255
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_I2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldind_i2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_I4.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_I4.csproj
new file mode 100644
index 0000000000..93b9a633e6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_I4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldind_i4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_I8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_I8.csproj
new file mode 100644
index 0000000000..4b1ea64c0f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_I8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldind_i8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_R4.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_R4.csproj
new file mode 100644
index 0000000000..40eb761925
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_R4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldind_r4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_R8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_R8.csproj
new file mode 100644
index 0000000000..fd64e1cb68
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_R8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldind_r8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_Ref.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_Ref.csproj
new file mode 100644
index 0000000000..216f9302ef
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_Ref.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldind_ref.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_U1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_U1.csproj
new file mode 100644
index 0000000000..3b116d08e2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_U1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldind_u1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_U2.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_U2.csproj
new file mode 100644
index 0000000000..3d71e60721
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_U2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldind_u2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_U4.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_U4.csproj
new file mode 100644
index 0000000000..14ceae793d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdind_U4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldind_u4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdlen.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdlen.csproj
new file mode 100644
index 0000000000..4506ae7b74
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdlen.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldlen.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc.csproj
new file mode 100644
index 0000000000..f60351c0c6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldloc.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc_0.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc_0.csproj
new file mode 100644
index 0000000000..fef531977b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc_0.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldloc_0.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc_1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc_1.csproj
new file mode 100644
index 0000000000..4e6e7e5ccb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc_1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldloc_1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc_2.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc_2.csproj
new file mode 100644
index 0000000000..9adaa3d375
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc_2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldloc_2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc_3.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc_3.csproj
new file mode 100644
index 0000000000..a68de7460a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc_3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldloc_3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc_S.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc_S.csproj
new file mode 100644
index 0000000000..c7216157ec
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloc_S.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldloc_s.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloca.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloca.csproj
new file mode 100644
index 0000000000..931535c73e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloca.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldloca.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloca_S.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloca_S.csproj
new file mode 100644
index 0000000000..5d0a634edf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdloca_S.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldloca_s.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdnull.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdnull.csproj
new file mode 100644
index 0000000000..cf415df2bd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdnull.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldnull.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdobj.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdobj.csproj
new file mode 100644
index 0000000000..29da95ca31
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdobj.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldobj.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdsfld.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdsfld.csproj
new file mode 100644
index 0000000000..7a124bc138
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdsfld.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldsfld.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdsflda.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdsflda.csproj
new file mode 100644
index 0000000000..074d983537
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdsflda.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldsflda.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdstr.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdstr.csproj
new file mode 100644
index 0000000000..bae0a4bba4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdstr.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldstr.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdtoken.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdtoken.csproj
new file mode 100644
index 0000000000..97808aea4c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdtoken.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldtoken.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdvirtftn.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdvirtftn.csproj
new file mode 100644
index 0000000000..b9e89a6e25
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLdvirtftn.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesldvirtftn.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLeave.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLeave.csproj
new file mode 100644
index 0000000000..efe1542cf1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLeave.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesleave.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLeave_S.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLeave_S.csproj
new file mode 100644
index 0000000000..15cf986044
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLeave_S.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesleave_s.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLocalloc.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLocalloc.csproj
new file mode 100644
index 0000000000..0afa156ce1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesLocalloc.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodeslocalloc.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesMkrefany.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesMkrefany.csproj
new file mode 100644
index 0000000000..68fe7619f2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesMkrefany.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesmkrefany.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesMul.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesMul.csproj
new file mode 100644
index 0000000000..a74dda328d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesMul.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesmul.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesMul_Ovf.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesMul_Ovf.csproj
new file mode 100644
index 0000000000..41c05bf2c7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesMul_Ovf.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesmul_ovf.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesMul_Ovf_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesMul_Ovf_Un.csproj
new file mode 100644
index 0000000000..7e26af5b98
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesMul_Ovf_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesmul_ovf_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesNeg.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesNeg.csproj
new file mode 100644
index 0000000000..8417f918ed
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesNeg.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesneg.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesNewarr.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesNewarr.csproj
new file mode 100644
index 0000000000..81c1be5665
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesNewarr.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesnewarr.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesNewobj.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesNewobj.csproj
new file mode 100644
index 0000000000..759cb06b27
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesNewobj.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesnewobj.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesNop.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesNop.csproj
new file mode 100644
index 0000000000..ebe9290b4f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesNop.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesnop.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesNot.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesNot.csproj
new file mode 100644
index 0000000000..b1f80a0da1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesNot.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesnot.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesOr.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesOr.csproj
new file mode 100644
index 0000000000..bf9652b16a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesOr.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPop.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPop.csproj
new file mode 100644
index 0000000000..93791e74fb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPop.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodespop.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix1.csproj
new file mode 100644
index 0000000000..c011c51d90
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesprefix1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix2.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix2.csproj
new file mode 100644
index 0000000000..ac3946a340
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesprefix2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix3.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix3.csproj
new file mode 100644
index 0000000000..e6d8cb71d6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesprefix3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix4.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix4.csproj
new file mode 100644
index 0000000000..e048599d86
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesprefix4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix5.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix5.csproj
new file mode 100644
index 0000000000..ee09110a8b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesprefix5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix6.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix6.csproj
new file mode 100644
index 0000000000..3b1e81d22c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesprefix6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix7.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix7.csproj
new file mode 100644
index 0000000000..440dd00a88
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefix7.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesprefix7.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefixref.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefixref.csproj
new file mode 100644
index 0000000000..80ae24c2f8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesPrefixref.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesprefixref.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesReadonly.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesReadonly.csproj
new file mode 100644
index 0000000000..bf0c407999
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesReadonly.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesreadonly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRefanytype.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRefanytype.csproj
new file mode 100644
index 0000000000..74d3cc4395
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRefanytype.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesrefanytype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRefanyval.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRefanyval.csproj
new file mode 100644
index 0000000000..4fff3f194f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRefanyval.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesrefanyval.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRem.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRem.csproj
new file mode 100644
index 0000000000..b3e7f37259
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRem.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesrem.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRem_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRem_Un.csproj
new file mode 100644
index 0000000000..9335f22223
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRem_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesrem_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRet.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRet.csproj
new file mode 100644
index 0000000000..074bfdc974
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRet.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesret.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRethrow.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRethrow.csproj
new file mode 100644
index 0000000000..9840b3a5ea
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesRethrow.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesrethrow.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesShl.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesShl.csproj
new file mode 100644
index 0000000000..8c67c500eb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesShl.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesshl.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesShr.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesShr.csproj
new file mode 100644
index 0000000000..9032f28cfc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesShr.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesshr.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesShr_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesShr_Un.csproj
new file mode 100644
index 0000000000..32bf6afa80
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesShr_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesshr_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesSizeof.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesSizeof.csproj
new file mode 100644
index 0000000000..2741e6ab9c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesSizeof.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodessizeof.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStarg.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStarg.csproj
new file mode 100644
index 0000000000..ccf43b6204
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStarg.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstarg.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStarg_S.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStarg_S.csproj
new file mode 100644
index 0000000000..6013ae0202
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStarg_S.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstarg_s.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem.csproj
new file mode 100644
index 0000000000..5b85b69c3c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstelem.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_I.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_I.csproj
new file mode 100644
index 0000000000..2441b10871
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_I.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstelem_i.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_I1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_I1.csproj
new file mode 100644
index 0000000000..2c147c15cb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_I1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstelem_i1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_I2.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_I2.csproj
new file mode 100644
index 0000000000..d48a916e08
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_I2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstelem_i2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_I4.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_I4.csproj
new file mode 100644
index 0000000000..517c1f5753
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_I4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstelem_i4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_I8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_I8.csproj
new file mode 100644
index 0000000000..5020ce0199
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_I8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstelem_i8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_R4.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_R4.csproj
new file mode 100644
index 0000000000..ba8dfc8a7a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_R4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstelem_r4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_R8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_R8.csproj
new file mode 100644
index 0000000000..8136c69be0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_R8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstelem_r8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_Ref.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_Ref.csproj
new file mode 100644
index 0000000000..08b02e6ea9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStelem_Ref.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstelem_ref.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStfld.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStfld.csproj
new file mode 100644
index 0000000000..2e3876fff4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStfld.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstfld.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_I.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_I.csproj
new file mode 100644
index 0000000000..5821f96d93
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_I.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstind_i.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_I1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_I1.csproj
new file mode 100644
index 0000000000..6c126657b4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_I1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstind_i1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_I2.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_I2.csproj
new file mode 100644
index 0000000000..d3e99b025e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_I2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstind_i2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_I4.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_I4.csproj
new file mode 100644
index 0000000000..a834163f35
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_I4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstind_i4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_I8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_I8.csproj
new file mode 100644
index 0000000000..a5f453911a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_I8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstind_i8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_R4.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_R4.csproj
new file mode 100644
index 0000000000..b7c5b8d14c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_R4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstind_r4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_R8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_R8.csproj
new file mode 100644
index 0000000000..2e6749e6ab
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_R8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstind_r8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_Ref.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_Ref.csproj
new file mode 100644
index 0000000000..9fe5acef60
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStind_Ref.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstind_ref.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc.csproj
new file mode 100644
index 0000000000..a26f798cda
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstloc.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc_0.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc_0.csproj
new file mode 100644
index 0000000000..db42358e92
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc_0.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstloc_0.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc_1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc_1.csproj
new file mode 100644
index 0000000000..0c57376c55
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc_1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstloc_1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc_2.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc_2.csproj
new file mode 100644
index 0000000000..51da591224
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc_2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstloc_2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc_3.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc_3.csproj
new file mode 100644
index 0000000000..e368805cae
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc_3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstloc_3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc_S.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc_S.csproj
new file mode 100644
index 0000000000..9dd5c8581b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStloc_S.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstloc_s.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStobj.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStobj.csproj
new file mode 100644
index 0000000000..09e9ba0495
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStobj.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstobj.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStsfld.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStsfld.csproj
new file mode 100644
index 0000000000..762f3fb2da
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesStsfld.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesstsfld.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesSub.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesSub.csproj
new file mode 100644
index 0000000000..44c12049b4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesSub.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodessub.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesSub_Ovf.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesSub_Ovf.csproj
new file mode 100644
index 0000000000..f3a37509ff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesSub_Ovf.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodessub_ovf.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesSub_Ovf_Un.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesSub_Ovf_Un.csproj
new file mode 100644
index 0000000000..24fc59052a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesSub_Ovf_Un.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodessub_ovf_un.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesSwitch.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesSwitch.csproj
new file mode 100644
index 0000000000..c0f658bccb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesSwitch.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesswitch.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesTailcall.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesTailcall.csproj
new file mode 100644
index 0000000000..032a221284
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesTailcall.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodestailcall.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesTakesSingleByteArgument.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesTakesSingleByteArgument.csproj
new file mode 100644
index 0000000000..044fdc8c06
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesTakesSingleByteArgument.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodestakessinglebyteargument.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesThrow.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesThrow.csproj
new file mode 100644
index 0000000000..bf4c38fb47
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesThrow.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesthrow.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesUnaligned.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesUnaligned.csproj
new file mode 100644
index 0000000000..5a12326b7d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesUnaligned.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesunaligned.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesUnbox.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesUnbox.csproj
new file mode 100644
index 0000000000..810854616f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesUnbox.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesunbox.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesUnbox_Any.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesUnbox_Any.csproj
new file mode 100644
index 0000000000..01220d8408
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesUnbox_Any.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesunbox_any.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesVolatile.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesVolatile.csproj
new file mode 100644
index 0000000000..9e3c66e802
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesVolatile.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesvolatile.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesXor.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesXor.csproj
new file mode 100644
index 0000000000..8625c48fac
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/OpCodesXor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodesxor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeequals1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeequals1.cs
new file mode 100644
index 0000000000..5ac716e123
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeequals1.cs
@@ -0,0 +1,197 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// System.Reflection.Emit.OpCode.Equals(Object)[v-jiajul]
+/// </summary>
+public class OpCodeEquals1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The two opcode are equal");
+
+ try
+ {
+ retVal = VerifyEqualsObjectT(OpCodes.Refanyval, OpCodes.Refanyval, "001.1") && retVal;
+ retVal = VerifyEqualsObjectT(OpCodes.Rem_Un, OpCodes.Rem_Un, "001.2") && retVal;
+ retVal = VerifyEqualsObjectT(OpCodes.Shr, OpCodes.Shr, "001.3") && retVal;
+ retVal = VerifyEqualsObjectT(OpCodes.Stfld, OpCodes.Stfld, "001.4") && retVal;
+ retVal = VerifyEqualsObjectT(OpCodes.Stloc_0, OpCodes.Stloc_0, "001.5") && retVal;
+ retVal = VerifyEqualsObjectT(OpCodes.Pop, OpCodes.Pop, "001.6") && retVal;
+ retVal = VerifyEqualsObjectT(OpCodes.Calli, OpCodes.Calli, "001.7") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check two different opcode");
+
+ try
+ {
+ retVal = VerifyEqualsObjectF(OpCodes.Refanyval, OpCodes.Call, "002.1") && retVal;
+ retVal = VerifyEqualsObjectF(OpCodes.Rem_Un, OpCodes.Br_S, "002.2") && retVal;
+ retVal = VerifyEqualsObjectF(OpCodes.Shr, OpCodes.Ret, "002.3") && retVal;
+ retVal = VerifyEqualsObjectF(OpCodes.Stfld, OpCodes.Add_Ovf, "002.4") && retVal;
+ retVal = VerifyEqualsObjectF(OpCodes.Stloc_0, OpCodes.Clt, "002.5") && retVal;
+ retVal = VerifyEqualsObjectF(OpCodes.Pop, OpCodes.Div, "002.6") && retVal;
+ retVal = VerifyEqualsObjectF(OpCodes.Calli, OpCodes.Xor, "002.7") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The object is not type of opcode ");
+
+ try
+ {
+ retVal = VerifyEqualsObjectF(OpCodes.Refanyval, '@', "003.1") && retVal;
+ retVal = VerifyEqualsObjectF(OpCodes.Rem_Un, "HelloWorld", "003.2") && retVal;
+ retVal = VerifyEqualsObjectF(OpCodes.Shr, Int32.MinValue, "003.3") && retVal;
+ retVal = VerifyEqualsObjectF(OpCodes.Stfld, -6.13049, "003.4") && retVal;
+ retVal = VerifyEqualsObjectF(OpCodes.Stloc_0, new int[2] { 1, 4 }, "003.5") && retVal;
+ retVal = VerifyEqualsObjectF(OpCodes.Pop, DayOfWeek.Sunday, "003.6") && retVal;
+ retVal = VerifyEqualsObjectF(OpCodes.Calli, string.Empty, "003.7") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("030", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The object is a null reference ");
+
+ try
+ {
+ retVal = VerifyEqualsObjectF(OpCodes.Refanyval, null, "004.1") && retVal;
+ retVal = VerifyEqualsObjectF(OpCodes.Rem_Un, null, "004.2") && retVal;
+ retVal = VerifyEqualsObjectF(OpCodes.Shr, null, "004.3") && retVal;
+ retVal = VerifyEqualsObjectF(OpCodes.Stfld, null, "004.4") && retVal;
+ retVal = VerifyEqualsObjectF(OpCodes.Stloc_0, null, "004.5") && retVal;
+ retVal = VerifyEqualsObjectF(OpCodes.Pop, null, "004.6") && retVal;
+ retVal = VerifyEqualsObjectF(OpCodes.Calli, null, "004.7") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("040", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodeEquals1 test = new OpCodeEquals1();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodeEquals1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region Private Methods
+ private bool VerifyEqualsObjectT(OpCode op, object ob, string errNum)
+ {
+ bool retVal = true;
+
+ try
+ {
+ object obj = ob;
+ if (!op.Equals(obj))
+ {
+ TestLibrary.TestFramework.LogError(errNum.ToString(), "Result is not the value as expected,opcode is: " + op + ", object is: " + obj);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errNum.ToString(), "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ private bool VerifyEqualsObjectF(OpCode op, object ob, string errNum)
+ {
+ bool retVal = true;
+
+ try
+ {
+ object obj = ob;
+ if (op.Equals(obj))
+ {
+ TestLibrary.TestFramework.LogError(errNum.ToString(), "Result is not the value as expected,opcode is: " + op + ", object is: " + obj);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errNum.ToString(), "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeequals2.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeequals2.cs
new file mode 100644
index 0000000000..98fabf2059
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeequals2.cs
@@ -0,0 +1,143 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// System.Reflection.Emit.OpCode.Equals(OpCode)[v-jiajul]
+/// </summary>
+public class OpCodeEquals2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The two opcode are equal");
+
+ try
+ {
+ retVal = VerifyEqualsOpCodeT(OpCodes.Refanyval, OpCodes.Refanyval, "001.1") && retVal;
+ retVal = VerifyEqualsOpCodeT(OpCodes.Rem_Un, OpCodes.Rem_Un, "001.2") && retVal;
+ retVal = VerifyEqualsOpCodeT(OpCodes.Shr, OpCodes.Shr, "001.3") && retVal;
+ retVal = VerifyEqualsOpCodeT(OpCodes.Stfld, OpCodes.Stfld, "001.4") && retVal;
+ retVal = VerifyEqualsOpCodeT(OpCodes.Stloc_0, OpCodes.Stloc_0, "001.5") && retVal;
+ retVal = VerifyEqualsOpCodeT(OpCodes.Pop, OpCodes.Pop, "001.6") && retVal;
+ retVal = VerifyEqualsOpCodeT(OpCodes.Calli, OpCodes.Calli, "001.7") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check two different opcode");
+
+ try
+ {
+ retVal = VerifyEqualsOpCodeF(OpCodes.Refanyval, OpCodes.Call, "002.1") && retVal;
+ retVal = VerifyEqualsOpCodeF(OpCodes.Rem_Un, OpCodes.Br_S, "002.2") && retVal;
+ retVal = VerifyEqualsOpCodeF(OpCodes.Shr, OpCodes.Ret, "002.3") && retVal;
+ retVal = VerifyEqualsOpCodeF(OpCodes.Stfld, OpCodes.Add_Ovf, "002.4") && retVal;
+ retVal = VerifyEqualsOpCodeF(OpCodes.Stloc_0, OpCodes.Clt, "002.5") && retVal;
+ retVal = VerifyEqualsOpCodeF(OpCodes.Pop, OpCodes.Div, "002.6") && retVal;
+ retVal = VerifyEqualsOpCodeF(OpCodes.Calli, OpCodes.Xor, "002.7") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodeEquals2 test = new OpCodeEquals2();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodeEquals2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region Private Methods
+ private bool VerifyEqualsOpCodeT(OpCode op1, OpCode op2, string errNum)
+ {
+ bool retVal = true;
+
+ try
+ {
+ if (!op1.Equals(op2))
+ {
+ TestLibrary.TestFramework.LogError(errNum.ToString(), "Result is not the value as expected,opcode1 is: " + op1 + ",opcode2 is: " + op2);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errNum.ToString(), "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ private bool VerifyEqualsOpCodeF(OpCode op1, OpCode op2, string errNum)
+ {
+ bool retVal = true;
+
+ try
+ {
+ if (op1.Equals(op2))
+ {
+ TestLibrary.TestFramework.LogError(errNum.ToString(), "Result is not the value as expected,opcode1 is: " + op1 + ",opcode2 is: " + op2);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errNum.ToString(), "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
+public class MyClass
+{
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeflowcontrol.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeflowcontrol.cs
new file mode 100644
index 0000000000..db4086cc5a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeflowcontrol.cs
@@ -0,0 +1,128 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// System.Reflection.Emit.OpCode.Equals(Object)[v-jiajul]
+/// </summary>
+public class OpCodeFlowControl
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the value of the property");
+
+ try
+ {
+ retVal = VerifyFlowControl(OpCodes.Add, FlowControl.Next, "001.0") && retVal;
+ retVal = VerifyFlowControl(OpCodes.Ldc_I4, FlowControl.Next, "001.1") && retVal;
+ retVal = VerifyFlowControl(OpCodes.Stloc, FlowControl.Next, "001.2") && retVal;
+ retVal = VerifyFlowControl(OpCodes.Nop, FlowControl.Next, "001.3") && retVal;
+ retVal = VerifyFlowControl(OpCodes.Localloc, FlowControl.Next, "001.4") && retVal;
+ retVal = VerifyFlowControl(OpCodes.Endfilter, FlowControl.Return, "001.5") && retVal;
+ retVal = VerifyFlowControl(OpCodes.Ret, FlowControl.Return, "001.6") && retVal;
+ retVal = VerifyFlowControl(OpCodes.Prefixref, FlowControl.Meta, "001.7") && retVal;
+ retVal = VerifyFlowControl(OpCodes.Prefix3, FlowControl.Meta, "001.8") && retVal;
+ retVal = VerifyFlowControl(OpCodes.Leave, FlowControl.Branch, "001.9") && retVal;
+ retVal = VerifyFlowControl(OpCodes.Throw, FlowControl.Throw, "001.10") && retVal;
+ retVal = VerifyFlowControl(OpCodes.Rethrow, FlowControl.Throw, "001.11") && retVal;
+ retVal = VerifyFlowControl(OpCodes.Ble, FlowControl.Cond_Branch, "001.12") && retVal;
+ retVal = VerifyFlowControl(OpCodes.Blt_S, FlowControl.Cond_Branch, "001.13") && retVal;
+ retVal = VerifyFlowControl(OpCodes.Br_S, FlowControl.Branch, "001.14") && retVal;
+ retVal = VerifyFlowControl(OpCodes.Jmp, FlowControl.Call, "001.15") && retVal;
+ retVal = VerifyFlowControl(OpCodes.Call, FlowControl.Call, "001.16") && retVal;
+ retVal = VerifyFlowControl(OpCodes.Callvirt, FlowControl.Call, "001.17") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //public bool PosTest2()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("PosTest2: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+
+
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodeFlowControl test = new OpCodeFlowControl();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodeFlowControl");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region Private Methods
+ private bool VerifyFlowControl(OpCode op1, FlowControl fc, string errNum)
+ {
+ bool retVal = true;
+
+ try
+ {
+ if (op1.FlowControl != fc)
+ {
+ TestLibrary.TestFramework.LogError(errNum, "Result is not the value as expected,FlowControl is: " + op1.FlowControl + ",Expected is: " + fc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errNum, "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodegethashcode.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodegethashcode.cs
new file mode 100644
index 0000000000..73e324a80f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodegethashcode.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// System.Reflection.Emit.OpCode.GetHashCode[v-jiajul]
+/// </summary>
+public class OpCodeGetHashCode
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ try
+ {
+ retVal = VerifyEqualsGetHashCodeF(OpCodes.Refanyval, OpCodes.Call, "002.1") && retVal;
+ retVal = VerifyEqualsGetHashCodeF(OpCodes.Rem_Un, OpCodes.Br_S, "002.2") && retVal;
+ retVal = VerifyEqualsGetHashCodeF(OpCodes.Shr, OpCodes.Ret, "002.3") && retVal;
+ retVal = VerifyEqualsGetHashCodeF(OpCodes.Stfld, OpCodes.Add_Ovf, "002.4") && retVal;
+ retVal = VerifyEqualsGetHashCodeF(OpCodes.Stloc_0, OpCodes.Clt, "002.5") && retVal;
+ retVal = VerifyEqualsGetHashCodeF(OpCodes.Pop, OpCodes.Div, "002.6") && retVal;
+ retVal = VerifyEqualsGetHashCodeF(OpCodes.Calli, OpCodes.Xor, "002.7") && retVal;
+ retVal = VerifyEqualsGetHashCodeF(OpCodes.Newobj, OpCodes.Beq, "002.8") && retVal;
+ retVal = VerifyEqualsGetHashCodeF(OpCodes.Blt, OpCodes.Refanytype, "002.9") && retVal;
+ retVal = VerifyEqualsGetHashCodeF(OpCodes.Volatile, OpCodes.Add, "002.10") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ public static int Main()
+ {
+ OpCodeGetHashCode test = new OpCodeGetHashCode();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodeGetHashCode");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region Private Methods
+
+ private bool VerifyEqualsGetHashCodeF(OpCode op1, OpCode op2, string errNum)
+ {
+ bool retVal = true;
+
+ try
+ {
+ int hash1 = op1.GetHashCode();
+ int hash2 = op2.GetHashCode();
+ if (hash1 == hash2)
+ {
+ TestLibrary.TestFramework.LogError(errNum, "Result is not the value as expected,hash1 is: " + hash1 + ",hash2 is: " + hash2);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errNum, "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodename.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodename.cs
new file mode 100644
index 0000000000..367bef9bc2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodename.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// System.Reflection.Emit.OpCode.Name[v-jiajul]
+/// </summary>
+public class OpCodeName
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the name property");
+
+ try
+ {
+ retVal = VerifyName(OpCodes.Add, "add", "001.0") && retVal;
+ retVal = VerifyName(OpCodes.Refanyval, "refanyval", "001.1") && retVal;
+ retVal = VerifyName(OpCodes.Rem_Un, "rem.un", "001.2") && retVal;
+ retVal = VerifyName(OpCodes.Shr, "shr", "001.3") && retVal;
+ retVal = VerifyName(OpCodes.Stfld, "stfld", "001.4") && retVal;
+ retVal = VerifyName(OpCodes.Stloc_0, "stloc.0", "001.5") && retVal;
+ retVal = VerifyName(OpCodes.Pop, "pop", "001.6") && retVal;
+ retVal = VerifyName(OpCodes.Calli, "calli", "001.7") && retVal;
+ retVal = VerifyName(OpCodes.Switch, "switch", "001.8") && retVal;
+ retVal = VerifyName(OpCodes.Sub, "sub", "001.9") && retVal;
+ retVal = VerifyName(OpCodes.Not, "not", "001.10") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodeName test = new OpCodeName();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodeName");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region Private Methods
+ private bool VerifyName(OpCode op1, string expected, string errNum)
+ {
+ bool retVal = true;
+
+ try
+ {
+ string value = op1.Name;
+ if (value != expected)
+ {
+ TestLibrary.TestFramework.LogError(errNum, "Result is not the value as expected,name is: " + value + ",expected is: " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errNum, "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeopcodetype.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeopcodetype.cs
new file mode 100644
index 0000000000..5bf1fb8e13
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeopcodetype.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// System.Reflection.Emit.OpCode.OpCodeType[v-jiajul]
+/// </summary>
+public class OpCodeOpCodeType
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the value of the property");
+
+ try
+ {
+ retVal = VerifyOpCodeType(OpCodes.Add, OpCodeType.Primitive, "001.0") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Ldc_I4, OpCodeType.Primitive, "001.1") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Stloc, OpCodeType.Primitive, "001.2") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Nop, OpCodeType.Primitive, "001.3") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Localloc, OpCodeType.Primitive, "001.4") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Endfilter, OpCodeType.Primitive, "001.5") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Ret, OpCodeType.Primitive, "001.6") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Callvirt, OpCodeType.Objmodel, "001.7") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Cpobj, OpCodeType.Objmodel, "001.8") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Ldobj, OpCodeType.Objmodel, "001.9") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Prefix3, OpCodeType.Nternal, "001.10") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Prefix6, OpCodeType.Nternal, "001.11") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Prefixref, OpCodeType.Nternal, "001.12") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Constrained, OpCodeType.Prefix, "001.13") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Readonly, OpCodeType.Prefix, "001.14") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Beq, OpCodeType.Macro, "001.15") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Bge, OpCodeType.Macro, "001.16") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Blt, OpCodeType.Macro, "001.17") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodeOpCodeType test = new OpCodeOpCodeType();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodeOpCodeType");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region Private Methods
+ private bool VerifyOpCodeType(OpCode op1, OpCodeType oct, string errNum)
+ {
+ bool retVal = true;
+
+ try
+ {
+ if (op1.OpCodeType != oct)
+ {
+ TestLibrary.TestFramework.LogError(errNum, "Result is not the value as expected,OpCodeType is: " + op1.OpCodeType + ",Expected is: " + oct);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errNum, "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeoperandtype.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeoperandtype.cs
new file mode 100644
index 0000000000..00e78d09aa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeoperandtype.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// System.Reflection.Emit.OpCode.OperandType[v-jiajul]
+/// </summary>
+public class OpCodeOperandType
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the value of the property");
+
+ try
+ {
+ retVal = VerifyOpCodeType(OpCodes.Add, OperandType.InlineNone, "001.0") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Ldc_I4, OperandType.InlineI, "001.1") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Stloc, OperandType.InlineVar, "001.2") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Nop, OperandType.InlineNone, "001.3") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Localloc, OperandType.InlineNone, "001.4") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Endfilter, OperandType.InlineNone, "001.5") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Ret, OperandType.InlineNone, "001.6") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Callvirt, OperandType.InlineMethod, "001.7") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Cpobj, OperandType.InlineType, "001.8") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Ldobj, OperandType.InlineType, "001.9") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Prefix3, OperandType.InlineNone, "001.10") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Prefix6, OperandType.InlineNone, "001.11") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Prefixref, OperandType.InlineNone, "001.12") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Constrained, OperandType.InlineType, "001.13") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Readonly, OperandType.InlineNone, "001.14") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Beq, OperandType.InlineBrTarget, "001.15") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Bge, OperandType.InlineBrTarget, "001.16") && retVal;
+ retVal = VerifyOpCodeType(OpCodes.Blt, OperandType.InlineBrTarget, "001.17") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodeOperandType test = new OpCodeOperandType();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodeOperandType");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region Private Methods
+ private bool VerifyOpCodeType(OpCode op1, OperandType ot, string errNum)
+ {
+ bool retVal = true;
+
+ try
+ {
+ if (op1.OperandType != ot)
+ {
+ TestLibrary.TestFramework.LogError(errNum, "Result is not the value as expected,OperandType is: " + op1.OperandType + ",Expected is: " + ot);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errNum, "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesadd_ovf.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesadd_ovf.cs
new file mode 100644
index 0000000000..874ff67875
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesadd_ovf.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Add_Ovf [v-yishi]
+/// </summary>
+public class OpCodesAdd_Ovf
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Add_Ovf's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Add_Ovf,
+ "add.ovf",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push1,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0xd6,
+ FlowControl.Next,
+ "001.1",
+ "Add_Ovf") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesAdd_Ovf test = new OpCodesAdd_Ovf();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesAdd_Ovf");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesadd_ovf_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesadd_ovf_un.cs
new file mode 100644
index 0000000000..0100f2e7e8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesadd_ovf_un.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Add_Ovf_Un [v-yishi]
+/// </summary>
+public class OpCodesAdd_Ovf_Un
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Add_Ovf_Un's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Add_Ovf_Un,
+ "add.ovf.un",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push1,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0xd7,
+ FlowControl.Next,
+ "001.1",
+ "Add_Ovf_Un") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesAdd_Ovf_Un test = new OpCodesAdd_Ovf_Un();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesAdd_Ovf_Un");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesand.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesand.cs
new file mode 100644
index 0000000000..4a635d0ef3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesand.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// And [v-yishi]
+/// </summary>
+public class OpCodesAnd
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify And's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.And,
+ "and",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push1,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x5f,
+ FlowControl.Next,
+ "001.1",
+ "And") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesAnd test = new OpCodesAnd();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesAnd");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesarglist.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesarglist.cs
new file mode 100644
index 0000000000..7f38b722b2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesarglist.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Arglist [v-yishi]
+/// </summary>
+public class OpCodesArglist
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Arglist's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Arglist,
+ "arglist",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 2,
+ (byte)0xfe,
+ (byte)0x0,
+ FlowControl.Next,
+ "001.1",
+ "Arglist") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesArglist test = new OpCodesArglist();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesArglist");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbeq.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbeq.cs
new file mode 100644
index 0000000000..ddb8813d11
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbeq.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Beq [v-yishi]
+/// </summary>
+public class OpCodesBeq
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Beq's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Beq,
+ "beq",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push0,
+ OperandType.InlineBrTarget,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x3b,
+ FlowControl.Cond_Branch,
+ "001.1",
+ "Beq") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesBeq test = new OpCodesBeq();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesBeq");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbeq_s.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbeq_s.cs
new file mode 100644
index 0000000000..1856f99fb9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbeq_s.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Beq_S [v-yishi]
+/// </summary>
+public class OpCodesBeq_S
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Beq_S's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Beq_S,
+ "beq.s",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push0,
+ OperandType.ShortInlineBrTarget,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x2e,
+ FlowControl.Cond_Branch,
+ "001.1",
+ "Beq_S") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesBeq_S test = new OpCodesBeq_S();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesBeq_S");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbge.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbge.cs
new file mode 100644
index 0000000000..1374f0e125
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbge.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Bge [v-yishi]
+/// </summary>
+public class OpCodesBge
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Bge's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Bge,
+ "bge",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push0,
+ OperandType.InlineBrTarget,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x3c,
+ FlowControl.Cond_Branch,
+ "001.1",
+ "Bge") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesBge test = new OpCodesBge();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesBge");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbge_s.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbge_s.cs
new file mode 100644
index 0000000000..2d49fae335
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbge_s.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Bge_S [v-yishi]
+/// </summary>
+public class OpCodesBge_S
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Bge_S 's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Bge_S ,
+ "bge.s",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push0,
+ OperandType.ShortInlineBrTarget,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x2f,
+ FlowControl.Cond_Branch,
+ "001.1",
+ "Bge_S ") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesBge_S test = new OpCodesBge_S();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesBge_S");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbge_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbge_un.cs
new file mode 100644
index 0000000000..eb77a08ccb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbge_un.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Bge_Un [v-yishi]
+/// </summary>
+public class OpCodesBge_Un
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Bge_Un's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Bge_Un,
+ "bge.un",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push0,
+ OperandType.InlineBrTarget,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x41,
+ FlowControl.Cond_Branch,
+ "001.1",
+ "Bge_Un") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesBge_Un test = new OpCodesBge_Un();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesBge_Un");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbge_un_s.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbge_un_s.cs
new file mode 100644
index 0000000000..fe3117350d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbge_un_s.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Bge_Un_S [v-yishi]
+/// </summary>
+public class OpCodesBge_Un_S
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Bge_Un_S's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Bge_Un_S,
+ "bge.un.s",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push0,
+ OperandType.ShortInlineBrTarget,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x34,
+ FlowControl.Cond_Branch,
+ "001.1",
+ "Bge_Un_S") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesBge_Un_S test = new OpCodesBge_Un_S();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesBge_Un_S");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbgt.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbgt.cs
new file mode 100644
index 0000000000..be77544930
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbgt.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Bgt [v-yishi]
+/// </summary>
+public class OpCodesBgt
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Bgt's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Bgt,
+ "bgt",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push0,
+ OperandType.InlineBrTarget,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x3d,
+ FlowControl.Cond_Branch,
+ "001.1",
+ "Bgt") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesBgt test = new OpCodesBgt();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesBgt");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbgt_s.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbgt_s.cs
new file mode 100644
index 0000000000..e9542af2c8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbgt_s.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Bgt_S [v-yishi]
+/// </summary>
+public class OpCodesBgt_S
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Bgt_S's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Bgt_S,
+ "bgt.s",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push0,
+ OperandType.ShortInlineBrTarget,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x30,
+ FlowControl.Cond_Branch,
+ "001.1",
+ "Bgt_S") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesBgt_S test = new OpCodesBgt_S();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesBgt_S");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbgt_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbgt_un.cs
new file mode 100644
index 0000000000..82764a7a2b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbgt_un.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Bgt_Un [v-yishi]
+/// </summary>
+public class OpCodesBgt_Un
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Bgt_Un's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Bgt_Un,
+ "bgt.un",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push0,
+ OperandType.InlineBrTarget,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x42,
+ FlowControl.Cond_Branch,
+ "001.1",
+ "Bgt_Un") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesBgt_Un test = new OpCodesBgt_Un();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesBgt_Un");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbgt_un_s.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbgt_un_s.cs
new file mode 100644
index 0000000000..7ea9326ba9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbgt_un_s.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Bgt_Un_S [v-yishi]
+/// </summary>
+public class OpCodesBgt_Un_S
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Bgt_Un_S's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Bgt_Un_S,
+ "bgt.un.s",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push0,
+ OperandType.ShortInlineBrTarget,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x35,
+ FlowControl.Cond_Branch,
+ "001.1",
+ "Bgt_Un_S") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesBgt_Un_S test = new OpCodesBgt_Un_S();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesBgt_Un_S");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesble.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesble.cs
new file mode 100644
index 0000000000..c0e6d1071b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesble.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Ble [v-yishi]
+/// </summary>
+public class OpCodesBle
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Ble's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ble,
+ "ble",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push0,
+ OperandType.InlineBrTarget,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x3e,
+ FlowControl.Cond_Branch,
+ "001.1",
+ "Ble") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesBle test = new OpCodesBle();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesBle");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesble_s.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesble_s.cs
new file mode 100644
index 0000000000..637903e95e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesble_s.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Ble_S [v-yishi]
+/// </summary>
+public class OpCodesBle_S
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Ble_S's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ble_S,
+ "ble.s",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push0,
+ OperandType.ShortInlineBrTarget,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x31,
+ FlowControl.Cond_Branch,
+ "001.1",
+ "Ble_S") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesBle_S test = new OpCodesBle_S();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesBle_S");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesble_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesble_un.cs
new file mode 100644
index 0000000000..5bb7a5c5db
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesble_un.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Ble_Un [v-yishi]
+/// </summary>
+public class OpCodesBle_Un
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Ble_Un's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ble_Un,
+ "ble.un",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push0,
+ OperandType.InlineBrTarget,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x43,
+ FlowControl.Cond_Branch,
+ "001.1",
+ "Ble_Un") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesBle_Un test = new OpCodesBle_Un();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesBle_Un");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesble_un_s.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesble_un_s.cs
new file mode 100644
index 0000000000..b0b6110a04
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesble_un_s.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Ble_Un_S [v-yishi]
+/// </summary>
+public class OpCodesBle_Un_S
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Ble_Un_S's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ble_Un_S,
+ "ble.un.s",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push0,
+ OperandType.ShortInlineBrTarget,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x36,
+ FlowControl.Cond_Branch,
+ "001.1",
+ "Ble_Un_S") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesBle_Un_S test = new OpCodesBle_Un_S();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesBle_Un_S");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesblt.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesblt.cs
new file mode 100644
index 0000000000..116631ecad
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesblt.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Blt [v-yishi]
+/// </summary>
+public class OpCodesBlt
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Blt's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Blt,
+ "blt",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push0,
+ OperandType.InlineBrTarget,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x3f,
+ FlowControl.Cond_Branch,
+ "001.1",
+ "Blt") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesBlt test = new OpCodesBlt();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesBlt");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesblt_s.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesblt_s.cs
new file mode 100644
index 0000000000..4db4f33dd7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesblt_s.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Blt_S [v-yishi]
+/// </summary>
+public class OpCodesBlt_S
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Blt_S's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Blt_S,
+ "blt.s",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push0,
+ OperandType.ShortInlineBrTarget,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x32,
+ FlowControl.Cond_Branch,
+ "001.1",
+ "Blt_S") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesBlt_S test = new OpCodesBlt_S();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesBlt_S");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesblt_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesblt_un.cs
new file mode 100644
index 0000000000..74f83215a9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesblt_un.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Blt_Un [v-yishi]
+/// </summary>
+public class OpCodesBlt_Un
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Blt_Un's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Blt_Un,
+ "blt.un",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push0,
+ OperandType.InlineBrTarget,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x44,
+ FlowControl.Cond_Branch,
+ "001.1",
+ "Blt_Un") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesBlt_Un test = new OpCodesBlt_Un();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesBlt_Un");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesblt_un_s.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesblt_un_s.cs
new file mode 100644
index 0000000000..c56fac6b74
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesblt_un_s.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Blt_Un_S [v-yishi]
+/// </summary>
+public class OpCodesBlt_Un_S
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Blt_Un_S's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Blt_Un_S,
+ "blt.un.s",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push0,
+ OperandType.ShortInlineBrTarget,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x37,
+ FlowControl.Cond_Branch,
+ "001.1",
+ "Blt_Un_S") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesBlt_Un_S test = new OpCodesBlt_Un_S();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesBlt_Un_S");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbne_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbne_un.cs
new file mode 100644
index 0000000000..267fde9b81
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbne_un.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Bne_Un [v-yishi]
+/// </summary>
+public class OpCodesBne_Un
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Bne_Un's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Bne_Un,
+ "bne.un",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push0,
+ OperandType.InlineBrTarget,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x40,
+ FlowControl.Cond_Branch,
+ "001.1",
+ "Bne_Un") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesBne_Un test = new OpCodesBne_Un();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesBne_Un");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbne_un_s.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbne_un_s.cs
new file mode 100644
index 0000000000..9542304cb4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbne_un_s.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Bne_Un_S [v-yishi]
+/// </summary>
+public class OpCodesBne_Un_S
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Bne_Un_S's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Bne_Un_S,
+ "bne.un.s",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push0,
+ OperandType.ShortInlineBrTarget,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x33,
+ FlowControl.Cond_Branch,
+ "001.1",
+ "Bne_Un_S") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesBne_Un_S test = new OpCodesBne_Un_S();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesBne_Un_S");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbox.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbox.cs
new file mode 100644
index 0000000000..765021145e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbox.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Box [v-yishi]
+/// </summary>
+public class OpCodesBox
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Box's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Box,
+ "box",
+ StackBehaviour.Pop1,
+ StackBehaviour.Pushref,
+ OperandType.InlineType,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x8c,
+ FlowControl.Next,
+ "001.1",
+ "Box") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesBox test = new OpCodesBox();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesBox");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbr.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbr.cs
new file mode 100644
index 0000000000..26998e5273
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbr.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Br [v-yishi]
+/// </summary>
+public class OpCodesBr
+{
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Br's value is ");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Br,
+ "br",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push0,
+ OperandType.InlineBrTarget,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x38,
+ FlowControl.Branch,
+ "001.1",
+ "Br") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesBr test = new OpCodesBr();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesBr");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbr_s.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbr_s.cs
new file mode 100644
index 0000000000..780128386d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbr_s.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Br_S [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Br_S");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify unconditionally transfers control to a target instruction (short form).";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Br_S,
+ "br.s",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push0,
+ OperandType.ShortInlineBrTarget,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x2b,
+ FlowControl.Branch,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbreak.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbreak.cs
new file mode 100644
index 0000000000..c42ec65826
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbreak.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Break [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Break");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify break instruction to debugger.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Break,
+ "break",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push0,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x1,
+ FlowControl.Break,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbrfalse.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbrfalse.cs
new file mode 100644
index 0000000000..e4c5393c7d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbrfalse.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Brfalse [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Brfalse");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify Transfers control to a target instruction if value is false, a null reference (Nothing in Visual Basic), or zero.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Brfalse,
+ "brfalse",
+ StackBehaviour.Popi,
+ StackBehaviour.Push0,
+ OperandType.InlineBrTarget,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x39,
+ FlowControl.Cond_Branch,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbrfalse_s.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbrfalse_s.cs
new file mode 100644
index 0000000000..fb8a926201
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbrfalse_s.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Brfalse_S [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Brfalse_S");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify transfers control to a target instruction(short form) if value is false, a null reference, or zero.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Brfalse_S,
+ "brfalse.s",
+ StackBehaviour.Popi,
+ StackBehaviour.Push0,
+ OperandType.ShortInlineBrTarget,
+ OpCodeType.Macro,
+ 1, (byte)0xff, (byte)0x2c,
+ FlowControl.Cond_Branch,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbrtrue.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbrtrue.cs
new file mode 100644
index 0000000000..73a81d058a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbrtrue.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Brtrue [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Brtrue");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify transfers control to a target instruction if value is true, not null, or non-zero.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Brtrue,
+ "brtrue",
+ StackBehaviour.Popi,
+ StackBehaviour.Push0,
+ OperandType.InlineBrTarget,
+ OpCodeType.Primitive,
+ 1, (byte)0xff, (byte)0x3a,
+ FlowControl.Cond_Branch,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbrtrue_s.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbrtrue_s.cs
new file mode 100644
index 0000000000..e7c7d9dbda
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesbrtrue_s.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Brtrue_S [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Brtrue_S");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify transfers control to a target instruction(short form) if value is true, not null, or non-zero.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Brtrue_S,
+ "brtrue.s",
+ StackBehaviour.Popi,
+ StackBehaviour.Push0,
+ OperandType.ShortInlineBrTarget,
+ OpCodeType.Macro,
+ 1, (byte)0xff, (byte)0x2d,
+ FlowControl.Cond_Branch,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescall.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescall.cs
new file mode 100644
index 0000000000..fe8e4140dc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescall.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Call [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Call");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify OpCodes.Call.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Call,
+ "call",
+ StackBehaviour.Varpop,
+ StackBehaviour.Varpush,
+ OperandType.InlineMethod,
+ OpCodeType.Primitive,
+ 1, (byte)0xff, (byte)0x28,
+ FlowControl.Call,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescalli.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescalli.cs
new file mode 100644
index 0000000000..f59d402e98
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescalli.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Calli [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Calli");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify OpCodes.Calli.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Calli,
+ "calli",
+ StackBehaviour.Varpop,
+ StackBehaviour.Varpush,
+ OperandType.InlineSig,
+ OpCodeType.Primitive,
+ 1, (byte)0xff, (byte)0x29,
+ FlowControl.Call,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescallvirt.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescallvirt.cs
new file mode 100644
index 0000000000..f356a36746
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescallvirt.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Callvirt [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Callvirt");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify OpCodes.Callvirt.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Callvirt,
+ "callvirt",
+ StackBehaviour.Varpop,
+ StackBehaviour.Varpush,
+ OperandType.InlineMethod,
+ OpCodeType.Objmodel,
+ 1, (byte)0xff, (byte)0x6f,
+ FlowControl.Call,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescastclass.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescastclass.cs
new file mode 100644
index 0000000000..214305ad82
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescastclass.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Castclass [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Castclass");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify OpCodes.Castclass.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Castclass,
+ "castclass",
+ StackBehaviour.Popref,
+ StackBehaviour.Pushref,
+ OperandType.InlineType,
+ OpCodeType.Objmodel,
+ 1, (byte)0xff, (byte)0x74,
+ FlowControl.Next,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesceq.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesceq.cs
new file mode 100644
index 0000000000..ca71a6f484
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesceq.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Ceq [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Ceq");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify OpCodes.Ceq.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Ceq,
+ "ceq",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 2, (byte)0xfe, (byte)0x1,
+ FlowControl.Next,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescgt.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescgt.cs
new file mode 100644
index 0000000000..101d201156
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescgt.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Cgt [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Cgt");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify OpCodes.Cgt.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Cgt,
+ "cgt",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 2, (byte)0xfe, (byte)0x2,
+ FlowControl.Next,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescgt_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescgt_un.cs
new file mode 100644
index 0000000000..0850b29dac
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescgt_un.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Cgt_Un [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Cgt_Un");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify OpCodes.Cgt_Un.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Cgt_Un,
+ "cgt.un",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 2, (byte)0xfe, (byte)0x3,
+ FlowControl.Next,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesckfinite.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesckfinite.cs
new file mode 100644
index 0000000000..1ed5a9c4f6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesckfinite.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Ckfinite [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Ckfinite");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify OpCodes.Ckfinite.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Ckfinite,
+ "ckfinite",
+ StackBehaviour.Pop1,
+ StackBehaviour.Pushr8,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1, (byte)0xff, (byte)0xc3,
+ FlowControl.Next,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesclt.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesclt.cs
new file mode 100644
index 0000000000..9dfde2a37b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesclt.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Clt [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Clt");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify OpCodes.Clt.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Clt,
+ "clt",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 2, (byte)0xfe, (byte)0x4,
+ FlowControl.Next,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesclt_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesclt_un.cs
new file mode 100644
index 0000000000..0ebf2710cc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesclt_un.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Clt_Un [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Clt_Un");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify OpCodes.Clt_Un.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Clt_Un,
+ "clt.un",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 2, (byte)0xfe, (byte)0x5,
+ FlowControl.Next,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconstrained.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconstrained.cs
new file mode 100644
index 0000000000..a530482645
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconstrained.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Constrained [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Constrained");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify OpCodes.Constrained.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Constrained,
+ "constrained.",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push0,
+ OperandType.InlineType,
+ OpCodeType.Prefix,
+ 2, (byte)0xfe, (byte)0x16,
+ FlowControl.Meta,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_i.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_i.cs
new file mode 100644
index 0000000000..a450bb7ec6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_i.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Conv_I [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Conv_I");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify OpCodes.Conv_I.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Conv_I,
+ "conv.i",
+ StackBehaviour.Pop1,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1, (byte)0xff, (byte)0xd3,
+ FlowControl.Next,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_i1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_i1.cs
new file mode 100644
index 0000000000..6605ee2d75
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_i1.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Conv_I1 [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Conv_I1");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify OpCodes.Conv_I1.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Conv_I1,
+ "conv.i1",
+ StackBehaviour.Pop1,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1, (byte)0xff, (byte)0x67,
+ FlowControl.Next,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_i2.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_i2.cs
new file mode 100644
index 0000000000..7e178744ed
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_i2.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Conv_I2 [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Conv_I2");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify OpCodes.Conv_I2.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Conv_I2,
+ "conv.i2",
+ StackBehaviour.Pop1,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1, (byte)0xff, (byte)0x68,
+ FlowControl.Next,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_i4.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_i4.cs
new file mode 100644
index 0000000000..5cd30f70ed
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_i4.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Conv_I4 [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Conv_I4");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify OpCodes.Conv_I4.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Conv_I4,
+ "conv.i4",
+ StackBehaviour.Pop1,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1, (byte)0xff, (byte)0x69,
+ FlowControl.Next,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_i8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_i8.cs
new file mode 100644
index 0000000000..bfa263ab86
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_i8.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Conv_I8 [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Conv_I8");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify OpCodes.Conv_I8.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Conv_I8,
+ "conv.i8",
+ StackBehaviour.Pop1,
+ StackBehaviour.Pushi8,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1, (byte)0xff, (byte)0x6a,
+ FlowControl.Next,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i.cs
new file mode 100644
index 0000000000..ebba4a44ad
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Conv_Ovf_I [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Conv_Ovf_I");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify OpCodes.Conv_Ovf_I.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Conv_Ovf_I,
+ "conv.ovf.i",
+ StackBehaviour.Pop1,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1, (byte)0xff, (byte)0xd4,
+ FlowControl.Next,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i1.cs
new file mode 100644
index 0000000000..bebfbf43cc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i1.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_Ovf_I1 [v-zuolan]
+///</summary>
+
+public class OpCodesConv_Ovf_I1
+{
+
+ public static int Main()
+ {
+ OpCodesConv_Ovf_I1 testObj = new OpCodesConv_Ovf_I1();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_Ovf_I1");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_Ovf_I1;
+
+ actualValue = CompareOpCode(opcode, "conv.ovf.i1", StackBehaviour.Pop1, StackBehaviour.Pushi, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0xb3, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i1_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i1_un.cs
new file mode 100644
index 0000000000..b98d3ab7cc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i1_un.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_Ovf_I1_Un [v-zuolan]
+///</summary>
+
+public class OpCodesConv_Ovf_I1_Un
+{
+
+ public static int Main()
+ {
+ OpCodesConv_Ovf_I1_Un testObj = new OpCodesConv_Ovf_I1_Un();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_Ovf_I1_Un");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_Ovf_I1_Un;
+
+ actualValue = CompareOpCode(opcode, "conv.ovf.i1.un", StackBehaviour.Pop1, StackBehaviour.Pushi, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x82, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i2.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i2.cs
new file mode 100644
index 0000000000..17d1c31530
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i2.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_Ovf_I2 [v-zuolan]
+///</summary>
+
+public class OpCodesConv_Ovf_I2
+{
+
+ public static int Main()
+ {
+ OpCodesConv_Ovf_I2 testObj = new OpCodesConv_Ovf_I2();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_Ovf_I2");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_Ovf_I2;
+
+ actualValue = CompareOpCode(opcode, "conv.ovf.i2", StackBehaviour.Pop1, StackBehaviour.Pushi, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0xb5, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i2_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i2_un.cs
new file mode 100644
index 0000000000..04a79ada55
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i2_un.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_Ovf_I2_Un [v-zuolan]
+///</summary>
+
+public class OpCodesConv_Ovf_I2_Un
+{
+
+ public static int Main()
+ {
+ OpCodesConv_Ovf_I2_Un testObj = new OpCodesConv_Ovf_I2_Un();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_Ovf_I2_Un");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_Ovf_I2_Un;
+
+ actualValue = CompareOpCode(opcode, "conv.ovf.i2.un", StackBehaviour.Pop1, StackBehaviour.Pushi, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x83, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i4.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i4.cs
new file mode 100644
index 0000000000..7fbd48cb91
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i4.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_Ovf_I4 [v-zuolan]
+///</summary>
+
+public class OpCodesConv_Ovf_I4
+{
+
+ public static int Main()
+ {
+ OpCodesConv_Ovf_I4 testObj = new OpCodesConv_Ovf_I4();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_Ovf_I4");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_Ovf_I4;
+
+ actualValue = CompareOpCode(opcode, "conv.ovf.i4", StackBehaviour.Pop1, StackBehaviour.Pushi, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0xb7, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i4_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i4_un.cs
new file mode 100644
index 0000000000..3e8cdb5c20
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i4_un.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_Ovf_I4_Un [v-zuolan]
+///</summary>
+
+public class OpCodesConv_Ovf_I4_Un
+{
+
+ public static int Main()
+ {
+ OpCodesConv_Ovf_I4_Un testObj = new OpCodesConv_Ovf_I4_Un();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_Ovf_I4_Un");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_Ovf_I4_Un;
+
+ actualValue = CompareOpCode(opcode, "conv.ovf.i4.un", StackBehaviour.Pop1, StackBehaviour.Pushi, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x84, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i8.cs
new file mode 100644
index 0000000000..706746e87f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i8.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_Ovf_I8 [v-zuolan]
+///</summary>
+
+public class OpCodesConv_Ovf_I8
+{
+
+ public static int Main()
+ {
+ OpCodesConv_Ovf_I8 testObj = new OpCodesConv_Ovf_I8();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_Ovf_I8");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_Ovf_I8;
+
+ actualValue = CompareOpCode(opcode, "conv.ovf.i8", StackBehaviour.Pop1, StackBehaviour.Pushi8, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0xb9, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i8_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i8_un.cs
new file mode 100644
index 0000000000..b4cd857322
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i8_un.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_Ovf_I8_Un [v-zuolan]
+///</summary>
+
+public class OpCodesConv_Ovf_I8_Un
+{
+
+ public static int Main()
+ {
+ OpCodesConv_Ovf_I8_Un testObj = new OpCodesConv_Ovf_I8_Un();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_Ovf_I8_Un");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_Ovf_I8_Un;
+
+ actualValue = CompareOpCode(opcode, "conv.ovf.i8.un", StackBehaviour.Pop1, StackBehaviour.Pushi8, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x85, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i_un.cs
new file mode 100644
index 0000000000..e52cc518a0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_i_un.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodes.Conv_Ovf_I_Un [v-yaduoj]
+/// </summary>
+public class OpCodesTest
+{
+ public static int Main()
+ {
+ OpCodesTest testObj = new OpCodesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Field: OpCodes.Conv_Ovf_I_Un");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Verify OpCodes.Conv_Ovf_I_Un.";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ retVal = VerifyAllTheFileds(OpCodes.Conv_Ovf_I_Un,
+ "conv.ovf.i.un",
+ StackBehaviour.Pop1,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1, (byte)0xff, (byte)0x8a,
+ FlowControl.Next,
+ "001");
+ }
+ catch (Exception e)
+ {
+ string errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for positive tests
+ private bool VerifyAllTheFileds(OpCode opCode,
+ String opCodeName,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operandType,
+ OpCodeType type,
+ int size,
+ byte s1, byte s2,
+ FlowControl ctrl,
+ string errorNum)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualName = opCode.Name;
+ if (actualName != opCodeName)
+ {
+ errorDesc = "Actual name of the specified MSIL instruction: \"" + actualName +
+ "\" does not equal expected name: \"" + opCodeName + "\"";
+ TestLibrary.TestFramework.LogError( errorNum + ".1", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPop = opCode.StackBehaviourPop;
+ if (actualStackBehaviourPop != pop)
+ {
+ errorDesc = "Actual pop statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPop +
+ ") does not equal expected pop stack behaviour: (" + pop + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".2", errorDesc);
+ retVal = false;
+ }
+
+ StackBehaviour actualStackBehaviourPush = opCode.StackBehaviourPush;
+ if (actualStackBehaviourPush != push)
+ {
+ errorDesc = "Actual push statck behaviour of the specified MSIL instruction: (" + actualStackBehaviourPush +
+ ") does not equal expected push stack behaviour: (" + push + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".3", errorDesc);
+ retVal = false;
+ }
+
+
+ OperandType actualOperandType = opCode.OperandType;
+ if (actualOperandType != operandType)
+ {
+ errorDesc = "Actual operand type of the specified MSIL instruction: (" + actualOperandType +
+ ") does not equal expected operand type: (" + operandType + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".4", errorDesc);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = opCode.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ errorDesc = "Actual OpCode type of the specified MSIL instruction: (" + actualOpCodeType +
+ ") does not equal expected OpCode type: (" + type + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".5", errorDesc);
+ retVal = false;
+ }
+
+ int actualSize = opCode.Size;
+ if (actualSize != size)
+ {
+ errorDesc = "Actual size of the specified MSIL instruction: (" + actualSize +
+ ") does not equal expected size: (" + size + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".6", errorDesc);
+ retVal = false;
+ }
+
+ short actualValue = opCode.Value;
+ short expectedValue = (2 == size) ? (short)(s1 << 8 | s2) : s2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Actual immediate operand value of the specified MSIL instruction: (" + actualValue +
+ ") does not equal expected immediate operand value: (" + expectedValue + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".7", errorDesc);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = opCode.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ errorDesc = "Actual flow control of the specified MSIL instruction: (" + actualCtrl +
+ ") does not equal expected flow control: (" + ctrl + ")";
+ TestLibrary.TestFramework.LogError(errorNum + ".8", errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u.cs
new file mode 100644
index 0000000000..f9d1955f55
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_Ovf_U [v-zuolan]
+///</summary>
+
+public class OpCodesConv_Ovf_U
+{
+
+ public static int Main()
+ {
+ OpCodesConv_Ovf_U testObj = new OpCodesConv_Ovf_U();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_Ovf_U");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_Ovf_U;
+
+ actualValue = CompareOpCode(opcode, "conv.ovf.u", StackBehaviour.Pop1, StackBehaviour.Pushi, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0xd5, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u1.cs
new file mode 100644
index 0000000000..792633906a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u1.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_Ovf_U1 [v-zuolan]
+///</summary>
+
+public class OpCodesConv_Ovf_U1
+{
+
+ public static int Main()
+ {
+ OpCodesConv_Ovf_U1 testObj = new OpCodesConv_Ovf_U1();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_Ovf_U1");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_Ovf_U1;
+
+ actualValue = CompareOpCode(opcode, "conv.ovf.u1", StackBehaviour.Pop1, StackBehaviour.Pushi, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0xb4, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u1_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u1_un.cs
new file mode 100644
index 0000000000..a530f190be
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u1_un.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_Ovf_U1_Un [v-zuolan]
+///</summary>
+
+public class OpCodesConv_Ovf_U1_Un
+{
+
+ public static int Main()
+ {
+ OpCodesConv_Ovf_U1_Un testObj = new OpCodesConv_Ovf_U1_Un();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_Ovf_U1_Un");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_Ovf_U1_Un;
+
+ actualValue = CompareOpCode(opcode, "conv.ovf.u1.un", StackBehaviour.Pop1, StackBehaviour.Pushi, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x86, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u2.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u2.cs
new file mode 100644
index 0000000000..90c3141aff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u2.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_Ovf_U2 [v-zuolan]
+///</summary>
+
+public class OpCodesConv_Ovf_U2
+{
+
+ public static int Main()
+ {
+ OpCodesConv_Ovf_U2 testObj = new OpCodesConv_Ovf_U2();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_Ovf_U2");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_Ovf_U2;
+
+ actualValue = CompareOpCode(opcode, "conv.ovf.u2", StackBehaviour.Pop1, StackBehaviour.Pushi, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0xb6, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u2_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u2_un.cs
new file mode 100644
index 0000000000..1634e35ee0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u2_un.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_Ovf_U2_Un [v-zuolan]
+///</summary>
+
+public class OpCodesConv_Ovf_U2_Un
+{
+
+ public static int Main()
+ {
+ OpCodesConv_Ovf_U2_Un testObj = new OpCodesConv_Ovf_U2_Un();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_Ovf_U2_Un");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_Ovf_U2_Un;
+
+ actualValue = CompareOpCode(opcode, "conv.ovf.u2.un", StackBehaviour.Pop1, StackBehaviour.Pushi, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x87, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u4.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u4.cs
new file mode 100644
index 0000000000..559627c6f6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u4.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_Ovf_U4 [v-zuolan]
+///</summary>
+
+public class OpCodesConv_Ovf_U4
+{
+
+ public static int Main()
+ {
+ OpCodesConv_Ovf_U4 testObj = new OpCodesConv_Ovf_U4();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_Ovf_U4");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_Ovf_U4;
+
+ actualValue = CompareOpCode(opcode, "conv.ovf.u4", StackBehaviour.Pop1, StackBehaviour.Pushi, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0xb8, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u4_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u4_un.cs
new file mode 100644
index 0000000000..9b1baa5178
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u4_un.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_Ovf_U4_Un [v-zuolan]
+///</summary>
+
+public class OpCodesConv_Ovf_U4_Un
+{
+
+ public static int Main()
+ {
+ OpCodesConv_Ovf_U4_Un testObj = new OpCodesConv_Ovf_U4_Un();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_Ovf_U4_Un");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_Ovf_U4_Un;
+
+ actualValue = CompareOpCode(opcode, "conv.ovf.u4.un", StackBehaviour.Pop1, StackBehaviour.Pushi, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x88, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u8.cs
new file mode 100644
index 0000000000..b0b9680a0c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u8.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_Ovf_U8 [v-zuolan]
+///</summary>
+
+public class OpCodesConv_Ovf_U8
+{
+
+ public static int Main()
+ {
+ OpCodesConv_Ovf_U8 testObj = new OpCodesConv_Ovf_U8();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_Ovf_U8");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_Ovf_U8;
+
+ actualValue = CompareOpCode(opcode, "conv.ovf.u8", StackBehaviour.Pop1, StackBehaviour.Pushi8, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0xba, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u8_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u8_un.cs
new file mode 100644
index 0000000000..99f27f8f03
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u8_un.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_Ovf_U8_Un [v-zuolan]
+///</summary>
+
+public class OpCodesConv_Ovf_U8_Un
+{
+
+ public static int Main()
+ {
+ OpCodesConv_Ovf_U8_Un testObj = new OpCodesConv_Ovf_U8_Un();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_Ovf_U8_Un");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_Ovf_U8_Un;
+
+ actualValue = CompareOpCode(opcode, "conv.ovf.u8.un", StackBehaviour.Pop1, StackBehaviour.Pushi8, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x89, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u_un.cs
new file mode 100644
index 0000000000..fbea5fcd01
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_ovf_u_un.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_Ovf_U_Un [v-zuolan]
+///</summary>
+
+public class OpCodesConv_Ovf_U_Un
+{
+
+ public static int Main()
+ {
+ OpCodesConv_Ovf_U_Un testObj = new OpCodesConv_Ovf_U_Un();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_Ovf_U_Un");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_Ovf_U_Un;
+
+ actualValue = CompareOpCode(opcode, "conv.ovf.u.un", StackBehaviour.Pop1, StackBehaviour.Pushi, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x8b, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_r4.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_r4.cs
new file mode 100644
index 0000000000..c2c8e686d5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_r4.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_R4 [v-zuolan]
+///</summary>
+
+public class OpCodesConv_R4
+{
+
+ public static int Main()
+ {
+ OpCodesConv_R4 testObj = new OpCodesConv_R4();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_R4");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_R4;
+
+ actualValue = CompareOpCode(opcode, "conv.r4", StackBehaviour.Pop1, StackBehaviour.Pushr4, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x6b, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_r8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_r8.cs
new file mode 100644
index 0000000000..2c5352da29
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_r8.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_R8 [v-zuolan]
+///</summary>
+
+public class OpCodesConv_R8
+{
+
+ public static int Main()
+ {
+ OpCodesConv_R8 testObj = new OpCodesConv_R8();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_R8");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_R8;
+
+ actualValue = CompareOpCode(opcode, "conv.r8", StackBehaviour.Pop1, StackBehaviour.Pushr8, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x6c, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_r_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_r_un.cs
new file mode 100644
index 0000000000..2e95d2187c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_r_un.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_R_Un [v-zuolan]
+///</summary>
+
+public class OpCodesConv_R_Un
+{
+
+ public static int Main()
+ {
+ OpCodesConv_R_Un testObj = new OpCodesConv_R_Un();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_R_Un");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_R_Un;
+
+ actualValue = CompareOpCode(opcode, "conv.r.un", StackBehaviour.Pop1, StackBehaviour.Pushr8, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x76, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_u.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_u.cs
new file mode 100644
index 0000000000..fb91ae9d7c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_u.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_U [v-zuolan]
+///</summary>
+
+public class OpCodesConv_U
+{
+
+ public static int Main()
+ {
+ OpCodesConv_U testObj = new OpCodesConv_U();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_U");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_U;
+
+ actualValue = CompareOpCode(opcode, "conv.u", StackBehaviour.Pop1, StackBehaviour.Pushi, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0xe0, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_u1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_u1.cs
new file mode 100644
index 0000000000..fc277a6ec4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_u1.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_U1 [v-zuolan]
+///</summary>
+
+public class OpCodesConv_U1
+{
+
+ public static int Main()
+ {
+ OpCodesConv_U1 testObj = new OpCodesConv_U1();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_U1");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_U1;
+
+ actualValue = CompareOpCode(opcode, "conv.u1", StackBehaviour.Pop1, StackBehaviour.Pushi, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0xd2, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_u2.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_u2.cs
new file mode 100644
index 0000000000..e8b887289b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_u2.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Conv_U2 [v-zuolan]
+///</summary>
+
+public class OpCodesConv_U2
+{
+
+ public static int Main()
+ {
+ OpCodesConv_U2 testObj = new OpCodesConv_U2();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Conv_U2");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Conv_U2;
+
+ actualValue = CompareOpCode(opcode, "conv.u2", StackBehaviour.Pop1, StackBehaviour.Pushi, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0xd1, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_u4.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_u4.cs
new file mode 100644
index 0000000000..609f467039
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_u4.cs
@@ -0,0 +1,197 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Conv_U4 [v-jianq]
+/// </summary>
+
+public class OpCodesConv_U4
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Conv_U4 field value");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Conv_U4,
+ "conv.u4",
+ StackBehaviour.Pop1,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x6d,
+ FlowControl.Next,
+ "001.",
+ "Conv_U4") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesConv_U4 test = new OpCodesConv_U4();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesConv_U4");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_u8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_u8.cs
new file mode 100644
index 0000000000..8ca4b9d03f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesconv_u8.cs
@@ -0,0 +1,198 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Conv_U8 [v-jianq]
+/// </summary>
+///
+
+public class OpCodesConv_U8
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Conv_U8 field value");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Conv_U8,
+ "conv.u8",
+ StackBehaviour.Pop1,
+ StackBehaviour.Pushi8,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x6e,
+ FlowControl.Next,
+ "001.",
+ "Conv_U8") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesConv_U8 test = new OpCodesConv_U8();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesConv_U8");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescpblk.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescpblk.cs
new file mode 100644
index 0000000000..f14913ed39
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescpblk.cs
@@ -0,0 +1,198 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Cpblk [v-jianq]
+/// </summary>
+///
+
+public class OpCodesCpblk
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Cpblk field value");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Cpblk,
+ "cpblk",
+ StackBehaviour.Popi_popi_popi,
+ StackBehaviour.Push0,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 2,
+ (byte)0xfe,
+ (byte)0x17,
+ FlowControl.Next,
+ "001.",
+ "Cpblk") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesCpblk test = new OpCodesCpblk();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesCpblk");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescpobj.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescpobj.cs
new file mode 100644
index 0000000000..e0f0b42408
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodescpobj.cs
@@ -0,0 +1,198 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Cpobj [v-jianq]
+/// </summary>
+///
+
+public class OpCodesCpobj
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Cpobj field value");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Cpobj,
+ "cpobj",
+ StackBehaviour.Popi_popi,
+ StackBehaviour.Push0,
+ OperandType.InlineType,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0x70,
+ FlowControl.Next,
+ "001.",
+ "Cpobj") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesCpobj test = new OpCodesCpobj();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesCpobj");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesdiv.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesdiv.cs
new file mode 100644
index 0000000000..925fd59f83
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesdiv.cs
@@ -0,0 +1,198 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Div [v-jianq]
+/// </summary>
+///
+
+public class OpCodesDiv
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Div field value");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Div,
+ "div",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push1,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x5b,
+ FlowControl.Next,
+ "001.",
+ "Div") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesDiv test = new OpCodesDiv();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesDiv");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesdiv_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesdiv_un.cs
new file mode 100644
index 0000000000..5aab432111
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesdiv_un.cs
@@ -0,0 +1,199 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Div_Un [v-jianq]
+/// </summary>
+///
+
+
+public class OpCodesDiv_Un
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Div_Un field value");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Div_Un,
+ "div.un",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push1,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x5c,
+ FlowControl.Next,
+ "001.",
+ "Div_Un") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesDiv_Un test = new OpCodesDiv_Un();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesDiv_Un");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesdup.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesdup.cs
new file mode 100644
index 0000000000..1c7a5c7bbe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesdup.cs
@@ -0,0 +1,198 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Dup [v-jianq]
+/// </summary>
+///
+
+public class OpCodesDup
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Dup field value");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Dup,
+ "dup",
+ StackBehaviour.Pop1,
+ StackBehaviour.Push1_push1,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x25,
+ FlowControl.Next,
+ "001.",
+ "Dup") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesDup test = new OpCodesDup();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesDup");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesendfilter.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesendfilter.cs
new file mode 100644
index 0000000000..014cdede72
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesendfilter.cs
@@ -0,0 +1,197 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Endfilter [v-jianq]
+/// </summary>
+///
+public class OpCodesEndfilter
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Endfilter field value");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Endfilter,
+ "endfilter",
+ StackBehaviour.Popi,
+ StackBehaviour.Push0,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 2,
+ (byte)0xfe,
+ (byte)0x11,
+ FlowControl.Return,
+ "001.",
+ "Endfilter") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesEndfilter test = new OpCodesEndfilter();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesEndfilter");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesendfinally.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesendfinally.cs
new file mode 100644
index 0000000000..4a6301fb52
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesendfinally.cs
@@ -0,0 +1,198 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Endfinally [v-jianq]
+/// </summary>
+///
+
+public class OpCodesEndfinally
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Endfinally field value");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Endfinally,
+ "endfinally",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push0,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0xdc,
+ FlowControl.Return,
+ "001.",
+ "Endfinally") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesEndfinally test = new OpCodesEndfinally();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesEndfinally");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesinitblk.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesinitblk.cs
new file mode 100644
index 0000000000..abc8b64c50
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesinitblk.cs
@@ -0,0 +1,198 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Initblk [v-jianq]
+/// </summary>
+///
+
+public class OpCodesInitblk
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Initblk field value");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Initblk,
+ "initblk",
+ StackBehaviour.Popi_popi_popi,
+ StackBehaviour.Push0,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 2,
+ (byte)0xfe,
+ (byte)0x18,
+ FlowControl.Next,
+ "001.",
+ "Initblk") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesInitblk test = new OpCodesInitblk();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesInitblk");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesinitobj.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesinitobj.cs
new file mode 100644
index 0000000000..2608de3131
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesinitobj.cs
@@ -0,0 +1,198 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Initobj [v-jianq]
+/// </summary>
+
+
+public class OpCodesInitobj
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Initobj field value");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Initobj,
+ "initobj",
+ StackBehaviour.Popi,
+ StackBehaviour.Push0,
+ OperandType.InlineType,
+ OpCodeType.Objmodel,
+ 2,
+ (byte)0xfe,
+ (byte)0x15,
+ FlowControl.Next,
+ "001.",
+ "Initobj") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesInitobj test = new OpCodesInitobj();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesInitobj");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesisinst.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesisinst.cs
new file mode 100644
index 0000000000..06b9f48f04
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesisinst.cs
@@ -0,0 +1,197 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Isinst [v-jianq]
+/// </summary>
+
+public class OpCodesIsinst
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Isinst field value");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Isinst,
+ "isinst",
+ StackBehaviour.Popref,
+ StackBehaviour.Pushi,
+ OperandType.InlineType,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0x75,
+ FlowControl.Next,
+ "001.",
+ "Isinst") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesIsinst test = new OpCodesIsinst();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesIsinst");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesize.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesize.cs
new file mode 100644
index 0000000000..f8991cff4f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesize.cs
@@ -0,0 +1,139 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// System.Reflection.Emit.OpCode.Size[v-jiajul]
+/// </summary>
+public class OpCodeSize
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The size of the opcode is one");
+
+ try
+ {
+ retVal = VerifyOpCodeSize1(OpCodes.Add, "001.0") && retVal;
+ retVal = VerifyOpCodeSize1(OpCodes.Ldc_I4, "001.1") && retVal;
+ retVal = VerifyOpCodeSize1(OpCodes.Conv_Ovf_I1_Un, "001.2") && retVal;
+ retVal = VerifyOpCodeSize1(OpCodes.Nop, "001.3") && retVal;
+ retVal = VerifyOpCodeSize1(OpCodes.Ldarg_0, "001.4") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The size of opcode is two");
+
+ try
+ {
+ retVal = VerifyOpCodeSize2(OpCodes.Stloc, "002.0") && retVal;
+ retVal = VerifyOpCodeSize2(OpCodes.Localloc, "002.1") && retVal;
+ retVal = VerifyOpCodeSize2(OpCodes.Clt_Un, "002.2") && retVal;
+ retVal = VerifyOpCodeSize2(OpCodes.Ldarg, "002.3") && retVal;
+ retVal = VerifyOpCodeSize2(OpCodes.Unaligned, "002.4") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodeSize test = new OpCodeSize();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodeSize");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region Private Methods
+ private bool VerifyOpCodeSize1(OpCode op1, string errNum)
+ {
+ bool retVal = true;
+
+ try
+ {
+ if (op1.Size != 1)
+ {
+ TestLibrary.TestFramework.LogError(errNum, "Result is not the value as expected,size is: " + op1.Size);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errNum, "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ private bool VerifyOpCodeSize2(OpCode op1, string errNum)
+ {
+ bool retVal = true;
+
+ try
+ {
+ if (op1.Size != 2)
+ {
+ TestLibrary.TestFramework.LogError(errNum, "Result is not the value as expected,size is: " + op1.Size);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errNum, "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesjmp.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesjmp.cs
new file mode 100644
index 0000000000..ced3ed1b31
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesjmp.cs
@@ -0,0 +1,197 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Jmp [v-jianq]
+/// </summary>
+
+public class OpCodesJmp
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Jmp field value");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Jmp,
+ "jmp",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push0,
+ OperandType.InlineMethod,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x27,
+ FlowControl.Call,
+ "001.",
+ "Jmp") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesJmp test = new OpCodesJmp();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesJmp");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg.cs
new file mode 100644
index 0000000000..c18c058802
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg.cs
@@ -0,0 +1,197 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Ldarg [v-jianq]
+/// </summary>
+
+public class OpCodesLdarg
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldarg field value");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldarg,
+ "ldarg",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push1,
+ OperandType.InlineVar,
+ OpCodeType.Primitive,
+ 2,
+ (byte)0xfe,
+ (byte)0x9,
+ FlowControl.Next,
+ "001.",
+ "Ldarg") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesLdarg test = new OpCodesLdarg();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesLdarg");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg_0.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg_0.cs
new file mode 100644
index 0000000000..33e4d76edc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg_0.cs
@@ -0,0 +1,197 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Ldarg_0 [v-jianq]
+/// </summary>
+
+public class OpCodesLdarg_0
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldarg_0 field value");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldarg_0,
+ "ldarg.0",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push1,
+ OperandType.InlineNone,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x2,
+ FlowControl.Next,
+ "001.",
+ "Ldarg_0") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesLdarg_0 test = new OpCodesLdarg_0();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesLdarg_0");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg_1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg_1.cs
new file mode 100644
index 0000000000..333b8c2c0c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg_1.cs
@@ -0,0 +1,197 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Ldarg_1
+/// </summary>
+
+public class OpCodesLdarg_1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldarg_1field value");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldarg_1,
+ "ldarg.1",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push1,
+ OperandType.InlineNone,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x3,
+ FlowControl.Next,
+ "001.",
+ "Ldarg_1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesLdarg_1 test = new OpCodesLdarg_1();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesLdarg_1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg_2.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg_2.cs
new file mode 100644
index 0000000000..89d4375d8a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg_2.cs
@@ -0,0 +1,197 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Ldarg_2 [v-jianq]
+/// </summary>
+
+public class OpCodesLdarg_2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldarg_2 field value");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldarg_2,
+ "ldarg.2",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push1,
+ OperandType.InlineNone,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x4,
+ FlowControl.Next,
+ "001.",
+ "Ldarg_2") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesLdarg_2 test = new OpCodesLdarg_2();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesLdarg_2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg_3.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg_3.cs
new file mode 100644
index 0000000000..cd1a2302d8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg_3.cs
@@ -0,0 +1,197 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Ldarg_3 [v-jianq]
+/// </summary>
+
+public class OpCodesLdarg_3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldarg_3 field value");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldarg_3,
+ "ldarg.3",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push1,
+ OperandType.InlineNone,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x5,
+ FlowControl.Next,
+ "001.",
+ "Ldarg_3") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesLdarg_3 test = new OpCodesLdarg_3();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesLdarg_3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg_s.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg_s.cs
new file mode 100644
index 0000000000..6185a173e1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarg_s.cs
@@ -0,0 +1,197 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Ldarg_S [v-jianq]
+/// </summary>
+
+public class OpCodesLdarg_S
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldarg field value");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldarg_S,
+ "ldarg.s",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push1,
+ OperandType.ShortInlineVar,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0xe,
+ FlowControl.Next,
+ "001.",
+ "Ldarg_S") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesLdarg_S test = new OpCodesLdarg_S();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesLdarg_S");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarga.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarga.cs
new file mode 100644
index 0000000000..db2a498585
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarga.cs
@@ -0,0 +1,197 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Ldarga [v-jianq]
+/// </summary>
+
+public class OpCodesLdarga
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldarga field value");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldarga,
+ "ldarga",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushi,
+ OperandType.InlineVar,
+ OpCodeType.Primitive,
+ 2,
+ (byte)0xfe,
+ (byte)0xa,
+ FlowControl.Next,
+ "001.",
+ "Ldarga") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesLdarga test = new OpCodesLdarga();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesLdarga");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarga_s.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarga_s.cs
new file mode 100644
index 0000000000..e13732b4df
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldarga_s.cs
@@ -0,0 +1,197 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Ldarga_S [v-jianq]
+/// </summary>
+
+public class OpCodesLdarga_S
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldarga_S field value");
+
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldarga_S,
+ "ldarga.s",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushi,
+ OperandType.ShortInlineVar,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0xf,
+ FlowControl.Next,
+ "001.",
+ "Ldarga_S") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodesLdarga_S test = new OpCodesLdarga_S();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodesLdarga_S");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4.cs
new file mode 100644
index 0000000000..65b6ae5811
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldc_I4 [v-minch]
+/// </summary>
+public class OpCodesLdc_I4
+{
+ public static int Main()
+ {
+ OpCodesLdc_I4 test = new OpCodesLdc_I4();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldc_I4");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldc_I4 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldc_I4,
+ "ldc.i4",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushi,
+ OperandType.InlineI,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x20,
+ FlowControl.Next,
+ "001.",
+ "Ldc_I4") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_0.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_0.cs
new file mode 100644
index 0000000000..f4e84e58b4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_0.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldc_I4_0 [v-minch]
+/// </summary>
+public class OpCodesLdc_I4_0
+{
+ public static int Main()
+ {
+ OpCodesLdc_I4_0 test = new OpCodesLdc_I4_0();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldc_I4_0");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldc_I4_0 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldc_I4_0,
+ "ldc.i4.0",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x16,
+ FlowControl.Next,
+ "001.",
+ "Ldc_I4_0") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_1.cs
new file mode 100644
index 0000000000..ddc7641295
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_1.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldc_I4_1 [v-minch]
+/// </summary>
+public class OpCodesLdc_I4_1
+{
+ public static int Main()
+ {
+ OpCodesLdc_I4_1 test = new OpCodesLdc_I4_1();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldc_I4_1");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldc_I4_1 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldc_I4_1,
+ "ldc.i4.1",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x17,
+ FlowControl.Next,
+ "001.",
+ "Ldc_I4_1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_2.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_2.cs
new file mode 100644
index 0000000000..ae1062354e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_2.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldc_I4_2 [v-minch]
+/// </summary>
+public class OpCodesLdc_I4_2
+{
+ public static int Main()
+ {
+ OpCodesLdc_I4_2 test = new OpCodesLdc_I4_2();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldc_I4_2");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldc_I4_2 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldc_I4_2,
+ "ldc.i4.2",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x18,
+ FlowControl.Next,
+ "001.",
+ "Ldc_I4_2") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_3.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_3.cs
new file mode 100644
index 0000000000..74d97c9a44
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_3.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldc_I4_3 [v-minch]
+/// </summary>
+public class OpCodesLdc_I4_3
+{
+ public static int Main()
+ {
+ OpCodesLdc_I4_3 test = new OpCodesLdc_I4_3();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldc_I4_3");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldc_I4_3 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldc_I4_3,
+ "ldc.i4.3",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x19,
+ FlowControl.Next,
+ "001.",
+ "Ldc_I4_3") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_4.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_4.cs
new file mode 100644
index 0000000000..a40e7a165d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_4.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldc_I4_4 [v-minch]
+/// </summary>
+public class OpCodesLdc_I4_4
+{
+ public static int Main()
+ {
+ OpCodesLdc_I4_4 test = new OpCodesLdc_I4_4();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldc_I4_4");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldc_I4_4 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldc_I4_4,
+ "ldc.i4.4",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x1a,
+ FlowControl.Next,
+ "001.",
+ "Ldc_I4_4") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_5.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_5.cs
new file mode 100644
index 0000000000..f5b25d50d4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_5.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldc_I4_5 [v-minch]
+/// </summary>
+public class OpCodesLdc_I4_5
+{
+ public static int Main()
+ {
+ OpCodesLdc_I4_5 test = new OpCodesLdc_I4_5();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldc_I4_5");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldc_I4_5 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldc_I4_5,
+ "ldc.i4.5",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x1b,
+ FlowControl.Next,
+ "001.",
+ "Ldc_I4_5") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_6.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_6.cs
new file mode 100644
index 0000000000..8042874892
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_6.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldc_I4_6 [v-minch]
+/// </summary>
+public class OpCodesLdc_I4_6
+{
+ public static int Main()
+ {
+ OpCodesLdc_I4_6 test = new OpCodesLdc_I4_6();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldc_I4_6");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldc_I4_6 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldc_I4_6,
+ "ldc.i4.6",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x1c,
+ FlowControl.Next,
+ "001.",
+ "Ldc_I4_6") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_7.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_7.cs
new file mode 100644
index 0000000000..b9ea1b1db8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_7.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldc_I4_7 [v-minch]
+/// </summary>
+public class OpCodesLdc_I4_7
+{
+ public static int Main()
+ {
+ OpCodesLdc_I4_7 test = new OpCodesLdc_I4_7();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldc_I4_7");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldc_I4_7 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldc_I4_7,
+ "ldc.i4.7",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x1d,
+ FlowControl.Next,
+ "001.",
+ "Ldc_I4_7") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_8.cs
new file mode 100644
index 0000000000..f3b33eb6d8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_8.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldc_I4_8 [v-minch]
+/// </summary>
+public class OpCodesLdc_I4_8
+{
+ public static int Main()
+ {
+ OpCodesLdc_I4_8 test = new OpCodesLdc_I4_8();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldc_I4_8");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldc_I4_8 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldc_I4_8,
+ "ldc.i4.8",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x1e,
+ FlowControl.Next,
+ "001.",
+ "Ldc_I4_8") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_m1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_m1.cs
new file mode 100644
index 0000000000..7caebe3289
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_m1.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldc_I4_M1 [v-minch]
+/// </summary>
+public class OpCodesLdc_I4_M1
+{
+ public static int Main()
+ {
+ OpCodesLdc_I4_M1 test = new OpCodesLdc_I4_M1();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldc_I4_M1");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldc_I4_M1 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldc_I4_M1,
+ "ldc.i4.m1",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x15,
+ FlowControl.Next,
+ "001.",
+ "Ldc_I4_M1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_s.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_s.cs
new file mode 100644
index 0000000000..0f485ff8b0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i4_s.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldc_I4_S [v-minch]
+/// </summary>
+public class OpCodesLdc_I4_S
+{
+ public static int Main()
+ {
+ OpCodesLdc_I4_S test = new OpCodesLdc_I4_S();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldc_I4_S");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldc_I4_S field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldc_I4_S,
+ "ldc.i4.s",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushi,
+ OperandType.ShortInlineI,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x1f,
+ FlowControl.Next,
+ "001.",
+ "Ldc_I4_S") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i8.cs
new file mode 100644
index 0000000000..8de3be0e56
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_i8.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldc_I8 [v-minch]
+/// </summary>
+public class OpCodesLdc_I8
+{
+ public static int Main()
+ {
+ OpCodesLdc_I8 test = new OpCodesLdc_I8();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldc_I8");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldc_I8 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldc_I8,
+ "ldc.i8",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushi8,
+ OperandType.InlineI8,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x21,
+ FlowControl.Next,
+ "001.",
+ "Ldc_I8") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_r4.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_r4.cs
new file mode 100644
index 0000000000..9c0383e5b8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_r4.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldc_R4 [v-minch]
+/// </summary>
+public class OpCodesLdc_R4
+{
+ public static int Main()
+ {
+ OpCodesLdc_R4 test = new OpCodesLdc_R4();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldc_R4");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldc_R4 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldc_R4,
+ "ldc.r4",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushr4,
+ OperandType.ShortInlineR,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x22,
+ FlowControl.Next,
+ "001.",
+ "Ldc_R4") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_r8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_r8.cs
new file mode 100644
index 0000000000..b2df830a36
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldc_r8.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldc_R8 [v-minch]
+/// </summary>
+public class OpCodesLdc_R8
+{
+ public static int Main()
+ {
+ OpCodesLdc_R8 test = new OpCodesLdc_R8();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldc_R8");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldc_R8 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldc_R8,
+ "ldc.r8",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushr8,
+ OperandType.InlineR,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x23,
+ FlowControl.Next,
+ "001.",
+ "Ldc_R8") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem.cs
new file mode 100644
index 0000000000..ccb5639e0f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldelem [v-minch]
+/// </summary>
+public class OpCodesLdelem
+{
+ public static int Main()
+ {
+ OpCodesLdelem test = new OpCodesLdelem();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldelem");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldelem field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldelem,
+ "ldelem",
+ StackBehaviour.Popref_popi,
+ StackBehaviour.Push1,
+ OperandType.InlineType,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0xa3,
+ FlowControl.Next,
+ "001.",
+ "Ldelem") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_i.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_i.cs
new file mode 100644
index 0000000000..95278de90e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_i.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldelem_I [v-minch]
+/// </summary>
+public class OpCodesLdelem_I
+{
+ public static int Main()
+ {
+ OpCodesLdelem_I test = new OpCodesLdelem_I();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldelem_I");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldelem_I field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldelem_I,
+ "ldelem.i",
+ StackBehaviour.Popref_popi,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0x97,
+ FlowControl.Next,
+ "001.",
+ "Ldelem_I") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_i1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_i1.cs
new file mode 100644
index 0000000000..7ee59e06ac
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_i1.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldelem_I1 [v-minch]
+/// </summary>
+public class OpCodesLdelem_I1
+{
+ public static int Main()
+ {
+ OpCodesLdelem_I1 test = new OpCodesLdelem_I1();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldelem_I1");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldelem_I1 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldelem_I1,
+ "ldelem.i1",
+ StackBehaviour.Popref_popi,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0x90,
+ FlowControl.Next,
+ "001.",
+ "Ldelem_I1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_i2.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_i2.cs
new file mode 100644
index 0000000000..2ef41dad8d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_i2.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldelem_I2 [v-minch]
+/// </summary>
+public class OpCodesLdelem_I2
+{
+ public static int Main()
+ {
+ OpCodesLdelem_I2 test = new OpCodesLdelem_I2();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldelem_I2");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldelem_I2 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldelem_I2,
+ "ldelem.i2",
+ StackBehaviour.Popref_popi,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0x92,
+ FlowControl.Next,
+ "001.",
+ "Ldelem_I2") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_i4.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_i4.cs
new file mode 100644
index 0000000000..f9e2fcc073
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_i4.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldelem_I4 [v-minch]
+/// </summary>
+public class OpCodesLdelem_I4
+{
+ public static int Main()
+ {
+ OpCodesLdelem_I4 test = new OpCodesLdelem_I4();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldelem_I4");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldelem_I4 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldelem_I4,
+ "ldelem.i4",
+ StackBehaviour.Popref_popi,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0x94,
+ FlowControl.Next,
+ "001.",
+ "Ldelem_I4") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_i8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_i8.cs
new file mode 100644
index 0000000000..9efef21282
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_i8.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldelem_I8 [v-minch]
+/// </summary>
+public class OpCodesLdelem_I8
+{
+ public static int Main()
+ {
+ OpCodesLdelem_I8 test = new OpCodesLdelem_I8();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldelem_I8");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldelem_I8 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldelem_I8,
+ "ldelem.i8",
+ StackBehaviour.Popref_popi,
+ StackBehaviour.Pushi8,
+ OperandType.InlineNone,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0x96,
+ FlowControl.Next,
+ "001.",
+ "Ldelem_I8") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_r4.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_r4.cs
new file mode 100644
index 0000000000..1d7132a0d2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_r4.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldelem_R4 [v-minch]
+/// </summary>
+public class OpCodesLdelem_R4
+{
+ public static int Main()
+ {
+ OpCodesLdelem_R4 test = new OpCodesLdelem_R4();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldelem_R4");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldelem_R4 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldelem_R4,
+ "ldelem.r4",
+ StackBehaviour.Popref_popi,
+ StackBehaviour.Pushr4,
+ OperandType.InlineNone,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0x98,
+ FlowControl.Next,
+ "001.",
+ "Ldelem_R4") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_r8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_r8.cs
new file mode 100644
index 0000000000..16dc93adf1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_r8.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldelem_R8 [v-minch]
+/// </summary>
+public class OpCodesLdelem_R8
+{
+ public static int Main()
+ {
+ OpCodesLdelem_R8 test = new OpCodesLdelem_R8();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldelem_R8");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldelem_R8 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldelem_R8,
+ "ldelem.r8",
+ StackBehaviour.Popref_popi,
+ StackBehaviour.Pushr8,
+ OperandType.InlineNone,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0x99,
+ FlowControl.Next,
+ "001.",
+ "Ldelem_R8") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_ref.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_ref.cs
new file mode 100644
index 0000000000..f00f6353c3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_ref.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldelem_Ref [v-minch]
+/// </summary>
+public class OpCodesLdelem_Ref
+{
+ public static int Main()
+ {
+ OpCodesLdelem_Ref test = new OpCodesLdelem_Ref();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldelem_Ref");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldelem_Ref field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldelem_Ref,
+ "ldelem.ref",
+ StackBehaviour.Popref_popi,
+ StackBehaviour.Pushref,
+ OperandType.InlineNone,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0x9a,
+ FlowControl.Next,
+ "001.",
+ "Ldelem_Ref") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_u1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_u1.cs
new file mode 100644
index 0000000000..f49a8ee331
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_u1.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldelem_U1 [v-minch]
+/// </summary>
+public class OpCodesLdelem_U1
+{
+ public static int Main()
+ {
+ OpCodesLdelem_U1 test = new OpCodesLdelem_U1();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldelem_U1");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldelem_U1 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldelem_U1,
+ "ldelem.u1",
+ StackBehaviour.Popref_popi,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0x91,
+ FlowControl.Next,
+ "001.",
+ "Ldelem_U1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_u2.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_u2.cs
new file mode 100644
index 0000000000..b4d874af3b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_u2.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldelem_U2 [v-minch]
+/// </summary>
+public class OpCodesLdelem_U2
+{
+ public static int Main()
+ {
+ OpCodesLdelem_U2 test = new OpCodesLdelem_U2();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldelem_U2");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldelem_U2 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldelem_U2,
+ "ldelem.u2",
+ StackBehaviour.Popref_popi,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0x93,
+ FlowControl.Next,
+ "001.",
+ "Ldelem_U2") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_u4.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_u4.cs
new file mode 100644
index 0000000000..3e17e1ac20
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelem_u4.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldelem_U4 [v-minch]
+/// </summary>
+public class OpCodesLdelem_U4
+{
+ public static int Main()
+ {
+ OpCodesLdelem_U4 test = new OpCodesLdelem_U4();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldelem_U4");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldelem_U4 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldelem_U4,
+ "ldelem.u4",
+ StackBehaviour.Popref_popi,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0x95,
+ FlowControl.Next,
+ "001.",
+ "Ldelem_U4") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelema.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelema.cs
new file mode 100644
index 0000000000..01f7d42c46
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldelema.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldelema [v-minch]
+/// </summary>
+public class OpCodesLdelema
+{
+ public static int Main()
+ {
+ OpCodesLdelema test = new OpCodesLdelema();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldelema");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldelema field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldelema,
+ "ldelema",
+ StackBehaviour.Popref_popi,
+ StackBehaviour.Pushi,
+ OperandType.InlineType,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0x8f,
+ FlowControl.Next,
+ "001.",
+ "Ldelema") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldfld.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldfld.cs
new file mode 100644
index 0000000000..5b0abaa841
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldfld.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldfld [v-minch]
+/// </summary>
+public class OpCodesLdfld
+{
+ public static int Main()
+ {
+ OpCodesLdfld test = new OpCodesLdfld();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldfld");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldfld field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldfld,
+ "ldfld",
+ StackBehaviour.Popref,
+ StackBehaviour.Push1,
+ OperandType.InlineField,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0x7b,
+ FlowControl.Next,
+ "001.",
+ "Ldfld") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldflda.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldflda.cs
new file mode 100644
index 0000000000..cbcd615a4d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldflda.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldflda [v-minch]
+/// </summary>
+public class OpCodesLdflda
+{
+ public static int Main()
+ {
+ OpCodesLdflda test = new OpCodesLdflda();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldflda");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldflda field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldflda,
+ "ldflda",
+ StackBehaviour.Popref,
+ StackBehaviour.Pushi,
+ OperandType.InlineField,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0x7c,
+ FlowControl.Next,
+ "001.",
+ "Ldflda") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldftn.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldftn.cs
new file mode 100644
index 0000000000..3558127d43
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldftn.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldftn [v-minch]
+/// </summary>
+public class OpCodesLdftn
+{
+ public static int Main()
+ {
+ OpCodesLdftn test = new OpCodesLdftn();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldftn");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldftn field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldftn,
+ "ldftn",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushi,
+ OperandType.InlineMethod,
+ OpCodeType.Primitive,
+ 2,
+ (byte)0xfe,
+ (byte)0x6,
+ FlowControl.Next,
+ "001.",
+ "Ldftn") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_i.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_i.cs
new file mode 100644
index 0000000000..86acf399c4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_i.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldind_I [v-minch]
+/// </summary>
+public class OpCodesLdind_I
+{
+ public static int Main()
+ {
+ OpCodesLdind_I test = new OpCodesLdind_I();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldind_I");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldind_I field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldind_I,
+ "ldind.i",
+ StackBehaviour.Popi,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x4d,
+ FlowControl.Next,
+ "001.",
+ "Ldind_I") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_i1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_i1.cs
new file mode 100644
index 0000000000..5ef1d5e1d9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_i1.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldind_I1[v-minch]
+/// </summary>
+public class OpCodesLdind_I1
+{
+ public static int Main()
+ {
+ OpCodesLdind_I1 test = new OpCodesLdind_I1();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldind_I1");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldind_I1 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldind_I1,
+ "ldind.i1",
+ StackBehaviour.Popi,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x46,
+ FlowControl.Next,
+ "001.",
+ "Ldind_I1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_i2.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_i2.cs
new file mode 100644
index 0000000000..3fc15b5ad3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_i2.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldind_I2[v-minch]
+/// </summary>
+public class OpCodesLdind_I2
+{
+ public static int Main()
+ {
+ OpCodesLdind_I2 test = new OpCodesLdind_I2();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldind_I2");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldind_I2 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldind_I2,
+ "ldind.i2",
+ StackBehaviour.Popi,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x48,
+ FlowControl.Next,
+ "001.",
+ "Ldind_I2") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_i4.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_i4.cs
new file mode 100644
index 0000000000..2e4c2b580b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_i4.cs
@@ -0,0 +1,152 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldind_I4[v-minch]
+/// </summary>
+public class OpCodesLdind_I4
+{
+ public static int Main()
+ {
+ OpCodesLdind_I4 test = new OpCodesLdind_I4();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldind_I4");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldind_I4 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldind_I4,
+ "ldind.i4",
+ StackBehaviour.Popi,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x4a,
+ FlowControl.Next,
+ "001.",
+ "Ldind_I4") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_i8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_i8.cs
new file mode 100644
index 0000000000..384a948574
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_i8.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldind_I8[v-minch]
+/// </summary>
+public class OpCodesLdind_I8
+{
+ public static int Main()
+ {
+ OpCodesLdind_I8 test = new OpCodesLdind_I8();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldind_I8");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldind_I8 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldind_I8,
+ "ldind.i8",
+ StackBehaviour.Popi,
+ StackBehaviour.Pushi8,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x4c,
+ FlowControl.Next,
+ "001.",
+ "Ldind_I8") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_r4.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_r4.cs
new file mode 100644
index 0000000000..5ba54ea5dd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_r4.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldind_R4[v-minch]
+/// </summary>
+public class OpCodesLdind_R4
+{
+ public static int Main()
+ {
+ OpCodesLdind_R4 test = new OpCodesLdind_R4();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldind_R4");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldind_R4 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldind_R4,
+ "ldind.r4",
+ StackBehaviour.Popi,
+ StackBehaviour.Pushr4,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x4e,
+ FlowControl.Next,
+ "001.",
+ "Ldind_R4") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_r8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_r8.cs
new file mode 100644
index 0000000000..5cc6b70be0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_r8.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldind_R8[v-minch]
+/// </summary>
+public class OpCodesLdind_R8
+{
+ public static int Main()
+ {
+ OpCodesLdind_R8 test = new OpCodesLdind_R8();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldind_R8");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldind_R8 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldind_R8,
+ "ldind.r8",
+ StackBehaviour.Popi,
+ StackBehaviour.Pushr8,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x4f,
+ FlowControl.Next,
+ "001.",
+ "Ldind_R8") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_ref.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_ref.cs
new file mode 100644
index 0000000000..4877354589
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_ref.cs
@@ -0,0 +1,152 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldind_Ref[v-minch]
+/// </summary>
+public class OpCodesLdind_Ref
+{
+ public static int Main()
+ {
+ OpCodesLdind_Ref test = new OpCodesLdind_Ref();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldind_Ref");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldind_Ref field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldind_Ref,
+ "ldind.ref",
+ StackBehaviour.Popi,
+ StackBehaviour.Pushref,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x50,
+ FlowControl.Next,
+ "001.",
+ "Ldind_Ref") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_u1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_u1.cs
new file mode 100644
index 0000000000..54aefae878
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_u1.cs
@@ -0,0 +1,152 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldind_U1[v-minch]
+/// </summary>
+public class OpCodesLdind_U1
+{
+ public static int Main()
+ {
+ OpCodesLdind_U1 test = new OpCodesLdind_U1();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldind_U1");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldind_U1 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldind_U1,
+ "ldind.u1",
+ StackBehaviour.Popi,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x47,
+ FlowControl.Next,
+ "001.",
+ "Ldind_U1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_u2.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_u2.cs
new file mode 100644
index 0000000000..cb572c014a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_u2.cs
@@ -0,0 +1,152 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldind_U2[v-minch]
+/// </summary>
+public class OpCodesLdind_U2
+{
+ public static int Main()
+ {
+ OpCodesLdind_U2 test = new OpCodesLdind_U2();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldind_U2");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldind_U2 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldind_U2,
+ "ldind.u2",
+ StackBehaviour.Popi,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x49,
+ FlowControl.Next,
+ "001.",
+ "Ldind_U2") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_u4.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_u4.cs
new file mode 100644
index 0000000000..743e9dbdfa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldind_u4.cs
@@ -0,0 +1,152 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldind_U4[v-minch]
+/// </summary>
+public class OpCodesLdind_U4
+{
+ public static int Main()
+ {
+ OpCodesLdind_U4 test = new OpCodesLdind_U4();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldind_U4");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldind_U4 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldind_U4,
+ "ldind.u4",
+ StackBehaviour.Popi,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x4b,
+ FlowControl.Next,
+ "001.",
+ "Ldind_U4") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldlen.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldlen.cs
new file mode 100644
index 0000000000..490b5924f1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldlen.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldlen [v-minch]
+/// </summary>
+public class OpCodesLdlen
+{
+ public static int Main()
+ {
+ OpCodesLdlen test = new OpCodesLdlen();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldlen");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldlen field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldlen,
+ "ldlen",
+ StackBehaviour.Popref,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0x8e,
+ FlowControl.Next,
+ "001.",
+ "Ldlen") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc.cs
new file mode 100644
index 0000000000..beac34b185
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldloc [v-minch]
+/// </summary>
+public class OpCodesLdloc
+{
+ public static int Main()
+ {
+ OpCodesLdloc test = new OpCodesLdloc();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldloc");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldloc field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldloc,
+ "ldloc",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push1,
+ OperandType.InlineVar,
+ OpCodeType.Primitive,
+ 2,
+ (byte)0xfe,
+ (byte)0xc,
+ FlowControl.Next,
+ "001.",
+ "Ldloc") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc_0.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc_0.cs
new file mode 100644
index 0000000000..1ac014bec3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc_0.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldloc_0 [v-minch]
+/// </summary>
+public class OpCodesLdloc_0
+{
+ public static int Main()
+ {
+ OpCodesLdloc_0 test = new OpCodesLdloc_0();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldloc_0");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldloc_0 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldloc_0,
+ "ldloc.0",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push1,
+ OperandType.InlineNone,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x6,
+ FlowControl.Next,
+ "001.",
+ "Ldloc_0") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc_1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc_1.cs
new file mode 100644
index 0000000000..9387be4104
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc_1.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldloc_1 [v-minch]
+/// </summary>
+public class OpCodesLdloc_1
+{
+ public static int Main()
+ {
+ OpCodesLdloc_1 test = new OpCodesLdloc_1();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldloc_1");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldloc_1 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldloc_1,
+ "ldloc.1",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push1,
+ OperandType.InlineNone,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x7,
+ FlowControl.Next,
+ "001.",
+ "Ldloc_1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc_2.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc_2.cs
new file mode 100644
index 0000000000..35e4fd199a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc_2.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldloc_2 [v-minch]
+/// </summary>
+public class OpCodesLdloc_2
+{
+ public static int Main()
+ {
+ OpCodesLdloc_2 test = new OpCodesLdloc_2();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldloc_2");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldloc_2 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldloc_2,
+ "ldloc.2",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push1,
+ OperandType.InlineNone,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x8,
+ FlowControl.Next,
+ "001.",
+ "Ldloc_2") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc_3.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc_3.cs
new file mode 100644
index 0000000000..3ace57c3a8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc_3.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldloc_3 [v-minch]
+/// </summary>
+public class OpCodesLdloc_3
+{
+ public static int Main()
+ {
+ OpCodesLdloc_3 test = new OpCodesLdloc_3();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldloc_3");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldloc_3 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldloc_3,
+ "ldloc.3",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push1,
+ OperandType.InlineNone,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x9,
+ FlowControl.Next,
+ "001.",
+ "Ldloc_3") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc_s.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc_s.cs
new file mode 100644
index 0000000000..125556690c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloc_s.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldloc_S [v-minch]
+/// </summary>
+public class OpCodesLdloc_S
+{
+ public static int Main()
+ {
+ OpCodesLdloc_S test = new OpCodesLdloc_S();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldloc_S");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldloc_S field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldloc_S,
+ "ldloc.s",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push1,
+ OperandType.ShortInlineVar,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x11,
+ FlowControl.Next,
+ "001.",
+ "Ldloc_S") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloca.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloca.cs
new file mode 100644
index 0000000000..63e93bad73
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloca.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldloca [v-minch]
+/// </summary>
+public class OpCodesLdloca
+{
+ public static int Main()
+ {
+ OpCodesLdloca test = new OpCodesLdloca();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldloca");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldloca field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldloca,
+ "ldloca",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushi,
+ OperandType.InlineVar,
+ OpCodeType.Primitive,
+ 2,
+ (byte)0xfe,
+ (byte)0xd,
+ FlowControl.Next,
+ "001.",
+ "Ldloca") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloca_s.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloca_s.cs
new file mode 100644
index 0000000000..32fbb8a658
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldloca_s.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldloca_S [v-minch]
+/// </summary>
+public class OpCodesLdloca_S
+{
+ public static int Main()
+ {
+ OpCodesLdloca_S test = new OpCodesLdloca_S();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldloca_S");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldloca_S field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldloca_S,
+ "ldloca.s",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushi,
+ OperandType.ShortInlineVar,
+ OpCodeType.Macro,
+ 1,
+ (byte)0xff,
+ (byte)0x12,
+ FlowControl.Next,
+ "001.",
+ "Ldloca_S") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldnull.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldnull.cs
new file mode 100644
index 0000000000..3a87b0a143
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldnull.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldnull [v-minch]
+/// </summary>
+public class OpCodesLdnull
+{
+ public static int Main()
+ {
+ OpCodesLdnull test = new OpCodesLdnull();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldnull");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldnull field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldnull,
+ "ldnull",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushref,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x14,
+ FlowControl.Next,
+ "001.",
+ "Ldnull") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldobj.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldobj.cs
new file mode 100644
index 0000000000..7627df3de1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldobj.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldobj [v-minch]
+/// </summary>
+public class OpCodesLdobj
+{
+ public static int Main()
+ {
+ OpCodesLdobj test = new OpCodesLdobj();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldobj");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldobj field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldobj,
+ "ldobj",
+ StackBehaviour.Popi,
+ StackBehaviour.Push1,
+ OperandType.InlineType,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0x71,
+ FlowControl.Next,
+ "001.",
+ "Ldobj") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldsfld.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldsfld.cs
new file mode 100644
index 0000000000..9840f77ecb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldsfld.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldsfld [v-minch]
+/// </summary>
+public class OpCodesLdsfld
+{
+ public static int Main()
+ {
+ OpCodesLdsfld test = new OpCodesLdsfld();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldsfld");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldsfld field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldsfld,
+ "ldsfld",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push1,
+ OperandType.InlineField,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0x7e,
+ FlowControl.Next,
+ "001.",
+ "Ldsfld") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldsflda.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldsflda.cs
new file mode 100644
index 0000000000..2ccd292227
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldsflda.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldsflda [v-minch]
+/// </summary>
+public class OpCodesLdsflda
+{
+ public static int Main()
+ {
+ OpCodesLdsflda test = new OpCodesLdsflda();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldsflda");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldsflda field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldsflda,
+ "ldsflda",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushi,
+ OperandType.InlineField,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0x7f,
+ FlowControl.Next,
+ "001.",
+ "Ldsflda") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldstr.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldstr.cs
new file mode 100644
index 0000000000..278fa92349
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldstr.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldstr [v-minch]
+/// </summary>
+public class OpCodesLdstr
+{
+ public static int Main()
+ {
+ OpCodesLdstr test = new OpCodesLdstr();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldstr");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldstr field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldstr,
+ "ldstr",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushref,
+ OperandType.InlineString,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0x72,
+ FlowControl.Next,
+ "001.",
+ "Ldstr") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldtoken.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldtoken.cs
new file mode 100644
index 0000000000..5779f6e27f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldtoken.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldtoken [v-minch]
+/// </summary>
+public class OpCodesLdtoken
+{
+ public static int Main()
+ {
+ OpCodesLdtoken test = new OpCodesLdtoken();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldtoken");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldtoken field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldtoken,
+ "ldtoken",
+ StackBehaviour.Pop0,
+ StackBehaviour.Pushi,
+ OperandType.InlineTok,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0xd0,
+ FlowControl.Next,
+ "001.",
+ "Ldtoken") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldvirtftn.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldvirtftn.cs
new file mode 100644
index 0000000000..5c4d1f8a09
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesldvirtftn.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ldvirtftn [v-minch]
+/// </summary>
+public class OpCodesLdvirtftn
+{
+ public static int Main()
+ {
+ OpCodesLdvirtftn test = new OpCodesLdvirtftn();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ldvirtftn");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ldvirtftnfield value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ldvirtftn,
+ "ldvirtftn",
+ StackBehaviour.Popref,
+ StackBehaviour.Pushi,
+ OperandType.InlineMethod,
+ OpCodeType.Primitive,
+ 2,
+ (byte)0xfe,
+ (byte)0x7,
+ FlowControl.Next,
+ "001.",
+ "Ldvirtftn") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesleave.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesleave.cs
new file mode 100644
index 0000000000..c4902aa096
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesleave.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Leave [v-minch]
+/// </summary>
+public class OpCodesLeave
+{
+ public static int Main()
+ {
+ OpCodesLeave test = new OpCodesLeave();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Leave");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Leavefield value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Leave,
+ "leave",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push0,
+ OperandType.InlineBrTarget,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xfe,
+ (byte)0xdd,
+ FlowControl.Branch,
+ "001.",
+ "Leave") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesleave_s.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesleave_s.cs
new file mode 100644
index 0000000000..49274aac2e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesleave_s.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Leave_S [v-minch]
+/// </summary>
+public class OpCodesLeave_S
+{
+ public static int Main()
+ {
+ OpCodesLeave_S test = new OpCodesLeave_S();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Leave_S");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Leave_Sfield value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Leave_S,
+ "leave.s",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push0,
+ OperandType.ShortInlineBrTarget,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xfe,
+ (byte)0xde,
+ FlowControl.Branch,
+ "001.",
+ "Leave_S") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeslocalloc.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeslocalloc.cs
new file mode 100644
index 0000000000..250c10de6a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodeslocalloc.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Localloc [v-minch]
+/// </summary>
+public class OpCodesLocalloc
+{
+ public static int Main()
+ {
+ OpCodesLocalloc test = new OpCodesLocalloc();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Localloc");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Locallocfield value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Localloc,
+ "localloc",
+ StackBehaviour.Popi,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 2,
+ (byte)0xfe,
+ (byte)0xf,
+ FlowControl.Next,
+ "001.",
+ "Localloc") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesmkrefany.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesmkrefany.cs
new file mode 100644
index 0000000000..316b05369d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesmkrefany.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Mkrefany [v-minch]
+/// </summary>
+public class OpCodesMkrefany
+{
+ public static int Main()
+ {
+ OpCodesMkrefany test = new OpCodesMkrefany();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Mkrefany");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Mkrefanyfield value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Mkrefany,
+ "mkrefany",
+ StackBehaviour.Popi,
+ StackBehaviour.Push1,
+ OperandType.InlineType,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0xc6,
+ FlowControl.Next,
+ "001.",
+ "Mkrefany") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesmul.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesmul.cs
new file mode 100644
index 0000000000..490bcbb4d3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesmul.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Mul [v-minch]
+/// </summary>
+public class OpCodesMul
+{
+ public static int Main()
+ {
+ OpCodesMul test = new OpCodesMul();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Mul");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Mul field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Mul,
+ "mul",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push1,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x5a,
+ FlowControl.Next,
+ "001.",
+ "Mul") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesmul_ovf.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesmul_ovf.cs
new file mode 100644
index 0000000000..9f9b75883d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesmul_ovf.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Mul_Ovf [v-minch]
+/// </summary>
+public class OpCodesMul_Ovf
+{
+ public static int Main()
+ {
+ OpCodesMul_Ovf test = new OpCodesMul_Ovf();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Mul_Ovf");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Mul_Ovf field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Mul_Ovf,
+ "mul.ovf",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push1,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0xd8,
+ FlowControl.Next,
+ "001.",
+ "Mul_Ovf") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesmul_ovf_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesmul_ovf_un.cs
new file mode 100644
index 0000000000..95f5aef31d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesmul_ovf_un.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Mul_Ovf_Un [v-minch]
+/// </summary>
+public class OpCodesMul_Ovf_Un
+{
+ public static int Main()
+ {
+ OpCodesMul_Ovf_Un test = new OpCodesMul_Ovf_Un();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Mul_Ovf_Un");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Mul_Ovf_Un field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Mul_Ovf_Un,
+ "mul.ovf.un",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push1,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0xd9,
+ FlowControl.Next,
+ "001.",
+ "Mul_Ovf_Un") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesneg.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesneg.cs
new file mode 100644
index 0000000000..e3771c1e71
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesneg.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Neg [v-minch]
+/// </summary>
+public class OpCodesNeg
+{
+ public static int Main()
+ {
+ OpCodesNeg test = new OpCodesNeg();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Neg");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Neg field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Neg,
+ "neg",
+ StackBehaviour.Pop1,
+ StackBehaviour.Push1,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x65,
+ FlowControl.Next,
+ "001.",
+ "Neg") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesnewarr.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesnewarr.cs
new file mode 100644
index 0000000000..9effe62c02
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesnewarr.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Newarr [v-minch]
+/// </summary>
+public class OpCodesNewarr
+{
+ public static int Main()
+ {
+ OpCodesNewarr test = new OpCodesNewarr();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Newarr");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Newarr field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Newarr,
+ "newarr",
+ StackBehaviour.Popi,
+ StackBehaviour.Pushref,
+ OperandType.InlineType,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0x8d,
+ FlowControl.Next,
+ "001.",
+ "Newarr") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesnewobj.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesnewobj.cs
new file mode 100644
index 0000000000..f1f7d696b7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesnewobj.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Newobj [v-minch]
+/// </summary>
+public class OpCodesNewobj
+{
+ public static int Main()
+ {
+ OpCodesNewobj test = new OpCodesNewobj();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Newobj");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Newobj field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Newobj,
+ "newobj",
+ StackBehaviour.Varpop,
+ StackBehaviour.Pushref,
+ OperandType.InlineMethod,
+ OpCodeType.Objmodel,
+ 1,
+ (byte)0xff,
+ (byte)0x73,
+ FlowControl.Call,
+ "001.",
+ "Newobj") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesnop.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesnop.cs
new file mode 100644
index 0000000000..7a45b3058d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesnop.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Nop [v-minch]
+/// </summary>
+public class OpCodesNop
+{
+ public static int Main()
+ {
+ OpCodesNop test = new OpCodesNop();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Nop");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Nop field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Nop,
+ "nop",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push0,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x0,
+ FlowControl.Next,
+ "001.",
+ "Nop") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesnot.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesnot.cs
new file mode 100644
index 0000000000..67a68ae781
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesnot.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Not [v-minch]
+/// </summary>
+public class OpCodesNot
+{
+ public static int Main()
+ {
+ OpCodesNot test = new OpCodesNot();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Not");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Not field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Not,
+ "not",
+ StackBehaviour.Pop1,
+ StackBehaviour.Push1,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x66,
+ FlowControl.Next,
+ "001.",
+ "Not") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesor.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesor.cs
new file mode 100644
index 0000000000..6bfa1930d4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesor.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Or [v-minch]
+/// </summary>
+public class OpCodesOr
+{
+ public static int Main()
+ {
+ OpCodesOr test = new OpCodesOr();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Or");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Or field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Or,
+ "or",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push1,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x60,
+ FlowControl.Next,
+ "001.",
+ "Or") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodespop.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodespop.cs
new file mode 100644
index 0000000000..e4081b3327
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodespop.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Pop [v-minch]
+/// </summary>
+public class OpCodesPop
+{
+ public static int Main()
+ {
+ OpCodesPop test = new OpCodesPop();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Pop");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Pop field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Pop,
+ "pop",
+ StackBehaviour.Pop1,
+ StackBehaviour.Push0,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x26,
+ FlowControl.Next,
+ "001.",
+ "Pop") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix1.cs
new file mode 100644
index 0000000000..82ee1bb8aa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix1.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Prefix1 [v-minch]
+/// </summary>
+public class OpCodesPrefix1
+{
+ public static int Main()
+ {
+ OpCodesPrefix1 test = new OpCodesPrefix1();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Prefix1");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Prefix1 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Prefix1,
+ "prefix1",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push0,
+ OperandType.InlineNone,
+ OpCodeType.Nternal,
+ 1,
+ (byte)0xff,
+ (byte)0xfe,
+ FlowControl.Meta,
+ "001.",
+ "Prefix1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix2.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix2.cs
new file mode 100644
index 0000000000..96c0aef79d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix2.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Prefix2 [v-minch]
+/// </summary>
+public class OpCodesPrefix2
+{
+ public static int Main()
+ {
+ OpCodesPrefix2 test = new OpCodesPrefix2();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Prefix2");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Prefix2 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Prefix2,
+ "prefix2",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push0,
+ OperandType.InlineNone,
+ OpCodeType.Nternal,
+ 1,
+ (byte)0xff,
+ (byte)0xfd,
+ FlowControl.Meta,
+ "001.",
+ "Prefix2") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix3.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix3.cs
new file mode 100644
index 0000000000..ddf8830c86
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix3.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Prefix3 [v-minch]
+/// </summary>
+public class OpCodesPrefix3
+{
+ public static int Main()
+ {
+ OpCodesPrefix3 test = new OpCodesPrefix3();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Prefix3");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Prefix3 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Prefix3,
+ "prefix3",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push0,
+ OperandType.InlineNone,
+ OpCodeType.Nternal,
+ 1,
+ (byte)0xff,
+ (byte)0xfc,
+ FlowControl.Meta,
+ "001.",
+ "Prefix3") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix4.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix4.cs
new file mode 100644
index 0000000000..1b30477b80
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix4.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Prefix4 [v-minch]
+/// </summary>
+public class OpCodesPrefix4
+{
+ public static int Main()
+ {
+ OpCodesPrefix4 test = new OpCodesPrefix4();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Prefix4");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Prefix4 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Prefix4,
+ "prefix4",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push0,
+ OperandType.InlineNone,
+ OpCodeType.Nternal,
+ 1,
+ (byte)0xff,
+ (byte)0xfb,
+ FlowControl.Meta,
+ "001.",
+ "Prefix4") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix5.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix5.cs
new file mode 100644
index 0000000000..f376fda160
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix5.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Prefix5 [v-minch]
+/// </summary>
+public class OpCodesPrefix5
+{
+ public static int Main()
+ {
+ OpCodesPrefix5 test = new OpCodesPrefix5();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Prefix5");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Prefix5 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Prefix5,
+ "prefix5",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push0,
+ OperandType.InlineNone,
+ OpCodeType.Nternal,
+ 1,
+ (byte)0xff,
+ (byte)0xfa,
+ FlowControl.Meta,
+ "001.",
+ "Prefix5") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix6.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix6.cs
new file mode 100644
index 0000000000..9c98246c69
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix6.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Prefix6 [v-minch]
+/// </summary>
+public class OpCodesPrefix6
+{
+ public static int Main()
+ {
+ OpCodesPrefix6 test = new OpCodesPrefix6();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Prefix6");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Prefix6 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Prefix6,
+ "prefix6",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push0,
+ OperandType.InlineNone,
+ OpCodeType.Nternal,
+ 1,
+ (byte)0xff,
+ (byte)0xf9,
+ FlowControl.Meta,
+ "001.",
+ "Prefix6") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix7.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix7.cs
new file mode 100644
index 0000000000..04b72aa81e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefix7.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Prefix7 [v-minch]
+/// </summary>
+public class OpCodesPrefix7
+{
+ public static int Main()
+ {
+ OpCodesPrefix7 test = new OpCodesPrefix7();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Prefix7");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Prefix7 field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Prefix7,
+ "prefix7",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push0,
+ OperandType.InlineNone,
+ OpCodeType.Nternal,
+ 1,
+ (byte)0xff,
+ (byte)0xf8,
+ FlowControl.Meta,
+ "001.",
+ "Prefix7") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefixref.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefixref.cs
new file mode 100644
index 0000000000..085e4749b1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesprefixref.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Prefixref [v-minch]
+/// </summary>
+public class OpCodesPrefixref
+{
+ public static int Main()
+ {
+ OpCodesPrefixref test = new OpCodesPrefixref();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Prefixref");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Prefixref field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Prefixref,
+ "prefixref",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push0,
+ OperandType.InlineNone,
+ OpCodeType.Nternal,
+ 1,
+ (byte)0xff,
+ (byte)0xff,
+ FlowControl.Meta,
+ "001.",
+ "Prefixref") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesreadonly.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesreadonly.cs
new file mode 100644
index 0000000000..9eb7adbdee
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesreadonly.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Readonly [v-minch]
+/// </summary>
+public class OpCodesReadonly
+{
+ public static int Main()
+ {
+ OpCodesReadonly test = new OpCodesReadonly();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Readonly");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Readonly field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Readonly,
+ "readonly.",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push0,
+ OperandType.InlineNone,
+ OpCodeType.Prefix,
+ 2,
+ (byte)0xfe,
+ (byte)0x1e,
+ FlowControl.Meta,
+ "001.",
+ "Readonly") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesrefanytype.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesrefanytype.cs
new file mode 100644
index 0000000000..6eeda65423
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesrefanytype.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Refanytype [v-minch]
+/// </summary>
+public class OpCodesRefanytype
+{
+ public static int Main()
+ {
+ OpCodesRefanytype test = new OpCodesRefanytype();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Refanytype");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Refanytype field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Refanytype,
+ "refanytype",
+ StackBehaviour.Pop1,
+ StackBehaviour.Pushi,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 2,
+ (byte)0xfe,
+ (byte)0x1d,
+ FlowControl.Next,
+ "001.",
+ "Refanytype") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesrefanyval.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesrefanyval.cs
new file mode 100644
index 0000000000..b0b6ca0d74
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesrefanyval.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Refanyval [v-minch]
+/// </summary>
+public class OpCodesRefanyval
+{
+ public static int Main()
+ {
+ OpCodesRefanyval test = new OpCodesRefanyval();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Refanyval");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Refanyval field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Refanyval,
+ "refanyval",
+ StackBehaviour.Pop1,
+ StackBehaviour.Pushi,
+ OperandType.InlineType,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xfe,
+ (byte)0xc2,
+ FlowControl.Next,
+ "001.",
+ "Refanyval") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesrem.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesrem.cs
new file mode 100644
index 0000000000..5cb932e51f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesrem.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Rem [v-minch]
+/// </summary>
+public class OpCodesRem
+{
+ public static int Main()
+ {
+ OpCodesRem test = new OpCodesRem();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Rem");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Rem field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Rem,
+ "rem",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push1,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x5d,
+ FlowControl.Next,
+ "001.",
+ "Rem") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesrem_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesrem_un.cs
new file mode 100644
index 0000000000..7f17906998
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesrem_un.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Rem_Un [v-minch]
+/// </summary>
+public class OpCodesRem_Un
+{
+ public static int Main()
+ {
+ OpCodesRem_Un test = new OpCodesRem_Un();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Rem_Un");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Rem_Un field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Rem_Un,
+ "rem.un",
+ StackBehaviour.Pop1_pop1,
+ StackBehaviour.Push1,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x5e,
+ FlowControl.Next,
+ "001.",
+ "Rem_Un") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesret.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesret.cs
new file mode 100644
index 0000000000..ebd783e3bf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesret.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Ret [v-minch]
+/// </summary>
+public class OpCodesRet
+{
+ public static int Main()
+ {
+ OpCodesRet test = new OpCodesRet();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Ret");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Ret field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Ret,
+ "ret",
+ StackBehaviour.Varpop,
+ StackBehaviour.Push0,
+ OperandType.InlineNone,
+ OpCodeType.Primitive,
+ 1,
+ (byte)0xff,
+ (byte)0x2a,
+ FlowControl.Return,
+ "001.",
+ "Ret") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesrethrow.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesrethrow.cs
new file mode 100644
index 0000000000..fdea835b26
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesrethrow.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+/// <summary>
+/// OpCodes.Rethrow [v-minch]
+/// </summary>
+public class OpCodesRethrow
+{
+ public static int Main()
+ {
+ OpCodesRethrow test = new OpCodesRethrow();
+ TestLibrary.TestFramework.BeginTestCase("Test for the field of OpCodes.Rethrow");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OpCodes Rethrow field value");
+ try
+ {
+ retVal = VerificationHelper(OpCodes.Rethrow,
+ "rethrow",
+ StackBehaviour.Pop0,
+ StackBehaviour.Push0,
+ OperandType.InlineNone,
+ OpCodeType.Objmodel,
+ 2,
+ (byte)0xfe,
+ (byte)0x1a,
+ FlowControl.Throw,
+ "001.",
+ "Rethrow") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region Private Methods
+ private bool VerificationHelper(OpCode code,
+ string name,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType oprandType,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl,
+ string errorno,
+ string errordesp)
+ {
+ bool retVal = true;
+
+ string actualName = code.Name;
+ if (actualName != name)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".0", "Name returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualName = " + actualName + ", name = " + name);
+ retVal = false;
+ }
+
+ StackBehaviour actualPop = code.StackBehaviourPop;
+ if (actualPop != pop)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".1", "StackBehaviourPop returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPop = " + actualPop + ", pop = " + pop);
+ retVal = false;
+ }
+
+ StackBehaviour actualPush = code.StackBehaviourPush;
+ if (actualPush != push)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".2", "StackBehaviourPush returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualPush = " + actualPush + ", push = " + push);
+ retVal = false;
+ }
+
+ OperandType actualOperandType = code.OperandType;
+ if (actualOperandType != oprandType)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".3", "OperandType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOperandType = " + actualOperandType + ", oprandType = " + oprandType);
+ retVal = false;
+ }
+
+ OpCodeType actualOpCodeType = code.OpCodeType;
+ if (actualOpCodeType != type)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".4", "OpCodeType returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualOpCodeType = " + actualOpCodeType + ", type = " + type);
+ retVal = false;
+ }
+
+ int actualSize = code.Size;
+ if (actualSize != size)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".5", "Size returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualSize = " + actualSize + ", size = " + size);
+ retVal = false;
+ }
+
+ short expectedValue = 0;
+ if (size == 2)
+ expectedValue = (short)(s1 << 8 | s2);
+ else
+ expectedValue = (short)s2;
+
+ short actualValue = code.Value;
+ if (actualValue != expectedValue)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".6", "Value returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualValue = " + actualValue + ", s1 = " + s1 + ", s2 = " + s2 + ", expectedValue = " + expectedValue);
+ retVal = false;
+ }
+
+ FlowControl actualCtrl = code.FlowControl;
+ if (actualCtrl != ctrl)
+ {
+ TestLibrary.TestFramework.LogError(errorno + ".7", "FlowControl returns wrong value for OpCode " + errordesp);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actualCtrl = " + actualCtrl + ", ctrl = " + ctrl);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesshl.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesshl.cs
new file mode 100644
index 0000000000..faca5a2dc1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesshl.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Shl [v-zuolan]
+///</summary>
+
+public class OpCodesShl
+{
+
+ public static int Main()
+ {
+ OpCodesShl testObj = new OpCodesShl();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Shl");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Shl;
+
+ actualValue = CompareOpCode(opcode, "shl", StackBehaviour.Pop1_pop1, StackBehaviour.Push1, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x62, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if(opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesshr.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesshr.cs
new file mode 100644
index 0000000000..e38206c2f3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesshr.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Shr [v-zuolan]
+///</summary>
+
+public class OpCodesShr
+{
+
+ public static int Main()
+ {
+ OpCodesShr testObj = new OpCodesShr();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Shr");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Shr;
+
+ actualValue = CompareOpCode(opcode, "shr", StackBehaviour.Pop1_pop1, StackBehaviour.Push1, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x63, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString() + "";
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesshr_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesshr_un.cs
new file mode 100644
index 0000000000..c0ec9f8d50
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesshr_un.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Shr_Un [v-zuolan]
+///</summary>
+
+public class OpCodesShr_Un
+{
+
+ public static int Main()
+ {
+ OpCodesShr_Un testObj = new OpCodesShr_Un();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Shr_Un");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Shr_Un;
+
+ actualValue = CompareOpCode(opcode, "shr.un", StackBehaviour.Pop1_pop1, StackBehaviour.Push1, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x64, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString() + "";
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodessizeof.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodessizeof.cs
new file mode 100644
index 0000000000..57153da114
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodessizeof.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Sizeof [v-zuolan]
+///</summary>
+
+public class OpCodesSizeof
+{
+
+ public static int Main()
+ {
+ OpCodesSizeof testObj = new OpCodesSizeof();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Sizeof");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Sizeof;
+
+ actualValue = CompareOpCode(opcode, "sizeof", StackBehaviour.Pop0, StackBehaviour.Pushi, OperandType.InlineType, OpCodeType.Primitive, 2, (byte)0xfe, (byte)0x1c, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstarg.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstarg.cs
new file mode 100644
index 0000000000..df1131e265
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstarg.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Starg [v-zuolan]
+///</summary>
+
+public class OpCodesStarg
+{
+
+ public static int Main()
+ {
+ OpCodesStarg testObj = new OpCodesStarg();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Starg");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Starg;
+
+ actualValue = CompareOpCode(opcode, "starg", StackBehaviour.Pop1, StackBehaviour.Push0, OperandType.InlineVar, OpCodeType.Primitive, 2, (byte)0xfe, (byte)0xb, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstarg_s.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstarg_s.cs
new file mode 100644
index 0000000000..becdd08fb5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstarg_s.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Starg_S [v-zuolan]
+///</summary>
+
+public class OpCodesStarg_S
+{
+
+ public static int Main()
+ {
+ OpCodesStarg_S testObj = new OpCodesStarg_S();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Starg_S");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Starg_S;
+
+ actualValue = CompareOpCode(opcode, "starg.s", StackBehaviour.Pop1, StackBehaviour.Push0, OperandType.ShortInlineVar, OpCodeType.Macro, 1, (byte)0xff, (byte)0x10, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem.cs
new file mode 100644
index 0000000000..a89be506a1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stelem [v-zuolan]
+///</summary>
+
+public class OpCodesStelem
+{
+
+ public static int Main()
+ {
+ OpCodesStelem testObj = new OpCodesStelem();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stelem");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stelem;
+
+ actualValue = CompareOpCode(opcode, "stelem", StackBehaviour.Popref_popi_pop1, StackBehaviour.Push0, OperandType.InlineType, OpCodeType.Objmodel, 1, (byte)0xff, (byte)0xa4, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_i.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_i.cs
new file mode 100644
index 0000000000..f7bbaca93d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_i.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stelem_I [v-zuolan]
+///</summary>
+
+public class OpCodesStelem_I
+{
+
+ public static int Main()
+ {
+ OpCodesStelem_I testObj = new OpCodesStelem_I();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stelem_I");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stelem_I;
+
+ actualValue = CompareOpCode(opcode, "stelem.i", StackBehaviour.Popref_popi_popi, StackBehaviour.Push0, OperandType.InlineNone, OpCodeType.Objmodel, 1, (byte)0xff, (byte)0x9b, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_i1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_i1.cs
new file mode 100644
index 0000000000..057f325662
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_i1.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stelem_I1 [v-zuolan]
+///</summary>
+
+public class OpCodesStelem_I1
+{
+
+ public static int Main()
+ {
+ OpCodesStelem_I1 testObj = new OpCodesStelem_I1();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stelem_I1");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stelem_I1;
+
+ actualValue = CompareOpCode(opcode, "stelem.i1", StackBehaviour.Popref_popi_popi, StackBehaviour.Push0, OperandType.InlineNone, OpCodeType.Objmodel, 1, (byte)0xff, (byte)0x9c, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_i2.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_i2.cs
new file mode 100644
index 0000000000..3be0369d5e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_i2.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stelem_I2 [v-zuolan]
+///</summary>
+
+public class OpCodesStelem_I2
+{
+
+ public static int Main()
+ {
+ OpCodesStelem_I2 testObj = new OpCodesStelem_I2();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stelem_I2");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stelem_I2;
+
+ actualValue = CompareOpCode(opcode, "stelem.i2", StackBehaviour.Popref_popi_popi, StackBehaviour.Push0, OperandType.InlineNone, OpCodeType.Objmodel, 1, (byte)0xff, (byte)0x9d, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_i4.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_i4.cs
new file mode 100644
index 0000000000..3f44e6d2a5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_i4.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stelem_I4 [v-zuolan]
+///</summary>
+
+public class OpCodesStelem_I4
+{
+
+ public static int Main()
+ {
+ OpCodesStelem_I4 testObj = new OpCodesStelem_I4();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stelem_I4");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stelem_I4;
+
+ actualValue = CompareOpCode(opcode, "stelem.i4", StackBehaviour.Popref_popi_popi, StackBehaviour.Push0, OperandType.InlineNone, OpCodeType.Objmodel, 1, (byte)0xff, (byte)0x9e, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_i8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_i8.cs
new file mode 100644
index 0000000000..a343c25b3e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_i8.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stelem_I8 [v-zuolan]
+///</summary>
+
+public class OpCodesStelem_I8
+{
+
+ public static int Main()
+ {
+ OpCodesStelem_I8 testObj = new OpCodesStelem_I8();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stelem_I8");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stelem_I8;
+
+ actualValue = CompareOpCode(opcode, "stelem.i8", StackBehaviour.Popref_popi_popi8, StackBehaviour.Push0, OperandType.InlineNone, OpCodeType.Objmodel, 1, (byte)0xff, (byte)0x9f, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_r4.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_r4.cs
new file mode 100644
index 0000000000..8ae9b699d7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_r4.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stelem_R4 [v-zuolan]
+///</summary>
+
+public class OpCodesStelem_R4
+{
+
+ public static int Main()
+ {
+ OpCodesStelem_R4 testObj = new OpCodesStelem_R4();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stelem_R4");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stelem_R4;
+
+ actualValue = CompareOpCode(opcode, "stelem.r4", StackBehaviour.Popref_popi_popr4, StackBehaviour.Push0, OperandType.InlineNone, OpCodeType.Objmodel, 1, (byte)0xff, (byte)0xa0, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_r8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_r8.cs
new file mode 100644
index 0000000000..ab281691b3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_r8.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stelem_R8 [v-zuolan]
+///</summary>
+
+public class OpCodesStelem_R8
+{
+
+ public static int Main()
+ {
+ OpCodesStelem_R8 testObj = new OpCodesStelem_R8();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stelem_R8");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stelem_R8;
+
+ actualValue = CompareOpCode(opcode, "stelem.r8", StackBehaviour.Popref_popi_popr8, StackBehaviour.Push0, OperandType.InlineNone, OpCodeType.Objmodel, 1, (byte)0xff, (byte)0xa1, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_ref.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_ref.cs
new file mode 100644
index 0000000000..db2219ea8b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstelem_ref.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stelem_Ref [v-zuolan]
+///</summary>
+
+public class OpCodesStelem_Ref
+{
+
+ public static int Main()
+ {
+ OpCodesStelem_Ref testObj = new OpCodesStelem_Ref();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stelem_Ref");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stelem_Ref;
+
+ actualValue = CompareOpCode(opcode, "stelem.ref", StackBehaviour.Popref_popi_popref, StackBehaviour.Push0, OperandType.InlineNone, OpCodeType.Objmodel, 1, (byte)0xff, (byte)0xa2, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstfld.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstfld.cs
new file mode 100644
index 0000000000..3f2a9c89a1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstfld.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stfld [v-zuolan]
+///</summary>
+
+public class OpCodesStfld
+{
+
+ public static int Main()
+ {
+ OpCodesStfld testObj = new OpCodesStfld();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stfld");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stfld;
+
+ actualValue = CompareOpCode(opcode, "stfld", StackBehaviour.Popref_pop1, StackBehaviour.Push0, OperandType.InlineField, OpCodeType.Objmodel, 1, (byte)0xff, (byte)0x7d, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_i.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_i.cs
new file mode 100644
index 0000000000..1702a99f8b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_i.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stind_I [v-zuolan]
+///</summary>
+
+public class OpCodesStind_I
+{
+
+ public static int Main()
+ {
+ OpCodesStind_I testObj = new OpCodesStind_I();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stind_I");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stind_I;
+
+ actualValue = CompareOpCode(opcode, "stind.i", StackBehaviour.Popi_popi, StackBehaviour.Push0, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0xdf, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_i1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_i1.cs
new file mode 100644
index 0000000000..b43888a667
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_i1.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stind_I1 [v-zuolan]
+///</summary>
+
+public class OpCodesStind_I1
+{
+
+ public static int Main()
+ {
+ OpCodesStind_I1 testObj = new OpCodesStind_I1();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stind_I1");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stind_I1;
+
+ actualValue = CompareOpCode(opcode, "stind.i1", StackBehaviour.Popi_popi, StackBehaviour.Push0, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x52, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_i2.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_i2.cs
new file mode 100644
index 0000000000..b601aba1fd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_i2.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stind_I2 [v-zuolan]
+///</summary>
+
+public class OpCodesStind_I2
+{
+
+ public static int Main()
+ {
+ OpCodesStind_I2 testObj = new OpCodesStind_I2();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stind_I2");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stind_I2;
+
+ actualValue = CompareOpCode(opcode, "stind.i2", StackBehaviour.Popi_popi, StackBehaviour.Push0, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x53, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_i4.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_i4.cs
new file mode 100644
index 0000000000..ca6a00236c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_i4.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stind_I4 [v-zuolan]
+///</summary>
+
+public class OpCodesStind_I4
+{
+
+ public static int Main()
+ {
+ OpCodesStind_I4 testObj = new OpCodesStind_I4();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stind_I4");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stind_I4;
+
+ actualValue = CompareOpCode(opcode, "stind.i4", StackBehaviour.Popi_popi, StackBehaviour.Push0, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x54, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_i8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_i8.cs
new file mode 100644
index 0000000000..4a25052d61
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_i8.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stind_I8 [v-zuolan]
+///</summary>
+
+public class OpCodesStind_I8
+{
+
+ public static int Main()
+ {
+ OpCodesStind_I8 testObj = new OpCodesStind_I8();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stind_I8");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stind_I8;
+
+ actualValue = CompareOpCode(opcode, "stind.i8", StackBehaviour.Popi_popi8, StackBehaviour.Push0, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x55, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_r4.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_r4.cs
new file mode 100644
index 0000000000..96763c8069
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_r4.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stind_R4 [v-zuolan]
+///</summary>
+
+public class OpCodesStind_R4
+{
+
+ public static int Main()
+ {
+ OpCodesStind_R4 testObj = new OpCodesStind_R4();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stind_R4");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stind_R4;
+
+ actualValue = CompareOpCode(opcode, "stind.r4", StackBehaviour.Popi_popr4, StackBehaviour.Push0, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x56, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_r8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_r8.cs
new file mode 100644
index 0000000000..b857dbeb60
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_r8.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stind_R8 [v-zuolan]
+///</summary>
+
+public class OpCodesStind_R8
+{
+
+ public static int Main()
+ {
+ OpCodesStind_R8 testObj = new OpCodesStind_R8();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stind_R8");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stind_R8;
+
+ actualValue = CompareOpCode(opcode, "stind.r8", StackBehaviour.Popi_popr8, StackBehaviour.Push0, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x57, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_ref.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_ref.cs
new file mode 100644
index 0000000000..2a1960be19
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstind_ref.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stind_Ref [v-zuolan]
+///</summary>
+
+public class OpCodesStind_Ref
+{
+
+ public static int Main()
+ {
+ OpCodesStind_Ref testObj = new OpCodesStind_Ref();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stind_Ref");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stind_Ref;
+
+ actualValue = CompareOpCode(opcode, "stind.ref", StackBehaviour.Popi_popi, StackBehaviour.Push0, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x51, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc.cs
new file mode 100644
index 0000000000..a70f1cbb20
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stloc [v-zuolan]
+///</summary>
+
+public class OpCodesStloc
+{
+
+ public static int Main()
+ {
+ OpCodesStloc testObj = new OpCodesStloc();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stloc");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stloc;
+
+ actualValue = CompareOpCode(opcode, "stloc", StackBehaviour.Pop1, StackBehaviour.Push0, OperandType.InlineVar, OpCodeType.Primitive, 2, (byte)0xfe, (byte)0xe, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc_0.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc_0.cs
new file mode 100644
index 0000000000..9527e476ad
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc_0.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stloc_0 [v-zuolan]
+///</summary>
+
+public class OpCodesStloc_0
+{
+
+ public static int Main()
+ {
+ OpCodesStloc_0 testObj = new OpCodesStloc_0();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stloc_0");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stloc_0;
+
+ actualValue = CompareOpCode(opcode, "stloc.0", StackBehaviour.Pop1, StackBehaviour.Push0, OperandType.InlineNone, OpCodeType.Macro, 1, (byte)0xff, (byte)0xa, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc_1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc_1.cs
new file mode 100644
index 0000000000..2ff27c8887
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc_1.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stloc_1 [v-zuolan]
+///</summary>
+
+public class OpCodesStloc_1
+{
+
+ public static int Main()
+ {
+ OpCodesStloc_1 testObj = new OpCodesStloc_1();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stloc_1");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stloc_1;
+
+ actualValue = CompareOpCode(opcode, "stloc.1", StackBehaviour.Pop1, StackBehaviour.Push0, OperandType.InlineNone, OpCodeType.Macro, 1, (byte)0xff, (byte)0xb, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc_2.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc_2.cs
new file mode 100644
index 0000000000..972c1331af
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc_2.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stloc_2 [v-zuolan]
+///</summary>
+
+public class OpCodesStloc_2
+{
+
+ public static int Main()
+ {
+ OpCodesStloc_2 testObj = new OpCodesStloc_2();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stloc_2");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stloc_2;
+
+ actualValue = CompareOpCode(opcode, "stloc.2", StackBehaviour.Pop1, StackBehaviour.Push0, OperandType.InlineNone, OpCodeType.Macro, 1, (byte)0xff, (byte)0xc, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc_3.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc_3.cs
new file mode 100644
index 0000000000..ae51024bc9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc_3.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stloc_3 [v-zuolan]
+///</summary>
+
+public class OpCodesStloc_3
+{
+
+ public static int Main()
+ {
+ OpCodesStloc_3 testObj = new OpCodesStloc_3();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stloc_3");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stloc_3;
+
+ actualValue = CompareOpCode(opcode, "stloc.3", StackBehaviour.Pop1, StackBehaviour.Push0, OperandType.InlineNone, OpCodeType.Macro, 1, (byte)0xff, (byte)0xd, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc_s.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc_s.cs
new file mode 100644
index 0000000000..64b8205ed2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstloc_s.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stloc_S [v-zuolan]
+///</summary>
+
+public class OpCodesStloc_S
+{
+
+ public static int Main()
+ {
+ OpCodesStloc_S testObj = new OpCodesStloc_S();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stloc_S");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stloc_S;
+
+ actualValue = CompareOpCode(opcode, "stloc.s", StackBehaviour.Pop1, StackBehaviour.Push0, OperandType.ShortInlineVar, OpCodeType.Macro, 1, (byte)0xff, (byte)0x13, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstobj.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstobj.cs
new file mode 100644
index 0000000000..ed0f3b1b5a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstobj.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stobj [v-zuolan]
+///</summary>
+
+public class OpCodesStobj
+{
+
+ public static int Main()
+ {
+ OpCodesStobj testObj = new OpCodesStobj();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stobj");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stobj;
+
+ actualValue = CompareOpCode(opcode, "stobj", StackBehaviour.Popi_pop1, StackBehaviour.Push0, OperandType.InlineType, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x81, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstsfld.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstsfld.cs
new file mode 100644
index 0000000000..8f80a02601
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesstsfld.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Stsfld [v-zuolan]
+///</summary>
+
+public class OpCodesStsfld
+{
+
+ public static int Main()
+ {
+ OpCodesStsfld testObj = new OpCodesStsfld();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Stsfld");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Stsfld;
+
+ actualValue = CompareOpCode(opcode, "stsfld", StackBehaviour.Pop1, StackBehaviour.Push0, OperandType.InlineField, OpCodeType.Objmodel, 1, (byte)0xff, (byte)0x80, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodessub.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodessub.cs
new file mode 100644
index 0000000000..81ce9fc0f3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodessub.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Sub [v-zuolan]
+///</summary>
+
+public class OpCodesSub
+{
+
+ public static int Main()
+ {
+ OpCodesSub testObj = new OpCodesSub();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Sub");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Sub;
+
+ actualValue = CompareOpCode(opcode, "sub", StackBehaviour.Pop1_pop1, StackBehaviour.Push1, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x59, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodessub_ovf.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodessub_ovf.cs
new file mode 100644
index 0000000000..9788d9035e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodessub_ovf.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Sub_Ovf [v-zuolan]
+///</summary>
+
+public class OpCodesSub_Ovf
+{
+
+ public static int Main()
+ {
+ OpCodesSub_Ovf testObj = new OpCodesSub_Ovf();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Sub_Ovf");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Sub_Ovf;
+
+ actualValue = CompareOpCode(opcode, "sub.ovf", StackBehaviour.Pop1_pop1, StackBehaviour.Push1, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0xda, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodessub_ovf_un.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodessub_ovf_un.cs
new file mode 100644
index 0000000000..0b91252ead
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodessub_ovf_un.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Sub_Ovf_Un [v-zuolan]
+///</summary>
+
+public class OpCodesSub_Ovf_Un
+{
+
+ public static int Main()
+ {
+ OpCodesSub_Ovf_Un testObj = new OpCodesSub_Ovf_Un();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Sub_Ovf_Un");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Sub_Ovf_Un;
+
+ actualValue = CompareOpCode(opcode, "sub.ovf.un", StackBehaviour.Pop1_pop1, StackBehaviour.Push1, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0xdb, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesswitch.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesswitch.cs
new file mode 100644
index 0000000000..6430b81d51
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesswitch.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Switch [v-zuolan]
+///</summary>
+
+public class OpCodesSwitch
+{
+
+ public static int Main()
+ {
+ OpCodesSwitch testObj = new OpCodesSwitch();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Switch");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Switch;
+
+ actualValue = CompareOpCode(opcode, "switch", StackBehaviour.Popi, StackBehaviour.Push0, OperandType.InlineSwitch, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x45, FlowControl.Cond_Branch);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodestackbehaviourpop.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodestackbehaviourpop.cs
new file mode 100644
index 0000000000..3d6ef527e8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodestackbehaviourpop.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// System.Reflection.Emit.OpCode.StackBehaviourPop[v-jiajul]
+/// </summary>
+public class OpCodeStackBehaviourPop
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the value of the property");
+
+ try
+ {
+ retVal = VerifyOpCodeStackBehaviourPop(OpCodes.Add, StackBehaviour.Pop1_pop1, "001.0") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPop(OpCodes.Ldc_I4, StackBehaviour.Pop0, "001.1") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPop(OpCodes.Stloc, StackBehaviour.Pop1, "001.2") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPop(OpCodes.Nop, StackBehaviour.Pop0, "001.3") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPop(OpCodes.Localloc, StackBehaviour.Popi, "001.4") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPop(OpCodes.Endfilter, StackBehaviour.Popi, "001.5") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPop(OpCodes.Ret, StackBehaviour.Varpop, "001.6") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPop(OpCodes.Callvirt, StackBehaviour.Varpop, "001.7") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPop(OpCodes.Cpobj, StackBehaviour.Popi_popi, "001.8") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPop(OpCodes.Ldobj, StackBehaviour.Popi, "001.9") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPop(OpCodes.Prefix3, StackBehaviour.Pop0, "001.10") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPop(OpCodes.Prefix6, StackBehaviour.Pop0, "001.11") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPop(OpCodes.Prefixref, StackBehaviour.Pop0, "001.12") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPop(OpCodes.Constrained, StackBehaviour.Pop0, "001.13") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPop(OpCodes.Readonly, StackBehaviour.Pop0, "001.14") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPop(OpCodes.Initblk, StackBehaviour.Popi_popi_popi, "001.15") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPop(OpCodes.Ldvirtftn, StackBehaviour.Popref, "001.16") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPop(OpCodes.Sub_Ovf_Un, StackBehaviour.Pop1_pop1, "001.17") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodeStackBehaviourPop test = new OpCodeStackBehaviourPop();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodeStackBehaviourPop");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region Private Methods
+ private bool VerifyOpCodeStackBehaviourPop(OpCode op1, StackBehaviour sb, string errNum)
+ {
+ bool retVal = true;
+
+ try
+ {
+ if (op1.StackBehaviourPop != sb)
+ {
+ TestLibrary.TestFramework.LogError(errNum, "Result is not the value as pop behaviour is: " + op1.StackBehaviourPop + ",Expected is: " + sb);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errNum, "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodestackbehaviourpush.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodestackbehaviourpush.cs
new file mode 100644
index 0000000000..91da9faf64
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodestackbehaviourpush.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// System.Reflection.Emit.OpCode.StackBehaviourPush[v-jiajul]
+/// </summary>
+public class OpCodeStackBehaviourPush
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the value of the property");
+
+ try
+ {
+ retVal = VerifyOpCodeStackBehaviourPush(OpCodes.Add, StackBehaviour.Push1, "001.0") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPush(OpCodes.Ldc_I4, StackBehaviour.Pushi, "001.1") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPush(OpCodes.Stloc, StackBehaviour.Push0, "001.2") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPush(OpCodes.Nop, StackBehaviour.Push0, "001.3") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPush(OpCodes.Localloc, StackBehaviour.Pushi, "001.4") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPush(OpCodes.Ldelem_R8, StackBehaviour.Pushr8, "001.5") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPush(OpCodes.Ret, StackBehaviour.Push0, "001.6") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPush(OpCodes.Callvirt, StackBehaviour.Varpush, "001.7") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPush(OpCodes.Cpobj, StackBehaviour.Push0, "001.8") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPush(OpCodes.Ldobj, StackBehaviour.Push1, "001.9") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPush(OpCodes.Prefix3, StackBehaviour.Push0, "001.10") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPush(OpCodes.Ldelem_Ref, StackBehaviour.Pushref, "001.11") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPush(OpCodes.Ldelem_R4, StackBehaviour.Pushr4, "001.12") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPush(OpCodes.Constrained, StackBehaviour.Push0, "001.13") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPush(OpCodes.Readonly, StackBehaviour.Push0, "001.14") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPush(OpCodes.Ldelem_I8, StackBehaviour.Pushi8, "001.15") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPush(OpCodes.Ldvirtftn, StackBehaviour.Pushi, "001.16") && retVal;
+ retVal = VerifyOpCodeStackBehaviourPush(OpCodes.Sub_Ovf_Un, StackBehaviour.Push1, "001.17") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodeStackBehaviourPush test = new OpCodeStackBehaviourPush();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodeStackBehaviourPush");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region Private Methods
+ private bool VerifyOpCodeStackBehaviourPush(OpCode op1, StackBehaviour sb, string errNum)
+ {
+ bool retVal = true;
+
+ try
+ {
+ if (op1.StackBehaviourPush != sb)
+ {
+ TestLibrary.TestFramework.LogError(errNum, "Result is not the value as expected,push behaviour is: " + op1.StackBehaviourPush + ",Expected is: " + sb);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errNum, "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodestailcall.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodestailcall.cs
new file mode 100644
index 0000000000..39b999db35
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodestailcall.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Tailcall [v-zuolan]
+///</summary>
+
+public class OpCodesTailcall
+{
+
+ public static int Main()
+ {
+ OpCodesTailcall testObj = new OpCodesTailcall();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Tailcall");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Tailcall;
+
+ actualValue = CompareOpCode(opcode, "tail.", StackBehaviour.Pop0, StackBehaviour.Push0, OperandType.InlineNone, OpCodeType.Prefix, 2, (byte)0xfe, (byte)0x14, FlowControl.Meta);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodestakessinglebyteargument.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodestakessinglebyteargument.cs
new file mode 100644
index 0000000000..803a0a6e36
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodestakessinglebyteargument.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.TakesSingleByteArgument(OpCode) [v-zuolan]
+///</summary>
+
+public class OpCodesTakesSingleByteArgument
+{
+
+ public static int Main()
+ {
+ OpCodesTakesSingleByteArgument testObj = new OpCodesTakesSingleByteArgument();
+ TestLibrary.TestFramework.BeginTestCase("for method of System.Reflection.Emit.OpCodes.TakesSingleByteArugment");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ bool expectedValue = true;
+ bool actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:invoke the method with single byte argument.");
+ try
+ {
+ actualValue = OpCodes.TakesSingleByteArgument(OpCodes.Bne_Un_S);
+ //Bne_Un_S is a single byte opcode
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ bool expectedValue = false;
+ bool actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:invoke the method with multi-bytes argument.");
+ try
+ {
+ actualValue = OpCodes.TakesSingleByteArgument(OpCodes.Br);
+ //Br isn't a single byte opcode.
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesthrow.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesthrow.cs
new file mode 100644
index 0000000000..952db39e43
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesthrow.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Throw [v-zuolan]
+///</summary>
+
+public class OpCodesThrow
+{
+
+ public static int Main()
+ {
+ OpCodesThrow testObj = new OpCodesThrow();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Throw");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Throw;
+
+ actualValue = CompareOpCode(opcode, "throw", StackBehaviour.Popref, StackBehaviour.Push0, OperandType.InlineNone, OpCodeType.Objmodel, 1, (byte)0xff, (byte)0x7a, FlowControl.Throw);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if(opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesunaligned.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesunaligned.cs
new file mode 100644
index 0000000000..da7cd11035
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesunaligned.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Unaligned [v-zuolan]
+///</summary>
+
+public class OpCodesUnaligned
+{
+
+ public static int Main()
+ {
+ OpCodesUnaligned testObj = new OpCodesUnaligned();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Unaligned");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Unaligned;
+
+ actualValue = CompareOpCode(opcode, "unaligned.", StackBehaviour.Pop0, StackBehaviour.Push0, OperandType.ShortInlineI, OpCodeType.Prefix, 2, (byte)0xfe, (byte)0x12, FlowControl.Meta);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesunbox.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesunbox.cs
new file mode 100644
index 0000000000..7ab077640f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesunbox.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Unbox [v-zuolan]
+///</summary>
+
+public class OpCodesUnbox
+{
+
+ public static int Main()
+ {
+ OpCodesUnbox testObj = new OpCodesUnbox();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Unbox");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Unbox;
+
+ actualValue = CompareOpCode(opcode, "unbox", StackBehaviour.Popref, StackBehaviour.Pushi, OperandType.InlineType, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x79, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesunbox_any.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesunbox_any.cs
new file mode 100644
index 0000000000..1309a8d944
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesunbox_any.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Unbox_Any [v-zuolan]
+///</summary>
+
+public class OpCodesUnbox_Any
+{
+
+ public static int Main()
+ {
+ OpCodesUnbox_Any testObj = new OpCodesUnbox_Any();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Unbox_Any");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Unbox_Any;
+
+ actualValue = CompareOpCode(opcode, "unbox.any", StackBehaviour.Popref, StackBehaviour.Push1, OperandType.InlineType, OpCodeType.Objmodel, 1, (byte)0xff, (byte)0xa5, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesvolatile.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesvolatile.cs
new file mode 100644
index 0000000000..d4e08e830c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesvolatile.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Volatile [v-zuolan]
+///</summary>
+
+public class OpCodesVolatile
+{
+
+ public static int Main()
+ {
+ OpCodesVolatile testObj = new OpCodesVolatile();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Volatile");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Volatile;
+
+ actualValue = CompareOpCode(opcode, "volatile.", StackBehaviour.Pop0, StackBehaviour.Push0, OperandType.InlineNone, OpCodeType.Prefix, 2, (byte)0xfe, (byte)0x13, FlowControl.Meta);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesxor.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesxor.cs
new file mode 100644
index 0000000000..773c52e69a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodesxor.cs
@@ -0,0 +1,165 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+///<summary>
+///System.Reflection.Emit.OpCodes.Xor [v-zuolan]
+///</summary>
+
+public class OpCodesXor
+{
+
+ public static int Main()
+ {
+ OpCodesXor testObj = new OpCodesXor();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Reflection.Emit.OpCodes.Xor");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ CompareResult expectedValue = CompareResult.Equal;
+ CompareResult actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property and verify its fields");
+ try
+ {
+ OpCode opcode = OpCodes.Xor;
+
+ actualValue = CompareOpCode(opcode, "xor", StackBehaviour.Pop1_pop1, StackBehaviour.Push1, OperandType.InlineNone, OpCodeType.Primitive, 1, (byte)0xff, (byte)0x61, FlowControl.Next);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "Errors accured in fields:" + GetResult(actualValue));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper method
+
+ //verify the opcode fields
+ //if not equal,retun the field name which contains error.
+ private CompareResult CompareOpCode(
+ OpCode opcode,
+ String stringname,
+ StackBehaviour pop,
+ StackBehaviour push,
+ OperandType operand,
+ OpCodeType type,
+ int size,
+ byte s1,
+ byte s2,
+ FlowControl ctrl)
+ {
+ CompareResult returnValue = CompareResult.Equal;
+ if (opcode.Name != stringname) returnValue = returnValue | CompareResult.Name;
+ if (opcode.StackBehaviourPop != pop) returnValue = returnValue | CompareResult.Pop;
+ if (opcode.StackBehaviourPush != push) returnValue = returnValue | CompareResult.Push;
+ if (opcode.OperandType != operand) returnValue = returnValue | CompareResult.OpenrandType;
+ if (opcode.OpCodeType != type) returnValue = returnValue | CompareResult.OpCodeType;
+ if (opcode.Size != size) returnValue = returnValue | CompareResult.Size;
+ if (size == 2)
+ {
+ if (opcode.Value != ((short)(s1 << 8 | s2)))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ else
+ {
+ if (opcode.Value != ((short)s2))
+ {
+ returnValue = returnValue | CompareResult.Value;
+ }
+ }
+ if (opcode.FlowControl != ctrl)
+ {
+ returnValue = returnValue | CompareResult.FlowControl;
+ }
+ return returnValue;
+ }
+
+
+ //Transform numeric result into string description
+ public String GetResult(CompareResult result)
+ {
+ String retVal = null;
+ for (int i = 0; i < 8; i++)
+ {
+ if (((int)result & (0x01 << i)) == (0x01 << i))
+ {
+ if (retVal == null)
+ {
+ retVal = "{" + ((CompareResult)(0x01 << i)).ToString();
+ }
+ else
+ {
+ retVal = retVal + "," + ((CompareResult)(0x01 << i)).ToString();
+ }
+ }
+ }
+ if (retVal == null)
+ {
+ retVal = "{Equal}";
+ }
+ else
+ {
+ retVal = retVal + "}";
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+#region Enum CompareResult
+
+public enum CompareResult
+{
+ Equal = 0x00,
+ Name = 0x01,
+ Pop = 0x02,
+ Push = 0x04,
+ OpenrandType = 0x08,
+ OpCodeType = 0x10,
+ Size = 0x20,
+ Value = 0x40,
+ FlowControl = 0x80
+}
+
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodetostring.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodetostring.cs
new file mode 100644
index 0000000000..6b9e9bde4e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodetostring.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// System.Reflection.Emit.OpCode.ToString()[v-jiajul]
+/// </summary>
+public class OpCodeToString
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the method normally");
+
+ try
+ {
+ retVal = VerifyToString(OpCodes.Add, "add", "001.0") && retVal;
+ retVal = VerifyToString(OpCodes.Refanyval, "refanyval", "001.1") && retVal;
+ retVal = VerifyToString(OpCodes.Rem_Un, "rem.un", "001.2") && retVal;
+ retVal = VerifyToString(OpCodes.Shr, "shr", "001.3") && retVal;
+ retVal = VerifyToString(OpCodes.Stfld, "stfld", "001.4") && retVal;
+ retVal = VerifyToString(OpCodes.Stloc_0, "stloc.0", "001.5") && retVal;
+ retVal = VerifyToString(OpCodes.Pop, "pop", "001.6") && retVal;
+ retVal = VerifyToString(OpCodes.Calli, "calli", "001.7") && retVal;
+ retVal = VerifyToString(OpCodes.Switch, "switch", "001.8") && retVal;
+ retVal = VerifyToString(OpCodes.Sub, "sub", "001.9") && retVal;
+ retVal = VerifyToString(OpCodes.Not, "not", "001.10") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodeToString test = new OpCodeToString();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodeToString");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region Private Methods
+ private bool VerifyToString(OpCode op1, string expected, string errNum)
+ {
+ bool retVal = true;
+
+ try
+ {
+ string value = op1.ToString();
+ if (value != expected)
+ {
+ TestLibrary.TestFramework.LogError(errNum, "Result is not the value as expected,value is: " + value + ",expected is: " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errNum, "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodevalue.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodevalue.cs
new file mode 100644
index 0000000000..751cb9c8f6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodes/opcodevalue.cs
@@ -0,0 +1,100 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// System.Reflection.Emit.OpCode.Value[v-jiajul]
+/// </summary>
+public class OpCodeValue
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the value of the property");
+
+ try
+ {
+ unchecked
+ {
+ retVal = VerifyOpCodeValue(OpCodes.Add, (short)0x0058, "001.0") && retVal;
+ retVal = VerifyOpCodeValue(OpCodes.Ldc_I4, (short)0x0020, "001.1") && retVal;
+ retVal = VerifyOpCodeValue(OpCodes.Stloc, (short)0xfe0e, "001.2") && retVal;
+ retVal = VerifyOpCodeValue(OpCodes.Nop, (short)0x0000, "001.3") && retVal;
+ retVal = VerifyOpCodeValue(OpCodes.Localloc, (short)0xfe0f, "001.4") && retVal;
+ retVal = VerifyOpCodeValue(OpCodes.Ldelem_R8, (short)0x0099, "001.5") && retVal;
+ retVal = VerifyOpCodeValue(OpCodes.Ret, (short)0x002a, "001.6") && retVal;
+ retVal = VerifyOpCodeValue(OpCodes.Callvirt, (short)0x006f, "001.7") && retVal;
+ retVal = VerifyOpCodeValue(OpCodes.Cpobj, (short)0x0070, "001.8") && retVal;
+ retVal = VerifyOpCodeValue(OpCodes.Readonly, (short)0xfe1e, "001.9") && retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ OpCodeValue test = new OpCodeValue();
+
+ TestLibrary.TestFramework.BeginTestCase("OpCodeValue");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region Private Methods
+ private bool VerifyOpCodeValue(OpCode op1, short sb, string errNum)
+ {
+ bool retVal = true;
+
+ try
+ {
+ if (op1.Value != sb)
+ {
+ TestLibrary.TestFramework.LogError(errNum, "Result is not the value as expected,value is: " + op1.Value + ",Expected is: " + sb);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errNum, "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/OpCodeTypeMacro.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/OpCodeTypeMacro.csproj
new file mode 100644
index 0000000000..7652e9271a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/OpCodeTypeMacro.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodetypemacro.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/OpCodeTypeNternal.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/OpCodeTypeNternal.csproj
new file mode 100644
index 0000000000..4a44695ab5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/OpCodeTypeNternal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodetypenternal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/OpCodeTypeObjmodel.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/OpCodeTypeObjmodel.csproj
new file mode 100644
index 0000000000..82877b17a8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/OpCodeTypeObjmodel.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodetypeobjmodel.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/OpCodeTypePrefix.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/OpCodeTypePrefix.csproj
new file mode 100644
index 0000000000..98c46573b5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/OpCodeTypePrefix.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodetypeprefix.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/OpCodeTypePrimitive.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/OpCodeTypePrimitive.csproj
new file mode 100644
index 0000000000..8a4bb1c1c2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/OpCodeTypePrimitive.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="opcodetypeprimitive.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/opcodetypemacro.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/opcodetypemacro.cs
new file mode 100644
index 0000000000..9678d43b0b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/opcodetypemacro.cs
@@ -0,0 +1,86 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodeType.Macro(v-yaduoj)
+/// </summary>
+public class OpCodeTypeTest
+{
+ private enum MyOpCodeType
+ {
+ Annotation = 0,
+ Macro = 1,
+ Nternal = 2,
+ Objmodel = 3,
+ Prefix = 4,
+ Primitive = 5,
+ }
+
+ public static int Main()
+ {
+ OpCodeTypeTest testObj = new OpCodeTypeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: OpCodeType.Macro");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: OpCode type is Macro";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyOpCodeType.Macro;
+ actualValue = (int)OpCodeType.Macro;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Macro value of OpCodeType is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/opcodetypenternal.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/opcodetypenternal.cs
new file mode 100644
index 0000000000..820e98424b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/opcodetypenternal.cs
@@ -0,0 +1,86 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodeType.Nternal(v-yaduoj)
+/// </summary>
+public class OpCodeTypeTest
+{
+ private enum MyOpCodeType
+ {
+ Annotation = 0,
+ Macro = 1,
+ Nternal = 2,
+ Objmodel = 3,
+ Prefix = 4,
+ Primitive = 5,
+ }
+
+ public static int Main()
+ {
+ OpCodeTypeTest testObj = new OpCodeTypeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: OpCodeType.Nternal");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: OpCode type is Nternal";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyOpCodeType.Nternal;
+ actualValue = (int)OpCodeType.Nternal;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Nternal value of OpCodeType is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/opcodetypeobjmodel.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/opcodetypeobjmodel.cs
new file mode 100644
index 0000000000..eb7e6eeaaa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/opcodetypeobjmodel.cs
@@ -0,0 +1,86 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodeType.Objmodel(v-yaduoj)
+/// </summary>
+public class OpCodeTypeTest
+{
+ private enum MyOpCodeType
+ {
+ Annotation = 0,
+ Macro = 1,
+ Nternal = 2,
+ Objmodel = 3,
+ Prefix = 4,
+ Primitive = 5,
+ }
+
+ public static int Main()
+ {
+ OpCodeTypeTest testObj = new OpCodeTypeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: OpCodeType.Objmodel");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: OpCode type is Objmodel";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyOpCodeType.Objmodel;
+ actualValue = (int)OpCodeType.Objmodel;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Objmodel value of OpCodeType is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/opcodetypeprefix.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/opcodetypeprefix.cs
new file mode 100644
index 0000000000..d0ca57140f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/opcodetypeprefix.cs
@@ -0,0 +1,86 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodeType.Prefix(v-yaduoj)
+/// </summary>
+public class OpCodeTypeTest
+{
+ private enum MyOpCodeType
+ {
+ Annotation = 0,
+ Macro = 1,
+ Nternal = 2,
+ Objmodel = 3,
+ Prefix = 4,
+ Primitive = 5,
+ }
+
+ public static int Main()
+ {
+ OpCodeTypeTest testObj = new OpCodeTypeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: OpCodeType.Prefix");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: OpCode type is Prefix";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyOpCodeType.Prefix;
+ actualValue = (int)OpCodeType.Prefix;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Prefix value of OpCodeType is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/opcodetypeprimitive.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/opcodetypeprimitive.cs
new file mode 100644
index 0000000000..b29759ac9a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/opcodetype/opcodetypeprimitive.cs
@@ -0,0 +1,86 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OpCodeType.Primitive(v-yaduoj)
+/// </summary>
+public class OpCodeTypeTest
+{
+ private enum MyOpCodeType
+ {
+ Annotation = 0,
+ Macro = 1,
+ Nternal = 2,
+ Objmodel = 3,
+ Prefix = 4,
+ Primitive = 5,
+ }
+
+ public static int Main()
+ {
+ OpCodeTypeTest testObj = new OpCodeTypeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: OpCodeType.Primitive");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: OpCode type is Primitive";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyOpCodeType.Primitive;
+ actualValue = (int)OpCodeType.Primitive;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Primitive value of OpCodeType is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineBrTarget.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineBrTarget.csproj
new file mode 100644
index 0000000000..0281394d41
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineBrTarget.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="operandtypeinlinebrtarget.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineField.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineField.csproj
new file mode 100644
index 0000000000..21858c5541
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineField.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="operandtypeinlinefield.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineI.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineI.csproj
new file mode 100644
index 0000000000..03d2230d95
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineI.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="operandtypeinlinei.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineI8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineI8.csproj
new file mode 100644
index 0000000000..6b8d768bd1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineI8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="operandtypeinlinei8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineMethod.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineMethod.csproj
new file mode 100644
index 0000000000..8811ba75b1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineMethod.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="operandtypeinlinemethod.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineNone.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineNone.csproj
new file mode 100644
index 0000000000..2329ac015f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineNone.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="operandtypeinlinenone.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineR.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineR.csproj
new file mode 100644
index 0000000000..adf75ec3c7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineR.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="operandtypeinliner.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineSig.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineSig.csproj
new file mode 100644
index 0000000000..4b76a90c91
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineSig.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="operandtypeinlinesig.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineString.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineString.csproj
new file mode 100644
index 0000000000..f8b3e643a3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="operandtypeinlinestring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineSwitch.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineSwitch.csproj
new file mode 100644
index 0000000000..9c17804d65
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineSwitch.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="operandtypeinlineswitch.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineTok.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineTok.csproj
new file mode 100644
index 0000000000..6de5db8364
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineTok.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="operandtypeinlinetok.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineType.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineType.csproj
new file mode 100644
index 0000000000..cb4d85cc45
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineType.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="operandtypeinlinetype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineVar.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineVar.csproj
new file mode 100644
index 0000000000..39bce2a647
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeInlineVar.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="operandtypeinlinevar.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeShortInlineBrTarget.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeShortInlineBrTarget.csproj
new file mode 100644
index 0000000000..08a9cc9a97
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeShortInlineBrTarget.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="operandtypeshortinlinebrtarget.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeShortInlineI.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeShortInlineI.csproj
new file mode 100644
index 0000000000..53750671a3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeShortInlineI.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="operandtypeshortinlinei.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeShortInlineR.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeShortInlineR.csproj
new file mode 100644
index 0000000000..c7bd0f2d75
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeShortInlineR.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="operandtypeshortinliner.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeShortInlineVar.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeShortInlineVar.csproj
new file mode 100644
index 0000000000..0e09c8da3a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/OperandTypeShortInlineVar.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="operandtypeshortinlinevar.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinebrtarget.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinebrtarget.cs
new file mode 100644
index 0000000000..8d520b4b59
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinebrtarget.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OperandType.InlineBrTarget(v-yaduoj)
+/// </summary>
+public class OperandTypeTest
+{
+ private enum MyOperandType
+ {
+ InlineBrTarget = 0,
+ InlineField = 1,
+ InlineI = 2,
+ InlineI8 = 3,
+ InlineMethod = 4,
+ InlineNone = 5,
+ [Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
+ InlinePhi = 6,
+ InlineR = 7,
+ InlineSig = 9,
+ InlineString = 10,
+ InlineSwitch = 11,
+ InlineTok = 12,
+ InlineType = 13,
+ InlineVar = 14,
+ ShortInlineBrTarget = 15,
+ ShortInlineI = 16,
+ ShortInlineR = 17,
+ ShortInlineVar = 18,
+ }
+
+ public static int Main()
+ {
+ OperandTypeTest testObj = new OperandTypeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: OperandType.InlineBrTarget");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Operand type is InlineBrTarget";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyOperandType.InlineBrTarget;
+ actualValue = (int)OperandType.InlineBrTarget;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "InlineBrTarget value of OperandType is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinefield.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinefield.cs
new file mode 100644
index 0000000000..6bb7525a51
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinefield.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OperandType.InlineField(v-yaduoj)
+/// </summary>
+public class OperandTypeTest
+{
+ private enum MyOperandType
+ {
+ InlineBrTarget = 0,
+ InlineField = 1,
+ InlineI = 2,
+ InlineI8 = 3,
+ InlineMethod = 4,
+ InlineNone = 5,
+ [Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
+ InlinePhi = 6,
+ InlineR = 7,
+ InlineSig = 9,
+ InlineString = 10,
+ InlineSwitch = 11,
+ InlineTok = 12,
+ InlineType = 13,
+ InlineVar = 14,
+ ShortInlineBrTarget = 15,
+ ShortInlineI = 16,
+ ShortInlineR = 17,
+ ShortInlineVar = 18,
+ }
+
+ public static int Main()
+ {
+ OperandTypeTest testObj = new OperandTypeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: OperandType.InlineField");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Operand type is InlineField";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyOperandType.InlineField;
+ actualValue = (int)OperandType.InlineField;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "InlineField value of OperandType is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinei.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinei.cs
new file mode 100644
index 0000000000..902bcb3fae
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinei.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OperandType.InlineI(v-yaduoj)
+/// </summary>
+public class OperandTypeTest
+{
+ private enum MyOperandType
+ {
+ InlineBrTarget = 0,
+ InlineField = 1,
+ InlineI = 2,
+ InlineI8 = 3,
+ InlineMethod = 4,
+ InlineNone = 5,
+ [Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
+ InlinePhi = 6,
+ InlineR = 7,
+ InlineSig = 9,
+ InlineString = 10,
+ InlineSwitch = 11,
+ InlineTok = 12,
+ InlineType = 13,
+ InlineVar = 14,
+ ShortInlineBrTarget = 15,
+ ShortInlineI = 16,
+ ShortInlineR = 17,
+ ShortInlineVar = 18,
+ }
+
+ public static int Main()
+ {
+ OperandTypeTest testObj = new OperandTypeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: OperandType.InlineI");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Operand type is InlineI";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyOperandType.InlineI;
+ actualValue = (int)OperandType.InlineI;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "InlineI value of OperandType is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinei8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinei8.cs
new file mode 100644
index 0000000000..76c1caa21e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinei8.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OperandType.InlineI8(v-yaduoj)
+/// </summary>
+public class OperandTypeTest
+{
+ private enum MyOperandType
+ {
+ InlineBrTarget = 0,
+ InlineField = 1,
+ InlineI = 2,
+ InlineI8 = 3,
+ InlineMethod = 4,
+ InlineNone = 5,
+ [Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
+ InlinePhi = 6,
+ InlineR = 7,
+ InlineSig = 9,
+ InlineString = 10,
+ InlineSwitch = 11,
+ InlineTok = 12,
+ InlineType = 13,
+ InlineVar = 14,
+ ShortInlineBrTarget = 15,
+ ShortInlineI = 16,
+ ShortInlineR = 17,
+ ShortInlineVar = 18,
+ }
+
+ public static int Main()
+ {
+ OperandTypeTest testObj = new OperandTypeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: OperandType.InlineI8");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Operand type is InlineI8";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyOperandType.InlineI8;
+ actualValue = (int)OperandType.InlineI8;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "InlineI8 value of OperandType is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinemethod.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinemethod.cs
new file mode 100644
index 0000000000..325de8b861
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinemethod.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OperandType.InlineMethod(v-yaduoj)
+/// </summary>
+public class OperandTypeTest
+{
+ private enum MyOperandType
+ {
+ InlineBrTarget = 0,
+ InlineField = 1,
+ InlineI = 2,
+ InlineI8 = 3,
+ InlineMethod = 4,
+ InlineNone = 5,
+ [Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
+ InlinePhi = 6,
+ InlineR = 7,
+ InlineSig = 9,
+ InlineString = 10,
+ InlineSwitch = 11,
+ InlineTok = 12,
+ InlineType = 13,
+ InlineVar = 14,
+ ShortInlineBrTarget = 15,
+ ShortInlineI = 16,
+ ShortInlineR = 17,
+ ShortInlineVar = 18,
+ }
+
+ public static int Main()
+ {
+ OperandTypeTest testObj = new OperandTypeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: OperandType.InlineMethod");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Operand type is InlineMethod";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyOperandType.InlineMethod;
+ actualValue = (int)OperandType.InlineMethod;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "InlineMethod value of OperandType is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinenone.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinenone.cs
new file mode 100644
index 0000000000..89dead868d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinenone.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OperandType.InlineNone(v-yaduoj)
+/// </summary>
+public class OperandTypeTest
+{
+ private enum MyOperandType
+ {
+ InlineBrTarget = 0,
+ InlineField = 1,
+ InlineI = 2,
+ InlineI8 = 3,
+ InlineMethod = 4,
+ InlineNone = 5,
+ [Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
+ InlinePhi = 6,
+ InlineR = 7,
+ InlineSig = 9,
+ InlineString = 10,
+ InlineSwitch = 11,
+ InlineTok = 12,
+ InlineType = 13,
+ InlineVar = 14,
+ ShortInlineBrTarget = 15,
+ ShortInlineI = 16,
+ ShortInlineR = 17,
+ ShortInlineVar = 18,
+ }
+
+ public static int Main()
+ {
+ OperandTypeTest testObj = new OperandTypeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: OperandType.InlineNone");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Operand type is InlineNone";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyOperandType.InlineNone;
+ actualValue = (int)OperandType.InlineNone;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "InlineNone value of OperandType is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinliner.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinliner.cs
new file mode 100644
index 0000000000..9b1d4a8095
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinliner.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OperandType.InlineR(v-yaduoj)
+/// </summary>
+public class OperandTypeTest
+{
+ private enum MyOperandType
+ {
+ InlineBrTarget = 0,
+ InlineField = 1,
+ InlineI = 2,
+ InlineI8 = 3,
+ InlineMethod = 4,
+ InlineNone = 5,
+ [Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
+ InlinePhi = 6,
+ InlineR = 7,
+ InlineSig = 9,
+ InlineString = 10,
+ InlineSwitch = 11,
+ InlineTok = 12,
+ InlineType = 13,
+ InlineVar = 14,
+ ShortInlineBrTarget = 15,
+ ShortInlineI = 16,
+ ShortInlineR = 17,
+ ShortInlineVar = 18,
+ }
+
+ public static int Main()
+ {
+ OperandTypeTest testObj = new OperandTypeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: OperandType.InlineR");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Operand type is InlineR";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyOperandType.InlineR;
+ actualValue = (int)OperandType.InlineR;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "InlineR value of OperandType is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinesig.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinesig.cs
new file mode 100644
index 0000000000..418c480e9a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinesig.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OperandType.InlineSig(v-yaduoj)
+/// </summary>
+public class OperandTypeTest
+{
+ private enum MyOperandType
+ {
+ InlineBrTarget = 0,
+ InlineField = 1,
+ InlineI = 2,
+ InlineI8 = 3,
+ InlineMethod = 4,
+ InlineNone = 5,
+ [Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
+ InlinePhi = 6,
+ InlineR = 7,
+ InlineSig = 9,
+ InlineString = 10,
+ InlineSwitch = 11,
+ InlineTok = 12,
+ InlineType = 13,
+ InlineVar = 14,
+ ShortInlineBrTarget = 15,
+ ShortInlineI = 16,
+ ShortInlineR = 17,
+ ShortInlineVar = 18,
+ }
+
+ public static int Main()
+ {
+ OperandTypeTest testObj = new OperandTypeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: OperandType.InlineSig");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Operand type is InlineSig";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyOperandType.InlineSig;
+ actualValue = (int)OperandType.InlineSig;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "InlineSig value of OperandType is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinestring.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinestring.cs
new file mode 100644
index 0000000000..5026f5a626
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinestring.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OperandType.InlineString(v-yaduoj)
+/// </summary>
+public class OperandTypeTest
+{
+ private enum MyOperandType
+ {
+ InlineBrTarget = 0,
+ InlineField = 1,
+ InlineI = 2,
+ InlineI8 = 3,
+ InlineMethod = 4,
+ InlineNone = 5,
+ [Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
+ InlinePhi = 6,
+ InlineR = 7,
+ InlineSig = 9,
+ InlineString = 10,
+ InlineSwitch = 11,
+ InlineTok = 12,
+ InlineType = 13,
+ InlineVar = 14,
+ ShortInlineBrTarget = 15,
+ ShortInlineI = 16,
+ ShortInlineR = 17,
+ ShortInlineVar = 18,
+ }
+
+ public static int Main()
+ {
+ OperandTypeTest testObj = new OperandTypeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: OperandType.InlineString");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Operand type is InlineString";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyOperandType.InlineString;
+ actualValue = (int)OperandType.InlineString;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "InlineString value of OperandType is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlineswitch.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlineswitch.cs
new file mode 100644
index 0000000000..312f64d62e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlineswitch.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OperandType.InlineSwitch(v-yaduoj)
+/// </summary>
+public class OperandTypeTest
+{
+ private enum MyOperandType
+ {
+ InlineBrTarget = 0,
+ InlineField = 1,
+ InlineI = 2,
+ InlineI8 = 3,
+ InlineMethod = 4,
+ InlineNone = 5,
+ [Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
+ InlinePhi = 6,
+ InlineR = 7,
+ InlineSig = 9,
+ InlineString = 10,
+ InlineSwitch = 11,
+ InlineTok = 12,
+ InlineType = 13,
+ InlineVar = 14,
+ ShortInlineBrTarget = 15,
+ ShortInlineI = 16,
+ ShortInlineR = 17,
+ ShortInlineVar = 18,
+ }
+
+ public static int Main()
+ {
+ OperandTypeTest testObj = new OperandTypeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: OperandType.InlineSwitch");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Operand type is InlineSwitch";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyOperandType.InlineSwitch;
+ actualValue = (int)OperandType.InlineSwitch;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "InlineSwitch value of OperandType is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinetok.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinetok.cs
new file mode 100644
index 0000000000..75ad087b11
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinetok.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OperandType.InlineTok(v-yaduoj)
+/// </summary>
+public class OperandTypeTest
+{
+ private enum MyOperandType
+ {
+ InlineBrTarget = 0,
+ InlineField = 1,
+ InlineI = 2,
+ InlineI8 = 3,
+ InlineMethod = 4,
+ InlineNone = 5,
+ [Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
+ InlinePhi = 6,
+ InlineR = 7,
+ InlineSig = 9,
+ InlineString = 10,
+ InlineSwitch = 11,
+ InlineTok = 12,
+ InlineType = 13,
+ InlineVar = 14,
+ ShortInlineBrTarget = 15,
+ ShortInlineI = 16,
+ ShortInlineR = 17,
+ ShortInlineVar = 18,
+ }
+
+ public static int Main()
+ {
+ OperandTypeTest testObj = new OperandTypeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: OperandType.InlineTok");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Operand type is InlineTok";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyOperandType.InlineTok;
+ actualValue = (int)OperandType.InlineTok;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "InlineTok value of OperandType is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinetype.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinetype.cs
new file mode 100644
index 0000000000..059d89b502
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinetype.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OperandType.InlineType(v-yaduoj)
+/// </summary>
+public class OperandTypeTest
+{
+ private enum MyOperandType
+ {
+ InlineBrTarget = 0,
+ InlineField = 1,
+ InlineI = 2,
+ InlineI8 = 3,
+ InlineMethod = 4,
+ InlineNone = 5,
+ [Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
+ InlinePhi = 6,
+ InlineR = 7,
+ InlineSig = 9,
+ InlineString = 10,
+ InlineSwitch = 11,
+ InlineTok = 12,
+ InlineType = 13,
+ InlineVar = 14,
+ ShortInlineBrTarget = 15,
+ ShortInlineI = 16,
+ ShortInlineR = 17,
+ ShortInlineVar = 18,
+ }
+
+ public static int Main()
+ {
+ OperandTypeTest testObj = new OperandTypeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: OperandType.InlineType");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Operand type is InlineType";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyOperandType.InlineType;
+ actualValue = (int)OperandType.InlineType;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "InlineType value of OperandType is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinevar.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinevar.cs
new file mode 100644
index 0000000000..ed75f7a497
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeinlinevar.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OperandType.InlineVar(v-yaduoj)
+/// </summary>
+public class OperandTypeTest
+{
+ private enum MyOperandType
+ {
+ InlineBrTarget = 0,
+ InlineField = 1,
+ InlineI = 2,
+ InlineI8 = 3,
+ InlineMethod = 4,
+ InlineNone = 5,
+ [Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
+ InlinePhi = 6,
+ InlineR = 7,
+ InlineSig = 9,
+ InlineString = 10,
+ InlineSwitch = 11,
+ InlineTok = 12,
+ InlineType = 13,
+ InlineVar = 14,
+ ShortInlineBrTarget = 15,
+ ShortInlineI = 16,
+ ShortInlineR = 17,
+ ShortInlineVar = 18,
+ }
+
+ public static int Main()
+ {
+ OperandTypeTest testObj = new OperandTypeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: OperandType.InlineVar");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Operand type is InlineVar";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyOperandType.InlineVar;
+ actualValue = (int)OperandType.InlineVar;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "InlineVar value of OperandType is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeshortinlinebrtarget.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeshortinlinebrtarget.cs
new file mode 100644
index 0000000000..54555ca912
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeshortinlinebrtarget.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OperandType.ShortShortInlineR(v-yaduoj)
+/// </summary>
+public class OperandTypeTest
+{
+ private enum MyOperandType
+ {
+ InlineBrTarget = 0,
+ InlineField = 1,
+ InlineI = 2,
+ InlineI8 = 3,
+ InlineMethod = 4,
+ InlineNone = 5,
+ [Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
+ InlinePhi = 6,
+ InlineR = 7,
+ InlineSig = 9,
+ InlineString = 10,
+ InlineSwitch = 11,
+ InlineTok = 12,
+ InlineType = 13,
+ InlineVar = 14,
+ ShortInlineBrTarget = 15,
+ ShortInlineI = 16,
+ ShortInlineR = 17,
+ ShortInlineVar = 18,
+ }
+
+ public static int Main()
+ {
+ OperandTypeTest testObj = new OperandTypeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: OperandType.ShortShortInlineR");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Operand type is ShortInlineR";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyOperandType.ShortInlineR;
+ actualValue = (int)OperandType.ShortInlineR;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "ShortInlineR value of OperandType is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeshortinlinei.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeshortinlinei.cs
new file mode 100644
index 0000000000..6f51e519d1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeshortinlinei.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OperandType.ShortInlineI(v-yaduoj)
+/// </summary>
+public class OperandTypeTest
+{
+ private enum MyOperandType
+ {
+ InlineBrTarget = 0,
+ InlineField = 1,
+ InlineI = 2,
+ InlineI8 = 3,
+ InlineMethod = 4,
+ InlineNone = 5,
+ [Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
+ InlinePhi = 6,
+ InlineR = 7,
+ InlineSig = 9,
+ InlineString = 10,
+ InlineSwitch = 11,
+ InlineTok = 12,
+ InlineType = 13,
+ InlineVar = 14,
+ ShortInlineBrTarget = 15,
+ ShortInlineI = 16,
+ ShortInlineR = 17,
+ ShortInlineVar = 18,
+ }
+
+ public static int Main()
+ {
+ OperandTypeTest testObj = new OperandTypeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: OperandType.ShortInlineI");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Operand type is ShortInlineI";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyOperandType.ShortInlineI;
+ actualValue = (int)OperandType.ShortInlineI;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "ShortInlineI value of OperandType is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeshortinliner.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeshortinliner.cs
new file mode 100644
index 0000000000..df6d926007
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeshortinliner.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OperandType.ShortInlineR(v-yaduoj)
+/// </summary>
+public class OperandTypeTest
+{
+ private enum MyOperandType
+ {
+ InlineBrTarget = 0,
+ InlineField = 1,
+ InlineI = 2,
+ InlineI8 = 3,
+ InlineMethod = 4,
+ InlineNone = 5,
+ [Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
+ InlinePhi = 6,
+ InlineR = 7,
+ InlineSig = 9,
+ InlineString = 10,
+ InlineSwitch = 11,
+ InlineTok = 12,
+ InlineType = 13,
+ InlineVar = 14,
+ ShortInlineBrTarget = 15,
+ ShortInlineI = 16,
+ ShortInlineR = 17,
+ ShortInlineVar = 18,
+ }
+
+ public static int Main()
+ {
+ OperandTypeTest testObj = new OperandTypeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: OperandType.ShortInlineR");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Operand type is ShortInlineR";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyOperandType.ShortInlineR;
+ actualValue = (int)OperandType.ShortInlineR;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "ShortInlineR value of OperandType is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeshortinlinevar.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeshortinlinevar.cs
new file mode 100644
index 0000000000..85daa42105
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/operandtype/operandtypeshortinlinevar.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// OperandType.ShortInlineVar(v-yaduoj)
+/// </summary>
+public class OperandTypeTest
+{
+ private enum MyOperandType
+ {
+ InlineBrTarget = 0,
+ InlineField = 1,
+ InlineI = 2,
+ InlineI8 = 3,
+ InlineMethod = 4,
+ InlineNone = 5,
+ [Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
+ InlinePhi = 6,
+ InlineR = 7,
+ InlineSig = 9,
+ InlineString = 10,
+ InlineSwitch = 11,
+ InlineTok = 12,
+ InlineType = 13,
+ InlineVar = 14,
+ ShortInlineBrTarget = 15,
+ ShortInlineI = 16,
+ ShortInlineR = 17,
+ ShortInlineVar = 18,
+ }
+
+ public static int Main()
+ {
+ OperandTypeTest testObj = new OperandTypeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: OperandType.ShortInlineVar");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Operand type is ShortInlineVar";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyOperandType.ShortInlineVar;
+ actualValue = (int)OperandType.ShortInlineVar;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "ShortInlineVar value of OperandType is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSize16.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSize16.csproj
new file mode 100644
index 0000000000..aa20fcf22a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSize16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="packingsize16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSize2.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSize2.csproj
new file mode 100644
index 0000000000..77489a160e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSize2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="packingsize2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSize4.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSize4.csproj
new file mode 100644
index 0000000000..5d3d7a2ccb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSize4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="packingsize4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeSize1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeSize1.csproj
new file mode 100644
index 0000000000..4b75abe7ec
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeSize1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="packingsizesize1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeSize128.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeSize128.csproj
new file mode 100644
index 0000000000..88ade54dbc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeSize128.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="packingsizesize128.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeSize32.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeSize32.csproj
new file mode 100644
index 0000000000..faaeaf9e33
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeSize32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="packingsizesize32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeSize64.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeSize64.csproj
new file mode 100644
index 0000000000..6933d8803b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeSize64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="packingsizesize64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeSize8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeSize8.csproj
new file mode 100644
index 0000000000..c942fc1f10
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeSize8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="packingsizesize8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeUnspecified.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeUnspecified.csproj
new file mode 100644
index 0000000000..7684cc642a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/PackingSizeUnspecified.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="packingsizeunspecified.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsize16.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsize16.cs
new file mode 100644
index 0000000000..a65291d185
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsize16.cs
@@ -0,0 +1,89 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// PackingSize.Size16(v-yaduoj)
+/// </summary>
+public class PackingSizeTest
+{
+ private enum MyPackingSize
+ {
+ Unspecified = 0,
+ Size1 = 1,
+ Size2 = 2,
+ Size4 = 4,
+ Size8 = 8,
+ Size16 = 16,
+ Size32 = 32,
+ Size64 = 64,
+ Size128 = 128,
+ }
+
+ public static int Main()
+ {
+ PackingSizeTest testObj = new PackingSizeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: PackingSize.Size16");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: PackingSize is Size16";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyPackingSize.Size16;
+ actualValue = (int)PackingSize.Size16;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Size16 value of PackingSize is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsize2.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsize2.cs
new file mode 100644
index 0000000000..3052a8fa97
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsize2.cs
@@ -0,0 +1,89 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// PackingSize.Size2(v-yaduoj)
+/// </summary>
+public class PackingSizeTest
+{
+ private enum MyPackingSize
+ {
+ Unspecified = 0,
+ Size1 = 1,
+ Size2 = 2,
+ Size4 = 4,
+ Size8 = 8,
+ Size16 = 16,
+ Size32 = 32,
+ Size64 = 64,
+ Size128 = 128,
+ }
+
+ public static int Main()
+ {
+ PackingSizeTest testObj = new PackingSizeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: PackingSize.Size2");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: PackingSize is Size2";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyPackingSize.Size2;
+ actualValue = (int)PackingSize.Size2;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Size2 value of PackingSize is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsize4.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsize4.cs
new file mode 100644
index 0000000000..9cf2e0f2de
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsize4.cs
@@ -0,0 +1,89 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// PackingSize.Size4(v-yaduoj)
+/// </summary>
+public class PackingSizeTest
+{
+ private enum MyPackingSize
+ {
+ Unspecified = 0,
+ Size1 = 1,
+ Size2 = 2,
+ Size4 = 4,
+ Size8 = 8,
+ Size16 = 16,
+ Size32 = 32,
+ Size64 = 64,
+ Size128 = 128,
+ }
+
+ public static int Main()
+ {
+ PackingSizeTest testObj = new PackingSizeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: PackingSize.Size4");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: PackingSize is Size4";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyPackingSize.Size4;
+ actualValue = (int)PackingSize.Size4;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Size4 value of PackingSize is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizesize1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizesize1.cs
new file mode 100644
index 0000000000..0b74e58d80
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizesize1.cs
@@ -0,0 +1,89 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// PackingSize.Size1(v-yaduoj)
+/// </summary>
+public class PackingSizeTest
+{
+ private enum MyPackingSize
+ {
+ Unspecified = 0,
+ Size1 = 1,
+ Size2 = 2,
+ Size4 = 4,
+ Size8 = 8,
+ Size16 = 16,
+ Size32 = 32,
+ Size64 = 64,
+ Size128 = 128,
+ }
+
+ public static int Main()
+ {
+ PackingSizeTest testObj = new PackingSizeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: PackingSize.Size1");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: PackingSize is Size1";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyPackingSize.Size1;
+ actualValue = (int)PackingSize.Size1;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Size1 value of PackingSize is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizesize128.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizesize128.cs
new file mode 100644
index 0000000000..d7e31adaee
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizesize128.cs
@@ -0,0 +1,89 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// PackingSize.Size128(v-yaduoj)
+/// </summary>
+public class PackingSizeTest
+{
+ private enum MyPackingSize
+ {
+ Unspecified = 0,
+ Size1 = 1,
+ Size2 = 2,
+ Size4 = 4,
+ Size8 = 8,
+ Size16 = 16,
+ Size32 = 32,
+ Size64 = 64,
+ Size128 = 128,
+ }
+
+ public static int Main()
+ {
+ PackingSizeTest testObj = new PackingSizeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: PackingSize.Size128");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: PackingSize is Size128";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyPackingSize.Size128;
+ actualValue = (int)PackingSize.Size128;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Size128 value of PackingSize is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizesize32.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizesize32.cs
new file mode 100644
index 0000000000..74ea2d3e24
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizesize32.cs
@@ -0,0 +1,89 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// PackingSize.Size32(v-yaduoj)
+/// </summary>
+public class PackingSizeTest
+{
+ private enum MyPackingSize
+ {
+ Unspecified = 0,
+ Size1 = 1,
+ Size2 = 2,
+ Size4 = 4,
+ Size8 = 8,
+ Size16 = 16,
+ Size32 = 32,
+ Size64 = 64,
+ Size128 = 128,
+ }
+
+ public static int Main()
+ {
+ PackingSizeTest testObj = new PackingSizeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: PackingSize.Size32");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: PackingSize is Size32";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyPackingSize.Size32;
+ actualValue = (int)PackingSize.Size32;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Size32 value of PackingSize is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizesize64.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizesize64.cs
new file mode 100644
index 0000000000..af892d4df4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizesize64.cs
@@ -0,0 +1,89 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// PackingSize.Size64(v-yaduoj)
+/// </summary>
+public class PackingSizeTest
+{
+ private enum MyPackingSize
+ {
+ Unspecified = 0,
+ Size1 = 1,
+ Size2 = 2,
+ Size4 = 4,
+ Size8 = 8,
+ Size16 = 16,
+ Size32 = 32,
+ Size64 = 64,
+ Size128 = 128,
+ }
+
+ public static int Main()
+ {
+ PackingSizeTest testObj = new PackingSizeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: PackingSize.Size64");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: PackingSize is Size64";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyPackingSize.Size64;
+ actualValue = (int)PackingSize.Size64;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Size64 value of PackingSize is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizesize8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizesize8.cs
new file mode 100644
index 0000000000..5534c9cfdb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizesize8.cs
@@ -0,0 +1,89 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// PackingSize.Size8(v-yaduoj)
+/// </summary>
+public class PackingSizeTest
+{
+ private enum MyPackingSize
+ {
+ Unspecified = 0,
+ Size1 = 1,
+ Size2 = 2,
+ Size4 = 4,
+ Size8 = 8,
+ Size16 = 16,
+ Size32 = 32,
+ Size64 = 64,
+ Size128 = 128,
+ }
+
+ public static int Main()
+ {
+ PackingSizeTest testObj = new PackingSizeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: PackingSize.Size8");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: PackingSize is Size8";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyPackingSize.Size8;
+ actualValue = (int)PackingSize.Size8;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Size8 value of PackingSize is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizeunspecified.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizeunspecified.cs
new file mode 100644
index 0000000000..1a043d6d7c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/packingsize/packingsizeunspecified.cs
@@ -0,0 +1,89 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// PackingSize.Unspecified(v-yaduoj)
+/// </summary>
+public class PackingSizeTest
+{
+ private enum MyPackingSize
+ {
+ Unspecified = 0,
+ Size1 = 1,
+ Size2 = 2,
+ Size4 = 4,
+ Size8 = 8,
+ Size16 = 16,
+ Size32 = 32,
+ Size64 = 64,
+ Size128 = 128,
+ }
+
+ public static int Main()
+ {
+ PackingSizeTest testObj = new PackingSizeTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: PackingSize.Unspecified");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: PackingSize is Unspecified";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyPackingSize.Unspecified;
+ actualValue = (int)PackingSize.Unspecified;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Unspecified value of PackingSize is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPop0.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPop0.csproj
new file mode 100644
index 0000000000..7e0fbaaf55
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPop0.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpop0.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPop1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPop1.csproj
new file mode 100644
index 0000000000..4d466b47db
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPop1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpop1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPop1_pop1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPop1_pop1.csproj
new file mode 100644
index 0000000000..1943ca15e4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPop1_pop1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpop1_pop1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi.csproj
new file mode 100644
index 0000000000..331e7e7b90
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpopi.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_pop1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_pop1.csproj
new file mode 100644
index 0000000000..b58b98ebbc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_pop1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpopi_pop1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_popi.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_popi.csproj
new file mode 100644
index 0000000000..2f3a5486a1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_popi.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpopi_popi.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_popi8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_popi8.csproj
new file mode 100644
index 0000000000..33eb87024e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_popi8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpopi_popi8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_popi_popi.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_popi_popi.csproj
new file mode 100644
index 0000000000..f5e710b943
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_popi_popi.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpopi_popi_popi.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_popr4.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_popr4.csproj
new file mode 100644
index 0000000000..30de505350
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_popr4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpopi_popr4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_popr8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_popr8.csproj
new file mode 100644
index 0000000000..0fc0385b79
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopi_popr8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpopi_popr8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref.csproj
new file mode 100644
index 0000000000..a7c2e38f2b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpopref.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_pop1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_pop1.csproj
new file mode 100644
index 0000000000..f86621dcd5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_pop1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpopref_pop1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi.csproj
new file mode 100644
index 0000000000..b2f2e55c11
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpopref_popi.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_pop1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_pop1.csproj
new file mode 100644
index 0000000000..4063593b9c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_pop1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpopref_popi_pop1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_popi.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_popi.csproj
new file mode 100644
index 0000000000..6eb3a9724e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_popi.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpopref_popi_popi.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_popi8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_popi8.csproj
new file mode 100644
index 0000000000..0150612bfe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_popi8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpopref_popi_popi8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_popr4.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_popr4.csproj
new file mode 100644
index 0000000000..73a8d7825d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_popr4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpopref_popi_popr4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_popr8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_popr8.csproj
new file mode 100644
index 0000000000..0ce078c775
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_popr8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpopref_popi_popr8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_popref.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_popref.csproj
new file mode 100644
index 0000000000..63051a7d46
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPopref_popi_popref.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpopref_popi_popref.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPush0.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPush0.csproj
new file mode 100644
index 0000000000..e12faf94c5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPush0.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpush0.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPush1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPush1.csproj
new file mode 100644
index 0000000000..c51a8d3a3e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPush1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpush1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPush1_push1.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPush1_push1.csproj
new file mode 100644
index 0000000000..3494a989da
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPush1_push1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpush1_push1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPushi.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPushi.csproj
new file mode 100644
index 0000000000..fa4b99bb1e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPushi.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpushi.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPushi8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPushi8.csproj
new file mode 100644
index 0000000000..3b6eab8580
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPushi8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpushi8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPushr4.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPushr4.csproj
new file mode 100644
index 0000000000..ddc6beb962
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPushr4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpushr4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPushr8.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPushr8.csproj
new file mode 100644
index 0000000000..8da46c08ff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPushr8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpushr8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPushref.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPushref.csproj
new file mode 100644
index 0000000000..d9fa80712a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourPushref.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourpushref.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourVarpop.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourVarpop.csproj
new file mode 100644
index 0000000000..2d1907e531
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourVarpop.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourvarpop.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourVarpush.csproj b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourVarpush.csproj
new file mode 100644
index 0000000000..efda8c2f9a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/StackBehaviourVarpush.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stackbehaviourvarpush.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpop0.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpop0.cs
new file mode 100644
index 0000000000..6cce1ac4b2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpop0.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Pop0 [v-yishi]
+/// </summary>
+public class StackBehaviourPop0
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Pop0 is 0");
+
+ try
+ {
+ int expected = 0;
+ int actual = (int)StackBehaviour.Pop0;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Pop0's value is not 0");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPop0 test = new StackBehaviourPop0();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPop0");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpop1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpop1.cs
new file mode 100644
index 0000000000..21ba8a1450
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpop1.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Pop1 [v-yishi]
+/// </summary>
+public class StackBehaviourPop1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Pop1 is 1");
+
+ try
+ {
+ int expected = 1;
+ int actual = (int)StackBehaviour.Pop1;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Pop1's value is not 1");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPop1 test = new StackBehaviourPop1();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPop1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpop1_pop1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpop1_pop1.cs
new file mode 100644
index 0000000000..d5fd7899a0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpop1_pop1.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Pop1_pop1 [v-yishi]
+/// </summary>
+public class StackBehaviourPop1_pop1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Pop1_pop1 is 2");
+
+ try
+ {
+ int expected = 2;
+ int actual = (int)StackBehaviour.Pop1_pop1;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Pop1_pop1's value is not 2");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPop1_pop1 test = new StackBehaviourPop1_pop1();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPop1_pop1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 1;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi.cs
new file mode 100644
index 0000000000..73235c9ef2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Popi [v-yishi]
+/// </summary>
+public class StackBehaviourPopi
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Popi is 3");
+
+ try
+ {
+ int expected = 3;
+ int actual = (int)StackBehaviour.Popi;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Popi's value is not 3");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPopi test = new StackBehaviourPopi();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPopi");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 3;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_pop1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_pop1.cs
new file mode 100644
index 0000000000..297351de63
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_pop1.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Popi_pop1 [v-yishi]
+/// </summary>
+public class StackBehaviourPopi_pop1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Popi_pop1 is 4");
+
+ try
+ {
+ int expected = 4;
+ int actual = (int)StackBehaviour.Popi_pop1;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Popi_pop1's value is not 4");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPopi_pop1 test = new StackBehaviourPopi_pop1();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPopi_pop1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 4;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_popi.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_popi.cs
new file mode 100644
index 0000000000..c36210c5c4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_popi.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Popi_popi [v-yishi]
+/// </summary>
+public class StackBehaviourPopi_popi
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Popi_popi is 5");
+
+ try
+ {
+ int expected = 5;
+ int actual = (int)StackBehaviour.Popi_popi;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Popi_popi's value is not 5");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPopi_popi test = new StackBehaviourPopi_popi();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPopi_popi");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 5;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_popi8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_popi8.cs
new file mode 100644
index 0000000000..c5571d7bc9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_popi8.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Popi_popi8 [v-yishi]
+/// </summary>
+public class StackBehaviourPopi_popi8
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Popi_popi8 is 6");
+
+ try
+ {
+ int expected = 6;
+ int actual = (int)StackBehaviour.Popi_popi8;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Popi_popi8's value is not 6");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPopi_popi8 test = new StackBehaviourPopi_popi8();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPopi_popi8");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 6;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_popi_popi.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_popi_popi.cs
new file mode 100644
index 0000000000..76fa8856cb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_popi_popi.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Popi_popi_popi [v-yishi]
+/// </summary>
+public class StackBehaviourPopi_popi_popi
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Popi_popi_popi is 7");
+
+ try
+ {
+ int expected = 7;
+ int actual = (int)StackBehaviour.Popi_popi_popi;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Popi_popi_popi's value is not 7");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPopi_popi_popi test = new StackBehaviourPopi_popi_popi();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPopi_popi_popi");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 7;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_popr4.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_popr4.cs
new file mode 100644
index 0000000000..d12e133cb8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_popr4.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Popi_popr4 [v-yishi]
+/// </summary>
+public class StackBehaviourPopi_popr4
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Popi_popr4 is 8");
+
+ try
+ {
+ int expected = 8;
+ int actual = (int)StackBehaviour.Popi_popr4;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Popi_popr4's value is not 8");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPopi_popr4 test = new StackBehaviourPopi_popr4();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPopi_popr4");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 8;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_popr8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_popr8.cs
new file mode 100644
index 0000000000..ca3f3257b4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopi_popr8.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Popi_popr8 [v-yishi]
+/// </summary>
+public class StackBehaviourPopi_popr8
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Popi_popr8 is 9");
+
+ try
+ {
+ int expected = 9;
+ int actual = (int)StackBehaviour.Popi_popr8;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Popi_popr8's value is not 9");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPopi_popr8 test = new StackBehaviourPopi_popr8();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPopi_popr8");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 9;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref.cs
new file mode 100644
index 0000000000..edf95fa551
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Popref [v-yishi]
+/// </summary>
+public class StackBehaviourPopref
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Popref is 10");
+
+ try
+ {
+ int expected = 10;
+ int actual = (int)StackBehaviour.Popref;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Popref's value is not 10");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPopref test = new StackBehaviourPopref();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPopref");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 10;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_pop1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_pop1.cs
new file mode 100644
index 0000000000..dd3e2c09de
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_pop1.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Popref_pop1 [v-yishi]
+/// </summary>
+public class StackBehaviourPopref_pop1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Popref_pop1 is 11");
+
+ try
+ {
+ int expected = 11;
+ int actual = (int)StackBehaviour.Popref_pop1;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Popref_pop1's value is not 11");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPopref_pop1 test = new StackBehaviourPopref_pop1();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPopref_pop1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 11;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi.cs
new file mode 100644
index 0000000000..ff241d968b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi.cs
@@ -0,0 +1,74 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Popref_popi [v-yishi]
+/// </summary>
+public class StackBehaviourPopref_popi
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Popref_popi is 12");
+
+ try
+ {
+ int expected = 12;
+ int actual = (int)StackBehaviour.Popref_popi;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Popref_popi's value is not 12");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+
+ public static int Main()
+ {
+ StackBehaviourPopref_popi test = new StackBehaviourPopref_popi();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPopref_popi");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 12;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_pop1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_pop1.cs
new file mode 100644
index 0000000000..6e677fc0b6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_pop1.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Popref_popi_pop1 [v-yishi]
+/// </summary>
+public class StackBehaviourPopref_popi_pop1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Popref_popi_pop1 is 28");
+
+ try
+ {
+ int expected = 28;
+ int actual = (int)StackBehaviour.Popref_popi_pop1;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Popref_popi_pop1's value is not 28");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPopref_popi_pop1 test = new StackBehaviourPopref_popi_pop1();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPopref_popi_pop1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 28;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_popi.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_popi.cs
new file mode 100644
index 0000000000..12914840cb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_popi.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Popref_popi_popi [v-yishi]
+/// </summary>
+public class StackBehaviourPopref_popi_popi
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Popref_popi_popi is 13");
+
+ try
+ {
+ int expected = 13;
+ int actual = (int)StackBehaviour.Popref_popi_popi;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Popref_popi_popi's value is not 13");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPopref_popi_popi test = new StackBehaviourPopref_popi_popi();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPopref_popi_popi");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 13;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_popi8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_popi8.cs
new file mode 100644
index 0000000000..eda09b8549
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_popi8.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Popref_popi_popi8 [v-yishi]
+/// </summary>
+public class StackBehaviourPopref_popi_popi8
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Popref_popi_popi8 is 14");
+
+ try
+ {
+ int expected = 14;
+ int actual = (int)StackBehaviour.Popref_popi_popi8;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Popref_popi_popi8's value is not 14");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPopref_popi_popi8 test = new StackBehaviourPopref_popi_popi8();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPopref_popi_popi8");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 14;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_popr4.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_popr4.cs
new file mode 100644
index 0000000000..b385b41ea6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_popr4.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Popref_popi_popr4 [v-yishi]
+/// </summary>
+public class StackBehaviourPopref_popi_popr4
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Popref_popi_popr4 is 15");
+
+ try
+ {
+ int expected = 15;
+ int actual = (int)StackBehaviour.Popref_popi_popr4;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Popref_popi_popr4's value is not 15");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPopref_popi_popr4 test = new StackBehaviourPopref_popi_popr4();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPopref_popi_popr4");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 15;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_popr8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_popr8.cs
new file mode 100644
index 0000000000..bb35204e9c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_popr8.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Popref_popi_popr8 [v-yishi]
+/// </summary>
+public class StackBehaviourPopref_popi_popr8
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Popref_popi_popr8 is 16");
+
+ try
+ {
+ int expected = 16;
+ int actual = (int)StackBehaviour.Popref_popi_popr8;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Popref_popi_popr8's value is not 16");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPopref_popi_popr8 test = new StackBehaviourPopref_popi_popr8();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPopref_popi_popr8");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 16;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_popref.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_popref.cs
new file mode 100644
index 0000000000..b760b88176
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpopref_popi_popref.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Popref_popi_popref [v-yishi]
+/// </summary>
+public class StackBehaviourPopref_popi_popref
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Popref_popi_popref is 17");
+
+ try
+ {
+ int expected = 17;
+ int actual = (int)StackBehaviour.Popref_popi_popref;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Popref_popi_popref's value is not 17");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPopref_popi_popref test = new StackBehaviourPopref_popi_popref();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPopref_popi_popref");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 17;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpush0.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpush0.cs
new file mode 100644
index 0000000000..8ca0a30e57
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpush0.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Push0 [v-yishi]
+/// </summary>
+public class StackBehaviourPush0
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Push0 is 18");
+
+ try
+ {
+ int expected = 18;
+ int actual = (int)StackBehaviour.Push0;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Push0's value is not 18");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPush0 test = new StackBehaviourPush0();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPush0");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 18;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpush1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpush1.cs
new file mode 100644
index 0000000000..31b79c7c51
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpush1.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Push1 [v-yishi]
+/// </summary>
+public class StackBehaviourPush1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Push1 is 19");
+
+ try
+ {
+ int expected = 19;
+ int actual = (int)StackBehaviour.Push1;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Push1's value is not 19");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPush1 test = new StackBehaviourPush1();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPush1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 19;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpush1_push1.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpush1_push1.cs
new file mode 100644
index 0000000000..e89f0ab42a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpush1_push1.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Push1_push1 [v-yishi]
+/// </summary>
+public class StackBehaviourPush1_push1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Push1_push1 is 20");
+
+ try
+ {
+ int expected = 20;
+ int actual = (int)StackBehaviour.Push1_push1;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Push1_push1's value is not 20");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPush1_push1 test = new StackBehaviourPush1_push1();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPush1_push1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 20;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushi.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushi.cs
new file mode 100644
index 0000000000..80d913d8b9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushi.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Pushi [v-yishi]
+/// </summary>
+public class StackBehaviourPushi
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Pushi is 21");
+
+ try
+ {
+ int expected = 21;
+ int actual = (int)StackBehaviour.Pushi;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Pushi's value is not 21");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPushi test = new StackBehaviourPushi();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPushi");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 21;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushi8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushi8.cs
new file mode 100644
index 0000000000..36b5f4cc8f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushi8.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Pushi8 [v-yishi]
+/// </summary>
+public class StackBehaviourPushi8
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Pushi8 is 22");
+
+ try
+ {
+ int expected = 22;
+ int actual = (int)StackBehaviour.Pushi8;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Pushi8's value is not 22");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPushi8 test = new StackBehaviourPushi8();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPushi8");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 22;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushr4.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushr4.cs
new file mode 100644
index 0000000000..6c0fda9a40
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushr4.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Pushr4 [v-yishi]
+/// </summary>
+public class StackBehaviourPushr4
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Pushr4 is 23");
+
+ try
+ {
+ int expected = 23;
+ int actual = (int)StackBehaviour.Pushr4;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Pushr4's value is not 23");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPushr4 test = new StackBehaviourPushr4();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPushr4");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 23;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushr8.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushr8.cs
new file mode 100644
index 0000000000..55796e6b86
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushr8.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Pushr8 [v-yishi]
+/// </summary>
+public class StackBehaviourPushr8
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Pushr8 is 24");
+
+ try
+ {
+ int expected = 24;
+ int actual = (int)StackBehaviour.Pushr8;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Pushr8's value is not 24");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPushr8 test = new StackBehaviourPushr8();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPushr8");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 24;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushref.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushref.cs
new file mode 100644
index 0000000000..d22616ff2f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourpushref.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Pushref [v-yishi]
+/// </summary>
+public class StackBehaviourPushref
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Pushref is 25");
+
+ try
+ {
+ int expected = 25;
+ int actual = (int)StackBehaviour.Pushref;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Pushref's value is not 25");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourPushref test = new StackBehaviourPushref();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourPushref");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 25;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourvarpop.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourvarpop.cs
new file mode 100644
index 0000000000..8499ef300e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourvarpop.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Varpop [v-yishi]
+/// </summary>
+public class StackBehaviourVarpop
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Varpop is 26");
+
+ try
+ {
+ int expected = 26;
+ int actual = (int)StackBehaviour.Varpop;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Varpop's value is not 26");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourVarpop test = new StackBehaviourVarpop();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourVarpop");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 26;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourvarpush.cs b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourvarpush.cs
new file mode 100644
index 0000000000..d73d613d05
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/emit/stackbehaviour/stackbehaviourvarpush.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection.Emit;
+
+/// <summary>
+/// Varpush [v-yishi]
+/// </summary>
+public class StackBehaviourVarpush
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the value of Varpush is 27");
+
+ try
+ {
+ int expected = 27;
+ int actual = (int)StackBehaviour.Varpush;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Varpush's value is not 27");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StackBehaviourVarpush test = new StackBehaviourVarpush();
+
+ TestLibrary.TestFramework.BeginTestCase("StackBehaviourVarpush");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 27;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/eventattributes/EventAttributesNone.csproj b/tests/src/CoreMangLib/cti/system/reflection/eventattributes/EventAttributesNone.csproj
new file mode 100644
index 0000000000..3425ba83b8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/eventattributes/EventAttributesNone.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="eventattributesnone.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/eventattributes/EventAttributesRTSpecialName.csproj b/tests/src/CoreMangLib/cti/system/reflection/eventattributes/EventAttributesRTSpecialName.csproj
new file mode 100644
index 0000000000..92ed90c7f8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/eventattributes/EventAttributesRTSpecialName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="eventattributesrtspecialname.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/eventattributes/EventAttributesSpecialName.csproj b/tests/src/CoreMangLib/cti/system/reflection/eventattributes/EventAttributesSpecialName.csproj
new file mode 100644
index 0000000000..585831a025
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/eventattributes/EventAttributesSpecialName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="eventattributesspecialname.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/eventattributes/eventattributesnone.cs b/tests/src/CoreMangLib/cti/system/reflection/eventattributes/eventattributesnone.cs
new file mode 100644
index 0000000000..6e8b2fe908
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/eventattributes/eventattributesnone.cs
@@ -0,0 +1,95 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// None [v-ly]
+/// </summary>
+public class EventAttributesNone
+{
+ public static int Main()
+ {
+ EventAttributesNone test = new EventAttributesNone();
+
+ TestLibrary.TestFramework.BeginTestCase("EventAttributesNone");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //TestLibrary.TestFramework.LogInformation("[Negative]");
+ //retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Postive Test Case
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Verify None's value is 0x0000 ");
+
+ try
+ {
+ int expected = 0x0000;
+ int actual = (int)EventAttributes.None;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "None's value is not 0x0000");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.Message);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/eventattributes/eventattributesrtspecialname.cs b/tests/src/CoreMangLib/cti/system/reflection/eventattributes/eventattributesrtspecialname.cs
new file mode 100644
index 0000000000..c2a39ac15c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/eventattributes/eventattributesrtspecialname.cs
@@ -0,0 +1,94 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// RTSpecialName [v-ly]
+/// </summary>
+public class EventAttributesRTSpecialName
+{
+ public static int Main()
+ {
+ EventAttributesRTSpecialName test = new EventAttributesRTSpecialName();
+
+ TestLibrary.TestFramework.BeginTestCase("EventAttributesRTSpecialName");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //TestLibrary.TestFramework.LogInformation("[Negative]");
+ //retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Postive Test Case
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ");
+
+ try
+ {
+ int expected = 0x0400;
+ int actual = (int)EventAttributes.RTSpecialName;
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "RTSpecialName's value is not 0x0400");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.Message);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/eventattributes/eventattributesspecialname.cs b/tests/src/CoreMangLib/cti/system/reflection/eventattributes/eventattributesspecialname.cs
new file mode 100644
index 0000000000..12326ebadb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/eventattributes/eventattributesspecialname.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// SpecialName [v-wenyz]
+/// </summary>
+
+public class EventAttributesSpecialName
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ");
+
+ try
+ {
+ int expected = 0x0200;
+ int actual = (int)EventAttributes.SpecialName;
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "SpecialName's value is not 0x0200");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EventAttributesSpecialName test = new EventAttributesSpecialName();
+
+ TestLibrary.TestFramework.BeginTestCase("EventAttributesSpecialName");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesAssembly.csproj b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesAssembly.csproj
new file mode 100644
index 0000000000..bfa6e97353
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesAssembly.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fieldattributesassembly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesFamANDAssem.csproj b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesFamANDAssem.csproj
new file mode 100644
index 0000000000..dba3692358
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesFamANDAssem.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fieldattributesfamandassem.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesFamORAssem.csproj b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesFamORAssem.csproj
new file mode 100644
index 0000000000..70ad6550d7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesFamORAssem.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fieldattributesfamorassem.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesFamily.csproj b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesFamily.csproj
new file mode 100644
index 0000000000..9bea9323d9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesFamily.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fieldattributesfamily.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesFieldAccessMask.csproj b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesFieldAccessMask.csproj
new file mode 100644
index 0000000000..41f0ed0a43
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesFieldAccessMask.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fieldattributesfieldaccessmask.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesHasDefault.csproj b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesHasDefault.csproj
new file mode 100644
index 0000000000..9b350094c5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesHasDefault.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fieldattributeshasdefault.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesHasFieldRVA.csproj b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesHasFieldRVA.csproj
new file mode 100644
index 0000000000..44bb48f404
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesHasFieldRVA.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fieldattributeshasfieldrva.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesInitOnly.csproj b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesInitOnly.csproj
new file mode 100644
index 0000000000..f85018c349
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesInitOnly.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fieldattributesinitonly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesLiteral.csproj b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesLiteral.csproj
new file mode 100644
index 0000000000..cf3f40ef11
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesLiteral.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fieldattributesliteral.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesNotSerialized.csproj b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesNotSerialized.csproj
new file mode 100644
index 0000000000..75fd8444c7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesNotSerialized.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fieldattributesnotserialized.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesPinvokeImpl.csproj b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesPinvokeImpl.csproj
new file mode 100644
index 0000000000..30f8ca441e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesPinvokeImpl.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fieldattributespinvokeimpl.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesPrivate.csproj b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesPrivate.csproj
new file mode 100644
index 0000000000..633aca53c4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesPrivate.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fieldattributesprivate.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesPrivateScope.csproj b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesPrivateScope.csproj
new file mode 100644
index 0000000000..8ece59d7ac
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesPrivateScope.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fieldattributesprivatescope.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesPublic.csproj b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesPublic.csproj
new file mode 100644
index 0000000000..c7004acafc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesPublic.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fieldattributespublic.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesRTSpecialName.csproj b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesRTSpecialName.csproj
new file mode 100644
index 0000000000..7c01bdb3f4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesRTSpecialName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fieldattributesrtspecialname.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesSpecialName.csproj b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesSpecialName.csproj
new file mode 100644
index 0000000000..a35dacbe19
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesSpecialName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fieldattributesspecialname.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesStatic.csproj b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesStatic.csproj
new file mode 100644
index 0000000000..745cdd1ae5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/FieldAttributesStatic.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fieldattributesstatic.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesassembly.cs b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesassembly.cs
new file mode 100644
index 0000000000..ed4d187379
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesassembly.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.FiledAttributes.Assembly[v-jiajul]
+/// </summary>
+public class FieldAttributesAssembly
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the Int32 value of the enumeration");
+
+ try
+ {
+ FieldAttributes fieldAttributes = (FieldAttributes)3;
+ if (fieldAttributes != FieldAttributes.Assembly)
+ {
+ TestLibrary.TestFramework.LogError("001", "Result is not the value as expected,fieldAttributes is: " + fieldAttributes.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FieldAttributesAssembly test = new FieldAttributesAssembly();
+
+ TestLibrary.TestFramework.BeginTestCase("FieldAttributesAssembly");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesfamandassem.cs b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesfamandassem.cs
new file mode 100644
index 0000000000..766e12e0df
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesfamandassem.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.FiledAttributes.FamANDAssem [v-jiajul]
+/// </summary>
+public class FieldAttributesFamANDAssem
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the Int32 value of the enumeration");
+
+ try
+ {
+ FieldAttributes fieldAttributes = (FieldAttributes)2;
+ if (fieldAttributes != FieldAttributes.FamANDAssem)
+ {
+ TestLibrary.TestFramework.LogError("001", "Result is not the value as expected,fieldAttributes is: " + fieldAttributes.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FieldAttributesFamANDAssem test = new FieldAttributesFamANDAssem();
+
+ TestLibrary.TestFramework.BeginTestCase("FieldAttributesFamANDAssem");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesfamily.cs b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesfamily.cs
new file mode 100644
index 0000000000..2e8afd96e8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesfamily.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.FiledAttributes.Family [v-jiajul]
+/// </summary>
+public class FieldAttributesFamily
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the Int32 value of the enumeration");
+
+ try
+ {
+ FieldAttributes fieldAttributes = (FieldAttributes)4;
+ if (fieldAttributes != FieldAttributes.Family)
+ {
+ TestLibrary.TestFramework.LogError("001", "Result is not the value as expected,fieldAttributes is: " + fieldAttributes.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FieldAttributesFamily test = new FieldAttributesFamily();
+
+ TestLibrary.TestFramework.BeginTestCase("FieldAttributesFamily");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesfamorassem.cs b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesfamorassem.cs
new file mode 100644
index 0000000000..a27d225414
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesfamorassem.cs
@@ -0,0 +1,139 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class FieldAttributesFamORAssem
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ //retVal = PosTest2() && retVal;
+ //retVal = PosTest3() && retVal;
+ //retVal = PosTest4() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+ // retVal = NegTest2() && retVal;
+ // retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ");
+
+ try
+ {
+ //
+ // Add your test logic here
+ //
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //public bool PosTest2()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("PosTest2: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+
+ //public bool PosTest3()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("PosTest3: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FieldAttributesFamORAssem test = new FieldAttributesFamORAssem();
+
+ TestLibrary.TestFramework.BeginTestCase("FieldAttributesFamORAssem");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesfieldaccessmask.cs b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesfieldaccessmask.cs
new file mode 100644
index 0000000000..59e405cdc3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesfieldaccessmask.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.FiledAttributes.FieldAccessMask [v-jiajul]
+/// </summary>
+public class FieldAttributesFieldAccessMask
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the Int32 value of the enumeration");
+
+ try
+ {
+ FieldAttributes fieldAttributes = (FieldAttributes)7;
+ if (fieldAttributes != FieldAttributes.FieldAccessMask)
+ {
+ TestLibrary.TestFramework.LogError("001", "Result is not the value as expected,fieldAttributes is: " + fieldAttributes.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FieldAttributesFieldAccessMask test = new FieldAttributesFieldAccessMask();
+
+ TestLibrary.TestFramework.BeginTestCase("FieldAttributesFieldAccessMask");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributeshasdefault.cs b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributeshasdefault.cs
new file mode 100644
index 0000000000..f12b5573f9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributeshasdefault.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.FiledAttributes.HasDefault [v-jiajul]
+/// </summary>
+public class FieldAttributesHasDefault
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the Int32 value of the enumeration");
+
+ try
+ {
+ FieldAttributes fieldAttributes = (FieldAttributes)32768;
+ if (fieldAttributes != FieldAttributes.HasDefault)
+ {
+ TestLibrary.TestFramework.LogError("001", "Result is not the value as expected,fieldAttributes is: " + fieldAttributes.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FieldAttributesHasDefault test = new FieldAttributesHasDefault();
+
+ TestLibrary.TestFramework.BeginTestCase("FieldAttributesHasDefault");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributeshasfieldrva.cs b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributeshasfieldrva.cs
new file mode 100644
index 0000000000..c37801d726
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributeshasfieldrva.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.FiledAttributes.HasFieldRVA [v-jiajul]
+/// </summary>
+public class FieldAttributesHasFieldRVA
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the Int32 value of the enumeration");
+
+ try
+ {
+ FieldAttributes fieldAttributes = (FieldAttributes)256;
+ if (fieldAttributes != FieldAttributes.HasFieldRVA)
+ {
+ TestLibrary.TestFramework.LogError("001", "Result is not the value as expected,fieldAttributes is: " + fieldAttributes.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FieldAttributesHasFieldRVA test = new FieldAttributesHasFieldRVA();
+
+ TestLibrary.TestFramework.BeginTestCase("FieldAttributesHasFieldRVA");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesinitonly.cs b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesinitonly.cs
new file mode 100644
index 0000000000..3016f68016
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesinitonly.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.FiledAttributes.InitOnly [v-jiajul]
+/// </summary>
+public class FieldAttributesInitOnly
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the Int32 value of the enumeration");
+
+ try
+ {
+ FieldAttributes fieldAttributes = (FieldAttributes)32;
+ if (fieldAttributes != FieldAttributes.InitOnly)
+ {
+ TestLibrary.TestFramework.LogError("001", "Result is not the value as expected,fieldAttributes is: " + fieldAttributes.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FieldAttributesInitOnly test = new FieldAttributesInitOnly();
+
+ TestLibrary.TestFramework.BeginTestCase("FieldAttributesInitOnly");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesliteral.cs b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesliteral.cs
new file mode 100644
index 0000000000..d089345010
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesliteral.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.FiledAttributes.Literal [v-jiajul]
+/// </summary>
+public class FieldAttributesLiteral
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the Int32 value of the enumeration");
+
+ try
+ {
+ FieldAttributes fieldAttributes = (FieldAttributes)64;
+ if (fieldAttributes != FieldAttributes.Literal)
+ {
+ TestLibrary.TestFramework.LogError("001", "Result is not the value as expected,fieldAttributes is: " + fieldAttributes.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FieldAttributesLiteral test = new FieldAttributesLiteral();
+
+ TestLibrary.TestFramework.BeginTestCase("FieldAttributesLiteral");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesnotserialized.cs b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesnotserialized.cs
new file mode 100644
index 0000000000..ffe58823d8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesnotserialized.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.FiledAttributes.NotSerialized [v-jiajul]
+/// </summary>
+public class FieldAttributesNotSerialized
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the Int32 value of the enumeration");
+
+ try
+ {
+ FieldAttributes fieldAttributes = (FieldAttributes)128;
+ if (fieldAttributes != FieldAttributes.NotSerialized)
+ {
+ TestLibrary.TestFramework.LogError("001", "Result is not the value as expected,fieldAttributes is: " + fieldAttributes.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FieldAttributesNotSerialized test = new FieldAttributesNotSerialized();
+
+ TestLibrary.TestFramework.BeginTestCase("FieldAttributesNotSerialized");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributespinvokeimpl.cs b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributespinvokeimpl.cs
new file mode 100644
index 0000000000..2a424b36fb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributespinvokeimpl.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.FiledAttributes.PinvokeImpl [v-jiajul]
+/// </summary>
+public class FieldAttributesPinvokeImpl
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the Int32 value of the enumeration");
+
+ try
+ {
+ FieldAttributes fieldAttributes = (FieldAttributes)8192;
+ if (fieldAttributes != FieldAttributes.PinvokeImpl)
+ {
+ TestLibrary.TestFramework.LogError("001", "Result is not the value as expected,fieldAttributes is: " + fieldAttributes.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FieldAttributesPinvokeImpl test = new FieldAttributesPinvokeImpl();
+
+ TestLibrary.TestFramework.BeginTestCase("FieldAttributesPinvokeImpl");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesprivate.cs b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesprivate.cs
new file mode 100644
index 0000000000..9486af55b2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesprivate.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.FiledAttributes.Private [v-jiajul]
+/// </summary>
+public class FieldAttributesPrivate
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the Int32 value of the enumeration");
+
+ try
+ {
+ FieldAttributes fieldAttributes = (FieldAttributes)1;
+ if (fieldAttributes != FieldAttributes.Private)
+ {
+ TestLibrary.TestFramework.LogError("001", "Result is not the value as expected,fieldAttributes is: " + fieldAttributes.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FieldAttributesPrivate test = new FieldAttributesPrivate();
+
+ TestLibrary.TestFramework.BeginTestCase("FieldAttributesPrivate");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesprivatescope.cs b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesprivatescope.cs
new file mode 100644
index 0000000000..c59698b113
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesprivatescope.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.FiledAttributes.PrivateScope [v-jiajul]
+/// </summary>
+public class FieldAttributesPrivateScope
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the Int32 value of the enumeration");
+
+ try
+ {
+ FieldAttributes fieldAttributes = (FieldAttributes)0;
+ if (fieldAttributes != FieldAttributes.PrivateScope)
+ {
+ TestLibrary.TestFramework.LogError("001", "Result is not the value as expected,fieldAttributes is: " + fieldAttributes.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FieldAttributesPrivateScope test = new FieldAttributesPrivateScope();
+
+ TestLibrary.TestFramework.BeginTestCase("FieldAttributesPrivateScope");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributespublic.cs b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributespublic.cs
new file mode 100644
index 0000000000..dd2c3bd6d4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributespublic.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.FiledAttributes.Public [v-jiajul]
+/// </summary>
+public class FieldAttributesPublic
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the Int32 value of the enumeration");
+
+ try
+ {
+ FieldAttributes fieldAttributes = (FieldAttributes)6;
+ if (fieldAttributes != FieldAttributes.Public)
+ {
+ TestLibrary.TestFramework.LogError("001", "Result is not the value as expected,fieldAttributes is: " + fieldAttributes.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FieldAttributesPublic test = new FieldAttributesPublic();
+
+ TestLibrary.TestFramework.BeginTestCase("FieldAttributesPublic");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesrtspecialname.cs b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesrtspecialname.cs
new file mode 100644
index 0000000000..f4dc7cae10
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesrtspecialname.cs
@@ -0,0 +1,139 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class FieldAttributesRTSpecialName
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ //retVal = PosTest2() && retVal;
+ //retVal = PosTest3() && retVal;
+ //retVal = PosTest4() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+ // retVal = NegTest2() && retVal;
+ // retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ");
+
+ try
+ {
+ //
+ // Add your test logic here
+ //
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //public bool PosTest2()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("PosTest2: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+
+ //public bool PosTest3()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("PosTest3: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FieldAttributesRTSpecialName test = new FieldAttributesRTSpecialName();
+
+ TestLibrary.TestFramework.BeginTestCase("FieldAttributesRTSpecialName");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesspecialname.cs b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesspecialname.cs
new file mode 100644
index 0000000000..cf7020170b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesspecialname.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.FiledAttributes.SpecialName [v-jiajul]
+/// </summary>
+public class FieldAttributesSpecialName
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the Int32 value of the enumeration");
+
+ try
+ {
+ FieldAttributes fieldAttributes = (FieldAttributes)512;
+ if (fieldAttributes != FieldAttributes.SpecialName)
+ {
+ TestLibrary.TestFramework.LogError("001", "Result is not the value as expected,fieldAttributes is: " + fieldAttributes.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FieldAttributesSpecialName test = new FieldAttributesSpecialName();
+
+ TestLibrary.TestFramework.BeginTestCase("FieldAttributesSpecialName");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesstatic.cs b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesstatic.cs
new file mode 100644
index 0000000000..ea80671a8b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/fieldattributes/fieldattributesstatic.cs
@@ -0,0 +1,139 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class FieldAttributesStatic
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ //retVal = PosTest2() && retVal;
+ //retVal = PosTest3() && retVal;
+ //retVal = PosTest4() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+ // retVal = NegTest2() && retVal;
+ // retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ");
+
+ try
+ {
+ //
+ // Add your test logic here
+ //
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //public bool PosTest2()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("PosTest2: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+
+ //public bool PosTest3()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("PosTest3: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ FieldAttributesStatic test = new FieldAttributesStatic();
+
+ TestLibrary.TestFramework.BeginTestCase("FieldAttributesStatic");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesAbstract.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesAbstract.csproj
new file mode 100644
index 0000000000..ba1bdcef63
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesAbstract.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodattributesabstract.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesFamANDAssem.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesFamANDAssem.csproj
new file mode 100644
index 0000000000..42047b8080
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesFamANDAssem.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodattributesfamandassem.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesFamORAssem.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesFamORAssem.csproj
new file mode 100644
index 0000000000..e41b9bd840
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesFamORAssem.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodattributesfamorassem.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesFamily.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesFamily.csproj
new file mode 100644
index 0000000000..00d8268252
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesFamily.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodattributesfamily.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesFinal.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesFinal.csproj
new file mode 100644
index 0000000000..0a314da0a2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesFinal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodattributesfinal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesHasSecurity.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesHasSecurity.csproj
new file mode 100644
index 0000000000..39b64ef058
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesHasSecurity.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodattributeshassecurity.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesHideBySig.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesHideBySig.csproj
new file mode 100644
index 0000000000..cfad3b8448
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesHideBySig.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodattributeshidebysig.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesMemberAccessMask.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesMemberAccessMask.csproj
new file mode 100644
index 0000000000..81f3913e4c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesMemberAccessMask.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodattributesmemberaccessmask.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesNewSlot.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesNewSlot.csproj
new file mode 100644
index 0000000000..ce63e59376
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesNewSlot.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodattributesnewslot.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesPinvokeImpl.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesPinvokeImpl.csproj
new file mode 100644
index 0000000000..802eea05d9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesPinvokeImpl.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodattributespinvokeimpl.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesPrivate.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesPrivate.csproj
new file mode 100644
index 0000000000..0cdfc06bb5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesPrivate.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodattributesprivate.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesPrivateScope.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesPrivateScope.csproj
new file mode 100644
index 0000000000..bde7c28c67
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesPrivateScope.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodattributesprivatescope.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesPublic.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesPublic.csproj
new file mode 100644
index 0000000000..4b2ddca105
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesPublic.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodattributespublic.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesRTSpecialName.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesRTSpecialName.csproj
new file mode 100644
index 0000000000..5c28448daf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesRTSpecialName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodattributesrtspecialname.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesRequireSecObject.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesRequireSecObject.csproj
new file mode 100644
index 0000000000..52172a19d1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesRequireSecObject.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodattributesrequiresecobject.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesReuseSlot.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesReuseSlot.csproj
new file mode 100644
index 0000000000..2ccec4d694
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesReuseSlot.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodattributesreuseslot.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesSpecialName.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesSpecialName.csproj
new file mode 100644
index 0000000000..6b8eb78052
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesSpecialName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodattributesspecialname.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesStatic.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesStatic.csproj
new file mode 100644
index 0000000000..6d08ad1635
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesStatic.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodattributesstatic.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesUnmanagedExport.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesUnmanagedExport.csproj
new file mode 100644
index 0000000000..681e31ae8f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesUnmanagedExport.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodattributesunmanagedexport.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesVirtual.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesVirtual.csproj
new file mode 100644
index 0000000000..c31b170953
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesVirtual.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodattributesvirtual.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesVtableLayoutMask.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesVtableLayoutMask.csproj
new file mode 100644
index 0000000000..535449a2f7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/MethodAttributesVtableLayoutMask.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodattributesvtablelayoutmask.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesabstract.cs b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesabstract.cs
new file mode 100644
index 0000000000..8386cf5873
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesabstract.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.Abstract[v-juwa]
+/// </summary>
+public class MethodAttributesAbstract
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodAttributes.Abstract value is 1024...";
+ const string c_TEST_ID = "P001";
+ MethodAttributes FLAG_VALUE = (MethodAttributes)1024;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodAttributes.Abstract != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + MethodAttributes.Abstract.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodAttributesAbstract test = new MethodAttributesAbstract();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodAttributes.Abstract");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesfamandassem.cs b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesfamandassem.cs
new file mode 100644
index 0000000000..435567ae58
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesfamandassem.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.FamANDAssem[v-juwa]
+/// </summary>
+public class MethodAttributesFamANDAssem
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodAttributes.FamANDAssem value is 2...";
+ const string c_TEST_ID = "P001";
+ MethodAttributes FLAG_VALUE = (MethodAttributes)2;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodAttributes.FamANDAssem != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + MethodAttributes.FamANDAssem.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodAttributesFamANDAssem test = new MethodAttributesFamANDAssem();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodAttributes.FamANDAssem");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesfamily.cs b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesfamily.cs
new file mode 100644
index 0000000000..ad773d110f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesfamily.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.Family[v-juwa]
+/// </summary>
+public class MethodAttributesFamily
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodAttributes.Family value is 4...";
+ const string c_TEST_ID = "P001";
+ MethodAttributes FLAG_VALUE = (MethodAttributes)4;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodAttributes.Family != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + MethodAttributes.Family.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodAttributesFamily test = new MethodAttributesFamily();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodAttributes.Family");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesfamorassem.cs b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesfamorassem.cs
new file mode 100644
index 0000000000..6326b08350
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesfamorassem.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.FamORAssem[v-juwa]
+/// </summary>
+public class MethodAttributesFamORAssem
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodAttributes.FamORAssem value is 5...";
+ const string c_TEST_ID = "P001";
+ MethodAttributes FLAG_VALUE = (MethodAttributes)5;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodAttributes.FamORAssem != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + MethodAttributes.FamORAssem.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodAttributesFamORAssem test = new MethodAttributesFamORAssem();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodAttributes.FamORAssem");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesfinal.cs b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesfinal.cs
new file mode 100644
index 0000000000..4ed0710bc7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesfinal.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.Final[v-juwa]
+/// </summary>
+public class MethodAttributesFinal
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodAttributes.Final value is 32...";
+ const string c_TEST_ID = "P001";
+ MethodAttributes FLAG_VALUE = (MethodAttributes)32;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodAttributes.Final != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + MethodAttributes.Final.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodAttributesFinal test = new MethodAttributesFinal();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodAttributes.Final");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributeshassecurity.cs b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributeshassecurity.cs
new file mode 100644
index 0000000000..bd4ccb5e30
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributeshassecurity.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.HasSecurity[v-juwa]
+/// </summary>
+public class MethodAttributesHasSecurity
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodAttributes.HasSecurity value is 16384...";
+ const string c_TEST_ID = "P001";
+ MethodAttributes FLAG_VALUE = (MethodAttributes)16384;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodAttributes.HasSecurity != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + MethodAttributes.HasSecurity.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodAttributesHasSecurity test = new MethodAttributesHasSecurity();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodAttributes.HasSecurity");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributeshidebysig.cs b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributeshidebysig.cs
new file mode 100644
index 0000000000..31598681e1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributeshidebysig.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.HideBySig[v-juwa]
+/// </summary>
+public class MethodAttributesHideBySig
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodAttributes.HideBySig value is 128...";
+ const string c_TEST_ID = "P001";
+ MethodAttributes FLAG_VALUE = (MethodAttributes)128;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodAttributes.HideBySig != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + MethodAttributes.HideBySig.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodAttributesHideBySig test = new MethodAttributesHideBySig();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodAttributes.HideBySig");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesmemberaccessmask.cs b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesmemberaccessmask.cs
new file mode 100644
index 0000000000..9ad96ecaa8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesmemberaccessmask.cs
@@ -0,0 +1,98 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.MemberAccessMask[v-juwa]
+/// </summary>
+public class MethodAttributesMemberAccessMask
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodAttributes.MemberAccessMask value is 7...";
+ const string c_TEST_ID = "P001";
+ MethodAttributes FLAG_VALUE = (MethodAttributes)7;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodAttributes.MemberAccessMask != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + MethodAttributes.MemberAccessMask.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ MethodAttributesMemberAccessMask test = new MethodAttributesMemberAccessMask();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodAttributes.MemberAccessMask");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesnewslot.cs b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesnewslot.cs
new file mode 100644
index 0000000000..4683d9acb3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesnewslot.cs
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.NewSlot[v-juwa]
+/// </summary>
+public class MethodAttributesNewSlot
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodAttributes.NewSlot value is 256...";
+ const string c_TEST_ID = "P001";
+ MethodAttributes FLAG_VALUE = (MethodAttributes)256;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodAttributes.NewSlot != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + MethodAttributes.NewSlot.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ MethodAttributesNewSlot test = new MethodAttributesNewSlot();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodAttributes.NewSlot");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributespinvokeimpl.cs b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributespinvokeimpl.cs
new file mode 100644
index 0000000000..29f0de775b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributespinvokeimpl.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Relection.MethodAttributes.PinvokeImplp[v-juwa]
+/// </summary>
+public class MethodAttributesPinvokeImpl
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodAttributes.PinvokeImpl value is 8192...";
+ const string c_TEST_ID = "P001";
+ MethodAttributes FLAG_VALUE = (MethodAttributes)8192;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodAttributes.PinvokeImpl != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + MethodAttributes.PinvokeImpl.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodAttributesPinvokeImpl test = new MethodAttributesPinvokeImpl();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Relection.MethodAttributes.PinvokeImpl");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesprivate.cs b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesprivate.cs
new file mode 100644
index 0000000000..f0869547cd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesprivate.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.Private[v-juwa]
+/// </summary>
+public class MethodAttributesPrivate
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodAttributes.Private value is 1...";
+ const string c_TEST_ID = "P001";
+ MethodAttributes FLAG_VALUE = (MethodAttributes)1;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodAttributes.Private != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + MethodAttributes.Private.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodAttributesPrivate test = new MethodAttributesPrivate();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodAttributes.Private");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesprivatescope.cs b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesprivatescope.cs
new file mode 100644
index 0000000000..af155ee87d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesprivatescope.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.PrivateScope[v-juwa]
+/// </summary>
+public class MethodAttributesPrivateScope
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodAttributes.PrivateScope value is 0...";
+ const string c_TEST_ID = "P001";
+ MethodAttributes FLAG_VALUE = (MethodAttributes)0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodAttributes.PrivateScope != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + MethodAttributes.PrivateScope.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodAttributesPrivateScope test = new MethodAttributesPrivateScope();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodAttributes.PrivateScope");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributespublic.cs b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributespublic.cs
new file mode 100644
index 0000000000..74483162ed
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributespublic.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.Public [v-juwa]
+/// </summary>
+public class MethodAttributesPublic
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodAttributes.Public value is 6...";
+ const string c_TEST_ID = "P001";
+ MethodAttributes FLAG_VALUE = (MethodAttributes)6;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodAttributes.Public != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + MethodAttributes.Public.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodAttributesPublic test = new MethodAttributesPublic();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodAttributes.Public");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesrequiresecobject.cs b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesrequiresecobject.cs
new file mode 100644
index 0000000000..bf88659f84
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesrequiresecobject.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.RequireSecObject[v-juwa]
+/// </summary>
+public class MethodAttributesRequireSecObject
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodAttributes.RequireSecObject value is 32768...";
+ const string c_TEST_ID = "P001";
+ MethodAttributes FLAG_VALUE = (MethodAttributes)32768;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodAttributes.RequireSecObject != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + MethodAttributes.RequireSecObject.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodAttributesRequireSecObject test = new MethodAttributesRequireSecObject();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodAttributes.RequireSecObject");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesreuseslot.cs b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesreuseslot.cs
new file mode 100644
index 0000000000..ac219feee2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesreuseslot.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.ReuseSlot[v-juwa]
+/// </summary>
+public class MethodAttributesReuseSlot
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodAttributes.ReuseSlot value is 0...";
+ const string c_TEST_ID = "P001";
+ MethodAttributes FLAG_VALUE = (MethodAttributes)0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodAttributes.ReuseSlot != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + MethodAttributes.ReuseSlot.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodAttributesReuseSlot test = new MethodAttributesReuseSlot();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodAttributes.ReuseSlot");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesrtspecialname.cs b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesrtspecialname.cs
new file mode 100644
index 0000000000..a33e1249b6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesrtspecialname.cs
@@ -0,0 +1,77 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.RTSpecialName[v-juwa]
+/// </summary>
+public class MethodAttributesRTSpecialName
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodAttributes.RTSpecialName value is 4096...";
+ const string c_TEST_ID = "P001";
+ MethodAttributes FLAG_VALUE = (MethodAttributes)4096;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodAttributes.RTSpecialName != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + MethodAttributes.RTSpecialName.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodAttributesRTSpecialName test = new MethodAttributesRTSpecialName();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodAttributes.RTSpecialName");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesspecialname.cs b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesspecialname.cs
new file mode 100644
index 0000000000..27d7471846
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesspecialname.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.SpecialName[v-juwa]
+/// </summary>
+public class MethodAttributesSpecialName
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodAttributes.SpecialName value is 2048...";
+ const string c_TEST_ID = "P001";
+ MethodAttributes FLAG_VALUE = (MethodAttributes)2048;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodAttributes.SpecialName != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + MethodAttributes.SpecialName.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodAttributesSpecialName test = new MethodAttributesSpecialName();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodAttributes.SpecialName");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesstatic.cs b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesstatic.cs
new file mode 100644
index 0000000000..4eb9bf8364
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesstatic.cs
@@ -0,0 +1,77 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.Static[v-juwa]
+/// </summary>
+public class MethodAttributesStatic
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodAttributes.Static value is 16...";
+ const string c_TEST_ID = "P001";
+ MethodAttributes FLAG_VALUE = (MethodAttributes)16;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodAttributes.Static != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + MethodAttributes.Static.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodAttributesStatic test = new MethodAttributesStatic();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodAttributes.Static");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesunmanagedexport.cs b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesunmanagedexport.cs
new file mode 100644
index 0000000000..eec7b463f3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesunmanagedexport.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.UnmanagedExport[v-juwa]
+/// </summary>
+public class MethodAttributesUnmanagedExport
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodAttributes.UnmanagedExport value is 8...";
+ const string c_TEST_ID = "P001";
+ MethodAttributes FLAG_VALUE = (MethodAttributes)8;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodAttributes.UnmanagedExport != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + MethodAttributes.UnmanagedExport.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodAttributesUnmanagedExport test = new MethodAttributesUnmanagedExport();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodAttributes.UnmanagedExport");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesvirtual.cs b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesvirtual.cs
new file mode 100644
index 0000000000..45e548b8db
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesvirtual.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.Virtual[v-juwa]
+/// </summary>
+public class MethodAttributesVirtual
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodAttributes.Virtual value is 64...";
+ const string c_TEST_ID = "P001";
+ MethodAttributes FLAG_VALUE = (MethodAttributes)64;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodAttributes.Virtual != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + MethodAttributes.Virtual.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodAttributesVirtual test = new MethodAttributesVirtual();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodAttributes.Virtual");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesvtablelayoutmask.cs b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesvtablelayoutmask.cs
new file mode 100644
index 0000000000..c43463b06c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodattributes/methodattributesvtablelayoutmask.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.VtableLayoutMask[v-juwa]
+/// </summary>
+public class MethodAttributesVtableLayoutMask
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodAttributes.VtableLayoutMask value is 256...";
+ const string c_TEST_ID = "P001";
+ MethodAttributes FLAG_VALUE = (MethodAttributes)256;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodAttributes.VtableLayoutMask != FLAG_VALUE)
+ {
+ string errorDesc = "value is not " + FLAG_VALUE.ToString() + " as expected: Actual is " + MethodAttributes.VtableLayoutMask.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodAttributesVtableLayoutMask test = new MethodAttributesVtableLayoutMask();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodAttributes.VtableLayoutMask");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesCodeTypeMask.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesCodeTypeMask.csproj
new file mode 100644
index 0000000000..dc7c27e034
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesCodeTypeMask.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodimplattributescodetypemask.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesForwardRef.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesForwardRef.csproj
new file mode 100644
index 0000000000..259b118457
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesForwardRef.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodimplattributesforwardref.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesIL.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesIL.csproj
new file mode 100644
index 0000000000..75ede5922c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesIL.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodimplattributesil.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesInternalCall.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesInternalCall.csproj
new file mode 100644
index 0000000000..ac1612753e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesInternalCall.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodimplattributesinternalcall.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesManaged.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesManaged.csproj
new file mode 100644
index 0000000000..aef7acc59e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesManaged.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodimplattributesmanaged.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesManagedMask.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesManagedMask.csproj
new file mode 100644
index 0000000000..e4b7890a63
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesManagedMask.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodimplattributesmanagedmask.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesNative.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesNative.csproj
new file mode 100644
index 0000000000..8de861184c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesNative.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodimplattributesnative.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesNoInlining.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesNoInlining.csproj
new file mode 100644
index 0000000000..7e976ef504
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesNoInlining.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodimplattributesnoinlining.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesOPTIL.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesOPTIL.csproj
new file mode 100644
index 0000000000..d6030aaa16
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesOPTIL.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodimplattributesoptil.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesPreserveSig.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesPreserveSig.csproj
new file mode 100644
index 0000000000..a0140645ff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesPreserveSig.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodimplattributespreservesig.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesRuntime.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesRuntime.csproj
new file mode 100644
index 0000000000..9dcc114a43
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesRuntime.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodimplattributesruntime.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesSynchronized.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesSynchronized.csproj
new file mode 100644
index 0000000000..6ab5d937f3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesSynchronized.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodimplattributessynchronized.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesUnmanaged.csproj b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesUnmanaged.csproj
new file mode 100644
index 0000000000..7101d6cf12
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/MethodImplAttributesUnmanaged.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodimplattributesunmanaged.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributescodetypemask.cs b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributescodetypemask.cs
new file mode 100644
index 0000000000..3a94ddc211
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributescodetypemask.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.CodeTypeMask[v-jisong]
+/// </summary>
+public class MethodImplAttributesCodeTypeMask
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodImplAttributes.CodeTypeMask value is 0x0003...";
+ const string c_TEST_ID = "P001";
+ MethodImplAttributes FLAG_VALUE = (MethodImplAttributes)0x0003;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodImplAttributes.CodeTypeMask != FLAG_VALUE)
+ {
+ string errorDesc = "value " + FLAG_VALUE.ToString() + " is not as expected: Actual is " + MethodImplAttributes.CodeTypeMask.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodImplAttributesCodeTypeMask test = new MethodImplAttributesCodeTypeMask();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodImplCodeTypeMask");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesforwardref.cs b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesforwardref.cs
new file mode 100644
index 0000000000..5022cb8da5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesforwardref.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.CodeTypeMask[v-jisong]
+/// </summary>
+public class MethodImplAttributesForwardRef
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodImplAttributes.ForwardRef value is 0x0010...";
+ const string c_TEST_ID = "P001";
+ MethodImplAttributes FLAG_VALUE = (MethodImplAttributes)0x0010;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodImplAttributes.ForwardRef != FLAG_VALUE)
+ {
+ string errorDesc = "value " + FLAG_VALUE.ToString() + " is not as expected: Actual is " + MethodImplAttributes.ForwardRef.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodImplAttributesForwardRef test = new MethodImplAttributesForwardRef();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodImplForwardRef");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesil.cs b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesil.cs
new file mode 100644
index 0000000000..2382c8f807
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesil.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.IL[v-jisong]
+/// </summary>
+public class MethodImplAttributesIL
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodImplAttributes.IL value is 0x0000...";
+ const string c_TEST_ID = "P001";
+ MethodImplAttributes FLAG_VALUE = (MethodImplAttributes)0x0000;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodImplAttributes.IL != FLAG_VALUE)
+ {
+ string errorDesc = "value " + FLAG_VALUE.ToString() + " is not as expected: Actual is " + MethodImplAttributes.IL.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodImplAttributesIL test = new MethodImplAttributesIL();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodImplIL");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesinternalcall.cs b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesinternalcall.cs
new file mode 100644
index 0000000000..6280ec2614
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesinternalcall.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.InternalCall[v-jisong]
+/// </summary>
+public class MethodImplAttributesInternalCall
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodImplAttributes.InternalCall value is 0x1000...";
+ const string c_TEST_ID = "P001";
+ MethodImplAttributes FLAG_VALUE = (MethodImplAttributes) 0x1000;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodImplAttributes.InternalCall != FLAG_VALUE)
+ {
+ string errorDesc = "value " + FLAG_VALUE.ToString() + " is not as expected: Actual is " + MethodImplAttributes.InternalCall.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodImplAttributesInternalCall test = new MethodImplAttributesInternalCall();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodImplInternalCall");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesmanaged.cs b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesmanaged.cs
new file mode 100644
index 0000000000..a4dadcf4cc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesmanaged.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.Managed[v-jisong]
+/// </summary>
+public class MethodImplAttributesManaged
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodImplAttributes.Managed value is 0x0000...";
+ const string c_TEST_ID = "P001";
+ MethodImplAttributes FLAG_VALUE = (MethodImplAttributes)0x0000;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodImplAttributes.Managed != FLAG_VALUE)
+ {
+ string errorDesc = "value " + FLAG_VALUE.ToString() + " is not as expected: Actual is " + MethodImplAttributes.Managed.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodImplAttributesManaged test = new MethodImplAttributesManaged();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodImplManaged");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesmanagedmask.cs b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesmanagedmask.cs
new file mode 100644
index 0000000000..0131899116
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesmanagedmask.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.ManagedMask[v-jisong]
+/// </summary>
+public class MethodImplAttributesManagedMask
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodImplAttributes.ManagedMask value is 0x0004...";
+ const string c_TEST_ID = "P001";
+ MethodImplAttributes FLAG_VALUE = (MethodImplAttributes)0x0004;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodImplAttributes.ManagedMask != FLAG_VALUE)
+ {
+ string errorDesc = "value " + FLAG_VALUE.ToString() + " is not as expected: Actual is " + MethodImplAttributes.ManagedMask.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodImplAttributesManagedMask test = new MethodImplAttributesManagedMask();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodImplManagedMask");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesnative.cs b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesnative.cs
new file mode 100644
index 0000000000..85c8217105
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesnative.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.Native[v-jisong]
+/// </summary>
+public class MethodImplAttributesNative
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodImplAttributes.Native value is 0x0001...";
+ const string c_TEST_ID = "P001";
+ MethodImplAttributes FLAG_VALUE = (MethodImplAttributes)0x0001;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodImplAttributes.Native != FLAG_VALUE)
+ {
+ string errorDesc = "value " + FLAG_VALUE.ToString() + " is not as expected: Actual is " + MethodImplAttributes.Native.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodImplAttributesNative test = new MethodImplAttributesNative();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodImplNative");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesnoinlining.cs b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesnoinlining.cs
new file mode 100644
index 0000000000..ca10d52f09
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesnoinlining.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.NoInlining[v-jisong]
+/// </summary>
+public class MethodImplAttributesNoInlining
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodImplAttributes.NoInlining value is 0x0008...";
+ const string c_TEST_ID = "P001";
+ MethodImplAttributes FLAG_VALUE = (MethodImplAttributes)0x0008;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodImplAttributes.NoInlining != FLAG_VALUE)
+ {
+ string errorDesc = "value " + FLAG_VALUE.ToString() + " is not as expected: Actual is " + MethodImplAttributes.NoInlining.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodImplAttributesNoInlining test = new MethodImplAttributesNoInlining();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodImplNoInlining");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesoptil.cs b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesoptil.cs
new file mode 100644
index 0000000000..6472eb2daf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesoptil.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.OPTIL[v-jisong]
+/// </summary>
+public class MethodImplAttributesOPTIL
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodImplAttributes.OPTIL value is 0x0002...";
+ const string c_TEST_ID = "P001";
+ MethodImplAttributes FLAG_VALUE = (MethodImplAttributes)0x0002;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodImplAttributes.OPTIL != FLAG_VALUE)
+ {
+ string errorDesc = "value " + FLAG_VALUE.ToString() + " is not as expected: Actual is " + MethodImplAttributes.OPTIL.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodImplAttributesOPTIL test = new MethodImplAttributesOPTIL();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodImplOPTIL");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributespreservesig.cs b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributespreservesig.cs
new file mode 100644
index 0000000000..2749bd97fc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributespreservesig.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.PreserveSig[v-jisong]
+/// </summary>
+public class MethodImplAttributesPreserveSig
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodImplAttributes.PreserveSig value is 0x0080...";
+ const string c_TEST_ID = "P001";
+ MethodImplAttributes FLAG_VALUE = (MethodImplAttributes)0x0080;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodImplAttributes.PreserveSig != FLAG_VALUE)
+ {
+ string errorDesc = "value " + FLAG_VALUE.ToString() + " is not as expected: Actual is " + MethodImplAttributes.PreserveSig.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodImplAttributesPreserveSig test = new MethodImplAttributesPreserveSig();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodImplPreserveSig");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesruntime.cs b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesruntime.cs
new file mode 100644
index 0000000000..77d8e1de56
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesruntime.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.Runtime[v-jisong]
+/// </summary>
+public class MethodImplAttributesRuntime
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodImplAttributes.Runtime value is 0x0003...";
+ const string c_TEST_ID = "P001";
+ MethodImplAttributes FLAG_VALUE = (MethodImplAttributes)0x0003;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodImplAttributes.Runtime != FLAG_VALUE)
+ {
+ string errorDesc = "value " + FLAG_VALUE.ToString() + " is not as expected: Actual is " + MethodImplAttributes.Runtime.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodImplAttributesRuntime test = new MethodImplAttributesRuntime();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodImplRuntime");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributessynchronized.cs b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributessynchronized.cs
new file mode 100644
index 0000000000..ed8c5a4190
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributessynchronized.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.Synchronized[v-jisong]
+/// </summary>
+public class MethodImplAttributesSynchronized
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodImplAttributes.Synchronized value is 0x0020...";
+ const string c_TEST_ID = "P001";
+ MethodImplAttributes FLAG_VALUE = (MethodImplAttributes)0x0020;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodImplAttributes.Synchronized != FLAG_VALUE)
+ {
+ string errorDesc = "value " + FLAG_VALUE.ToString() + " is not as expected: Actual is " + MethodImplAttributes.Synchronized.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodImplAttributesSynchronized test = new MethodImplAttributesSynchronized();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodImplSynchronized");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesunmanaged.cs b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesunmanaged.cs
new file mode 100644
index 0000000000..c5ba0b6bd0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/methodimplattributes/methodimplattributesunmanaged.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// System.Reflection.MethodAttributes.Unmanaged[v-jisong]
+/// </summary>
+public class MethodImplAttributesUnmanaged
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1:check the MethodImplAttributes.Unmanaged value is 0x0004...";
+ const string c_TEST_ID = "P001";
+ MethodImplAttributes FLAG_VALUE = (MethodImplAttributes)0x0004;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+
+ if (MethodImplAttributes.Unmanaged != FLAG_VALUE)
+ {
+ string errorDesc = "value " + FLAG_VALUE.ToString() + " is not as expected: Actual is " + MethodImplAttributes.Unmanaged.ToString();
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ MethodImplAttributesUnmanaged test = new MethodImplAttributesUnmanaged();
+
+ TestLibrary.TestFramework.BeginTestCase("System.Reflection.MethodImplUnmanaged");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesHasDefault.csproj b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesHasDefault.csproj
new file mode 100644
index 0000000000..d39d7f212c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesHasDefault.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="parameterattributeshasdefault.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesIn.csproj b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesIn.csproj
new file mode 100644
index 0000000000..1fedcd14d8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesIn.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="parameterattributesin.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesNone.csproj b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesNone.csproj
new file mode 100644
index 0000000000..9d14c39ed7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesNone.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="parameterattributesnone.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesOptional.csproj b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesOptional.csproj
new file mode 100644
index 0000000000..a64b47c940
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesOptional.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="parameterattributesoptional.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesOut.csproj b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesOut.csproj
new file mode 100644
index 0000000000..31fc2ec7a1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesOut.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="parameterattributesout.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesRetval.csproj b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesRetval.csproj
new file mode 100644
index 0000000000..2606c8ee7d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/ParameterAttributesRetval.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="parameterattributesretval.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributeshasdefault.cs b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributeshasdefault.cs
new file mode 100644
index 0000000000..236798936f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributeshasdefault.cs
@@ -0,0 +1,94 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// HasDefault [v-ly]
+/// </summary>
+public class ParameterAttributesHasDefault
+{
+ public static int Main()
+ {
+ ParameterAttributesHasDefault test = new ParameterAttributesHasDefault();
+
+ TestLibrary.TestFramework.BeginTestCase("ParameterAttributesHasDefault");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //TestLibrary.TestFramework.LogInformation("[Negative]");
+ //retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Postive Test Case
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ");
+
+ try
+ {
+ int expected = 0x1000;
+ int actual = (int)ParameterAttributes.HasDefault;
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "HasDefault's value is not 0x0400");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.Message);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributesin.cs b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributesin.cs
new file mode 100644
index 0000000000..63531d8b02
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributesin.cs
@@ -0,0 +1,93 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+/// <summary>
+/// In [v-ly]
+/// </summary>
+public class ParameterAttributesIn
+{
+ public static int Main()
+ {
+ ParameterAttributesIn test = new ParameterAttributesIn();
+
+ TestLibrary.TestFramework.BeginTestCase("ParameterAttributesIn");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //TestLibrary.TestFramework.LogInformation("[Negative]");
+ //retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Postive Test Case
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ");
+
+ try
+ {
+ int expected = 0x0001;
+ int actual = (int)ParameterAttributes.In;
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "In's value is not 0x0001");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.Message);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributesnone.cs b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributesnone.cs
new file mode 100644
index 0000000000..200ee5aa55
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributesnone.cs
@@ -0,0 +1,94 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// None [v-ly]
+/// </summary>
+public class ParameterAttributesNone
+{
+ public static int Main()
+ {
+ ParameterAttributesNone test = new ParameterAttributesNone();
+
+ TestLibrary.TestFramework.BeginTestCase("ParameterAttributesNone");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //TestLibrary.TestFramework.LogInformation("[Negative]");
+ //retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Postive Test Case
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ");
+
+ try
+ {
+ int expected = 0x0000;
+ int actual = (int)ParameterAttributes.None;
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "None's value is not 0x0000");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception occurs: " + e);
+ TestLibrary.TestFramework.LogInformation(e.Message);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributesoptional.cs b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributesoptional.cs
new file mode 100644
index 0000000000..c9d2e46986
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributesoptional.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// Optional [v-wenyz]
+/// </summary>
+
+public class ParameterAttributesOptional
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ");
+
+ try
+ {
+ int expected = 0x0010;
+ int actual = (int)ParameterAttributes.Optional;
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Optional's value is not 0x0010");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ParameterAttributesOptional test = new ParameterAttributesOptional();
+
+ TestLibrary.TestFramework.BeginTestCase("ParameterAttributesOptional");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributesout.cs b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributesout.cs
new file mode 100644
index 0000000000..0dd6cac71c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributesout.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// Out [v-wenyz]
+/// </summary>
+
+public class ParameterAttributesOut
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ");
+
+ try
+ {
+ int expected = 0x0002;
+ int actual = (int)ParameterAttributes.Out;
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Out's value is not 0x0002");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ParameterAttributesOut test = new ParameterAttributesOut();
+
+ TestLibrary.TestFramework.BeginTestCase("ParameterAttributesOut");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributesretval.cs b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributesretval.cs
new file mode 100644
index 0000000000..a50835a4f8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/parameterattributes/parameterattributesretval.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// Retval [v-wenyz]
+/// </summary>
+
+public class ParameterAttributesRetval
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ");
+
+ try
+ {
+ int expected = 0x0008;
+ int actual = (int)ParameterAttributes.Retval;
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Retval's value is not 0x0008");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ ParameterAttributesRetval test = new ParameterAttributesRetval();
+
+ TestLibrary.TestFramework.BeginTestCase("ParameterAttributesRetval");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/PropertyAttributesHasDefault.csproj b/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/PropertyAttributesHasDefault.csproj
new file mode 100644
index 0000000000..9ff49f54ff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/PropertyAttributesHasDefault.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="propertyattributeshasdefault.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/PropertyAttributesNone.csproj b/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/PropertyAttributesNone.csproj
new file mode 100644
index 0000000000..9fb7362296
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/PropertyAttributesNone.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="propertyattributesnone.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/PropertyAttributesRTSpecialName.csproj b/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/PropertyAttributesRTSpecialName.csproj
new file mode 100644
index 0000000000..3370b5d0c7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/PropertyAttributesRTSpecialName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="propertyattributesrtspecialname.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/PropertyAttributesSpecialName.csproj b/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/PropertyAttributesSpecialName.csproj
new file mode 100644
index 0000000000..1f1c209b82
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/PropertyAttributesSpecialName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="propertyattributesspecialname.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/propertyattributeshasdefault.cs b/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/propertyattributeshasdefault.cs
new file mode 100644
index 0000000000..2077811cb6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/propertyattributeshasdefault.cs
@@ -0,0 +1,88 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// PropertyAttributes.HasDefault(v-yaduoj)
+/// </summary>
+public class PropertyAttributesTest
+{
+ private enum MyPropertyAttributes
+ {
+ None = 0x0000,
+ SpecialName = 0x0200,
+ ReservedMask = 0xf400,
+ RTSpecialName = 0x0400,
+ HasDefault = 0x1000,
+ Reserved2 = 0x2000,
+ Reserved3 = 0x4000,
+ Reserved4 = 0x8000
+ }
+
+ public static int Main()
+ {
+ PropertyAttributesTest testObj = new PropertyAttributesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: PropertyAttributes.HasDefault");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Property attribute is HasDefault";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyPropertyAttributes.HasDefault;
+ actualValue = (int)PropertyAttributes.HasDefault;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "HasDefault value of PropertyAttributes is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/propertyattributesnone.cs b/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/propertyattributesnone.cs
new file mode 100644
index 0000000000..37e1708963
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/propertyattributesnone.cs
@@ -0,0 +1,88 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// PropertyAttributes.None(v-yaduoj)
+/// </summary>
+public class PropertyAttributesTest
+{
+ private enum MyPropertyAttributes
+ {
+ None = 0x0000,
+ SpecialName = 0x0200,
+ ReservedMask = 0xf400,
+ RTSpecialName = 0x0400,
+ HasDefault = 0x1000,
+ Reserved2 = 0x2000,
+ Reserved3 = 0x4000,
+ Reserved4 = 0x8000
+ }
+
+ public static int Main()
+ {
+ PropertyAttributesTest testObj = new PropertyAttributesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: PropertyAttributes.None");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Property attribute is None";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyPropertyAttributes.None;
+ actualValue = (int)PropertyAttributes.None;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "None value of PropertyAttributes is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/propertyattributesrtspecialname.cs b/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/propertyattributesrtspecialname.cs
new file mode 100644
index 0000000000..8cfa06cd83
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/propertyattributesrtspecialname.cs
@@ -0,0 +1,88 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// PropertyAttributes.RTSpecialName(v-yaduoj)
+/// </summary>
+public class PropertyAttributesTest
+{
+ private enum MyPropertyAttributes
+ {
+ None = 0x0000,
+ SpecialName = 0x0200,
+ ReservedMask = 0xf400,
+ RTSpecialName = 0x0400,
+ HasDefault = 0x1000,
+ Reserved2 = 0x2000,
+ Reserved3 = 0x4000,
+ Reserved4 = 0x8000
+ }
+
+ public static int Main()
+ {
+ PropertyAttributesTest testObj = new PropertyAttributesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: PropertyAttributes.RTSpecialName");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Property attribute is RTSpecialName";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyPropertyAttributes.RTSpecialName;
+ actualValue = (int)PropertyAttributes.RTSpecialName;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "RTSpecialName value of PropertyAttributes is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/propertyattributesspecialname.cs b/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/propertyattributesspecialname.cs
new file mode 100644
index 0000000000..3bc3b81a0d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/propertyattributes/propertyattributesspecialname.cs
@@ -0,0 +1,88 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// PropertyAttributes.SpecialName(v-yaduoj)
+/// </summary>
+public class PropertyAttributesTest
+{
+ private enum MyPropertyAttributes
+ {
+ None = 0x0000,
+ SpecialName = 0x0200,
+ ReservedMask = 0xf400,
+ RTSpecialName = 0x0400,
+ HasDefault = 0x1000,
+ Reserved2 = 0x2000,
+ Reserved3 = 0x4000,
+ Reserved4 = 0x8000
+ }
+
+ public static int Main()
+ {
+ PropertyAttributesTest testObj = new PropertyAttributesTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: PropertyAttributes.SpecialName");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Property attribute is SpecialName";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyPropertyAttributes.SpecialName;
+ actualValue = (int)PropertyAttributes.SpecialName;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "SpecialName value of PropertyAttributes is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/targetinvocationexception/TargetInvocationExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/reflection/targetinvocationexception/TargetInvocationExceptionCtor1.csproj
new file mode 100644
index 0000000000..96e6ff16b8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/targetinvocationexception/TargetInvocationExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="targetinvocationexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/targetinvocationexception/TargetInvocationExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/reflection/targetinvocationexception/TargetInvocationExceptionCtor2.csproj
new file mode 100644
index 0000000000..9418174c75
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/targetinvocationexception/TargetInvocationExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="targetinvocationexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/targetinvocationexception/targetinvocationexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/reflection/targetinvocationexception/targetinvocationexceptionctor1.cs
new file mode 100644
index 0000000000..4a7f1af6ac
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/targetinvocationexception/targetinvocationexceptionctor1.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// TargetInvocationException constructor() [v-yaduoj]
+/// </summary>
+public class TargetInvocationExceptionCtor
+{
+ public static int Main()
+ {
+ TargetInvocationExceptionCtor testObj = new TargetInvocationExceptionCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("for TargetInvocationException()");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: initialize an instance of type TargetInvocationException via default constructor";
+ string errorDesc;
+
+ Exception innerException = new ArgumentNullException();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ TargetInvocationException ex = new TargetInvocationException(innerException);
+ if (null == ex)
+ {
+ errorDesc = "Failed to initialize an instance of type TargetInvocationException via default constructor.";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/targetinvocationexception/targetinvocationexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/reflection/targetinvocationexception/targetinvocationexceptionctor2.cs
new file mode 100644
index 0000000000..049c94db82
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/targetinvocationexception/targetinvocationexceptionctor2.cs
@@ -0,0 +1,189 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// TargetInvocationException constructor(string, Exception) [v-yaduoj]
+/// </summary>
+public class TargetInvocationExceptionCtor
+{
+ public static int Main()
+ {
+ TargetInvocationExceptionCtor testObj = new TargetInvocationExceptionCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("for TargetInvocationException(string, Exception)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: initialize an instance of type TargetInvocationException using an emtpy string message";
+ string errorDesc;
+
+ string message = string.Empty;
+ Exception innerException = new ArgumentNullException();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ TargetInvocationException e = new TargetInvocationException(message, innerException);
+ if (null == e || e.Message != message || e.InnerException != innerException)
+ {
+ errorDesc = "Failed to initialize an instance of type TargetInvocationException.";
+ errorDesc += "\nInput message is emtpy string";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is emtpy string";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string c_TEST_DESC = "PosTest2: initialize an instance of type TargetInvocationException using a string containing special character";
+ string errorDesc;
+
+ string message = "Not supported exception occurs here \n\r\0\t\v";
+ Exception innerException = new Exception();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ TargetInvocationException e = new TargetInvocationException(message, innerException);
+ if (null == e || e.Message != message || e.InnerException != innerException)
+ {
+ errorDesc = "Failed to initialize an instance of type TargetInvocationException.";
+ errorDesc += "\nInput message is \"" + message + "\"";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is \"" + message + "\"";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ string c_TEST_DESC = "PosTest3: initialize an instance of type TargetInvocationException using a null reference";
+ string errorDesc;
+
+ string message = null;
+ Exception innerException = new Exception();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ TargetInvocationException e = new TargetInvocationException(message, innerException);
+ if (null == e)
+ {
+ errorDesc = "Failed to initialize an instance of type TargetInvocationException.";
+ errorDesc += "\nInput message is a null reference.";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is a null reference.";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P004";
+ string c_TEST_DESC = "PosTest4: message is a string containing special character and inner exception is a null reference";
+ string errorDesc;
+
+ string message = "Not supported exception occurs here";
+ Exception innerException = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ TargetInvocationException e = new TargetInvocationException(message, innerException);
+ if (null == e || e.Message != message || e.InnerException != innerException)
+ {
+ errorDesc = "Failed to initialize an instance of type TargetInvocationException.";
+ errorDesc += "\nInput message is \"" + message + "\"";
+ errorDesc += "\nInner exception is a null reference.";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is \"" + message + "\"";
+ errorDesc += "\nInner exception is a null reference.";
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/TargetParameterCountExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/TargetParameterCountExceptionCtor1.csproj
new file mode 100644
index 0000000000..7847c10fd8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/TargetParameterCountExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="targetparametercountexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/TargetParameterCountExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/TargetParameterCountExceptionCtor2.csproj
new file mode 100644
index 0000000000..33d2557988
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/TargetParameterCountExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="targetparametercountexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/TargetParameterCountExceptionCtor3.csproj b/tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/TargetParameterCountExceptionCtor3.csproj
new file mode 100644
index 0000000000..47427771c3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/TargetParameterCountExceptionCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="targetparametercountexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/targetparametercountexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/targetparametercountexceptionctor1.cs
new file mode 100644
index 0000000000..7bcc17e70c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/targetparametercountexceptionctor1.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// TargetParameterCountException constructor() [v-yaduoj]
+/// </summary>
+public class TargetParameterCountExceptionCtor
+{
+ public static int Main()
+ {
+ TargetParameterCountExceptionCtor testObj = new TargetParameterCountExceptionCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("for TargetParameterCountException()");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: initialize an instance of type TargetParameterCountException via default constructor";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ TargetParameterCountException e = new TargetParameterCountException();
+ if (null == e)
+ {
+ errorDesc = "Failed to initialize an instance of type TargetParameterCountException via default constructor.";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/targetparametercountexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/targetparametercountexceptionctor2.cs
new file mode 100644
index 0000000000..eeab377c08
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/targetparametercountexceptionctor2.cs
@@ -0,0 +1,143 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// TargetParameterCountException constructor(string) [v-yaduoj]
+/// </summary>
+public class TargetParameterCountExceptionCtor
+{
+ public static int Main()
+ {
+ TargetParameterCountExceptionCtor testObj = new TargetParameterCountExceptionCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("for TargetParameterCountException(string)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: initialize an instance of type TargetParameterCountException using an emtpy string message";
+ string errorDesc;
+
+ string message = string.Empty;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ TargetParameterCountException e = new TargetParameterCountException(message);
+ if (null == e || e.Message != message)
+ {
+ errorDesc = "Failed to initialize an instance of type TargetParameterCountException.";
+ errorDesc += "\nInput message is emtpy string";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is emtpy string";
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string c_TEST_DESC = "PosTest2: initialize an instance of type TargetParameterCountException using a string containing special character";
+ string errorDesc;
+
+ string message = "Not supported exception occurs here \n\r\0\t\v";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ TargetParameterCountException e = new TargetParameterCountException(message);
+ if (null == e || e.Message != message)
+ {
+ errorDesc = "Failed to initialize an instance of type TargetParameterCountException.";
+ errorDesc += "\nInput message is \"" + message + "\"";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is \"" + message + "\"";
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ string c_TEST_DESC = "PosTest3: initialize an instance of type TargetParameterCountException using a null reference";
+ string errorDesc;
+
+ string message = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ TargetParameterCountException e = new TargetParameterCountException(message);
+ if (null == e)
+ {
+ errorDesc = "Failed to initialize an instance of type TargetParameterCountException.";
+ errorDesc += "\nInput message is a null reference.";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is a null reference.";
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/targetparametercountexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/targetparametercountexceptionctor3.cs
new file mode 100644
index 0000000000..b691a7e707
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/targetparametercountexception/targetparametercountexceptionctor3.cs
@@ -0,0 +1,189 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// TargetParameterCountException constructor(string, Exception) [v-yaduoj]
+/// </summary>
+public class TargetParameterCountExceptionCtor
+{
+ public static int Main()
+ {
+ TargetParameterCountExceptionCtor testObj = new TargetParameterCountExceptionCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("for TargetParameterCountException(string, Exception)");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: initialize an instance of type TargetParameterCountException using an emtpy string message";
+ string errorDesc;
+
+ string message = string.Empty;
+ Exception innerException = new ArgumentNullException();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ TargetParameterCountException e = new TargetParameterCountException(message, innerException);
+ if (null == e || e.Message != message || e.InnerException != innerException)
+ {
+ errorDesc = "Failed to initialize an instance of type TargetParameterCountException.";
+ errorDesc += "\nInput message is emtpy string";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is emtpy string";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string c_TEST_DESC = "PosTest2: initialize an instance of type TargetParameterCountException using a string containing special character";
+ string errorDesc;
+
+ string message = "Not supported exception occurs here \n\r\0\t\v";
+ Exception innerException = new Exception();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ TargetParameterCountException e = new TargetParameterCountException(message, innerException);
+ if (null == e || e.Message != message || e.InnerException != innerException)
+ {
+ errorDesc = "Failed to initialize an instance of type TargetParameterCountException.";
+ errorDesc += "\nInput message is \"" + message + "\"";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is \"" + message + "\"";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ string c_TEST_DESC = "PosTest3: initialize an instance of type TargetParameterCountException using a null reference";
+ string errorDesc;
+
+ string message = null;
+ Exception innerException = new Exception();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ TargetParameterCountException e = new TargetParameterCountException(message, innerException);
+ if (null == e)
+ {
+ errorDesc = "Failed to initialize an instance of type TargetParameterCountException.";
+ errorDesc += "\nInput message is a null reference.";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is a null reference.";
+ errorDesc += "\nInner exception is " + innerException;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P004";
+ string c_TEST_DESC = "PosTest4: message is a string containing special character and inner exception is a null reference";
+ string errorDesc;
+
+ string message = "Not supported exception occurs here";
+ Exception innerException = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ TargetParameterCountException e = new TargetParameterCountException(message, innerException);
+ if (null == e || e.Message != message || e.InnerException != innerException)
+ {
+ errorDesc = "Failed to initialize an instance of type TargetParameterCountException.";
+ errorDesc += "\nInput message is \"" + message + "\"";
+ errorDesc += "\nInner exception is a null reference.";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nInput message is \"" + message + "\"";
+ errorDesc += "\nInner exception is a null reference.";
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesAbstract.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesAbstract.csproj
new file mode 100644
index 0000000000..ccc03b25b9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesAbstract.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributesabstract.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesAnsiClass.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesAnsiClass.csproj
new file mode 100644
index 0000000000..70eb395f13
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesAnsiClass.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributesansiclass.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesAutoClass.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesAutoClass.csproj
new file mode 100644
index 0000000000..e2f6158378
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesAutoClass.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributesautoclass.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesAutoLayout.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesAutoLayout.csproj
new file mode 100644
index 0000000000..ae86d11912
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesAutoLayout.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributesautolayout.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesBeforeFieldInit.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesBeforeFieldInit.csproj
new file mode 100644
index 0000000000..85cf6813d0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesBeforeFieldInit.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributesbeforefieldinit.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesClass.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesClass.csproj
new file mode 100644
index 0000000000..d445fb7b8f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesClass.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributesclass.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesClassSemanticsMask.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesClassSemanticsMask.csproj
new file mode 100644
index 0000000000..203c01ccc6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesClassSemanticsMask.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributesclasssemanticsmask.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesExplicitLayout.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesExplicitLayout.csproj
new file mode 100644
index 0000000000..6081d0bd4e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesExplicitLayout.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributesexplicitlayout.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesHasSecurity.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesHasSecurity.csproj
new file mode 100644
index 0000000000..9b8cf95f55
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesHasSecurity.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributeshassecurity.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesImport.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesImport.csproj
new file mode 100644
index 0000000000..8296af0dc5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesImport.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributesimport.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesInterface.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesInterface.csproj
new file mode 100644
index 0000000000..4ea5cc3e5a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesInterface.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributesinterface.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesLayoutMask.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesLayoutMask.csproj
new file mode 100644
index 0000000000..197379d543
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesLayoutMask.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributeslayoutmask.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedAssembly.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedAssembly.csproj
new file mode 100644
index 0000000000..afe43c361a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedAssembly.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributesnestedassembly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedFamANDAssem.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedFamANDAssem.csproj
new file mode 100644
index 0000000000..3703998c92
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedFamANDAssem.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributesnestedfamandassem.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedFamORAssem.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedFamORAssem.csproj
new file mode 100644
index 0000000000..8b393cd122
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedFamORAssem.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributesnestedfamorassem.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedFamily.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedFamily.csproj
new file mode 100644
index 0000000000..7fb43f743a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedFamily.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributesnestedfamily.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedPrivate.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedPrivate.csproj
new file mode 100644
index 0000000000..ba780e831d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedPrivate.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributesnestedprivate.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedPublic.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedPublic.csproj
new file mode 100644
index 0000000000..2d68b50300
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesNestedPublic.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributesnestedpublic.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesPublic.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesPublic.csproj
new file mode 100644
index 0000000000..ee64dbd71c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesPublic.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributespublic.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesRTSpecialName.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesRTSpecialName.csproj
new file mode 100644
index 0000000000..376f66351b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesRTSpecialName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributesrtspecialname.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesSealed.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesSealed.csproj
new file mode 100644
index 0000000000..0e622ee3b2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesSealed.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributessealed.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesSequentialLayout.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesSequentialLayout.csproj
new file mode 100644
index 0000000000..153f0399bb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesSequentialLayout.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributessequentiallayout.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesSerializable.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesSerializable.csproj
new file mode 100644
index 0000000000..3aeb6f32b0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesSerializable.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributesserializable.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesSpecialName.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesSpecialName.csproj
new file mode 100644
index 0000000000..89715d4d97
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesSpecialName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributesspecialname.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesStringFormatMask.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesStringFormatMask.csproj
new file mode 100644
index 0000000000..db03452539
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesStringFormatMask.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributesstringformatmask.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesUnicodeClass.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesUnicodeClass.csproj
new file mode 100644
index 0000000000..6c171b1370
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesUnicodeClass.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributesunicodeclass.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesVisibilityMask.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesVisibilityMask.csproj
new file mode 100644
index 0000000000..5f1fe5dc8c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttributesVisibilityMask.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattributesvisibilitymask.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttribytesNotPublic.csproj b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttribytesNotPublic.csproj
new file mode 100644
index 0000000000..289c36d965
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/TypeAttribytesNotPublic.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeattribytesnotpublic.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesabstract.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesabstract.cs
new file mode 100644
index 0000000000..d8054eb2f8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesabstract.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// Abstract [v-yishi]
+/// </summary>
+public class TypeAttributesAbstract
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Abstract's value is 0x00000080");
+
+ try
+ {
+ int expected = 0x00000080;
+ int actual = (int)TypeAttributes.Abstract;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Abstract's value is not 0x00000080");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesAbstract test = new TypeAttributesAbstract();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesAbstract");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesansiclass.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesansiclass.cs
new file mode 100644
index 0000000000..d300cee3bf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesansiclass.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// AnsiClass [v-yishi]
+/// </summary>
+public class TypeAttributesAnsiClass
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify AnsiClass's value is 0x00000000");
+
+ try
+ {
+ int expected = 0x00000000;
+ int actual = (int)TypeAttributes.AnsiClass;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "AnsiClass's value is not 0x00000000");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesAnsiClass test = new TypeAttributesAnsiClass();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesAnsiClass");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesautoclass.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesautoclass.cs
new file mode 100644
index 0000000000..0e0a400498
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesautoclass.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// AutoClass [v-yishi]
+/// </summary>
+public class TypeAttributesAutoClass
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify AutoClass's value is 0x00020000");
+
+ try
+ {
+ int expected = 0x00020000;
+ int actual = (int)TypeAttributes.AutoClass;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "AutoClass's value is not 0x00020000");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesAutoClass test = new TypeAttributesAutoClass();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesAutoClass");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesautolayout.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesautolayout.cs
new file mode 100644
index 0000000000..cccbbc3ea3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesautolayout.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// AutoLayout [v-yishi]
+/// </summary>
+public class TypeAttributesAutoLayout
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify AutoLayout's value is 0x00000000");
+
+ try
+ {
+ int expected = 0x00000000;
+ int actual = (int)TypeAttributes.AutoLayout;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "AutoLayout's value is not 0x00000000");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesAutoLayout test = new TypeAttributesAutoLayout();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesAutoLayout");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesbeforefieldinit.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesbeforefieldinit.cs
new file mode 100644
index 0000000000..f6119fd104
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesbeforefieldinit.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// BeforeFieldInit [v-yishi]
+/// </summary>
+public class TypeAttributesBeforeFieldInit
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify BeforeFieldInit's value is 0x00100000");
+
+ try
+ {
+ int expected = 0x00100000;
+ int actual = (int)TypeAttributes.BeforeFieldInit;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "BeforeFieldInit's value is not 0x00100000");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesBeforeFieldInit test = new TypeAttributesBeforeFieldInit();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesBeforeFieldInit");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesclass.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesclass.cs
new file mode 100644
index 0000000000..31a5a93c96
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesclass.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// Class [v-yishi]
+/// </summary>
+public class TypeAttributesClass
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Class's value is 0x00000000");
+
+ try
+ {
+ int expected = 0x00000000;
+ int actual = (int)TypeAttributes.Class;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Class's value is not 0x00000000");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesClass test = new TypeAttributesClass();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesClass");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesclasssemanticsmask.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesclasssemanticsmask.cs
new file mode 100644
index 0000000000..13ad6b3f45
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesclasssemanticsmask.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// ClassSemanticsMask [v-yishi]
+/// </summary>
+public class TypeAttributesClassSemanticsMask
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify ClassSemanticsMask's value is 0x00000020");
+
+ try
+ {
+ int expected = 0x00000020;
+ int actual = (int)TypeAttributes.ClassSemanticsMask;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ClassSemanticsMask's value is not 0x00000020");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesClassSemanticsMask test = new TypeAttributesClassSemanticsMask();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesClassSemanticsMask");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesexplicitlayout.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesexplicitlayout.cs
new file mode 100644
index 0000000000..66dd9cb5ed
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesexplicitlayout.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// ExplicitLayout [v-yishi]
+/// </summary>
+public class TypeAttributesExplicitLayout
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify ExplicitLayout's value is 0x00000010");
+
+ try
+ {
+ int expected = 0x00000010;
+ int actual = (int)TypeAttributes.ExplicitLayout;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ExplicitLayout's value is not 0x00000010");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesExplicitLayout test = new TypeAttributesExplicitLayout();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesExplicitLayout");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributeshassecurity.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributeshassecurity.cs
new file mode 100644
index 0000000000..f24fcd7ba4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributeshassecurity.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// HasSecurity [v-yishi]
+/// </summary>
+public class TypeAttributesHasSecurity
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify HasSecurity's value is 0x00040000");
+
+ try
+ {
+ int expected = 0x00040000;
+ int actual = (int)TypeAttributes.HasSecurity;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "HasSecurity's value is not 0x00040000");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesHasSecurity test = new TypeAttributesHasSecurity();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesHasSecurity");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesimport.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesimport.cs
new file mode 100644
index 0000000000..90174a03dd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesimport.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// Import [v-yishi]
+/// </summary>
+public class TypeAttributesImport
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Import's value is 0x00001000");
+
+ try
+ {
+ int expected = 0x00001000;
+ int actual = (int)TypeAttributes.Import;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Import's value is not 0x00001000");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesImport test = new TypeAttributesImport();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesImport");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesinterface.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesinterface.cs
new file mode 100644
index 0000000000..302e50befb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesinterface.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// Interface [v-yishi]
+/// </summary>
+public class TypeAttributesInterface
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Interface's value is 0x00000020");
+
+ try
+ {
+ int expected = 0x00000020;
+ int actual = (int)TypeAttributes.Interface;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Interface's value is not 0x00000020");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesInterface test = new TypeAttributesInterface();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesInterface");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributeslayoutmask.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributeslayoutmask.cs
new file mode 100644
index 0000000000..b01c7ff400
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributeslayoutmask.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// LayoutMask [v-yishi]
+/// </summary>
+public class TypeAttributesLayoutMask
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify LayoutMask's value is 0x00000018");
+
+ try
+ {
+ int expected = 0x00000018;
+ int actual = (int)TypeAttributes.LayoutMask;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "LayoutMask's value is not 0x00000018");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesLayoutMask test = new TypeAttributesLayoutMask();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesLayoutMask");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedassembly.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedassembly.cs
new file mode 100644
index 0000000000..017bab3693
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedassembly.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// NestedAssembly [v-yishi]
+/// </summary>
+public class TypeAttributesNestedAssembly
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify NestedAssembly's value is 0x00000005");
+
+ try
+ {
+ int expected = 0x00000005;
+ int actual = (int)TypeAttributes.NestedAssembly;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "NestedAssembly's value is not 0x00000005");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesNestedAssembly test = new TypeAttributesNestedAssembly();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesNestedAssembly");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedfamandassem.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedfamandassem.cs
new file mode 100644
index 0000000000..46cff2bfeb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedfamandassem.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// NestedFamANDAssem [v-yishi]
+/// </summary>
+public class TypeAttributesNestedFamANDAssem
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify NestedFamANDAssem's value is 0x00000006");
+
+ try
+ {
+ int expected = 0x00000006;
+ int actual = (int)TypeAttributes.NestedFamANDAssem;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "NestedFamANDAssem's value is not 0x00000006");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesNestedFamANDAssem test = new TypeAttributesNestedFamANDAssem();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesNestedFamANDAssem");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedfamily.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedfamily.cs
new file mode 100644
index 0000000000..fa7e88041c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedfamily.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// NestedFamily [v-yishi]
+/// </summary>
+public class TypeAttributesNestedFamily
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify NestedFamily's value is 0x00000004");
+
+ try
+ {
+ int expected = 0x00000004;
+ int actual = (int)TypeAttributes.NestedFamily;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "NestedFamily's value is not 0x00000004");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesNestedFamily test = new TypeAttributesNestedFamily();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesNestedFamily");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedfamorassem.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedfamorassem.cs
new file mode 100644
index 0000000000..887ef7a7bd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedfamorassem.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// NestedFamORAssem [v-yishi]
+/// </summary>
+public class TypeAttributesNestedFamORAssem
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify NestedFamORAssem's value is 0x00000007");
+
+ try
+ {
+ int expected = 0x00000007;
+ int actual = (int)TypeAttributes.NestedFamORAssem;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "NestedFamORAssem's value is not 0x00000007");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesNestedFamORAssem test = new TypeAttributesNestedFamORAssem();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesNestedFamORAssem");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedprivate.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedprivate.cs
new file mode 100644
index 0000000000..4a5d687676
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedprivate.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// NestedPrivate [v-yishi]
+/// </summary>
+public class TypeAttributesNestedPrivate
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify NestedPrivate's value is 0x00000003");
+
+ try
+ {
+ int expected = 0x00000003;
+ int actual = (int)TypeAttributes.NestedPrivate;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "NestedPrivate's value is not 0x00000003");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesNestedPrivate test = new TypeAttributesNestedPrivate();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesNestedPrivate");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedpublic.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedpublic.cs
new file mode 100644
index 0000000000..282df31f72
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesnestedpublic.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// NestedPublic [v-yishi]
+/// </summary>
+public class TypeAttributesNestedPublic
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify NestedPublic's value is 0x00000002");
+
+ try
+ {
+ int expected = 0x00000002;
+ int actual = (int)TypeAttributes.NestedPublic;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "NestedPublic's value is not 0x00000002");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesNestedPublic test = new TypeAttributesNestedPublic();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesNestedPublic");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributespublic.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributespublic.cs
new file mode 100644
index 0000000000..35c27d90b3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributespublic.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// Public [v-yishi]
+/// </summary>
+public class TypeAttributesPublic
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Public's value is 0x00000001");
+
+ try
+ {
+ int expected = 0x00000001;
+ int actual = (int)TypeAttributes.Public;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Public's value is not 0x00000001");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesPublic test = new TypeAttributesPublic();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesPublic");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesrtspecialname.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesrtspecialname.cs
new file mode 100644
index 0000000000..d95a3d8985
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesrtspecialname.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// RTSpecialName [v-yishi]
+/// </summary>
+public class TypeAttributesRTSpecialName
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify RTSpecialName's value is 0x00000800");
+
+ try
+ {
+ int expected = 0x00000800;
+ int actual = (int)TypeAttributes.RTSpecialName;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "RTSpecialName's value is not 0x00000800");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesRTSpecialName test = new TypeAttributesRTSpecialName();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesRTSpecialName");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributessealed.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributessealed.cs
new file mode 100644
index 0000000000..35faebaa58
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributessealed.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// Sealed [v-yishi]
+/// </summary>
+public class TypeAttributesSealed
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Sealed's value is 0x00000100");
+
+ try
+ {
+ int expected = 0x00000100;
+ int actual = (int)TypeAttributes.Sealed;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Sealed's value is not 0x00000100");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesSealed test = new TypeAttributesSealed();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesSealed");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributessequentiallayout.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributessequentiallayout.cs
new file mode 100644
index 0000000000..017a47efd7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributessequentiallayout.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// SequentialLayout [v-yishi]
+/// </summary>
+public class TypeAttributesSequentialLayout
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify SequentialLayout's value is 0x00000008");
+
+ try
+ {
+ int expected = 0x00000008;
+ int actual = (int)TypeAttributes.SequentialLayout;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "SequentialLayout's value is not 0x00000008");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesSequentialLayout test = new TypeAttributesSequentialLayout();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesSequentialLayout");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesserializable.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesserializable.cs
new file mode 100644
index 0000000000..e8aaea062b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesserializable.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// Serializable [v-yishi]
+/// </summary>
+public class TypeAttributesSerializable
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Serializable's value is 0x00002000");
+
+ try
+ {
+ int expected = 0x00002000;
+ int actual = (int)TypeAttributes.Serializable;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Serializable's value is not 0x00002000");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesSerializable test = new TypeAttributesSerializable();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesSerializable");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesspecialname.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesspecialname.cs
new file mode 100644
index 0000000000..2b51651a4a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesspecialname.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// SpecialName [v-yishi]
+/// </summary>
+public class TypeAttributesSpecialName
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify SpecialName's value is 0x00000400");
+
+ try
+ {
+ int expected = 0x00000400;
+ int actual = (int)TypeAttributes.SpecialName;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "SpecialName's value is not 0x00000400");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesSpecialName test = new TypeAttributesSpecialName();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesSpecialName");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesstringformatmask.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesstringformatmask.cs
new file mode 100644
index 0000000000..5053ec9e38
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesstringformatmask.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// StringFormatMask [v-yishi]
+/// </summary>
+public class TypeAttributesStringFormatMask
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify StringFormatMask's value is 0x00030000");
+
+ try
+ {
+ int expected = 0x00030000;
+ int actual = (int)TypeAttributes.StringFormatMask;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "StringFormatMask's value is not 0x00030000");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesStringFormatMask test = new TypeAttributesStringFormatMask();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesStringFormatMask");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesunicodeclass.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesunicodeclass.cs
new file mode 100644
index 0000000000..a037e9d4b7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesunicodeclass.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// UnicodeClass [v-yishi]
+/// </summary>
+public class TypeAttributesUnicodeClass
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify UnicodeClass's value is 0x00010000");
+
+ try
+ {
+ int expected = 0x00010000;
+ int actual = (int)TypeAttributes.UnicodeClass;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "UnicodeClass's value is not 0x00010000");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesUnicodeClass test = new TypeAttributesUnicodeClass();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesUnicodeClass");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesvisibilitymask.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesvisibilitymask.cs
new file mode 100644
index 0000000000..6722fd9b2c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattributesvisibilitymask.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// VisibilityMask [v-yishi]
+/// </summary>
+public class TypeAttributesVisibilityMask
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify VisibilityMask's value is 0x00000007");
+
+ try
+ {
+ int expected = 0x00000007;
+ int actual = (int)TypeAttributes.VisibilityMask;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "VisibilityMask's value is not 0x00000007");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttributesVisibilityMask test = new TypeAttributesVisibilityMask();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttributesVisibilityMask");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattribytesnotpublic.cs b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattribytesnotpublic.cs
new file mode 100644
index 0000000000..2a67b91eab
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/reflection/typeattributes/typeattribytesnotpublic.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+/// <summary>
+/// NotPublic [v-yishi]
+/// </summary>
+public class TypeAttribytesNotPublic
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify NotPublic's value is 0x00000000");
+
+ try
+ {
+ int expected = 0x00000000;
+ int actual = (int)TypeAttributes.NotPublic;
+
+ if (expected != actual)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "NotPublic's value is not 0x00000000");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeAttribytesNotPublic test = new TypeAttribytesNotPublic();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeAttribytesNotPublic");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/MissingManifestResourceExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/MissingManifestResourceExceptionCtor1.csproj
new file mode 100644
index 0000000000..39816d2e76
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/MissingManifestResourceExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="missingmanifestresourceexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/MissingManifestResourceExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/MissingManifestResourceExceptionCtor2.csproj
new file mode 100644
index 0000000000..2d21682a31
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/MissingManifestResourceExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="missingmanifestresourceexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/MissingManifestResourceExceptionCtor3.csproj b/tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/MissingManifestResourceExceptionCtor3.csproj
new file mode 100644
index 0000000000..14e0326b8c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/MissingManifestResourceExceptionCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="missingmanifestresourceexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/missingmanifestresourceexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/missingmanifestresourceexceptionctor1.cs
new file mode 100644
index 0000000000..3a5e37b0f8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/missingmanifestresourceexceptionctor1.cs
@@ -0,0 +1,70 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Resources;
+
+/// <summary>
+/// ctor [v-yishi]
+/// </summary>
+public class MissingManifestResourceExceptionCtor1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor to create a new instance");
+
+ try
+ {
+ MissingManifestResourceException ex = new MissingManifestResourceException();
+ if (ex == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling ctor returns null reference");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ MissingManifestResourceExceptionCtor1 test = new MissingManifestResourceExceptionCtor1();
+
+ TestLibrary.TestFramework.BeginTestCase("MissingManifestResourceExceptionCtor1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/missingmanifestresourceexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/missingmanifestresourceexceptionctor2.cs
new file mode 100644
index 0000000000..ff415da41e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/missingmanifestresourceexceptionctor2.cs
@@ -0,0 +1,148 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Resources;
+
+/// <summary>
+/// ctor(System.String) [v-yishi]
+/// </summary>
+public class MissingManifestResourceExceptionCtor2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor with null");
+
+ try
+ {
+ MissingManifestResourceException ex = new MissingManifestResourceException(null);
+ if (null == ex)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling ctor will null returns null reference");
+ retVal = false;
+ }
+
+ string message = ex.Message;
+ // using default message
+ if (message == null)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Calling ctor will null returns null message");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call ctor with string.Empty");
+
+ try
+ {
+ MissingManifestResourceException ex = new MissingManifestResourceException(string.Empty);
+ if (null == ex)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling ctor will string.Empty returns null reference");
+ retVal = false;
+ }
+
+ string message = ex.Message;
+ // using default message
+ if (message == null)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Calling ctor will string.Empty returns null message");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call ctor with rand message");
+
+ try
+ {
+ string expected = TestLibrary.Generator.GetString(-55, false, 1, 256);
+ MissingManifestResourceException ex = new MissingManifestResourceException(expected);
+ if (null == ex)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Calling ctor will rand message returns null reference");
+ retVal = false;
+ }
+
+ string message = ex.Message;
+ // using default message
+ if (message != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Calling ctor will rand message returns null message");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] message = " + message + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ MissingManifestResourceExceptionCtor2 test = new MissingManifestResourceExceptionCtor2();
+
+ TestLibrary.TestFramework.BeginTestCase("MissingManifestResourceExceptionCtor2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/missingmanifestresourceexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/missingmanifestresourceexceptionctor3.cs
new file mode 100644
index 0000000000..81ebe2c1b1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/resources/missingmanifestresourceexception/missingmanifestresourceexceptionctor3.cs
@@ -0,0 +1,177 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Resources;
+
+public class TestException : Exception
+{
+}
+
+/// <summary>
+/// ctor(System.String,System.Exception) [v-yishi]
+/// </summary>
+public class MissingManifestResourceExceptionCtor3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor with null");
+
+ try
+ {
+ MissingManifestResourceException ex = new MissingManifestResourceException(null, null);
+ if (null == ex)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling ctor will null returns null reference");
+ retVal = false;
+ }
+
+ string message = ex.Message;
+ // using default message
+ if (message == null)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Calling ctor will null returns null message");
+ retVal = false;
+ }
+
+ Exception innerException = ex.InnerException;
+ // using default message
+ if (innerException != null)
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Calling ctor will null returns not null innerException");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call ctor with string.Empty");
+
+ try
+ {
+ MissingManifestResourceException ex = new MissingManifestResourceException(string.Empty, null);
+ if (null == ex)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling ctor will string.Empty returns null reference");
+ retVal = false;
+ }
+
+ string message = ex.Message;
+ // using default message
+ if (message == null)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Calling ctor will string.Empty returns null message");
+ retVal = false;
+ }
+
+ Exception innerException = ex.InnerException;
+ // using default message
+ if (innerException != null)
+ {
+ TestLibrary.TestFramework.LogError("002.3", "Calling ctor will string.Empty returns not null innerException");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call ctor with rand message");
+
+ try
+ {
+ string expected = TestLibrary.Generator.GetString(-55, false, 1, 256);
+ Exception expectedException = new TestException();
+ MissingManifestResourceException ex = new MissingManifestResourceException(expected, expectedException);
+ if (null == ex)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Calling ctor will rand message returns null reference");
+ retVal = false;
+ }
+
+ string message = ex.Message;
+ // using default message
+ if (message != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Calling ctor will rand message returns null message");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] message = " + message + ", expected = " + expected);
+ retVal = false;
+ }
+
+ Exception innerException = ex.InnerException;
+ // using default message
+ if (innerException != expectedException)
+ {
+ TestLibrary.TestFramework.LogError("003.3", "Calling ctor will string.Empty returns wrong inner exception");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ MissingManifestResourceExceptionCtor3 test = new MissingManifestResourceExceptionCtor3();
+
+ TestLibrary.TestFramework.BeginTestCase("MissingManifestResourceExceptionCtor3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/resources/neutralresourceslanguageattribute/CultureName.csproj b/tests/src/CoreMangLib/cti/system/resources/neutralresourceslanguageattribute/CultureName.csproj
new file mode 100644
index 0000000000..2e3aa123b2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/resources/neutralresourceslanguageattribute/CultureName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="neutralresourceslanguageattributeculturename.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/resources/neutralresourceslanguageattribute/NeutralResourcesLanguageAttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/resources/neutralresourceslanguageattribute/NeutralResourcesLanguageAttributeCtor.csproj
new file mode 100644
index 0000000000..86b76f1569
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/resources/neutralresourceslanguageattribute/NeutralResourcesLanguageAttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="neutralresourceslanguageattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/resources/neutralresourceslanguageattribute/neutralresourceslanguageattributector.cs b/tests/src/CoreMangLib/cti/system/resources/neutralresourceslanguageattribute/neutralresourceslanguageattributector.cs
new file mode 100644
index 0000000000..8a03125964
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/resources/neutralresourceslanguageattribute/neutralresourceslanguageattributector.cs
@@ -0,0 +1,144 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Resources;
+
+/// <summary>
+/// ctor(System.String) [v-yishi]
+/// </summary>
+public class NeutralResourcesLanguageAttributeCtor
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor with string.Empty reference");
+
+ try
+ {
+ NeutralResourcesLanguageAttribute attr = new NeutralResourcesLanguageAttribute(string.Empty);
+
+ if (attr == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling ctor with string.Empty returns null reference");
+ retVal = false;
+ }
+
+ string actual = attr.CultureName;
+ if (actual != string.Empty)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Calling ctor with string.Empty does not returns null CultureName");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call ctor with rand string");
+
+ try
+ {
+ string expected = TestLibrary.Generator.GetString(-55, false, 1, 10);
+ NeutralResourcesLanguageAttribute attr = new NeutralResourcesLanguageAttribute(expected);
+
+ if (attr == null)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling ctor with rand string returns null reference");
+ retVal = false;
+ }
+
+ string actual = attr.CultureName;
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Calling ctor with rand string does not returns expected CultureName");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negtive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Call ctor with null reference");
+
+ try
+ {
+ NeutralResourcesLanguageAttribute attr = new NeutralResourcesLanguageAttribute(null);
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException exception does not thrown when calling ctor with null reference");
+ retVal = false;
+ }
+ catch ( ArgumentNullException )
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NeutralResourcesLanguageAttributeCtor test = new NeutralResourcesLanguageAttributeCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("NeutralResourcesLanguageAttributeCtor");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/resources/neutralresourceslanguageattribute/neutralresourceslanguageattributeculturename.cs b/tests/src/CoreMangLib/cti/system/resources/neutralresourceslanguageattribute/neutralresourceslanguageattributeculturename.cs
new file mode 100644
index 0000000000..739c8328fc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/resources/neutralresourceslanguageattribute/neutralresourceslanguageattributeculturename.cs
@@ -0,0 +1,114 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Resources;
+
+/// <summary>
+/// CultureName [v-yishi]
+/// </summary>
+public class NeutralResourcesLanguageAttributeCultureName
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call CultureName when NeutralResourcesLanguageAttribute created with string.Empty reference");
+
+ try
+ {
+ NeutralResourcesLanguageAttribute attr = new NeutralResourcesLanguageAttribute(string.Empty);
+
+ if (attr == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling CultureName when NeutralResourcesLanguageAttribute created with string.Empty returns null reference");
+ retVal = false;
+ }
+
+ string actual = attr.CultureName;
+ if (actual != string.Empty)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Calling CultureName when NeutralResourcesLanguageAttribute created with string.Empty does not returns null CultureName");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call CultureName when NeutralResourcesLanguageAttribute created with rand string");
+
+ try
+ {
+ string expected = TestLibrary.Generator.GetString(-55, false, 1, 10);
+ NeutralResourcesLanguageAttribute attr = new NeutralResourcesLanguageAttribute(expected);
+
+ if (attr == null)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling ctor with rand string returns null reference");
+ retVal = false;
+ }
+
+ string actual = attr.CultureName;
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Calling ctor with rand string does not returns expected CultureName");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ NeutralResourcesLanguageAttributeCultureName test = new NeutralResourcesLanguageAttributeCultureName();
+
+ TestLibrary.TestFramework.BeginTestCase("NeutralResourcesLanguageAttributeCultureName");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/resources/resourcemanager/CustomCulture.csproj b/tests/src/CoreMangLib/cti/system/resources/resourcemanager/CustomCulture.csproj
new file mode 100644
index 0000000000..224af9eab4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/resources/resourcemanager/CustomCulture.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="customculture.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/resources/resourcemanager/customculture.cs b/tests/src/CoreMangLib/cti/system/resources/resourcemanager/customculture.cs
new file mode 100644
index 0000000000..a1a10e4644
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/resources/resourcemanager/customculture.cs
@@ -0,0 +1,64 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// customCultureInfo is derived from the System.Globalization.CultureInfo
+/// in order to provide support for a custom culture that is closely related
+/// to its parent culture.
+/// In this sample, the custom culture's role is limited to providing access
+/// to custom culture specific resources and providing a date format but the
+/// role of the custom culture could easily be expanded to provide additional
+/// differentiation with its parent culture. To do so, it is necessary to
+/// implement support for the other properties of the base CultureInfo class
+/// by overriding them in the derived class
+/// </summary>
+
+namespace CustomCulture
+{
+ public class CustomCultureInfo : CultureInfo
+ {
+ private string myDescription;
+ private string myName;
+ private string myParent;
+
+ // the constructor takes two parameters: the parent name and the custom name
+ public CustomCultureInfo(string parent, string customName) : base(parent)
+ {
+ myParent = parent;
+ myName = String.Format("{0}-{1}", parent, customName);
+ myDescription = String.Format("Custom Culture ({0})", myName);
+
+ // set formatting for date time
+ NumberFormatInfo nfi = (NumberFormatInfo)(new CultureInfo("en-US")).NumberFormat.Clone();
+ nfi.CurrencyPositivePattern = 3;
+ nfi.CurrencyGroupSeparator = "'";
+ nfi.CurrencySymbol = "$";
+ nfi.CurrencyDecimalDigits = 0;
+ base.NumberFormat = nfi;
+ }
+
+ public override String Name
+ {
+ get { return myName; }
+ }
+
+ public override CultureInfo Parent
+ {
+ get { return new CultureInfo(myParent); }
+ }
+
+ public override String EnglishName
+ {
+ get { return myDescription; }
+ }
+
+ public override String NativeName
+ {
+ get { return myDescription; }
+ }
+
+ }
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/resources/satellitecontractversionattribute/AttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/resources/satellitecontractversionattribute/AttributeCtor.csproj
new file mode 100644
index 0000000000..0ed15af221
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/resources/satellitecontractversionattribute/AttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="satellitecontractversionattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/resources/satellitecontractversionattribute/AttributeVersion.csproj b/tests/src/CoreMangLib/cti/system/resources/satellitecontractversionattribute/AttributeVersion.csproj
new file mode 100644
index 0000000000..58a4eccfc4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/resources/satellitecontractversionattribute/AttributeVersion.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="satellitecontractversionattributeversion.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/resources/satellitecontractversionattribute/satellitecontractversionattributector.cs b/tests/src/CoreMangLib/cti/system/resources/satellitecontractversionattribute/satellitecontractversionattributector.cs
new file mode 100644
index 0000000000..ac5da18bcc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/resources/satellitecontractversionattribute/satellitecontractversionattributector.cs
@@ -0,0 +1,131 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Resources;
+
+///<summary>
+///System.Resouces.SatelliteContractVersionAttribute.Ctor(String) [v-zuolan]
+///</summary>
+
+public class SatelliteContractVersionAttributeCtor
+{
+
+ public static int Main()
+ {
+ SatelliteContractVersionAttributeCtor testObj = new SatelliteContractVersionAttributeCtor();
+ TestLibrary.TestFramework.BeginTestCase("for Constructor of System.Resouces.SatelliteContractVersionAttribute");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("Negative");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ String version = TestLibrary.Generator.GetString(-55, false, 1, 255);
+
+ String expectedValue = version;
+ String actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Create a instance with normal string");
+ try
+ {
+ SatelliteContractVersionAttribute sCVA = new SatelliteContractVersionAttribute(version);
+ actualValue = sCVA.Version;
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ String version = TestLibrary.Generator.GetString(-55, false, 256, 512);
+
+ String expectedValue = version;
+ String actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Create a instance with long string");
+ try
+ {
+ SatelliteContractVersionAttribute sCVA = new SatelliteContractVersionAttribute(version);
+ actualValue = sCVA.Version;
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negative Test Logic
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Create a instance with null string");
+ try
+ {
+ SatelliteContractVersionAttribute sCVA = new SatelliteContractVersionAttribute(null);
+ TestLibrary.TestFramework.LogError("005", "No ArgumentNullException throw out expected.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/resources/satellitecontractversionattribute/satellitecontractversionattributeversion.cs b/tests/src/CoreMangLib/cti/system/resources/satellitecontractversionattribute/satellitecontractversionattributeversion.cs
new file mode 100644
index 0000000000..9d7d9ace02
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/resources/satellitecontractversionattribute/satellitecontractversionattributeversion.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Resources;
+
+///<summary>
+///System.Resouces.SatelliteContractVersionAttribute.Version [v-zuolan]
+///</summary>
+
+public class SatelliteContractVersionAttributeVersion
+{
+
+ public static int Main()
+ {
+ SatelliteContractVersionAttributeVersion testObj = new SatelliteContractVersionAttributeVersion();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.Resouces.SatelliteContractVersionAttribute.Version");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ String version = TestLibrary.Generator.GetString(-55, false, 1, 255);
+ SatelliteContractVersionAttribute sCVA = new SatelliteContractVersionAttribute(version);
+
+ String expectedValue = version;
+ String actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Set Version as normal String and get it.");
+ try
+ {
+ actualValue = sCVA.Version;
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ String version = TestLibrary.Generator.GetString(-55, false, 256, 512);
+ SatelliteContractVersionAttribute sCVA = new SatelliteContractVersionAttribute(version);
+
+ String expectedValue = version;
+ String actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Set Version as long String and get it.");
+ try
+ {
+ actualValue = sCVA.Version;
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/accessedthroughpropertyattribute/ATPACtor.csproj b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/accessedthroughpropertyattribute/ATPACtor.csproj
new file mode 100644
index 0000000000..f0eb2609ca
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/accessedthroughpropertyattribute/ATPACtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="atpactor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/accessedthroughpropertyattribute/ATPAPropertyName.csproj b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/accessedthroughpropertyattribute/ATPAPropertyName.csproj
new file mode 100644
index 0000000000..caa03677f3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/accessedthroughpropertyattribute/ATPAPropertyName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="atpapropertyname.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/accessedthroughpropertyattribute/atpactor.cs b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/accessedthroughpropertyattribute/atpactor.cs
new file mode 100644
index 0000000000..f8324c55c7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/accessedthroughpropertyattribute/atpactor.cs
@@ -0,0 +1,140 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime;
+
+/// <summary>
+/// System.Runtime.CompilerServices.AccessedThroughPropertyAttribute.Ctor()
+/// </summary>
+public class AccessedThroughPropertyAttributeCtor
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ public static int Main()
+ {
+ AccessedThroughPropertyAttributeCtor atpaCtor = new AccessedThroughPropertyAttributeCtor();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Method: System.Runtime.CompilerServices.AccessedThroughPropertyAttribute.Ctor()...");
+
+ if (atpaCtor.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Create a new AccessedThroughPropertyAttribute instance ... ";
+ const string c_TEST_ID = "P001";
+
+ string c_PROPERTYNAME = TestLibrary.Generator.GetString(-55, false,c_MIN_STRING_LEN,c_MAX_STRING_LEN);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ System.Runtime.CompilerServices.AccessedThroughPropertyAttribute atpa = new System.Runtime.CompilerServices.AccessedThroughPropertyAttribute(c_PROPERTYNAME);
+ if (atpa == null)
+ {
+ string errorDesc = "the AccessedThroughPropertyAttribute ctor error occurred.)";
+ errorDesc += "\n parameter is " + c_PROPERTYNAME;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: the parameter is empty ... ";
+ const string c_TEST_ID = "P002";
+
+ string c_PROPERTYNAME = "";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ System.Runtime.CompilerServices.AccessedThroughPropertyAttribute atpa = new System.Runtime.CompilerServices.AccessedThroughPropertyAttribute(c_PROPERTYNAME);
+ if (atpa == null)
+ {
+ string errorDesc = "the AccessedThroughPropertyAttribute ctor error occurred.)";
+ errorDesc += "\n parameter is empty";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: the parameter is a null reference ... ";
+ const string c_TEST_ID = "P003";
+
+ string c_PROPERTYNAME = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ System.Runtime.CompilerServices.AccessedThroughPropertyAttribute atpa = new System.Runtime.CompilerServices.AccessedThroughPropertyAttribute(c_PROPERTYNAME);
+ if (atpa == null)
+ {
+ string errorDesc = "the AccessedThroughPropertyAttribute ctor error occurred.)";
+ errorDesc += "\n parameter is a null reference";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/accessedthroughpropertyattribute/atpapropertyname.cs b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/accessedthroughpropertyattribute/atpapropertyname.cs
new file mode 100644
index 0000000000..f0c4447728
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/accessedthroughpropertyattribute/atpapropertyname.cs
@@ -0,0 +1,138 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime;
+
+/// <summary>
+/// System.Runtime.CompilerServices.AccessedThroughPropertyAttribute.PropertyName
+/// </summary>
+public class AccessedThroughPropertyAttributePropertyName
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ public static int Main()
+ {
+ AccessedThroughPropertyAttributePropertyName atpaPropertyName = new AccessedThroughPropertyAttributePropertyName();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Method: System.Runtime.CompilerServices.AccessedThroughPropertyAttribute.Ctor()...");
+
+ if (atpaPropertyName.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest1: Verfify property PropertyName ... ";
+ string c_TEST_ID = "P001";
+ string c_PROPERTYNAME = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ System.Runtime.CompilerServices.AccessedThroughPropertyAttribute atpa = new System.Runtime.CompilerServices.AccessedThroughPropertyAttribute(c_PROPERTYNAME);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ if (atpa.PropertyName != c_PROPERTYNAME)
+ {
+ string errorDesc = "value is not " + c_PROPERTYNAME + " as expected: Actual is " + atpa.PropertyName;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest2: Verfify the PropertyName is empty ... ";
+ string c_TEST_ID = "P002";
+ string c_PROPERTYNAME = "";
+
+ System.Runtime.CompilerServices.AccessedThroughPropertyAttribute atpa = new System.Runtime.CompilerServices.AccessedThroughPropertyAttribute(c_PROPERTYNAME);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ if (atpa.PropertyName != c_PROPERTYNAME)
+ {
+ string errorDesc = "value is not " + c_PROPERTYNAME + " as expected: Actual is empty";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string c_TEST_DESC = "PosTest3: Verfify the PropertyName is a null reference ... ";
+ string c_TEST_ID = "P003";
+ string c_PROPERTYNAME = null;
+
+ System.Runtime.CompilerServices.AccessedThroughPropertyAttribute atpa = new System.Runtime.CompilerServices.AccessedThroughPropertyAttribute(c_PROPERTYNAME);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ if (atpa.PropertyName != c_PROPERTYNAME)
+ {
+ string errorDesc = "value is not " + c_PROPERTYNAME + " as expected: Actual is null";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexcpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/compilationrelaxations/AttributeCtor1.csproj b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/compilationrelaxations/AttributeCtor1.csproj
new file mode 100644
index 0000000000..fcb0c02992
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/compilationrelaxations/AttributeCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="compilationrelaxationsattributector1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/compilationrelaxations/compilationrelaxationsattributector1.cs b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/compilationrelaxations/compilationrelaxationsattributector1.cs
new file mode 100644
index 0000000000..d57aa8a098
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/compilationrelaxations/compilationrelaxationsattributector1.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.CompilerServices;
+
+///<summary>
+///System.Runtime.CompilerServices.CompilationRelaxationsAttribute.Ctor(int) [v-zuolan]
+///</summary>
+
+public class CompilationRelaxationsAttributeCtor
+{
+
+ public static int Main()
+ {
+ CompilationRelaxationsAttributeCtor testObj = new CompilationRelaxationsAttributeCtor();
+ TestLibrary.TestFramework.BeginTestCase("for constructor of System.Runtime.CompilerServices.CompilationRelaxationsAttribute");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ int expectedValue = TestLibrary.Generator.GetInt32(-55);
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Create a instance with random parameter.");
+ try
+ {
+ CompilationRelaxationsAttribute cRA = new CompilationRelaxationsAttribute(expectedValue);
+ actualValue = cRA.CompilationRelaxations;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e + "when expectedValue is:" + expectedValue);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ int expectedValue = int.MaxValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Create a instance with MaxValue.");
+ try
+ {
+ CompilationRelaxationsAttribute cRA = new CompilationRelaxationsAttribute(expectedValue);
+ actualValue = cRA.CompilationRelaxations;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ int expectedValue = int.MinValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Create a instance with MinValue.");
+ try
+ {
+ CompilationRelaxationsAttribute cRA = new CompilationRelaxationsAttribute(expectedValue);
+ actualValue = cRA.CompilationRelaxations;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/compilergeneratedattribute/CompilerGeneratedAttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/compilergeneratedattribute/CompilerGeneratedAttributeCtor.csproj
new file mode 100644
index 0000000000..2cc71056ec
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/compilergeneratedattribute/CompilerGeneratedAttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="compilergeneratedattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/compilergeneratedattribute/compilergeneratedattributector.cs b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/compilergeneratedattribute/compilergeneratedattributector.cs
new file mode 100644
index 0000000000..978e975307
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/compilergeneratedattribute/compilergeneratedattributector.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime;
+
+/// <summary>
+/// System.Runtime.CompilerServices.CompilerGeneratedAttribute.Ctor()
+/// </summary>
+public class CompilerGeneratedAttributeCtor
+{
+
+ public static int Main()
+ {
+ CompilerGeneratedAttributeCtor cgaCtor = new CompilerGeneratedAttributeCtor();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Method: System.Runtime.CompilerServices.CompilerGeneratedAttribute.Ctor()...");
+
+ if (cgaCtor.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Create a new CompilerGeneratedAttribute instance ... ";
+ const string c_TEST_ID = "P001";
+
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ System.Runtime.CompilerServices.CompilerGeneratedAttribute cga = new System.Runtime.CompilerServices.CompilerGeneratedAttribute();
+ if (cga == null)
+ {
+ string errorDesc = "the CompilerGeneratedAttribute ctor error occurred.)";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexcpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/customconstantattribute/CustomConstantAttributector.csproj b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/customconstantattribute/CustomConstantAttributector.csproj
new file mode 100644
index 0000000000..71c907ed4e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/customconstantattribute/CustomConstantAttributector.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="customconstantattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/customconstantattribute/customconstantattributector.cs b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/customconstantattribute/customconstantattributector.cs
new file mode 100644
index 0000000000..6b7dd18ce8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/customconstantattribute/customconstantattributector.cs
@@ -0,0 +1,83 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.CompilerServices;
+
+/// <summary>
+/// CustomConstantAttribute.Ctor()
+/// </summary>
+public class CustomConstantAttributector
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Using a derived class to call the protected Ctor method of base class");
+
+ try
+ {
+ TestClass testClass = new TestClass();
+ if (testClass == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "The Constructor did not create a new instance as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ CustomConstantAttributector test = new CustomConstantAttributector();
+
+ TestLibrary.TestFramework.BeginTestCase("CustomConstantAttributector");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+public class TestClass : CustomConstantAttribute
+{
+ public TestClass()
+ : base()
+ {
+ }
+ public override object Value
+ {
+ get { throw new System.Exception("The method or operation is not implemented."); }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/indexernameattribute/IndexerNameAttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/indexernameattribute/IndexerNameAttributeCtor.csproj
new file mode 100644
index 0000000000..63d8fc56ce
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/indexernameattribute/IndexerNameAttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="indexernameattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/indexernameattribute/indexernameattributector.cs b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/indexernameattribute/indexernameattributector.cs
new file mode 100644
index 0000000000..e4792b7ff7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/indexernameattribute/indexernameattributector.cs
@@ -0,0 +1,140 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime;
+
+/// <summary>
+/// System.Runtime.CompilerServices.IndexerNameAttribute.Ctor()
+/// </summary>
+public class IndexerNameAttributeCtor
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ public static int Main()
+ {
+ IndexerNameAttributeCtor atpaCtor = new IndexerNameAttributeCtor();
+ TestLibrary.TestFramework.BeginTestCase("Testing for Method: System.Runtime.CompilerServices.IndexerNameAttribute.Ctor()...");
+
+ if (atpaCtor.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Create a new IndexerNameAttribute instance ... ";
+ const string c_TEST_ID = "P001";
+
+ string c_PROPERTYNAME = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ System.Runtime.CompilerServices.IndexerNameAttribute atpa = new System.Runtime.CompilerServices.IndexerNameAttribute(c_PROPERTYNAME);
+ if (atpa == null)
+ {
+ string errorDesc = "the IndexerNameAttribute ctor error occurred.)";
+ errorDesc += "\n parameter is " + c_PROPERTYNAME;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: the parameter is empty ... ";
+ const string c_TEST_ID = "P002";
+
+ string c_PROPERTYNAME = "";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ System.Runtime.CompilerServices.IndexerNameAttribute atpa = new System.Runtime.CompilerServices.IndexerNameAttribute(c_PROPERTYNAME);
+ if (atpa == null)
+ {
+ string errorDesc = "the IndexerNameAttribute ctor error occurred.)";
+ errorDesc += "\n parameter is empty";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: the parameter is a null reference ... ";
+ const string c_TEST_ID = "P003";
+
+ string c_PROPERTYNAME = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ System.Runtime.CompilerServices.IndexerNameAttribute atpa = new System.Runtime.CompilerServices.IndexerNameAttribute(c_PROPERTYNAME);
+ if (atpa == null)
+ {
+ string errorDesc = "the IndexerNameAttribute ctor error occurred.)";
+ errorDesc += "\n parameter is a null reference";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/internalsvisibletoattribute/IVTAAssemblyName.csproj b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/internalsvisibletoattribute/IVTAAssemblyName.csproj
new file mode 100644
index 0000000000..79bd5c6a0a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/internalsvisibletoattribute/IVTAAssemblyName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="internalsvisibletoattributeassemblyname.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/internalsvisibletoattribute/IVTACtor.csproj b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/internalsvisibletoattribute/IVTACtor.csproj
new file mode 100644
index 0000000000..c83f1d2154
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/internalsvisibletoattribute/IVTACtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="internalsvisibletoattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/internalsvisibletoattribute/internalsvisibletoattributeassemblyname.cs b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/internalsvisibletoattribute/internalsvisibletoattributeassemblyname.cs
new file mode 100644
index 0000000000..57c42b1c0b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/internalsvisibletoattribute/internalsvisibletoattributeassemblyname.cs
@@ -0,0 +1,181 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.CompilerServices;
+
+/// <summary>
+/// InternalsVisibleToAttribute.AssemblyName [v-yaduoj]
+/// </summary>
+public class InternalsVisibleToAttributeAssemblyName
+{
+ public static int Main()
+ {
+ InternalsVisibleToAttributeAssemblyName testObj = new InternalsVisibleToAttributeAssemblyName();
+
+ TestLibrary.TestFramework.BeginTestCase("for property: InternalsVisibleToAttribute.AssemblyName");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: Get a normal friend assembly name.";
+ string errorDesc;
+
+ string assemblyName;
+ string actualFriendAssemblyName;
+ assemblyName = "myTestCase.dll";
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ InternalsVisibleToAttribute internalIsVisibleTo = new InternalsVisibleToAttribute(assemblyName);
+ actualFriendAssemblyName = internalIsVisibleTo.AssemblyName;
+ if (actualFriendAssemblyName != assemblyName)
+ {
+ errorDesc = "The friend assembly name is not the value \"" + assemblyName +
+ "\" as expected, Actually\"" + actualFriendAssemblyName + "\"";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string c_TEST_DESC = "PosTest2: Get a friend assembly name that is an emtpy string.";
+ string errorDesc;
+
+ string assemblyName;
+ string actualFriendAssemblyName;
+ assemblyName = string.Empty;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ InternalsVisibleToAttribute internalIsVisibleTo = new InternalsVisibleToAttribute(assemblyName);
+ actualFriendAssemblyName = internalIsVisibleTo.AssemblyName;
+ if (actualFriendAssemblyName != assemblyName)
+ {
+ errorDesc = "The friend assembly name is not an empty string as expected, Actually\"" +
+ actualFriendAssemblyName + "\"";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ string c_TEST_DESC = "PosTest3: Get a friend assembly name that is a null reference.";
+ string errorDesc;
+
+ string assemblyName;
+ string actualFriendAssemblyName;
+ assemblyName = null;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ InternalsVisibleToAttribute internalIsVisibleTo = new InternalsVisibleToAttribute(assemblyName);
+ actualFriendAssemblyName = internalIsVisibleTo.AssemblyName;
+ if (actualFriendAssemblyName != assemblyName)
+ {
+ errorDesc = "The friend assembly name is not a null reference as expected, Actually\"" +
+ actualFriendAssemblyName + "\"";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P004";
+ string c_TEST_DESC = "PosTest4: Get a friend assembly name containing special characters.";
+ string errorDesc;
+
+ string assemblyName;
+ string actualFriendAssemblyName;
+ assemblyName = "::B:" + System.IO.Path.DirectorySeparatorChar + "\n\v\r\t\0myTestCase.dll";
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ InternalsVisibleToAttribute internalIsVisibleTo = new InternalsVisibleToAttribute(assemblyName);
+ actualFriendAssemblyName = internalIsVisibleTo.AssemblyName;
+ if (actualFriendAssemblyName != assemblyName)
+ {
+ errorDesc = "The friend assembly name is not the value \"" + assemblyName +
+ "\" as expected, Actually\"" + actualFriendAssemblyName + "\"";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/internalsvisibletoattribute/internalsvisibletoattributector.cs b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/internalsvisibletoattribute/internalsvisibletoattributector.cs
new file mode 100644
index 0000000000..a2f9dae938
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/internalsvisibletoattribute/internalsvisibletoattributector.cs
@@ -0,0 +1,74 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.CompilerServices;
+
+/// <summary>
+/// InternalsVisibleToAttribute.Ctor(System.String)
+/// </summary>
+public class InternalsVisibleToAttributeCtor
+{
+ private const string c_ASSEMBLY_NAME = "AssemblyName";
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call the constructor directly");
+
+ try
+ {
+ InternalsVisibleToAttribute internalsVisibleToAttribute = new InternalsVisibleToAttribute(c_ASSEMBLY_NAME);
+ if (internalsVisibleToAttribute == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "The Constructor did not create a new instance as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ InternalsVisibleToAttributeCtor test = new InternalsVisibleToAttributeCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("InternalsVisibleToAttributeCtor");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/methodimploptions/MethodImplOptionsNoInlining.csproj b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/methodimploptions/MethodImplOptionsNoInlining.csproj
new file mode 100644
index 0000000000..fb6bd2d4fa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/methodimploptions/MethodImplOptionsNoInlining.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodimploptionsnoinlining.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/methodimploptions/MethodImplOptionsPreserveSig.csproj b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/methodimploptions/MethodImplOptionsPreserveSig.csproj
new file mode 100644
index 0000000000..fe882bcb7b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/methodimploptions/MethodImplOptionsPreserveSig.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="methodimploptionspreservesig.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/methodimploptions/methodimploptionsnoinlining.cs b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/methodimploptions/methodimploptionsnoinlining.cs
new file mode 100644
index 0000000000..d307378ce4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/methodimploptions/methodimploptionsnoinlining.cs
@@ -0,0 +1,86 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.CompilerServices;
+
+/// <summary>
+/// MethodImplOptions.NoInlining(v-yaduoj)
+/// </summary>
+public class MethodImplOptionsTest
+{
+ private enum MyMethodImplOptions
+ {
+ Unmanaged = System.Reflection.MethodImplAttributes.NoInlining,
+ ForwardRef = System.Reflection.MethodImplAttributes.NoInlining,
+ PreserveSig = System.Reflection.MethodImplAttributes.NoInlining,
+ InternalCall = System.Reflection.MethodImplAttributes.InternalCall,
+ Synchronized = System.Reflection.MethodImplAttributes.Synchronized,
+ NoInlining = System.Reflection.MethodImplAttributes.NoInlining,
+ }
+
+ public static int Main()
+ {
+ MethodImplOptionsTest testObj = new MethodImplOptionsTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: MethodImplOptions.NoInlining");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: method implementation options is NoInlining";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyMethodImplOptions.NoInlining;
+ actualValue = (int)MethodImplOptions.NoInlining;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "NoInlining value of MethodImplOptions is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/methodimploptions/methodimploptionspreservesig.cs b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/methodimploptions/methodimploptionspreservesig.cs
new file mode 100644
index 0000000000..2a437e4f42
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/methodimploptions/methodimploptionspreservesig.cs
@@ -0,0 +1,86 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.CompilerServices;
+
+/// <summary>
+/// MethodImplOptions.PreserveSig(v-yaduoj)
+/// </summary>
+public class MethodImplOptionsTest
+{
+ private enum MyMethodImplOptions
+ {
+ Unmanaged = System.Reflection.MethodImplAttributes.PreserveSig,
+ ForwardRef = System.Reflection.MethodImplAttributes.PreserveSig,
+ PreserveSig = System.Reflection.MethodImplAttributes.PreserveSig,
+ InternalCall = System.Reflection.MethodImplAttributes.InternalCall,
+ Synchronized = System.Reflection.MethodImplAttributes.Synchronized,
+ NoInlining = System.Reflection.MethodImplAttributes.NoInlining,
+ }
+
+ public static int Main()
+ {
+ MethodImplOptionsTest testObj = new MethodImplOptionsTest();
+
+ TestLibrary.TestFramework.BeginTestCase("for Enumeration: MethodImplOptions.PreserveSig");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: method implementation options is PreserveSig";
+ string errorDesc;
+
+ int expectedValue;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedValue = (int)MyMethodImplOptions.PreserveSig;
+ actualValue = (int)MethodImplOptions.PreserveSig;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "PreserveSig value of MethodImplOptions is not the value " + expectedValue +
+ "as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimecompatibilityattribute/RCAttrWrapNEThrows.csproj b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimecompatibilityattribute/RCAttrWrapNEThrows.csproj
new file mode 100644
index 0000000000..456fdca54e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimecompatibilityattribute/RCAttrWrapNEThrows.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="runtimecompatibilityattributewrapnonexceptionthrows.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimecompatibilityattribute/RuntimeCompatAttrCtor.csproj b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimecompatibilityattribute/RuntimeCompatAttrCtor.csproj
new file mode 100644
index 0000000000..448409135c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimecompatibilityattribute/RuntimeCompatAttrCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="runtimecompatibilityattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimecompatibilityattribute/runtimecompatibilityattributector.cs b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimecompatibilityattribute/runtimecompatibilityattributector.cs
new file mode 100644
index 0000000000..44d26b1e6e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimecompatibilityattribute/runtimecompatibilityattributector.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.CompilerServices;
+
+/// <summary>
+/// RuntimeCompatibilityAttribute constructor() [v-yaduoj]
+/// </summary>
+public class RuntimeCompatibilityAttributeCtor
+{
+ public static int Main()
+ {
+ RuntimeCompatibilityAttributeCtor testObj = new RuntimeCompatibilityAttributeCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("for RuntimeCompatibilityAttribute()");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: initialize an instance of type RuntimeCompatibilityAttribute via default constructor";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ RuntimeCompatibilityAttribute runtimeCompaibilityAtt = new RuntimeCompatibilityAttribute();
+ if (null == runtimeCompaibilityAtt)
+ {
+ errorDesc = "Failed to initialize an instance of type RuntimeCompatibilityAttribute via default constructor.";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimecompatibilityattribute/runtimecompatibilityattributewrapnonexceptionthrows.cs b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimecompatibilityattribute/runtimecompatibilityattributewrapnonexceptionthrows.cs
new file mode 100644
index 0000000000..9f33e047d4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimecompatibilityattribute/runtimecompatibilityattributewrapnonexceptionthrows.cs
@@ -0,0 +1,112 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.CompilerServices;
+
+/// <summary>
+/// RuntimeCompatibilityAttribute.WrapNonExceptionThrows [v-yaduoj]
+/// </summary>
+public class RuntimeCompatibilityAttributeWrapNonExceptionThrows
+{
+ public static int Main()
+ {
+ RuntimeCompatibilityAttributeWrapNonExceptionThrows testObj = new RuntimeCompatibilityAttributeWrapNonExceptionThrows();
+
+ TestLibrary.TestFramework.BeginTestCase("for RuntimeCompatibilityAttribute.WrapNonExceptionThrows");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string c_TEST_DESC = "PosTest1: Verify get accessor of property RuntimeCompatibilityAttribute.WrapNonExceptionThrows";
+ string errorDesc;
+
+ bool expectedValue, actualValue;
+ expectedValue = false;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ RuntimeCompatibilityAttribute runtimeCompaibilityAtt = new RuntimeCompatibilityAttribute();
+ actualValue = runtimeCompaibilityAtt.WrapNonExceptionThrows;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The value of property RuntimeCompatibilityAttribute.WrapNonExceptionThrows " +
+ "is not the value " + expectedValue + " as expected, actually(" + actualValue +
+ ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string c_TEST_DESC = "PosTest2: Verify set accessor of property RuntimeCompatibilityAttribute.WrapNonExceptionThrows";
+ string errorDesc;
+
+ bool expectedValue, actualValue;
+ expectedValue = (TestLibrary.Generator.GetInt32(-55) & 1) == 0;
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ RuntimeCompatibilityAttribute runtimeCompaibilityAtt = new RuntimeCompatibilityAttribute();
+ runtimeCompaibilityAtt.WrapNonExceptionThrows = expectedValue;
+ actualValue = runtimeCompaibilityAtt.WrapNonExceptionThrows;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The value of property RuntimeCompatibilityAttribute.WrapNonExceptionThrows " +
+ "is not the value " + expectedValue + " as expected, actually(" + actualValue +
+ ")";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/GetHashCode.csproj b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/GetHashCode.csproj
new file mode 100644
index 0000000000..1297feab3f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/GetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="gethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/PlatformAssembly.csproj b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/PlatformAssembly.csproj
new file mode 100644
index 0000000000..d6e6f2efad
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/PlatformAssembly.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="platformassembly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/UserAssembly.csproj b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/UserAssembly.csproj
new file mode 100644
index 0000000000..9bdd6bc740
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/UserAssembly.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="userassembly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/gethashcode.cs b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/gethashcode.cs
new file mode 100644
index 0000000000..6a84e7f3b0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/gethashcode.cs
@@ -0,0 +1,98 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Security;
+using System.Runtime.CompilerServices;
+using TestLibrary;
+
+#if WINCORESYS
+[assembly: AllowPartiallyTrustedCallers]
+#endif
+// Class has two fields, x and y; we consider two instances to be equal (Equals returns true,
+// and GetHashCode returns the same for both instances) iff x==x and y==y
+class ClassWithEquivalence
+{
+ int x;
+ int y;
+
+ public ClassWithEquivalence(int _x, int _y)
+ {
+ this.x = _x;
+ this.y = _y;
+ }
+
+ public override bool Equals(object b)
+ {
+ ClassWithEquivalence bProper = b as ClassWithEquivalence;
+ if (bProper != null)
+ return (x == bProper.x) && (y == bProper.y);
+ else
+ return false;
+ }
+
+ public override int GetHashCode()
+ {
+ return x.GetHashCode() + y.GetHashCode();
+ }
+}
+public class GetHashCode
+{
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestFramework.BeginScenario("PosTest1: RuntimeHelpers.GetHashCode() on two non-reference-equals objects returns non-equal codes");
+ Object a, b;
+ try
+ {
+ a = new ClassWithEquivalence(10, 20);
+ b = new ClassWithEquivalence(10, 20);
+
+ if (!(a.Equals(b) && (a.GetHashCode() == b.GetHashCode()))
+ || (Object.ReferenceEquals(a, b)))
+ {
+ // Log: setup failed
+ return false;
+ }
+
+ if (RuntimeHelpers.GetHashCode(a) == RuntimeHelpers.GetHashCode(b))
+ {
+ // Log: RTH.GHC should have returned different hash codes since the
+ // objects are not reference-equals.
+ TestFramework.LogError("001", "a and b are not reference equal, and yet RuntimeHelpers.GetHashCode returned same value for each");
+ retVal = false;
+
+ }
+ }
+ catch (Exception e)
+ {
+ TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public static int Main(string[] args)
+ {
+ GetHashCode ghc = new GetHashCode();
+ if (ghc.RunTests())
+ {
+ TestFramework.LogInformation("PASSED");
+ return 100;
+ }
+ else
+ {
+ TestFramework.LogInformation("FAILED");
+ return 99;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/platformassembly.cs b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/platformassembly.cs
new file mode 100644
index 0000000000..300b2423ea
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/platformassembly.cs
@@ -0,0 +1,49 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+// Platform types for RunClassConstructor tests
+
+using System;
+using System.Security;
+
+#if WINCORESYS
+[assembly: AllowPartiallyTrustedCallers]
+#endif
+public class Watcher
+{
+ public static bool f_hasRun = false;
+}
+
+[System.Security.SecurityCritical]
+public class CriticalHasCctor
+{
+
+ public static int x;
+ public static bool hasRun;
+ static CriticalHasCctor() {
+ Console.WriteLine("Diagnostic: inside CriticalHasCctor..cctor");
+ //x = 2;
+ Watcher.f_hasRun = true;
+ }
+}
+
+[System.Security.SecuritySafeCritical]
+public class SafeCriticalHasCctor
+{
+
+ static SafeCriticalHasCctor()
+ {
+ Console.WriteLine("Diagnostic: inside SafeCriticalHasCctor..cctor");
+ Watcher.f_hasRun = true;
+ }
+}
+
+[System.Security.SecuritySafeCritical]
+public class SafeCriticalThrowingCctor
+{
+ static SafeCriticalThrowingCctor()
+ {
+ throw new ArgumentException("I have an argument.");
+ }
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/userassembly.cs b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/userassembly.cs
new file mode 100644
index 0000000000..a56bc0239d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/compilerservices/runtimehelpers/userassembly.cs
@@ -0,0 +1,115 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+// User/transparent types for RunClassConstructor tests
+
+using System;
+using System.Security;
+
+#if WINCORESYS
+[assembly: AllowPartiallyTrustedCallers]
+#endif
+public class Watcher
+{
+ public static bool f_hasRun = false;
+ public static string lastTypeParameter = "";
+}
+
+public class GenericWithCctor<T>
+{
+ //public static string myTypeName =
+ // typeof(T).FullName;
+ static GenericWithCctor()
+ {
+ Watcher.lastTypeParameter = typeof(T).FullName;
+ Watcher.f_hasRun = true;
+ }
+}
+public class NoCctor
+{
+}
+
+public class NestedContainer
+{
+ // "nested public"
+ public class NestedPublicHasCctor {
+ static NestedPublicHasCctor()
+ {
+ Watcher.f_hasRun = true;
+ }
+ }
+
+ // "nested private"
+ private class NestedPrivateHasCctor {
+ static NestedPrivateHasCctor()
+ {
+ Watcher.f_hasRun = true;
+ }
+ }
+
+ // "nested assembly"
+ internal class NestedAssemHasCctor
+ {
+ static NestedAssemHasCctor()
+ {
+ Watcher.f_hasRun = true;
+ }
+ }
+
+ // "nested famorassem"
+ internal protected class NestedFamOrAssemHasCctor
+ {
+ static NestedFamOrAssemHasCctor()
+ {
+ Watcher.f_hasRun = true;
+ }
+ }
+
+}
+class PrivateHasCctor
+{
+ static PrivateHasCctor()
+ {
+ Watcher.f_hasRun = true;
+ }
+}
+
+public class HasCctor
+{
+ static HasCctor()
+ {
+ Watcher.f_hasRun = true;
+ }
+}
+
+public class CriticalCctor
+{
+ [System.Security.SecurityCritical]
+ static CriticalCctor()
+ {
+ Watcher.f_hasRun = true;
+ }
+}
+// base-class of (...); duplicate of HasCctor so we guarantee that it hasn't
+// been initialized when we call its subclass cctor.
+public class BaseWithCctor
+{
+ static BaseWithCctor()
+ {
+ Watcher.f_hasRun = true;
+ }
+}
+
+public class CctorInBase : BaseWithCctor
+{
+
+}
+
+public class ThrowingCctor
+{
+ static ThrowingCctor()
+ {
+ throw new ArgumentException("I have an argument.");
+ }
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/decimalconstantattribute/DecimalConstantAttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/runtime/decimalconstantattribute/DecimalConstantAttributeCtor.csproj
new file mode 100644
index 0000000000..708b7dd808
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/decimalconstantattribute/DecimalConstantAttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalconstantattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/decimalconstantattribute/DecimalConstantAttributeValue.csproj b/tests/src/CoreMangLib/cti/system/runtime/decimalconstantattribute/DecimalConstantAttributeValue.csproj
new file mode 100644
index 0000000000..c786eee7c2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/decimalconstantattribute/DecimalConstantAttributeValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decimalconstantattributevalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/decimalconstantattribute/decimalconstantattributector.cs b/tests/src/CoreMangLib/cti/system/runtime/decimalconstantattribute/decimalconstantattributector.cs
new file mode 100644
index 0000000000..bd99a9f1ce
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/decimalconstantattribute/decimalconstantattributector.cs
@@ -0,0 +1,118 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.CompilerServices;
+
+/// <summary>
+/// ctor(System.Byte,System.Byte,System.UInt32,System.UInt32,System.UInt32)
+/// </summary>
+public class DecimalConstantAttributeCtor
+{
+
+
+ public static int Main(string[] args)
+ {
+ DecimalConstantAttributeCtor DecimalConstantAttributeCtor = new DecimalConstantAttributeCtor();
+ TestLibrary.TestFramework.BeginTestCase("DecimalConstantAttributeCtor");
+
+ if (DecimalConstantAttributeCtor.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Create a new DecimalConstantAttribute instance.");
+
+ try
+ {
+ DecimalConstantAttribute myDAttribute = new DecimalConstantAttribute(0, 0, 0x00000000, 0x00000000, 0x00000000);
+
+ if (myDAttribute == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Occurs error when Construct DecimalConstantAttribute !");
+ retVal = false;
+ }
+
+ myDAttribute = new DecimalConstantAttribute(28, 1, 0x00000000, 0x00000000, 0x00000000);
+
+ if (myDAttribute == null)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Occurs error when Construct DecimalConstantAttribute !");
+ retVal = false;
+ }
+
+ myDAttribute = new DecimalConstantAttribute(28, 0, 0x00000000, 0x00000000, 0x00000001);
+
+ if (myDAttribute == null)
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Occurs error when Construct DecimalConstantAttribute !");
+ retVal = false;
+ }
+
+ myDAttribute = new DecimalConstantAttribute(28, 1, 0x00000000, 0x00000000, 0x00000001);
+
+ if (myDAttribute == null)
+ {
+ TestLibrary.TestFramework.LogError("001.4", "Occurs error when Construct DecimalConstantAttribute !");
+ retVal = false;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: scale > 28.");
+
+ try
+ {
+ DecimalConstantAttribute myDAttribute = new DecimalConstantAttribute(29, 0, 0x00000000, 0x00000000, 0x00000000);
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentOutOfRangeException should be caught.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/decimalconstantattribute/decimalconstantattributevalue.cs b/tests/src/CoreMangLib/cti/system/runtime/decimalconstantattribute/decimalconstantattributevalue.cs
new file mode 100644
index 0000000000..fed9fb97d6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/decimalconstantattribute/decimalconstantattributevalue.cs
@@ -0,0 +1,107 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.CompilerServices;
+
+/// <summary>
+/// Value
+/// </summary>
+public class DecimalConstantAttributeValue
+{
+
+
+ public static int Main(string[] args)
+ {
+ DecimalConstantAttributeValue DecimalConstantAttributeValue = new DecimalConstantAttributeValue();
+ TestLibrary.TestFramework.BeginTestCase("DecimalConstantAttributeValue");
+
+ if (DecimalConstantAttributeValue.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Get the DecimalConstantAttribute Value.");
+
+ try
+ {
+ DecimalConstantAttribute myDAttribute = new DecimalConstantAttribute(0, 0, 0x00000000, 0x00000000, 0x00000000);
+ decimal expectDecimal = 0;
+ if (myDAttribute.Value != expectDecimal)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Occurs error when Construct DecimalConstantAttribute !");
+ retVal = false;
+ }
+
+ myDAttribute = new DecimalConstantAttribute(28, 1, 0x00000000, 0x00000000, 0x00000000);
+ expectDecimal = 0;
+ if (myDAttribute.Value != expectDecimal)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Occurs error when Construct DecimalConstantAttribute,should return " + expectDecimal);
+ retVal = false;
+ }
+
+ myDAttribute = new DecimalConstantAttribute(28, 0, 0x00000000, 0x00000000, 0x00000001);
+ expectDecimal = 1e-28m;
+ if (myDAttribute.Value != expectDecimal)
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Occurs error when Construct DecimalConstantAttribute ,should return " + expectDecimal);
+ retVal = false;
+ }
+
+ myDAttribute = new DecimalConstantAttribute(28, 1, 0x00000000, 0x00000000, 0x00000001);
+ expectDecimal = -(1e-28m);
+ if (myDAttribute.Value != expectDecimal)
+ {
+ TestLibrary.TestFramework.LogError("001.4", "Occurs error when Construct DecimalConstantAttribute ,should return " + expectDecimal);
+ retVal = false;
+ }
+ myDAttribute = new DecimalConstantAttribute(28, 1, 0x00000001, 0x00000001, 0x00000001);
+ expectDecimal = -0.0000000018446744078004518913m;
+ if (myDAttribute.Value != expectDecimal)
+ {
+ TestLibrary.TestFramework.LogError("001.5", "Occurs error when Construct DecimalConstantAttribute ,should return " + expectDecimal);
+ retVal = false;
+ }
+
+ myDAttribute = new DecimalConstantAttribute(28, 100, 0x00000001, 0x00000001, 0x00000001);
+ expectDecimal = -0.0000000018446744078004518913m;
+ if (myDAttribute.Value != expectDecimal)
+ {
+ TestLibrary.TestFramework.LogError("001.6", "Occurs error when Construct DecimalConstantAttribute ,should return " + expectDecimal);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/FixedBufferAttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/FixedBufferAttributeCtor.csproj
new file mode 100644
index 0000000000..248ed5ea87
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/FixedBufferAttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fixedbufferattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/FixedBufferAttributeElementType.csproj b/tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/FixedBufferAttributeElementType.csproj
new file mode 100644
index 0000000000..04e6bc5e72
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/FixedBufferAttributeElementType.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fixedbufferattributeelementtype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/FixedBufferAttributeLength.csproj b/tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/FixedBufferAttributeLength.csproj
new file mode 100644
index 0000000000..6a79b7267d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/FixedBufferAttributeLength.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fixedbufferattributelength.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/fixedbufferattributector.cs b/tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/fixedbufferattributector.cs
new file mode 100644
index 0000000000..28c88d0ebf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/fixedbufferattributector.cs
@@ -0,0 +1,93 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.CompilerServices;
+/// <summary>
+///ctor(System.Type,System.Int32)
+/// </summary>
+public class FixedBufferAttributeCtor
+{
+ #region const
+ int c_LENGTH = 1024;
+ #endregion
+ public static int Main(string[] args)
+ {
+ FixedBufferAttributeCtor FixedBufferAttributeCtor = new FixedBufferAttributeCtor();
+ TestLibrary.TestFramework.BeginTestCase("FixedBufferAttributeCtor");
+
+ if (FixedBufferAttributeCtor.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Create a new FixedBufferAttribute instance.");
+
+ try
+ {
+ retVal = VerificationHelper(typeof(string), c_LENGTH, "001.1") && retVal;
+ retVal = VerificationHelper(typeof(int), c_LENGTH + c_LENGTH, "001.2") && retVal;
+ retVal = VerificationHelper(typeof(object), c_LENGTH * 3, "001.3") && retVal;
+ retVal = VerificationHelper(typeof(object), Int32.MaxValue, "001.4") && retVal;
+ retVal = VerificationHelper(typeof(object), Int32.MinValue, "001.5") && retVal;
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #region private method
+ private bool VerificationHelper(Type elementType, int length, string errorNO)
+ {
+ bool retVal = true;
+ try
+ {
+ FixedBufferAttribute myDAttribute = new FixedBufferAttribute(elementType, length);
+
+ if (myDAttribute == null)
+ {
+ TestLibrary.TestFramework.LogError(errorNO + ".1", "Occurs error when Construct FixedBufferAttribute instance !");
+ retVal = false;
+ }
+ if (myDAttribute.ElementType != elementType || myDAttribute.Length != length)
+ {
+ TestLibrary.TestFramework.LogError(errorNO + ".2", "Construct an error FixedBufferAttribute instance !");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errorNO + ".0", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/fixedbufferattributeelementtype.cs b/tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/fixedbufferattributeelementtype.cs
new file mode 100644
index 0000000000..ca21338970
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/fixedbufferattributeelementtype.cs
@@ -0,0 +1,86 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.CompilerServices;
+/// <summary>
+///ElementType
+/// </summary>
+public class FixedBufferAttributeElementType
+{
+ #region const
+ int c_LENGTH = 1024;
+ #endregion
+ public static int Main(string[] args)
+ {
+ FixedBufferAttributeElementType FixedBufferAttributeElementType = new FixedBufferAttributeElementType();
+ TestLibrary.TestFramework.BeginTestCase("FixedBufferAttributeElementType");
+
+ if (FixedBufferAttributeElementType.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Getting ElementType.");
+
+ try
+ {
+ retVal = VerificationHelper(typeof(string), c_LENGTH,"001.1") && retVal;
+ retVal = VerificationHelper(typeof(int), c_LENGTH + c_LENGTH, "001.2") && retVal;
+ retVal = VerificationHelper(typeof(object), c_LENGTH * 3, "001.3") && retVal;
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #region private method
+ private bool VerificationHelper(Type elementType,int length,string errorNO)
+ {
+ bool retVal = true;
+ try
+ {
+ FixedBufferAttribute myDAttribute = new FixedBufferAttribute(elementType, length);
+
+ if (myDAttribute.ElementType != elementType )
+ {
+ TestLibrary.TestFramework.LogError(errorNO, "Getting ElementType has an error occured");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errorNO+".0", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/fixedbufferattributelength.cs b/tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/fixedbufferattributelength.cs
new file mode 100644
index 0000000000..696c9ca3ce
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/fixedbufferattribute/fixedbufferattributelength.cs
@@ -0,0 +1,88 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.CompilerServices;
+/// <summary>
+///Length
+/// </summary>
+public class FixedBufferAttributeLength
+{
+ #region const
+ int c_LENGTH = 1024;
+ #endregion
+ public static int Main(string[] args)
+ {
+ FixedBufferAttributeLength FixedBufferAttributeLength = new FixedBufferAttributeLength();
+ TestLibrary.TestFramework.BeginTestCase("FixedBufferAttributeLength");
+
+ if (FixedBufferAttributeLength.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Getting Length.");
+
+ try
+ {
+ retVal = VerificationHelper(typeof(string), c_LENGTH, "001.1") && retVal;
+ retVal = VerificationHelper(typeof(int), c_LENGTH + c_LENGTH, "001.2") && retVal;
+ retVal = VerificationHelper(typeof(object), c_LENGTH * 3, "001.3") && retVal;
+ retVal = VerificationHelper(typeof(int), int.MaxValue, "001.4") && retVal;
+ retVal = VerificationHelper(typeof(object), int.MinValue, "001.5") && retVal;
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #region private method
+ private bool VerificationHelper(Type elementType, int length, string errorNO)
+ {
+ bool retVal = true;
+ try
+ {
+ FixedBufferAttribute myDAttribute = new FixedBufferAttribute(elementType, length);
+
+ if (myDAttribute.Length != length)
+ {
+ TestLibrary.TestFramework.LogError(errorNO, "an error occurs when get Length. !");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errorNO + ".0", "Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/callingconvention/CallingConventionWinapi.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/callingconvention/CallingConventionWinapi.csproj
new file mode 100644
index 0000000000..8c11186c8a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/callingconvention/CallingConventionWinapi.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="callingconventionwinapi.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/callingconvention/callingconventionwinapi.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/callingconvention/callingconventionwinapi.cs
new file mode 100644
index 0000000000..dc27528628
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/callingconvention/callingconventionwinapi.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+
+
+///<summary>
+///System.Runtime.InteropServices.CallingConvention.Winapi [v-zuolan]
+///</summary>
+
+public class CallingConventionWinapi
+{
+
+ public static int Main()
+ {
+ CallingConventionWinapi testObj = new CallingConventionWinapi();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.Runtime.InteropServices.CallingConvention.Winapi");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ int expectedValue = 1;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property");
+ try
+ {
+ actualValue = (int)CallingConvention.Winapi;
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/charset/CharSetUnicode.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/charset/CharSetUnicode.csproj
new file mode 100644
index 0000000000..d9e1fc059e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/charset/CharSetUnicode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="charsetunicode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/charset/charsetunicode.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/charset/charsetunicode.cs
new file mode 100644
index 0000000000..f7c26dd1f0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/charset/charsetunicode.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+
+
+///<summary>
+///System.Runtime.InteropServices.CharSet.Unicode [v-zuolan]
+///</summary>
+
+public class CharSetUnicode
+{
+
+ public static int Main()
+ {
+ CharSetUnicode testObj = new CharSetUnicode();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.Runtime.InteropServices.CharSet.Unicode");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ int expectedValue = 3;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:get the property");
+ try
+ {
+ actualValue = (int)CharSet.Unicode;
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/dllimportattribute/DllImportTest.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/dllimportattribute/DllImportTest.csproj
new file mode 100644
index 0000000000..8170b45cce
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/dllimportattribute/DllImportTest.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="dllimporttest.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/dllimportattribute/dllimporttest.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/dllimportattribute/dllimporttest.cs
new file mode 100644
index 0000000000..2d0cd57e1a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/dllimportattribute/dllimporttest.cs
@@ -0,0 +1,23 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+
+/// <summary>
+/// This namespace and class were created for the DllImport CTI tests
+/// </summary>
+namespace DllImportTest
+{
+ /// <summary>
+ /// Simple static class containing a DllImport to be used in CoreMangLib\CTI\System\Runtime\InteropServices\DllImportAttribute tests
+ /// Since the tests aren't actually calling anything referenced by the DllImport, the imported dll and the function can be fake.
+ /// </summary>
+ public static class DllImportTestClass
+ {
+
+ [DllImport("DllFakeImport.dll")]
+ public static extern int BogusFunction();
+
+ }
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/fieldoffsetattribute/FieldOffsetAttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/fieldoffsetattribute/FieldOffsetAttributeCtor.csproj
new file mode 100644
index 0000000000..07e4214721
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/fieldoffsetattribute/FieldOffsetAttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fieldoffsetattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/fieldoffsetattribute/FieldOffsetAttributeValue.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/fieldoffsetattribute/FieldOffsetAttributeValue.csproj
new file mode 100644
index 0000000000..74a0e2aa06
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/fieldoffsetattribute/FieldOffsetAttributeValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="fieldoffsetattributevalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/fieldoffsetattribute/fieldoffsetattributector.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/fieldoffsetattribute/fieldoffsetattributector.cs
new file mode 100644
index 0000000000..3f7d542874
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/fieldoffsetattribute/fieldoffsetattributector.cs
@@ -0,0 +1,124 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// FieldOffsetAttribute.ctor(Int32) [v-minch]
+/// </summary>
+public class FieldOffsetAttributeCtor
+{
+ public static int Main()
+ {
+ FieldOffsetAttributeCtor test = new FieldOffsetAttributeCtor();
+ TestLibrary.TestFramework.BeginTestCase("FieldOffsetAttribute.Ctor");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Initialize a new instance of the FieldOffsetAttribute class with the offset in the structure to the beginning of the field 1");
+ try
+ {
+ int offset = Int32.MaxValue;
+ FieldOffsetAttribute myFieldOffsetAttribute = new FieldOffsetAttribute(offset);
+ if (myFieldOffsetAttribute == null || myFieldOffsetAttribute.Value != offset)
+ {
+ TestLibrary.TestFramework.LogError("001", "the initialized FieldOffsetAttribute ExpectedValue is " + offset + " but the ActualValue is " + myFieldOffsetAttribute.Value.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Initialize a new instance of the FieldOffsetAttribute class with the offset in the structure to the beginning of the field 2");
+ try
+ {
+ int offset = 0;
+ FieldOffsetAttribute myFieldOffsetAttribute = new FieldOffsetAttribute(offset);
+ if (myFieldOffsetAttribute == null || myFieldOffsetAttribute.Value != offset)
+ {
+ TestLibrary.TestFramework.LogError("003", "the initialized FieldOffsetAttribute ExpectedValue is " + offset + " but the ActualValue is " + myFieldOffsetAttribute.Value.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Initialize a new instance of the FieldOffsetAttribute class with the offset in the structure to the beginning of the field 3");
+ try
+ {
+ int offset = TestLibrary.Generator.GetInt32(-55);
+ FieldOffsetAttribute myFieldOffsetAttribute = new FieldOffsetAttribute(offset);
+ if (myFieldOffsetAttribute == null || myFieldOffsetAttribute.Value != offset)
+ {
+ TestLibrary.TestFramework.LogError("005", "the initialized FieldOffsetAttribute ExpectedValue is " + offset + " but the ActualValue is " + myFieldOffsetAttribute.Value.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Initialize a new instance of the FieldOffsetAttribute class with the offset in the structure to the beginning of the field 4");
+ try
+ {
+ int offset = Int32.MinValue;
+ FieldOffsetAttribute myFieldOffsetAttribute = new FieldOffsetAttribute(offset);
+ if (myFieldOffsetAttribute == null || myFieldOffsetAttribute.Value != offset)
+ {
+ TestLibrary.TestFramework.LogError("007", "the initialized FieldOffsetAttribute ExpectedValue is " + offset + " but the ActualValue is " + myFieldOffsetAttribute.Value.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/fieldoffsetattribute/fieldoffsetattributevalue.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/fieldoffsetattribute/fieldoffsetattributevalue.cs
new file mode 100644
index 0000000000..e656946efc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/fieldoffsetattribute/fieldoffsetattributevalue.cs
@@ -0,0 +1,124 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// FieldOffsetAttribute.Value [v-minch]
+/// </summary>
+public class FieldOffsetAttributeValue
+{
+ public static int Main()
+ {
+ FieldOffsetAttributeValue test = new FieldOffsetAttributeValue();
+ TestLibrary.TestFramework.BeginTestCase("FieldOffsetAttribute.Value");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Verify the value of initialized instance of the FieldOffsetAttribute 1");
+ try
+ {
+ int offset = Int32.MaxValue;
+ FieldOffsetAttribute myFieldOffsetAttribute = new FieldOffsetAttribute(offset);
+ if (myFieldOffsetAttribute.Value != offset)
+ {
+ TestLibrary.TestFramework.LogError("001", "the initialized FieldOffsetAttribute ExpectedValue is " + offset + " but the ActualValue is " + myFieldOffsetAttribute.Value.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Verify the value of initialized instance of the FieldOffsetAttribute 2");
+ try
+ {
+ int offset = 0;
+ FieldOffsetAttribute myFieldOffsetAttribute = new FieldOffsetAttribute(offset);
+ if (myFieldOffsetAttribute.Value != offset)
+ {
+ TestLibrary.TestFramework.LogError("003", "the initialized FieldOffsetAttribute ExpectedValue is " + offset + " but the ActualValue is " + myFieldOffsetAttribute.Value.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Verify the value of initialized instance of the FieldOffsetAttribute 3");
+ try
+ {
+ int offset = TestLibrary.Generator.GetInt32(-55);
+ FieldOffsetAttribute myFieldOffsetAttribute = new FieldOffsetAttribute(offset);
+ if (myFieldOffsetAttribute.Value != offset)
+ {
+ TestLibrary.TestFramework.LogError("005", "the initialized FieldOffsetAttribute ExpectedValue is " + offset + " but the ActualValue is " + myFieldOffsetAttribute.Value.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Verify the value of initialized instance of the FieldOffsetAttribute 4");
+ try
+ {
+ int offset = Int32.MinValue;
+ FieldOffsetAttribute myFieldOffsetAttribute = new FieldOffsetAttribute(offset);
+ if (myFieldOffsetAttribute.Value != offset)
+ {
+ TestLibrary.TestFramework.LogError("007", "the initialized FieldOffsetAttribute ExpectedValue is " + offset + " but the ActualValue is " + myFieldOffsetAttribute.Value.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/GCHandleAddrOfPinnedObject_PSC.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/GCHandleAddrOfPinnedObject_PSC.csproj
new file mode 100644
index 0000000000..f14599ca5a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/GCHandleAddrOfPinnedObject_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="gchandleaddrofpinnedobject.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/GCHandleAlloc1_PSC.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/GCHandleAlloc1_PSC.csproj
new file mode 100644
index 0000000000..49b7fe20ca
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/GCHandleAlloc1_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="gchandlealloc1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/GCHandleFree_PSC.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/GCHandleFree_PSC.csproj
new file mode 100644
index 0000000000..6ffd270414
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/GCHandleFree_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="gchandlefree.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/GCHandleTarget_PSC.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/GCHandleTarget_PSC.csproj
new file mode 100644
index 0000000000..12aa8d378b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/GCHandleTarget_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="gchandletarget.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/gchandleaddrofpinnedobject.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/gchandleaddrofpinnedobject.cs
new file mode 100644
index 0000000000..7e2d0e78b0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/gchandleaddrofpinnedobject.cs
@@ -0,0 +1,109 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.Runtime.InteropServices;
+
+
+[SecuritySafeCritical]
+/// <summary>
+/// AddrOfPinnedObject
+/// </summary>
+public class GCHandleAddrOfPinnedObject
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call AddrOfPinnedObject to get address of Pinned object");
+
+ try
+ {
+ GCHandle handle = GCHandle.Alloc(TestLibrary.Generator.GetInt32(-55), GCHandleType.Pinned);
+
+ IntPtr ptr = handle.AddrOfPinnedObject();
+
+ if (ptr == IntPtr.Zero)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Call AddrOfPinnedObject to get address of Pinned object returns NULL");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: InvalidOperationException should be thrown when The handle is any type other than Pinned. ");
+
+ try
+ {
+ GCHandle handle = GCHandle.Alloc(TestLibrary.Generator.GetInt32(-55), GCHandleType.Normal);
+
+ IntPtr ptr = handle.AddrOfPinnedObject();
+
+ TestLibrary.TestFramework.LogError("001.1", "InvalidOperationException is not thrown when The handle is any type other than Pinned. ");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ GCHandleAddrOfPinnedObject test = new GCHandleAddrOfPinnedObject();
+
+ TestLibrary.TestFramework.BeginTestCase("GCHandleAddrOfPinnedObject");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/gchandlealloc1.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/gchandlealloc1.cs
new file mode 100644
index 0000000000..2e0c5ccb1f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/gchandlealloc1.cs
@@ -0,0 +1,168 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.Runtime.InteropServices;
+
+
+[SecuritySafeCritical]
+public class TestNonBittableClass
+{
+ public Object m_Object;
+ public string m_String;
+}
+
+
+[SecuritySafeCritical]
+public class TestBittableClass
+{
+ public int m_TestInt;
+}
+
+/// <summary>
+/// Alloc(System.Object)
+/// </summary>
+
+[SecuritySafeCritical]
+public class GCHandleAlloc1
+{
+ #region Private Fields
+ private const int c_ARRAY_SIZE = 256;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Alloc to alloc memory for a value type instance");
+
+ try
+ {
+ retVal = VerificationHelper(TestLibrary.Generator.GetInt32(-55), "001.1") && retVal;
+ retVal = VerificationHelper(TestLibrary.Generator.GetInt64(-55), "001.2") && retVal;
+ retVal = VerificationHelper(TestLibrary.Generator.GetDouble(-55), "001.3") && retVal;
+ retVal = VerificationHelper(TestLibrary.Generator.GetChar(-55), "001.4") && retVal;
+ retVal = VerificationHelper(TestLibrary.Generator.GetByte(-55), "001.5") && retVal;
+ retVal = VerificationHelper(TestLibrary.Generator.GetSingle(-55), "001.6") && retVal;
+
+ byte[] bytes = new byte[c_ARRAY_SIZE];
+ TestLibrary.Generator.GetBytes(-55, bytes);
+ retVal = VerificationHelper(bytes, "001.7") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Alloc to alloc memory for a class contains value type only instance");
+
+ try
+ {
+ Object obj = new TestBittableClass();
+ retVal = VerificationHelper(obj, "002.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call Alloc to alloc memory for a non blittable type instance");
+
+ try
+ {
+ string randValue = TestLibrary.Generator.GetString(-55, false, 1, c_ARRAY_SIZE);
+ TestNonBittableClass obj = new TestNonBittableClass();
+ obj.m_Object = new Object();
+ obj.m_String = randValue;
+
+ retVal = VerificationHelper(new Object(), "003.1") && retVal;
+ retVal = VerificationHelper(randValue, "003.2") && retVal;
+ retVal = VerificationHelper(obj, "003.3") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ GCHandleAlloc1 test = new GCHandleAlloc1();
+
+ TestLibrary.TestFramework.BeginTestCase("GCHandleAlloc1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+
+ private bool VerificationHelper(object obj, string errorNo)
+ {
+ bool retVal = true;
+
+ GCHandle handle = GCHandle.Alloc(obj);
+ if (!handle.IsAllocated)
+ {
+ TestLibrary.TestFramework.LogError(errorNo, "IsAllocated return false after GCHandle.Alloc is called");
+ retVal = false;
+ }
+
+ handle.Free();
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/gchandlefree.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/gchandlefree.cs
new file mode 100644
index 0000000000..cb428b5117
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/gchandlefree.cs
@@ -0,0 +1,201 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.Runtime.InteropServices;
+
+
+[SecuritySafeCritical]
+public class TestNonBittableClass
+{
+ public Object m_Object;
+ public string m_String;
+}
+
+
+[SecuritySafeCritical]
+public class TestBittableClass
+{
+ public int m_TestInt;
+}
+
+
+/// <summary>
+/// Free
+/// </summary>
+
+[SecuritySafeCritical]
+public class GCHandleFree
+{
+ #region Private Fields
+ private const int c_ARRAY_SIZE = 256;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Free to free allocated handle");
+
+ try
+ {
+ retVal = VerificationHelper(TestLibrary.Generator.GetInt32(-55), "001.1") && retVal;
+ retVal = VerificationHelper(TestLibrary.Generator.GetInt64(-55), "001.2") && retVal;
+ retVal = VerificationHelper(TestLibrary.Generator.GetDouble(-55), "001.3") && retVal;
+ retVal = VerificationHelper(TestLibrary.Generator.GetByte(-55), "001.4") && retVal;
+ retVal = VerificationHelper(TestLibrary.Generator.GetSingle(-55), "001.5") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Free to free allocated handle");
+
+ try
+ {
+ string randValue = TestLibrary.Generator.GetString(-55, false, 1, c_ARRAY_SIZE);
+ TestNonBittableClass obj = new TestNonBittableClass();
+ obj.m_Object = new Object();
+ obj.m_String = randValue;
+
+ retVal = VerificationHelper(new TestBittableClass(), "002.1") && retVal;
+ retVal = VerificationHelper(new Object(), "002.2") && retVal;
+ retVal = VerificationHelper(randValue, "002.3") && retVal;
+ retVal = VerificationHelper(obj, "002.4") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: InvalidOperationException should be thrown when The handle was freed.");
+
+ try
+ {
+ GCHandle handle = GCHandle.Alloc(new Object());
+ handle.Free();
+
+ handle.Free();
+
+ TestLibrary.TestFramework.LogError("101.1", "InvalidOperationException is not thrown when The handle was freed.");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: InvalidOperationException should be thrown when The handle was never initialized.");
+
+ try
+ {
+ GCHandle handle = (GCHandle)IntPtr.Zero;
+ handle.Free();
+
+ TestLibrary.TestFramework.LogError("102.1", "InvalidOperationException is not thrown when The handle was never initialized.");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ GCHandleFree test = new GCHandleFree();
+
+ TestLibrary.TestFramework.BeginTestCase("GCHandleFree");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(object obj, string errorNo)
+ {
+ bool retVal = true;
+
+ GCHandle handle = GCHandle.Alloc(obj);
+ handle.Free();
+
+ if (handle.IsAllocated)
+ {
+ TestLibrary.TestFramework.LogError(errorNo, "IsAllocated return true after GCHandle.Free is called");
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/gchandletarget.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/gchandletarget.cs
new file mode 100644
index 0000000000..76827aad2a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandle/gchandletarget.cs
@@ -0,0 +1,277 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.Runtime.InteropServices;
+
+[SecuritySafeCritical]
+/// <summary>
+/// Target
+/// </summary>
+public class GCHandleTarget
+{
+ #region Private Fields
+ private const int c_SIZE_OF_ARRAY = 256;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Target should return correct object value passed to handle for blittable types");
+
+ try
+ {
+ retVal = VerificationHelper(TestLibrary.Generator.GetByte(-55), "001.1") && retVal;
+ retVal = VerificationHelper(TestLibrary.Generator.GetDouble(-55), "001.2") && retVal;
+ retVal = VerificationHelper(TestLibrary.Generator.GetInt16(-55), "001.3") && retVal;
+ retVal = VerificationHelper(TestLibrary.Generator.GetInt32(-55), "001.4") && retVal;
+ retVal = VerificationHelper(TestLibrary.Generator.GetInt64(-55), "001.5") && retVal;
+ retVal = VerificationHelper(TestLibrary.Generator.GetSingle(-55), "001.6") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Target should return correct object value passed to handle for blittable types");
+
+ try
+ {
+ retVal = VerificationHelper(TestLibrary.Generator.GetChar(-55), "002.1") && retVal;
+ retVal = VerificationHelper(TestLibrary.Generator.GetString(-55, false, 1, c_SIZE_OF_ARRAY), "002.2") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Target should return correct object value passed to handle for blittable types");
+
+ try
+ {
+ byte[] bytes = new byte[c_SIZE_OF_ARRAY];
+ double[] doubles = new double[c_SIZE_OF_ARRAY];
+ short[] shorts = new short[c_SIZE_OF_ARRAY];
+ int[] ints = new int[c_SIZE_OF_ARRAY];
+ long[] longs = new long[c_SIZE_OF_ARRAY];
+ float[] floats = new float[c_SIZE_OF_ARRAY];
+
+ TestLibrary.Generator.GetBytes(-55, bytes);
+ for (int i = 0; i < doubles.Length; ++i)
+ {
+ doubles[i] = TestLibrary.Generator.GetDouble(-55);
+ }
+ for (int i = 0; i < shorts.Length; ++i)
+ {
+ shorts[i] = TestLibrary.Generator.GetInt16(-55);
+ }
+ for (int i = 0; i < ints.Length; ++i)
+ {
+ ints[i] = TestLibrary.Generator.GetInt32(-55);
+ }
+ for (int i = 0; i < longs.Length; ++i)
+ {
+ longs[i] = TestLibrary.Generator.GetInt64(-55);
+ }
+ for (int i = 0; i < floats.Length; ++i)
+ {
+ floats[i] = TestLibrary.Generator.GetSingle(-55);
+ }
+
+ retVal = VerificationHelper<byte>(bytes, "003.1") && retVal;
+ retVal = VerificationHelper<double>(doubles, "003.2") && retVal;
+ retVal = VerificationHelper<short>(shorts, "003.3") && retVal;
+ retVal = VerificationHelper<int>(ints, "003.4") && retVal;
+ retVal = VerificationHelper<long>(longs, "003.5") && retVal;
+ retVal = VerificationHelper<float>(floats, "003.6") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: InvalidOperationException should be thrown when The handle was freed.");
+
+ try
+ {
+ GCHandle handle = GCHandle.Alloc(TestLibrary.Generator.GetInt32(-55));
+ handle.Free();
+
+ object target = handle.Target;
+ TestLibrary.TestFramework.LogError("101.1", "InvalidOperationException is not thrown when The handle was freed.");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: InvalidOperationException should be thrown when The handle was never initialized.");
+
+ try
+ {
+ GCHandle handle = (GCHandle)IntPtr.Zero;
+
+ object target = handle.Target;
+ TestLibrary.TestFramework.LogError("102.1", "InvalidOperationException is not thrown when The handle was never initialized.");
+ retVal = false;
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ GCHandleTarget test = new GCHandleTarget();
+
+ TestLibrary.TestFramework.BeginTestCase("GCHandleTarget");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Method
+ private bool VerificationHelper(object obj, string errorNo)
+ {
+ bool retVal = true;
+
+ GCHandle handle = GCHandle.Alloc(obj);
+
+ if (handle.Target == null)
+ {
+ TestLibrary.TestFramework.LogError(errorNo, "Target returns null for valid GCHandle");
+ retVal = false;
+ }
+ else
+ {
+ if (!obj.Equals(handle.Target))
+ {
+ TestLibrary.TestFramework.LogError(errorNo, "Target returns from valid GCHandle is wrong");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] obj = " + obj + ", handle.Target = " + handle.Target);
+ retVal = false;
+ }
+ }
+ handle.Free();
+
+ return retVal;
+ }
+
+ private bool VerificationHelper<T>(T[] obj, string errorNo)
+ {
+ bool retVal = true;
+
+ GCHandle handle = GCHandle.Alloc(obj);
+
+ T[] actual = handle.Target as T[];
+ if (actual == null)
+ {
+ TestLibrary.TestFramework.LogError(errorNo, "Target returns null for valid GCHandle");
+ retVal = false;
+ }
+ else if (actual.Length != obj.Length)
+ {
+ TestLibrary.TestFramework.LogError(errorNo, "Target returns wrong array for valid GCHandle for object array");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] obj.Length = " + obj.Length + ", actual.Length = " + actual.Length);
+ retVal = false;
+ }
+ else
+ {
+ for (int i = 0; i < obj.Length; ++i)
+ {
+ if (!obj[i].Equals(actual[i]))
+ {
+ TestLibrary.TestFramework.LogError(errorNo, "Target returns from valid GCHandle is wrong");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] obj[i] = " + obj[i] + ", actual[i] = " + actual[i] + ", i = " + i);
+ retVal = false;
+ }
+ }
+ }
+
+ handle.Free();
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/GCHandleTypeNormal.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/GCHandleTypeNormal.csproj
new file mode 100644
index 0000000000..8044a900fa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/GCHandleTypeNormal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="gchandletypenormal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/GCHandleTypePinned.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/GCHandleTypePinned.csproj
new file mode 100644
index 0000000000..6628922b45
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/GCHandleTypePinned.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="gchandletypepinned.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/GCHandleTypeWeak.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/GCHandleTypeWeak.csproj
new file mode 100644
index 0000000000..fcb69d5594
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/GCHandleTypeWeak.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="gchandletypeweak.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/GCHandleTypeWeakTrackResurrection.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/GCHandleTypeWeakTrackResurrection.csproj
new file mode 100644
index 0000000000..fbba32ff72
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/GCHandleTypeWeakTrackResurrection.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="gchandletypeweaktrackresurrection.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/gchandletypenormal.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/gchandletypenormal.cs
new file mode 100644
index 0000000000..aa605f41a8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/gchandletypenormal.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// GCHandleType.Normal [v-minch]
+/// </summary>
+public class GCHandleTypeNormal
+{
+ public static int Main()
+ {
+ GCHandleTypeNormal test = new GCHandleTypeNormal();
+ TestLibrary.TestFramework.BeginTestCase("GCHandleType.Normal");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Verify the Normal in the GCHandleType Enumerator");
+ try
+ {
+ int myVal = (int)GCHandleType.Normal;
+ if (myVal != 2)
+ {
+ TestLibrary.TestFramework.LogError("001", "the Normal in the GCHandleType ExpectResult is 2 but the ActualResult is " + myVal);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/gchandletypepinned.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/gchandletypepinned.cs
new file mode 100644
index 0000000000..7d368ce6a0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/gchandletypepinned.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// GCHandleType.Pinned [v-minch]
+/// </summary>
+public class GCHandleTypePinned
+{
+ public static int Main()
+ {
+ GCHandleTypePinned test = new GCHandleTypePinned();
+ TestLibrary.TestFramework.BeginTestCase("GCHandleType.Pinned");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Verify the Pinned in the GCHandleType Enumerator");
+ try
+ {
+ int myVal = (int)GCHandleType.Pinned;
+ if (myVal != 3)
+ {
+ TestLibrary.TestFramework.LogError("001", "the Pinned in the GCHandleType ExpectResult is 3 but the ActualResult is " + myVal);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/gchandletypeweak.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/gchandletypeweak.cs
new file mode 100644
index 0000000000..3d46f286c3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/gchandletypeweak.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// GCHandleType.Weak [v-minch]
+/// </summary>
+public class GCHandleTypeWeak
+{
+ public static int Main()
+ {
+ GCHandleTypeWeak test = new GCHandleTypeWeak();
+ TestLibrary.TestFramework.BeginTestCase("GCHandleType.Weak");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Verify the Weak in the GCHandleType Enumerator");
+ try
+ {
+ int myVal = (int)GCHandleType.Weak;
+ if (myVal != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "the Weak in the GCHandleType ExpectResult is 0 but the ActualResult is " + myVal);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/gchandletypeweaktrackresurrection.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/gchandletypeweaktrackresurrection.cs
new file mode 100644
index 0000000000..b5e014c0c3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/gchandletype/gchandletypeweaktrackresurrection.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// GCHandleType.WeakTrackResurrection [v-minch]
+/// </summary>
+public class GCHandleTypeWeakTrackResurrection
+{
+ public static int Main()
+ {
+ GCHandleTypeWeakTrackResurrection test = new GCHandleTypeWeakTrackResurrection();
+ TestLibrary.TestFramework.BeginTestCase("GCHandleType.WeakTrackResurrection");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Verify the WeakTrackResurrection in the GCHandleType Enumerator");
+ try
+ {
+ int myVal = (int)GCHandleType.WeakTrackResurrection;
+ if (myVal != 1)
+ {
+ TestLibrary.TestFramework.LogError("001", "the WeakTrackResurrection in the GCHandleType ExpectResult is 1 but the ActualResult is " + myVal);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/inattribute/InAttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/inattribute/InAttributeCtor.csproj
new file mode 100644
index 0000000000..251be617a1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/inattribute/InAttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="inattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/inattribute/inattributector.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/inattribute/inattributector.cs
new file mode 100644
index 0000000000..cbe09ef637
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/inattribute/inattributector.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// InAttribute.ctor()
+/// </summary>
+public class InAttributeCtor
+{
+ public static int Main()
+ {
+ InAttributeCtor test = new InAttributeCtor();
+ TestLibrary.TestFramework.BeginTestCase("InAttribute.Ctor");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Initialize a instance of InAttribute class");
+ try
+ {
+ InAttribute myInAttribute = new InAttribute();
+ if (myInAttribute == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "Initialize the instance of InAttribute not successfully");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/layoutkind/LayoutKindAuto.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/layoutkind/LayoutKindAuto.csproj
new file mode 100644
index 0000000000..521c92e0dd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/layoutkind/LayoutKindAuto.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="layoutkindauto.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/layoutkind/LayoutKindSequential.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/layoutkind/LayoutKindSequential.csproj
new file mode 100644
index 0000000000..012a81c14b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/layoutkind/LayoutKindSequential.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="layoutkindsequential.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/layoutkind/layoutkindauto.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/layoutkind/layoutkindauto.cs
new file mode 100644
index 0000000000..2559837eca
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/layoutkind/layoutkindauto.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// LayoutKind.Auto [v-minch]
+/// </summary>
+public class LayoutKindAuto
+{
+ public static int Main()
+ {
+ LayoutKindAuto test = new LayoutKindAuto();
+ TestLibrary.TestFramework.BeginTestCase("LayoutKind.Auto");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Verify the Auto in the LayoutKind Enumerator");
+ try
+ {
+ int myVal = (int)LayoutKind.Auto;
+ if (myVal != 3)
+ {
+ TestLibrary.TestFramework.LogError("001", "the Auto in the LayoutKind ExpectResult is 3 but the ActualResult is " + myVal);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/layoutkind/layoutkindsequential.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/layoutkind/layoutkindsequential.cs
new file mode 100644
index 0000000000..745fcef7b4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/layoutkind/layoutkindsequential.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// LayoutKind.Sequential [v-minch]
+/// </summary>
+public class LayoutKindSequential
+{
+ public static int Main()
+ {
+ LayoutKindSequential test = new LayoutKindSequential();
+ TestLibrary.TestFramework.BeginTestCase("LayoutKind.Sequential");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Verify the Sequential in the LayoutKind Enumerator");
+ try
+ {
+ int myVal = (int)LayoutKind.Sequential;
+ if (myVal != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "the Sequential in the LayoutKind ExpectResult is 0 but the ActualResult is " + myVal);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/MarshalSizeOf1_PSC.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/MarshalSizeOf1_PSC.csproj
new file mode 100644
index 0000000000..b3e5063c82
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/MarshalSizeOf1_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="marshalsizeof1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/MarshalSizeOf2_PSC.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/MarshalSizeOf2_PSC.csproj
new file mode 100644
index 0000000000..a127ac484c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/MarshalSizeOf2_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="marshalsizeof2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/OleAut32.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/OleAut32.csproj
new file mode 100644
index 0000000000..b1221d3cde
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/OleAut32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="oleaut32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/marshalsizeof1.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/marshalsizeof1.cs
new file mode 100644
index 0000000000..030e767bac
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/marshalsizeof1.cs
@@ -0,0 +1,512 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+using System.Security;
+
+
+[SecuritySafeCritical]
+public struct TestStruct
+{
+ public int TestInt;
+}
+
+
+[SecuritySafeCritical]
+[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
+public struct TestUnicodeStringStruct
+{
+ public string TestString;
+}
+
+
+[SecuritySafeCritical]
+[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+public struct TestAnsiStringStruct
+{
+ public string TestString;
+}
+
+
+[SecuritySafeCritical]
+public struct TestMultiMemberStruct1
+{
+ public double TestDouble;
+ public int TestInt;
+}
+
+
+[SecuritySafeCritical]
+[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
+public struct TestMultiMemberStruct2
+{
+ public int TestInt;
+ public string TestString;
+}
+
+[SecuritySafeCritical]
+public struct TestMultiStructs1
+{
+ public float TestFloat;
+ public TestUnicodeStringStruct TestUnicodeStringStruct;
+}
+
+
+[SecuritySafeCritical]
+public struct TestMultiStructs2
+{
+ public float TestFloat;
+ public TestMultiMemberStruct2 TestMultiMemberStruct2;
+}
+
+
+[SecuritySafeCritical]
+public enum TestEnum
+{
+ ENUM_VALUE1,
+ ENUM_VALUE2
+}
+
+
+[SecuritySafeCritical]
+public struct TestGenericStruct<T>
+{
+ public T TestVal;
+}
+
+/// <summary>
+/// SizeOf(System.Object)
+/// </summary>
+
+[SecuritySafeCritical]
+public class MarshalSizeOf1
+{
+ #region Private Fields
+ private const int c_STRING_MIN_LENGTH = 1;
+ private const int c_STRING_MAX_LENGTH = 1024;
+ #endregion
+
+
+ private int NextHighestMultipleOf(int n, int k)
+ {
+ return k * ((int)Math.Ceiling( ((double)n) / ((double)k)));
+ }
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Get size of an instance of struct contains one field");
+
+ try
+ {
+ TestStruct obj = new TestStruct();
+ obj.TestInt = TestLibrary.Generator.GetInt32(-55);
+ int expectedSize = 4;
+
+ int actualSize = Marshal.SizeOf(obj);
+
+ if (expectedSize != actualSize)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Get size of an instance of struct contains one field returns wrong size");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expectedSize = " + expectedSize + ", actualSize = " + actualSize + ", obj.TestInt = " + obj.TestInt);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Get size of an instance of struct contains unicode string field");
+
+ try
+ {
+ TestUnicodeStringStruct obj = new TestUnicodeStringStruct();
+ string randValue = TestLibrary.Generator.GetString(-55, false, c_STRING_MIN_LENGTH, c_STRING_MAX_LENGTH);
+ obj.TestString = randValue;
+ int expectedSize = IntPtr.Size;
+
+ int actualSize = Marshal.SizeOf(obj);
+
+ if (expectedSize != actualSize)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Get size of an instance of struct contains unicode string field returns wrong size");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expectedSize = " + expectedSize + ", actualSize = " + actualSize + ", randValue = " + randValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Get size of an instance of struct contains ansi string field");
+
+ try
+ {
+ TestAnsiStringStruct obj = new TestAnsiStringStruct();
+ string randValue = TestLibrary.Generator.GetString(-55, false, c_STRING_MIN_LENGTH, c_STRING_MAX_LENGTH);
+ obj.TestString = randValue;
+ int expectedSize = IntPtr.Size;
+
+
+ int actualSize = Marshal.SizeOf(obj);
+
+ if (expectedSize != actualSize)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Get size of an instance of struct contains ansi string field returns wrong size");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expectedSize = " + expectedSize + ", actualSize = " + actualSize + ", randValue = " + randValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Get size of an instance of struct contains multiple fields");
+
+ try
+ {
+ TestMultiMemberStruct1 obj = new TestMultiMemberStruct1();
+ obj.TestInt = TestLibrary.Generator.GetInt32(-55);
+ obj.TestDouble = TestLibrary.Generator.GetDouble(-55);
+ int expectedSize = 16; // sizeof(double) + sizeof(int) + padding
+
+ int actualSize = Marshal.SizeOf(obj);
+
+ if (expectedSize != actualSize)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Get size of an instance of struct contains multiple fields returns wrong size");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expectedSize = " + expectedSize + ", actualSize = " + actualSize + ", obj.TestInt = " + obj.TestInt + ", obj.TestDouble = " + obj.TestDouble);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Get size of an instance of struct contains value type and reference type fields");
+
+ try
+ {
+ TestMultiMemberStruct2 obj = new TestMultiMemberStruct2();
+ obj.TestInt = TestLibrary.Generator.GetInt32(-55);
+ obj.TestString = TestLibrary.Generator.GetString(-55, false, c_STRING_MIN_LENGTH, c_STRING_MAX_LENGTH);
+ int expectedSize = NextHighestMultipleOf(Marshal.SizeOf(typeof(int)) + IntPtr.Size , TestLibrary.Utilities.Is64 ? 8 : 4); // sizeof(object) + sizeof(int)
+
+ int actualSize = Marshal.SizeOf(obj);
+
+ if (expectedSize != actualSize)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "Get size of an instance of struct contains value type and reference type fields returns wrong size");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expectedSize = " + expectedSize + ", actualSize = " + actualSize + ", obj.TestInt = " + obj.TestInt + ", obj.TestString = " + obj.TestString);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Get size of an instance of struct contains nested one field struct");
+
+ try
+ {
+ TestMultiStructs1 obj = new TestMultiStructs1();
+ obj.TestFloat = TestLibrary.Generator.GetSingle(-55);
+ obj.TestUnicodeStringStruct.TestString = TestLibrary.Generator.GetString(-55, false, c_STRING_MIN_LENGTH, c_STRING_MAX_LENGTH);
+ int expectedSize = NextHighestMultipleOf(IntPtr.Size + Marshal.SizeOf(typeof(int)), TestLibrary.Utilities.Is64 ? 8 : 4); // sizeof(string) + sizeof(int)
+ int actualSize = Marshal.SizeOf(obj);
+
+ if (expectedSize != actualSize)
+ {
+ TestLibrary.TestFramework.LogError("006.1", "Get size of an instance of struct contains nested one field struct returns wrong size");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expectedSize = " + expectedSize + ", actualSize = " + actualSize + ", obj.TestFloat = " + obj.TestFloat + ", obj.TestUnicodeStringStruct.TestString = " + obj.TestUnicodeStringStruct.TestString);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Get size of an instance of struct contains nested multiple fields struct");
+
+ try
+ {
+ TestMultiStructs2 obj = new TestMultiStructs2();
+ obj.TestFloat = TestLibrary.Generator.GetSingle(-55);
+ obj.TestMultiMemberStruct2.TestInt = TestLibrary.Generator.GetInt32(-55);
+ obj.TestMultiMemberStruct2.TestString = TestLibrary.Generator.GetString(-55, false, c_STRING_MIN_LENGTH, c_STRING_MAX_LENGTH);
+ int expectedSize = NextHighestMultipleOf(Marshal.SizeOf(typeof(TestMultiMemberStruct2)) + Marshal.SizeOf(typeof(float)),
+ TestLibrary.Utilities.Is64 ? 8 : 4); // sizeof(int) + sizeof(float) + sizeof(string)
+
+ int actualSize = Marshal.SizeOf(obj);
+
+ if (expectedSize != actualSize)
+ {
+ TestLibrary.TestFramework.LogError("007.1", "Get size of an instance of struct contains nested multiple fields struct returns wrong size");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expectedSize = " + expectedSize + ", actualSize = " + actualSize + ", obj.TestFloat = " + obj.TestFloat + ", obj.TestMultiMemberStruct2.TestInt = " + obj.TestMultiMemberStruct2.TestInt + ", obj.TestMultiMemberStruct2.TestString = " + obj.TestMultiMemberStruct2.TestString);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest8: Get size of an instance of value type");
+
+ try
+ {
+ int obj = TestLibrary.Generator.GetInt32(-55);
+ int expectedSize = 4;
+
+ int actualSize = Marshal.SizeOf(obj);
+
+ if (expectedSize != actualSize)
+ {
+ TestLibrary.TestFramework.LogError("008.1", "Get size of an instance of value type returns wrong size");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expectedSize = " + expectedSize + ", actualSize = " + actualSize + ", obj = " + obj);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest9: Get size of an instance of generic struct type");
+
+ try
+ {
+ TestGenericStruct<int> obj = new TestGenericStruct<int>();
+ obj.TestVal = TestLibrary.Generator.GetInt32(-55);
+ int expectedSize = 4;
+ int actualSize = Marshal.SizeOf(obj);
+
+ if (expectedSize != actualSize)
+ {
+ TestLibrary.TestFramework.LogError("009.1", "Get size of an instance of generic struct type returns wrong size");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expectedSize = " + expectedSize + ", actualSize = " + actualSize + ", obj.TestVal = " + obj.TestVal);
+ retVal = false;
+ }
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException should be thrown when The structure parameter is a null reference.");
+
+ try
+ {
+ int size = Marshal.SizeOf(null);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown when The structure parameter is a null reference.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentException should be thrown when the value is a enum type");
+
+ try
+ {
+ TestEnum obj = TestEnum.ENUM_VALUE1;
+ int size = Marshal.SizeOf(obj);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentException is not thrown when the value is a enum type");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentException should be thrown when the value is a reference type");
+
+ try
+ {
+ Object obj = new Object();
+ int size = Marshal.SizeOf(obj);
+
+ TestLibrary.TestFramework.LogError("103.1", "ArgumentException is not thrown when the value is a reference type");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ MarshalSizeOf1 test = new MarshalSizeOf1();
+
+ TestLibrary.TestFramework.BeginTestCase("MarshalSizeOf1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/marshalsizeof2.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/marshalsizeof2.cs
new file mode 100644
index 0000000000..eac0ab60d7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/marshalsizeof2.cs
@@ -0,0 +1,516 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+using System.Security;
+
+
+[SecuritySafeCritical]
+public struct TestStruct
+{
+ public int TestInt;
+}
+
+
+[SecuritySafeCritical]
+[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
+public struct TestUnicodeStringStruct
+{
+ public string TestString;
+}
+
+
+[SecuritySafeCritical]
+[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+public struct TestAnsiStringStruct
+{
+ public string TestString;
+}
+
+
+[SecuritySafeCritical]
+public struct TestMultiMemberStruct1
+{
+ public double TestDouble;
+ public int TestInt;
+}
+
+
+[SecuritySafeCritical]
+[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
+public struct TestMultiMemberStruct2
+{
+ public int TestInt;
+ public string TestString;
+}
+
+
+[SecuritySafeCritical]
+public struct TestMultiStructs1
+{
+ public float TestFloat;
+ public TestUnicodeStringStruct TestUnicodeStringStruct;
+}
+
+
+[SecuritySafeCritical]
+public struct TestMultiStructs2
+{
+ public float TestFloat;
+ public TestMultiMemberStruct2 TestMultiMemberStruct2;
+}
+
+
+[SecuritySafeCritical]
+public enum TestEnum
+{
+ ENUM_VALUE1,
+ ENUM_VALUE2
+}
+
+[SecuritySafeCritical]
+public struct TestGenericStruct<T>
+{
+ public T TestVal;
+}
+
+
+[SecuritySafeCritical]
+public class MarshalSizeOf2
+{
+
+ private int NextHighestMultipleOf(int n, int k)
+ {
+ return k * ((int)Math.Ceiling(((double)n) / ((double)k)));
+ }
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Get size of an instance of struct contains one field");
+
+ try
+ {
+ Type obj = typeof(TestStruct);
+ int expectedSize = 4;
+
+ int actualSize = Marshal.SizeOf(obj);
+
+ if (expectedSize != actualSize)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Get size of an instance of struct contains one field returns wrong size");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expectedSize = " + expectedSize + ", actualSize = " + actualSize + ", obj = " + obj);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Get size of an instance of struct contains unicode string field");
+
+ try
+ {
+ Type obj = typeof(TestUnicodeStringStruct);
+ int expectedSize = IntPtr.Size;
+
+ int actualSize = Marshal.SizeOf(obj);
+
+ if (expectedSize != actualSize)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Get size of an instance of struct contains unicode string field returns wrong size");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expectedSize = " + expectedSize + ", actualSize = " + actualSize + ", obj = " + obj);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Get size of an instance of struct contains ansi string field");
+
+ try
+ {
+ Type obj = typeof(TestAnsiStringStruct);
+ int expectedSize = IntPtr.Size;
+
+ int actualSize = Marshal.SizeOf(obj);
+
+ if (expectedSize != actualSize)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Get size of an instance of struct contains ansi string field returns wrong size");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expectedSize = " + expectedSize + ", actualSize = " + actualSize + ", obj = " + obj);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Get size of an instance of struct contains multiple fields");
+
+ try
+ {
+ Type obj = typeof(TestMultiMemberStruct1);
+ int expectedSize = 16; // sizeof(double) + sizeof(int) + padding
+
+ int actualSize = Marshal.SizeOf(obj);
+
+ if (expectedSize != actualSize)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Get size of an instance of struct contains multiple fields returns wrong size");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expectedSize = " + expectedSize + ", actualSize = " + actualSize + ", obj = " + obj);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Get size of an instance of struct contains value type and reference type fields");
+
+ try
+ {
+ Type obj = typeof(TestMultiMemberStruct2);
+ int expectedSize = NextHighestMultipleOf(IntPtr.Size + Marshal.SizeOf(typeof(int)), TestLibrary.Utilities.Is64 ? 8 : 4); // sizeof(object) + sizeof(int)
+
+ int actualSize = Marshal.SizeOf(obj);
+
+ if (expectedSize != actualSize)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "Get size of an instance of struct contains value type and reference type fields returns wrong size");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expectedSize = " + expectedSize + ", actualSize = " + actualSize + ", obj = " + obj);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Get size of an instance of struct contains nested one field struct");
+
+ try
+ {
+ Type obj = typeof(TestMultiStructs1);
+ int expectedSize = NextHighestMultipleOf(IntPtr.Size + Marshal.SizeOf(typeof(int)), TestLibrary.Utilities.Is64 ? 8 : 4); // sizeof(object) + sizeof(int)
+
+ int actualSize = Marshal.SizeOf(obj);
+
+ if (expectedSize != actualSize)
+ {
+ TestLibrary.TestFramework.LogError("006.1", "Get size of an instance of struct contains nested one field struct returns wrong size");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expectedSize = " + expectedSize + ", actualSize = " + actualSize + ", obj = " + obj);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Get size of an instance of struct contains nested multiple fields struct");
+
+ try
+ {
+ Type obj = typeof(TestMultiStructs2);
+ int expectedSize = NextHighestMultipleOf(Marshal.SizeOf(typeof(TestMultiMemberStruct2)) + Marshal.SizeOf(typeof(float)),
+ TestLibrary.Utilities.Is64 ? 8 : 4); // sizeof(int) + sizeof(float) + sizeof(string)
+ int actualSize = Marshal.SizeOf(obj);
+
+ if (expectedSize != actualSize)
+ {
+ TestLibrary.TestFramework.LogError("007.1", "Get size of an instance of struct contains nested multiple fields struct returns wrong size");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expectedSize = " + expectedSize + ", actualSize = " + actualSize + ", obj = " + obj);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest8: Get size of an instance of value type");
+
+ try
+ {
+ Type obj = typeof(int);
+ int expectedSize = 4;
+
+ int actualSize = Marshal.SizeOf(obj);
+
+ if (expectedSize != actualSize)
+ {
+ TestLibrary.TestFramework.LogError("008.1", "Get size of an instance of value type returns wrong size");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expectedSize = " + expectedSize + ", actualSize = " + actualSize + ", obj = " + obj);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest9: Get size of an instance of generic struct type");
+
+ try
+ {
+ Type obj = typeof(TestGenericStruct<int>);
+ int expectedSize = 4;
+ int actualSize = Marshal.SizeOf(obj);
+
+ if (expectedSize != actualSize)
+ {
+ TestLibrary.TestFramework.LogError("009.1", "Get size of an instance of generic struct type returns wrong size");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] expectedSize = " + expectedSize + ", actualSize = " + actualSize + ", obj = " + obj);
+ retVal = false;
+ }
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException should be thrown when The structure parameter is a null reference.");
+
+ try
+ {
+ int size = Marshal.SizeOf(null);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown when The structure parameter is a null reference.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentException should be thrown when the value is a enum type");
+
+ try
+ {
+ TestEnum obj = TestEnum.ENUM_VALUE1;
+ int size = Marshal.SizeOf(obj);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentException is not thrown when the value is a enum type");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentException should be thrown when the value is a reference type");
+
+ try
+ {
+ Type obj = typeof(Object);
+ int size = Marshal.SizeOf(obj);
+
+ TestLibrary.TestFramework.LogError("103.1", "ArgumentException is not thrown when the value is a reference type");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: ArgumentException should be thrown when the value is a generic type");
+
+ try
+ {
+ Type obj = typeof(TestGenericStruct<>);
+ int size = Marshal.SizeOf(obj);
+
+ TestLibrary.TestFramework.LogError("104.1", "ArgumentException is not thrown when the value is a generic type");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ MarshalSizeOf2 test = new MarshalSizeOf2();
+
+ TestLibrary.TestFramework.BeginTestCase("MarshalSizeOf2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/oleaut32.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/oleaut32.cs
new file mode 100644
index 0000000000..83e1d8ef60
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/oleaut32.cs
@@ -0,0 +1,44 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+
+namespace OleAut32
+{
+ [Guid("22F03340-547D-101B-8E65-08002B2BD119")]
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ public unsafe interface ICreateErrorInfo
+ {
+ void QueryInterface(ref Guid riid, out IntPtr *ppvObject);
+
+ long AddRef();
+
+ long Release();
+
+ void SetGUID(ref Guid rguid);
+
+ void SetSource(string szSource);
+
+ void SetDescription(string szDescription);
+
+ void SetHelpFile(string szHelpFile);
+
+ void SetHelpContext(int dwHelpContext);
+ }
+
+ [Guid("1CF2B120-547D-101B-8E65-08002B2BD119")]
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ public interface IErrorInfo
+ {
+ void GetGUID(IntPtr pGUID);
+
+ void GetSource(ref string pBstrSource);
+
+ void GetDescription(ref string pBstrDescription);
+
+ void GetHelpFile(ref string pBstrHelpFile);
+
+ void GetHelpContext(ref int pdwHelpContext);
+ }
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeArraySubType.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeArraySubType.csproj
new file mode 100644
index 0000000000..d2bcef048f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeArraySubType.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="marshalasattributearraysubtype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeCtor1.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeCtor1.csproj
new file mode 100644
index 0000000000..e8fce67c3b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="marshalasattributector1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeCtor2.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeCtor2.csproj
new file mode 100644
index 0000000000..3f526f4da7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="marshalasattributector2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeMarshalCookie.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeMarshalCookie.csproj
new file mode 100644
index 0000000000..82f260cfe1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeMarshalCookie.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="marshalasattributemarshalcookie.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeMarshalType.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeMarshalType.csproj
new file mode 100644
index 0000000000..3d76da15a6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeMarshalType.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="marshalasattributemarshaltype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeMarshalTypeRef.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeMarshalTypeRef.csproj
new file mode 100644
index 0000000000..2ca16d24b1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeMarshalTypeRef.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="marshalasattributemarshaltyperef.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeSizeConst.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeSizeConst.csproj
new file mode 100644
index 0000000000..eef4687815
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeSizeConst.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="marshalasattributesizeconst.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeSizeParamIndex.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeSizeParamIndex.csproj
new file mode 100644
index 0000000000..82a7b9e88a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeSizeParamIndex.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="marshalasattributesizeparamindex.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeValue.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeValue.csproj
new file mode 100644
index 0000000000..6da49ace85
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/MarshalAsAttributeValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="marshalasattributevalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributearraysubtype.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributearraysubtype.cs
new file mode 100644
index 0000000000..e10fead8f0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributearraysubtype.cs
@@ -0,0 +1,82 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// MarshalAsAttribute.ArraySubType [v-minch]
+/// </summary>
+public class MarshalAsAttributeArraySubType
+{
+ public static int Main()
+ {
+ MarshalAsAttributeArraySubType test = new MarshalAsAttributeArraySubType();
+ TestLibrary.TestFramework.BeginTestCase("MarshalAsAttribute.ArraySubType");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Return the field ArraySubType in MarshalAsAttribute class 1");
+ try
+ {
+ short unmanagedType = Int16.MaxValue;
+ MarshalAsAttribute myMarshalAsAttribute = new MarshalAsAttribute(unmanagedType);
+ UnmanagedType myVal = myMarshalAsAttribute.ArraySubType;
+ if (myVal != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 0 but the ActualResult is " + myVal.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Return the field ArraySubType in MarshalAsAttribute class 2");
+ try
+ {
+ MarshalAsAttribute myMarshalAsAttribute = new MarshalAsAttribute(UnmanagedType.ByValArray| UnmanagedType.LPArray);
+ UnmanagedType myVal = myMarshalAsAttribute.ArraySubType;
+ if (myVal != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is 0 but the ActualResult is " + myVal.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributector1.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributector1.cs
new file mode 100644
index 0000000000..0c04f597ac
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributector1.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// MarshalAsAttribute.ctor(Int16) [v-minch]
+/// </summary>
+public class MarshalAsAttributeCtor1
+{
+ public static int Main()
+ {
+ MarshalAsAttributeCtor1 test = new MarshalAsAttributeCtor1();
+ TestLibrary.TestFramework.BeginTestCase("MarshalAsAttribute.ctor(Int16)");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Initialize a instance of MarshalAsAttribute Class 1");
+ try
+ {
+ short unmanagedType = Int16.MaxValue;
+ MarshalAsAttribute myMarshalAsAttribute = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute == null || myMarshalAsAttribute.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("001", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute.Value.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Initialize a instance of MarshalAsAttribute Class 2");
+ try
+ {
+ short unmanagedType = Int16.MinValue;
+ MarshalAsAttribute myMarshalAsAttribute = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute == null || myMarshalAsAttribute.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("003", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute.Value.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Initialize a instance of MarshalAsAttribute Class 3");
+ try
+ {
+ short unmanagedType = TestLibrary.Generator.GetInt16(-55);
+ MarshalAsAttribute myMarshalAsAttribute = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute == null || myMarshalAsAttribute.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("005", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute.Value.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributector2.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributector2.cs
new file mode 100644
index 0000000000..99b5e90729
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributector2.cs
@@ -0,0 +1,334 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// MarshalAsAttribute.ctor(UnmanagedType) [v-minch]
+/// </summary>
+public class MarshalAsAttributeCtor2
+{
+ public static int Main()
+ {
+ MarshalAsAttributeCtor2 test = new MarshalAsAttributeCtor2();
+ TestLibrary.TestFramework.BeginTestCase("MarshalAsAttribute.ctor(UnmanagedType)");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Initialize a instance of MarshalAsAttribute Class 1");
+ try
+ {
+ for (int i = 2; i <= 12; i++)
+ {
+ UnmanagedType unmanagedType = (UnmanagedType)i;
+ #region Switch
+ switch (unmanagedType)
+ {
+ case UnmanagedType.Bool:
+ MarshalAsAttribute myMarshalAsAttribute1 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute1 == null || myMarshalAsAttribute1.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute1.Value.ToString());
+ retVal = false;
+ }
+ break;
+ case UnmanagedType.I1:
+ MarshalAsAttribute myMarshalAsAttribute2 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute2 == null || myMarshalAsAttribute2.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute2.Value.ToString());
+ retVal = false;
+ }
+ break;
+ case UnmanagedType.U1:
+ MarshalAsAttribute myMarshalAsAttribute3 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute3 == null || myMarshalAsAttribute3.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("001.3", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute3.Value.ToString());
+ retVal = false;
+ }
+ break;
+ case UnmanagedType.I2:
+ MarshalAsAttribute myMarshalAsAttribute4 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute4 == null || myMarshalAsAttribute4.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("001.4", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute4.Value.ToString());
+ retVal = false;
+ }
+ break;
+ case UnmanagedType.U2:
+ MarshalAsAttribute myMarshalAsAttribute5 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute5 == null || myMarshalAsAttribute5.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("001.5", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute5.Value.ToString());
+ retVal = false;
+ }
+ break;
+ case UnmanagedType.I4:
+ MarshalAsAttribute myMarshalAsAttribute6 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute6 == null || myMarshalAsAttribute6.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("001.6", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute6.Value.ToString());
+ retVal = false;
+ }
+ break;
+ case UnmanagedType.U4:
+ MarshalAsAttribute myMarshalAsAttribute7 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute7 == null || myMarshalAsAttribute7.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("001.7", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute7.Value.ToString());
+ retVal = false;
+ }
+ break;
+ case UnmanagedType.I8:
+ MarshalAsAttribute myMarshalAsAttribute8 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute8 == null || myMarshalAsAttribute8.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("001.8", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute8.Value.ToString());
+ retVal = false;
+ }
+ break;
+ case UnmanagedType.U8:
+ MarshalAsAttribute myMarshalAsAttribute9 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute9 == null || myMarshalAsAttribute9.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("001.9", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute9.Value.ToString());
+ retVal = false;
+ }
+ break;
+ case UnmanagedType.R4:
+ MarshalAsAttribute myMarshalAsAttribute10 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute10 == null || myMarshalAsAttribute10.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("001.10", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute10.Value.ToString());
+ retVal = false;
+ }
+ break;
+ case UnmanagedType.R8:
+ MarshalAsAttribute myMarshalAsAttribute11 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute11 == null || myMarshalAsAttribute11.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("001.11", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute11.Value.ToString());
+ retVal = false;
+ }
+ break;
+ }
+ #endregion
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Initialize a instance of MarshalAsAttribute Class 2");
+ try
+ {
+ for (int i = 19; i <= 23; i++)
+ {
+ UnmanagedType unmanagedType = (UnmanagedType)i;
+ #region Switch
+ switch (unmanagedType)
+ {
+
+ case UnmanagedType.LPStr:
+ MarshalAsAttribute myMarshalAsAttribute2 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute2 == null || myMarshalAsAttribute2.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute2.Value.ToString());
+ retVal = false;
+ }
+ break;
+ case UnmanagedType.LPWStr:
+ MarshalAsAttribute myMarshalAsAttribute3 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute3 == null || myMarshalAsAttribute3.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("003.3", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute3.Value.ToString());
+ retVal = false;
+ }
+ break;
+ case UnmanagedType.LPTStr:
+ MarshalAsAttribute myMarshalAsAttribute4 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute4 == null || myMarshalAsAttribute4.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("003.4", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute4.Value.ToString());
+ retVal = false;
+ }
+ break;
+ case UnmanagedType.ByValTStr:
+ MarshalAsAttribute myMarshalAsAttribute5 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute5 == null || myMarshalAsAttribute5.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("003.5", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute5.Value.ToString());
+ retVal = false;
+ }
+ break;
+ }
+ #endregion
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Initialize a instance of MarshalAsAttribute Class 3");
+ try
+ {
+ for (int i = 25; i <= 38; i++)
+ {
+ UnmanagedType unmanagedType = (UnmanagedType)i;
+ #region Switch
+ switch (unmanagedType)
+ {
+ case UnmanagedType.IUnknown:
+ MarshalAsAttribute myMarshalAsAttribute6 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute6 == null || myMarshalAsAttribute6.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute6.Value.ToString());
+ retVal = false;
+ }
+ break;
+ case UnmanagedType.Struct:
+ MarshalAsAttribute myMarshalAsAttribute8 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute8 == null || myMarshalAsAttribute8.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("005.3", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute8.Value.ToString());
+ retVal = false;
+ }
+ break;
+ case UnmanagedType.ByValArray:
+ MarshalAsAttribute myMarshalAsAttribute11 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute11 == null || myMarshalAsAttribute11.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("005.6", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute11.Value.ToString());
+ retVal = false;
+ }
+ break;
+ case UnmanagedType.SysInt:
+ MarshalAsAttribute myMarshalAsAttribute12 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute12 == null || myMarshalAsAttribute12.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("005.7", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute12.Value.ToString());
+ retVal = false;
+ }
+ break;
+ case UnmanagedType.SysUInt:
+ MarshalAsAttribute myMarshalAsAttribute13 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute13 == null || myMarshalAsAttribute13.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("005.8", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute13.Value.ToString());
+ retVal = false;
+ }
+ break;
+ case UnmanagedType.FunctionPtr:
+ MarshalAsAttribute myMarshalAsAttribute18 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute18 == null || myMarshalAsAttribute18.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("005.13", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute18.Value.ToString());
+ retVal = false;
+ }
+ break;
+ }
+ #endregion
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Initialize a instance of MarshalAsAttribute Class 4");
+ try
+ {
+ for (int i = 40; i <= 45; i++)
+ {
+ UnmanagedType unmanagedType = (UnmanagedType)i;
+ #region Switch
+ switch (unmanagedType)
+ {
+ case UnmanagedType.AsAny:
+ MarshalAsAttribute myMarshalAsAttribute1 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute1 == null || myMarshalAsAttribute1.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("007.1", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute1.Value.ToString());
+ retVal = false;
+ }
+ break;
+ case UnmanagedType.LPArray:
+ MarshalAsAttribute myMarshalAsAttribute2 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute2 == null || myMarshalAsAttribute2.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("007.2", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute2.Value.ToString());
+ retVal = false;
+ }
+ break;
+ case UnmanagedType.LPStruct:
+ MarshalAsAttribute myMarshalAsAttribute3 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute3 == null || myMarshalAsAttribute3.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("007.3", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute3.Value.ToString());
+ retVal = false;
+ }
+ break;
+ case UnmanagedType.Error:
+ MarshalAsAttribute myMarshalAsAttribute5 = new MarshalAsAttribute(unmanagedType);
+ if (myMarshalAsAttribute5 == null || myMarshalAsAttribute5.Value != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("007.4", "the intance should not be null and its value ExpectResult is " + ((UnmanagedType)unmanagedType).ToString() + " but the ActualResult is " + myMarshalAsAttribute5.Value.ToString());
+ retVal = false;
+ }
+ break;
+ }
+ #endregion
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributemarshalcookie.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributemarshalcookie.cs
new file mode 100644
index 0000000000..777472047e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributemarshalcookie.cs
@@ -0,0 +1,82 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// MarshalAsAttribute.MarshalCookie [v-minch]
+/// </summary>
+public class MarshalAsAttributeMarshalCookie
+{
+ public static int Main()
+ {
+ MarshalAsAttributeMarshalCookie test = new MarshalAsAttributeMarshalCookie();
+ TestLibrary.TestFramework.BeginTestCase("MarshalAsAttribute.MarshalCookie");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Return the field MarshalCookie in MarshalAsAttribute class 1");
+ try
+ {
+ short unmanagedType = Int16.MaxValue;
+ MarshalAsAttribute myMarshalAsAttribute = new MarshalAsAttribute(unmanagedType);
+ string myMarshalCookie = myMarshalAsAttribute.MarshalCookie;
+ if (myMarshalCookie != null)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is null but the ActualResult is " + myMarshalCookie );
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Return the field MarshalCookie in MarshalAsAttribute class 2");
+ try
+ {
+ MarshalAsAttribute myMarshalAsAttribute = new MarshalAsAttribute(UnmanagedType.ByValArray | UnmanagedType.LPArray);
+ string myMarshalCookie = myMarshalAsAttribute.MarshalCookie;
+ if (myMarshalCookie != null)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is null but the ActualResult is " + myMarshalCookie );
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributemarshaltype.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributemarshaltype.cs
new file mode 100644
index 0000000000..9b13c53322
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributemarshaltype.cs
@@ -0,0 +1,82 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// MarshalAsAttribute.MarshalType [v-minch]
+/// </summary>
+public class MarshalAsAttributeMarshalType
+{
+ public static int Main()
+ {
+ MarshalAsAttributeMarshalType test = new MarshalAsAttributeMarshalType();
+ TestLibrary.TestFramework.BeginTestCase("MarshalAsAttribute.MarshalType");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Return the field MarshalType in MarshalAsAttribute class 1");
+ try
+ {
+ short unmanagedType = Int16.MaxValue;
+ MarshalAsAttribute myMarshalAsAttribute = new MarshalAsAttribute(unmanagedType);
+ string myMarshalType = myMarshalAsAttribute.MarshalType;
+ if (myMarshalType != null)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is null but the ActualResult is " + myMarshalType);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Return the field MarshalType in MarshalAsAttribute class 2");
+ try
+ {
+ MarshalAsAttribute myMarshalAsAttribute = new MarshalAsAttribute(UnmanagedType.Currency);
+ string myMarshalType = myMarshalAsAttribute.MarshalType;
+ if (myMarshalType != null)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is null but the ActualResult is " + myMarshalType);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributemarshaltyperef.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributemarshaltyperef.cs
new file mode 100644
index 0000000000..23b42338bd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributemarshaltyperef.cs
@@ -0,0 +1,82 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// MarshalAsAttribute.MarshalTypeRef [v-minch]
+/// </summary>
+public class MarshalAsAttributeMarshalTypeRef
+{
+ public static int Main()
+ {
+ MarshalAsAttributeMarshalTypeRef test = new MarshalAsAttributeMarshalTypeRef();
+ TestLibrary.TestFramework.BeginTestCase("MarshalAsAttribute.MarshalTypeRef");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Return the field MarshalTypeRef in MarshalAsAttribute class 1");
+ try
+ {
+ short unmanagedType = Int16.MaxValue;
+ MarshalAsAttribute myMarshalAsAttribute = new MarshalAsAttribute(unmanagedType);
+ Type myMarshalTypeRef = myMarshalAsAttribute.MarshalTypeRef;
+ if (myMarshalTypeRef != null)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is null but the ActualResult is " + myMarshalTypeRef.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Return the field MarshalTypeRef in MarshalAsAttribute class 2");
+ try
+ {
+ MarshalAsAttribute myMarshalAsAttribute = new MarshalAsAttribute(UnmanagedType.Bool);
+ Type myMarshalTypeRef = myMarshalAsAttribute.MarshalTypeRef;
+ if (myMarshalTypeRef != null)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is null but the ActualResult is " + myMarshalTypeRef.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributesizeconst.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributesizeconst.cs
new file mode 100644
index 0000000000..35c621417a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributesizeconst.cs
@@ -0,0 +1,82 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// MarshalAsAttribute.SizeConst [v-minch]
+/// </summary>
+public class MarshalAsAttributeSizeConst
+{
+ public static int Main()
+ {
+ MarshalAsAttributeSizeConst test = new MarshalAsAttributeSizeConst();
+ TestLibrary.TestFramework.BeginTestCase("MarshalAsAttribute.SizeConst");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Return the field SizeConst in MarshalAsAttribute class 1");
+ try
+ {
+ short unmanagedType = Int16.MaxValue;
+ MarshalAsAttribute myMarshalAsAttribute = new MarshalAsAttribute(unmanagedType);
+ int mySizeConst = myMarshalAsAttribute.SizeConst;
+ if (mySizeConst != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 0 but the ActualResult is " + mySizeConst);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Return the field SizeConst in MarshalAsAttribute class 2");
+ try
+ {
+ MarshalAsAttribute myMarshalAsAttribute = new MarshalAsAttribute(UnmanagedType.Currency);
+ int mySizeConst = myMarshalAsAttribute.SizeConst;
+ if (mySizeConst != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is 0 but the ActualResult is " + mySizeConst);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributesizeparamindex.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributesizeparamindex.cs
new file mode 100644
index 0000000000..591f26876b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributesizeparamindex.cs
@@ -0,0 +1,82 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// MarshalAsAttribute.SizeParamIndex [v-minch]
+/// </summary>
+public class MarshalAsAttributeSizeParamIndex
+{
+ public static int Main()
+ {
+ MarshalAsAttributeSizeParamIndex test = new MarshalAsAttributeSizeParamIndex();
+ TestLibrary.TestFramework.BeginTestCase("MarshalAsAttribute.SizeParamIndex");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Return the field SizeParamIndex in MarshalAsAttribute class 1");
+ try
+ {
+ short unmanagedType = Int16.MaxValue;
+ MarshalAsAttribute myMarshalAsAttribute = new MarshalAsAttribute(unmanagedType);
+ short mySizeParamIndex = myMarshalAsAttribute.SizeParamIndex;
+ if (mySizeParamIndex != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 0 but the ActualResult is " + mySizeParamIndex);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Return the field SizeParamIndex in MarshalAsAttribute class 2");
+ try
+ {
+ MarshalAsAttribute myMarshalAsAttribute = new MarshalAsAttribute(UnmanagedType.Currency);
+ short mySizeParamIndex = myMarshalAsAttribute.SizeParamIndex;
+ if (mySizeParamIndex != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is 0 but the ActualResult is " + mySizeParamIndex);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributevalue.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributevalue.cs
new file mode 100644
index 0000000000..79296b3af3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributevalue.cs
@@ -0,0 +1,82 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// MarshalAsAttribute.Value [v-minch]
+/// </summary>
+public class MarshalAsAttributeValue
+{
+ public static int Main()
+ {
+ MarshalAsAttributeValue test = new MarshalAsAttributeValue();
+ TestLibrary.TestFramework.BeginTestCase("MarshalAsAttribute.Value");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Return the property Value in MarshalAsAttribute class 1");
+ try
+ {
+ short unmanagedType = Int16.MaxValue;
+ MarshalAsAttribute myMarshalAsAttribute = new MarshalAsAttribute(unmanagedType);
+ UnmanagedType myValue = myMarshalAsAttribute.Value;
+ if (myValue != (UnmanagedType)unmanagedType)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is "+ unmanagedType.ToString() +" but the ActualResult is " + myValue.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Return the property Value in MarshalAsAttribute class 2");
+ try
+ {
+ MarshalAsAttribute myMarshalAsAttribute = new MarshalAsAttribute(UnmanagedType.Currency);
+ UnmanagedType myValue = myMarshalAsAttribute.Value;
+ if (myValue != UnmanagedType.Currency)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is " + UnmanagedType.Currency.ToString() +" but the ActualResult is " + myValue.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/outattribute/OutAttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/outattribute/OutAttributeCtor.csproj
new file mode 100644
index 0000000000..c89544690c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/outattribute/OutAttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="outattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/outattribute/outattributector.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/outattribute/outattributector.cs
new file mode 100644
index 0000000000..973d249f2f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/outattribute/outattributector.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// OutAttribute.ctor() [v-minch]
+/// </summary>
+public class OutAttributeCtor
+{
+ public static int Main()
+ {
+ OutAttributeCtor test = new OutAttributeCtor();
+ TestLibrary.TestFramework.BeginTestCase("OutAttribute.ctor()");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Initialize a instance of OutAttribute class");
+ try
+ {
+ OutAttribute myInstance = new OutAttribute();
+ if (myInstance == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "the instance of OutAttribute creating failed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/preservesigattribute/PreserveSigAttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/preservesigattribute/PreserveSigAttributeCtor.csproj
new file mode 100644
index 0000000000..e05b67a3f3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/preservesigattribute/PreserveSigAttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="preservesigattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/preservesigattribute/preservesigattributector.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/preservesigattribute/preservesigattributector.cs
new file mode 100644
index 0000000000..ec3f578b56
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/preservesigattribute/preservesigattributector.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// PreserveSigAttribute.ctor() [v-minch]
+/// </summary>
+public class PreserveSigAttributeCtor
+{
+ public static int Main()
+ {
+ PreserveSigAttributeCtor test = new PreserveSigAttributeCtor();
+ TestLibrary.TestFramework.BeginTestCase("PreserveSigAttribute.ctor()");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Initialize a instance of PreserveSigAttribute class");
+ try
+ {
+ PreserveSigAttribute myInstance = new PreserveSigAttribute();
+ if (myInstance == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "the instance of PreserveSigAttribute creating failed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleCtor_cti_PSC.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleCtor_cti_PSC.csproj
new file mode 100644
index 0000000000..35230c5d95
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleCtor_cti_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="safehandlector_cti.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleDangerousAddRef_PSC.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleDangerousAddRef_PSC.csproj
new file mode 100644
index 0000000000..156b16be64
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleDangerousAddRef_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="safehandledangerousaddref.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleDangerousGetHandle_PSC.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleDangerousGetHandle_PSC.csproj
new file mode 100644
index 0000000000..4852153d36
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleDangerousGetHandle_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="safehandledangerousgethandle.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleDangerousRelease_PSC.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleDangerousRelease_PSC.csproj
new file mode 100644
index 0000000000..9fc0565b1d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleDangerousRelease_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="safehandledangerousrelease.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleDispose1_PSC.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleDispose1_PSC.csproj
new file mode 100644
index 0000000000..36c271d5a7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleDispose1_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="safehandledispose1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleDispose2_PSC.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleDispose2_PSC.csproj
new file mode 100644
index 0000000000..d1e50f17e5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleDispose2_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="safehandledispose2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleHandle_PSC.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleHandle_PSC.csproj
new file mode 100644
index 0000000000..e2a020ae5f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleHandle_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="safehandlehandle.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleIsClosed_PSC.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleIsClosed_PSC.csproj
new file mode 100644
index 0000000000..0b3a7f9be3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleIsClosed_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="safehandleisclosed.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleIsInvalid_PSC.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleIsInvalid_PSC.csproj
new file mode 100644
index 0000000000..8c4dca60ec
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleIsInvalid_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="safehandleisinvalid.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleSetHandleAsInvalid_PSC.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleSetHandleAsInvalid_PSC.csproj
new file mode 100644
index 0000000000..943958f4e8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleSetHandleAsInvalid_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="safehandlesethandleasinvalid.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleSetHandle_PSC.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleSetHandle_PSC.csproj
new file mode 100644
index 0000000000..010b4a6a8b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/SafeHandleSetHandle_PSC.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="safehandlesethandle.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandlector_cti.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandlector_cti.cs
new file mode 100644
index 0000000000..23505f5faf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandlector_cti.cs
@@ -0,0 +1,149 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.Runtime.InteropServices;
+
+
+
+[SecurityCritical]
+public class MySafeHandle : SafeHandle
+{
+ public IntPtr Handle
+ {
+ get
+ {
+ return handle;
+ }
+ }
+
+ [SecurityCritical]
+ public MySafeHandle()
+ : base(IntPtr.Zero, true)
+ {
+ }
+
+ [SecurityCritical]
+ public MySafeHandle(IntPtr handleValue)
+ : base(handleValue, true)
+ {
+ }
+
+ public override bool IsInvalid
+ {
+ [SecurityCritical]
+ get { return false; }
+ }
+
+ [SecurityCritical]
+ protected override bool ReleaseHandle()
+ {
+ return true;
+ }
+}
+
+/// <summary>
+/// ctor(System.IntPtr,System.Boolean)
+/// </summary>
+public class SafeHandleCtor
+{
+ #region Public Methods
+
+ [SecuritySafeCritical]
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+
+ [SecuritySafeCritical]
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify ctor can set correct handle value");
+
+ try
+ {
+ MySafeHandle msf = new MySafeHandle();
+
+ if (msf.Handle != IntPtr.Zero)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Ctor can not set correct handle value");
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] msf.Handle = " + msf.Handle.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [SecuritySafeCritical]
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify ctor can set correct handle value for constructor with parameters");
+
+ try
+ {
+ IntPtr ptr = new IntPtr(TestLibrary.Generator.GetInt32(-55));
+ MySafeHandle msf = new MySafeHandle(ptr);
+
+ if (msf.Handle != ptr)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Ctor can not set correct handle value");
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] msf.Handle = " + msf.Handle.ToString() +
+ ", desiredValue = " + ptr.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+
+ [SecuritySafeCritical]
+ public static int Main()
+ {
+ SafeHandleCtor test = new SafeHandleCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("SafeHandleCtor");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandledangerousaddref.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandledangerousaddref.cs
new file mode 100644
index 0000000000..aaaed3c4b8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandledangerousaddref.cs
@@ -0,0 +1,229 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.Runtime.InteropServices; // For SafeHandle
+
+
+[SecurityCritical]
+public class MySafeValidHandle : SafeHandle
+{
+ [SecurityCritical]
+ public MySafeValidHandle()
+ : base(IntPtr.Zero, true)
+ {
+ }
+
+ public override bool IsInvalid
+ {
+ [SecurityCritical]
+ get { return false; }
+ }
+
+ [SecurityCritical]
+ protected override bool ReleaseHandle()
+ {
+ return true;
+ }
+}
+
+
+
+[SecurityCritical]
+public class MySafeInValidHandle : SafeHandle
+{
+
+
+[SecurityCritical]
+ public MySafeInValidHandle()
+ : base(IntPtr.Zero, true)
+ {
+ }
+
+ public override bool IsInvalid
+ {
+ [SecurityCritical]
+ get { return true; }
+ }
+
+ [SecurityCritical]
+ protected override bool ReleaseHandle()
+ {
+ return true;
+ }
+}
+
+/// <summary>
+/// DangerousAddRef(System.Boolean@)
+/// </summary>
+public class SafeHandleDangerousAddRef
+{
+ #region Public Methods
+
+ [SecuritySafeCritical]
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+
+ [SecuritySafeCritical]
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call DangerousAddRef on a valid handle");
+
+ try
+ {
+ SafeHandle handle = new MySafeValidHandle();
+ bool success = false;
+
+ handle.DangerousAddRef(ref success);
+ if (!success)
+ {
+ TestLibrary.TestFramework.LogInformation("success returns false after calling DangerousAddRef");
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [SecuritySafeCritical]
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call DangerousAddRef on an invalid handle");
+
+ try
+ {
+ SafeHandle handle = new MySafeInValidHandle();
+ bool success = false;
+
+ handle.DangerousAddRef(ref success);
+ if (!success)
+ {
+ TestLibrary.TestFramework.LogInformation("success returns false after calling DangerousAddRef");
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [SecuritySafeCritical]
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call DangerousAddRef twice on a valid handle");
+
+ try
+ {
+ SafeHandle handle = new MySafeValidHandle();
+ bool success = false;
+
+ handle.DangerousAddRef(ref success);
+ if (!success)
+ {
+ TestLibrary.TestFramework.LogInformation("success returns false after calling DangerousAddRef");
+ }
+ handle.DangerousAddRef(ref success);
+ if (!success)
+ {
+ TestLibrary.TestFramework.LogInformation("success returns false after calling DangerousAddRef");
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [SecuritySafeCritical]
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call DangerousAddRef twice on an invalid handle");
+
+ try
+ {
+ SafeHandle handle = new MySafeInValidHandle();
+ bool success = false;
+
+ handle.DangerousAddRef(ref success);
+ if (!success)
+ {
+ TestLibrary.TestFramework.LogInformation("success returns false after calling DangerousAddRef");
+ }
+
+ handle.DangerousAddRef(ref success);
+ if (!success)
+ {
+ TestLibrary.TestFramework.LogInformation("success returns false after calling DangerousAddRef");
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+
+ [SecuritySafeCritical]
+ public static int Main()
+ {
+ SafeHandleDangerousAddRef test = new SafeHandleDangerousAddRef();
+
+ TestLibrary.TestFramework.BeginTestCase("SafeHandleDangerousAddRef");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandledangerousgethandle.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandledangerousgethandle.cs
new file mode 100644
index 0000000000..61d1c4f9e5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandledangerousgethandle.cs
@@ -0,0 +1,272 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.Runtime.InteropServices; // For SafeHandle
+
+[SecurityCritical]
+public class MySafeValidHandle : SafeHandle
+{
+[SecurityCritical]
+ public MySafeValidHandle()
+ : base(IntPtr.Zero, true)
+ {
+ }
+
+ public MySafeValidHandle(IntPtr handleValue)
+ : base(IntPtr.Zero, true)
+ {
+ handle = handleValue;
+ }
+
+ public override bool IsInvalid
+ {
+ [SecurityCritical]
+ get { return false; }
+ }
+
+ [SecurityCritical]
+ protected override bool ReleaseHandle()
+ {
+ return true;
+ }
+}
+
+[SecurityCritical]
+public class MySafeInValidHandle : SafeHandle
+{
+[SecurityCritical]
+ public MySafeInValidHandle()
+ : base(IntPtr.Zero, true)
+ {
+ }
+
+ public MySafeInValidHandle(IntPtr handleValue)
+ : base(IntPtr.Zero, true)
+ {
+ handle = handleValue;
+ }
+
+ public override bool IsInvalid
+ {
+ [SecurityCritical]
+ get { return true; }
+ }
+
+ [SecurityCritical]
+ protected override bool ReleaseHandle()
+ {
+ return true;
+ }
+}
+
+/// <summary>
+/// DangerousGetHandle
+/// </summary>
+public class SafeHandleDangerousGetHandle
+{
+ #region Public Methods
+
+
+ [SecuritySafeCritical]
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+
+
+ [SecuritySafeCritical]
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: DangerousGetHandle should return handle value for valid safe handle");
+
+ try
+ {
+ SafeHandle handle = new MySafeValidHandle();
+ IntPtr handleValue = handle.DangerousGetHandle();
+
+ if (handleValue != IntPtr.Zero)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "DangerousGetHandle returns wrong handle value for valid safe handle");
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] handleValue = " + handleValue.ToString() + ", desiredValue = IntPtr.Zero");
+ retVal = false;
+ }
+
+ // Get it twice
+ handleValue = handle.DangerousGetHandle();
+
+ if (handleValue != IntPtr.Zero)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "DangerousGetHandle returns wrong handle value for valid safe handle");
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] handleValue = " + handleValue.ToString() + ", desiredValue = IntPtr.Zero");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [SecuritySafeCritical]
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: DangerousGetHandle should return handle value for valid safe handle");
+
+ try
+ {
+ int randValue = TestLibrary.Generator.GetInt32(-55);
+ IntPtr desiredValue = new IntPtr(randValue);
+ SafeHandle handle = new MySafeValidHandle(desiredValue);
+ IntPtr handleValue = handle.DangerousGetHandle();
+
+ if (handleValue != desiredValue)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "DangerousGetHandle returns wrong handle value for valid safe handle");
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] handleValue = " + handleValue.ToString() + ", desiredValue = " + desiredValue.ToString());
+ retVal = false;
+ }
+
+ handleValue = handle.DangerousGetHandle();
+
+ if (handleValue != desiredValue)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "DangerousGetHandle returns wrong handle value for valid safe handle");
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] handleValue = " + handleValue.ToString() + ", desiredValue = " + desiredValue.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [SecuritySafeCritical]
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: DangerousGetHandle should return handle value for invalid safe handle");
+
+ try
+ {
+ SafeHandle handle = new MySafeInValidHandle();
+ IntPtr handleValue = handle.DangerousGetHandle();
+
+ if (handleValue != IntPtr.Zero)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "DangerousGetHandle returns wrong handle value for invalid safe handle");
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] handleValue = " + handleValue.ToString() + ", desiredValue = IntPtr.Zero");
+ retVal = false;
+ }
+
+ handleValue = handle.DangerousGetHandle();
+
+ if (handleValue != IntPtr.Zero)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "DangerousGetHandle returns wrong handle value for invalid safe handle");
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] handleValue = " + handleValue.ToString() + ", desiredValue = IntPtr.Zero");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [SecuritySafeCritical]
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: DangerousGetHandle should return handle value for valid safe handle");
+
+ try
+ {
+ int randValue = TestLibrary.Generator.GetInt32(-55);
+ IntPtr desiredValue = new IntPtr(randValue);
+ SafeHandle handle = new MySafeInValidHandle(desiredValue);
+ IntPtr handleValue = handle.DangerousGetHandle();
+
+ if (handleValue != desiredValue)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "DangerousGetHandle returns wrong handle value for valid safe handle");
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] handleValue = " + handleValue.ToString() + ", desiredValue = " + desiredValue.ToString());
+ retVal = false;
+ }
+
+ handleValue = handle.DangerousGetHandle();
+
+ if (handleValue != desiredValue)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "DangerousGetHandle returns wrong handle value for valid safe handle");
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] handleValue = " + handleValue.ToString() + ", desiredValue = " + desiredValue.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+
+ [SecuritySafeCritical]
+ public static int Main()
+ {
+ SafeHandleDangerousGetHandle test = new SafeHandleDangerousGetHandle();
+
+ TestLibrary.TestFramework.BeginTestCase("SafeHandleDangerousGetHandle");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandledangerousrelease.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandledangerousrelease.cs
new file mode 100644
index 0000000000..7aff6ba66f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandledangerousrelease.cs
@@ -0,0 +1,398 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.Runtime.InteropServices; // For SafeHandle
+
+/// <summary>
+/// DangerousRelease
+/// </summary>
+[SecurityCritical]
+public class MySafeValidHandle : SafeHandle
+{
+ public MySafeValidHandle()
+ : base(IntPtr.Zero, true)
+ {
+ }
+
+ public MySafeValidHandle(IntPtr handleValue)
+ : base(IntPtr.Zero, true)
+ {
+ handle = handleValue;
+ }
+
+ public override bool IsInvalid
+ {
+ [SecurityCritical]
+ get { return false; }
+ }
+
+ [SecurityCritical]
+ protected override bool ReleaseHandle()
+ {
+ return true;
+ }
+}
+
+[SecurityCritical]
+public class MySafeInValidHandle : SafeHandle
+{
+ public MySafeInValidHandle()
+ : base(IntPtr.Zero, true)
+ {
+ }
+
+ public MySafeInValidHandle(IntPtr handleValue)
+ : base(IntPtr.Zero, true)
+ {
+ handle = handleValue;
+ }
+
+ public override bool IsInvalid
+ {
+ [SecurityCritical]
+ get { return true; }
+ }
+
+ [SecurityCritical]
+ protected override bool ReleaseHandle()
+ {
+ return true;
+ }
+}
+
+public class SafeHandleDangerousRelease
+{
+ #region Public Methods
+
+ [SecuritySafeCritical]
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+
+ [SecuritySafeCritical]
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call DangerousRelease after call DangerousAddRef for valid handle");
+
+ try
+ {
+ SafeHandle handle = new MySafeValidHandle();
+ bool success = false;
+
+ handle.DangerousAddRef(ref success);
+ if (!success)
+ {
+ TestLibrary.TestFramework.LogInformation("WARNING: Calling DangerousAddRef returns false");
+ }
+
+ handle.DangerousRelease();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [SecuritySafeCritical]
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ int randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call DangerousRelease after call DangerousAddRef for valid handle");
+
+ try
+ {
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ SafeHandle handle = new MySafeValidHandle(new IntPtr(randValue));
+ bool success = false;
+
+ handle.DangerousAddRef(ref success);
+ if (!success)
+ {
+ TestLibrary.TestFramework.LogInformation("WARNING: Calling DangerousAddRef returns false");
+ }
+
+ handle.DangerousRelease();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] randValue = " + randValue.ToString());
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [SecuritySafeCritical]
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call DangerousRelease after call DangerousAddRef for invalid handle");
+
+ try
+ {
+ SafeHandle handle = new MySafeInValidHandle();
+ bool success = false;
+
+ handle.DangerousAddRef(ref success);
+ if (!success)
+ {
+ TestLibrary.TestFramework.LogInformation("WARNING: Calling DangerousAddRef returns false");
+ }
+
+ handle.DangerousRelease();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [SecuritySafeCritical]
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ int randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call DangerousRelease after call DangerousAddRef for invalid handle");
+
+ try
+ {
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ SafeHandle handle = new MySafeInValidHandle(new IntPtr(randValue));
+ bool success = false;
+
+ handle.DangerousAddRef(ref success);
+ if (!success)
+ {
+ TestLibrary.TestFramework.LogInformation("WARNING: Calling DangerousAddRef returns false");
+ }
+
+ handle.DangerousRelease();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] randValue = " + randValue.ToString());
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [SecuritySafeCritical]
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ int randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Call DangerousAddRef after call DangerousRelease for valid handle");
+
+ try
+ {
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ SafeHandle handle = new MySafeValidHandle(new IntPtr(randValue));
+ bool success = false;
+
+ handle.DangerousAddRef(ref success);
+ if (!success)
+ {
+ TestLibrary.TestFramework.LogInformation("WARNING: Calling DangerousAddRef returns false");
+ }
+
+ handle.DangerousRelease();
+
+ handle.DangerousAddRef(ref success);
+ if (!success)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "Calling DangerousAddRef returns false after calling DangerousRelease");
+ }
+
+ handle.DangerousRelease();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] randValue = " + randValue.ToString());
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [SecuritySafeCritical]
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ int randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Call DangerousAddRef after call DangerousRelease for invalid handle");
+
+ try
+ {
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ SafeHandle handle = new MySafeInValidHandle(new IntPtr(randValue));
+ bool success = false;
+
+ handle.DangerousAddRef(ref success);
+ if (!success)
+ {
+ TestLibrary.TestFramework.LogInformation("WARNING: Calling DangerousAddRef returns false");
+ }
+
+ handle.DangerousRelease();
+
+ handle.DangerousAddRef(ref success);
+ if (!success)
+ {
+ TestLibrary.TestFramework.LogError("006.1", "Calling DangerousAddRef returns false after calling DangerousRelease");
+ }
+
+ handle.DangerousRelease();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] randValue = " + randValue.ToString());
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ // The following two test case will cause a ObjectDispose exception occurs during process unload
+
+ [SecuritySafeCritical]
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ int randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Call DangerousRelease without call DangerousAddRef");
+
+ try
+ {
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ SafeHandle handle = new MySafeValidHandle(new IntPtr(randValue));
+
+ // if this object gets finalized it will throw an exception on the finalizer thread
+ GC.SuppressFinalize(handle);
+
+ handle.DangerousRelease();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] randValue = " + randValue.ToString());
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [SecuritySafeCritical]
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ int randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Call DangerousRelease twice with one call DangerousAddRef for valid handle");
+
+ try
+ {
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ SafeHandle handle = new MySafeValidHandle(new IntPtr(randValue));
+ bool success = false;
+
+ // if this object gets finalized it will throw an exception on the finalizer thread
+ GC.SuppressFinalize(handle);
+
+ handle.DangerousAddRef(ref success);
+ if (!success)
+ {
+ TestLibrary.TestFramework.LogInformation("WARNING: Calling DangerousAddRef returns false");
+ }
+
+ handle.DangerousRelease();
+ handle.DangerousRelease();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] randValue = " + randValue.ToString());
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+
+ [SecuritySafeCritical]
+ public static int Main()
+ {
+ SafeHandleDangerousRelease test = new SafeHandleDangerousRelease();
+
+ TestLibrary.TestFramework.BeginTestCase("SafeHandleDangerousRelease");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandledispose1.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandledispose1.cs
new file mode 100644
index 0000000000..e187d7be10
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandledispose1.cs
@@ -0,0 +1,238 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.Runtime.InteropServices; // For SafeHanlde
+
+
+
+[SecurityCritical]
+public class MySafeValidHandle : SafeHandle
+{
+ public MySafeValidHandle()
+ : base(IntPtr.Zero, true)
+ {
+ }
+
+ public MySafeValidHandle(IntPtr handleValue)
+ : base(IntPtr.Zero, true)
+ {
+ handle = handleValue;
+ }
+
+ public override bool IsInvalid
+ {
+ [SecurityCritical]
+ get { return false; }
+ }
+
+ [SecurityCritical]
+ protected override bool ReleaseHandle()
+ {
+ return true;
+ }
+}
+
+[SecurityCritical]
+public class MySafeInValidHandle : SafeHandle
+{
+ public MySafeInValidHandle()
+ : base(IntPtr.Zero, true)
+ {
+ }
+
+ public MySafeInValidHandle(IntPtr handleValue)
+ : base(IntPtr.Zero, true)
+ {
+ handle = handleValue;
+ }
+
+ public override bool IsInvalid
+ {
+ [SecurityCritical]
+ get { return true; }
+ }
+
+ [SecurityCritical]
+ protected override bool ReleaseHandle()
+ {
+ return true;
+ }
+}
+
+/// <summary>
+/// Dispose
+/// </summary>
+public class SafeHandleDispose1
+{
+ #region Public Methods
+
+ [SecuritySafeCritical]
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+
+ [SecuritySafeCritical]
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ int randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: call Dispose on valid SafeHandle instance");
+
+ try
+ {
+ SafeHandle handle = new MySafeValidHandle();
+ handle.Dispose();
+
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ handle = new MySafeValidHandle(new IntPtr(randValue));
+ handle.Dispose();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] randValue = " + randValue);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [SecuritySafeCritical]
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ int randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: call Dispose on an invalid SafeHandle instance");
+
+ try
+ {
+ SafeHandle handle = new MySafeInValidHandle();
+ handle.Dispose();
+
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ handle = new MySafeInValidHandle(new IntPtr(randValue));
+ handle.Dispose();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] randValue = " + randValue);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [SecuritySafeCritical]
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ int randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: call Dispose through IDispose interface");
+
+ try
+ {
+ SafeHandle handle = new MySafeInValidHandle();
+ IDisposable idisp = handle as IDisposable;
+ idisp.Dispose();
+
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ handle = new MySafeInValidHandle(new IntPtr(randValue));
+ idisp = handle as IDisposable;
+ idisp.Dispose();
+
+ handle = new MySafeValidHandle();
+ idisp = handle as IDisposable;
+ idisp.Dispose();
+
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ handle = new MySafeValidHandle(new IntPtr(randValue));
+ idisp = handle as IDisposable;
+ idisp.Dispose();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] randValue = " + randValue);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+
+ [SecuritySafeCritical]
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ int randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Call Dispose twice");
+
+ try
+ {
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ SafeHandle handle = new MySafeValidHandle(new IntPtr(randValue));
+ handle.Dispose();
+ handle.Dispose();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] randValue = " + randValue);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+
+ [SecuritySafeCritical]
+ public static int Main()
+ {
+ SafeHandleDispose1 test = new SafeHandleDispose1();
+
+ TestLibrary.TestFramework.BeginTestCase("SafeHandleDispose1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandledispose2.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandledispose2.cs
new file mode 100644
index 0000000000..7e3fe959ac
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandledispose2.cs
@@ -0,0 +1,361 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.Runtime.InteropServices; // For SafeHandle
+
+
+[SecurityCritical]
+public class MySafeValidHandle : SafeHandle
+{
+[SecurityCritical]
+ public MySafeValidHandle()
+ : base(IntPtr.Zero, true)
+ {
+ }
+
+ public MySafeValidHandle(IntPtr handleValue)
+ : base(IntPtr.Zero, true)
+ {
+ handle = handleValue;
+ }
+
+ public override bool IsInvalid
+ {
+ [SecurityCritical]
+ get { return false; }
+ }
+
+ public void DisposeWrap(bool dispose)
+ {
+ Dispose(dispose);
+ }
+
+ [SecurityCritical]
+ protected override bool ReleaseHandle()
+ {
+ return true;
+ }
+}
+
+[SecurityCritical]
+public class MySafeInValidHandle : SafeHandle
+{
+[SecurityCritical]
+ public MySafeInValidHandle()
+ : base(IntPtr.Zero, true)
+ {
+ }
+
+ public MySafeInValidHandle(IntPtr handleValue)
+ : base(IntPtr.Zero, true)
+ {
+ handle = handleValue;
+ }
+
+ public override bool IsInvalid
+ {
+ [SecurityCritical]
+ get { return true; }
+ }
+
+ public void DisposeWrap(bool dispose)
+ {
+ Dispose(dispose);
+ }
+
+ [SecurityCritical]
+ protected override bool ReleaseHandle()
+ {
+ return true;
+ }
+}
+
+/// <summary>
+/// Dispose(System.Boolean)
+/// </summary>
+public class SafeHandleDispose2
+{
+ #region Public Methods
+
+
+ [SecuritySafeCritical]
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+
+
+ [SecuritySafeCritical]
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ int randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: call Dispose on valid SafeHandle instance");
+
+ try
+ {
+ MySafeValidHandle handle = new MySafeValidHandle();
+ handle.DisposeWrap(true);
+
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ handle = new MySafeValidHandle(new IntPtr(randValue));
+ handle.DisposeWrap(true);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] randValue = " + randValue);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+
+ [SecuritySafeCritical]
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ int randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: call Dispose on an invalid SafeHandle instance");
+
+ try
+ {
+ MySafeInValidHandle handle = new MySafeInValidHandle();
+ handle.DisposeWrap(true);
+
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ handle = new MySafeInValidHandle(new IntPtr(randValue));
+ handle.DisposeWrap(true);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] randValue = " + randValue);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+
+ [SecuritySafeCritical]
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ int randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: call Dispose on valid SafeHandle instance with false");
+
+ try
+ {
+ MySafeValidHandle handle = new MySafeValidHandle();
+ handle.DisposeWrap(false);
+
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ handle = new MySafeValidHandle(new IntPtr(randValue));
+ handle.DisposeWrap(false);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] randValue = " + randValue);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+
+ [SecuritySafeCritical]
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ int randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: call Dispose on an invalid SafeHandle instance with false");
+
+ try
+ {
+ MySafeInValidHandle handle = new MySafeInValidHandle();
+ handle.DisposeWrap(false);
+
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ handle = new MySafeInValidHandle(new IntPtr(randValue));
+ handle.DisposeWrap(false);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] randValue = " + randValue);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative Test Cases
+
+
+ [SecuritySafeCritical]
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ int randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Call Dispose twice");
+
+ try
+ {
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ MySafeValidHandle handle = new MySafeValidHandle(new IntPtr(randValue));
+ handle.DisposeWrap(true);
+ handle.DisposeWrap(false);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] randValue = " + randValue);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+
+ [SecuritySafeCritical]
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ int randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Call Dispose twice");
+
+ try
+ {
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ MySafeValidHandle handle = new MySafeValidHandle(new IntPtr(randValue));
+ handle.DisposeWrap(false);
+ handle.DisposeWrap(true);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] randValue = " + randValue);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [SecuritySafeCritical]
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ int randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Call Dispose twice");
+
+ try
+ {
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ MySafeValidHandle handle = new MySafeValidHandle(new IntPtr(randValue));
+ handle.DisposeWrap(true);
+ handle.DisposeWrap(true);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] randValue = " + randValue);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+
+ [SecuritySafeCritical]
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ int randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Call Dispose twice");
+
+ try
+ {
+ randValue = TestLibrary.Generator.GetInt32(-55);
+ MySafeValidHandle handle = new MySafeValidHandle(new IntPtr(randValue));
+ handle.DisposeWrap(false);
+ handle.DisposeWrap(false);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING: [LOCAL VARIABLES] randValue = " + randValue);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+
+
+ [SecuritySafeCritical]
+ public static int Main()
+ {
+ SafeHandleDispose2 test = new SafeHandleDispose2();
+
+ TestLibrary.TestFramework.BeginTestCase("SafeHandleDispose2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandlehandle.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandlehandle.cs
new file mode 100644
index 0000000000..d1747ff63b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandlehandle.cs
@@ -0,0 +1,148 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.Runtime.InteropServices; // For SafeHandle
+
+
+[SecurityCritical]
+public class MySafeHandle : SafeHandle
+{
+ [SecurityCritical]
+ public MySafeHandle()
+ : base(IntPtr.Zero, true)
+ {
+ if (handle != IntPtr.Zero)
+ {
+ throw new Exception("Handle value is not IntPtr.Zero, Handle = " + handle.ToString());
+ }
+ }
+
+ public MySafeHandle(IntPtr handleValue)
+ : base(IntPtr.Zero, true)
+ {
+ handle = handleValue;
+ if (handle != handleValue)
+ {
+ throw new Exception("Handle value is not assigned correctly, handleValue = " + handleValue + ", Handle = " + handle.ToString());
+ }
+ }
+
+ public override bool IsInvalid
+ {
+ [SecurityCritical]
+ get { return false; }
+ }
+
+ [SecurityCritical]
+ protected override bool ReleaseHandle()
+ {
+ return true;
+ }
+}
+
+/// <summary>
+/// handle
+/// </summary>
+public class SafeHandleHandle
+{
+ #region Public Methods
+
+ [SecuritySafeCritical]
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+
+ [SecuritySafeCritical]
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify the handle is a protected value");
+
+ try
+ {
+ MySafeHandle msf = new MySafeHandle();
+
+ if (null == msf)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Failed to allocate a new safe handle instance");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [SecuritySafeCritical]
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify the handle is a protected value, and can set a value");
+
+ try
+ {
+ int randValue = TestLibrary.Generator.GetInt32(-55);
+ IntPtr value = new IntPtr(randValue);
+ MySafeHandle msf = new MySafeHandle(value);
+
+ if (null == msf)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Failed to allocate a new safe handle instance");
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] randValue = " + randValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #endregion
+
+ [SecuritySafeCritical]
+ public static int Main()
+ {
+ SafeHandleHandle test = new SafeHandleHandle();
+
+ TestLibrary.TestFramework.BeginTestCase("SafeHandleHandle");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandleisclosed.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandleisclosed.cs
new file mode 100644
index 0000000000..e00ad59b49
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandleisclosed.cs
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.Runtime.InteropServices; // For SafeHandle
+
+[assembly: SecurityCritical]
+
+/// <summary>
+///IsClosed
+/// </summary>
+public class SafeHandleIsClosed
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check IsClosed return true when SetHandleAsInvalid method is called ");
+ try
+ {
+ MySafeHandle msh = new MySafeHandle();
+ IntPtr myIptr = new IntPtr(1000);
+ msh.MySetHandle(myIptr);
+ msh.SetHandleAsInvalid();
+ if (!msh.IsClosed )
+ {
+ TestLibrary.TestFramework.LogError("001.1", "IsClosed should return true");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check IsClosed return false when SetHandleAsInvalid method is not called and don't excute any close handle operation ");
+ try
+ {
+ MySafeHandle msh = new MySafeHandle();
+ IntPtr myIptr = new IntPtr(1000);
+ msh.MySetHandle(myIptr);
+ if (msh.IsClosed)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "IsClosed should return false ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ SafeHandleIsClosed test = new SafeHandleIsClosed();
+
+ TestLibrary.TestFramework.BeginTestCase("SafeHandleIsClosed");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
+public class MySafeHandle : SafeHandle
+{
+ public MySafeHandle()
+ : base(IntPtr.Zero, true)
+ {
+ this.handle = new IntPtr(100);
+ }
+ bool InvalidValue = true;
+ public override bool IsInvalid
+ {
+ [SecurityCritical]
+ get { return InvalidValue; }
+
+ }
+ public bool MyReleaseInvoke()
+ {
+ return ReleaseHandle();
+ }
+ public void MySetHandle(IntPtr iptr)
+ {
+ this.SetHandle(iptr);
+ }
+ public IntPtr GetHandle()
+ {
+ return this.handle;
+ }
+ [DllImport("kernel32")]
+ private static extern bool CloseHandle(IntPtr handle);
+
+ [SecurityCritical]
+ protected override bool ReleaseHandle()
+ {
+ if (handle == IntPtr.Zero) return true;
+ this.SetHandle(IntPtr.Zero);
+ return true;
+ }
+ public bool CheckHandleIsRelease()
+ {
+ if (handle != IntPtr.Zero)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandleisinvalid.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandleisinvalid.cs
new file mode 100644
index 0000000000..e19bfa7aa9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandleisinvalid.cs
@@ -0,0 +1,170 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.Runtime.InteropServices; // For SafeHandle
+
+
+/// <summary>
+///IsInvalid
+/// </summary>
+public class SafeHandleIsInvalid
+{
+ #region Public Methods
+
+ [SecuritySafeCritical]
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+
+ [SecuritySafeCritical]
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check IsInvalid return true . ");
+ try
+ {
+ MySafeHandle msh = new MySafeHandle();
+ IntPtr myIptr = new IntPtr(1000);
+ msh.MySetHandle(myIptr);
+
+ if (!msh.IsInvalid)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "IsInvalid should return true");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [SecuritySafeCritical]
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check IsInvalid return false when the handle value is Released. ");
+ try
+ {
+ MySafeHandle msh = new MySafeHandle();
+ IntPtr myIptr = new IntPtr(1000);
+ msh.MySetHandle(myIptr);
+ msh.MyReleaseInvoke();
+ if (msh.IsInvalid)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "IsInvalid should return false ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #endregion
+
+
+ [SecuritySafeCritical]
+ public static int Main()
+ {
+ SafeHandleIsInvalid test = new SafeHandleIsInvalid();
+
+ TestLibrary.TestFramework.BeginTestCase("SafeHandleIsInvalid");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
+[SecurityCritical]
+public class MySafeHandle : SafeHandle
+{
+ [SecurityCritical]
+ public MySafeHandle()
+ : base(IntPtr.Zero, true)
+ {
+ this.handle = new IntPtr(100);
+ }
+ bool InvalidValue = true;
+ public override bool IsInvalid
+ {
+ [SecurityCritical]
+ get { return InvalidValue; }
+
+ }
+ public bool MyReleaseInvoke()
+ {
+ return ReleaseHandle();
+ }
+ public void MySetHandle(IntPtr iptr)
+ {
+ this.SetHandle(iptr);
+ }
+ public IntPtr GetHandle()
+ {
+ return this.handle;
+ }
+ [DllImport("kernel32")]
+ private static extern bool CloseHandle(IntPtr handle);
+
+ [SecurityCritical]
+ protected override bool ReleaseHandle()
+ {
+ if (handle == IntPtr.Zero)
+ {
+ InvalidValue = false;
+ return true;
+ }
+ this.SetHandle(IntPtr.Zero);
+ InvalidValue = false;
+ return true;
+ }
+ public bool CheckHandleIsRelease()
+ {
+ if (handle != IntPtr.Zero)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandlesethandle.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandlesethandle.cs
new file mode 100644
index 0000000000..4d44d4d966
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandlesethandle.cs
@@ -0,0 +1,133 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.Runtime.InteropServices; // For SafeHandle
+
+
+/// <summary>
+///SetHandle
+/// </summary>
+public class SafeHandleSetHandle
+{
+ #region Public Methods
+
+ [SecuritySafeCritical]
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+
+ [SecuritySafeCritical]
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call SafeHandle.SetHandle ");
+ try
+ {
+ MySafeHandle msh = new MySafeHandle();
+ IntPtr myIptr = new IntPtr(1000);
+ msh.MySetHandle(myIptr);
+
+ if (msh.GetHandle()!=myIptr)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "SetHandle has error ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+ #endregion
+
+
+ [SecuritySafeCritical]
+ public static int Main()
+ {
+ SafeHandleSetHandle test = new SafeHandleSetHandle();
+
+ TestLibrary.TestFramework.BeginTestCase("SafeHandleSetHandle");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
+[SecurityCritical]
+public class MySafeHandle : SafeHandle
+{ [SecurityCritical]
+ public MySafeHandle()
+ : base(IntPtr.Zero, true)
+ {
+ this.handle = new IntPtr(100);
+ }
+ bool InvalidValue = true;
+ public override bool IsInvalid
+ {
+ [SecurityCritical]
+ get { return InvalidValue; }
+
+ }
+ public bool MyReleaseInvoke()
+ {
+ return ReleaseHandle();
+ }
+ public void MySetHandle(IntPtr iptr)
+ {
+ this.SetHandle(iptr);
+ }
+ public IntPtr GetHandle()
+ {
+ return this.handle;
+ }
+ [DllImport("kernel32")]
+ private static extern bool CloseHandle(IntPtr handle);
+
+ [SecurityCritical]
+ protected override bool ReleaseHandle()
+ {
+ if (handle == IntPtr.Zero) return true;
+ this.SetHandle(IntPtr.Zero);
+ return true;
+ }
+ public bool CheckHandleIsRelease()
+ {
+ if (handle != IntPtr.Zero)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandlesethandleasinvalid.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandlesethandleasinvalid.cs
new file mode 100644
index 0000000000..5a0f1ebaf4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/safehandle/safehandlesethandleasinvalid.cs
@@ -0,0 +1,133 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using System.Runtime.InteropServices; // For SafeHandle
+
+
+/// <summary>
+///SetHandleAsInvalid
+/// </summary>
+public class SafeHandleSetHandleAsInvalid
+{
+ #region Public Methods
+
+ [SecuritySafeCritical]
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+
+ [SecuritySafeCritical]
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call SafeHandle.SetHandleAsInvalid ");
+ try
+ {
+ MySafeHandle msh = new MySafeHandle();
+ IntPtr myIptr = new IntPtr(1000);
+ msh.MySetHandle(myIptr);
+ msh.SetHandleAsInvalid();
+ if (!msh.IsClosed || msh.GetHandle()!=myIptr )
+ {
+ TestLibrary.TestFramework.LogError("001.1", "SetHandleAsInvalid has error ");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+ #endregion
+
+
+ [SecuritySafeCritical]
+ public static int Main()
+ {
+ SafeHandleSetHandleAsInvalid test = new SafeHandleSetHandleAsInvalid();
+
+ TestLibrary.TestFramework.BeginTestCase("SafeHandleSetHandleAsInvalid");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
+[SecurityCritical]
+public class MySafeHandle : SafeHandle
+{
+ public MySafeHandle()
+ : base(IntPtr.Zero, true)
+ {
+ this.handle = new IntPtr(100);
+ }
+ bool InvalidValue = true;
+ public override bool IsInvalid
+ {
+ [SecurityCritical]
+ get { return InvalidValue; }
+
+ }
+ public bool MyReleaseInvoke()
+ {
+ return ReleaseHandle();
+ }
+ public void MySetHandle(IntPtr iptr)
+ {
+ this.SetHandle(iptr);
+ }
+ public IntPtr GetHandle()
+ {
+ return this.handle;
+ }
+ [DllImport("kernel32")]
+ private static extern bool CloseHandle(IntPtr handle);
+
+ [SecurityCritical]
+ protected override bool ReleaseHandle()
+ {
+ if (handle == IntPtr.Zero) return true;
+ this.SetHandle(IntPtr.Zero);
+ return true;
+ }
+ public bool CheckHandleIsRelease()
+ {
+ if (handle != IntPtr.Zero)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/StructLayoutAttributeCharSet.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/StructLayoutAttributeCharSet.csproj
new file mode 100644
index 0000000000..6c9b22c22b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/StructLayoutAttributeCharSet.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="structlayoutattributecharset.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/StructLayoutAttributeCtor.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/StructLayoutAttributeCtor.csproj
new file mode 100644
index 0000000000..c15b438c5e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/StructLayoutAttributeCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="structlayoutattributector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/StructLayoutAttributePack.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/StructLayoutAttributePack.csproj
new file mode 100644
index 0000000000..55b0d8caa1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/StructLayoutAttributePack.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="structlayoutattributepack.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/StructLayoutAttributeSize.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/StructLayoutAttributeSize.csproj
new file mode 100644
index 0000000000..ae7b963081
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/StructLayoutAttributeSize.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="structlayoutattributesize.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/StructLayoutAttributeValue.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/StructLayoutAttributeValue.csproj
new file mode 100644
index 0000000000..f08db5b3c2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/StructLayoutAttributeValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="structlayoutattributevalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/structlayoutattributecharset.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/structlayoutattributecharset.cs
new file mode 100644
index 0000000000..cc2b9f40ee
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/structlayoutattributecharset.cs
@@ -0,0 +1,80 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// StructLayoutAttribute.CharSet [v-minch]
+/// </summary>
+public class StructLayoutAttributeCharSet
+{
+ public static int Main()
+ {
+ StructLayoutAttributeCharSet test = new StructLayoutAttributeCharSet();
+ TestLibrary.TestFramework.BeginTestCase("StructLayoutAttribute.CharSet()");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Return the field CharSet value in StructLayoutAttribute class 1");
+ try
+ {
+ LayoutKind mylayoutkind = LayoutKind.Auto;
+ StructLayoutAttribute myInstance = new StructLayoutAttribute(mylayoutkind);
+ if (myInstance.CharSet != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 0 but the ActualResult is " + myInstance.CharSet.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Return the field CharSet value in StructLayoutAttribute class 2");
+ try
+ {
+ LayoutKind mylayoutkind = LayoutKind.Sequential;
+ StructLayoutAttribute myInstance = new StructLayoutAttribute(mylayoutkind);
+ if (myInstance.CharSet != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is 0 but the ActualResult is " + myInstance.CharSet.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/structlayoutattributector.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/structlayoutattributector.cs
new file mode 100644
index 0000000000..5a89dc102e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/structlayoutattributector.cs
@@ -0,0 +1,58 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// StructLayoutAttribute.ctor(LayoutKind) [v-minch]
+/// </summary>
+public class StructLayoutAttributeCtor
+{
+ public static int Main()
+ {
+ StructLayoutAttributeCtor test = new StructLayoutAttributeCtor();
+ TestLibrary.TestFramework.BeginTestCase("StructLayoutAttribute.ctor()");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Initialize a instance of StructLayoutAttribute class");
+ try
+ {
+ LayoutKind mylayoutkind = LayoutKind.Auto;
+ StructLayoutAttribute myInstance = new StructLayoutAttribute(mylayoutkind);
+ if (myInstance == null || myInstance.Value != mylayoutkind)
+ {
+ TestLibrary.TestFramework.LogError("001", "the instance of StructLayoutAttribute creating failed");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/structlayoutattributepack.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/structlayoutattributepack.cs
new file mode 100644
index 0000000000..2be923cec6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/structlayoutattributepack.cs
@@ -0,0 +1,80 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// StructLayoutAttribute.Pack [v-minch]
+/// </summary>
+public class StructLayoutAttributePack
+{
+ public static int Main()
+ {
+ StructLayoutAttributePack test = new StructLayoutAttributePack();
+ TestLibrary.TestFramework.BeginTestCase("StructLayoutAttribute.Pack()");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Return the field Pack value in StructLayoutAttribute class 1");
+ try
+ {
+ LayoutKind mylayoutkind = LayoutKind.Auto;
+ StructLayoutAttribute myInstance = new StructLayoutAttribute(mylayoutkind);
+ if (myInstance.Pack != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 0 but the ActualResult is " + myInstance.Pack.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Return the field Pack value in StructLayoutAttribute class 2");
+ try
+ {
+ LayoutKind mylayoutkind = LayoutKind.Sequential;
+ StructLayoutAttribute myInstance = new StructLayoutAttribute(mylayoutkind);
+ if (myInstance.Pack != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is 0 but the ActualResult is " + myInstance.Pack.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/structlayoutattributesize.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/structlayoutattributesize.cs
new file mode 100644
index 0000000000..46360062c8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/structlayoutattributesize.cs
@@ -0,0 +1,80 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// StructLayoutAttribute.Size [v-minch]
+/// </summary>
+public class StructLayoutAttributeSize
+{
+ public static int Main()
+ {
+ StructLayoutAttributeSize test = new StructLayoutAttributeSize();
+ TestLibrary.TestFramework.BeginTestCase("StructLayoutAttribute.Size()");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Return the field Size value in StructLayoutAttribute class 1");
+ try
+ {
+ LayoutKind mylayoutkind = LayoutKind.Auto;
+ StructLayoutAttribute myInstance = new StructLayoutAttribute(mylayoutkind);
+ if (myInstance.Size != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is 0 but the ActualResult is " + myInstance.Size.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Return the field Size value in StructLayoutAttribute class 2");
+ try
+ {
+ LayoutKind mylayoutkind = LayoutKind.Sequential;
+ StructLayoutAttribute myInstance = new StructLayoutAttribute(mylayoutkind);
+ if (myInstance.Size != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is 0 but the ActualResult is " + myInstance.Size.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/structlayoutattributevalue.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/structlayoutattributevalue.cs
new file mode 100644
index 0000000000..c0ba3ab49b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/structlayoutattribute/structlayoutattributevalue.cs
@@ -0,0 +1,80 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Runtime.InteropServices;
+/// <summary>
+/// StructLayoutAttribute.Value [v-minch]
+/// </summary>
+public class StructLayoutAttributeValue
+{
+ public static int Main()
+ {
+ StructLayoutAttributeValue test = new StructLayoutAttributeValue();
+ TestLibrary.TestFramework.BeginTestCase("StructLayoutAttribute.Value()");
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Return the Value property in StructLayoutAttribute class 1");
+ try
+ {
+ LayoutKind mylayoutkind = LayoutKind.Auto;
+ StructLayoutAttribute myInstance = new StructLayoutAttribute(mylayoutkind);
+ if (myInstance.Value != mylayoutkind)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is " + mylayoutkind.ToString() +" but the ActualResult is " + myInstance.Value.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Return the Value property in StructLayoutAttribute class 2");
+ try
+ {
+ LayoutKind mylayoutkind = LayoutKind.Sequential;
+ StructLayoutAttribute myInstance = new StructLayoutAttribute(mylayoutkind);
+ if (myInstance.Value != mylayoutkind)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is " + mylayoutkind +" but the ActualResult is " + myInstance.Value.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/unmanagedtype/UnmanagedType.csproj b/tests/src/CoreMangLib/cti/system/runtime/interopservices/unmanagedtype/UnmanagedType.csproj
new file mode 100644
index 0000000000..7cde284b0c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/unmanagedtype/UnmanagedType.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unmanagedtype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtime/interopservices/unmanagedtype/unmanagedtype.cs b/tests/src/CoreMangLib/cti/system/runtime/interopservices/unmanagedtype/unmanagedtype.cs
new file mode 100644
index 0000000000..19074ed7ca
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtime/interopservices/unmanagedtype/unmanagedtype.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/runtimefieldhandle/RuntimeFieldHandleEquals.csproj b/tests/src/CoreMangLib/cti/system/runtimefieldhandle/RuntimeFieldHandleEquals.csproj
new file mode 100644
index 0000000000..d854a94841
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtimefieldhandle/RuntimeFieldHandleEquals.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="runtimefieldhandleequals.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtimefieldhandle/RuntimeFieldHandleGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/runtimefieldhandle/RuntimeFieldHandleGetHashCode.csproj
new file mode 100644
index 0000000000..88e7b1533d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtimefieldhandle/RuntimeFieldHandleGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="runtimefieldhandlegethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtimefieldhandle/runtimefieldhandleequals.cs b/tests/src/CoreMangLib/cti/system/runtimefieldhandle/runtimefieldhandleequals.cs
new file mode 100644
index 0000000000..fdd58e3753
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtimefieldhandle/runtimefieldhandleequals.cs
@@ -0,0 +1,172 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Equals(System.Object) [v-jianq]
+/// </summary>
+
+public class RuntimeFieldHandleEquals
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify a struct RuntimeFieldHandle equals to itself.");
+
+ try
+ {
+ RuntimeFieldHandle rfh = new RuntimeFieldHandle();
+
+ bool expected = true;
+ bool actual = rfh.Equals(rfh);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method Equals Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify two struct RuntimeFieldHandle equals.");
+
+ try
+ {
+ RuntimeFieldHandle rfh1 = new RuntimeFieldHandle();
+ RuntimeFieldHandle rfh2 = new RuntimeFieldHandle();
+
+ bool expected = true;
+ bool actual = rfh1.Equals(rfh2);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method Equals Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify a struct RuntimeFieldHandle is not equals to a object.");
+
+ try
+ {
+ RuntimeFieldHandle rfh = new RuntimeFieldHandle();
+ object obj = new object();
+
+ bool expected = false;
+ bool actual = rfh.Equals(obj);
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method Equals Err.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ RuntimeFieldHandleEquals test = new RuntimeFieldHandleEquals();
+
+ TestLibrary.TestFramework.BeginTestCase("RuntimeFieldHandleEquals");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtimefieldhandle/runtimefieldhandlegethashcode.cs b/tests/src/CoreMangLib/cti/system/runtimefieldhandle/runtimefieldhandlegethashcode.cs
new file mode 100644
index 0000000000..7cf7065bf2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtimefieldhandle/runtimefieldhandlegethashcode.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// GetHashCode [v-jianq]
+/// </summary>
+
+public class RuntimeFieldHandleGetHashCode
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify two hashcode of RuntimeFieldHandle equals");
+
+ try
+ {
+ RuntimeFieldHandle rfh1 = new RuntimeFieldHandle();
+ RuntimeFieldHandle rfh2 = new RuntimeFieldHandle();
+
+ if (rfh1.GetHashCode() != rfh2.GetHashCode())
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method GetHashCode Err !");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify a hashcode of RuntimeFieldHandle is not equal to object");
+
+ try
+ {
+ RuntimeFieldHandle rfh = new RuntimeFieldHandle();
+ object obj = new object();
+
+ if (rfh.GetHashCode() == obj.GetHashCode())
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method GetHashCode Err !");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ RuntimeFieldHandleGetHashCode test = new RuntimeFieldHandleGetHashCode();
+
+ TestLibrary.TestFramework.BeginTestCase("RuntimeFieldHandleGetHashCode");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtimemethodhandle/RuntimeMethodHandleEquals.csproj b/tests/src/CoreMangLib/cti/system/runtimemethodhandle/RuntimeMethodHandleEquals.csproj
new file mode 100644
index 0000000000..cedbb6c763
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtimemethodhandle/RuntimeMethodHandleEquals.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="runtimemethodhandleequals.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtimemethodhandle/RuntimeMethodHanldeGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/runtimemethodhandle/RuntimeMethodHanldeGetHashCode.csproj
new file mode 100644
index 0000000000..b95bb5f540
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtimemethodhandle/RuntimeMethodHanldeGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="runtimemethodhanldegethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtimemethodhandle/runtimemethodhandleequals.cs b/tests/src/CoreMangLib/cti/system/runtimemethodhandle/runtimemethodhandleequals.cs
new file mode 100644
index 0000000000..ac3f6e3c24
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtimemethodhandle/runtimemethodhandleequals.cs
@@ -0,0 +1,115 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+public class RuntimeMethodHandleEquals
+{
+ public object myRuntimeMethodHandle = new RuntimeMethodHandle();
+ public object myObj = new object();
+
+ public static int Main(string[] args)
+ {
+ RuntimeMethodHandleEquals handleEquals =
+ new RuntimeMethodHandleEquals();
+ TestLibrary.TestFramework.BeginTestCase("Tesing System.RuntimeMethodHandle.Equals...");
+
+ if (handleEquals.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify clone instance is equal to it original...");
+
+ try
+ {
+ RuntimeMethodHandle myHandle = new RuntimeMethodHandle();
+ object cloneHandle = myHandle;
+ if (!myHandle.Equals(cloneHandle))
+ {
+ TestLibrary.TestFramework.LogError("001","The two instances should be equal!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify different instances are equal when they have the same values...");
+
+ try
+ {
+ //default value is zero
+ RuntimeMethodHandle myHandle = new RuntimeMethodHandle();
+ if (!myHandle.Equals(myRuntimeMethodHandle))
+ {
+ TestLibrary.TestFramework.LogError("003","The two instance should be different!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify RuntimeMethodHandle instance is not equal to common object instance...");
+
+ try
+ {
+ RuntimeMethodHandle myHandle = new RuntimeMethodHandle();
+ if (myHandle.Equals(myObj))
+ {
+ TestLibrary.TestFramework.LogError("005","The two instances should not be equal!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtimemethodhandle/runtimemethodhanldegethashcode.cs b/tests/src/CoreMangLib/cti/system/runtimemethodhandle/runtimemethodhanldegethashcode.cs
new file mode 100644
index 0000000000..f13895aee0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtimemethodhandle/runtimemethodhanldegethashcode.cs
@@ -0,0 +1,89 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class RuntimeMethodHanldeGetHashCode
+{
+ public static int Main(string[] args)
+ {
+ RuntimeMethodHanldeGetHashCode getHashCode =
+ new RuntimeMethodHanldeGetHashCode();
+ TestLibrary.TestFramework.BeginTestCase("Testing System.RuntimeMethodHandle.GetHashCode method...");
+
+ if (getHashCode.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify different instances of RuntimeMethodGetHashCode...");
+
+ try
+ {
+ RuntimeMethodHandle myHandle1 = new RuntimeMethodHandle();
+ RuntimeMethodHandle myHandle2 = new RuntimeMethodHandle();
+
+ if (myHandle1.GetHashCode() != myHandle2.GetHashCode())
+ {
+ TestLibrary.TestFramework.LogError("001","The two instance should have the same HashCode!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify cloned instance has the same hashcode of it original...");
+
+ try
+ {
+ RuntimeMethodHandle myHandle1 = new RuntimeMethodHandle();
+ RuntimeMethodHandle myHandle2 = myHandle1;
+
+ if (myHandle1.GetHashCode() != myHandle2.GetHashCode())
+ {
+ TestLibrary.TestFramework.LogError("003","The two instances should have the same hashcode!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004","Unexpected exception occurs: " + e);
+ return retVal;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtimetypehandle/RuntimeTypeHandleEquals.csproj b/tests/src/CoreMangLib/cti/system/runtimetypehandle/RuntimeTypeHandleEquals.csproj
new file mode 100644
index 0000000000..c507498b9e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtimetypehandle/RuntimeTypeHandleEquals.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="runtimetypehandleequals.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtimetypehandle/RuntimeTypeHandleGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/runtimetypehandle/RuntimeTypeHandleGetHashCode.csproj
new file mode 100644
index 0000000000..e091a34c6f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtimetypehandle/RuntimeTypeHandleGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="runtimetypehandlegethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/runtimetypehandle/runtimetypehandleequals.cs b/tests/src/CoreMangLib/cti/system/runtimetypehandle/runtimetypehandleequals.cs
new file mode 100644
index 0000000000..2f62b2ad8b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtimetypehandle/runtimetypehandleequals.cs
@@ -0,0 +1,318 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class TestEmptyClass
+{
+}
+
+public abstract class TestAbstractClass
+{
+ public TestAbstractClass()
+ {
+ x = 1;
+ x--;
+ }
+
+ public abstract void TestAbstractMethod();
+
+ private int x;
+}
+
+public class TestClass : TestAbstractClass
+{
+ public override void TestAbstractMethod()
+ {
+ }
+
+ public void TestMethod()
+ {
+ }
+}
+
+public struct TestStruct1
+{
+ public TestStruct1(int value)
+ {
+ m_value = value;
+ }
+
+ int m_value;
+}
+
+public struct TestStruct2
+{
+ public TestStruct2(int value)
+ {
+ m_value = value;
+ }
+
+ int m_value;
+}
+
+public enum TestEnum1
+{
+ DEFAULT
+}
+
+public enum TestEnum2
+{
+ DEFAULT
+}
+
+/// <summary>
+/// Equals(System.Object)
+/// </summary>
+public class RuntimeTypeHandleEquals
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Equals should return true when comparing with itself");
+
+ try
+ {
+ RuntimeTypeHandle handle = typeof(TestEmptyClass).TypeHandle;
+
+ if (!handle.Equals(handle))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Equals returns false when comparing with itself");
+ retVal = false;
+ }
+ handle = typeof(TestStruct1).TypeHandle;
+ if (!handle.Equals(handle))
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Equals returns false when comparing with itself");
+ retVal = false;
+ }
+
+ handle = typeof(TestEnum1).TypeHandle;
+ if (!handle.Equals(handle))
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Equals returns false when comparing with itself");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.4", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Equals should return true when comparing with instance of same classes");
+
+ try
+ {
+ TestEmptyClass ec1 = new TestEmptyClass();
+ TestEmptyClass ec2 = new TestEmptyClass();
+ RuntimeTypeHandle handle1 = ec1.GetType().TypeHandle;
+ RuntimeTypeHandle handle2 = ec2.GetType().TypeHandle;
+
+ if (!handle1.Equals(handle2))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Equals returns false when comparing with instance of same classe");
+ retVal = false;
+ }
+
+ TestStruct1 ts1 = new TestStruct1();
+ TestStruct1 ts2 = new TestStruct1();
+ handle1 = ts1.GetType().TypeHandle;
+ handle2 = ts2.GetType().TypeHandle;
+ if (!handle1.Equals(handle2))
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Equals returns false when comparing with instance of same structs");
+ retVal = false;
+ }
+
+ TestEnum1 te1 = TestEnum1.DEFAULT;
+ TestEnum1 te2 = TestEnum1.DEFAULT;
+ handle1 = te1.GetType().TypeHandle;
+ handle2 = te2.GetType().TypeHandle;
+ if (!handle1.Equals(handle2))
+ {
+ TestLibrary.TestFramework.LogError("002.3", "Equals returns false when comparing with instance of same enums");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.4", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Equals should return false when comparing with instance of different classes");
+
+ try
+ {
+ TestEmptyClass classInstance1 = new TestEmptyClass();
+ TestClass classInstance2 = new TestClass();
+ RuntimeTypeHandle classInstanceHandle1 = classInstance1.GetType().TypeHandle;
+ RuntimeTypeHandle classInstanceHandle2 = classInstance2.GetType().TypeHandle;
+
+ if (classInstanceHandle1.Equals(classInstanceHandle2))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Equals returns true when comparing with instance of different classe");
+ retVal = false;
+ }
+
+ TestStruct1 ts1 = new TestStruct1();
+ TestStruct2 ts2 = new TestStruct2();
+ RuntimeTypeHandle structHandle1 = ts1.GetType().TypeHandle;
+ RuntimeTypeHandle structHandle2 = ts2.GetType().TypeHandle;
+ if (structHandle1.Equals(structHandle2))
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Equals returns false when comparing with instance of different structs");
+ retVal = false;
+ }
+
+ TestEnum1 te1 = TestEnum1.DEFAULT;
+ TestEnum2 te2 = TestEnum2.DEFAULT;
+ RuntimeTypeHandle enumHandle1 = te1.GetType().TypeHandle;
+ RuntimeTypeHandle enumHandle2 = te2.GetType().TypeHandle;
+ if (enumHandle1.Equals(enumHandle2))
+ {
+ TestLibrary.TestFramework.LogError("003.3", "Equals returns false when comparing with instance of different enums");
+ retVal = false;
+ }
+
+ if (classInstanceHandle1.Equals(structHandle1))
+ {
+ TestLibrary.TestFramework.LogError("003.4", "Equals returns false when comparing a instance of struct with a instance of class");
+ retVal = false;
+ }
+
+ if (classInstanceHandle1.Equals(enumHandle1))
+ {
+ TestLibrary.TestFramework.LogError("003.5", "Equals returns false when comparing a instance of enum with a instance of class");
+ retVal = false;
+ }
+
+ if (structHandle1.Equals(enumHandle1))
+ {
+ TestLibrary.TestFramework.LogError("003.6", "Equals returns false when comparing a instance of struct with a instance of enum");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.7", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Equals should return false when comparing with a invalid value");
+
+ try
+ {
+ RuntimeTypeHandle handle = typeof(TestClass).TypeHandle;
+ if (handle.Equals(null))
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Equals returns true when comparing with a null");
+ retVal = false;
+ }
+
+ if (handle.Equals(new Object()))
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Equals returns true when comparing with a instance of object");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Equals should return false when comparing with RuntimeTypeHandle of base class");
+
+ try
+ {
+ RuntimeTypeHandle handle1 = typeof(TestClass).TypeHandle;
+ RuntimeTypeHandle handle2 = typeof(Object).TypeHandle;
+ if (handle1.Equals(handle2))
+ {
+ TestLibrary.TestFramework.LogError("005.1", "Equals returns true when comparing with RuntimeTypeHandle of base class");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ RuntimeTypeHandleEquals test = new RuntimeTypeHandleEquals();
+
+ TestLibrary.TestFramework.BeginTestCase("RuntimeTypeHandleEquals");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/runtimetypehandle/runtimetypehandlegethashcode.cs b/tests/src/CoreMangLib/cti/system/runtimetypehandle/runtimetypehandlegethashcode.cs
new file mode 100644
index 0000000000..91dc7b2c6d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/runtimetypehandle/runtimetypehandlegethashcode.cs
@@ -0,0 +1,228 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class TestEmptyClass
+{
+}
+
+public abstract class TestAbstractClass
+{
+ public TestAbstractClass()
+ {
+ x = 1;
+ x--;
+ }
+
+ public abstract void TestAbstractMethod();
+
+ private int x;
+}
+
+public class TestClass : TestAbstractClass
+{
+ public override void TestAbstractMethod()
+ {
+ }
+
+ public void TestMethod()
+ {
+ }
+}
+
+public struct TestStruct1
+{
+ public TestStruct1(int value)
+ {
+ m_value = value;
+ }
+
+ int m_value;
+}
+
+public struct TestStruct2
+{
+ public TestStruct2(int value)
+ {
+ m_value = value;
+ }
+
+ int m_value;
+}
+
+public enum TestEnum1
+{
+ DEFAULT
+}
+
+public enum TestEnum2
+{
+ DEFAULT
+}
+
+/// <summary>
+/// GetHashCode
+/// </summary>
+public class RuntimeTypeHandleGetHashCode
+{
+ #region Private Fields
+ private int m_ErrorNo = 0;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: GetHashCode should return valid hash code");
+
+ try
+ {
+ retVal = retVal && VerifyHashCode(new TestEmptyClass());
+ retVal = retVal && VerifyHashCode(new TestClass());
+ retVal = retVal && VerifyHashCode(new TestStruct1());
+ retVal = retVal && VerifyHashCode(TestEnum1.DEFAULT);
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: GetHashCode should return same hash code for instances from same class");
+
+ try
+ {
+ retVal = retVal && VerifyHashCode(new TestEmptyClass(), new TestEmptyClass(), true);
+ retVal = retVal && VerifyHashCode(new TestClass(), new TestClass(), true);
+ retVal = retVal && VerifyHashCode(new TestStruct1(), new TestStruct1(), true);
+ retVal = retVal && VerifyHashCode(TestEnum1.DEFAULT, TestEnum1.DEFAULT, true);
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: GetHashCode should return different hash code for instances from different classes");
+
+ try
+ {
+ retVal = retVal && VerifyHashCode(new TestEmptyClass(), new TestClass(), false);
+ retVal = retVal && VerifyHashCode(new TestClass(), new TestStruct1(), false);
+ retVal = retVal && VerifyHashCode(new TestStruct1(), new TestStruct2(), false);
+ retVal = retVal && VerifyHashCode(TestEnum1.DEFAULT, TestEnum2.DEFAULT, false);
+ retVal = retVal && VerifyHashCode(TestEnum1.DEFAULT, new TestStruct1(), false);
+ retVal = retVal && VerifyHashCode(TestEnum1.DEFAULT, new TestClass(), false);
+ }
+ catch (Exception e)
+ {
+ m_ErrorNo++;
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ RuntimeTypeHandleGetHashCode test = new RuntimeTypeHandleGetHashCode();
+
+ TestLibrary.TestFramework.BeginTestCase("RuntimeTypeHandleGetHashCode");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Method
+ private bool VerifyHashCode(Object o)
+ {
+ bool retVal = true;
+ RuntimeTypeHandle handle = o.GetType().TypeHandle;
+ int value1 = handle.GetHashCode();
+ int value2 = handle.GetHashCode();
+
+ m_ErrorNo++;
+ if (value1 == 0)
+ {
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "RuntimeTypeHandle.GetHashCode returns 0");
+ retVal = false;
+ }
+
+ m_ErrorNo++;
+ if (value1 != value2)
+ {
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Call RuntimeTypeHandle.GetHashCode twice returns wrong hash code");
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ private bool VerifyHashCode(Object o1, Object o2, bool desiredValue)
+ {
+ bool retVal = true;
+ RuntimeTypeHandle handle1 = o1.GetType().TypeHandle;
+ RuntimeTypeHandle handle2 = o2.GetType().TypeHandle;
+ int value1 = handle1.GetHashCode();
+ int value2 = handle2.GetHashCode();
+
+ bool actualValue = value1 == value2;
+
+ m_ErrorNo++;
+ if (actualValue != desiredValue)
+ {
+ TestLibrary.TestFramework.LogError(m_ErrorNo.ToString(), "Compare the hash code for handle1 with handle2 returns ACTUAL: " + actualValue.ToString() + ", DESIRED: " + desiredValue.ToString());
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/SByteCompareTo2.csproj b/tests/src/CoreMangLib/cti/system/sbyte/SByteCompareTo2.csproj
new file mode 100644
index 0000000000..bbc9aa3ba1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/SByteCompareTo2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="sbytecompareto2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/SByteEquals1.csproj b/tests/src/CoreMangLib/cti/system/sbyte/SByteEquals1.csproj
new file mode 100644
index 0000000000..beeac21da3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/SByteEquals1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="sbyteequals1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/SByteEquals2.csproj b/tests/src/CoreMangLib/cti/system/sbyte/SByteEquals2.csproj
new file mode 100644
index 0000000000..bdfc1aaf59
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/SByteEquals2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="sbyteequals2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/SByteGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/sbyte/SByteGetHashCode.csproj
new file mode 100644
index 0000000000..913bc5091c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/SByteGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="sbytegethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToBoolean.csproj b/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToBoolean.csproj
new file mode 100644
index 0000000000..63b8f08714
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToBoolean.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="sbyteiconvertibletoboolean.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToByte.csproj b/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToByte.csproj
new file mode 100644
index 0000000000..29848ba3c0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="sbyteiconvertibletobyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToChar.csproj b/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToChar.csproj
new file mode 100644
index 0000000000..7b0e794eb8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToChar.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="sbyteiconvertibletochar.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToDecimal.csproj b/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToDecimal.csproj
new file mode 100644
index 0000000000..4913347c2e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToDecimal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="sbyteiconvertibletodecimal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToDouble.csproj b/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToDouble.csproj
new file mode 100644
index 0000000000..73978da739
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToDouble.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="sbyteiconvertibletodouble.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToInt16.csproj b/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToInt16.csproj
new file mode 100644
index 0000000000..bf631aa465
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="sbyteiconvertibletoint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToInt32.csproj b/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToInt32.csproj
new file mode 100644
index 0000000000..37a2fe0d75
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="sbyteiconvertibletoint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToInt64.csproj b/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToInt64.csproj
new file mode 100644
index 0000000000..31716d0125
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="sbyteiconvertibletoint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToUInt16.csproj b/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToUInt16.csproj
new file mode 100644
index 0000000000..6138df9012
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToUInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="sbyteiconvertibletouint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToUInt32.csproj b/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToUInt32.csproj
new file mode 100644
index 0000000000..654f53f592
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToUInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="sbyteiconvertibletouint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToUInt64.csproj b/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToUInt64.csproj
new file mode 100644
index 0000000000..210bfa2d87
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/SByteIConvertibleToUInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="sbyteiconvertibletouint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/SByteMaxValue.csproj b/tests/src/CoreMangLib/cti/system/sbyte/SByteMaxValue.csproj
new file mode 100644
index 0000000000..1343ce4f72
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/SByteMaxValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="sbytemaxvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/SByteMinValue.csproj b/tests/src/CoreMangLib/cti/system/sbyte/SByteMinValue.csproj
new file mode 100644
index 0000000000..b7f7f0ebe3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/SByteMinValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="sbyteminvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/SByteParse1.csproj b/tests/src/CoreMangLib/cti/system/sbyte/SByteParse1.csproj
new file mode 100644
index 0000000000..7853b5d000
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/SByteParse1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="sbyteparse1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/SByteParse2.csproj b/tests/src/CoreMangLib/cti/system/sbyte/SByteParse2.csproj
new file mode 100644
index 0000000000..1f9c63b6d0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/SByteParse2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="sbyteparse2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/SByteParse3.csproj b/tests/src/CoreMangLib/cti/system/sbyte/SByteParse3.csproj
new file mode 100644
index 0000000000..f6f1801aa5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/SByteParse3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="sbyteparse3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/SByteTryParse.csproj b/tests/src/CoreMangLib/cti/system/sbyte/SByteTryParse.csproj
new file mode 100644
index 0000000000..6b86872fdd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/SByteTryParse.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="sbytetryparse.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/sbytecompareto2.cs b/tests/src/CoreMangLib/cti/system/sbyte/sbytecompareto2.cs
new file mode 100644
index 0000000000..9f2e805358
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/sbytecompareto2.cs
@@ -0,0 +1,129 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// SByte.CompareTo(SByte)
+/// </summary>
+public class SByteCompareTo2
+{
+ public static int Main()
+ {
+ SByteCompareTo2 sbyteCT2 = new SByteCompareTo2();
+ TestLibrary.TestFramework.BeginTestCase("SByteCompareTo2");
+ if (sbyteCT2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The sbyte compared to is less than the source");
+ try
+ {
+ int intA = this.GetInt32(0, 127) + this.GetInt32(0, 129) * (-1);
+ sbyte desByte = (sbyte)intA;
+ sbyte sourceByte = sbyte.MaxValue;
+ int retInt = sourceByte.CompareTo(desByte);
+ if (retInt <= 0 )
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The sbyte compared to is larger than the source");
+ try
+ {
+ int intA = this.GetInt32(0, 127) + this.GetInt32(0, 128) * (-1);
+ sbyte desByte = (sbyte)intA;
+ sbyte sourceByte = sbyte.MinValue;
+ int retInt = sourceByte.CompareTo(desByte);
+ if (retInt >= 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The sbyte compared to is equal to the source");
+ try
+ {
+ int intA = this.GetInt32(0, 127) + this.GetInt32(0, 128) * (-1);
+ sbyte desByte = (sbyte)intA;
+ sbyte sourceByte = (sbyte)intA;
+ int retInt = sourceByte.CompareTo(desByte);
+ if (retInt != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/sbyteequals1.cs b/tests/src/CoreMangLib/cti/system/sbyte/sbyteequals1.cs
new file mode 100644
index 0000000000..7838e43f45
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/sbyteequals1.cs
@@ -0,0 +1,197 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// SByte.Equals(object)
+/// </summary>
+public class SByteEquals1
+{
+ public static int Main()
+ {
+ SByteEquals1 sbyteEquals1 = new SByteEquals1();
+ TestLibrary.TestFramework.BeginTestCase("SByteEquals1");
+ if (sbyteEquals1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The object compare to the SByte maxValue");
+ try
+ {
+ object objVal = SByte.MaxValue;
+ sbyte sourceSByte = sbyte.MaxValue;
+ bool retbool = sourceSByte.Equals(objVal);
+ if (!retbool)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The object compare to the SByte minValue");
+ try
+ {
+ object objVal = SByte.MinValue;
+ sbyte sourceSByte = sbyte.MinValue;
+ bool retbool = sourceSByte.Equals(objVal);
+ if (!retbool)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The object compare to the random sbyte");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 128) + this.GetInt32(0, 129) * (-1));
+ object objVal = sbyteVal;
+ sbyte sourceSByte = sbyteVal;
+ bool retbool = sourceSByte.Equals(objVal);
+ if (!retbool)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: The sbyte maxValue equals sbyte minValue");
+ try
+ {
+ object objVal = sbyte.MinValue;
+ sbyte sourceSByte = sbyte.MaxValue;
+ bool retbool = sourceSByte.Equals(objVal);
+ if (retbool)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: The random sbyte equals random sbyte");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 127) + this.GetInt32(0, 128) * (-1));
+ object objVal = sbyteVal;
+ sbyte sourceSByte = (sbyte)(sbyteVal + 1);
+ bool retbool = sourceSByte.Equals(objVal);
+ if (retbool)
+ {
+ TestLibrary.TestFramework.LogError("009", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: The object is not sbyte");
+ try
+ {
+ object objVal = "helloworld";
+ sbyte sourceSByte = (sbyte)(this.GetInt32(0, 128) + this.GetInt32(0, 129) * (-1));
+ bool retbool = sourceSByte.Equals(objVal);
+ if (retbool)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/sbyteequals2.cs b/tests/src/CoreMangLib/cti/system/sbyte/sbyteequals2.cs
new file mode 100644
index 0000000000..ed4063a5de
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/sbyteequals2.cs
@@ -0,0 +1,172 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// SByte.Equals(SByte)
+/// </summary>
+public class SByteEquals2
+{
+ public static int Main()
+ {
+ SByteEquals2 sbyteEquals2 = new SByteEquals2();
+ TestLibrary.TestFramework.BeginTestCase("SByteEquals2");
+ if (sbyteEquals2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The sbyte equals SByte maxValue");
+ try
+ {
+ sbyte desSByte = SByte.MaxValue;
+ sbyte sourceSByte = (sbyte)(this.GetInt32(0,127) + this.GetInt32(0,128)*(-1));
+ bool retbool = sourceSByte.Equals(desSByte);
+ if (retbool)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The sbyte equals SByte minValue");
+ try
+ {
+ sbyte desSByte = SByte.MinValue;
+ sbyte sourceSByte = (sbyte)(this.GetInt32(0, 127) + this.GetInt32(0, 128) * (-1));
+ bool retbool = sourceSByte.Equals(desSByte);
+ if (retbool)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The sbyte maxValue equals SByte minValue");
+ try
+ {
+ sbyte desSByte = SByte.MinValue;
+ sbyte sourceSByte = SByte.MaxValue;
+ bool retbool = sourceSByte.Equals(desSByte);
+ if (retbool)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: The sbyte maxValue equals 127");
+ try
+ {
+ sbyte desSByte = 127;
+ sbyte sourceSByte = SByte.MaxValue;
+ bool retbool = sourceSByte.Equals(desSByte);
+ if (!retbool)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: The sbyte minValue equals -128");
+ try
+ {
+ sbyte desSByte = -128;
+ sbyte sourceSByte = SByte.MinValue;
+ bool retbool = sourceSByte.Equals(desSByte);
+ if (!retbool)
+ {
+ TestLibrary.TestFramework.LogError("009", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/sbytegethashcode.cs b/tests/src/CoreMangLib/cti/system/sbyte/sbytegethashcode.cs
new file mode 100644
index 0000000000..22036f7403
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/sbytegethashcode.cs
@@ -0,0 +1,169 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// SByte.GetHashCode()
+/// </summary>
+public class SByteGetHashCode
+{
+ private const int midVal1 = (int)sbyte.MaxValue - (int)(sbyte.MinValue) + 2;
+ private const int midVal2 = (int)sbyte.MaxValue - (int)(sbyte.MinValue);
+ public static int Main()
+ {
+ SByteGetHashCode sbytehash = new SByteGetHashCode();
+ TestLibrary.TestFramework.BeginTestCase("SByteGetHashCode");
+ if (sbytehash.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Return the SByte MaxValue hashcode");
+ try
+ {
+ sbyte sourceVal = sbyte.MaxValue;
+ int retHashCode = sourceVal.GetHashCode();
+ if (retHashCode != midVal1*(int)(sbyte.MaxValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Return the SByte MinValue hashcode");
+ try
+ {
+ sbyte sourceVal = sbyte.MinValue;
+ int retHashCode = sourceVal.GetHashCode();
+ if (retHashCode != midVal2 * (int)sbyte.MinValue * (-1))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Return the 0 hashcode");
+ try
+ {
+ sbyte sourceVal = 0;
+ int retHashCode = sourceVal.GetHashCode();
+ if (retHashCode != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Return the random sbyte hashcode 1");
+ try
+ {
+ sbyte sourceVal = (sbyte)(this.GetInt32(1, 128));
+ int retHashCode = sourceVal.GetHashCode();
+ if (retHashCode != midVal1 * (int)(sourceVal))
+ {
+ TestLibrary.TestFramework.LogError("007", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Return the random sbyte hashcode 2");
+ try
+ {
+ sbyte sourceVal = (sbyte)(this.GetInt32(1, 129) * (-1));
+ int retHashCode = sourceVal.GetHashCode();
+ if (retHashCode != midVal2 * (int)(sourceVal)*(-1))
+ {
+ TestLibrary.TestFramework.LogError("009", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletoboolean.cs b/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletoboolean.cs
new file mode 100644
index 0000000000..6f446832ee
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletoboolean.cs
@@ -0,0 +1,201 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// SByte.System.IConvertible.ToBoolean(IFormatProvider)
+/// </summary>
+public class SByteIConvertibleToBoolean
+{
+ public static int Main()
+ {
+ SByteIConvertibleToBoolean sbyteIContBool = new SByteIConvertibleToBoolean();
+ TestLibrary.TestFramework.BeginTestCase("SByteIConvertibleToBoolean");
+ if (sbyteIContBool.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:The sbyte MaxValue IConvertible To Boolean");
+ try
+ {
+ sbyte sbyteVal = sbyte.MaxValue;
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ bool boolA = iConvert.ToBoolean(provider);
+ if (!boolA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:The sbyte MinValue IConvertible To Boolean");
+ try
+ {
+ sbyte sbyteVal = sbyte.MinValue;
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ bool boolA = iConvert.ToBoolean(null);
+ if (!boolA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:The random sbyte IConvertible To Boolean 1");
+ try
+ {
+ sbyte sbyteVal = 0;
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ bool boolA = iConvert.ToBoolean(null);
+ if (boolA)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:The random sbyte IConvertible To Boolean 2");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 127));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ bool boolA = iConvert.ToBoolean(null);
+ if (sbyteVal == 0)
+ {
+ if (boolA)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (!boolA)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest5:The random sbyte IConvertible To Boolean 3");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 128) * (-1));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ bool boolA = iConvert.ToBoolean(provider);
+ if (sbyteVal == 0)
+ {
+ if (boolA)
+ {
+ TestLibrary.TestFramework.LogError("009", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ else
+ {
+ if (!boolA)
+ {
+ TestLibrary.TestFramework.LogError("009", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletobyte.cs b/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletobyte.cs
new file mode 100644
index 0000000000..742db8b138
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletobyte.cs
@@ -0,0 +1,157 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// SByte.System.IConvertible.ToByte(IFormatProvider)
+/// </summary>
+public class SByteIConvertibleToByte
+{
+ public static int Main()
+ {
+ SByteIConvertibleToByte sbyteIConToByte = new SByteIConvertibleToByte();
+ TestLibrary.TestFramework.BeginTestCase("SByteIConvertibleToByte");
+ if (sbyteIConToByte.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:The sbyte MaxValue IConvertible To Byte");
+ try
+ {
+ sbyte sbyteVal = sbyte.MaxValue;
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ byte byteVal = iConvert.ToByte(provider);
+ if (byteVal != 127)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:The random sbyte IConvertible To Byte 1");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 128));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ byte byteVal = iConvert.ToByte(null);
+ if (byteVal != (byte)(sbyteVal))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:The random sbyte IConvertible To Byte 2");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 128));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ byte byteVal = iConvert.ToByte(provider);
+ if (byteVal != (byte)(sbyteVal))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The sbyte which out of byte range IConvertible To Byte");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(1, 129) * (-1));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ byte byteVal = iConvert.ToByte(provider);
+ TestLibrary.TestFramework.LogError("N001", "The sbyte which out of byte range IConvertible To Byte but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletochar.cs b/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletochar.cs
new file mode 100644
index 0000000000..d6f99d1dd9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletochar.cs
@@ -0,0 +1,157 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// SByte.System.IConvertible.ToChar(IFormatProvider)
+/// </summary>
+public class SByteIConvertibleToChar
+{
+ public static int Main()
+ {
+ SByteIConvertibleToChar sbyteIConToChar = new SByteIConvertibleToChar();
+ TestLibrary.TestFramework.BeginTestCase("SByteIConvertibleToChar");
+ if (sbyteIConToChar.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:The sbyte MaxValue IConvertible To Char");
+ try
+ {
+ sbyte sbyteVal = sbyte.MaxValue;
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ char charVal = iConvert.ToChar(provider);
+ if (charVal != 127)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:The random sbyte IConvertible To Char 1");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 128));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ char charVal = iConvert.ToChar(null);
+ if (charVal != (char)(sbyteVal))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:The random sbyte IConvertible To Char 2");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 128));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ char charVal = iConvert.ToChar(provider);
+ if (charVal != (char)(sbyteVal))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The sbyte which out of char range IConvertible To Char");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(1, 129) * (-1));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ char charVal = iConvert.ToChar(provider);
+ TestLibrary.TestFramework.LogError("N001", "The sbyte which out of char range IConvertible To Char but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletodecimal.cs b/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletodecimal.cs
new file mode 100644
index 0000000000..f3dc3bc97a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletodecimal.cs
@@ -0,0 +1,154 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// SByte.System.IConvertible.ToDecimal(IFormatProvider)
+/// </summary>
+public class SByteIConvertibleToDecimal
+{
+ public static int Main()
+ {
+ SByteIConvertibleToDecimal sbyteIConToDecimal = new SByteIConvertibleToDecimal();
+ TestLibrary.TestFramework.BeginTestCase("SByteIConvertibleToDecimal");
+ if (sbyteIConToDecimal.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:The sbyte MaxValue IConvertible To Decimal");
+ try
+ {
+ sbyte sbyteVal = sbyte.MaxValue;
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ decimal decimalVal = iConvert.ToDecimal(provider);
+ if (decimalVal != 127)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:The sbyte MinValue IConvertible To Decimal");
+ try
+ {
+ sbyte sbyteVal = sbyte.MinValue;
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ decimal decimalVal = iConvert.ToDecimal(null);
+ if (decimalVal != -128)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:The random sbyte IConvertible To Decimal 1");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 128));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ decimal decimalVal = iConvert.ToDecimal(provider);
+ if (decimalVal != (decimal)sbyteVal)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:The random sbyte IConvertible To Decimal 2");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 129) * (-1));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ decimal decimalVal = iConvert.ToDecimal(null);
+ if (decimalVal != (decimal)sbyteVal)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletodouble.cs b/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletodouble.cs
new file mode 100644
index 0000000000..d14efca113
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletodouble.cs
@@ -0,0 +1,158 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// SByte.System.IConvertible.ToDouble(IFormatProvider)
+/// </summary>
+public class SByteIConvertibleToDouble
+{
+ public static int Main()
+ {
+ SByteIConvertibleToDouble sbyteIConToDouble = new SByteIConvertibleToDouble();
+ TestLibrary.TestFramework.BeginTestCase("SByteIConvertibleToDouble");
+ if (sbyteIConToDouble.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:The sbyte MaxValue IConvertible To Double");
+ try
+ {
+ sbyte sbyteVal = sbyte.MaxValue;
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ double doubleVal = iConvert.ToDouble(provider);
+ if (doubleVal != 127.0)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:The sbyte MinValue IConvertible To Double");
+ try
+ {
+ sbyte sbyteVal = sbyte.MinValue;
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ double doubleVal = iConvert.ToDouble(provider);
+ if (doubleVal != -128.0)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:The random sbyte IConvertible To Double 1");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 128));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ double doubleVal = iConvert.ToDouble(provider);
+ if (doubleVal != (double)(sbyteVal))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:The random sbyte IConvertible To Double 2");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 129) * (-1));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ double doubleVal = iConvert.ToDouble(provider);
+ if (doubleVal != (double)(sbyteVal))
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletoint16.cs b/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletoint16.cs
new file mode 100644
index 0000000000..0c275b43c8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletoint16.cs
@@ -0,0 +1,158 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// SByte.System.IConvertible.ToInt16(IFormatProvider)
+/// </summary>
+public class SByteIConvertibleToInt16
+{
+ public static int Main()
+ {
+ SByteIConvertibleToInt16 sbyteIConToInt16 = new SByteIConvertibleToInt16();
+ TestLibrary.TestFramework.BeginTestCase("SByteIConvertibleToInt16");
+ if (sbyteIConToInt16.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:The sbyte MaxValue IConvertible To Int16");
+ try
+ {
+ sbyte sbyteVal = sbyte.MaxValue;
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ Int16 Int16Val = iConvert.ToInt16(provider);
+ if (Int16Val != 127)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:The sbyte MinValue IConvertible To Int16");
+ try
+ {
+ sbyte sbyteVal = sbyte.MinValue;
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ Int16 Int16Val = iConvert.ToInt16(provider);
+ if (Int16Val != -128)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:The random sbyte IConvertible To Int16 1");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 128));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ Int16 Int16Val = iConvert.ToInt16(provider);
+ if (Int16Val != (Int16)(sbyteVal))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:The random sbyte IConvertible To Int16 2");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 129) * (-1));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ Int16 Int16Val = iConvert.ToInt16(provider);
+ if (Int16Val != (Int16)(sbyteVal))
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletoint32.cs b/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletoint32.cs
new file mode 100644
index 0000000000..8759bc71b5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletoint32.cs
@@ -0,0 +1,158 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// SByte.System.IConvertible.ToInt32(IFormatProvider)
+/// </summary>
+public class SByteIConvertibleToInt32
+{
+ public static int Main()
+ {
+ SByteIConvertibleToInt32 sbyteIConToInt32 = new SByteIConvertibleToInt32();
+ TestLibrary.TestFramework.BeginTestCase("SByteIConvertibleToInt32");
+ if (sbyteIConToInt32.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:The sbyte MaxValue IConvertible To Int32");
+ try
+ {
+ sbyte sbyteVal = sbyte.MaxValue;
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ Int32 Int32Val = iConvert.ToInt32(provider);
+ if (Int32Val != 127)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:The sbyte MinValue IConvertible To Int32");
+ try
+ {
+ sbyte sbyteVal = sbyte.MinValue;
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ Int32 Int32Val = iConvert.ToInt32(provider);
+ if (Int32Val != -128)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:The random sbyte IConvertible To Int32 1");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 128));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ Int32 Int32Val = iConvert.ToInt32(provider);
+ if (Int32Val != (Int32)(sbyteVal))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:The random sbyte IConvertible To Int32 2");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 129) * (-1));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ Int32 Int32Val = iConvert.ToInt32(provider);
+ if (Int32Val != (Int32)(sbyteVal))
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletoint64.cs b/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletoint64.cs
new file mode 100644
index 0000000000..7c585a64a8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletoint64.cs
@@ -0,0 +1,158 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// SByte.System.IConvertible.ToInt64(IFormatProvider)
+/// </summary>
+public class SByteIConvertibleToInt64
+{
+ public static int Main()
+ {
+ SByteIConvertibleToInt64 sbyteIConToInt64 = new SByteIConvertibleToInt64();
+ TestLibrary.TestFramework.BeginTestCase("SByteIConvertibleToInt64");
+ if (sbyteIConToInt64.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:The sbyte MaxValue IConvertible To Int64");
+ try
+ {
+ sbyte sbyteVal = sbyte.MaxValue;
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ Int64 Int64Val = iConvert.ToInt64(provider);
+ if (Int64Val != 127)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:The sbyte MinValue IConvertible To Int64");
+ try
+ {
+ sbyte sbyteVal = sbyte.MinValue;
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ Int64 Int64Val = iConvert.ToInt64(provider);
+ if (Int64Val != -128)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:The random sbyte IConvertible To Int64 1");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 128));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ Int64 Int64Val = iConvert.ToInt64(provider);
+ if (Int64Val != (Int64)(sbyteVal))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:The random sbyte IConvertible To Int64 2");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 129) * (-1));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ Int64 Int64Val = iConvert.ToInt64(provider);
+ if (Int64Val != (Int64)(sbyteVal))
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletouint16.cs b/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletouint16.cs
new file mode 100644
index 0000000000..e16b2f53a8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletouint16.cs
@@ -0,0 +1,157 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// SByte.System.IConvertible.ToUInt16(IFormatProvider)
+/// </summary>
+public class SByteIConvertibleToUInt16
+{
+ public static int Main()
+ {
+ SByteIConvertibleToUInt16 sbyteIConToUInt16 = new SByteIConvertibleToUInt16();
+ TestLibrary.TestFramework.BeginTestCase("SByteIConvertibleToUInt16");
+ if (sbyteIConToUInt16.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:The sbyte MaxValue IConvertible To UInt16");
+ try
+ {
+ sbyte sbyteVal = sbyte.MaxValue;
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ UInt16 UInt16Val = iConvert.ToUInt16(provider);
+ if (UInt16Val != 127)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:The random sbyte IConvertible To UInt16 1");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 128));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ UInt16 UInt16Val = iConvert.ToUInt16(null);
+ if (UInt16Val != (UInt16)(sbyteVal))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:The random sbyte IConvertible To UInt16 2");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 128));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ UInt16 UInt16Val = iConvert.ToUInt16(provider);
+ if (UInt16Val != (UInt16)(sbyteVal))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The sbyte which out of UInt16 range IConvertible To UInt16");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(1, 129) * (-1));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ UInt16 UInt16Val = iConvert.ToUInt16(provider);
+ TestLibrary.TestFramework.LogError("N001", "The sbyte which out of UInt16 range IConvertible To UInt16 but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletouint32.cs b/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletouint32.cs
new file mode 100644
index 0000000000..d2c28abdc6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletouint32.cs
@@ -0,0 +1,157 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// SByte.System.IConvertible.ToUInt32(IFormatProvider)
+/// </summary>
+public class SByteIConvertibleToUInt32
+{
+ public static int Main()
+ {
+ SByteIConvertibleToUInt32 sbyteIConToUInt32 = new SByteIConvertibleToUInt32();
+ TestLibrary.TestFramework.BeginTestCase("SByteIConvertibleToUInt32");
+ if (sbyteIConToUInt32.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:The sbyte MaxValue IConvertible To UInt32");
+ try
+ {
+ sbyte sbyteVal = sbyte.MaxValue;
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ UInt32 UInt32Val = iConvert.ToUInt32(provider);
+ if (UInt32Val != 127)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:The random sbyte IConvertible To UInt32 1");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 128));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ UInt32 UInt32Val = iConvert.ToUInt32(null);
+ if (UInt32Val != (UInt32)(sbyteVal))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:The random sbyte IConvertible To UInt32 2");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 128));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ UInt32 UInt32Val = iConvert.ToUInt32(provider);
+ if (UInt32Val != (UInt32)(sbyteVal))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The sbyte which out of UInt32 range IConvertible To UInt32");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(1, 129) * (-1));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ UInt32 UInt32Val = iConvert.ToUInt32(provider);
+ TestLibrary.TestFramework.LogError("N001", "The sbyte which out of UInt32 range IConvertible To UInt32 but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletouint64.cs b/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletouint64.cs
new file mode 100644
index 0000000000..eca008f643
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/sbyteiconvertibletouint64.cs
@@ -0,0 +1,157 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// SByte.System.IConvertible.ToUInt64(IFormatProvider)
+/// </summary>
+public class SByteIConvertibleToUInt64
+{
+ public static int Main()
+ {
+ SByteIConvertibleToUInt64 sbyteIConToUInt64 = new SByteIConvertibleToUInt64();
+ TestLibrary.TestFramework.BeginTestCase("SByteIConvertibleToUInt64");
+ if (sbyteIConToUInt64.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:The sbyte MaxValue IConvertible To UInt64");
+ try
+ {
+ sbyte sbyteVal = sbyte.MaxValue;
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ UInt64 UInt64Val = iConvert.ToUInt64(provider);
+ if (UInt64Val != 127)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:The random sbyte IConvertible To UInt64 1");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 128));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ UInt64 UInt64Val = iConvert.ToUInt64(null);
+ if (UInt64Val != (UInt64)(sbyteVal))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:The random sbyte IConvertible To UInt64 2");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(0, 128));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ UInt64 UInt64Val = iConvert.ToUInt64(provider);
+ if (UInt64Val != (UInt64)(sbyteVal))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The sbyte which out of UInt64 range IConvertible To UInt64");
+ try
+ {
+ sbyte sbyteVal = (sbyte)(this.GetInt32(1, 129) * (-1));
+ IConvertible iConvert = (IConvertible)(sbyteVal);
+ UInt64 UInt64Val = iConvert.ToUInt64(provider);
+ TestLibrary.TestFramework.LogError("N001", "The sbyte which out of UInt64 range IConvertible To UInt64 but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/sbytemaxvalue.cs b/tests/src/CoreMangLib/cti/system/sbyte/sbytemaxvalue.cs
new file mode 100644
index 0000000000..0d2877273e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/sbytemaxvalue.cs
@@ -0,0 +1,77 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// SByte.MaxValue
+/// </summary>
+public class SByteMaxValue
+{
+ public static int Main()
+ {
+ SByteMaxValue sbyteMax = new SByteMaxValue();
+ TestLibrary.TestFramework.BeginTestCase("SByteMaxValue");
+ if (sbyteMax.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the SByte MaxValue 1");
+ try
+ {
+ sbyte sbMaxVal = SByte.MaxValue;
+ if (sbMaxVal != 127)
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Return the SByte MaxValue 2");
+ try
+ {
+ sbyte sbMaxVal = SByte.MaxValue;
+ if (sbMaxVal != 0x7F)
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/sbyteminvalue.cs b/tests/src/CoreMangLib/cti/system/sbyte/sbyteminvalue.cs
new file mode 100644
index 0000000000..89bc36083f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/sbyteminvalue.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// SByte.MinValue
+/// </summary>
+public class SByteMinValue
+{
+ public static int Main()
+ {
+ SByteMinValue sbyteMin = new SByteMinValue();
+ TestLibrary.TestFramework.BeginTestCase("SByteMinValue");
+ if (sbyteMin.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Return the SByte MinValue 1");
+ try
+ {
+ sbyte sbMaxVal = SByte.MinValue;
+ if (sbMaxVal != -128)
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/sbyteparse1.cs b/tests/src/CoreMangLib/cti/system/sbyte/sbyteparse1.cs
new file mode 100644
index 0000000000..99227105cb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/sbyteparse1.cs
@@ -0,0 +1,253 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// SByte.Parse(string)
+/// </summary>
+public class SByteParse1
+{
+ public static int Main()
+ {
+ SByteParse1 sbyteParse1 = new SByteParse1();
+ TestLibrary.TestFramework.BeginTestCase("SByteParse1");
+ if (sbyteParse1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: the string represents SByte maxValue");
+ try
+ {
+ string sourceStr = SByte.MaxValue.ToString();
+ sbyte desSByte = sbyte.Parse(sourceStr);
+ if (desSByte != SByte.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: the string represents SByte minValue");
+ try
+ {
+ string sourceStr = SByte.MinValue.ToString();
+ sbyte desSByte = sbyte.Parse(sourceStr);
+ if (desSByte != SByte.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: the string represents random SByte 1");
+ try
+ {
+ SByte SByteVal = -012;
+ string sourceStr = SByteVal.ToString();
+ sbyte desSByte = sbyte.Parse(sourceStr);
+ if (desSByte != -12)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: the string represents random SByte 2");
+ try
+ {
+ SByte SByteVal = +012;
+ string sourceStr = SByteVal.ToString();
+ sbyte desSByte = sbyte.Parse(sourceStr);
+ if (desSByte != 12)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: the string represents random SByte 3");
+ try
+ {
+ SByte SByteVal = (sbyte)this.GetInt32(0, 127);
+ string sourceStr = "\u0020" + "-" + SByteVal.ToString() + "\u0020";
+ sbyte desSByte = sbyte.Parse(sourceStr);
+ if (desSByte != SByteVal * (-1))
+ {
+ TestLibrary.TestFramework.LogError("009", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the string is null");
+ try
+ {
+ string sourceStr = null;
+ sbyte desSByte = sbyte.Parse(sourceStr);
+ TestLibrary.TestFramework.LogError("N001", "the string is null but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the string does not consist of an optional sign follow by a sequence of digit");
+ try
+ {
+ string sourceStr = "helloworld";
+ sbyte desSByte = sbyte.Parse(sourceStr);
+ TestLibrary.TestFramework.LogError("N003", "the string does not consist of an optional sign follow by a sequence of digit but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: the string represents digit less than SByte MinValue");
+ try
+ {
+ string sourceStr = "-129";
+ sbyte desSByte = sbyte.Parse(sourceStr);
+ TestLibrary.TestFramework.LogError("N005", "the string represents digit less than SByte MinValue");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: the string represents digit greater than SByte MaxValue");
+ try
+ {
+ string sourceStr = "128";
+ sbyte desSByte = sbyte.Parse(sourceStr);
+ TestLibrary.TestFramework.LogError("N007", "the string represents digit greater than SByte MaxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/sbyteparse2.cs b/tests/src/CoreMangLib/cti/system/sbyte/sbyteparse2.cs
new file mode 100644
index 0000000000..377168f7df
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/sbyteparse2.cs
@@ -0,0 +1,330 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// SByte.Parse(String,NumberStyle)
+/// </summary>
+public class SByteParse2
+{
+ public static int Main()
+ {
+ SByteParse2 sbyteParse2 = new SByteParse2();
+ TestLibrary.TestFramework.BeginTestCase("SByteParse2");
+ if (sbyteParse2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: the string represents SByte maxValue 1");
+ try
+ {
+ string sourceStr = SByte.MaxValue.ToString();
+ NumberStyles style = NumberStyles.Any;
+ sbyte SByteVal = sbyte.Parse(sourceStr, style);
+ if (SByteVal != sbyte.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: the string represents SByte maxValue 2");
+ try
+ {
+ string sourceStr = "7f";
+ NumberStyles style = NumberStyles.HexNumber;
+ sbyte SByteVal = sbyte.Parse(sourceStr, style);
+ if (SByteVal != sbyte.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: the string represents SByte minValue 1");
+ try
+ {
+ string sourceStr = sbyte.MinValue.ToString();
+ NumberStyles style = NumberStyles.Any;
+ sbyte SByteVal = sbyte.Parse(sourceStr, style);
+ if (SByteVal != sbyte.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: the string represents SByte minValue 2");
+ try
+ {
+ string sourceStr = "080";
+ NumberStyles style = NumberStyles.HexNumber;
+ sbyte SByteVal = sbyte.Parse(sourceStr, style);
+ if (SByteVal != sbyte.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: the string represents random SByte 1");
+ try
+ {
+ SByte SByteVal = (sbyte)this.GetInt32(0, 127);
+ NumberStyles style = NumberStyles.Any;
+ string sourceStr = SByteVal.ToString();
+ sbyte desSByte = sbyte.Parse(sourceStr, style);
+ if (desSByte != SByteVal)
+ {
+ TestLibrary.TestFramework.LogError("009", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: the string represents random SByte 2");
+ try
+ {
+ SByte SByteVal = (sbyte)this.GetInt32(0, 127);
+ NumberStyles style = NumberStyles.Any;
+ string sourceStr = "\u0020" + SByteVal.ToString() + "\u0020";
+ sbyte desSByte = sbyte.Parse(sourceStr, style);
+ if (desSByte != SByteVal)
+ {
+ TestLibrary.TestFramework.LogError("011", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: the string represents random SByte 3");
+ try
+ {
+ SByte SByteVal = (sbyte)this.GetInt32(0, 127);
+ NumberStyles style = NumberStyles.Any;
+ string sourceStr = "\u0020" + "-" + SByteVal.ToString() + "\u0020";
+ sbyte desSByte = sbyte.Parse(sourceStr, style);
+ if (desSByte != SByteVal * (-1))
+ {
+ TestLibrary.TestFramework.LogError("013", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the string is null");
+ try
+ {
+ string sourceStr = null;
+ NumberStyles style = NumberStyles.Any;
+ sbyte desSByte = sbyte.Parse(sourceStr, style);
+ TestLibrary.TestFramework.LogError("N001", "the string is null but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the string does not consist of an optional sign follow by a sequence of digit");
+ try
+ {
+ string sourceStr = "helloworld";
+ NumberStyles style = NumberStyles.Any;
+ sbyte desSByte = sbyte.Parse(sourceStr, style);
+ TestLibrary.TestFramework.LogError("N003", "the string does not consist of an optional sign follow by a sequence of digit but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: the string represents digit less than SByte MinValue");
+ try
+ {
+ string sourceStr = "-129";
+ NumberStyles style = NumberStyles.Any;
+ sbyte desSByte = sbyte.Parse(sourceStr, style);
+ TestLibrary.TestFramework.LogError("N005", "the string represents digit less than SByte MinValue");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: the string represents digit greater than SByte MaxValue");
+ try
+ {
+ string sourceStr = "128";
+ NumberStyles style = NumberStyles.Any;
+ sbyte desSByte = sbyte.Parse(sourceStr,style);
+ TestLibrary.TestFramework.LogError("N007", "the string represents digit greater than SByte MaxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest5: the NumberStyle value is not a NumberStyle");
+ try
+ {
+ string sourceStr = this.GetInt32(0, 128).ToString();
+ NumberStyles style = (NumberStyles)(-1);
+ sbyte desSByte = sbyte.Parse(sourceStr, style);
+ TestLibrary.TestFramework.LogError("N009", "the NumberStyle value is not a NumberStyle but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/sbyteparse3.cs b/tests/src/CoreMangLib/cti/system/sbyte/sbyteparse3.cs
new file mode 100644
index 0000000000..db9939429d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/sbyteparse3.cs
@@ -0,0 +1,402 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+/// SByte.Parse(String,NumberStyle,IFormatProvider)
+/// </summary>
+public class SByteParse3
+{
+ public static int Main()
+ {
+ SByteParse3 sbyteParse3 = new SByteParse3();
+ TestLibrary.TestFramework.BeginTestCase("SByteParse3");
+ if (sbyteParse3.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ IFormatProvider provider = new CultureInfo("en-us");
+ TestLibrary.TestFramework.BeginScenario("PosTest1: the string represents SByte MaxValue 1");
+ try
+ {
+ string sourceStr = SByte.MaxValue.ToString();
+ NumberStyles style = NumberStyles.Any;
+ sbyte SByteVale = sbyte.Parse(sourceStr, style, provider);
+ if (SByteVale != sbyte.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ IFormatProvider provider = new CultureInfo("el-GR");
+ TestLibrary.TestFramework.BeginScenario("PosTest2: the string represents sbyte MaxValue 2");
+ try
+ {
+ string sourceStr = sbyte.MaxValue.ToString();
+ NumberStyles style = NumberStyles.Any;
+ sbyte SByteVal = sbyte.Parse(sourceStr, style, provider);
+ if (SByteVal != sbyte.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: the string represents sbyte MinValue 1");
+ try
+ {
+ string sourceStr= sbyte.MinValue.ToString();
+ NumberStyles style = NumberStyles.Any;
+ sbyte SByteVal = sbyte.Parse(sourceStr, style, provider);
+ if (SByteVal != sbyte.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: the string represents sbyte MinValue 2");
+ try
+ {
+ string sourceStr= sbyte.MinValue.ToString();
+ NumberStyles style = NumberStyles.Any;
+ sbyte SByteVal = sbyte.Parse(sourceStr, style, provider);
+ if (SByteVal != sbyte.MinValue)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ CultureInfo mycultrue = new CultureInfo("en-us");
+ IFormatProvider provider = mycultrue.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: the string format is [ws][sign]digits[ws] 1");
+ try
+ {
+ sbyte SByteVal = (sbyte)this.GetInt32(0, 127);
+ string sourceStr = "\u0020" + "+" + SByteVal.ToString();
+ NumberStyles style = NumberStyles.Any;
+ sbyte result = sbyte.Parse(sourceStr, style, provider);
+ if (result != SByteVal)
+ {
+ TestLibrary.TestFramework.LogError("009", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ CultureInfo mycultrue = new CultureInfo("en-us");
+ IFormatProvider provider = mycultrue.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: the string format is [ws][sign]digits[ws] 2");
+
+ try
+ {
+ sbyte SByteVal = (sbyte)this.GetInt32(0, 128);
+ string sourceStr = "\u0020" + "-" + SByteVal.ToString();
+ NumberStyles style = NumberStyles.Any;
+ sbyte result = sbyte.Parse(sourceStr, style, provider);
+ if (result != SByteVal * (-1))
+ {
+ TestLibrary.TestFramework.LogError("011", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ CultureInfo mycultrue = new CultureInfo("en-us");
+ IFormatProvider provider = mycultrue.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: the string format is [ws][sign]digits[ws] 3");
+
+ try
+ {
+ sbyte SByteVal = (sbyte)this.GetInt32(0, 128);
+ string sourceStr = "\u0020" + "-" + SByteVal.ToString() + "\u0020";
+ NumberStyles style = NumberStyles.Any;
+ sbyte result = sbyte.Parse(sourceStr, style, provider);
+ if (result != SByteVal * (-1))
+ {
+ TestLibrary.TestFramework.LogError("013", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ CultureInfo mycultrue = new CultureInfo("en-us");
+ IFormatProvider provider = mycultrue.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest8: the string format is [ws][sign]digits[ws] 4");
+
+ try
+ {
+ sbyte SByteVal = (sbyte)this.GetInt32(0, 128);
+ string sourceStr = "\u0020" + "-0" + SByteVal.ToString() + "\u0020";
+ NumberStyles style = NumberStyles.Any;
+ sbyte result = sbyte.Parse(sourceStr, style, provider);
+ if (result != SByteVal * (-1))
+ {
+ TestLibrary.TestFramework.LogError("015", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest9()
+ {
+ bool retVal = true;
+ CultureInfo mycultrue = new CultureInfo("en-us");
+ IFormatProvider provider = mycultrue.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest9: the string formed with acceptable characters");
+
+ try
+ {
+ string sourceStr = "\u0020" + "7f" + "\u0020";
+ NumberStyles style = NumberStyles.HexNumber;
+ sbyte result = sbyte.Parse(sourceStr, style, provider);
+ if (result != sbyte.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("017", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the string is null");
+ try
+ {
+ string sourceStr = null;
+ NumberStyles style = NumberStyles.Any;
+ IFormatProvider provider = new CultureInfo("en-us");
+ sbyte desSByte = sbyte.Parse(sourceStr, style, provider);
+ TestLibrary.TestFramework.LogError("N001", "the string is null but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the string does not consist of an optional sign follow by a sequence of digit");
+ try
+ {
+ string sourceStr = "helloworld";
+ NumberStyles style = NumberStyles.Any;
+ IFormatProvider provider = new CultureInfo("en-us");
+ sbyte desSByte = sbyte.Parse(sourceStr, style, provider);
+ TestLibrary.TestFramework.LogError("N003", "the string does not consist of an optional sign follow by a sequence of digit but not throw exception");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: the string represents digit less than SByte MinValue");
+ try
+ {
+ string sourceStr = "-129";
+ NumberStyles style = NumberStyles.Any;
+ IFormatProvider provider = new CultureInfo("en-us");
+ sbyte desSByte = sbyte.Parse(sourceStr, style, provider);
+ TestLibrary.TestFramework.LogError("N005", "the string represents digit less than SByte MinValue");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: the string represents digit greater than SByte MaxValue");
+ try
+ {
+ string sourceStr = "128";
+ NumberStyles style = NumberStyles.Any;
+ IFormatProvider provider = new CultureInfo("en-us");
+ sbyte desSByte = sbyte.Parse(sourceStr, style, provider);
+ TestLibrary.TestFramework.LogError("N007", "the string represents digit greater than SByte MaxValue but not throw exception");
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest5: the NumberStyle value is not a NumberStyle");
+ try
+ {
+ string sourceStr = this.GetInt32(0, 128).ToString();
+ NumberStyles style = (NumberStyles)(-1);
+ IFormatProvider provider = new CultureInfo("en-us");
+ sbyte desSByte = sbyte.Parse(sourceStr, style, provider);
+ TestLibrary.TestFramework.LogError("N009", "the NumberStyle value is not a NumberStyle but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/sbyte/sbytetryparse.cs b/tests/src/CoreMangLib/cti/system/sbyte/sbytetryparse.cs
new file mode 100644
index 0000000000..b9490e5b23
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/sbyte/sbytetryparse.cs
@@ -0,0 +1,499 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+// CoreCLR Port from Co7524TryParse_all.cs
+// Tests SByte.TryParse(String), SByte.TryParse(String, NumberStyles, IFormatProvider, ref SByte)
+// 2003/04/01 KatyK
+// 2007/06/28 adapted by MarielY
+
+public class SByteTryParse
+{
+ static bool verbose = false;
+
+ public static int Main()
+ {
+ bool passed = true;
+
+ try
+ {
+ // Make the test culture independent
+ TestLibrary.Utilities.CurrentCulture = CultureInfo.InvariantCulture;
+
+ // Set up NFIs to use
+ NumberFormatInfo goodNFI = new NumberFormatInfo();
+
+ NumberFormatInfo corruptNFI = new NumberFormatInfo(); // DecimalSeparator == GroupSeparator
+ corruptNFI.NumberDecimalSeparator = ".";
+ corruptNFI.NumberGroupSeparator = ".";
+ corruptNFI.CurrencyDecimalSeparator = ".";
+ corruptNFI.CurrencyGroupSeparator = ".";
+ corruptNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo swappedNFI = new NumberFormatInfo(); // DecimalSeparator & GroupSeparator swapped
+ swappedNFI.NumberDecimalSeparator = ".";
+ swappedNFI.NumberGroupSeparator = ",";
+ swappedNFI.CurrencyDecimalSeparator = ",";
+ swappedNFI.CurrencyGroupSeparator = ".";
+ swappedNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo distinctNFI = new NumberFormatInfo(); // DecimalSeparator & GroupSeparator distinct
+ distinctNFI.NumberDecimalSeparator = ".";
+ distinctNFI.NumberGroupSeparator = ",";
+ distinctNFI.CurrencyDecimalSeparator = ":";
+ distinctNFI.CurrencyGroupSeparator = ";";
+ distinctNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo customNFI = new NumberFormatInfo();
+ customNFI.NegativeSign = "^";
+
+ NumberFormatInfo ambigNFI = new NumberFormatInfo();
+ ambigNFI.NegativeSign = "^";
+ ambigNFI.CurrencySymbol = "^";
+
+ CultureInfo germanCulture = new CultureInfo("de-DE");
+ CultureInfo japaneseCulture;
+
+ try
+ {
+ japaneseCulture = new CultureInfo("ja-JP");
+ }
+ catch (Exception)
+ {
+ TestLibrary.Logging.WriteLine("East Asian Languages are not installed. Skiping Japanese culture tests.");
+ japaneseCulture = null;
+ }
+
+ /////////// Parse(String) - We include Parse for comparison
+ passed &= VerifySByteParse("5", 5);
+ passed &= VerifySByteParse("-5", -5);
+ passed &= VerifySByteParse("5 ", 5);
+ passed &= VerifySByteParse("5\0", 5);
+ passed &= VerifySByteParse("5", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifySByteParse("-5", NumberStyles.Integer, CultureInfo.InvariantCulture, -5);
+ passed &= VerifySByteParse("5 \0", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifySByteParse("5\0\0\0", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifySByteParse("12", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0x12);
+ passed &= VerifySByteParse("fF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, -1);
+ passed &= VerifySByteParse("5", NumberStyles.Integer, goodNFI, 5);
+ passed &= VerifySByteParse("123", NumberStyles.Integer, germanCulture, 123);
+ passed &= VerifySByteParse("123", NumberStyles.Integer, japaneseCulture, 123);
+ passed &= VerifySByteParse("123,000", NumberStyles.AllowDecimalPoint, germanCulture, 123);
+ passed &= VerifySByteParse("123.000", NumberStyles.AllowDecimalPoint, japaneseCulture, 123);
+ passed &= VerifySByteParse("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 5); // currency
+ //
+ passed &= VerifySByteParse("5", NumberStyles.Integer, corruptNFI, 5);
+ passed &= VerifySByteParse("5", NumberStyles.Number, corruptNFI, 5);
+ passed &= VerifySByteParse("5.0", NumberStyles.Number, corruptNFI, 5);
+ passed &= VerifySByteParseException("5,0", NumberStyles.Number, corruptNFI, typeof(FormatException));
+ passed &= VerifySByteParseException("5.0.0", NumberStyles.Number, corruptNFI, typeof(FormatException));
+ passed &= VerifySByteParse("$5.0", NumberStyles.Currency, corruptNFI, 5);
+ passed &= VerifySByteParseException("$5,0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifySByteParseException("$5.0.0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifySByteParse("5.0", NumberStyles.Currency, corruptNFI, 5);
+ passed &= VerifySByteParseException("5,0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifySByteParseException("5.0.0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifySByteParse("5.0", NumberStyles.Any, corruptNFI, 5);
+ passed &= VerifySByteParseException("5,0", NumberStyles.Any, corruptNFI, typeof(FormatException));
+ passed &= VerifySByteParseException("5.0.0", NumberStyles.Any, corruptNFI, typeof(FormatException));
+ //
+ passed &= VerifySByteParse("5", NumberStyles.Integer, swappedNFI, 5);
+ passed &= VerifySByteParse("5", NumberStyles.Number, swappedNFI, 5);
+ passed &= VerifySByteParse("5.0", NumberStyles.Number, swappedNFI, 5);
+ passed &= VerifySByteParseException("5.000.000", NumberStyles.Number, swappedNFI, typeof(FormatException));
+ passed &= VerifySByteParse("5.0", NumberStyles.Currency, swappedNFI, 5); //???
+ passed &= VerifySByteParse("$5.0", NumberStyles.Currency, swappedNFI, 50);
+ passed &= VerifySByteParse("5.0", NumberStyles.Any, swappedNFI, 5); //?
+ passed &= VerifySByteParse("$5.0", NumberStyles.Any, swappedNFI, 50);
+ passed &= VerifySByteParse("5,0", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifySByteParse("$5,0", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifySByteParse("5,000", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifySByteParse("$5,000", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifySByteParse("5,000", NumberStyles.Any, swappedNFI, 5);
+ passed &= VerifySByteParse("$5,000", NumberStyles.Any, swappedNFI, 5);
+ //
+ passed &= VerifySByteParse("5.0", NumberStyles.Number, distinctNFI, 5);
+ passed &= VerifySByteParse("5.0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifySByteParse("5.0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifySByteParseException("$5.0", NumberStyles.Currency, distinctNFI, typeof(FormatException));
+ passed &= VerifySByteParseException("$5.0", NumberStyles.Any, distinctNFI, typeof(FormatException));
+ passed &= VerifySByteParseException("5:0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifySByteParseException("$5:0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifySByteParse("5:0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifySByteParse("$5:0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifySByteParse("5:0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifySByteParse("$5:0", NumberStyles.Any, distinctNFI, 5);
+ //
+ passed &= VerifySByteParseException("200", typeof(OverflowException));
+ passed &= VerifySByteParseException("-200", typeof(OverflowException));
+ passed &= VerifySByteParseException("Garbage", typeof(FormatException));
+ passed &= VerifySByteParseException("5\0Garbage", typeof(FormatException));
+ passed &= VerifySByteParseException(null, typeof(ArgumentNullException));
+ passed &= VerifySByteParseException("1FF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, typeof(OverflowException));
+ passed &= VerifySByteParseException("FFFFFFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, typeof(OverflowException));
+ passed &= VerifySByteParseException("5", NumberStyles.AllowHexSpecifier | NumberStyles.AllowParentheses, null, typeof(ArgumentException));
+ passed &= VerifySByteParseException("4", (NumberStyles)(-1), typeof(ArgumentException));
+ passed &= VerifySByteParseException("4", (NumberStyles)0x10000, typeof(ArgumentException));
+ passed &= VerifySByteParseException("4", (NumberStyles)(-1), CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifySByteParseException("4", (NumberStyles)0x10000, CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifySByteParseException("123.000", NumberStyles.Any, germanCulture, typeof(OverflowException));
+ passed &= VerifySByteParseException("123,000", NumberStyles.Any, japaneseCulture, typeof(OverflowException));
+ passed &= VerifySByteParseException("123,000", NumberStyles.Integer, germanCulture, typeof(FormatException));
+ passed &= VerifySByteParseException("123.000", NumberStyles.Integer, japaneseCulture, typeof(FormatException));
+ passed &= VerifySByteParseException("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Integer, germanCulture, typeof(FormatException)); // currency
+
+
+ /////////// TryParse(String)
+ //// Pass cases
+ passed &= VerifySByteTryParse("5", 5, true);
+ passed &= VerifySByteTryParse("-5", -5, true);
+ passed &= VerifySByteTryParse(" 5 ", 5, true);
+ passed &= VerifySByteTryParse("5\0", 5, true);
+ passed &= VerifySByteTryParse("5 \0", 5, true);
+ passed &= VerifySByteTryParse("5\0\0\0", 5, true);
+ passed &= VerifySByteTryParse(SByte.MaxValue.ToString(), SByte.MaxValue, true);
+ passed &= VerifySByteTryParse(SByte.MinValue.ToString(), SByte.MinValue, true);
+
+ //// Fail cases
+ passed &= VerifySByteTryParse(null, 0, false);
+ passed &= VerifySByteTryParse("", 0, false);
+ passed &= VerifySByteTryParse("Garbage", 0, false);
+ passed &= VerifySByteTryParse("5\0Garbage", 0, false);
+ passed &= VerifySByteTryParse("300", 0, false);
+ passed &= VerifySByteTryParse("FF", 0, false);
+ passed &= VerifySByteTryParse("27.3", 0, false);
+ passed &= VerifySByteTryParse("23 5", 0, false);
+ passed &= VerifySByteTryParse("200", 0, false);
+ passed &= VerifySByteTryParse("-200", 0, false);
+
+
+ /////////// TryParse(TryParse(String, NumberStyles, IFormatProvider, ref SByte)
+ //// Pass cases
+ passed &= VerifySByteTryParse("5", NumberStyles.Integer, CultureInfo.InvariantCulture, 5, true);
+ passed &= VerifySByteTryParse("-5", NumberStyles.Integer, CultureInfo.InvariantCulture, -5, true);
+ // Variations on NumberStyles
+ passed &= VerifySByteTryParse("12", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0x12, true);
+ passed &= VerifySByteTryParse("FF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, -1, true);
+ passed &= VerifySByteTryParse("fF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, -1, true);
+ passed &= VerifySByteTryParse(" 5", NumberStyles.AllowLeadingWhite, goodNFI, 5, true);
+ passed &= VerifySByteTryParse("5", NumberStyles.Number, goodNFI, 5, true);
+ // Variations on IFP
+ passed &= VerifySByteTryParse("5", NumberStyles.Integer, goodNFI, 5, true);
+ passed &= VerifySByteTryParse("5", NumberStyles.Integer, null, 5, true);
+ passed &= VerifySByteTryParse("5", NumberStyles.Integer, new DateTimeFormatInfo(), 5, true);
+ passed &= VerifySByteTryParse("^42", NumberStyles.Any, customNFI, -42, true);
+ passed &= VerifySByteTryParse("123", NumberStyles.Integer, germanCulture, 123, true);
+ passed &= VerifySByteTryParse("123", NumberStyles.Integer, japaneseCulture, 123, true);
+ passed &= VerifySByteTryParse("123,000", NumberStyles.AllowDecimalPoint, germanCulture, 123, true);
+ passed &= VerifySByteTryParse("123.000", NumberStyles.AllowDecimalPoint, japaneseCulture, 123, true);
+ passed &= VerifySByteTryParse("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 5, true); // currency
+
+ //// Fail cases
+ passed &= VerifySByteTryParse("FF", NumberStyles.Integer, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifySByteTryParse("1FF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifySByteTryParse("FFFFFFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifySByteTryParse("-42", NumberStyles.Any, customNFI, 0, false);
+ passed &= VerifySByteTryParse("5.3", NumberStyles.AllowDecimalPoint, goodNFI, 0, false);
+ passed &= VerifySByteTryParse("5 ", NumberStyles.AllowLeadingWhite, goodNFI, 0, false);
+ passed &= VerifySByteTryParse("123.000", NumberStyles.Any, germanCulture, 0, false);
+ passed &= VerifySByteTryParse("123,000", NumberStyles.Any, japaneseCulture, 0, false);
+ passed &= VerifySByteTryParse("123,000", NumberStyles.Integer, germanCulture, 0, false);
+ passed &= VerifySByteTryParse("123.000", NumberStyles.Integer, japaneseCulture, 0, false);
+ passed &= VerifySByteTryParse("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Integer, germanCulture, 0, false); // currency
+
+ //// Exception cases
+ passed &= VerifySByteTryParseException("5", NumberStyles.AllowHexSpecifier | NumberStyles.AllowParentheses, null, typeof(ArgumentException));
+ passed &= VerifySByteTryParseException("4", (NumberStyles)(-1), CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifySByteTryParseException("4", (NumberStyles)0x10000, CultureInfo.InvariantCulture, typeof(ArgumentException));
+
+ // NumberStyles/NFI variations
+ //
+ passed &= VerifySByteTryParse("5", NumberStyles.Integer, corruptNFI, 5, true);
+ passed &= VerifySByteTryParse("5", NumberStyles.Number, corruptNFI, 5, true);
+ passed &= VerifySByteTryParse("5.0", NumberStyles.Number, corruptNFI, 5, true);
+ passed &= VerifySByteTryParse("5,0", NumberStyles.Number, corruptNFI, 0, false);
+ passed &= VerifySByteTryParse("5.0.0", NumberStyles.Number, corruptNFI, 0, false);
+ passed &= VerifySByteTryParse("$5.0", NumberStyles.Currency, corruptNFI, 5, true);
+ passed &= VerifySByteTryParse("$5,0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifySByteTryParse("$5.0.0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifySByteTryParse("5.0", NumberStyles.Currency, corruptNFI, 5, true);
+ passed &= VerifySByteTryParse("5,0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifySByteTryParse("5.0.0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifySByteTryParse("5.0", NumberStyles.Any, corruptNFI, 5, true);
+ passed &= VerifySByteTryParse("5,0", NumberStyles.Any, corruptNFI, 0, false);
+ passed &= VerifySByteTryParse("5.0.0", NumberStyles.Any, corruptNFI, 0, false);
+ //
+ passed &= VerifySByteTryParse("5", NumberStyles.Integer, swappedNFI, 5, true);
+ passed &= VerifySByteTryParse("5", NumberStyles.Number, swappedNFI, 5, true);
+ passed &= VerifySByteTryParse("5.0", NumberStyles.Number, swappedNFI, 5, true);
+ passed &= VerifySByteTryParse("5.000.000", NumberStyles.Number, swappedNFI, 0, false);
+ passed &= VerifySByteTryParse("5.0", NumberStyles.Currency, swappedNFI, 5, true); //???
+ passed &= VerifySByteTryParse("$5.0", NumberStyles.Currency, swappedNFI, 50, true);
+ passed &= VerifySByteTryParse("5.0", NumberStyles.Any, swappedNFI, 5, true); //?
+ passed &= VerifySByteTryParse("$5.0", NumberStyles.Any, swappedNFI, 50, true);
+ passed &= VerifySByteTryParse("5,0", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifySByteTryParse("$5,0", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifySByteTryParse("5,000", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifySByteTryParse("$5,000", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifySByteTryParse("5,000", NumberStyles.Any, swappedNFI, 5, true);
+ passed &= VerifySByteTryParse("$5,000", NumberStyles.Any, swappedNFI, 5, true);
+ //
+ passed &= VerifySByteTryParse("5.0", NumberStyles.Number, distinctNFI, 5, true);
+ passed &= VerifySByteTryParse("5.0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifySByteTryParse("5.0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifySByteTryParse("$5.0", NumberStyles.Currency, distinctNFI, 0, false);
+ passed &= VerifySByteTryParse("$5.0", NumberStyles.Any, distinctNFI, 0, false);
+ passed &= VerifySByteTryParse("5:0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifySByteTryParse("$5:0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifySByteTryParse("5:0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifySByteTryParse("$5:0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifySByteTryParse("5:0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifySByteTryParse("$5:0", NumberStyles.Any, distinctNFI, 5, true);
+
+
+ // Should these pass or fail? Current parse behavior is to pass, so they might be
+ // parse bugs, but they're not tryparse bugs.
+ passed &= VerifySByteParse("5", NumberStyles.Float, goodNFI, 5);
+ passed &= VerifySByteTryParse("5", NumberStyles.Float, goodNFI, 5, true);
+ passed &= VerifySByteParse("5", NumberStyles.AllowDecimalPoint, goodNFI, 5);
+ passed &= VerifySByteTryParse("5", NumberStyles.AllowDecimalPoint, goodNFI, 5, true);
+ // I expect ArgumentException with an ambiguous NFI
+ passed &= VerifySByteParse("^42", NumberStyles.Any, ambigNFI, -42);
+ passed &= VerifySByteTryParse("^42", NumberStyles.Any, ambigNFI, -42, true);
+
+ /// END TEST CASES
+ }
+ catch (Exception e)
+ {
+ TestLibrary.Logging.WriteLine("Unexpected exception!! " + e.ToString());
+ passed = false;
+ }
+
+ if (passed)
+ {
+ TestLibrary.Logging.WriteLine("paSs");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.Logging.WriteLine("FAiL");
+ return 1;
+ }
+ }
+
+ public static bool VerifySByteTryParse(string value, SByte expectedResult, bool expectedReturn)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: SByte.TryParse, Value = '{0}', Expected Result = {1}, Expected Return = {2}",
+ value, expectedResult, expectedReturn);
+ }
+ SByte result = 0;
+ try
+ {
+ bool returnValue = SByte.TryParse(value, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedReturn, returnValue);
+ return false;
+ }
+ if (result != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, result);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifySByteTryParse(string value, NumberStyles style, IFormatProvider provider, SByte expectedResult, bool expectedReturn)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: SByte.TryParse, Value = '{0}', Style = {1}, Provider = {2}, Expected Result = {3}, Expected Return = {4}",
+ value, style, provider, expectedResult, expectedReturn);
+ }
+ SByte result = 0;
+ try
+ {
+ bool returnValue = SByte.TryParse(value, style, provider, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Style = {1}, Provider = {2}, Expected Return = {3}, Actual Return = {4}",
+ value, style, provider, expectedReturn, returnValue);
+ return false;
+ }
+ if (result != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, result);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifySByteTryParseException(string value, NumberStyles style, IFormatProvider provider, Type exceptionType)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: SByte.TryParse, Value = '{0}', Style = {1}, Provider = {2}, Expected Exception = {3}",
+ value, style, provider, exceptionType);
+ }
+ try
+ {
+ SByte result = 0;
+ Boolean returnValue = SByte.TryParse(value, style, provider, out result);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifySByteParse(string value, SByte expectedResult)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: SByte.Parse, Value = '{0}', Expected Result, {1}",
+ value, expectedResult);
+ }
+ try
+ {
+ SByte returnValue = SByte.Parse(value);
+ if (returnValue != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, returnValue);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifySByteParse(string value, NumberStyles style, IFormatProvider provider, SByte expectedResult)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: SByte.Parse, Value = '{0}', Style = {1}, provider = {2}, Expected Result = {3}",
+ value, style, provider, expectedResult);
+ }
+ try
+ {
+ SByte returnValue = SByte.Parse(value, style, provider);
+ if (returnValue != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, returnValue);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifySByteParseException(string value, Type exceptionType)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: SByte.Parse, Value = '{0}', Expected Exception, {1}",
+ value, exceptionType);
+ }
+ try
+ {
+ SByte returnValue = SByte.Parse(value);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifySByteParseException(string value, NumberStyles style, Type exceptionType)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: SByte.Parse, Value = '{0}', Style = {1}, Expected Exception = {3}",
+ value, style, exceptionType);
+ }
+ try
+ {
+ SByte returnValue = SByte.Parse(value, style);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifySByteParseException(string value, NumberStyles style, IFormatProvider provider, Type exceptionType)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: SByte.Parse, Value = '{0}', Style = {1}, Provider = {2}, Expected Exception = {3}",
+ value, style, provider, exceptionType);
+ }
+ try
+ {
+ SByte returnValue = SByte.Parse(value, style, provider);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/security/securityexception/SecurityExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/security/securityexception/SecurityExceptionCtor1.csproj
new file mode 100644
index 0000000000..ddd7cf72c7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/security/securityexception/SecurityExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="securityexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/security/securityexception/SecurityExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/security/securityexception/SecurityExceptionCtor2.csproj
new file mode 100644
index 0000000000..04cf0e9a53
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/security/securityexception/SecurityExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="securityexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/security/securityexception/SecurityExceptionCtor3.csproj b/tests/src/CoreMangLib/cti/system/security/securityexception/SecurityExceptionCtor3.csproj
new file mode 100644
index 0000000000..e7afd4cf1d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/security/securityexception/SecurityExceptionCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="securityexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/security/securityexception/SecurityExceptionToString.csproj b/tests/src/CoreMangLib/cti/system/security/securityexception/SecurityExceptionToString.csproj
new file mode 100644
index 0000000000..aa275717e9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/security/securityexception/SecurityExceptionToString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="securityexceptiontostring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/security/securityexception/securityexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/security/securityexception/securityexceptionctor1.cs
new file mode 100644
index 0000000000..2fc598f548
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/security/securityexception/securityexceptionctor1.cs
@@ -0,0 +1,65 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Security;
+
+public class SecurityExceptionCtor1
+{
+ public static int Main()
+ {
+ SecurityExceptionCtor1 ac = new SecurityExceptionCtor1();
+
+ TestLibrary.TestFramework.BeginTestCase("SecurityExceptionCtor1");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ SecurityException sec;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: SecurityException.Ctor");
+
+ try
+ {
+ sec = new SecurityException();
+
+ if (null == sec.Message)
+ {
+ TestLibrary.TestFramework.LogError("000", "Message is null!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/security/securityexception/securityexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/security/securityexception/securityexceptionctor2.cs
new file mode 100644
index 0000000000..7cf4083b84
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/security/securityexception/securityexceptionctor2.cs
@@ -0,0 +1,70 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Security;
+
+public class SecurityExceptionCtor2
+{
+ private const int c_MINLEN = 10;
+ private const int c_MAXLEN = 1024;
+
+ public static int Main()
+ {
+ SecurityExceptionCtor2 ac = new SecurityExceptionCtor2();
+
+ TestLibrary.TestFramework.BeginTestCase("SecurityExceptionCtor2");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ SecurityException sec;
+ string msg;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: SecurityException.Ctor(string)");
+
+ try
+ {
+ msg = TestLibrary.Generator.GetString(-55, false, c_MINLEN, c_MAXLEN);
+ sec = new SecurityException(msg);
+
+ if (!sec.Message.Equals(msg))
+ {
+ TestLibrary.TestFramework.LogError("000", "Message mismatch: Expected("+msg+") Actual("+sec.Message+")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/security/securityexception/securityexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/security/securityexception/securityexceptionctor3.cs
new file mode 100644
index 0000000000..6ae551504f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/security/securityexception/securityexceptionctor3.cs
@@ -0,0 +1,86 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Security;
+
+public class SecurityExceptionCtor3
+{
+ private const int c_MINLEN = 10;
+ private const int c_MAXLEN = 1024;
+
+ public static int Main()
+ {
+ SecurityExceptionCtor3 ac = new SecurityExceptionCtor3();
+
+ TestLibrary.TestFramework.BeginTestCase("SecurityExceptionCtor3");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ SecurityException sec;
+ Exception eh;
+ string msg1;
+ string msg2;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: SecurityException.Ctor(string, exception)");
+
+ try
+ {
+ msg1 = TestLibrary.Generator.GetString(-55, false, c_MINLEN, c_MAXLEN);
+ msg2 = TestLibrary.Generator.GetString(-55, false, c_MINLEN, c_MAXLEN);
+ eh = new Exception(msg2);
+ sec = new SecurityException(msg1, eh);
+
+ if (!sec.Message.Equals(msg1))
+ {
+ TestLibrary.TestFramework.LogError("000", "Message mismatch: Expected("+msg1+") Actual("+sec.Message+")");
+ retVal = false;
+ }
+
+ if (null == sec.InnerException)
+ {
+ TestLibrary.TestFramework.LogError("001", "InnerException should not be null");
+ retVal = false;
+ }
+
+ if (null != sec.InnerException && !sec.InnerException.Message.Equals(msg2))
+ {
+ TestLibrary.TestFramework.LogError("002", "InnerException Message mismatch: Expected("+msg2+") Actual("+sec.InnerException.Message+")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/security/securityexception/securityexceptiontostring.cs b/tests/src/CoreMangLib/cti/system/security/securityexception/securityexceptiontostring.cs
new file mode 100644
index 0000000000..f6d767ca42
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/security/securityexception/securityexceptiontostring.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Security;
+
+public class SecurityExceptionToString
+{
+ private const int c_MINLEN = 10;
+ private const int c_MAXLEN = 1024;
+
+ public static int Main()
+ {
+ SecurityExceptionToString ac = new SecurityExceptionToString();
+
+ TestLibrary.TestFramework.BeginTestCase("SecurityExceptionToString");
+
+ if (ac.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ SecurityException sec;
+ string msg;
+ string str;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: SecurityException.ToString()");
+
+ try
+ {
+ msg = TestLibrary.Generator.GetString(-55, false, c_MINLEN, c_MAXLEN);
+ sec = new SecurityException(msg);
+
+ str = sec.ToString();
+
+ if (null == str)
+ {
+ TestLibrary.TestFramework.LogError("000", "ToString returned null");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleEpsilon.csproj b/tests/src/CoreMangLib/cti/system/single/SingleEpsilon.csproj
new file mode 100644
index 0000000000..87a8bbdcad
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleEpsilon.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singleepsilon.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/single/SingleGetHashCode.csproj
new file mode 100644
index 0000000000..1644ecea96
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singlegethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleIsInfinity.csproj b/tests/src/CoreMangLib/cti/system/single/SingleIsInfinity.csproj
new file mode 100644
index 0000000000..9a823e87c2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleIsInfinity.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singleisinfinity.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleIsNaN.csproj b/tests/src/CoreMangLib/cti/system/single/SingleIsNaN.csproj
new file mode 100644
index 0000000000..cef10c92c1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleIsNaN.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singleisnan.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleIsNegativeInfinity.csproj b/tests/src/CoreMangLib/cti/system/single/SingleIsNegativeInfinity.csproj
new file mode 100644
index 0000000000..3ff6a9b1a6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleIsNegativeInfinity.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singleisnegativeinfinity.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleIsPositiveInfinity.csproj b/tests/src/CoreMangLib/cti/system/single/SingleIsPositiveInfinity.csproj
new file mode 100644
index 0000000000..5536aa18cb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleIsPositiveInfinity.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singleispositiveinfinity.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleMaxValue.csproj b/tests/src/CoreMangLib/cti/system/single/SingleMaxValue.csproj
new file mode 100644
index 0000000000..7b5a7dce41
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleMaxValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singlemaxvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleMinValue.csproj b/tests/src/CoreMangLib/cti/system/single/SingleMinValue.csproj
new file mode 100644
index 0000000000..2a2bcf2866
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleMinValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singleminvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleNaN.csproj b/tests/src/CoreMangLib/cti/system/single/SingleNaN.csproj
new file mode 100644
index 0000000000..eccaf66f38
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleNaN.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singlenan.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleParse1.csproj b/tests/src/CoreMangLib/cti/system/single/SingleParse1.csproj
new file mode 100644
index 0000000000..bc69c568d7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleParse1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singleparse1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleParse2.csproj b/tests/src/CoreMangLib/cti/system/single/SingleParse2.csproj
new file mode 100644
index 0000000000..d97cc8ccc3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleParse2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singleparse2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleToBoolean.csproj b/tests/src/CoreMangLib/cti/system/single/SingleToBoolean.csproj
new file mode 100644
index 0000000000..9a7b2907bb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleToBoolean.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singletoboolean.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleToByte.csproj b/tests/src/CoreMangLib/cti/system/single/SingleToByte.csproj
new file mode 100644
index 0000000000..5e1ac2268a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleToByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singletobyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleToChar.csproj b/tests/src/CoreMangLib/cti/system/single/SingleToChar.csproj
new file mode 100644
index 0000000000..45ce5a58ed
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleToChar.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singletochar.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleToDateTime.csproj b/tests/src/CoreMangLib/cti/system/single/SingleToDateTime.csproj
new file mode 100644
index 0000000000..f7515be996
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleToDateTime.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singletodatetime.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleToDecimal.csproj b/tests/src/CoreMangLib/cti/system/single/SingleToDecimal.csproj
new file mode 100644
index 0000000000..91813c4d9e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleToDecimal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singletodecimal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleToDouble.csproj b/tests/src/CoreMangLib/cti/system/single/SingleToDouble.csproj
new file mode 100644
index 0000000000..d2d40a50de
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleToDouble.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singletodouble.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleToInt16.csproj b/tests/src/CoreMangLib/cti/system/single/SingleToInt16.csproj
new file mode 100644
index 0000000000..1183806cf3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleToInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singletoint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleToInt32.csproj b/tests/src/CoreMangLib/cti/system/single/SingleToInt32.csproj
new file mode 100644
index 0000000000..50a5514ffa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleToInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singletoint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleToInt64.csproj b/tests/src/CoreMangLib/cti/system/single/SingleToInt64.csproj
new file mode 100644
index 0000000000..6ee398033b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleToInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singletoint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleToSByte.csproj b/tests/src/CoreMangLib/cti/system/single/SingleToSByte.csproj
new file mode 100644
index 0000000000..7f234e62bb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleToSByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singletosbyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleToSingle.csproj b/tests/src/CoreMangLib/cti/system/single/SingleToSingle.csproj
new file mode 100644
index 0000000000..f75287f4ad
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleToSingle.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singletosingle.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleToUInt16.csproj b/tests/src/CoreMangLib/cti/system/single/SingleToUInt16.csproj
new file mode 100644
index 0000000000..ef46e66036
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleToUInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singletouint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleToUInt32.csproj b/tests/src/CoreMangLib/cti/system/single/SingleToUInt32.csproj
new file mode 100644
index 0000000000..20cedf2410
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleToUInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singletouint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleToUInt64.csproj b/tests/src/CoreMangLib/cti/system/single/SingleToUInt64.csproj
new file mode 100644
index 0000000000..11b1bb4bb7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleToUInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singletouint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/SingleTryParse.csproj b/tests/src/CoreMangLib/cti/system/single/SingleTryParse.csproj
new file mode 100644
index 0000000000..71b6926d88
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/SingleTryParse.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="singletryparse.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/single/singleepsilon.cs b/tests/src/CoreMangLib/cti/system/single/singleepsilon.cs
new file mode 100644
index 0000000000..11c2cd285f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singleepsilon.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/single/singlegethashcode.cs b/tests/src/CoreMangLib/cti/system/single/singlegethashcode.cs
new file mode 100644
index 0000000000..af93605781
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singlegethashcode.cs
@@ -0,0 +1,152 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// GetHashCode
+/// </summary>
+public class SingleGetHashCode
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: check a random Single has a correct hashcode.");
+
+ try
+ {
+ Single i1 = TestLibrary.Generator.GetSingle(-55);
+ int expectValue=GetExpectValue(i1);
+ int actualValue = i1.GetHashCode();
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "GetHashCode return an error value. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: check 0 and -0 has a correct hashcode.");
+
+ try
+ {
+ Single i1 = (Single)0;
+ int expectValue = GetExpectValue(i1);
+ int actualValue = i1.GetHashCode();
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "GetHashCode return an error value. ");
+ retVal = false;
+ }
+ i1 = (Single)(-0);
+ expectValue = GetExpectValue(i1);
+ actualValue = i1.GetHashCode();
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "GetHashCode return an error value. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.3", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: check value which is not a number has a correct hashcode.");
+
+ try
+ {
+ Single i1 = Single.NaN;
+ int expectValue = GetExpectValue(i1);
+ int actualValue = i1.GetHashCode();
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "GetHashCode return an error value. ");
+ retVal = false;
+ }
+ i1 = Single.NegativeInfinity;
+ expectValue = GetExpectValue(i1);
+ actualValue = i1.GetHashCode();
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "GetHashCode return an error value. ");
+ retVal = false;
+ }
+ i1 = Single.PositiveInfinity;
+ expectValue = GetExpectValue(i1);
+ actualValue = i1.GetHashCode();
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("003.3", "GetHashCode return an error value. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.4", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ SingleGetHashCode test = new SingleGetHashCode();
+
+ TestLibrary.TestFramework.BeginTestCase("SingleGetHashCode");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region private method
+ public unsafe int GetExpectValue(float myValue )
+ {
+ int v = BitConverter.ToInt32(BitConverter.GetBytes(myValue), 0);
+ return v;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/single/singleisinfinity.cs b/tests/src/CoreMangLib/cti/system/single/singleisinfinity.cs
new file mode 100644
index 0000000000..b252d23f82
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singleisinfinity.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// IsInfinity(System.Single)
+/// </summary>
+public class SingleIsInfinity
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: check a random Single,isInfinity return false.");
+
+ try
+ {
+ Single i1 = TestLibrary.Generator.GetSingle(-55);
+ if (Single.IsInfinity(i1))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "IsInfinity should return false. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: check value which is not a number, has a correct IsInfinity return value.");
+
+ try
+ {
+ Single i1 = Single.NaN;
+ if (Single.IsInfinity(i1))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "IsInfinity should return false. ");
+ retVal = false;
+ }
+ i1 = Single.NegativeInfinity;
+ if (!Single.IsInfinity(i1))
+ {
+ TestLibrary.TestFramework.LogError("002.2", "IsInfinity should return true. ");
+ retVal = false;
+ }
+ i1 = Single.PositiveInfinity;
+ if (!Single.IsInfinity(i1))
+ {
+ TestLibrary.TestFramework.LogError("002.3", "IsInfinity should return true. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.4", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ SingleIsInfinity test = new SingleIsInfinity();
+
+ TestLibrary.TestFramework.BeginTestCase("SingleIsInfinity");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/single/singleisnan.cs b/tests/src/CoreMangLib/cti/system/single/singleisnan.cs
new file mode 100644
index 0000000000..8813a72aaa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singleisnan.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// IsNaN(System.Single)
+/// </summary>
+public class SingleIsNaN
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: check a random Single,IsNaN return false.");
+
+ try
+ {
+ Single i1 = TestLibrary.Generator.GetSingle(-55);
+ if (Single.IsNaN(i1))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "IsNaN should return false. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: check value which is not a number, has a correct IsNaN return value.");
+
+ try
+ {
+ Single i1 = Single.NaN;
+ if (!Single.IsNaN(i1))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "IsNaN should return true. ");
+ retVal = false;
+ }
+ i1 = Single.NegativeInfinity;
+ if (Single.IsNaN(i1))
+ {
+ TestLibrary.TestFramework.LogError("002.2", "IsNaN should return false. ");
+ retVal = false;
+ }
+ i1 = Single.PositiveInfinity;
+ if (Single.IsNaN(i1))
+ {
+ TestLibrary.TestFramework.LogError("002.3", "IsNaN should return false. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.4", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ SingleIsNaN test = new SingleIsNaN();
+
+ TestLibrary.TestFramework.BeginTestCase("SingleIsNaN");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/single/singleisnegativeinfinity.cs b/tests/src/CoreMangLib/cti/system/single/singleisnegativeinfinity.cs
new file mode 100644
index 0000000000..bfc0ac31ef
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singleisnegativeinfinity.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// IsNegativeInfinity(System.Single)
+/// </summary>
+public class SingleIsNegativeInfinity
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: check a random Single,IsNegativeInfinity return false.");
+
+ try
+ {
+ Single i1 = TestLibrary.Generator.GetSingle(-55);
+ if (Single.IsNegativeInfinity(i1))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "IsNegativeInfinity should return false. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: check value which is not a number, has a correct IsNegativeInfinity return value.");
+
+ try
+ {
+ Single i1 = Single.NaN;
+ if (Single.IsNegativeInfinity(i1))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "IsNegativeInfinity should return false. ");
+ retVal = false;
+ }
+ i1 = Single.NegativeInfinity;
+ if (!Single.IsNegativeInfinity(i1))
+ {
+ TestLibrary.TestFramework.LogError("002.2", "IsNegativeInfinity should return true. ");
+ retVal = false;
+ }
+ i1 = Single.PositiveInfinity;
+ if (Single.IsNegativeInfinity(i1))
+ {
+ TestLibrary.TestFramework.LogError("002.3", "IsNegativeInfinity should return false. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.4", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ SingleIsNegativeInfinity test = new SingleIsNegativeInfinity();
+
+ TestLibrary.TestFramework.BeginTestCase("SingleIsNegativeInfinity");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/single/singleispositiveinfinity.cs b/tests/src/CoreMangLib/cti/system/single/singleispositiveinfinity.cs
new file mode 100644
index 0000000000..90ca6fd053
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singleispositiveinfinity.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// IsPositiveInfinity(System.Single)
+/// </summary>
+public class SingleIsPositiveInfinity
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: check a random Single,IsPositiveInfinity return false.");
+
+ try
+ {
+ Single i1 = TestLibrary.Generator.GetSingle(-55);
+ if (Single.IsPositiveInfinity(i1))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "IsPositiveInfinity should return false. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: check value which is not a number, has a correct IsPositiveInfinity return value.");
+
+ try
+ {
+ Single i1 = Single.NaN;
+ if (Single.IsPositiveInfinity(i1))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "IsPositiveInfinity should return false. ");
+ retVal = false;
+ }
+ i1 = Single.NegativeInfinity;
+ if (Single.IsPositiveInfinity(i1))
+ {
+ TestLibrary.TestFramework.LogError("002.2", "IsPositiveInfinity should return false. ");
+ retVal = false;
+ }
+ i1 = Single.PositiveInfinity;
+ if (!Single.IsPositiveInfinity(i1))
+ {
+ TestLibrary.TestFramework.LogError("002.3", "IsPositiveInfinity should return true. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.4", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ SingleIsPositiveInfinity test = new SingleIsPositiveInfinity();
+
+ TestLibrary.TestFramework.BeginTestCase("SingleIsPositiveInfinity");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/single/singlemaxvalue.cs b/tests/src/CoreMangLib/cti/system/single/singlemaxvalue.cs
new file mode 100644
index 0000000000..cd3e31ea2b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singlemaxvalue.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/single/singleminvalue.cs b/tests/src/CoreMangLib/cti/system/single/singleminvalue.cs
new file mode 100644
index 0000000000..4862558f8e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singleminvalue.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/single/singlenan.cs b/tests/src/CoreMangLib/cti/system/single/singlenan.cs
new file mode 100644
index 0000000000..cdf66152b6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singlenan.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/single/singleparse1.cs b/tests/src/CoreMangLib/cti/system/single/singleparse1.cs
new file mode 100644
index 0000000000..16429b9da3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singleparse1.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/single/singleparse2.cs b/tests/src/CoreMangLib/cti/system/single/singleparse2.cs
new file mode 100644
index 0000000000..654dc704e3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singleparse2.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/single/singletoboolean.cs b/tests/src/CoreMangLib/cti/system/single/singletoboolean.cs
new file mode 100644
index 0000000000..7868e16e31
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singletoboolean.cs
@@ -0,0 +1,219 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToBoolean(System.IFormatProvider)
+/// </summary>
+public class SingleToBoolean
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ //CultureInfo.GetCultureInfo has been removed. Replaced by CultureInfo ctor.
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random single.");
+
+ try
+ {
+ Single i1 = TestLibrary.Generator.GetSingle(-55);
+ CultureInfo myCulture = new CultureInfo("en-us");
+ bool actualValue = ((IConvertible)i1).ToBoolean(myCulture);
+ if (!actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToBoolean return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: check Single which is not a number .");
+
+ try
+ {
+ Single i1 = Single.NaN;
+ CultureInfo myCulture = new CultureInfo("en-us");
+ bool actualValue = ((IConvertible)i1).ToBoolean(myCulture);
+ if (!actualValue)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToBoolean return failed. ");
+ retVal = false;
+ }
+ i1 = Single.NegativeInfinity;
+ actualValue = ((IConvertible)i1).ToBoolean(myCulture);
+ if (!actualValue)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "ToBoolean return failed.");
+ retVal = false;
+ }
+ i1 = Single.PositiveInfinity;
+ actualValue = ((IConvertible)i1).ToBoolean(myCulture);
+ if (!actualValue)
+ {
+ TestLibrary.TestFramework.LogError("002.3", "ToBoolean return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.4", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check a single which is -123456789.");
+
+ try
+ {
+ Single i1 = -123456789;
+ CultureInfo myCulture = new CultureInfo("en-us");
+ bool actualValue = ((IConvertible)i1).ToBoolean(myCulture);
+ if (!actualValue)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "ToBoolean return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Check a single which is 123.45e+6.");
+
+ try
+ {
+ Single i1 = (Single)123.45e+6;
+ CultureInfo myCulture = new CultureInfo("en-us");
+ bool actualValue = ((IConvertible)i1).ToBoolean(myCulture);
+ if (!actualValue)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "ToBoolean return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Check a single which is -.123.");
+
+ try
+ {
+ Single i1 = (Single)(-.123);
+ CultureInfo myCulture = new CultureInfo("en-us");
+ bool actualValue = ((IConvertible)i1).ToBoolean(myCulture);
+ if (!actualValue)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "ToBoolean return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Check a single which is +123.");
+
+ try
+ {
+ Single i1 = (Single)(+123);
+ CultureInfo myCulture = new CultureInfo("en-us");
+ bool actualValue = ((IConvertible)i1).ToBoolean(myCulture);
+ if (!actualValue)
+ {
+ TestLibrary.TestFramework.LogError("006.1", "ToBoolean return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ SingleToBoolean test = new SingleToBoolean();
+
+ TestLibrary.TestFramework.BeginTestCase("SingleToBoolean");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/single/singletobyte.cs b/tests/src/CoreMangLib/cti/system/single/singletobyte.cs
new file mode 100644
index 0000000000..f70ea7e4d7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singletobyte.cs
@@ -0,0 +1,107 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToByte(System.IFormatProvider)
+/// </summary>
+public class SingleToByte
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ //CultureInfo.GetCultureInfo has been removed. Replaced by CultureInfo ctor.
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random single.");
+
+ try
+ {
+ Single i1 = TestLibrary.Generator.GetSingle(-55);
+ CultureInfo myCulture = new CultureInfo("en-us");
+ byte expectVaule;
+ if (i1 > 0.5)
+ expectVaule = 1;
+ else
+ expectVaule = 0;
+ byte actualValue = ((IConvertible)i1).ToByte(myCulture);
+ if (actualValue != expectVaule)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToByte return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check a single which is -.123.");
+
+ try
+ {
+ Single i1 = (Single)(-.123);
+ CultureInfo myCulture = new CultureInfo("en-us");
+ byte actualValue = ((IConvertible)i1).ToByte(myCulture);
+ if (actualValue != 0)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToByte return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ SingleToByte test = new SingleToByte();
+
+ TestLibrary.TestFramework.BeginTestCase("SingleToByte");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/single/singletochar.cs b/tests/src/CoreMangLib/cti/system/single/singletochar.cs
new file mode 100644
index 0000000000..9f9cb881cb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singletochar.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/single/singletodatetime.cs b/tests/src/CoreMangLib/cti/system/single/singletodatetime.cs
new file mode 100644
index 0000000000..f5dd7958ef
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singletodatetime.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/single/singletodecimal.cs b/tests/src/CoreMangLib/cti/system/single/singletodecimal.cs
new file mode 100644
index 0000000000..0f5af87f0f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singletodecimal.cs
@@ -0,0 +1,129 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToDecimal(System.IFormatProvider)
+/// </summary>
+public class SingleToDecimal
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ //CultureInfo.GetCultureInfo has been removed. Replaced by CultureInfo ctor.
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random single.");
+
+ try
+ {
+ Single i1 = TestLibrary.Generator.GetSingle(-55);
+ CultureInfo myCulture = new CultureInfo("en-us");
+ Decimal actualValue = ((IConvertible)i1).ToDecimal(myCulture);
+ if (actualValue.ToString() != i1.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToDecimal return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check a single which is -.123.");
+
+ try
+ {
+ Single i1 = (Single)(-.123);
+ CultureInfo myCulture = new CultureInfo("en-us");
+ Decimal actualValue = ((IConvertible)i1).ToDecimal(myCulture);
+ if (actualValue!= (Decimal)(-0.123))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToDecimal return failed. ");
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check a single which is +.123.");
+
+ try
+ {
+ Single i1 = (Single)(+.123);
+ CultureInfo myCulture = new CultureInfo("en-us");
+ Decimal actualValue = ((IConvertible)i1).ToDecimal(myCulture);
+ if (actualValue != (Decimal)(+0.123))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "ToDecimal return failed. ");
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ SingleToDecimal test = new SingleToDecimal();
+
+ TestLibrary.TestFramework.BeginTestCase("SingleToDecimal");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/single/singletodouble.cs b/tests/src/CoreMangLib/cti/system/single/singletodouble.cs
new file mode 100644
index 0000000000..bbfc89edd8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singletodouble.cs
@@ -0,0 +1,129 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToDouble(System.IFormatProvider)
+/// </summary>
+public class SingleToDouble
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ //CultureInfo.GetCultureInfo has been removed. Replaced by CultureInfo ctor.
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random single.");
+
+ try
+ {
+ Single i1 = TestLibrary.Generator.GetSingle(-55);
+ CultureInfo myCulture = new CultureInfo("en-us");
+ double actualValue = ((IConvertible)i1).ToDouble(myCulture);
+ if (actualValue.ToString("G9") != i1.ToString("G9"))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToDouble return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check a single which is -.12300000339746475.");
+
+ try
+ {
+ Single i1 = (Single)(-.12300000339746475);
+ CultureInfo myCulture = new CultureInfo("en-us");
+ Double actualValue = ((IConvertible)i1).ToDouble(myCulture);
+ if (actualValue != (Double)(-.12300000339746475))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToDouble return failed. ");
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check a single which is +.12300000339746475.");
+
+ try
+ {
+ Single i1 = (Single)(+.12300000339746475);
+ CultureInfo myCulture = new CultureInfo("en-us");
+ Double actualValue = ((IConvertible)i1).ToDouble(myCulture);
+ if (actualValue != (Double)(+0.12300000339746475))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "ToDouble return failed. ");
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ SingleToDouble test = new SingleToDouble();
+
+ TestLibrary.TestFramework.BeginTestCase("SingleToDouble");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/single/singletoint16.cs b/tests/src/CoreMangLib/cti/system/single/singletoint16.cs
new file mode 100644
index 0000000000..4f79ddf175
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singletoint16.cs
@@ -0,0 +1,193 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToInt16(System.IFormatProvider)
+/// </summary>
+public class SingleToInt16
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ //CultureInfo.GetCultureInfo has been removed. Replaced by CultureInfo ctor.
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random single.");
+
+ try
+ {
+ Single i1 = TestLibrary.Generator.GetSingle(-55);
+ short expectValue = 0;
+ if (i1 > 0.5)
+ expectValue = 1;
+ else
+ expectValue = 0;
+ CultureInfo myCulture = new CultureInfo("en-us");
+ short actualValue = ((IConvertible)i1).ToInt16(myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToInt16 return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check a single which is -123.");
+
+ try
+ {
+ Single i1 = (Single)(-123);
+ CultureInfo myCulture = new CultureInfo("en-us");
+ short actualValue = ((IConvertible)i1).ToInt16(myCulture);
+ if (actualValue != (short)(-123))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToInt16 return failed. ");
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check a single which is +123.");
+
+ try
+ {
+ Single i1 = (Single)(+123);
+ CultureInfo myCulture = new CultureInfo("en-us");
+ short actualValue = ((IConvertible)i1).ToInt16(myCulture);
+ if (actualValue != (Double)(+123))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "ToInt16 return failed. ");
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Check a single which is >Int16.MaxValue.");
+
+ try
+ {
+ Single i1 = (Single)(Int16.MaxValue + 1);
+ CultureInfo myCulture = new CultureInfo("en-us");
+ short actualValue = ((IConvertible)i1).ToInt16(myCulture);
+ TestLibrary.TestFramework.LogError("101.1", "ToInt16 return failed. ");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Check a single which is <Int16.MinValue.");
+
+ try
+ {
+ Single i1 = (Single)(Int16.MinValue - 1);
+ CultureInfo myCulture = new CultureInfo("en-us");
+ short actualValue = ((IConvertible)i1).ToInt16(myCulture);
+ TestLibrary.TestFramework.LogError("102.1", "ToInt16 return failed. ");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ SingleToInt16 test = new SingleToInt16();
+
+ TestLibrary.TestFramework.BeginTestCase("SingleToInt16");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/single/singletoint32.cs b/tests/src/CoreMangLib/cti/system/single/singletoint32.cs
new file mode 100644
index 0000000000..0347c3a4d6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singletoint32.cs
@@ -0,0 +1,194 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToInt32(System.IFormatProvider)
+/// </summary>
+public class SingleToInt32
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ //CultureInfo.GetCultureInfo has been removed. Replaced by CultureInfo ctor.
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random single.");
+
+ try
+ {
+ Single i1 = TestLibrary.Generator.GetSingle(-55);
+ int expectValue = 0;
+ if (i1 > 0.5)
+ expectValue = 1;
+ else
+ expectValue = 0;
+ CultureInfo myCulture = new CultureInfo("en-us");
+ int actualValue = ((IConvertible)i1).ToInt32(myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToInt32 return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check a single which is -123.");
+
+ try
+ {
+ Single i1 = (Single)(-123);
+ CultureInfo myCulture = new CultureInfo("en-us");
+ int actualValue = ((IConvertible)i1).ToInt32(myCulture);
+ if (actualValue != (int)(-123))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToInt32 return failed. ");
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check a single which is +123.");
+
+ try
+ {
+ Single i1 = (Single)(+123);
+ CultureInfo myCulture = new CultureInfo("en-us");
+ int actualValue = ((IConvertible)i1).ToInt32(myCulture);
+ if (actualValue != (Double)(+123))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "ToInt32 return failed. ");
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Check a single which is >Int32.MaxValue.");
+
+ try
+ {
+
+ Single i1 = (float)Int32.MaxValue + 1.0f;
+ CultureInfo myCulture = new CultureInfo("en-us");
+ int actualValue = ((IConvertible)i1).ToInt32(myCulture);
+ TestLibrary.TestFramework.LogError("101.1", "ToInt32 return failed. ");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Check a single which is <Int32.MinValue.");
+
+ try
+ {
+ Single i1 = (float)Int32.MaxValue - 1.0f;
+ CultureInfo myCulture = new CultureInfo("en-us");
+ int actualValue = ((IConvertible)i1).ToInt32(myCulture);
+ TestLibrary.TestFramework.LogError("102.1", "ToInt32 return failed. ");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ SingleToInt32 test = new SingleToInt32();
+
+ TestLibrary.TestFramework.BeginTestCase("SingleToInt32");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/single/singletoint64.cs b/tests/src/CoreMangLib/cti/system/single/singletoint64.cs
new file mode 100644
index 0000000000..c64a05a3f3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singletoint64.cs
@@ -0,0 +1,193 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToInt64(System.IFormatProvider)
+/// </summary>
+public class SingleToInt64
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random single.");
+
+ try
+ {
+ Single i1 = TestLibrary.Generator.GetSingle(-55);
+ int expectValue = 0;
+ if (i1 > 0.5)
+ expectValue = 1;
+ else
+ expectValue = 0;
+ CultureInfo myCulture = new CultureInfo("en-US");
+ long actualValue = ((IConvertible)i1).ToInt64(myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToInt64 return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check a single which is -123.");
+
+ try
+ {
+ Single i1 = (Single)(-123);
+ CultureInfo myCulture = new CultureInfo("en-US");
+ long actualValue = ((IConvertible)i1).ToInt64(myCulture);
+ if (actualValue != (long)(-123))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToInt64 return failed. ");
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check a single which is +123.");
+
+ try
+ {
+ Single i1 = (Single)(+123);
+ CultureInfo myCulture = new CultureInfo("en-US");
+ long actualValue = ((IConvertible)i1).ToInt64(myCulture);
+ if (actualValue != (long)(+123))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "ToInt64 return failed. ");
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Check a single which is >Int64.MaxValue.");
+
+ try
+ {
+
+ Single i1 = (float)Int64.MaxValue + 1.0f;
+ CultureInfo myCulture = new CultureInfo("en-US");
+ long actualValue = ((IConvertible)i1).ToInt64(myCulture);
+ TestLibrary.TestFramework.LogError("101.1", "ToInt64 return failed. ");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Check a single which is <Int64.MinValue.");
+
+ try
+ {
+ Single i1 = (float)Int64.MinValue - (float)Int64.MaxValue;
+ CultureInfo myCulture = new CultureInfo("en-US");
+ long actualValue = ((IConvertible)i1).ToInt64(myCulture);
+ TestLibrary.TestFramework.LogError("102.1", "ToInt64 return failed. ");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ SingleToInt64 test = new SingleToInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("SingleToInt64");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/single/singletosbyte.cs b/tests/src/CoreMangLib/cti/system/single/singletosbyte.cs
new file mode 100644
index 0000000000..3285b93abb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singletosbyte.cs
@@ -0,0 +1,193 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToSByte(System.IFormatProvider)
+/// </summary>
+public class SingleToSByte
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random single.");
+
+ try
+ {
+ Single i1 = TestLibrary.Generator.GetSingle(-55);
+ int expectValue = 0;
+ if (i1 > 0.5)
+ expectValue = 1;
+ else
+ expectValue = 0;
+ CultureInfo myCulture = new CultureInfo("en-US");
+ sbyte actualValue = ((IConvertible)i1).ToSByte(myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToSByte return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check a single which is -123.");
+
+ try
+ {
+ Single i1 = (Single)(-123);
+ CultureInfo myCulture = new CultureInfo("en-US");
+ sbyte actualValue = ((IConvertible)i1).ToSByte(myCulture);
+ if (actualValue != (sbyte)(-123))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToSByte return failed. ");
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check a single which is +123.");
+
+ try
+ {
+ Single i1 = (Single)(+123);
+ CultureInfo myCulture = new CultureInfo("en-US");
+ sbyte actualValue = ((IConvertible)i1).ToSByte(myCulture);
+ if (actualValue != (sbyte)(+123))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "ToSByte return failed. ");
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Check a single which is >SByte.MaxValue.");
+
+ try
+ {
+
+ Single i1 = (float)SByte.MaxValue + 1.0f;
+ CultureInfo myCulture = new CultureInfo("en-US");
+ sbyte actualValue = ((IConvertible)i1).ToSByte(myCulture);
+ TestLibrary.TestFramework.LogError("101.1", "ToSByte return failed. ");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Check a single which is <SByte.MinValue.");
+
+ try
+ {
+ Single i1 = (float)SByte.MinValue - 1.0f;
+ CultureInfo myCulture = new CultureInfo("en-US");
+ sbyte actualValue = ((IConvertible)i1).ToSByte(myCulture);
+ TestLibrary.TestFramework.LogError("102.1", "ToSByte return failed. ");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ SingleToSByte test = new SingleToSByte();
+
+ TestLibrary.TestFramework.BeginTestCase("SingleToSByte");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/single/singletosingle.cs b/tests/src/CoreMangLib/cti/system/single/singletosingle.cs
new file mode 100644
index 0000000000..af85d14c5c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singletosingle.cs
@@ -0,0 +1,172 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToSingle(System.IFormatProvider)
+/// </summary>
+public class SingleToSingle
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random single.");
+
+ try
+ {
+ Single i1 = TestLibrary.Generator.GetSingle(-55);
+
+ CultureInfo myCulture = new CultureInfo("en-US");
+ Single actualValue = ((IConvertible)i1).ToSingle(myCulture);
+ if (actualValue != i1)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToSingle return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check a single which is -123.");
+
+ try
+ {
+ Single i1 = (Single)(-123);
+ CultureInfo myCulture = new CultureInfo("en-US");
+ Single actualValue = ((IConvertible)i1).ToSingle(myCulture);
+ if (actualValue != i1)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "ToSingle return failed. ");
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Check a single which is +123.");
+
+ try
+ {
+ Single i1 = (Single)(+123);
+ CultureInfo myCulture = new CultureInfo("en-US");
+ Single actualValue = ((IConvertible)i1).ToSingle(myCulture);
+ if (actualValue != i1)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "ToSingle return failed. ");
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: check a single which is not a number .");
+
+ try
+ {
+ Single i1 = Single.NaN;
+ CultureInfo myCulture = new CultureInfo("en-US");
+ Single actualValue = ((IConvertible)i1).ToSingle(myCulture);
+ if (!Single.IsNaN(actualValue))
+ {
+ TestLibrary.TestFramework.LogError("004.1", "ToSingle return failed. ");
+ retVal = false;
+ }
+ i1 = Single.NegativeInfinity;
+ myCulture = new CultureInfo("en-US");
+ actualValue = ((IConvertible)i1).ToSingle(myCulture);
+ if (!Single.IsNegativeInfinity(actualValue))
+ {
+ TestLibrary.TestFramework.LogError("004.2", "ToSingle return failed. ");
+ retVal = false;
+ }
+ i1 = Single.PositiveInfinity;
+ myCulture = new CultureInfo("en-US");
+ actualValue = ((IConvertible)i1).ToSingle(myCulture);
+ if (!Single.IsPositiveInfinity(actualValue))
+ {
+ TestLibrary.TestFramework.LogError("004.3", "ToSingle return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ SingleToSingle test = new SingleToSingle();
+
+ TestLibrary.TestFramework.BeginTestCase("SingleToSingle");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/single/singletouint16.cs b/tests/src/CoreMangLib/cti/system/single/singletouint16.cs
new file mode 100644
index 0000000000..05ea3635e6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singletouint16.cs
@@ -0,0 +1,137 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToUInt16(System.IFormatProvider)
+/// </summary>
+public class SingleToUInt16
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random single.");
+
+ try
+ {
+ Single i1 = TestLibrary.Generator.GetSingle(-55);
+ short expectValue = 0;
+ if (i1 > 0.5)
+ expectValue = 1;
+ else
+ expectValue = 0;
+ CultureInfo myCulture = new CultureInfo("en-US");
+ ushort actualValue = ((IConvertible)i1).ToUInt16(myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToUInt16 return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Check a single which is >UInt16.MaxValue.");
+
+ try
+ {
+ Single i1 = (Single)(UInt16.MaxValue + 1);
+ CultureInfo myCulture = new CultureInfo("en-US");
+ ushort actualValue = ((IConvertible)i1).ToUInt16(myCulture);
+ TestLibrary.TestFramework.LogError("101.1", "ToUInt16 return failed. ");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Check a single which is <UInt16.MinValue.");
+
+ try
+ {
+ Single i1 = (Single)(UInt16.MinValue - 1);
+ CultureInfo myCulture = new CultureInfo("en-US");
+ ushort actualValue = ((IConvertible)i1).ToUInt16(myCulture);
+ TestLibrary.TestFramework.LogError("102.1", "ToUInt16 return failed. ");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ SingleToUInt16 test = new SingleToUInt16();
+
+ TestLibrary.TestFramework.BeginTestCase("SingleToUInt16");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/single/singletouint32.cs b/tests/src/CoreMangLib/cti/system/single/singletouint32.cs
new file mode 100644
index 0000000000..5a781a3a99
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singletouint32.cs
@@ -0,0 +1,137 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToUInt32(System.IFormatProvider)
+/// </summary>
+public class SingleToUInt32
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random single.");
+
+ try
+ {
+ Single i1 = TestLibrary.Generator.GetSingle(-55);
+ short expectValue = 0;
+ if (i1 > 0.5)
+ expectValue = 1;
+ else
+ expectValue = 0;
+ CultureInfo myCulture = new CultureInfo("en-US");
+ uint actualValue = ((IConvertible)i1).ToUInt32(myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToUInt32 return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Check a single which is >UInt32.MaxValue.");
+
+ try
+ {
+ Single i1 = (float)UInt32.MaxValue + 1.0f;
+ CultureInfo myCulture = new CultureInfo("en-US");
+ uint actualValue = ((IConvertible)i1).ToUInt32(myCulture);
+ TestLibrary.TestFramework.LogError("101.1", "ToUInt32 return failed. ");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Check a single which is <UInt32.MinValue.");
+
+ try
+ {
+ Single i1 = (float)UInt32.MinValue - 1.0f;
+ CultureInfo myCulture = new CultureInfo("en-US");
+ uint actualValue = ((IConvertible)i1).ToUInt32(myCulture);
+ TestLibrary.TestFramework.LogError("102.1", "ToUInt32 return failed. ");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ SingleToUInt32 test = new SingleToUInt32();
+
+ TestLibrary.TestFramework.BeginTestCase("SingleToUInt32");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/single/singletouint64.cs b/tests/src/CoreMangLib/cti/system/single/singletouint64.cs
new file mode 100644
index 0000000000..26b1aa331b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singletouint64.cs
@@ -0,0 +1,137 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+/// <summary>
+///System.IConvertible.ToUInt64(System.IFormatProvider)
+/// </summary>
+public class SingleToUInt64
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check a random single.");
+
+ try
+ {
+ Single i1 = TestLibrary.Generator.GetSingle(-55);
+ ulong expectValue = 0;
+ if (i1 > 0.5)
+ expectValue = 1;
+ else
+ expectValue = 0;
+ CultureInfo myCulture = new CultureInfo("en-US");
+ ulong actualValue = ((IConvertible)i1).ToUInt64(myCulture);
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "ToUInt64 return failed. ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Check a single which is >UInt64.MaxValue.");
+
+ try
+ {
+ Single i1 = (float)UInt64.MaxValue + 1.0f;
+ CultureInfo myCulture = new CultureInfo("en-US");
+ ulong actualValue = ((IConvertible)i1).ToUInt64(myCulture);
+ TestLibrary.TestFramework.LogError("101.1", "ToUInt64 return failed. ");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Check a single which is <UInt64.MinValue.");
+
+ try
+ {
+ Single i1 = (float)UInt64.MinValue - 1.0f;
+ CultureInfo myCulture = new CultureInfo("en-US");
+ ulong actualValue = ((IConvertible)i1).ToUInt64(myCulture);
+ TestLibrary.TestFramework.LogError("102.1", "ToUInt64 return failed. ");
+ retVal = false;
+
+
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #endregion
+
+ public static int Main()
+ {
+ SingleToUInt64 test = new SingleToUInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("SingleToUInt64");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/single/singletryparse.cs b/tests/src/CoreMangLib/cti/system/single/singletryparse.cs
new file mode 100644
index 0000000000..9c4392ec06
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/single/singletryparse.cs
@@ -0,0 +1,615 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+// CoreCLR Port from Co7533TryParse_all.cs
+// Tests Single.TryParse(String), Single.TryParse(String, NumberStyles, IFormatProvider, ref Single)
+// 2003/04/02 KatyK
+// 2007/06/28 adapted by MarielY
+
+public class SingleTryParse
+{
+ static bool verbose = false;
+
+ public static int Main()
+ {
+ bool passed = true;
+
+ try
+ {
+ // Make the test culture independent
+ TestLibrary.Utilities.CurrentCulture = CultureInfo.InvariantCulture;
+
+ // Set up NFIs to use
+ NumberFormatInfo goodNFI = new NumberFormatInfo();
+
+ NumberFormatInfo corruptNFI = new NumberFormatInfo(); // DecimalSeparator == GroupSeparator
+ corruptNFI.NumberDecimalSeparator = ".";
+ corruptNFI.NumberGroupSeparator = ".";
+ corruptNFI.CurrencyDecimalSeparator = ".";
+ corruptNFI.CurrencyGroupSeparator = ".";
+ corruptNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo swappedNFI = new NumberFormatInfo(); // DecimalSeparator & GroupSeparator swapped
+ swappedNFI.NumberDecimalSeparator = ".";
+ swappedNFI.NumberGroupSeparator = ",";
+ swappedNFI.CurrencyDecimalSeparator = ",";
+ swappedNFI.CurrencyGroupSeparator = ".";
+ swappedNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo distinctNFI = new NumberFormatInfo(); // DecimalSeparator & GroupSeparator distinct
+ distinctNFI.NumberDecimalSeparator = ".";
+ distinctNFI.NumberGroupSeparator = ",";
+ distinctNFI.CurrencyDecimalSeparator = ":";
+ distinctNFI.CurrencyGroupSeparator = ";";
+ distinctNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo customNFI = new NumberFormatInfo();
+ customNFI.NegativeSign = "^";
+
+ NumberFormatInfo ambigNFI = new NumberFormatInfo();
+ ambigNFI.NegativeSign = "^";
+ ambigNFI.CurrencySymbol = "^";
+
+ CultureInfo germanCulture = new CultureInfo("de-DE");
+ CultureInfo japaneseCulture;
+
+ try
+ {
+ japaneseCulture = new CultureInfo("ja-JP");
+ }
+ catch (Exception)
+ {
+ TestLibrary.Logging.WriteLine("East Asian Languages are not installed. Skiping Japanese culture tests.");
+ japaneseCulture = null;
+ }
+
+ // Parse tests included for comparison/regression
+ passed &= VerifySingleParse("0", 0);
+ passed &= VerifySingleParse("5", 5);
+ passed &= VerifySingleParse("-5", -5);
+ passed &= VerifySingleParse("5 ", 5);
+ passed &= VerifySingleParse("5\0", 5);
+ passed &= VerifySingleParse("893382737", 893382737);
+ passed &= VerifySingleParse("-893382737", -893382737);
+ passed &= VerifySingleParse("1234567891", 1234567891);
+ passed &= VerifySingleParse("-1234567891", -1234567891);
+ passed &= VerifySingleParse("123456789123456789", 123456789123456789);
+ passed &= VerifySingleParse("-123456789123456789", -123456789123456789);
+ passed &= VerifySingleParse("5", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifySingleParse("-5", NumberStyles.Integer, CultureInfo.InvariantCulture, -5);
+ passed &= VerifySingleParse("5 \0", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifySingleParse("5\0\0\0", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifySingleParse("5", NumberStyles.Integer, goodNFI, 5);
+ passed &= VerifySingleParse("5.0", NumberStyles.AllowDecimalPoint, goodNFI, 5);
+ passed &= VerifySingleParse("5.3", NumberStyles.AllowDecimalPoint, goodNFI, 5.3f);
+ passed &= VerifySingleParse("123456789123456789123", 123456789123456789123.0f);
+ passed &= VerifySingleParse("-123456789123456789123", -123456789123456789123.0f);
+ passed &= VerifySingleParse("18446744073709551615", 18446744073709551615.0f);
+ passed &= VerifySingleParse("79228162514264337593543950335", 79228162514264337593543950335.0f);
+ passed &= VerifySingleParse("-79228162514264337593543950335", -79228162514264337593543950335.0f);
+ passed &= VerifySingleParse("5.555555555", 5.555555555f);
+ passed &= VerifySingleParse("1.000000", 1.0f);
+ passed &= VerifySingleParse("79228162514264337593543950336", 79228162514264337593543950336.0f);
+ passed &= VerifySingleParse("-79228162514264337593543950336", -79228162514264337593543950336.0f);
+ passed &= VerifySingleParse("3.40282347E+38", NumberStyles.Float | NumberStyles.AllowExponent, null, (float)3.40282347E+38);
+ passed &= VerifySingleParse("-3.40282347E+38 ", NumberStyles.Float | NumberStyles.AllowExponent, null, (float)-3.40282347E+38);
+ passed &= VerifySingleParse("3.402822E+38", NumberStyles.Float | NumberStyles.AllowExponent, null, 3.402822E+38f);
+ passed &= VerifySingleParse("-3.402822E+38", NumberStyles.Float | NumberStyles.AllowExponent, null, -3.402822E+38f);
+ passed &= VerifySingleParse("NaN", NumberStyles.Float, NumberFormatInfo.InvariantInfo, Single.NaN);
+ passed &= VerifySingleParse("Infinity", NumberStyles.Float, NumberFormatInfo.InvariantInfo, Single.PositiveInfinity);
+ passed &= VerifySingleParse("-Infinity", NumberStyles.Float, NumberFormatInfo.InvariantInfo, Single.NegativeInfinity);
+ passed &= VerifySingleParse("123", NumberStyles.Integer, germanCulture, 123);
+ passed &= VerifySingleParse("123", NumberStyles.Integer, japaneseCulture, 123);
+ passed &= VerifySingleParse("123.456", NumberStyles.Any, germanCulture, 123456);
+ passed &= VerifySingleParse("123,456", NumberStyles.Any, japaneseCulture, 123456);
+ passed &= VerifySingleParse("123,456", NumberStyles.AllowDecimalPoint, germanCulture, 123.456f);
+ passed &= VerifySingleParse("123.456", NumberStyles.AllowDecimalPoint, japaneseCulture, 123.456f);
+ passed &= VerifySingleParse("5,23 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 5.23f); // currency
+ passed &= VerifySingleParse("5.23 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 523); // currency
+ //
+ passed &= VerifySingleParse("5", NumberStyles.Integer, corruptNFI, 5f);
+ passed &= VerifySingleParse("5", NumberStyles.Number, corruptNFI, 5f);
+ passed &= VerifySingleParse("5.3", NumberStyles.Number, corruptNFI, 5.3f);
+ passed &= VerifySingleParseException("5,3", NumberStyles.Number, corruptNFI, typeof(FormatException));
+ passed &= VerifySingleParseException("5.2.3", NumberStyles.Number, corruptNFI, typeof(FormatException));
+ passed &= VerifySingleParse("$5.3", NumberStyles.Currency, corruptNFI, 5.3f);
+ passed &= VerifySingleParseException("$5,3", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifySingleParseException("$5.2.3", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifySingleParse("5.3", NumberStyles.Currency, corruptNFI, 5.3f);
+ passed &= VerifySingleParseException("5,3", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifySingleParseException("5.2.3", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifySingleParse("5.3", NumberStyles.Any, corruptNFI, 5.3f);
+ passed &= VerifySingleParseException("5,3", NumberStyles.Any, corruptNFI, typeof(FormatException));
+ passed &= VerifySingleParseException("5.2.3", NumberStyles.Any, corruptNFI, typeof(FormatException));
+ //
+ passed &= VerifySingleParse("5", NumberStyles.Integer, swappedNFI, 5);
+ passed &= VerifySingleParseException("1,234", NumberStyles.Integer, swappedNFI, typeof(FormatException));
+ passed &= VerifySingleParse("5", NumberStyles.Number, swappedNFI, 5);
+ passed &= VerifySingleParse("5.0", NumberStyles.Number, swappedNFI, 5);
+ passed &= VerifySingleParse("1,234", NumberStyles.Number, swappedNFI, 1234);
+ passed &= VerifySingleParse("1,234.0", NumberStyles.Number, swappedNFI, 1234);
+ passed &= VerifySingleParseException("5.000.000", NumberStyles.Number, swappedNFI, typeof(FormatException));
+ passed &= VerifySingleParseException("5.000,00", NumberStyles.Number, swappedNFI, typeof(FormatException));
+ passed &= VerifySingleParse("5.000", NumberStyles.Currency, swappedNFI, 5); //???
+ passed &= VerifySingleParseException("5.000,00", NumberStyles.Currency, swappedNFI, typeof(FormatException)); //???
+ passed &= VerifySingleParse("$5.000", NumberStyles.Currency, swappedNFI, 5000);
+ passed &= VerifySingleParse("$5.000,00", NumberStyles.Currency, swappedNFI, 5000);
+ passed &= VerifySingleParse("5.000", NumberStyles.Any, swappedNFI, 5); //?
+ passed &= VerifySingleParseException("5.000,00", NumberStyles.Any, swappedNFI, typeof(FormatException)); //?
+ passed &= VerifySingleParse("$5.000", NumberStyles.Any, swappedNFI, 5000);
+ passed &= VerifySingleParse("$5.000,00", NumberStyles.Any, swappedNFI, 5000);
+ passed &= VerifySingleParse("5,0", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifySingleParse("$5,0", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifySingleParse("5,000", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifySingleParse("$5,000", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifySingleParseException("5,000.0", NumberStyles.Currency, swappedNFI, typeof(FormatException));
+ passed &= VerifySingleParseException("$5,000.0", NumberStyles.Currency, swappedNFI, typeof(FormatException));
+ passed &= VerifySingleParse("5,000", NumberStyles.Any, swappedNFI, 5);
+ passed &= VerifySingleParse("$5,000", NumberStyles.Any, swappedNFI, 5);
+ passed &= VerifySingleParseException("5,000.0", NumberStyles.Any, swappedNFI, typeof(FormatException));
+ passed &= VerifySingleParseException("$5,000.0", NumberStyles.Any, swappedNFI, typeof(FormatException));
+ //
+ passed &= VerifySingleParse("5.0", NumberStyles.Number, distinctNFI, 5);
+ passed &= VerifySingleParse("1,234.0", NumberStyles.Number, distinctNFI, 1234);
+ passed &= VerifySingleParse("5.0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifySingleParse("1,234.0", NumberStyles.Currency, distinctNFI, 1234);
+ passed &= VerifySingleParse("5.0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifySingleParse("1,234.0", NumberStyles.Any, distinctNFI, 1234);
+ passed &= VerifySingleParseException("$5.0", NumberStyles.Currency, distinctNFI, typeof(FormatException));
+ passed &= VerifySingleParseException("$5.0", NumberStyles.Any, distinctNFI, typeof(FormatException));
+ passed &= VerifySingleParseException("5:0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifySingleParseException("5;0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifySingleParseException("$5:0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifySingleParse("5:0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifySingleParse("5:000", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifySingleParse("5;000", NumberStyles.Currency, distinctNFI, 5000);
+ passed &= VerifySingleParse("$5:0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifySingleParse("$5;0", NumberStyles.Currency, distinctNFI, 50);
+ passed &= VerifySingleParse("5:0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifySingleParse("5;0", NumberStyles.Any, distinctNFI, 50);
+ passed &= VerifySingleParse("$5:0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifySingleParse("$5;0", NumberStyles.Any, distinctNFI, 50);
+ passed &= VerifySingleParseException("123,456;789.0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifySingleParse("123,456;789.0", NumberStyles.Currency, distinctNFI, 123456789);
+ passed &= VerifySingleParse("123,456;789.0", NumberStyles.Any, distinctNFI, 123456789);
+ passed &= VerifySingleParseException("$123,456;789.0", NumberStyles.Any, distinctNFI, typeof(FormatException));
+ //
+ passed &= VerifySingleParseException("3.402822E+39", NumberStyles.Float | NumberStyles.AllowExponent, null, typeof(OverflowException));
+ passed &= VerifySingleParseException("-3.402822E+39", NumberStyles.Float | NumberStyles.AllowExponent, null, typeof(OverflowException));
+ passed &= VerifySingleParseException("1.89769313486231E+308", NumberStyles.Float | NumberStyles.AllowExponent, null, typeof(OverflowException));
+ passed &= VerifySingleParseException("-1.89769313486231E+308", NumberStyles.Float | NumberStyles.AllowExponent, null, typeof(OverflowException));
+ passed &= VerifySingleParseException("Garbage", typeof(FormatException));
+ passed &= VerifySingleParseException("5\0Garbage", typeof(FormatException));
+ passed &= VerifySingleParseException(null, typeof(ArgumentNullException));
+ passed &= VerifySingleParseException("FF", NumberStyles.HexNumber, goodNFI, typeof(ArgumentException));
+ passed &= VerifySingleParseException("4", (NumberStyles)(-1), typeof(ArgumentException));
+ passed &= VerifySingleParseException("4", (NumberStyles)0x10000, typeof(ArgumentException));
+ passed &= VerifySingleParseException("4", (NumberStyles)(-1), CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifySingleParseException("4", (NumberStyles)0x10000, CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifySingleParseException("123,000,000,000,000,000,000", NumberStyles.Any, germanCulture, typeof(FormatException));
+ passed &= VerifySingleParseException("123.000.000.000.000.000.000", NumberStyles.Any, japaneseCulture, typeof(FormatException));
+ passed &= VerifySingleParseException("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Integer, germanCulture, typeof(FormatException)); // currency
+
+
+ /////////// TryParse(String)
+ //// Pass cases
+ passed &= VerifySingleTryParse("0", 0, true);
+ passed &= VerifySingleTryParse("-0", 0, true);
+ passed &= VerifySingleTryParse("5", 5, true);
+ passed &= VerifySingleTryParse(" 5 ", 5, true);
+ passed &= VerifySingleTryParse("-5", -5, true);
+ passed &= VerifySingleTryParse("5\0", 5, true);
+ passed &= VerifySingleTryParse("5 \0", 5, true);
+ passed &= VerifySingleTryParse("5\0\0\0", 5, true);
+ passed &= VerifySingleTryParse("893382737", 893382737, true);
+ passed &= VerifySingleTryParse("-893382737", -893382737, true);
+ passed &= VerifySingleTryParse("1234567891", 1234567891, true);
+ passed &= VerifySingleTryParse("-1234567891", -1234567891, true);
+ passed &= VerifySingleTryParse("123456789123456789", 123456789123456789, true);
+ passed &= VerifySingleTryParse("-123456789123456789", -123456789123456789, true);
+ passed &= VerifySingleTryParse("123456789123456789123", 123456789123456789123.0f, true);
+ passed &= VerifySingleTryParse("-123456789123456789123", -123456789123456789123.0f, true);
+ passed &= VerifySingleTryParse("18446744073709551615", 18446744073709551615, true);
+ passed &= VerifySingleTryParse("79228162514264337593543950335", 79228162514264337593543950335.0f, true);
+ passed &= VerifySingleTryParse("-79228162514264337593543950335", -79228162514264337593543950335.0f, true);
+ passed &= VerifySingleTryParse("79228162514264337593543950336", 79228162514264337593543950336.0f, true);
+ passed &= VerifySingleTryParse("-79228162514264337593543950336", -79228162514264337593543950336.0f, true);
+ passed &= VerifySingleTryParse("7.3", 7.3f, true);
+ passed &= VerifySingleTryParse(".297", 0.297f, true);
+ passed &= VerifySingleTryParse("5.555555555", 5.555555555f, true);
+ passed &= VerifySingleTryParse("1.000000", 1.0f, true);
+ passed &= VerifySingleTryParse("1.234E+05", 123400, true);
+ passed &= VerifySingleTryParse("NaN", Single.NaN, true);
+ passed &= VerifySingleTryParse("Infinity", Single.PositiveInfinity, true);
+ passed &= VerifySingleTryParse("-Infinity", Single.NegativeInfinity, true);
+
+ //// Fail cases
+ passed &= VerifySingleTryParse(null, 0, false);
+ passed &= VerifySingleTryParse("", 0, false);
+ passed &= VerifySingleTryParse("Garbage", 0, false);
+ passed &= VerifySingleTryParse("5\0Garbage", 0, false);
+ passed &= VerifySingleTryParse("FF", 0, false);
+ passed &= VerifySingleTryParse("23 5", 0, false);
+ passed &= VerifySingleTryParse("1.234+E05", 0, false);
+
+
+ /////////// TryParse(TryParse(String, NumberStyles, IFormatProvider, ref Single)
+ //// Pass cases
+ passed &= VerifySingleTryParse("5", NumberStyles.Integer, CultureInfo.InvariantCulture, 5, true);
+ passed &= VerifySingleTryParse("-5", NumberStyles.Integer, CultureInfo.InvariantCulture, -5, true);
+ passed &= VerifySingleTryParse("-79228162514264337593543950336", NumberStyles.Integer, CultureInfo.InvariantCulture, -79228162514264337593543950336.0f, true);
+ passed &= VerifySingleTryParse("NaN", NumberStyles.Float, NumberFormatInfo.InvariantInfo, Single.NaN, true);
+ passed &= VerifySingleTryParse("Infinity", NumberStyles.Float, NumberFormatInfo.InvariantInfo, Single.PositiveInfinity, true);
+ passed &= VerifySingleTryParse("-Infinity", NumberStyles.Float, NumberFormatInfo.InvariantInfo, Single.NegativeInfinity, true);
+ // Variations on NumberStyles
+ passed &= VerifySingleTryParse(" 5", NumberStyles.AllowLeadingWhite, goodNFI, 5, true);
+ passed &= VerifySingleTryParse("5", NumberStyles.Number, goodNFI, 5, true);
+ passed &= VerifySingleTryParse("5.0", NumberStyles.AllowDecimalPoint, goodNFI, 5.0f, true);
+ passed &= VerifySingleTryParse("5.3", NumberStyles.AllowDecimalPoint, goodNFI, 5.3f, true);
+ passed &= VerifySingleTryParse("1.234E+05", NumberStyles.Float | NumberStyles.AllowExponent, goodNFI, 123400, true);
+ passed &= VerifySingleTryParse("3.40282347E+38", NumberStyles.Float | NumberStyles.AllowExponent, null, (float)3.40282347E+38, true);
+ passed &= VerifySingleTryParse("-3.40282347E+38 ", NumberStyles.Float | NumberStyles.AllowExponent, null, (float)-3.40282347E+38, true);
+ // Variations on IFP
+ passed &= VerifySingleTryParse("5", NumberStyles.Integer, goodNFI, 5, true);
+ passed &= VerifySingleTryParse("5", NumberStyles.Integer, null, 5, true);
+ passed &= VerifySingleTryParse("5", NumberStyles.Integer, new DateTimeFormatInfo(), 5, true);
+ passed &= VerifySingleTryParse("^42", NumberStyles.Any, customNFI, -42, true);
+ passed &= VerifySingleTryParse("123", NumberStyles.Integer, germanCulture, 123, true);
+ passed &= VerifySingleTryParse("123", NumberStyles.Integer, japaneseCulture, 123, true);
+ passed &= VerifySingleTryParse("123.456", NumberStyles.Any, germanCulture, 123456, true);
+ passed &= VerifySingleTryParse("123,456", NumberStyles.Any, japaneseCulture, 123456, true);
+ passed &= VerifySingleTryParse("123,456", NumberStyles.AllowDecimalPoint, germanCulture, 123.456f, true);
+ passed &= VerifySingleTryParse("123.456", NumberStyles.AllowDecimalPoint, japaneseCulture, 123.456f, true);
+ passed &= VerifySingleTryParse("5,23 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 5.23f, true); // currency
+ passed &= VerifySingleTryParse("5.23 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 523, true); // currency
+ //
+ //// Fail cases
+ passed &= VerifySingleTryParse("-42", NumberStyles.Any, customNFI, 0, false);
+ passed &= VerifySingleTryParse("5 ", NumberStyles.AllowLeadingWhite, goodNFI, 0, false);
+ passed &= VerifySingleTryParse("5.3", NumberStyles.None, goodNFI, 0, false);
+ passed &= VerifySingleTryParse("1.234E+05", NumberStyles.AllowExponent, goodNFI, 0, false);
+ passed &= VerifySingleTryParse("3.40282347E+39", NumberStyles.Float | NumberStyles.AllowExponent, null, 0, false);
+ passed &= VerifySingleTryParse("-3.40282347E+39", NumberStyles.Float | NumberStyles.AllowExponent, null, 0, false);
+ passed &= VerifySingleTryParse("1.79769313486231E+308", NumberStyles.Float | NumberStyles.AllowExponent, null, 0, false);
+ passed &= VerifySingleTryParse("-1.79769313486231E+308", NumberStyles.Float | NumberStyles.AllowExponent, null, 0, false);
+ passed &= VerifySingleTryParse("-1.79769313486231E+309", NumberStyles.Float | NumberStyles.AllowExponent, null, 0, false);
+ passed &= VerifySingleTryParse("1.89769313486231E+308", NumberStyles.Float | NumberStyles.AllowExponent, null, 0, false);
+ passed &= VerifySingleTryParse("-1.89769313486231E+308", NumberStyles.Float | NumberStyles.AllowExponent, null, 0, false);
+ passed &= VerifySingleTryParse("123,000,000,000,000,000,000", NumberStyles.Any, germanCulture, 0, false);
+ passed &= VerifySingleTryParse("123.000.000.000.000.000.000", NumberStyles.Any, japaneseCulture, 0, false);
+
+ //// Exception cases
+ passed &= VerifySingleTryParseException("12", NumberStyles.HexNumber, CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifySingleTryParseException("5", NumberStyles.AllowHexSpecifier | NumberStyles.AllowParentheses, null, typeof(ArgumentException));
+ passed &= VerifySingleTryParseException("4", (NumberStyles)(-1), CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifySingleTryParseException("4", (NumberStyles)0x10000, CultureInfo.InvariantCulture, typeof(ArgumentException));
+
+ // NumberStyles/NFI variations
+ //
+ passed &= VerifySingleTryParse("5", NumberStyles.Integer, corruptNFI, 5, true);
+ passed &= VerifySingleTryParse("5", NumberStyles.Number, corruptNFI, 5, true);
+ passed &= VerifySingleTryParse("5.3", NumberStyles.Number, corruptNFI, 5.3f, true);
+ passed &= VerifySingleTryParse("5,3", NumberStyles.Number, corruptNFI, 0, false);
+ passed &= VerifySingleTryParse("5.2.3", NumberStyles.Number, corruptNFI, 0, false);
+ passed &= VerifySingleTryParse("$5.3", NumberStyles.Currency, corruptNFI, 5.3f, true);
+ passed &= VerifySingleTryParse("$5,3", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifySingleTryParse("$5.2.3", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifySingleTryParse("5.3", NumberStyles.Currency, corruptNFI, 5.3f, true);
+ passed &= VerifySingleTryParse("5,3", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifySingleTryParse("5.2.3", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifySingleTryParse("5.3", NumberStyles.Any, corruptNFI, 5.3f, true);
+ passed &= VerifySingleTryParse("5,3", NumberStyles.Any, corruptNFI, 0, false);
+ passed &= VerifySingleTryParse("5.2.3", NumberStyles.Any, corruptNFI, 0, false);
+ //
+ passed &= VerifySingleTryParse("5", NumberStyles.Integer, swappedNFI, 5, true);
+ passed &= VerifySingleTryParse("1,234", NumberStyles.Integer, swappedNFI, 0, false);
+ passed &= VerifySingleTryParse("5", NumberStyles.Number, swappedNFI, 5, true);
+ passed &= VerifySingleTryParse("5.0", NumberStyles.Number, swappedNFI, 5, true);
+ passed &= VerifySingleTryParse("1,234", NumberStyles.Number, swappedNFI, 1234, true);
+ passed &= VerifySingleTryParse("1,234.0", NumberStyles.Number, swappedNFI, 1234, true);
+ passed &= VerifySingleTryParse("5.000.000", NumberStyles.Number, swappedNFI, 0, false);
+ passed &= VerifySingleTryParse("5.000,00", NumberStyles.Number, swappedNFI, 0, false);
+ passed &= VerifySingleTryParse("5.000", NumberStyles.Currency, swappedNFI, 5, true); //???
+ passed &= VerifySingleTryParse("5.000,00", NumberStyles.Currency, swappedNFI, 0, false); //???
+ passed &= VerifySingleTryParse("$5.000", NumberStyles.Currency, swappedNFI, 5000, true);
+ passed &= VerifySingleTryParse("$5.000,00", NumberStyles.Currency, swappedNFI, 5000, true);
+ passed &= VerifySingleTryParse("5.000", NumberStyles.Any, swappedNFI, 5, true); //?
+ passed &= VerifySingleTryParse("5.000,00", NumberStyles.Any, swappedNFI, 0, false); //?
+ passed &= VerifySingleTryParse("$5.000", NumberStyles.Any, swappedNFI, 5000, true);
+ passed &= VerifySingleTryParse("$5.000,00", NumberStyles.Any, swappedNFI, 5000, true);
+ passed &= VerifySingleTryParse("5,0", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifySingleTryParse("$5,0", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifySingleTryParse("5,000", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifySingleTryParse("$5,000", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifySingleTryParse("5,000.0", NumberStyles.Currency, swappedNFI, 0, false);
+ passed &= VerifySingleTryParse("$5,000.0", NumberStyles.Currency, swappedNFI, 0, false);
+ passed &= VerifySingleTryParse("5,000", NumberStyles.Any, swappedNFI, 5, true);
+ passed &= VerifySingleTryParse("$5,000", NumberStyles.Any, swappedNFI, 5, true);
+ passed &= VerifySingleTryParse("5,000.0", NumberStyles.Any, swappedNFI, 0, false);
+ passed &= VerifySingleTryParse("$5,000.0", NumberStyles.Any, swappedNFI, 0, false);
+ //
+ passed &= VerifySingleTryParse("5.0", NumberStyles.Number, distinctNFI, 5, true);
+ passed &= VerifySingleTryParse("1,234.0", NumberStyles.Number, distinctNFI, 1234, true);
+ passed &= VerifySingleTryParse("5.0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifySingleTryParse("1,234.0", NumberStyles.Currency, distinctNFI, 1234, true);
+ passed &= VerifySingleTryParse("5.0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifySingleTryParse("1,234.0", NumberStyles.Any, distinctNFI, 1234, true);
+ passed &= VerifySingleTryParse("$5.0", NumberStyles.Currency, distinctNFI, 0, false);
+ passed &= VerifySingleTryParse("$5.0", NumberStyles.Any, distinctNFI, 0, false);
+ passed &= VerifySingleTryParse("5:0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifySingleTryParse("5;0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifySingleTryParse("$5:0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifySingleTryParse("5:0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifySingleTryParse("5:000", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifySingleTryParse("5;000", NumberStyles.Currency, distinctNFI, 5000, true);
+ passed &= VerifySingleTryParse("$5:0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifySingleTryParse("$5;0", NumberStyles.Currency, distinctNFI, 50, true);
+ passed &= VerifySingleTryParse("5:0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifySingleTryParse("5;0", NumberStyles.Any, distinctNFI, 50, true);
+ passed &= VerifySingleTryParse("$5:0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifySingleTryParse("$5;0", NumberStyles.Any, distinctNFI, 50, true);
+ passed &= VerifySingleTryParse("123,456;789.0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifySingleTryParse("123,456;789.0", NumberStyles.Currency, distinctNFI, 123456789, true);
+ passed &= VerifySingleTryParse("123,456;789.0", NumberStyles.Any, distinctNFI, 123456789, true);
+ passed &= VerifySingleTryParse("$123,456;789.0", NumberStyles.Any, distinctNFI, 0, false);
+
+
+ // Should these pass or fail? Current parse behavior is to pass, so they might be
+ // parse bugs, but they're not tryparse bugs.
+ // I expect ArgumentException with an ambiguous NFI
+ passed &= VerifySingleParse("^42", NumberStyles.Any, ambigNFI, -42);
+ passed &= VerifySingleTryParse("^42", NumberStyles.Any, ambigNFI, -42, true);
+
+ /// END TEST CASES
+ }
+ catch (Exception e)
+ {
+ TestLibrary.Logging.WriteLine("Unexpected exception!! " + e.ToString());
+ passed = false;
+ }
+
+ if (passed)
+ {
+ TestLibrary.Logging.WriteLine("paSs");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.Logging.WriteLine("FAiL");
+ return 1;
+ }
+ }
+
+ public static bool VerifySingleTryParse(string value, Single expectedResult, bool expectedReturn)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Single.TryParse, Value = '{0}', Expected Result = {1}, Expected Return = {2}",
+ value, expectedResult, expectedReturn);
+ }
+ Single result = 0;
+ try
+ {
+ bool returnValue = Single.TryParse(value, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedReturn, returnValue);
+ return false;
+ }
+ if (Single.IsNaN(expectedResult) && Single.IsNaN(result))
+ {
+ return true;
+ }
+ if (result != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, result);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifySingleTryParse(string value, NumberStyles style, IFormatProvider provider, Single expectedResult, bool expectedReturn)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Single.TryParse, Value = '{0}', Style = {1}, Provider = {2}, Expected Result = {3}, Expected Return = {4}",
+ value, style, provider, expectedResult, expectedReturn);
+ }
+ Single result = 0;
+ try
+ {
+ bool returnValue = Single.TryParse(value, style, provider, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Style = {1}, Provider = {2}, Expected Return = {3}, Actual Return = {4}",
+ value, style, provider, expectedReturn, returnValue);
+ return false;
+ }
+ if (Single.IsNaN(expectedResult) && Single.IsNaN(result))
+ {
+ return true;
+ }
+ if (result != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, result);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifySingleTryParseException(string value, NumberStyles style, IFormatProvider provider, Type exceptionType)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Single.TryParse, Value = '{0}', Style = {1}, Provider = {2}, Expected Exception = {3}",
+ value, style, provider, exceptionType);
+ }
+ try
+ {
+ Single result = 0;
+ Boolean returnValue = Single.TryParse(value, style, provider, out result);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifySingleParse(string value, Single expectedResult)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Single.Parse, Value = '{0}', Expected Result, {1}",
+ value, expectedResult);
+ }
+ try
+ {
+ Single returnValue = Single.Parse(value);
+ if (Single.IsNaN(expectedResult) && Single.IsNaN(returnValue))
+ {
+ return true;
+ }
+ if (returnValue != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, returnValue);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifySingleParse(string value, NumberStyles style, IFormatProvider provider, Single expectedResult)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Single.Parse, Value = '{0}', Style = {1}, provider = {2}, Expected Result = {3}",
+ value, style, provider, expectedResult);
+ }
+ try
+ {
+ Single returnValue = Single.Parse(value, style, provider);
+ if (Single.IsNaN(expectedResult) && Single.IsNaN(returnValue))
+ {
+ return true;
+ }
+ if (returnValue != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, returnValue);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifySingleParseException(string value, Type exceptionType)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Single.Parse, Value = '{0}', Expected Exception, {1}",
+ value, exceptionType);
+ }
+ try
+ {
+ Single returnValue = Single.Parse(value);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifySingleParseException(string value, NumberStyles style, Type exceptionType)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Single.Parse, Value = '{0}', Style = {1}, Expected Exception = {3}",
+ value, style, exceptionType);
+ }
+ try
+ {
+ Single returnValue = Single.Parse(value, style);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifySingleParseException(string value, NumberStyles style, IFormatProvider provider, Type exceptionType)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: Single.Parse, Value = '{0}', Style = {1}, Provider = {2}, Expected Exception = {3}",
+ value, style, provider, exceptionType);
+ }
+ try
+ {
+ Single returnValue = Single.Parse(value, style, provider);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/StringChars.csproj b/tests/src/CoreMangLib/cti/system/string/StringChars.csproj
new file mode 100644
index 0000000000..b55c608ba5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringChars.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringchars.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringCompare1.csproj b/tests/src/CoreMangLib/cti/system/string/StringCompare1.csproj
new file mode 100644
index 0000000000..91161458ef
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringCompare1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringcompare1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringCompare15.csproj b/tests/src/CoreMangLib/cti/system/string/StringCompare15.csproj
new file mode 100644
index 0000000000..70cfc36271
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringCompare15.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringcompare15.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringCompare2.csproj b/tests/src/CoreMangLib/cti/system/string/StringCompare2.csproj
new file mode 100644
index 0000000000..31252d7405
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringCompare2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringcompare2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringCompare9.csproj b/tests/src/CoreMangLib/cti/system/string/StringCompare9.csproj
new file mode 100644
index 0000000000..1c37e359de
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringCompare9.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringcompare9.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringCompareOrdinal1.csproj b/tests/src/CoreMangLib/cti/system/string/StringCompareOrdinal1.csproj
new file mode 100644
index 0000000000..c0f4d7baf6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringCompareOrdinal1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringcompareordinal1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringCompareOrdinal2.csproj b/tests/src/CoreMangLib/cti/system/string/StringCompareOrdinal2.csproj
new file mode 100644
index 0000000000..df6cd4e6be
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringCompareOrdinal2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringcompareordinal2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringConcat1.csproj b/tests/src/CoreMangLib/cti/system/string/StringConcat1.csproj
new file mode 100644
index 0000000000..a1be2be7ec
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringConcat1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringconcat1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringConcat2.csproj b/tests/src/CoreMangLib/cti/system/string/StringConcat2.csproj
new file mode 100644
index 0000000000..56aa09714a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringConcat2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringconcat2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringConcat3.csproj b/tests/src/CoreMangLib/cti/system/string/StringConcat3.csproj
new file mode 100644
index 0000000000..8ef833f3ee
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringConcat3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringconcat3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringConcat4.csproj b/tests/src/CoreMangLib/cti/system/string/StringConcat4.csproj
new file mode 100644
index 0000000000..25a76ffded
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringConcat4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringconcat4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringConcat5.csproj b/tests/src/CoreMangLib/cti/system/string/StringConcat5.csproj
new file mode 100644
index 0000000000..8310db0aff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringConcat5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringconcat5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringConcat6.csproj b/tests/src/CoreMangLib/cti/system/string/StringConcat6.csproj
new file mode 100644
index 0000000000..ed9553a807
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringConcat6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringconcat6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringConcat7.csproj b/tests/src/CoreMangLib/cti/system/string/StringConcat7.csproj
new file mode 100644
index 0000000000..7256a63ba9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringConcat7.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringconcat7.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringConcat8.csproj b/tests/src/CoreMangLib/cti/system/string/StringConcat8.csproj
new file mode 100644
index 0000000000..8640858946
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringConcat8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringconcat8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringCopyTo.csproj b/tests/src/CoreMangLib/cti/system/string/StringCopyTo.csproj
new file mode 100644
index 0000000000..8831cd5e4c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringCopyTo.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringcopyto.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringCtor5.csproj b/tests/src/CoreMangLib/cti/system/string/StringCtor5.csproj
new file mode 100644
index 0000000000..49743902e5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringCtor5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringctor5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringCtorChar.csproj b/tests/src/CoreMangLib/cti/system/string/StringCtorChar.csproj
new file mode 100644
index 0000000000..ed19b7b97e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringCtorChar.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringctorchar.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringEmpty.csproj b/tests/src/CoreMangLib/cti/system/string/StringEmpty.csproj
new file mode 100644
index 0000000000..99b3d23829
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringEmpty.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringempty.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringEquals1.csproj b/tests/src/CoreMangLib/cti/system/string/StringEquals1.csproj
new file mode 100644
index 0000000000..e31952b16c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringEquals1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringequals1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringEquals2.csproj b/tests/src/CoreMangLib/cti/system/string/StringEquals2.csproj
new file mode 100644
index 0000000000..578bdb24b5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringEquals2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringequals2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringEquals3.csproj b/tests/src/CoreMangLib/cti/system/string/StringEquals3.csproj
new file mode 100644
index 0000000000..039f310c15
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringEquals3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringequals3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringEquals6.csproj b/tests/src/CoreMangLib/cti/system/string/StringEquals6.csproj
new file mode 100644
index 0000000000..66ba50e5f9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringEquals6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringequals6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringFormat1.csproj b/tests/src/CoreMangLib/cti/system/string/StringFormat1.csproj
new file mode 100644
index 0000000000..d997c62fc7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringFormat1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringformat1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringFormat2.csproj b/tests/src/CoreMangLib/cti/system/string/StringFormat2.csproj
new file mode 100644
index 0000000000..e30bdf53ae
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringFormat2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringformat2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringGetEnumerator.csproj b/tests/src/CoreMangLib/cti/system/string/StringGetEnumerator.csproj
new file mode 100644
index 0000000000..f37ef9bbd7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringGetEnumerator.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringgetenumerator.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/string/StringGetHashCode.csproj
new file mode 100644
index 0000000000..8bb3b5d528
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringgethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToBoolean.csproj b/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToBoolean.csproj
new file mode 100644
index 0000000000..4f95af5131
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToBoolean.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringiconvertibletoboolean.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToByte.csproj b/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToByte.csproj
new file mode 100644
index 0000000000..9f5b478327
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringiconvertibletobyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToChar.csproj b/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToChar.csproj
new file mode 100644
index 0000000000..e019648eac
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToChar.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringiconvertibletochar.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToInt16.csproj b/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToInt16.csproj
new file mode 100644
index 0000000000..af66f13dc7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringiconvertibletoint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToInt32.csproj b/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToInt32.csproj
new file mode 100644
index 0000000000..80efdcacfa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringiconvertibletoint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToInt64.csproj b/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToInt64.csproj
new file mode 100644
index 0000000000..1a362deefb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringiconvertibletoint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToSByte.csproj b/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToSByte.csproj
new file mode 100644
index 0000000000..657333403a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToSByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringiconvertibletosbyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToUInt16.csproj b/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToUInt16.csproj
new file mode 100644
index 0000000000..c9a5910463
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToUInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringiconvertibletouint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToUInt32.csproj b/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToUInt32.csproj
new file mode 100644
index 0000000000..73e76bda7b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToUInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringiconvertibletouint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToUInt64.csproj b/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToUInt64.csproj
new file mode 100644
index 0000000000..e5d82b702c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringIConvertibleToUInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringiconvertibletouint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringIEnumerableGetEnumerator.csproj b/tests/src/CoreMangLib/cti/system/string/StringIEnumerableGetEnumerator.csproj
new file mode 100644
index 0000000000..52d723852d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringIEnumerableGetEnumerator.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringienumerablegetenumerator.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringIndexOf10.csproj b/tests/src/CoreMangLib/cti/system/string/StringIndexOf10.csproj
new file mode 100644
index 0000000000..ad9de87321
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringIndexOf10.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringindexof10.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringInsert.csproj b/tests/src/CoreMangLib/cti/system/string/StringInsert.csproj
new file mode 100644
index 0000000000..de6565c4f1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringInsert.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringinsert.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringIsNullOrEmpty.csproj b/tests/src/CoreMangLib/cti/system/string/StringIsNullOrEmpty.csproj
new file mode 100644
index 0000000000..40ffa0974e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringIsNullOrEmpty.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringisnullorempty.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringJoin.csproj b/tests/src/CoreMangLib/cti/system/string/StringJoin.csproj
new file mode 100644
index 0000000000..273e01874e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringJoin.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringjoin.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringJoin1.csproj b/tests/src/CoreMangLib/cti/system/string/StringJoin1.csproj
new file mode 100644
index 0000000000..cd3cae2517
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringJoin1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringjoin1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringJoin2.csproj b/tests/src/CoreMangLib/cti/system/string/StringJoin2.csproj
new file mode 100644
index 0000000000..13c85e8178
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringJoin2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringjoin2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringLength.csproj b/tests/src/CoreMangLib/cti/system/string/StringLength.csproj
new file mode 100644
index 0000000000..9756239244
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringLength.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringlength.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringPadLeft.csproj b/tests/src/CoreMangLib/cti/system/string/StringPadLeft.csproj
new file mode 100644
index 0000000000..204b1a9724
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringPadLeft.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringpadleft.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringPadLeft1.csproj b/tests/src/CoreMangLib/cti/system/string/StringPadLeft1.csproj
new file mode 100644
index 0000000000..c133fbfbc9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringPadLeft1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringpadleft1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringPadLeft2.csproj b/tests/src/CoreMangLib/cti/system/string/StringPadLeft2.csproj
new file mode 100644
index 0000000000..d82452ab0a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringPadLeft2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringpadleft2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringPadRight.csproj b/tests/src/CoreMangLib/cti/system/string/StringPadRight.csproj
new file mode 100644
index 0000000000..1f117d6029
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringPadRight.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringpadright.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringPadRight1.csproj b/tests/src/CoreMangLib/cti/system/string/StringPadRight1.csproj
new file mode 100644
index 0000000000..82d09a08bb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringPadRight1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringpadright1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringPadRight2.csproj b/tests/src/CoreMangLib/cti/system/string/StringPadRight2.csproj
new file mode 100644
index 0000000000..25894ecf41
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringPadRight2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringpadright2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringRemove1.csproj b/tests/src/CoreMangLib/cti/system/string/StringRemove1.csproj
new file mode 100644
index 0000000000..c8bbad417d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringRemove1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringremove1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringRemove2.csproj b/tests/src/CoreMangLib/cti/system/string/StringRemove2.csproj
new file mode 100644
index 0000000000..8250efcbb9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringRemove2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringremove2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringReplace1.csproj b/tests/src/CoreMangLib/cti/system/string/StringReplace1.csproj
new file mode 100644
index 0000000000..50b5928513
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringReplace1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringreplace1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringReplace2.csproj b/tests/src/CoreMangLib/cti/system/string/StringReplace2.csproj
new file mode 100644
index 0000000000..7824a2a6f7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringReplace2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringreplace2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringSplit1.csproj b/tests/src/CoreMangLib/cti/system/string/StringSplit1.csproj
new file mode 100644
index 0000000000..f0a6d5a21e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringSplit1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringsplit1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringSubString1.csproj b/tests/src/CoreMangLib/cti/system/string/StringSubString1.csproj
new file mode 100644
index 0000000000..ac680c1c3a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringSubString1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringsubstring1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringSubString2.csproj b/tests/src/CoreMangLib/cti/system/string/StringSubString2.csproj
new file mode 100644
index 0000000000..fe17002a35
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringSubString2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringsubstring2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringToCharArray.csproj b/tests/src/CoreMangLib/cti/system/string/StringToCharArray.csproj
new file mode 100644
index 0000000000..7de01660b2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringToCharArray.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringtochararray.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringToString1.csproj b/tests/src/CoreMangLib/cti/system/string/StringToString1.csproj
new file mode 100644
index 0000000000..91f2699654
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringToString1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringtostring1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringTrim1.csproj b/tests/src/CoreMangLib/cti/system/string/StringTrim1.csproj
new file mode 100644
index 0000000000..caba21005a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringTrim1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringtrim1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringTrim1b.csproj b/tests/src/CoreMangLib/cti/system/string/StringTrim1b.csproj
new file mode 100644
index 0000000000..fbf6dbbc8c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringTrim1b.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringtrim1b.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringTrim2.csproj b/tests/src/CoreMangLib/cti/system/string/StringTrim2.csproj
new file mode 100644
index 0000000000..d536208682
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringTrim2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringtrim2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringTrim3.csproj b/tests/src/CoreMangLib/cti/system/string/StringTrim3.csproj
new file mode 100644
index 0000000000..9a64cfd333
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringTrim3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringtrim3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/StringTrim4.csproj b/tests/src/CoreMangLib/cti/system/string/StringTrim4.csproj
new file mode 100644
index 0000000000..4271a2c36b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/StringTrim4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringtrim4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/stringchars.cs b/tests/src/CoreMangLib/cti/system/string/stringchars.cs
new file mode 100644
index 0000000000..f9eaccd781
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringchars.cs
@@ -0,0 +1,227 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// String.chars
+/// </summary>
+public class StringChars
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+ public static int Main()
+ {
+ StringChars sc = new StringChars();
+ TestLibrary.TestFramework.BeginTestCase("StringChars");
+
+ if (sc.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string strA;
+ char ActualResult1;
+ char ActualResult2;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: string's chars one");
+ try
+ {
+ strA = "Hello\u0009 World";
+ ActualResult1 = strA[5];
+ ActualResult2 = strA[6];
+ if (ActualResult1 != '\t' || ActualResult2 !='\u0020')
+ {
+ TestLibrary.TestFramework.LogError("001", "string's chars one ActualResult is not the ExpectResult");
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string strA;
+ char ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: string's chars two");
+ try
+ {
+ strA = this.GetString(false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ char charA = this.GetChar(0, c_MINI_STRING_LENGTH);
+ int Insert = this.GetInt32(0, strA.Length + 1);
+ string strA1 = strA.Insert(Insert, charA.ToString());
+ ActualResult = strA1[Insert];
+ if (ActualResult!= charA)
+ {
+ TestLibrary.TestFramework.LogError("003", "string's chars two ActualResult is not the ExpectResult");
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTesting
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ string strA;
+ char ActualResult;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: index is equel string's length");
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ ActualResult = strA[strA.Length];
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ string strA;
+ char ActualResult;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: index is greater than string's length");
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ ActualResult = strA[this.GetInt32(strA.Length + 1,Int32.MaxValue)];
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ string strA;
+ char ActualResult;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: index is less than 0");
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ ActualResult = strA[this.GetInt32(1,strA.Length)*(-1)];
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N003", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region Help method for geting test data
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ private Char GetChar(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return Convert.ToChar(minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return Convert.ToChar(Convert.ToInt32(TestLibrary.Generator.GetChar(-55)) % (maxValue - minValue) + minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+ return Convert.ToChar(minValue);
+ }
+ private string GetString(bool ValidPath, Int32 minValue, Int32 maxValue)
+ {
+ StringBuilder sVal = new StringBuilder();
+ string s;
+
+ if (0 == minValue && 0 == maxValue) return String.Empty;
+ if (minValue > maxValue) return null;
+
+ if (ValidPath)
+ {
+ return TestLibrary.Generator.GetString(-55, ValidPath, minValue, maxValue);
+ }
+ else
+ {
+ int length = this.GetInt32(minValue, maxValue);
+ for (int i = 0; length > i; i++)
+ {
+ char c = this.GetChar(minValue, maxValue);
+ sVal.Append(c);
+ }
+ s = sVal.ToString();
+ return s;
+ }
+
+
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringcompare1.cs b/tests/src/CoreMangLib/cti/system/string/stringcompare1.cs
new file mode 100644
index 0000000000..d0f9e1fc06
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringcompare1.cs
@@ -0,0 +1,724 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using TestLibrary;
+
+class StringCompare1
+{
+ const string str1 = "HELLOWORLD";
+ const string str2 = "helloworld";
+
+ /// <summary>
+ /// Test String.Compare(System.String,System.Int32,System.String,System.Int32,System.Int32)
+ /// </summary>
+ /// <param name="args"></param>
+ /// <returns></returns>
+ public static int Main(string[] args)
+ {
+ StringCompare1 sc = new StringCompare1();
+ TestLibrary.TestFramework.BeginScenario("Test String.Compare(System.String,System.Int32,System.String,System.Int32,System.Int32)");
+
+ if (sc.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+ retVal = NegTest9() && retVal;
+ retVal = NegTest10() && retVal;
+ retVal = NegTest11() && retVal;
+ retVal = NegTest12() && retVal;
+ retVal = NegTest13() && retVal;
+ retVal = NegTest14() && retVal;
+ retVal = NegTest15() && retVal;
+ retVal = NegTest16() && retVal;
+ retVal = NegTest17() && retVal;
+ retVal = NegTest18() && retVal;
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two same strings with different cases...
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two same strings with different cases...");
+
+ try
+ {
+ int expected = GlobLocHelper.OSCompare(str1, 0, str2, 0, str1.Length); // 1;
+ if (String.Compare(str1, 0, str2, 0, str1.Length) != expected)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is equal when compare different cases string!");
+ TestLibrary.TestFramework.LogInformation("Expected: " + expected.ToString() + " Actual: " + String.Compare(str1, 0, str2, 0, str1.Length).ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected Exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two null string with indexed and length are zero...
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two null string with indexed and length are zero...");
+
+ try
+ {
+ if (String.Compare(null, 0, null, 0, 0) != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not equal when compare two string with null value!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected Exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two strings which the first of them is null...
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two strings which the first of them is null...");
+
+ try
+ {
+ if (String.Compare(null, 0, str1, 0, 0) != -1)
+ {
+ TestLibrary.TestFramework.LogError("005", "String with null value should be smaller than string with content!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected Exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two strings which the second of them is null...
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two strings which the second of them is null...");
+
+ try
+ {
+ if (String.Compare(str1, 0, null, 0, 0) != 1)
+ {
+ TestLibrary.TestFramework.LogError("007", "String with content should be larger than string with null value!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected Exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two strings with the first index out of range...
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two strings with the first index out of range...");
+
+ try
+ {
+ String.Compare(str1, str1.Length + 1, str2, 0, 0);
+
+ TestLibrary.TestFramework.LogError("009", "No exception is thrown!");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when the first index is out of range!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010","Unexpected Exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Copmare two strings with the second index out of range...
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Copmare two strings with the second index out of range...");
+
+ try
+ {
+ String.Compare(str1,0,str2,str2.Length+1,0);
+
+ TestLibrary.TestFramework.LogError("011", "No exception is thrown!");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when the first index is out of range!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected Exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare the strings with the first index is negtive...
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare the strings with the first index is negtive...");
+ try
+ {
+ String.Compare(str1, -1, str2, 0, str2.Length);
+
+ TestLibrary.TestFramework.LogError("013", "No exception occurs!");
+ retVal = false;
+
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when a given indexes are negative!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare the strings with the second index is negtive...
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare the strings with the second index is negtive...");
+ try
+ {
+ String.Compare(str1, -1, str2, 0, str2.Length);
+
+ TestLibrary.TestFramework.LogError("015", "No exception occurs!");
+ retVal = false;
+
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when a given indexes are negative!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare the strings with length is negative...
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare the strings with length is negative...");
+ try
+ {
+ String.Compare(str1, 0, str2, 0, -1);
+
+ TestLibrary.TestFramework.LogError("017", "No exception occurs!");
+ retVal = false;
+
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when a given length is negative!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two strings with max+1 length...
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two strings with max+1 length... ");
+ try
+ {
+ if (String.Compare(str1, 0, str1, 0, str1.Length + 1) != 0)
+ {
+ TestLibrary.TestFramework.LogError("019", "Can't compare strings ignoring length exceed max!");
+ retVal = false;
+ }
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when length is max+1");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020","Unexpected exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two null strings with length out of range...
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two null strings with length out of range...");
+ try
+ {
+ String.Compare(null, 0, null, 0, 1);
+
+ TestLibrary.TestFramework.LogError("021", "Compare failed!");
+ retVal = false;
+
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when a given length is out of range!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("022", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two null strings with first index out of range...
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest8()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two null strings with first index out of range...");
+ try
+ {
+ String.Compare(null, 1, null, 0, 0);
+
+ TestLibrary.TestFramework.LogError("023", "Compare failed!");
+ retVal = false;
+
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when a given index is out of range!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("024", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two null strings with first index out of range...
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest9()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two null strings with first index out of range...");
+ try
+ {
+ String.Compare(null, 0, null, 1, 0);
+
+ TestLibrary.TestFramework.LogError("025", "Compare failed!");
+ retVal = false;
+
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when a given index is out of range!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("026", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two null strings with two indexes out of range...
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest10()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two null strings with two indexes out of range...");
+ try
+ {
+ String.Compare(null, 1, null, 1, 0);
+
+ TestLibrary.TestFramework.LogError("027", "Compare failed!");
+ retVal = false;
+
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when given indexes is out of range!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("028", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two null strings with two indexes are negtive...
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest11()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two null strings with two indexes are negtive...");
+ try
+ {
+ String.Compare(null, -1, null, -1, 0);
+
+ TestLibrary.TestFramework.LogError("029", "Compare failed!");
+ retVal = false;
+
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when given indexes is out of range!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("030", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two null strings with the first index is negtive...
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest12()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two null strings with the first index is negtive...");
+ try
+ {
+ String.Compare(null, -1, null, 0, 0);
+
+ TestLibrary.TestFramework.LogError("031", "Compare failed!");
+ retVal = false;
+
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when given indexes is out of range!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("032", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two null strings with the second index is negtive...
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest13()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two null strings with the second index is negtive...");
+ try
+ {
+ String.Compare(null, 0, null, -1, 0);
+
+ TestLibrary.TestFramework.LogError("033", "Compare failed!");
+ retVal = false;
+
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when given indexes is out of range!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("034", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two strings which the first is null and the length is not zero...
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest14()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two strings which the first string is null and the length is not zero...");
+ try
+ {
+ String.Compare(null, 0, str1, 0, 1);
+
+ TestLibrary.TestFramework.LogError("035", "Compare failed!");
+ retVal = false;
+
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when the first is null and the length is not zero!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("036", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two strings which the second string is null and the length is not zero...
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest15()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two strings which the second string is null and the length is not zero...");
+ try
+ {
+ String.Compare(str1, 0, null, 0, 1);
+
+ TestLibrary.TestFramework.LogError("037", "Compare failed!");
+ retVal = false;
+
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when the second string is null and the length is not zero!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("038", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two null strings with max+1 length...
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest16()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two null strings with max+1 length...");
+ try
+ {
+ String.Compare(null, 0, null, 0, -1);
+
+ TestLibrary.TestFramework.LogError("039", "Compare failed!");
+ retVal = false;
+
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when a given length is out of range!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("040", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two strings which the first string is null and max+1 length...
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest17()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two strings which the first string is null and the negtive length...");
+ try
+ {
+ String.Compare(null, 0, str1, 0, -1);
+
+ TestLibrary.TestFramework.LogError("041", "Compare failed!");
+ retVal = false;
+
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when which the first string is null and the negtive length!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("042", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two strings which the second string is null and with max+1 length...
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest18()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two strings which the second string is null and with the negtive length...");
+ try
+ {
+ String.Compare(str1, 0, null, 0, 1);
+
+ TestLibrary.TestFramework.LogError("043", "Compare failed!");
+ retVal = false;
+
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown which the second string is null and with the negtive length!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("044", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringcompare15.cs b/tests/src/CoreMangLib/cti/system/string/stringcompare15.cs
new file mode 100644
index 0000000000..fb847c53be
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringcompare15.cs
@@ -0,0 +1,408 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using TestLibrary;
+
+/// <summary>
+/// String.Compare Method (String, String)
+/// The comparison uses the current culture to obtain culture-specific information such as
+/// casing rules and the alphabetic order of individual characters.
+/// The comparison is performed using word sort rules.
+/// </summary>
+class StringCompare5
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ private const string c_POS_TEST_PREFIX = "PosTest";
+ private const string c_NEG_TEST_PREFIX = "NegTest";
+
+ private int totalTestCount;
+ private int posTestCount ;
+ private int negTestCount;
+ private int passedTestCount;
+ private int failedTestCount;
+
+ private enum TestType { PositiveTest = 1, NegativeTest = 2 };
+ private enum TestResult {NotRun = 0, PassedTest = 1, FailedTest = 2};
+ internal struct Parameters
+ {
+ public string strA, strB;
+
+ public string DataString
+ {
+ get
+ {
+ string str = string.Format("\n\tFirst string: {0}, Second string: {1}", strA, strB);
+ str += string.Format("\n\tFirst string length:{0}, second string length:{1}", strA.Length, strB.Length);
+ return str;
+ }
+ }
+ }
+
+ //Default constructor to ninitial all kind of test counts
+ public StringCompare5()
+ {
+ totalTestCount = posTestCount = negTestCount = 0;
+ passedTestCount = failedTestCount = 0;
+ }
+
+ //Update (postive or negative) and total test count at the beginning of test scenario
+ private void UpdateCounts(TestType testType)
+ {
+ if (TestType.PositiveTest == testType)
+ {
+ posTestCount++;
+ totalTestCount++;
+ return;
+ }
+
+ if (TestType.NegativeTest == testType)
+ {
+ negTestCount++;
+ totalTestCount++;
+ return;
+ }
+ }
+
+ //Generate standard error number string
+ //i.e "9", "12" is not proper. Instead they should be "009", "012"
+ private string GenerateErrorNum(int errorNum)
+ {
+ string temp = errorNum.ToString();
+ string errorNumStr = new string('0', 3 - temp.Length) + temp;
+ return errorNumStr;
+ }
+
+ //Update failed or passed test counts at the end of test scenario
+ private void UpdateCounts(TestResult testResult)
+ {
+ if (TestResult.PassedTest == testResult)
+ {
+ passedTestCount++;
+ return;
+ }
+
+ if (TestResult.FailedTest == testResult)
+ {
+ failedTestCount++;
+ return;
+ }
+ }
+
+ public static int Main()
+ {
+ StringCompare5 sc = new StringCompare5();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: String.Compare Method (String, String)");
+ if (sc.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ //Postive test scenarios
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ //Negative test scenarios
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ //retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarioes
+
+ public bool PosTest1()
+ {
+ Parameters paras;
+
+ const string c_testDesc = "Two null comparison.";
+ const int c_expectedValue = 0;
+
+ paras.strA = null;
+ paras.strB = null;
+
+ return ExecutePosTestZero(paras, c_expectedValue, c_testDesc);
+ }
+
+ public bool PosTest2()
+ {
+ Parameters paras;
+
+ const string c_testDesc = "Null vs String.Empty";
+ const bool c_expectedValue = true;
+
+ paras.strA = null;
+ paras.strB = string.Empty;
+
+ return ExecutePosTestLesser(paras, c_expectedValue, c_testDesc);
+ }
+
+ public bool PosTest3()
+ {
+ Parameters paras;
+
+ const string c_testDesc = "Long string(>256 chars) vs long string (>256 chars)";
+ const bool c_expectedValue = true;
+
+ string strBasic1 = TestLibrary.Generator.GetString(-55, false, c_MIN_LONG_STR_LEN, c_MAX_LONG_STR_LEN - 16);
+ string strBasic2 = TestLibrary.Generator.GetString(-55, false, 8, 8);
+ char ch = TestLibrary.Generator.GetChar(-55);
+ paras.strA = strBasic1 + strBasic2;
+ paras.strB = strBasic1 + strBasic2 + strBasic2;
+
+ return ExecutePosTestLesser(paras, c_expectedValue, c_testDesc);
+ }
+
+ public bool PosTest4()
+ {
+ Parameters paras;
+
+ const string c_testDesc = "Short string (<32 chars) vs long string(>256 chars)";
+ const bool c_expectedValue = true;
+
+ string strBasic = TestLibrary.Generator.GetString(-55, false, 20920, 20920);
+ paras.strA = strBasic.Substring(0,this.GetInt32(1,c_MAX_SHORT_STR_LEN));
+ paras.strB = strBasic;
+
+ return ExecutePosTestLesser(paras, c_expectedValue, c_testDesc);
+ }
+
+ #endregion
+
+ #region Helper methods for positive test scenarioes
+
+ //Zero value returned from test method means that two substrings equal
+ private bool ExecutePosTestZero(Parameters paras, int expectedValue, string testDesc)
+ {
+ bool retVal = true;
+ UpdateCounts(TestType.PositiveTest);
+
+ string testInfo = c_POS_TEST_PREFIX + this.posTestCount.ToString() +": " + testDesc;
+ int actualValue;
+
+ TestResult testResult = TestResult.NotRun;
+
+ TestLibrary.TestFramework.BeginScenario(testInfo);
+ try
+ {
+ actualValue = this.CallTestMethod(paras);
+ if (paras.strA != null && paras.strB != null) expectedValue = GlobLocHelper.OSCompare(paras.strA, paras.strB);
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError(GenerateErrorNum(this.totalTestCount), errorDesc);
+ testResult = TestResult.FailedTest;
+ retVal = false;
+ }
+ testResult = TestResult.PassedTest;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(GenerateErrorNum(this.totalTestCount + 1), "Unexpected exception: " + e);
+ testResult = TestResult.FailedTest;
+ retVal = false;
+ }
+
+ UpdateCounts(testResult);
+ return retVal;
+ }
+
+ // True value returned from test method means that two substrings do not equal
+ private bool ExecutePosTestNonzero(Parameters paras, bool expectedValue, string testDesc)
+ {
+ bool retVal = true;
+ UpdateCounts(TestType.PositiveTest);
+
+ string testInfo = c_POS_TEST_PREFIX + this.posTestCount.ToString() + ": " + testDesc;
+ bool actualValue;
+
+ TestResult testResult = TestResult.NotRun;
+
+ TestLibrary.TestFramework.BeginScenario(testInfo);
+ try
+ {
+ actualValue = (0 != this.CallTestMethod(paras));
+ if (paras.strA != null && paras.strB != null) expectedValue = (0 != GlobLocHelper.OSCompare(paras.strA, paras.strB));
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError(GenerateErrorNum(this.totalTestCount), errorDesc);
+ testResult = TestResult.FailedTest;
+ retVal = false;
+ }
+ testResult = TestResult.PassedTest;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(GenerateErrorNum(this.totalTestCount + 1), "Unexpected exception: " + e);
+ testResult = TestResult.FailedTest;
+ retVal = false;
+ }
+
+ UpdateCounts(testResult);
+ return retVal;
+ }
+
+ // True value returned from test method means that the first substring lesser than the second
+ private bool ExecutePosTestLesser(Parameters paras, bool expectedValue, string testDesc)
+ {
+ bool retVal = true;
+ UpdateCounts(TestType.PositiveTest);
+
+ string testInfo = c_POS_TEST_PREFIX + this.posTestCount.ToString() + ": " + testDesc;
+ bool actualValue;
+
+ TestResult testResult = TestResult.NotRun;
+
+ TestLibrary.TestFramework.BeginScenario(testInfo);
+ try
+ {
+ actualValue = (0 > this.CallTestMethod(paras));
+ if (paras.strA != null && paras.strB != null) expectedValue = (0 > GlobLocHelper.OSCompare(paras.strA, paras.strB));
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += paras.DataString;
+ TestLibrary.TestFramework.LogError(GenerateErrorNum(this.totalTestCount), errorDesc);
+ testResult = TestResult.FailedTest;
+ retVal = false;
+ }
+ testResult = TestResult.PassedTest;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(GenerateErrorNum(this.totalTestCount + 1), "Unexpected exception: " + e);
+ testResult = TestResult.FailedTest;
+ retVal = false;
+ }
+
+ UpdateCounts(testResult);
+ return retVal;
+ }
+
+ #endregion
+
+ #region Helper methods for negative test scenarioes
+ //Test ArgumentOutOfRangeException
+ private bool ExeNegTest_AOORE(Parameters paras, string testDesc, string errorDesc)
+ {
+ bool retVal = true;
+ UpdateCounts(TestType.NegativeTest);
+
+ string testInfo = c_NEG_TEST_PREFIX + this.negTestCount.ToString() + ": " + testDesc;
+
+ TestResult testResult = TestResult.NotRun;
+
+ TestLibrary.TestFramework.BeginScenario(testInfo);
+ try
+ {
+ this.CallTestMethod(paras);
+ TestLibrary.TestFramework.LogError(GenerateErrorNum((this.totalTestCount << 1) - 1), errorDesc);
+ testResult = TestResult.FailedTest;
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ testResult = TestResult.PassedTest;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(GenerateErrorNum(this.totalTestCount << 1), "Unexpected exception: " + e);
+ testResult = TestResult.FailedTest;
+ retVal = false;
+ }
+
+ UpdateCounts(testResult);
+ return retVal;
+ }
+
+ //Test ArgumentNullException
+ private bool ExeNegTest_ANE(Parameters paras, string testDesc, string errorDesc)
+ {
+ bool retVal = true;
+ UpdateCounts(TestType.NegativeTest);
+
+ string testInfo = c_NEG_TEST_PREFIX + this.negTestCount.ToString() + ": " + testDesc;
+
+ TestResult testResult = TestResult.NotRun;
+
+ TestLibrary.TestFramework.BeginScenario(testInfo);
+ try
+ {
+ this.CallTestMethod(paras);
+ TestLibrary.TestFramework.LogError(GenerateErrorNum((this.totalTestCount << 1) - 1), errorDesc);
+ testResult = TestResult.FailedTest;
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ testResult = TestResult.PassedTest;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(GenerateErrorNum(this.totalTestCount <<1), "Unexpected exception: " + e);
+ testResult = TestResult.FailedTest;
+ retVal = false;
+ }
+
+ UpdateCounts(testResult);
+ return retVal;
+ }
+#endregion
+
+ //Involke the test method
+ //In this test case this method is System.String.Compare() with 7 parameters
+ private int CallTestMethod(Parameters paras)
+ {
+ return string.Compare(paras.strA, paras.strB);
+ }
+
+ #region helper methods for generating test data
+ private bool GetBoolean()
+ {
+ Int32 i = this.GetInt32(1,2);
+ return (i == 1) ? true : false;
+ }
+
+ //Get a non-negative integer between minValue and maxValue
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+
+ private Int32 Min(Int32 i1, Int32 i2)
+ {
+ return (i1 <= i2) ? i1 : i2;
+ }
+
+ private Int32 Max(Int32 i1, Int32 i2)
+ {
+ return (i1 >= i2) ? i1 : i2;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringcompare2.cs b/tests/src/CoreMangLib/cti/system/string/stringcompare2.cs
new file mode 100644
index 0000000000..e582fe9227
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringcompare2.cs
@@ -0,0 +1,416 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+using TestLibrary;
+
+namespace DictionaryEntryCtor
+{
+ class DictionaryEntryCtor
+ {
+ const string str1 = "HELLOWORLD";
+ const string str2 = "helloworld";
+ public static int Main(string[] args)
+ {
+ DictionaryEntryCtor dec = new DictionaryEntryCtor();
+ TestLibrary.TestFramework.BeginTestCase("Compare(System.String,System.Int32,System.String,System.Int32,System.Int32,System.StringComparision)");
+
+ if (dec.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ /// <summary>
+ /// Compare(System.String,System.Int32,System.String,System.Int32,System.Int32,System.Boolean)
+ /// </summary>
+ /// <returns></returns>
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+
+ return retVal;
+
+ }
+
+ /// <summary>
+ /// Compare the same string with different cases when ignore the case
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ try
+ {
+ TestLibrary.TestFramework.BeginScenario("Compare the same string with different cases when ignore the case...");
+ int expected = GlobLocHelper.OSCompare(str1, 2, str2, 2, 3, true); // 0;
+ if (String.Compare(str1, 2, str2, 2, 3, StringComparison.CurrentCultureIgnoreCase) != expected)
+ {
+ TestLibrary.TestFramework.LogError("001", "LLOWO is not equal to llowo when ignore the case...");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare the same string with different cases when the case is considered
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ try
+ {
+ TestLibrary.TestFramework.BeginScenario("Compare the same string with different cases when the case is considered...");
+ int expected = GlobLocHelper.OSCompare(str1, 2, str2, 2, 3, false); // 1;
+ if (String.Compare(str1, 2, str2, 2, 3, StringComparison.CurrentCulture) != expected)
+ {
+ TestLibrary.TestFramework.LogError("009", "LLOWO is not larger than llowo when the case is considered!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two null strings with indexs and length as zero
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two null strings with indexs and length as zero...");
+ try
+ {
+ if (String.Compare(null, 0, null, 0, 0, StringComparison.CurrentCultureIgnoreCase) != 0)
+ {
+ TestLibrary.TestFramework.LogError("011", "Copmare failed!");
+ retVal = false;
+ }
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogError("012", "ArgumentOutOfRangeException is thrown when a given index is out of range!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("013", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two strings which one of them is null
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two strings which one of them is null...");
+ try
+ {
+ if (String.Compare(null, 0, str1, 0, 0, StringComparison.CurrentCultureIgnoreCase) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("023", "Compare failed!");
+ retVal = false;
+ }
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogError("024", "ArgumentOutOfRangeException is thrown when one of strings is null!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("025", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare the strings with index out of range
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare the strings with index out of range...");
+ try
+ {
+ if (String.Compare(str1, 11, str2, 11, 3, StringComparison.CurrentCultureIgnoreCase) != 0)
+ {
+ retVal = false;
+ }
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // TestLibrary.TestFramework.LogError("003", "ArgumentOutOfRangeException is thrown when a given index is out of range!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare the strings with indexes are negative
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare the strings with indexes are negative...");
+ try
+ {
+ if (String.Compare(str1, -1, str2, -1, 3, StringComparison.CurrentCultureIgnoreCase) != 0)
+ {
+ retVal = false;
+ }
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // TestLibrary.TestFramework.LogError("005", "ArgumentOutOfRangeException is thrown when a given indexes are negative!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare the strings with length is negative
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare the strings with length is negative...");
+ try
+ {
+ if (String.Compare(str1, 0, str2, 0, -1, StringComparison.CurrentCultureIgnoreCase) != 0)
+ {
+ retVal = false;
+ }
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // TestLibrary.TestFramework.LogError("007", "ArgumentOutOfRangeException is thrown when a given length is negative!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two null strings with length out of range
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two null strings with length out of range...");
+ try
+ {
+ if (String.Compare(null, 0, null, 0, 1, StringComparison.CurrentCultureIgnoreCase) != 0)
+ {
+ TestLibrary.TestFramework.LogError("014","Compare failed!");
+ retVal = false;
+ }
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // TestLibrary.TestFramework.LogError("015", "ArgumentOutOfRangeException is thrown when a given length is out of range!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two null strings with indexs out of range
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two null strings with indexs out of range...");
+ try
+ {
+ if (String.Compare(null, 1, null, 1, 0, StringComparison.CurrentCultureIgnoreCase) != 0)
+ {
+ TestLibrary.TestFramework.LogError("017","Compare failed!");
+ retVal = false;
+ }
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // TestLibrary.TestFramework.LogError("018", "ArgumentOutOfRangeException is thrown when a given index is out of range!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("019", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two null strings with indexs are negative
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two null strings with indexs are negative...");
+ try
+ {
+ if (String.Compare(null, -1, null, -1, 0, StringComparison.CurrentCultureIgnoreCase) != 0)
+ {
+ TestLibrary.TestFramework.LogError("020","Compare failed!");
+ retVal = false;
+ }
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // TestLibrary.TestFramework.LogError("021", "ArgumentOutOfRangeException is thrown when a given indexes are negative!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("022", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two strings which one of them is null and the length is not zero
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two strings which one of them is null and the length is not zero...");
+ try
+ {
+ if (String.Compare(null, 0, str1, 0, 1, StringComparison.CurrentCultureIgnoreCase) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("026","Compare failed!");
+ retVal = false;
+ }
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // TestLibrary.TestFramework.LogError("027", "ArgumentOutOfRangeException is thrown when a given length is out of range!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("028", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Compare two strings which one of them is null and the length is negative
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest8()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Compare two strings which one of them is null and the length is negative...");
+ try
+ {
+ if (String.Compare(null, 0, str1, 0, -1, StringComparison.CurrentCultureIgnoreCase) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("029","Compare failed!");
+ retVal = false;
+ }
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ // TestLibrary.TestFramework.LogError("030", "ArgumentOutOfRangeException is thrown when a given length is ength is negative!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("031", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringcompare9.cs b/tests/src/CoreMangLib/cti/system/string/stringcompare9.cs
new file mode 100644
index 0000000000..230d45f915
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringcompare9.cs
@@ -0,0 +1,218 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+using System.Globalization;
+using TestLibrary;
+
+public class StringCompare
+{
+ public static string[] InterestingStrings = new string[] { null, "", "a", "1", "-", "A", "!", "abc", "aBc", "a\u0400Bc", "I", "i", "\u0130", "\u0131", "A", "\uFF21", "\uFE57"};
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Compare interesting strings ordinally");
+
+ try
+ {
+ foreach (string s in InterestingStrings)
+ {
+ foreach (string r in InterestingStrings)
+ {
+ retVal &= TestStrings(s, r);
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Compare many characters");
+
+ try
+ {
+ for (int i = 0; i < 40; i++) // Ok, 40 isn't that many... but this takes way too long
+ {
+ char c = Generator.GetChar(-55);
+ if (string.Compare(new string(new char[] { c }), new string(new char[] { c }), StringComparison.Ordinal) != 0)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Character " + i.ToString() + " is not equal to itself ordinally!");
+ retVal = false;
+ }
+
+ for (int j = 0; j < (int)c; j++)
+ {
+ int compareResult = string.Compare(new string(new char[] { c }), new string(new char[] { (char)j }), StringComparison.Ordinal);
+ if (compareResult != 0) compareResult = compareResult / Math.Abs(compareResult);
+ if (compareResult != 1)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Character " + ((int)c).ToString() + " is not greater than character " + j.ToString() + ", Compare result: " + compareResult.ToString());
+ retVal = false;
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.4", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Compare many strings");
+
+ try
+ {
+ for (int i = 0; i < 1000; i++)
+ {
+ string str1 = Generator.GetString(-55, false, 5, 20);
+ string str2 = Generator.GetString(-55, false, 5, 20);
+ if (string.Compare(str1, str1, StringComparison.Ordinal) != 0)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Comparison not as expected! Actual result: " + string.Compare(str1, str1, StringComparison.Ordinal).ToString() + ", Expected result: 0");
+ TestLibrary.TestFramework.LogInformation("String 1: <" + str1 + "> : " + BytesFromString(str1) + "\nString 2: <" + str1 + "> : " + BytesFromString(str1));
+ retVal = false;
+ }
+ if (string.Compare(str2, str2, StringComparison.Ordinal) != 0)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Comparison not as expected! Actual result: " + string.Compare(str2, str2, StringComparison.Ordinal).ToString() + ", Expected result: 0");
+ TestLibrary.TestFramework.LogInformation("String 1: <" + str2 + "> : " + BytesFromString(str2) + "\nString 2: <" + str2 + "> : " + BytesFromString(str2));
+ retVal = false;
+ }
+ TestStrings(str1, str2);
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.4", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Specific regression cases");
+
+ try
+ {
+ CultureInfo oldCi = Utilities.CurrentCulture;
+ Utilities.CurrentCulture = new CultureInfo("hu-HU");
+ retVal &= TestStrings("dzsdzs", "ddzs");
+ Utilities.CurrentCulture = oldCi;
+
+ retVal &= TestStrings("\u00C0nimal", "A\u0300nimal");
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public static int Main()
+ {
+ StringCompare test = new StringCompare();
+
+ TestLibrary.TestFramework.BeginTestCase("StringCompare");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ private bool TestStrings(string str1, string str2)
+ {
+ bool retVal = true;
+
+ int expectValue = PredictValue(str1, str2);
+ int actualValue = String.Compare(str1, str2, StringComparison.Ordinal);
+ if (expectValue != 0) expectValue = expectValue / Math.Abs(expectValue);
+ if (actualValue != 0) actualValue = actualValue / Math.Abs(actualValue);
+
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Comparison not as expected! Actual result: " + actualValue + ", Expected result: " + expectValue);
+ TestLibrary.TestFramework.LogInformation("String 1: <" + str1 + "> : " + BytesFromString(str1) + "\nString 2: <" + str2 + "> : " + BytesFromString(str2));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ int PredictValue(string str1, string str2)
+ {
+ if (str1 == null)
+ {
+ if (str2 == null) return 0;
+ else return -1;
+ }
+ if (str2 == null) return 1;
+
+ for (int i = 0; i < str1.Length; i++)
+ {
+ if (i >= str2.Length) return 1;
+ if ((int)str1[i] > (int)str2[i]) return 1;
+ if ((int)str1[i] < (int)str2[i]) return -1;
+ }
+
+ if (str2.Length > str1.Length) return -1;
+
+ return 0;
+ }
+
+ private static string BytesFromString(string str)
+ {
+ if (str == null) return string.Empty;
+ StringBuilder output = new StringBuilder();
+ for (int i = 0; i < str.Length; i++)
+ {
+ output.Append(Utilities.ByteArrayToString(BitConverter.GetBytes(str[i])));
+ if (i != (str.Length - 1)) output.Append(", ");
+ }
+ return output.ToString();
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringcompareordinal1.cs b/tests/src/CoreMangLib/cti/system/string/stringcompareordinal1.cs
new file mode 100644
index 0000000000..73e959df98
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringcompareordinal1.cs
@@ -0,0 +1,587 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Collections;
+using System.Text;
+using TestLibrary;
+
+public class StringCompareOrdinal1
+{
+ private const int c_MINI_STRINF_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ public static int Main()
+ {
+ StringCompareOrdinal1 sco1 = new StringCompareOrdinal1();
+
+ TestLibrary.TestFramework.BeginScenario("StringCompareOrdinal1");
+
+ if (sco1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+ retVal = PosTest12() && retVal;
+ retVal = PosTest13() && retVal;
+ retVal = PosTest14() && retVal;
+ retVal = PosTest15() && retVal;
+ retVal = PosTest16() && retVal;
+ retVal = PosTest17() && retVal;
+ retVal = PosTest18() && retVal;
+ return retVal;
+ }
+ #region Positive Testing
+ public bool PosTest1()
+ {
+ string strA;
+ string strB;
+ int ActualResult;
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Two Null CompareOrdinal");
+
+ try
+ {
+ strA = null;
+ strB = null;
+ ActualResult = string.CompareOrdinal(strA, strB);
+ if (ActualResult != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "Two Null CompareOrdinal Expected Result is equel 0,Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string strA;
+ string strB;
+ int ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Null and null string CompareOrdinal");
+
+ try
+ {
+ strA = null;
+ strB = "";
+ ActualResult = string.CompareOrdinal(strA, strB);
+ if (ActualResult >= 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "Null and null string CompareOrdinal Expected Result is less 0,Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string strA;
+ string strB;
+ int ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Null and space string CompareOrdinal");
+
+ try
+ {
+ strA = null;
+ strB = " ";
+ ActualResult = string.CompareOrdinal(strA, strB);
+ if (ActualResult >= 0 )
+ {
+ TestLibrary.TestFramework.LogError("005", "Null and space string CompareOrdinal Expected Result is less 0,Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string strA;
+ string strB;
+ int ActualResult;
+ int ExpectResult = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Null string and a space strings CompareOrdinal");
+
+ try
+ {
+ strA = "";
+ strB = " ";
+ ActualResult = string.CompareOrdinal(strA, strB);
+ if (ActualResult >= ExpectResult)
+ {
+ TestLibrary.TestFramework.LogError("007", "Null string and a space strings CompareOrdinal Expected Result is less 0;Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string strA;
+ string strB;
+ string strBasic;
+ Random rand = new Random(-55);
+ int ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Two like strings embedded different tabs CompareOrdinal");
+
+ try
+ {
+ char CharTab = '\t';
+ strBasic = TestLibrary.Generator.GetString(-55, false, c_MINI_STRINF_LEN, c_MAX_STRING_LEN);
+ strA = strBasic + new string(CharTab, rand.Next(1, 10));
+ strB = strBasic + new string(CharTab, rand.Next(11, 20));
+ ActualResult = string.CompareOrdinal(strA, strB);
+ if (ActualResult >= 0)
+ {
+ TestLibrary.TestFramework.LogError("009", "Two like strings embedded different tabs CompareOrdinal Expected Result is less 0,Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ string strA;
+ string strB;
+ int ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Two like strings embedded the same tab but differet location CompareOrdinal");
+
+ try
+ {
+ strA = "hello"+"\t"+"world";
+ strB = "\t"+"helloworl"+ "d";
+ ActualResult = string.CompareOrdinal(strA, strB);
+ if (ActualResult <= 0)
+ {
+ TestLibrary.TestFramework.LogError("011", "Two like strings embedded the same tab but differet location CompareOrdinal: Expected Result is greater 0,Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ string strA;
+ string strB;
+ int ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7: String with upper chars and one with lower chars CompareOrdinal");
+
+ try
+ {
+ strA = "HELLOWORD";
+ strB = "helloword";
+ ActualResult = string.CompareOrdinal(strA, strB);
+ if (ActualResult >= 0 )
+ {
+ TestLibrary.TestFramework.LogError("013", "String with upper chars and one with lower chars CompareOrdinal Expected Result is equel 0,Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ string strA;
+ string strB;
+ int ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest8: Two strings with ignorecase same char CompareOrdinal");
+
+ try
+ {
+ strA = "helloword";
+ strB = "heLLoword";
+ ActualResult = string.CompareOrdinal(strA, strB);
+ if (ActualResult <= 0 )
+ {
+ TestLibrary.TestFramework.LogError("015", " Two strings with ignorecase same char CompareOrdinal Expected Result is greate 0,Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+ string strA;
+ string strB;
+ int ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest9: Two not null strings CompareOrdinal one");
+
+ try
+ {
+ strA = "hello-word";
+ strB = "helloword";
+ ActualResult = string.CompareOrdinal(strA, strB);
+ if (ActualResult >= 0)
+ {
+ TestLibrary.TestFramework.LogError("017", "Two not null strings CompareOrdinal one Expected Result is less 0,Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest10()
+ {
+ bool retVal = true;
+ string strA;
+ string strB;
+ int ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest10: Two not null strings CompareOrdinal two");
+
+ try
+ {
+ strA = "helloword";
+ strB = "hello\nword";
+ ActualResult = string.CompareOrdinal(strA, strB);
+ if (ActualResult <= 0)
+ {
+ TestLibrary.TestFramework.LogError("019", " Two not null strings CompareOrdinal two Expected Result is larger 0,Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest11()
+ {
+ bool retVal = true;
+ string strA;
+ string strB;
+ int ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest11: Two not null strings CompareOrdinal three");
+
+ try
+ {
+ strA = "helloword";
+ strB = "helloword\n";
+ ActualResult = string.CompareOrdinal(strA, strB);
+ if (ActualResult >= 0)
+ {
+ TestLibrary.TestFramework.LogError("021", " Two not null strings CompareOrdinal three Expected Result is less 0,Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("022", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest12()
+ {
+ bool retVal = true;
+ string strA;
+ string strB;
+ int ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest12: Two like not null strings CompareOrdinal four");
+
+ try
+ {
+ strA = "helloword";
+ strB = "helloword";
+ ActualResult = string.CompareOrdinal(strA, strB);
+ if (ActualResult != 0)
+ {
+ TestLibrary.TestFramework.LogError("023", " Two not null strings CompareOrdinal four Expected Result is equel 0,Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("024", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest13()
+ {
+ bool retVal = true;
+ string strA;
+ string strB;
+ int ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest13: Two not null strings CompareOrdinal five");
+
+ try
+ {
+ strA = "\uFF21";
+ strB = "A";
+ ActualResult = string.CompareOrdinal(strA, strB);
+ if (ActualResult <= 0 )
+ {
+ TestLibrary.TestFramework.LogError("025", " Two not null strings CompareOrdinal five Expected Result is greater 0,Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("026", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest14()
+ {
+ bool retVal = true;
+ string strA;
+ string strB;
+ int ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest14: Two not null strings CompareOrdinal six");
+
+ try
+ {
+ strA = "\uD801\uDc00";
+ strB = "\uD801\uDc28";
+ ActualResult = string.CompareOrdinal(strA, strB);
+ if (ActualResult >= 0)
+ {
+ TestLibrary.TestFramework.LogError("027", " Two not null strings CompareOrdinal six Expected Result is less 0,Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("028", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest15()
+ {
+ bool retVal = true;
+ string strA;
+ string strB;
+ int ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest15: Two not null strings CompareOrdinal seven");
+
+ try
+ {
+ strA = "\x200b";
+ strB = "\uFEFF";
+ ActualResult = string.CompareOrdinal(strA, strB);
+ if (ActualResult >= 0)
+ {
+ TestLibrary.TestFramework.LogError("029", " Two not null strings CompareOrdinal seven Expected Result is less 0,Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("030", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest16()
+ {
+ bool retVal = true;
+ string strA;
+ string strB;
+ int ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest16: Two not null strings CompareOrdinal eight");
+
+ try
+ {
+ strA = "A`";
+ strB = "\u00c0";
+ ActualResult = string.CompareOrdinal(strA, strB);
+ if (ActualResult >= 0)
+ {
+ TestLibrary.TestFramework.LogError("031", " Two not null strings CompareOrdinal nine Expected Result is less 0,Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("032", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest17()
+ {
+ bool retVal = true;
+ string strA;
+ string strB;
+ int ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest17: Two not null strings CompareOrdinal nine");
+
+ try
+ {
+ strA = "\\\\my documents\\my files\\";
+ strB = @"\\my documents\my files\";
+ ActualResult = string.CompareOrdinal(strA, strB);
+ if (ActualResult != 0)
+ {
+ TestLibrary.TestFramework.LogError("033", " Two not null strings CompareOrdinal nine Expected Result is equel 0,Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("034", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest18()
+ {
+ bool retVal = true;
+ string strA;
+ string strB;
+ int ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest18: tab and fout spaces CompareOrdinal");
+
+ try
+ {
+ strA = "\t";
+ strB = " ";
+ ActualResult = string.CompareOrdinal(strA, strB);
+ if (ActualResult >= 0)
+ {
+ TestLibrary.TestFramework.LogError("035", " tab and fout spaces CompareOrdinal Expected Result is greater 0,Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("036", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+
+
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringcompareordinal2.cs b/tests/src/CoreMangLib/cti/system/string/stringcompareordinal2.cs
new file mode 100644
index 0000000000..0e84ab9f66
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringcompareordinal2.cs
@@ -0,0 +1,1216 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using TestLibrary;
+
+
+public class StringCompareOrdinal2
+{
+ private const int c_MINI_STRINF_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private string strA;
+ private int indexA;
+ private string strB;
+ private int indexB;
+ private int length;
+
+ public static int Main()
+ {
+ StringCompareOrdinal2 sco2 = new StringCompareOrdinal2();
+ TestLibrary.TestFramework.BeginTestCase("StringCompareOrdinal2");
+ TestLibrary.TestFramework.BeginScenario("StringCompareOrdinal2");
+
+ if (sco2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+ retVal = PosTest12() && retVal;
+ retVal = PosTest13() && retVal;
+ retVal = PosTest14() && retVal;
+ retVal = PosTest15() && retVal;
+ retVal = PosTest16() && retVal;
+ retVal = PosTest17() && retVal;
+ retVal = PosTest18() && retVal;
+ retVal = PosTest19() && retVal;
+ retVal = PosTest20() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+ retVal = NegTest9() && retVal;
+ retVal = NegTest10() && retVal;
+ retVal = NegTest11() && retVal;
+ retVal = NegTest12() && retVal;
+ retVal = NegTest13() && retVal;
+ retVal = NegTest14() && retVal;
+ retVal = NegTest15() && retVal;
+ retVal = NegTest16() && retVal;
+ retVal = NegTest17() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Testing
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Two empty Strings CompareOrdinal");
+
+ try
+ {
+ strA = String.Empty;
+ strB = String.Empty;
+ indexA = 0;
+ indexB = 0;
+ length = 0;
+ int ExpectResult = 0;
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ if (ActualResult != ExpectResult)
+ {
+ TestLibrary.TestFramework.LogError("001", "Null Strings CompareOrdinal Expected Result is (" + ExpectResult + ");Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:NullString and not nullString CompareOrdinal");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, 0, 0);
+ strB = TestLibrary.Generator.GetString(-55, false, c_MINI_STRINF_LEN, c_MAX_STRING_LEN);
+ indexA = rand.Next(0, strA.Length);
+ indexB = rand.Next(0, strB.Length);
+ length = rand.Next();
+ if (indexA == 0 && indexB >= 0 && indexB <= strB.Length && length >= 0)
+ {
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ if (ActualResult > 0 || ActualResult == 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "Null string and not null string CompareOrdinal Expected Result is less 0£¬Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ else
+ TestLibrary.TestFramework.LogError("003", "Index or Length Number is out of range");
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Not nullString and nullString CompareOrdinal");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRINF_LEN, c_MAX_STRING_LEN);
+ strB = TestLibrary.Generator.GetString(-55, false, 0, 0);
+ indexA = rand.Next(0, strA.Length);
+ indexB = rand.Next(0, strB.Length);
+ length = rand.Next();
+ if (indexB == 0 && indexA >= 0 && indexA <= strA.Length && length >= 0)
+ {
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ if (ActualResult < 0 || ActualResult == 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "Null string and not null string CompareOrdinal Expected Result is less 0£¬Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ else
+ TestLibrary.TestFramework.LogError("005", "Index or Length Number is out of range");
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Two like not NullStrings CompareOrdinal one");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRINF_LEN, c_MAX_STRING_LEN);
+ strB = strA.ToString();
+ indexA = rand.Next(0, strA.Length);
+ indexB = indexA;
+ length = rand.Next();
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ if (ActualResult != 0)
+ {
+ TestLibrary.TestFramework.LogError("007", "Two like not NullStrings CompareOrdinal one ExpectResult is 0,ActulResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5:Two like not NullStrings CompareOrdinal eighteen");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = "heloredmon!";
+ strB = strA.ToString();
+ indexA = 3;
+ indexB = 4;
+ length = 2;
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ if (ActualResult >= 0)
+ {
+ TestLibrary.TestFramework.LogError("026", "Two like not NullStrings CompareOrdinal eighteen ExpectResult is less 0,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("027", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6:Two like not NullStrings CompareOrdinal nineteen");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = "This\0string\0js\0validghjgj";
+ strB = "This\0string\0is\0valid";
+ indexA = 0;
+ indexB = 0;
+ length = 13;
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ if (ActualResult <= 0)
+ {
+ TestLibrary.TestFramework.LogError("026", "Two like not NullStrings CompareOrdinal eighteen ExpectResult is less 0,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("027", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest7:Two like not NullStrings CompareOrdinal twenty");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = "abccde";
+ strB = "abcccde";
+ indexA = 3;//strA.Length - indexA = 2
+ indexB = 4;//strB.Length - indexB = 3
+ length = 4;//length = 4
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ if (ActualResult != 0)
+ {
+ TestLibrary.TestFramework.LogError("028", "Two like not NullStrings CompareOrdinal eighteen ExpectResult is equel 0,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("029", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest8:Two like not NullStrings CompareOrdinal twentyone");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = "adsfasd";
+ strB = "ADSFASD";
+ indexA = 3;
+ indexB = 4;
+ length = 0;
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ if (ActualResult != 0)
+ {
+ TestLibrary.TestFramework.LogError("030", "Two like not NullStrings CompareOrdinal eighteen ExpectResult is equel 0,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("031", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest9:Two like not NullStrings CompareOrdinal twentytwo");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = null;
+ strB = null;
+ indexA = rand.Next();
+ indexB = rand.Next();
+ length = rand.Next();
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ if (ActualResult != 0)
+ {
+ TestLibrary.TestFramework.LogError("031", "Two like not NullStrings CompareOrdinal eighteen ExpectResult is equel 0,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("032", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest10()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest10:Two like not NullStrings CompareOrdinal twentythree");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = null;
+ strB = "asdfasdf";
+ indexA = rand.Next();
+ indexB = rand.Next(0, strB.Length);
+ length = rand.Next();
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ if (ActualResult >= 0)
+ {
+ TestLibrary.TestFramework.LogError("033", "Two like not NullStrings CompareOrdinal eighteen ExpectResult is less 0,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("034", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest11()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest11:Two like not NullStrings CompareOrdinal twentyfour");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = null;
+ strB = "asdfasdf";
+ indexA = rand.Next();
+ indexB = rand.Next(strB.Length, strB.Length + 10);
+ length = rand.Next();
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ if (ActualResult >= 0)
+ {
+ TestLibrary.TestFramework.LogError("035", "Two like not NullStrings CompareOrdinal eighteen ExpectResult is less 0,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("036", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest12()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest12:Two like not NullStrings CompareOrdinal twentyfive");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = null;
+ strB = "";
+ indexA = rand.Next();
+ indexB = rand.Next();
+ length = rand.Next();
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ if (ActualResult >= 0)
+ {
+ TestLibrary.TestFramework.LogError("038", "Two like not NullStrings CompareOrdinal eighteen ExpectResult is greater 0,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("039", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest13()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest13:Two like not NullStrings CompareOrdinal twentyseven");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = " "; //four spaces
+ strB = " "; //one tab
+ indexA = rand.Next(0, strA.Length);
+ indexB = indexA;
+ length = rand.Next();
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ if (ActualResult != 0)
+ {
+ TestLibrary.TestFramework.LogError("040", "Two like not NullStrings CompareOrdinal eighteen ExpectResult is equel 0,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("041", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest14()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest14:Two like not NullStrings CompareOrdinal twentyeight");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = " "; //four spaces
+ strB = " "; //one tab
+ indexA = rand.Next(0, strA.Length);
+ indexB = indexA + 1;
+ length = rand.Next();
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ if (ActualResult <= 0)
+ {
+ TestLibrary.TestFramework.LogError("042", "Two like not NullStrings CompareOrdinal eighteen ExpectResult is greater 0,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("043", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest15()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest15:Two like not NullStrings CompareOrdinal twentynine");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = " "; //four spaces
+ strB = " "; //one tab
+ indexB = rand.Next(0, strB.Length);
+ indexA = indexB + 1;
+ length = rand.Next();
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ if (ActualResult >= 0)
+ {
+ TestLibrary.TestFramework.LogError("044", "Two like not NullStrings CompareOrdinal eighteen ExpectResult is less 0,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("045", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest16()
+ {
+ bool retVal = true;
+ int ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest16: Two not null strings CompareOrdinal eight");
+
+ try
+ {
+ strA = "\\\\my documents\\my files\\";
+ strB = @"\\my documents\my files\";
+ indexA = 0;
+ indexB = 0;
+ length = 10;
+ ActualResult = string.CompareOrdinal(strA, strB);
+ if (ActualResult != 0)
+ {
+ TestLibrary.TestFramework.LogError("046", " Two not null strings CompareOrdinal seven Expected Result is equel 0,Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("047", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest17()
+ {
+ bool retVal = true;
+ string strA;
+ string strB;
+ int ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest17: Two not null strings CompareOrdinal six");
+
+ try
+ {
+ strA = "\uD801\uDc00";
+ strB = "\uD801\uDc28";
+ ActualResult = string.CompareOrdinal(strA, strB);
+ if (ActualResult >= 0)
+ {
+ TestLibrary.TestFramework.LogError("048", " Two not null strings CompareOrdinal six Expected Result is less 0,Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("049", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest18()
+ {
+ bool retVal = true;
+ string strA;
+ string strB;
+ int ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest18: Two not null strings CompareOrdinal seven");
+
+ try
+ {
+ strA = "\x200b";
+ strB = "\uFEFF";
+ ActualResult = string.CompareOrdinal(strA, strB);
+ if (ActualResult >= 0)
+ {
+ TestLibrary.TestFramework.LogError("050", " Two not null strings CompareOrdinal seven Expected Result is less 0,Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("051", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest19()
+ {
+ bool retVal = true;
+ string strA;
+ string strB;
+ int ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest19: Two not null strings CompareOrdinal five");
+
+ try
+ {
+ strA = "\uFF21";
+ strB = "A";
+ ActualResult = string.CompareOrdinal(strA, strB);
+ if (ActualResult <= 0)
+ {
+ TestLibrary.TestFramework.LogError("052", " Two not null strings CompareOrdinal five Expected Result is greater 0,Actual Result is ( " + ActualResult + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("053", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest20()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest0:Two like not NullStrings CompareOrdinal thirty");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = "ABCDE";
+ strB = "abcde";
+ indexA = strA.Length;
+ indexB = strB.Length;
+ length = rand.Next();
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ if (ActualResult != 0)
+ {
+ TestLibrary.TestFramework.LogError("N001", "ExpectResult is 0,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+
+ }
+
+
+ #endregion
+
+
+ #region Negative Testing
+ /// <summary>
+ /// indexA>strA.Length,indexB normal and length normal
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Two like not NullStrings CompareOrdinal two");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRINF_LEN, c_MAX_STRING_LEN);
+ strB = strA.ToString();
+ indexA = rand.Next(strA.Length + 1, strA.Length + 10);
+ indexB = rand.Next(0, strB.Length);
+ length = rand.Next();
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ TestLibrary.TestFramework.LogError("N00A", "Expected exception did not occur. Expected ArgumentOutOfRangeExeption");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ TestLibrary.TestFramework.LogInformation("It occurred an expect exception:" + e);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N003", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ /// <summary>
+ /// indexA<0,indexB normal and length normal
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:Two like not NullStrings CompareOrdinal three");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRINF_LEN, c_MAX_STRING_LEN);
+ strB = strA.ToString();
+ indexA = (1 + rand.Next()) * (-1);
+ indexB = rand.Next(0, strB.Length);
+ length = rand.Next();
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ TestLibrary.TestFramework.LogError("N00B", "Expected exception did not occur. Expected ArgumentOutOfRangeExeption");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ TestLibrary.TestFramework.LogInformation("It occurred an expect exception:" + e);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N005", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ /// <summary>
+ /// indexA normal, indexB>strB.length and length normal
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3:Two like not NullStrings CompareOrdinal four");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRINF_LEN, c_MAX_STRING_LEN);
+ strB = strA.ToString();
+ indexA = rand.Next(0, strA.Length);
+ indexB = rand.Next(strB.Length + 1, strB.Length + 10);
+ length = rand.Next();
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ TestLibrary.TestFramework.LogError("N00C", "Expected exception did not occur. Expected ArgumentOutOfRangeExeption");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ TestLibrary.TestFramework.LogInformation("It occurred an expect exception:" + e);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N007", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ /// <summary>
+ /// indexA normal,indexB<0 and length normal
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4:Two like not NullStrings CompareOrdinal five");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRINF_LEN, c_MAX_STRING_LEN);
+ strB = strA.ToString();
+ indexA = rand.Next(0, strA.Length);
+ indexB = rand.Next(1, strB.Length) * (-1);
+ length = rand.Next();
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ TestLibrary.TestFramework.LogError("N00D", "Expected exception did not occur. Expected ArgumentOutOfRangeExeption");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ TestLibrary.TestFramework.LogInformation("It occurred an expect exception:" + e);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N009", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ /// <summary>
+ /// indexA normal, indexB normal and length<0
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest5:Two like not NullStrings CompareOrdinal six");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRINF_LEN, c_MAX_STRING_LEN);
+ strB = strA.ToString();
+ indexA = rand.Next(0, strA.Length);
+ indexB = rand.Next(0, strB.Length);
+ length = (1 + rand.Next()) * (-1);
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ TestLibrary.TestFramework.LogError("N00E", "Expected exception did not occur. Expected ArgumentOutOfRangeExeption");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ TestLibrary.TestFramework.LogInformation("It occurred an expect exception:" + e);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N011", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ /// <summary>
+ /// indexA>strA.Length,indexB<0,length normal
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest6:Two like not NullStrings CompareOrdinal seven");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRINF_LEN, c_MAX_STRING_LEN);
+ strB = strA.ToString();
+ indexA = rand.Next(strA.Length + 1, strA.Length + 10);
+ indexB = rand.Next(1, strB.Length) * (-1);
+ length = rand.Next();
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ TestLibrary.TestFramework.LogError("N00F", "Expected exception did not occur. Expected ArgumentOutOfRangeExeption");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ TestLibrary.TestFramework.LogInformation("It occurred an expect exception:" + e);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N013", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ /// <summary>
+ /// IndexA>strA.Length,indexB normal and length<0
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest7:Two like not NullStrings CompareOrdinal eight");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRINF_LEN, c_MAX_STRING_LEN);
+ strB = strA.ToString();
+ indexA = rand.Next(strA.Length + 1, strA.Length + 10);
+ indexB = rand.Next(0, strB.Length);
+ length = (1 + rand.Next()) * (-1);
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ TestLibrary.TestFramework.LogError("N00G", "Expected exception did not occur. Expected ArgumentOutOfRangeExeption");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ TestLibrary.TestFramework.LogInformation("It occurred an expect exception:" + e);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N015", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ /// <summary>
+ /// indexA<0,indexB normal and length<0
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest8()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest8:Two like not NullStrings CompareOrdinal nine");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRINF_LEN, c_MAX_STRING_LEN);
+ strB = strA.ToString();
+ indexA = rand.Next(1, strA.Length) * (-1);
+ indexB = rand.Next(0, strB.Length);
+ length = (1 + rand.Next()) * (-1);
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ TestLibrary.TestFramework.LogError("N00H", "Expected exception did not occur. Expected ArgumentOutOfRangeExeption");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ TestLibrary.TestFramework.LogInformation("It occurred an expect exception:" + e);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N017", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ /// <summary>
+ /// indexA<0,indexB<0 and length normal
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest9()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest9:Two like not NullStrings CompareOrdinal nine");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRINF_LEN, c_MAX_STRING_LEN);
+ strB = strA.ToString();
+ indexA = rand.Next(1, strA.Length) * (-1);
+ indexB = rand.Next(1, strB.Length) * (-1);
+ length = rand.Next();
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ TestLibrary.TestFramework.LogError("N00I", "Expected exception did not occur. Expected ArgumentOutOfRangeExeption");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ TestLibrary.TestFramework.LogInformation("It occurred an expect exception:" + e);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N019", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ /// <summary>
+ /// indexA normal,indexB<0 and length<0
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest10()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest10:Two like not NullStrings CompareOrdinal ten");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRINF_LEN, c_MAX_STRING_LEN);
+ strB = strA.ToString();
+ indexA = rand.Next(0, strA.Length);
+ indexB = rand.Next(1, strB.Length) * (-1);
+ length = (1 + rand.Next()) * (-1);
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ TestLibrary.TestFramework.LogError("N00J", "Expected exception did not occur. Expected ArgumentOutOfRangeExeption");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ TestLibrary.TestFramework.LogInformation("It occurred an expect exception:" + e);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N021", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ /// <summary>
+ /// indexA normal,indexB>strB.Length and length<0
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest11()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest11:Two like not NullStrings CompareOrdinal eleven");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRINF_LEN, c_MAX_STRING_LEN);
+ strB = strA.ToString();
+ indexA = rand.Next(0, strA.Length);
+ indexB = rand.Next(strB.Length + 1, strB.Length + 10);
+ length = (1 + rand.Next()) * (-1);
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ TestLibrary.TestFramework.LogError("N00K", "Expected exception did not occur. Expected ArgumentOutOfRangeExeption");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ TestLibrary.TestFramework.LogInformation("It occurred an expect exception:" + e);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N023", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ /// <summary>
+ /// indexA<0,indexB<0 and length <0
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest12()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest12:Two like not NullStrings CompareOrdinal twelve");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRINF_LEN, c_MAX_STRING_LEN);
+ strB = strA.ToString();
+ indexA = rand.Next(1, strA.Length) * (-1);
+ indexB = rand.Next(1, strB.Length) * (-1);
+ length = rand.Next() * (-1);
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ TestLibrary.TestFramework.LogError("N00L", "Expected exception did not occur. Expected ArgumentOutOfRangeExeption");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ TestLibrary.TestFramework.LogInformation("It occurred an expect exception:" + e);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N025", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ /// <summary>
+ /// indexA>strA.Length,indexB>strB.Length and length <0
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest13()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest13:Two like not NullStrings CompareOrdinal thirteen");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRINF_LEN, c_MAX_STRING_LEN);
+ strB = strA.ToString();
+ indexA = rand.Next(strA.Length + 1, strA.Length + 10);
+ indexB = rand.Next(strB.Length + 1, strB.Length + 10);
+ length = (1 + rand.Next()) * (-1);
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ TestLibrary.TestFramework.LogError("N00M", "Expected exception did not occur. Expected ArgumentOutOfRangeExeption");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ TestLibrary.TestFramework.LogInformation("It occurred an expect exception:" + e);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N027", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ /// <summary>
+ /// indexA>strA.Length indexB>strB.Length and length normal
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest14()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest14:Two like not NullStrings CompareOrdinal fourteen");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRINF_LEN, c_MAX_STRING_LEN);
+ strB = strA.ToString();
+ indexA = rand.Next(strA.Length + 1, strA.Length + 10);
+ indexB = rand.Next(strB.Length + 1, strB.Length + 10);
+ length = rand.Next();
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ TestLibrary.TestFramework.LogError("N00N", "Expected exception did not occur. Expected ArgumentOutOfRangeExeption");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ TestLibrary.TestFramework.LogInformation("It occurred an expect exception:" + e);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N029", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ /// <summary>
+ /// indexA<0,indexB<strB.Length and length normal
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest15()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest15:Two like not NullStrings CompareOrdinal fifteen");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRINF_LEN, c_MAX_STRING_LEN);
+ strB = strA.ToString();
+ indexA = rand.Next(1, strA.Length) * (-1);
+ indexB = rand.Next(strB.Length + 1, strB.Length + 10);
+ length = rand.Next();
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ TestLibrary.TestFramework.LogError("N00O", "Expected exception did not occur. Expected ArgumentOutOfRangeExeption");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ TestLibrary.TestFramework.LogInformation("It occurred an expect exception:" + e);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N031", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ /// <summary>
+ /// indexA <0,indexB>strB.Length and length<0
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest16()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest16:Two like not NullStrings CompareOrdinal sixteen");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRINF_LEN, c_MAX_STRING_LEN);
+ strB = strA.ToString();
+ indexA = rand.Next(1, strA.Length) * (-1);
+ indexB = rand.Next(strB.Length + 1, strB.Length + 10);
+ length = (1 + rand.Next()) * (-1);
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ TestLibrary.TestFramework.LogError("N00P", "Expected exception did not occur. Expected ArgumentOutOfRangeExeption");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ TestLibrary.TestFramework.LogInformation("It occurred an expect exception:" + e);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N033", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ /// <summary>
+ /// indexA>strA.Length,indexB<0 and length<0
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest17()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest17:Two like not NullStrings CompareOrdinal seventeen");
+ Random rand = new Random(-55);
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRINF_LEN, c_MAX_STRING_LEN);
+ strB = strA.ToString();
+ indexA = rand.Next(strA.Length + 1, strA.Length + 10);
+ indexB = rand.Next(1, strB.Length) * (-1);
+ length = (1 + rand.Next()) * (-1);
+
+ int ActualResult = string.CompareOrdinal(strA, indexA, strB, indexB, length);
+ TestLibrary.TestFramework.LogError("N00Q", "Expected exception did not occur. Expected ArgumentOutOfRangeExeption");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ TestLibrary.TestFramework.LogInformation("It occurred an expect exception:" + e);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N035", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringconcat1.cs b/tests/src/CoreMangLib/cti/system/string/stringconcat1.cs
new file mode 100644
index 0000000000..ce66aea472
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringconcat1.cs
@@ -0,0 +1,373 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+using TestLibrary;
+
+
+public class StringConcat1
+{
+ public static int Main()
+ {
+ StringConcat1 sc1 = new StringConcat1();
+
+ TestLibrary.TestFramework.BeginTestCase("StringConcat1");
+
+ if (sc1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+ retVal = PosTest12() && retVal;
+ retVal = PosTest13() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+
+ TestLibrary.TestFramework.BeginScenario("PostTest1:Concat a random object");
+ try
+ {
+ ObjA = new object();
+ ActualResult = string.Concat(ObjA);
+ if (ActualResult != ObjA.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "Concat a random object ExpectResult is" +ObjA.ToString()+ ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+
+ TestLibrary.TestFramework.BeginScenario("PostTest2:Concat an object of null");
+ try
+ {
+ ObjA = null;
+ ActualResult = string.Concat(ObjA);
+ if (ActualResult != string.Empty)
+ {
+ TestLibrary.TestFramework.LogError("003", "Concat an object of null ExpectResult is" +string.Empty+" ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Concat an object of empty");
+ try
+ {
+ ObjA = "";
+ ActualResult = string.Concat(ObjA);
+ if (ActualResult != ObjA.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "Concat an object of empty ExpectResult is equel" +ObjA.ToString()+ ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string ObjA;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Concat an object of two tab");
+ try
+ {
+ ObjA = new string('\t', 2);
+ ActualResult = string.Concat(ObjA);
+ if (ActualResult != ObjA.ToString())
+ {
+ TestLibrary.TestFramework.LogError("007", "Concat an object of two tab ExpectResult is" +ObjA.ToString()+" ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ TestLibrary.TestFramework.BeginScenario("PosTest5:Concat an object of int");
+ try
+ {
+ ObjA = new int();
+ ActualResult = string.Concat(ObjA);
+ if (ActualResult != ObjA.ToString())
+ {
+ TestLibrary.TestFramework.LogError("009", "Concat an object of int ExpectResult is equel" +ObjA.ToString()+" ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Concat an object of datetime");
+ try
+ {
+ ObjA = new DateTime();
+ ActualResult = string.Concat(ObjA);
+ if (ActualResult != ObjA.ToString())
+ {
+ TestLibrary.TestFramework.LogError("011", " ExpectResult is equel" +ObjA.ToString()+ ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Concat an object of bool");
+ try
+ {
+ ObjA = new bool();
+ ActualResult = string.Concat(ObjA);
+ if (ActualResult != ObjA.ToString())
+ {
+ TestLibrary.TestFramework.LogError("013", "Concat an object of bool ExpectResult is equel" +ObjA.ToString()+",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ TestLibrary.TestFramework.BeginScenario("PosTest8:Concat an object of random class instance ");
+ try
+ {
+ ObjA = new StringConcat1();
+ ActualResult = string.Concat(ObjA);
+ if (ActualResult != ObjA.ToString())
+ {
+ TestLibrary.TestFramework.LogError("015", "Concat an object of random class instance ExpectResult is equel" +ObjA.ToString()+" ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ TestLibrary.TestFramework.BeginScenario("PosTest9: Concat an object of Guid");
+ try
+ {
+ ObjA = new Guid();
+ ActualResult = string.Concat(ObjA);
+ if (ActualResult != ObjA.ToString())
+ {
+ TestLibrary.TestFramework.LogError("017", "Concat an object of Guid ExpectResult is equel"+ ObjA.ToString()+",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest10()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ TestLibrary.TestFramework.BeginScenario("PosTest10:Concat an object of Random ");
+ try
+ {
+ ObjA = new Random(-55);
+ ActualResult = string.Concat(ObjA);
+ if (ActualResult != ObjA.ToString())
+ {
+ TestLibrary.TestFramework.LogError("019", "Concat an object of Random ExpectResult is equel" + ObjA.ToString() +",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest11()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ TestLibrary.TestFramework.BeginScenario("PosTest11: Concat an object of float");
+ try
+ {
+ ObjA = new float();
+ ActualResult = string.Concat(ObjA);
+ if (ActualResult != ObjA.ToString())
+ {
+ TestLibrary.TestFramework.LogError("021", "Concat an object of float ExpectResult is equel" +ObjA.ToString()+" ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("022", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest12()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ TestLibrary.TestFramework.BeginScenario("PosTest12:Concat an object of SByte");
+ try
+ {
+ ObjA = new SByte();
+ ActualResult = string.Concat(ObjA);
+ if (ActualResult != ObjA.ToString())
+ {
+ TestLibrary.TestFramework.LogError("023", "Concat an object of SByte ExpectResult is equel" + ObjA.ToString()+ ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("024", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest13()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ TestLibrary.TestFramework.BeginScenario("PosTest13:Concat an object of number of less than 0");
+ try
+ {
+ ObjA = -123;
+ ActualResult = string.Concat(ObjA);
+ if (ActualResult != ObjA.ToString())
+ {
+ TestLibrary.TestFramework.LogError("025", "Concat an object of number of less than 0 ExpectResult is equel" + ObjA.ToString() + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("026", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringconcat2.cs b/tests/src/CoreMangLib/cti/system/string/stringconcat2.cs
new file mode 100644
index 0000000000..12dd68b784
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringconcat2.cs
@@ -0,0 +1,476 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+using TestLibrary;
+
+public class StringConcat2
+{
+ public static int Main()
+ {
+ StringConcat2 sc2 = new StringConcat2();
+
+ TestLibrary.TestFramework.BeginTestCase("StringConcat2");
+
+ if (sc2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+ retVal = PosTest12() && retVal;
+ retVal = PosTest13() && retVal;
+ retVal = PosTest14() && retVal;
+ retVal = PosTest15() && retVal;
+ retVal = PosTest16() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+
+ TestLibrary.TestFramework.BeginScenario("PostTest1:Concat two objects of object ");
+ try
+ {
+ ObjA = new object();
+ ObjB = new object();
+ ActualResult = string.Concat(ObjA,ObjB);
+ if (ActualResult != ObjA.ToString() + ObjB.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "Concat a random object ExpectResult is" + ObjA.ToString() + ObjB.ToString()+ ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+
+ TestLibrary.TestFramework.BeginScenario("PostTest2:Concat null object and null object");
+ try
+ {
+ ObjA = null;
+ ObjB = null;
+ ActualResult = string.Concat(ObjA,ObjB);
+ if (ActualResult != string.Empty)
+ {
+ TestLibrary.TestFramework.LogError("003", "Concat null object and null object ExpectResult is" + string.Empty + " ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Concat null object and empty");
+ try
+ {
+ ObjA = null;
+ ObjB = "";
+ ActualResult = string.Concat(ObjA,ObjB);
+ if (ActualResult != string.Empty)
+ {
+ TestLibrary.TestFramework.LogError("005", "Concat null object and empty ExpectResult is equel" + string.Empty + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string ObjA;
+ object ObjB;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Concat null and two tabs");
+ try
+ {
+ ObjB = null;
+ ObjA = new string('\t', 2);
+ ActualResult = string.Concat(ObjB,ObjA);
+ if (ActualResult != ObjA.ToString())
+ {
+ TestLibrary.TestFramework.LogError("007", "Concat null and two tabs ExpectResult is" +ObjA.ToString() + " ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ TestLibrary.TestFramework.BeginScenario("PosTest5:Concat null and an object of int");
+ try
+ {
+ ObjA = null;
+ ObjB = new int();
+ ActualResult = string.Concat(ObjA, ObjB);
+ if (ActualResult != ObjB.ToString())
+ {
+ TestLibrary.TestFramework.LogError("009", "Concat null and an object of int ExpectResult is equel" +ObjB.ToString() + " ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Concat null and an object of datetime");
+ try
+ {
+ ObjA = null;
+ ObjB = new DateTime();
+ ActualResult = string.Concat(ObjA,ObjB);
+ if (ActualResult != ObjB.ToString())
+ {
+ TestLibrary.TestFramework.LogError("011", "Concat null and an object of datetime ExpectResult is equel" + ObjB.ToString() + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Concat null and an object of bool");
+ try
+ {
+ ObjA = null;
+ ObjB = new bool();
+ ActualResult = string.Concat(ObjA, ObjB);
+ if (ActualResult != ObjB.ToString())
+ {
+ TestLibrary.TestFramework.LogError("013", "Concat nulland an object of bool ExpectResult is equel" +ObjB.ToString() + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ TestLibrary.TestFramework.BeginScenario("PosTest8:Concat null and an object of random class instance");
+ try
+ {
+ ObjA = null;
+ ObjB = new StringConcat2();
+ ActualResult = string.Concat(ObjA, ObjB);
+ if (ActualResult != ObjB.ToString())
+ {
+ TestLibrary.TestFramework.LogError("015", "Concat null and an object of random class instance ExpectResult is equel"+ ObjB.ToString() + " ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ TestLibrary.TestFramework.BeginScenario("PosTest9: Concat null and an object of Guid");
+ try
+ {
+ ObjA = null;
+ ObjB = new Guid();
+ ActualResult = string.Concat(ObjA,ObjB);
+ if (ActualResult != ObjB.ToString())
+ {
+ TestLibrary.TestFramework.LogError("017", "Concat null and an object of Guid ExpectResult is equel" + ObjB.ToString() + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest10()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ TestLibrary.TestFramework.BeginScenario("PosTest10:Concat null and an object of Random ");
+ try
+ {
+ ObjA = null;
+ ObjB = new Random(-55);
+ ActualResult = string.Concat(ObjA,ObjB);
+ if (ActualResult != ObjB.ToString())
+ {
+ TestLibrary.TestFramework.LogError("019", "Concat null and an object of Random ExpectResult is equel" + ObjB.ToString() + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest11()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ TestLibrary.TestFramework.BeginScenario("PosTest11:Concat an object and null ");
+ try
+ {
+ ObjA = new object();
+ ObjB = null;
+ ActualResult = string.Concat(ObjA, ObjB);
+ if (ActualResult != ObjA.ToString())
+ {
+ TestLibrary.TestFramework.LogError("021", "Concat an object and null ExpectResult is equel" + ObjA.ToString() + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("022", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest12()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ TestLibrary.TestFramework.BeginScenario("PosTest12:Concat an object of Guid and null ");
+ try
+ {
+ ObjA = new Guid();
+ ObjB = null;
+ ActualResult = string.Concat(ObjA, ObjB);
+ if (ActualResult != ObjA.ToString())
+ {
+ TestLibrary.TestFramework.LogError("023", "Concat an object of Guid and null ExpectResult is equel" + ObjA.ToString() + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("024", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest13()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ TestLibrary.TestFramework.BeginScenario("PosTest13:Concat an object of Guid and an object ");
+ try
+ {
+ ObjA = new Guid();
+ ObjB = new object();
+ ActualResult = string.Concat(ObjA, ObjB);
+ if (ActualResult != ObjA.ToString() + ObjB.ToString())
+ {
+ TestLibrary.TestFramework.LogError("025", "Concat an object of Guid and null ExpectResult is equel" + ObjA.ToString() + ObjB.ToString() + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("026", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest14()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ TestLibrary.TestFramework.BeginScenario("PosTest14:Concat an objec and an object of datetime");
+ try
+ {
+ ObjA = new object();
+ ObjB = new DateTime();
+ ActualResult = string.Concat(ObjA, ObjB);
+ if (ActualResult != ObjA.ToString() + ObjB.ToString())
+ {
+ TestLibrary.TestFramework.LogError("027", "Concat an object and an object of datetime ExpectResult is equel" + ObjA.ToString() + ObjB.ToString() + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("028", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest15()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ TestLibrary.TestFramework.BeginScenario("PosTest15:Concat an object of datetime and an object of bool");
+ try
+ {
+ ObjA = new DateTime();
+ ObjB = new bool();
+ ActualResult = string.Concat(ObjA, ObjB);
+ if (ActualResult != ObjA.ToString() + ObjB.ToString())
+ {
+ TestLibrary.TestFramework.LogError("029", "Concat an object of datetime and an object of bool ExpectResult is equel" + ObjA.ToString() + ObjB.ToString() + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("030", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest16()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ TestLibrary.TestFramework.BeginScenario("PosTest16:Concat object of two number of less than 0");
+ try
+ {
+ ObjA = -123;
+ ObjB = -132;
+ ActualResult = string.Concat(ObjA, ObjB);
+ if (ActualResult != ObjA.ToString() + ObjB.ToString())
+ {
+ TestLibrary.TestFramework.LogError("031", "Concat object of two number of less than 0 ExpectResult is equel" + ObjA.ToString() + ObjB.ToString() + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("032", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringconcat3.cs b/tests/src/CoreMangLib/cti/system/string/stringconcat3.cs
new file mode 100644
index 0000000000..0c5b2d6714
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringconcat3.cs
@@ -0,0 +1,395 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+using TestLibrary;
+
+public class StringConcat3
+{
+ public static int Main()
+ {
+ StringConcat3 sc3 = new StringConcat3();
+
+ TestLibrary.TestFramework.BeginTestCase("StringConcat3");
+
+ if (sc3.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+ retVal = PosTest12() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ object ObjC;
+
+ TestLibrary.TestFramework.BeginScenario("PostTest1:Concat three objects of object ");
+ try
+ {
+ ObjA = new object();
+ ObjB = new object();
+ ObjC = new object();
+ ActualResult = string.Concat(ObjA, ObjB,ObjC);
+ if (ActualResult != ObjA.ToString() +ObjB.ToString() +ObjC.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "Concat three objects ExpectResult is" + ObjA.ToString() + ObjB.ToString() + ObjC.ToString() + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ object ObjC;
+
+ TestLibrary.TestFramework.BeginScenario("PostTest2:Concat three null objects");
+ try
+ {
+ ObjA = null;
+ ObjB = null;
+ ObjC = null;
+ ActualResult = string.Concat(ObjA, ObjB,ObjC);
+ if (ActualResult != string.Empty)
+ {
+ TestLibrary.TestFramework.LogError("003", "Concat three null objects ExpectResult is" + string.Empty+ " ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ object ObjC;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Concat two null objects and a number of less than 0");
+ try
+ {
+ ObjA = null;
+ ObjB = null;
+ ObjC = -12314124;
+ ActualResult = string.Concat(ObjA, ObjB,ObjC);
+ if (ActualResult != ObjC.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "Concat two null objects and a number of less than 0 ExpectResult is equel" + ObjC.ToString() + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ object ObjC;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Concat three special strings");
+ try
+ {
+ ObjA = new string('\t', 2);
+ ObjB = "\n";
+ ObjC = "\t";
+ ActualResult = string.Concat(ObjA, ObjB, ObjC);
+ if (ActualResult != ObjA.ToString() + ObjB.ToString() + ObjC.ToString())
+ {
+ TestLibrary.TestFramework.LogError("007", "Concat three special strings ExpectResult is" + ObjB.ToString() + ObjA.ToString() + ObjC.ToString() + " ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ object ObjC;
+ TestLibrary.TestFramework.BeginScenario("PosTest5:Concat three numbers of less than 0");
+ try
+ {
+ ObjA = -123;
+ ObjB = -123;
+ ObjC = -123;
+ ActualResult = string.Concat(ObjA, ObjB,ObjC);
+ if (ActualResult != ObjA.ToString() + ObjB.ToString() + ObjC.ToString())
+ {
+ TestLibrary.TestFramework.LogError("009", "Concat three numbers of less than 0 ExpectResult is equel" + ObjA.ToString() + ObjB.ToString() + " ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ object ObjC;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Concat two nulls and an object of datetime");
+ try
+ {
+ ObjA = null;
+ ObjB = new DateTime();
+ ObjC = null;
+ ActualResult = string.Concat(ObjA, ObjB,ObjC);
+ if (ActualResult != ObjB.ToString())
+ {
+ TestLibrary.TestFramework.LogError("011", "Concat two nulls and an object of datetime ExpectResult is equel" + ObjB.ToString() + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ object ObjC;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Concat null and an object of datetime and one space");
+ try
+ {
+ ObjA = null;
+ ObjB = new DateTime();
+ ObjC = " ";
+ ActualResult = string.Concat(ObjA, ObjB,ObjC);
+ if (ActualResult != ObjB.ToString() +ObjC.ToString())
+ {
+ TestLibrary.TestFramework.LogError("013", "Concat null and an object of datetime and one space ExpectResult is equel"+ ObjB.ToString() + ObjC.ToString() +",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ object ObjC;
+ TestLibrary.TestFramework.BeginScenario("PosTest8:Concat null and an object of random class instance and bool object");
+ try
+ {
+ ObjA = null;
+ ObjB = new StringConcat3();
+ ObjC = new bool();
+ ActualResult = string.Concat(ObjA, ObjB,ObjC);
+ if (ActualResult != ObjB.ToString() + ObjC.ToString())
+ {
+ TestLibrary.TestFramework.LogError("015", "Concat null and an object of random class instance and bool object ExpectResult is equel" + ObjB.ToString() + " ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ object ObjC;
+ TestLibrary.TestFramework.BeginScenario("PosTest9: Concat int and special symbol and an object of Guid");
+ try
+ {
+ ObjA = 123;
+ ObjB = "\n";
+ ObjC = new Guid();
+ ActualResult = string.Concat(ObjA, ObjB,ObjC);
+ if (ActualResult != ObjA.ToString() + ObjB.ToString() + ObjC.ToString())
+ {
+ TestLibrary.TestFramework.LogError("017", "Concat int and special symbol and an object of Guid ExpectResult is equel" + ObjA.ToString() + ObjB.ToString() + ObjC.ToString() + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest10()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ object ObjC;
+ TestLibrary.TestFramework.BeginScenario("PosTest10:Concat two guids with a \n string in middle");
+ try
+ {
+ ObjA = new Guid();
+ ObjB = "\n";
+ ObjC = new Guid();
+ ActualResult = string.Concat(ObjA, ObjB,ObjC);
+ if (ActualResult != ObjA.ToString() + ObjB.ToString() + ObjC.ToString())
+ {
+ TestLibrary.TestFramework.LogError("019", "Concat two guids with a \n string in middle ExpectResult is equel" + ObjA.ToString() + ObjB.ToString() + ObjC.ToString() + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest11()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ object ObjC;
+ TestLibrary.TestFramework.BeginScenario("PosTest11:Concat three guids");
+ try
+ {
+ ObjA = new Guid();
+ ObjB = new Guid();
+ ObjC = new Guid();
+ ActualResult = string.Concat(ObjA, ObjB, ObjC);
+ if (ActualResult != ObjA.ToString() + ObjB.ToString() + ObjC.ToString())
+ {
+ TestLibrary.TestFramework.LogError("021", "Concat three guids ExpectResult is equel" + ObjA.ToString() + ObjB.ToString() + ObjC.ToString() + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("022", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest12()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object ObjA;
+ object ObjB;
+ object ObjC;
+ TestLibrary.TestFramework.BeginScenario("PosTest11:Concat guid,datetime and bool");
+ try
+ {
+ ObjA = new Guid();
+ ObjB = new bool();
+ ObjC = new DateTime();
+ ActualResult = string.Concat(ObjA, ObjB, ObjC);
+ if (ActualResult != ObjA.ToString() + ObjB.ToString() + ObjC.ToString())
+ {
+ TestLibrary.TestFramework.LogError("023", "Concat guid,datetiem and bool ExpectResult is equel" + ObjA.ToString() + ObjB.ToString() + ObjC.ToString() + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("024", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringconcat4.cs b/tests/src/CoreMangLib/cti/system/string/stringconcat4.cs
new file mode 100644
index 0000000000..bd93e5d82e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringconcat4.cs
@@ -0,0 +1,356 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+using TestLibrary;
+
+public class StringConcat4
+{
+ private int c_MAX_STRING_LENGTH = 256;
+ private int c_MINI_STRING_LENGTH = 8;
+
+ public static int Main()
+ {
+ StringConcat4 sc4 = new StringConcat4();
+
+ TestLibrary.TestFramework.BeginTestCase("StringConcat4");
+
+ if (sc4.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Random rand = new Random(-55);
+ string ActualResult;
+ object[] ObjA = new object[rand.Next(c_MINI_STRING_LENGTH,c_MAX_STRING_LENGTH)];
+
+ TestLibrary.TestFramework.BeginScenario("PostTest1:Concat object Array with all null member");
+ try
+ {
+ for (int i = 0; i < ObjA.Length; i++)
+ {
+ ObjA[i] = null;
+ }
+ ActualResult = string.Concat(ObjA);
+ if (ActualResult != MergeStrings(ObjA))
+ {
+ TestLibrary.TestFramework.LogError("001", "Concat object Array with all null member ExpectResult is" + MergeStrings(ObjA) + "ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Random rand = new Random(-55);
+ string ActualResult;
+ object[] ObjA = new object[rand.Next(c_MINI_STRING_LENGTH,c_MAX_STRING_LENGTH)];
+
+ TestLibrary.TestFramework.BeginScenario("PostTest2:Concat object Array with empty member");
+ try
+ {
+ for (int i = 0; i < ObjA.Length; i++)
+ {
+ ObjA[i] = "";
+ }
+ ActualResult = string.Concat(ObjA);
+ if (ActualResult != MergeStrings(ObjA))
+ {
+ TestLibrary.TestFramework.LogError("003", "Concat object Array with empty member ExpectResult is" + MergeStrings(ObjA) + " ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object[] ObjA;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Concat object Array with null and empty member");
+ try
+ {
+ ObjA = new object[]{ null, "", null, "", null, "" };
+ ActualResult = string.Concat(ObjA);
+ if (ActualResult != MergeStrings(ObjA))
+ {
+ TestLibrary.TestFramework.LogError("005", "Concat object Array with null and empty member ExpectResult is equel" + MergeStrings(ObjA) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object[] ObjA;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Concat object Array with null,empty and space member");
+ try
+ {
+ ObjA = new object[] {" ",null,""," "};
+ ActualResult = string.Concat(ObjA);
+ if (ActualResult != MergeStrings(ObjA))
+ {
+ TestLibrary.TestFramework.LogError("007", "Concat object Array with null,empty and space member ExpectResult is" + MergeStrings(ObjA) + " ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object[] ObjA;
+ TestLibrary.TestFramework.BeginScenario("PosTest5:Concat object Array with int,datetime,bool and class instance member");
+ try
+ {
+ object obj1 = -123;
+ object obj2 = new DateTime();
+ object obj3 = new bool();
+ object obj4 = new StringConcat4();
+ ObjA = new object[] { obj1, obj2, obj3, obj4 };
+ ActualResult = string.Concat(ObjA);
+ if (ActualResult != MergeStrings(ObjA))
+ {
+ TestLibrary.TestFramework.LogError("009", "Concat an object of int ExpectResult is equel" + MergeStrings(ObjA) + " ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object[] ObjA;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Concat object Array with guid and some special symbols member");
+ try
+ {
+ object obj1 = new Guid();
+ object obj2 = "\n";
+ object obj3 = "\t";
+ object obj4 = "\u0041";
+ ObjA = new object[] { obj1, obj2, obj3, obj4};
+ ActualResult = string.Concat(ObjA);
+ if (ActualResult != MergeStrings(ObjA))
+ {
+ TestLibrary.TestFramework.LogError("011", "Concat object Array with guid and some special symbols member ExpectResult is equel" + MergeStrings(ObjA) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object[] ObjA;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Concat object Array with some strings and symbols member");
+ try
+ {
+ object obj1 = "hello";
+ object obj2 = "\0";
+ object obj3 = "World";
+ object obj4 = "\u0020";
+ object obj5 = "!";
+ ObjA = new object[] { obj1, obj2, obj3, obj4, obj5 };
+ ActualResult = string.Concat(ObjA);
+ if (ActualResult != MergeStrings(ObjA))
+ {
+ TestLibrary.TestFramework.LogError("013", "Concat object Array with some strings and symbols member ExpectResult is equel" + MergeStrings(ObjA) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ string ActualResult;
+ object[] ObjA;
+ TestLibrary.TestFramework.BeginScenario("PosTest8:Concat object Array with bool and some strings member");
+ try
+ {
+ object obj1 = true;
+ object obj2 = "hello\0world";
+ object obj3 = 12;
+ object obj4 = "uff21";
+ ObjA = new object[] { obj1, obj2, obj3, obj4 };
+ ActualResult = string.Concat(ObjA);
+ if (ActualResult != MergeStrings(ObjA))
+ {
+ TestLibrary.TestFramework.LogError("015", "Concat object Array with bool and some strings member ExpectResult is equel" + MergeStrings(ObjA) + " ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region NegativeTesting
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ Random rand = new Random(-55);
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Concat object Array is null");
+
+ object[] ObjA = new object[rand.Next(c_MINI_STRING_LENGTH,c_MAX_STRING_LENGTH)];
+ string ActualResult;
+ try
+ {
+ ObjA = null;
+ ActualResult = string.Concat(ObjA);
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ Random rand = new Random(-55);
+ object[] ObjA = new object[50 * 1024 * 1024];
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Concat object Array with many strings");
+
+ int TotalLength = 0;
+ try
+ {
+ for (int i = 0; i < ObjA.Length; i++)
+ {
+ ObjA[i] = "HelloworldHelloworldHelloworldHelloworld!";
+ TotalLength += ObjA[i].ToString().Length;
+ }
+ ActualResult = string.Concat(ObjA);
+ retVal = false;
+ }
+ catch (OutOfMemoryException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #region Help method
+ private string MergeStrings(object[] ObjS)
+ {
+ string ResultString ="";
+ foreach (object obj in ObjS)
+ {
+ if (obj == null)
+ ResultString += string.Empty;
+ else
+ ResultString += obj.ToString();
+ }
+ return ResultString;
+ }
+
+ #endregion
+
+ #endregion
+
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringconcat5.cs b/tests/src/CoreMangLib/cti/system/string/stringconcat5.cs
new file mode 100644
index 0000000000..fbfa2d5ba4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringconcat5.cs
@@ -0,0 +1,501 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+using TestLibrary;
+
+
+public class StringConcat5
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+ public static int Main()
+ {
+ StringConcat5 sc5 = new StringConcat5();
+
+ TestLibrary.TestFramework.BeginTestCase("StringConcat5");
+
+ if (sc5.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+ retVal = PosTest12() && retVal;
+ retVal = PosTest13() && retVal;
+ retVal = PosTest14() && retVal;
+ retVal = PosTest15() && retVal;
+ retVal = PosTest16() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+
+ TestLibrary.TestFramework.BeginScenario("PostTest1:Concat two null ");
+ try
+ {
+ strA = null;
+ strB = null;
+ ActualResult = string.Concat(strA, strB);
+ if (ActualResult != MergeString(strA,strB))
+ {
+ TestLibrary.TestFramework.LogError("001", "Concat two null ExpectResult is" + MergeString(strA,strB) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+
+ TestLibrary.TestFramework.BeginScenario("PostTest2:Concat null and empty");
+ try
+ {
+ strA = null;
+ strB = "";
+ ActualResult = string.Concat(strA, strB);
+ if (ActualResult != MergeString(strA,strB))
+ {
+ TestLibrary.TestFramework.LogError("003", "Concat null string and empty ExpectResult is" + MergeString(strA,strB) + " ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Concat null and space");
+ try
+ {
+ strA = null;
+ strB = "\u0020";
+ ActualResult = string.Concat(strA, strB);
+ if (ActualResult != MergeString(strA,strB))
+ {
+ TestLibrary.TestFramework.LogError("005", "Concat null and space ExpectResult is equel" + MergeString(strA,strB) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Concat empty and space");
+ try
+ {
+ strA = "";
+ strB = "\u0020";
+ ActualResult = string.Concat(strA,strB);
+ if (ActualResult != MergeString(strA,strB))
+ {
+ TestLibrary.TestFramework.LogError("007", "Concat empty and space ExpectResult is" + MergeString(strA,strB)+ " ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ TestLibrary.TestFramework.BeginScenario("PosTest5:Concat \0 and space");
+ try
+ {
+ strA = "\0";
+ strB = "u0020";
+ ActualResult = string.Concat(strA, strB);
+ if (ActualResult != MergeString(strA,strB))
+ {
+ TestLibrary.TestFramework.LogError("009", "Concat \0 and space ExpectResult is equel" + MergeString(strA,strB) + " ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Concat null and not nullstring");
+ try
+ {
+ strA = null;
+ strB = TestLibrary.Generator.GetString(-55, false,c_MINI_STRING_LENGTH,c_MAX_STRING_LENGTH);
+ ActualResult = string.Concat(strA, strB);
+ if (ActualResult != MergeString(strA,strB))
+ {
+ TestLibrary.TestFramework.LogError("011", "Concat null and not nullstring ExpectResult is equel" + MergeString(strA,strB) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Concat empty and not nullstring");
+ try
+ {
+ strA = "";
+ strB = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ ActualResult = string.Concat(strA, strB);
+ if (ActualResult != MergeString(strA,strB))
+ {
+ TestLibrary.TestFramework.LogError("013", "Concat empty and not nullstring ExpectResult is equel" + MergeString(strA, strB) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ TestLibrary.TestFramework.BeginScenario("PosTest8:Concat two empty");
+ try
+ {
+ strA = "";
+ strB = "";
+ ActualResult = string.Concat(strA, strB);
+ if (ActualResult != MergeString(strA,strB))
+ {
+ TestLibrary.TestFramework.LogError("015", "Concat two empty ExpectResult is equel" + MergeString(strA,strB) + " ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ TestLibrary.TestFramework.BeginScenario("PosTest9: Concat two not nullstrings one");
+ try
+ {
+ string strBasic = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ strA = strBasic + "\n";
+ strB = strBasic;
+ ActualResult = string.Concat(strA, strB);
+ if (ActualResult != MergeString(strA,strB))
+ {
+ TestLibrary.TestFramework.LogError("017", "Concat two not nullstrings one ExpectResult is equel" + MergeString(strA,strB) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest10()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ TestLibrary.TestFramework.BeginScenario("PosTest10:Concat some special symbols ");
+ try
+ {
+ strA = new string('\t', 2);
+ strB = "\uffff";
+ ActualResult = string.Concat(strA, strB);
+ if (ActualResult != MergeString(strA,strB))
+ {
+ TestLibrary.TestFramework.LogError("019", "Concat some special symbols ExpectResult is equel" + MergeString(strA,strB) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest11()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ TestLibrary.TestFramework.BeginScenario("PosTest11:Concat tab and space ");
+ try
+ {
+ strA = "\u0009";
+ strB = "\u0020";
+ ActualResult = string.Concat(strA, strB);
+ if (ActualResult != MergeString(strA,strB))
+ {
+ TestLibrary.TestFramework.LogError("021", "Concat tab and space ExpectResult is equel" + MergeString(strA,strB) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("022", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest12()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ TestLibrary.TestFramework.BeginScenario("PosTest12:Concat two not nullstrings two ");
+ try
+ {
+ strA = "Hello\t";
+ strB = "World";
+ ActualResult = string.Concat(strA, strB);
+ if (ActualResult != MergeString(strA,strB))
+ {
+ TestLibrary.TestFramework.LogError("023", "Concat two not nullstrings two ExpectResult is equel" + MergeString(strA, strB) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("024", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest13()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ TestLibrary.TestFramework.BeginScenario("PosTest13:Concat two not nullstrings three");
+ try
+ {
+ strA = "Hello\0";
+ strB = "World";
+ ActualResult = string.Concat(strA, strB);
+ if (ActualResult != MergeString(strA,strB))
+ {
+ TestLibrary.TestFramework.LogError("025", "Concat two not nullstrings three ExpectResult is equel" + MergeString(strA,strB) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("026", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest14()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ TestLibrary.TestFramework.BeginScenario("PosTest14:Concat two not nullstrings four");
+ try
+ {
+ strA = "Hello\nWorld";
+ strB = "I am here!";
+ ActualResult = string.Concat(strA, strB);
+ if (ActualResult !=MergeString(strA,strB))
+ {
+ TestLibrary.TestFramework.LogError("027", "Concat two not nullstrings four ExpectResult is equel" + MergeString(strA,strB) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("028", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest15()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ TestLibrary.TestFramework.BeginScenario("PosTest15:Concat two not nullstrings five");
+ try
+ {
+ strA = "Hello\nWorld\tI am here\0....";
+ strB = "Welcome to you!";
+ ActualResult = string.Concat(strA, strB);
+ if (ActualResult !=MergeString(strA,strB))
+ {
+ TestLibrary.TestFramework.LogError("029", "Concat two not nullstrings five ExpectResult is equel" + MergeString(strA, strB) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("030", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest16()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest16:Concat string of two number of less than 0");
+ try
+ {
+ string stra = "hello World! ";
+ string strb = "Come here! ";
+ strA = stra.Trim();
+ strB = strb.Trim();
+ ActualResult = string.Concat(strA, strB);
+ if (ActualResult != MergeString(strA,strB))
+ {
+ TestLibrary.TestFramework.LogError("031", "Concat string of two number of less than 0 ExpectResult is equel" + MergeString(strA,strB) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("032", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #region Help Method
+
+ private string MergeString(string strA, string strB)
+ {
+ if (strA == null || strA == string.Empty)
+ {
+ if (strB == null || strB == string.Empty)
+ {
+ return string.Empty;
+ }
+ else
+ return strB.ToString();
+ }
+ else
+ return strA.ToString() + strB.ToString();
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringconcat6.cs b/tests/src/CoreMangLib/cti/system/string/stringconcat6.cs
new file mode 100644
index 0000000000..6c85780cf3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringconcat6.cs
@@ -0,0 +1,372 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+using TestLibrary;
+
+
+public class StringConcat6
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+ public static int Main()
+ {
+ StringConcat6 sc6 = new StringConcat6();
+
+ TestLibrary.TestFramework.BeginTestCase("StringConcat6");
+
+ if (sc6.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ string strC;
+
+ TestLibrary.TestFramework.BeginScenario("PostTest1:Concat three nulls ");
+ try
+ {
+ strA = null;
+ strB = null;
+ strC = null;
+ ActualResult = string.Concat(strA, strB,strC);
+ if (ActualResult != MergeString(strA, strB,strC))
+ {
+ TestLibrary.TestFramework.LogError("001", "Concat three nulls ExpectResult is" + MergeString(strA, strB,strC) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ string strC;
+
+ TestLibrary.TestFramework.BeginScenario("PostTest2:Concat two nulls and one empty");
+ try
+ {
+ strA = null;
+ strB = "";
+ strC = null;
+ ActualResult = string.Concat(strA, strB,strC);
+ if (ActualResult != MergeString(strA,strB,strC))
+ {
+ TestLibrary.TestFramework.LogError("003", "Concat null string and empty ExpectResult is" + MergeString(strA,strB,strC) + " ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ string strC;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Concat one null and two empty");
+ try
+ {
+ strA = null;
+ strB = "";
+ strC = "";
+ ActualResult = string.Concat(strA, strB,strC);
+ if (ActualResult != MergeString(strA,strB,strC))
+ {
+ TestLibrary.TestFramework.LogError("005", "Concat one null and two empty ExpectResult is equel" + MergeString(strA,strB,strC) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ string strC;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Concat three empty");
+ try
+ {
+ strA = "";
+ strB = "";
+ strC = "";
+ ActualResult = string.Concat(strA, strB,strC);
+ if (ActualResult != MergeString(strA,strB,strC))
+ {
+ TestLibrary.TestFramework.LogError("007", "Concat three empty ExpectResult is" + MergeString(strA,strB,strC) + " ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ string strC;
+ TestLibrary.TestFramework.BeginScenario("PosTest5:Concat null,space and empty");
+ try
+ {
+ strA = null;
+ strB = "\u0020";
+ strC = "";
+ ActualResult = string.Concat(strA, strB,strC);
+ if (ActualResult != MergeString(strA,strB,strC))
+ {
+ TestLibrary.TestFramework.LogError("009", "Concat null,space and empty ExpectResult is equel" + MergeString(strA, strB, strC) + " ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ string strC;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Concat null,not nullstring and empty");
+ try
+ {
+ strA = null;
+ strB = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ strC = "";
+ ActualResult = string.Concat(strA, strB,strC);
+ if (ActualResult != MergeString(strA,strB,strC))
+ {
+ TestLibrary.TestFramework.LogError("011", "Concat null,not nullstring and empty ExpectResult is equel" + MergeString(strA,strB,strC) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ string strC;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Concat empty and not nullstring");
+ try
+ {
+ strA = null;
+ strB = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ strC = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ ActualResult = string.Concat(strA, strB,strC);
+ if (ActualResult != MergeString(strA,strB,strC))
+ {
+ TestLibrary.TestFramework.LogError("013", "Concat empty and not nullstring ExpectResult is equel" + MergeString(strA,strB,strC) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ string strC;
+ TestLibrary.TestFramework.BeginScenario("PosTest8:Concat one empty and two not nullstrings");
+ try
+ {
+ strA = "";
+ strB = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ strC = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ ActualResult = string.Concat(strA, strB,strC);
+ if (ActualResult != MergeString(strA,strB,strC))
+ {
+ TestLibrary.TestFramework.LogError("015", "Concat one empty and two not nullstrings ExpectResult is equel" + MergeString(strA, strB, strC) + " ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ string strC;
+ TestLibrary.TestFramework.BeginScenario("PosTest9: Concat three not nullstrings one");
+ try
+ {
+ string strBasic = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ strA = strBasic + "\n";
+ strB = strBasic + "\t";
+ strC = "\0" + strBasic;
+ ActualResult = string.Concat(strA, strB,strC);
+ if (ActualResult != MergeString(strA,strB,strC))
+ {
+ TestLibrary.TestFramework.LogError("017", "Concat three not nullstrings one ExpectResult is equel" + MergeString(strA,strB,strC) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest10()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ string strC;
+ TestLibrary.TestFramework.BeginScenario("PosTest10:Concat three nullstrings");
+ try
+ {
+ strA = "Hello\0Word!\u0020";
+ string strb = "\nhellobeijing!\t";
+ string strc = "\u0020HELLOEVERYONE!";
+ strB = strb.ToUpper();
+ strC = strc.ToLower();
+ ActualResult = string.Concat(strA, strB,strC);
+ if (ActualResult != MergeString(strA,strB,strC))
+ {
+ TestLibrary.TestFramework.LogError("019", "Concat three nullstrings ExpectResult is equel" + MergeString(strA,strB,strC) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #region Help Method
+ private string MergeString(string strA, string strB,string strC)
+ {
+ string ResultMerge = "";
+ if (strA == null || strA == string.Empty)
+ {
+ ResultMerge += string.Empty;
+ }
+ else
+ {
+ ResultMerge += strA.ToString();
+ }
+ if (strB == null || strB == string.Empty)
+ {
+ ResultMerge += string.Empty;
+ }
+ else
+ {
+ ResultMerge += strB.ToString();
+ }
+ if (strC == null || strC == string.Empty)
+ {
+ ResultMerge += string.Empty;
+ }
+ else
+ {
+ ResultMerge += strC.ToString();
+ }
+
+ return ResultMerge;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringconcat7.cs b/tests/src/CoreMangLib/cti/system/string/stringconcat7.cs
new file mode 100644
index 0000000000..98946d3747
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringconcat7.cs
@@ -0,0 +1,435 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+using TestLibrary;
+
+
+public class StringConcat7
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+ public static int Main()
+ {
+ StringConcat7 sc7 = new StringConcat7();
+
+ TestLibrary.TestFramework.BeginTestCase("StringConcat7");
+
+ if (sc7.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ string strC;
+ string strD;
+
+ TestLibrary.TestFramework.BeginScenario("PostTest1:Concat four nulls ");
+ try
+ {
+ strA = null;
+ strB = null;
+ strC = null;
+ strD = null;
+ ActualResult = string.Concat(strA, strB, strC,strD);
+ if (ActualResult != MergeString(strA, strB, strC,strD))
+ {
+ TestLibrary.TestFramework.LogError("001", "Concat four nulls ExpectResult is" + MergeString(strA, strB, strC,strD) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ string strC;
+ string strD;
+
+ TestLibrary.TestFramework.BeginScenario("PostTest2:Concat three nulls and empty");
+ try
+ {
+ strA = null;
+ strB = "";
+ strC = null;
+ strD = null;
+ ActualResult = string.Concat(strA, strB, strC,strD);
+ if (ActualResult != MergeString(strA, strB, strC,strD))
+ {
+ TestLibrary.TestFramework.LogError("003", "Concat three nulls and empty ExpectResult is" + MergeString(strA, strB, strC,strD) + " ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ string strC;
+ string strD;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Concat two nulls and two empty");
+ try
+ {
+ strA = null;
+ strB = "";
+ strC = "";
+ strD = null;
+ ActualResult = string.Concat(strA, strB, strC,strD);
+ if (ActualResult != MergeString(strA, strB, strC,strD))
+ {
+ TestLibrary.TestFramework.LogError("005", "Concat two nulls and two empty ExpectResult is equel" + MergeString(strA, strB, strC,strD) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ string strC;
+ string strD;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Concat three empty and null");
+ try
+ {
+ strA = "";
+ strB = "";
+ strC = "";
+ strD = null;
+ ActualResult = string.Concat(strA, strB, strC,strD);
+ if (ActualResult != MergeString(strA, strB, strC,strD))
+ {
+ TestLibrary.TestFramework.LogError("007", "Concat three empty and null ExpectResult is" + MergeString(strA, strB, strC,strD) + " ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ string strC;
+ string strD;
+ TestLibrary.TestFramework.BeginScenario("PosTest5:Concat four empty");
+ try
+ {
+ strA = "";
+ strB = "";
+ strC = "";
+ strD = "";
+ ActualResult = string.Concat(strA, strB, strC,strD);
+ if (ActualResult != MergeString(strA, strB, strC,strD))
+ {
+ TestLibrary.TestFramework.LogError("009", "Concat four empty ExpectResult is equel" + MergeString(strA, strB, strC,strD) + " ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ string strC;
+ string strD;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Concat null,not nullstring and empty");
+ try
+ {
+ strA = null;
+ strB = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ strC = "";
+ strD = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ ActualResult = string.Concat(strA, strB, strC,strD);
+ if (ActualResult != MergeString(strA, strB, strC,strD))
+ {
+ TestLibrary.TestFramework.LogError("011", "Concat null,not nullstring and empty ExpectResult is equel" + MergeString(strA, strB, strC,strD) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ string strC;
+ string strD;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Concat two nulls and not nullstring");
+ try
+ {
+ strA = null;
+ strB = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ strC = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ strD = null;
+ ActualResult = string.Concat(strA, strB, strC,strD);
+ if (ActualResult != MergeString(strA, strB, strC,strD))
+ {
+ TestLibrary.TestFramework.LogError("013", "Concat empty and not nullstring ExpectResult is equel" + MergeString(strA, strB, strC,strD) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ string strC;
+ string strD;
+ TestLibrary.TestFramework.BeginScenario("PosTest8:Concat two empty and two not nullstrings");
+ try
+ {
+ strA = "";
+ strB = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ strC = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ strD = "";
+ ActualResult = string.Concat(strA, strB, strC,strD);
+ if (ActualResult != MergeString(strA, strB, strC,strD))
+ {
+ TestLibrary.TestFramework.LogError("015", "Concat two empty and two not nullstrings ExpectResult is equel" + MergeString(strA, strB, strC,strD) + " ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ string strC;
+ string strD;
+ TestLibrary.TestFramework.BeginScenario("PosTest9: Concat three not nullstrings and null");
+ try
+ {
+ string strBasic = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ strA = strBasic + "\n";
+ strB = strBasic + "\t";
+ strC = "\0" + strBasic;
+ strD = null;
+ ActualResult = string.Concat(strA, strB, strC,strD);
+ if (ActualResult != MergeString(strA, strB, strC,strD))
+ {
+ TestLibrary.TestFramework.LogError("017", "Concat three not nullstrings and null ExpectResult is equel" + MergeString(strA, strB, strC,strD) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest10()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ string strC;
+ string strD;
+ TestLibrary.TestFramework.BeginScenario("PosTest10:Concat three not nullstrings and empty");
+ try
+ {
+ strA = "Hello\0Word!\u0020";
+ string strb = "\nhellobeijing!\t";
+ string strc = "\u0020HELLOEVERYONE!";
+ strB = strb.ToUpper();
+ strC = strc.ToLower();
+ strD = "";
+ ActualResult = string.Concat(strA, strB, strC,strD);
+ if (ActualResult != MergeString(strA, strB, strC,strD))
+ {
+ TestLibrary.TestFramework.LogError("019", "Concat three not nullstrings and empty ExpectResult is equel" + MergeString(strA, strB, strC,strD) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest11()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string strA;
+ string strB;
+ string strC;
+ string strD;
+ TestLibrary.TestFramework.BeginScenario("PosTest11:Concat four nullstrings");
+ try
+ {
+ strA = "Hello\0Word!\u0020";
+ string strb = "\nhellobeijing!\t";
+ string strc = "\u0020HELLOEVERYONE!";
+ strB = strb.ToUpper();
+ strC = strc.ToLower();
+ strD = TestLibrary.Generator.GetString(-55, false,c_MINI_STRING_LENGTH,c_MAX_STRING_LENGTH);
+ ActualResult = string.Concat(strA, strB, strC,strD);
+ if (ActualResult != MergeString(strA, strB, strC,strD))
+ {
+ TestLibrary.TestFramework.LogError("021", "Concat four nullstrings ExpectResult is equel" + MergeString(strA, strB, strC,strD) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("022", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #region Help Method
+ private string MergeString(string strA, string strB, string strC,string strD)
+ {
+ string ResultMerge = "";
+ if (strA == null || strA == string.Empty)
+ {
+ ResultMerge += string.Empty;
+ }
+ else
+ {
+ ResultMerge += strA.ToString();
+ }
+ if (strB == null || strB == string.Empty)
+ {
+ ResultMerge += string.Empty;
+ }
+ else
+ {
+ ResultMerge += strB.ToString();
+ }
+ if (strC == null || strC == string.Empty)
+ {
+ ResultMerge += string.Empty;
+ }
+ else
+ {
+ ResultMerge += strC.ToString();
+ }
+ if (strD == null || strD == string.Empty)
+ {
+ ResultMerge += string.Empty;
+ }
+ else
+ {
+ ResultMerge += strD.ToString();
+ }
+
+ return ResultMerge;
+ }
+ #endregion
+
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringconcat8.cs b/tests/src/CoreMangLib/cti/system/string/stringconcat8.cs
new file mode 100644
index 0000000000..5114b369c1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringconcat8.cs
@@ -0,0 +1,384 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+using TestLibrary;
+
+
+public class StringConcat8
+{
+ private int c_MAX_STRING_LENGTH = 256;
+ private int c_MINI_STRING_LENGTH = 8;
+
+ public static int Main()
+ {
+ StringConcat8 sc8 = new StringConcat8();
+
+ TestLibrary.TestFramework.BeginTestCase("StringConcat8");
+
+ if (sc8.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Random rand = new Random(-55);
+ string ActualResult;
+ string[] strA = new string[rand.Next(c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH)];
+
+ TestLibrary.TestFramework.BeginScenario("PostTest1:Concat string Array with all null member");
+ try
+ {
+ for (int i = 0; i < strA.Length; i++)
+ {
+ strA[i] = null;
+ }
+ ActualResult = string.Concat(strA);
+ if (ActualResult != MergeStrings(strA))
+ {
+ TestLibrary.TestFramework.LogError("001", "Concat string Array with all null member ExpectResult is" + MergeStrings(strA) + "ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Random rand = new Random(-55);
+ string ActualResult;
+ string[] strA = new string[rand.Next(c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH)];
+
+ TestLibrary.TestFramework.BeginScenario("PostTest2:Concat string Array with all empty member");
+ try
+ {
+ for (int i = 0; i < strA.Length; i++)
+ {
+ strA[i] = "";
+ }
+ ActualResult = string.Concat(strA);
+ if (ActualResult != MergeStrings(strA))
+ {
+ TestLibrary.TestFramework.LogError("003", "Concat string Array with all empty member ExpectResult is" + MergeStrings(strA) + " ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string[] strA;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Concat string Array with null and empty member");
+ try
+ {
+ strA = new string[] { null, "", null, "", null, "" };
+ ActualResult = string.Concat(strA);
+ if (ActualResult != MergeStrings(strA))
+ {
+ TestLibrary.TestFramework.LogError("005", "Concat string Array with null and empty member ExpectResult is equel" + MergeStrings(strA) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string[] strA;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Concat string Array with single letter member");
+ try
+ {
+ strA = new string[] {"a","b","c","d","e","f"};
+ ActualResult = string.Concat(strA);
+ if (ActualResult != MergeStrings(strA))
+ {
+ TestLibrary.TestFramework.LogError("007", "Concat string Array with single letter member ExpectResult is" + MergeStrings(strA) + " ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string[] strA;
+ TestLibrary.TestFramework.BeginScenario("PosTest5:Concat string Array with null,empty and not nullstrings member");
+ try
+ {
+ strA = new string[] {null,"a","null","",null,"123"};
+ ActualResult = string.Concat(strA);
+ if (ActualResult != MergeStrings(strA))
+ {
+ TestLibrary.TestFramework.LogError("009", "Concat string Array with null,empty and not nullstrings member ExpectResult is equel" + MergeStrings(strA) + " ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string[] strA;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Concat string Array with not nullstring and some symbols member one");
+ try
+ {
+ string str1 = "HelloWorld";
+ string str2 = "\n";
+ string str3 = "\t";
+ string str4 = "\0";
+ string str5 = "\u0041";
+ strA = new string[] { str1,str2,str3,str4,str5 };
+ ActualResult = string.Concat(strA);
+ if (ActualResult != MergeStrings(strA))
+ {
+ TestLibrary.TestFramework.LogError("011", "Concat string Array with not nullstring and some symbols member ExpectResult is equel" + MergeStrings(strA) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string[] strA;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Concat string Array with not nullstrings and some symbols member two");
+ try
+ {
+ string str1 = "hello";
+ string str2 = "\u0020";
+ string str3 = "World";
+ string str4 = "\u0020";
+ string str5 = "!";
+ strA = new string[] { str1, str2, str3, str4, str5 };
+ ActualResult = string.Concat(strA);
+ if (ActualResult != MergeStrings(strA))
+ {
+ TestLibrary.TestFramework.LogError("013", "Concat string Array with some strings and some symbols member two ExpectResult is equel" + MergeStrings(strA) + ",ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string[] strA;
+ TestLibrary.TestFramework.BeginScenario("PosTest8:Concat string Array with some not nullstrings member one");
+ try
+ {
+ string str1 = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ string str2 = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ string str3 = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ string str4 = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ string str5 = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ strA = new string[] { str1, str2, str3, str4, str5 };
+ ActualResult = string.Concat(strA);
+ if (ActualResult != MergeStrings(strA))
+ {
+ TestLibrary.TestFramework.LogError("015", "Concat string Array with some not nullstrings member one ExpectResult is equel" + MergeStrings(strA) + " ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+ string ActualResult;
+ string[] strA;
+ TestLibrary.TestFramework.BeginScenario("PosTest9:Concat object Array with some not nullstrings member two");
+ try
+ {
+ string str1 = "helloworld".ToUpper() +"\n";
+ string str2 = "hello\0world".ToUpper() + "\n";
+ string str3 = "HELLOWORLD".ToLower() + "\n";
+ string str4 = "HelloWorld".ToUpper() + "\n";
+ string str5 = "hello world".Trim();
+ strA = new string[] { str1, str2, str3, str4, str5 };
+ ActualResult = string.Concat(strA);
+ if (ActualResult != MergeStrings(strA))
+ {
+ TestLibrary.TestFramework.LogError("015", "Concat object Array with some not nullstrings member two ExpectResult is equel" + MergeStrings(strA) + " ,ActualResult is (" + ActualResult + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region NegativeTesting
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ Random rand = new Random(-55);
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Concat string Array is null");
+
+ string[] strA = new string[rand.Next(c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH)];
+ string ActualResult;
+ try
+ {
+ strA = null;
+ ActualResult = string.Concat(strA);
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ Random rand = new Random(-55);
+ string[] strA = new string[50 * 1024 * 1024];
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Concat string Array with many strings");
+
+ int TotalLength = 0;
+ try
+ {
+ for (int i = 0; i < strA.Length; i++)
+ {
+ strA[i] = "HelloworldHelloworldHelloworldHelloworld!";
+ TotalLength += strA[i].ToString().Length;
+ }
+ ActualResult = string.Concat(strA);
+ retVal = false;
+ }
+ catch (OutOfMemoryException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #region Help method
+ private string MergeStrings(string[] strS)
+ {
+ string ResultString = "";
+ foreach (string str in strS)
+ {
+ if (str == null|| str ==string.Empty )
+ ResultString += string.Empty;
+ else
+ ResultString += str.ToString();
+ }
+ return ResultString;
+ }
+
+ #endregion
+
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringcopyto.cs b/tests/src/CoreMangLib/cti/system/string/stringcopyto.cs
new file mode 100644
index 0000000000..04db87a1ae
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringcopyto.cs
@@ -0,0 +1,480 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+using TestLibrary;
+
+
+public class StringCopyTo
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+ public static int Main()
+ {
+ StringCopyTo sct = new StringCopyTo();
+ TestLibrary.TestFramework.BeginTestCase("StringCopyTo");
+
+ if (sct.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Postive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+
+ return retVal;
+ }
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string strA;
+ int srcIndex;
+ char[] dst;
+ int dstIndex;
+ int count;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:empty string excute CopyTo empty char array dst");
+
+ try
+ {
+ strA = "";
+ srcIndex = 0;
+ dst = new char[] {};
+ dstIndex = 0;
+ count = 0;
+ strA.CopyTo(srcIndex, dst, dstIndex, count);
+ if(dst.Length != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "empty string excute CopyTo empty char array dst ExpectResult the dst is empty char array,ActualResult is " + dst + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string strA;
+ int srcIndex;
+ char[] dst;
+ int dstIndex;
+ int count;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:In CoptTo method this string length equels to the char array length and copy all string to char array");
+
+ try
+ {
+ string strBasic1 = TestLibrary.Generator.GetString(-55, false, c_MAX_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ string strBasic2 = TestLibrary.Generator.GetString(-55, false, c_MAX_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ strA = strBasic1;//"abc";
+ srcIndex = 0;
+ dst = strBasic2.ToCharArray();
+ dstIndex = 0;
+ count = strA.Length;
+ strA.CopyTo(srcIndex, dst, dstIndex, count);
+ string dst2 = new string(dst);
+ if (dst2.ToString () != strA.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "In CoptTo method this string length equels to the char array length and copy all string to char array ExpectResult dst's element is replaced by strA's symbols ,ActualResult is " + dst2 + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string strA;
+ int srcIndex;
+ char[] dst;
+ int dstIndex;
+ int count;
+ Random rand = new Random(-55);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:In CoptTo method this string length equels to the char array length but copy count is 0");
+
+ try
+ {
+ string strBasic1 = TestLibrary.Generator.GetString(-55, false, c_MAX_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ string strBasic2 = TestLibrary.Generator.GetString(-55, false, c_MAX_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ strA = strBasic1;
+ srcIndex = 0;
+ dst = strBasic2.ToCharArray();
+ dstIndex = rand.Next(0, dst.Length + 1);
+ count = 0;
+ strA.CopyTo(srcIndex, dst, dstIndex, count);
+ string dst2 = new string(dst);
+ if (dst2.ToString() != strBasic2.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "In CoptTo method this string length equels to the char array length but copy count is 0 ExpectResult dst's elements do not change ,ActualResult is " + dst2 + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string strA;
+ int srcIndex;
+ char[] dst;
+ int dstIndex;
+ int count;
+ Random rand = new Random(-55);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4:In CoptTo method this string length equels to the char array length and copy part of string to char arry");
+
+ try
+ {
+ string strBasic1 = TestLibrary.Generator.GetString(-55, false, c_MAX_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ string strBasic2 = TestLibrary.Generator.GetString(-55, false, c_MAX_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ strA = strBasic1;
+ srcIndex = 0;
+ dst = strBasic2.ToCharArray();
+ count = rand.Next(1,strA.Length);
+ dstIndex = rand.Next(0, dst.Length - count);
+ strA.CopyTo(srcIndex, dst, dstIndex, count);
+ string dst2 = new string(dst);
+ string dst3 = strBasic2.Substring(0,dstIndex) + strA.Substring(0,count) + strBasic2.Substring(dstIndex + count,dst.Length -dstIndex-count);
+ if (dst2.ToString() !=dst3.ToString())
+ {
+ TestLibrary.TestFramework.LogError("007", "In CoptTo method this string length equels to the char array length and copy part of string to char array ExpectResult is "+dst3+",ActualResult is " + dst2 + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string strA;
+ int srcIndex;
+ char[] dst;
+ int dstIndex;
+ int count;
+ Random rand = new Random(-55);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5:In CoptTo method copy part of string to the char array");
+
+ try
+ {
+ string strBasic1 = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ string strBasic2 = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ strA = strBasic1;
+ srcIndex = rand.Next(0,strA.Length+1);
+ dst = strBasic2.ToCharArray();
+ count = rand.Next(0,strA.Length+1 - srcIndex);
+ if (dst.Length >= count)
+ {
+ dstIndex = rand.Next(0, dst.Length - count);
+ strA.CopyTo(srcIndex, dst, dstIndex, count);
+ string dst2 = new string(dst);
+ string dst3 = strBasic2.Substring(0, dstIndex) + strA.Substring(srcIndex, count) + strBasic2.Substring(dstIndex + count, dst.Length - dstIndex - count);
+ if (dst2.ToString() != dst3.ToString())
+ {
+ TestLibrary.TestFramework.LogError("009", "In CoptTo method copy part of string to the char array ExpectResult is " + dst3 + ",ActualResult is " + dst2 + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region NegativeTesting
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ string strA;
+ int srcIndex;
+ char[] dst;
+ int dstIndex;
+ int count;
+ Random rand = new Random(-55);
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1:In CopyTo method destination is null");
+
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false,c_MINI_STRING_LENGTH,c_MAX_STRING_LENGTH);
+ srcIndex = TestLibrary.Generator.GetInt32(-55);
+ dst = null;
+ dstIndex = TestLibrary.Generator.GetInt32(-55);
+ count = TestLibrary.Generator.GetInt32(-55);
+ strA.CopyTo(srcIndex, dst, dstIndex, count);
+ retVal = false;
+ }
+ catch(ArgumentNullException)
+ {
+ }
+ catch(Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001","Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ string strA;
+ int srcIndex;
+ char[] dst;
+ int dstIndex;
+ int count;
+ Random rand = new Random(-55);
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2:In CopyTo method copy count is less than 0");
+
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ srcIndex = rand.Next(0, strA.Length + 1);
+ string strB = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ dst = strB.ToCharArray();
+ dstIndex = rand.Next(0, dst.Length + 1);
+ count = rand.Next(1, strA.Length + 1 - srcIndex) * (-1);
+ strA.CopyTo(srcIndex, dst, dstIndex, count);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ string strA;
+ int srcIndex;
+ char[] dst;
+ int dstIndex;
+ int count;
+ Random rand = new Random(-55);
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3:In CopyTo method sourceIndex is less than 0");
+
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ srcIndex = rand.Next(1, strA.Length + 1) * (-1);
+ string strB = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ dst = strB.ToCharArray();
+ dstIndex = rand.Next(0, dst.Length + 1);
+ count = rand.Next(0, strA.Length + 1 - srcIndex);
+ strA.CopyTo(srcIndex, dst, dstIndex, count);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N003", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ string strA;
+ int srcIndex;
+ char[] dst;
+ int dstIndex;
+ int count;
+ Random rand = new Random(-55);
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4:In CopyTo method copy count is greater source leng substract sourceIndex");
+
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ srcIndex = rand.Next(0, strA.Length + 1);
+ string strB = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ dst = strB.ToCharArray();
+ dstIndex = rand.Next(0, dst.Length + 1);
+ count = rand.Next(strA.Length - srcIndex + 1, strA.Length);
+ strA.CopyTo(srcIndex, dst, dstIndex, count);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ string strA;
+ int srcIndex;
+ char[] dst;
+ int dstIndex;
+ int count;
+ Random rand = new Random(-55);
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: In CopyTo method source Index is greater source length");
+
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ srcIndex = rand.Next(strA.Length + 1, strA.Length + 10);
+ string strB = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ dst = strB.ToCharArray();
+ dstIndex = rand.Next(0, dst.Length + 1);
+ count = rand.Next(0,strA.Length +1);
+ strA.CopyTo(srcIndex, dst, dstIndex, count);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N005", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+ string strA;
+ int srcIndex;
+ char[] dst;
+ int dstIndex;
+ int count;
+ Random rand = new Random(-55);
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: In CopyTo method destination Index is less than 0");
+
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ srcIndex = rand.Next(0, strA.Length + 1);
+ string strB = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ dst = strB.ToCharArray();
+ dstIndex = rand.Next(1, dst.Length + 1) * (-1);
+ count = rand.Next(0,strA.Length + 1 - srcIndex);
+ strA.CopyTo(srcIndex, dst, dstIndex, count);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+ string strA;
+ int srcIndex;
+ char[] dst;
+ int dstIndex;
+ int count;
+ Random rand = new Random(-55);
+
+ TestLibrary.TestFramework.BeginScenario("NegTest7: In CopyTo method destination Index is greater destination length substract count");
+
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ srcIndex = rand.Next(0, strA.Length + 1);
+ string strB = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ dst = strB.ToCharArray();
+ count = rand.Next(0, strA.Length + 1 - srcIndex);
+ dstIndex = rand.Next(dst.Length - count + 1, dst.Length + 1);
+ strA.CopyTo(srcIndex, dst, dstIndex, count);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N007", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringctor5.cs b/tests/src/CoreMangLib/cti/system/string/stringctor5.cs
new file mode 100644
index 0000000000..343c2dea6f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringctor5.cs
@@ -0,0 +1,305 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+public class StringCtor5
+{
+ #region const define
+ private const int c_MIN_STRING_LEN = 1;
+ private const int c_MAX_STRING_LEN = 256;
+ #endregion
+
+ public static int Main(string[] args)
+ {
+ StringCtor5 sc = new StringCtor5();
+ TestLibrary.TestFramework.BeginTestCase("StringCtor_charArray_Int32_Int32");
+
+ if (sc.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string str = TestLibrary.Generator.GetString(-55, true, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ TestLibrary.TestFramework.BeginScenario("Generate a string with valid index and length!");
+ char[] charArray = new char[str.Length];
+ str.CopyTo(0, charArray, 0, charArray.Length);
+
+ try
+ {
+ //char[] charsArray = null;
+ string strGen = new string(charArray, 0, charArray.Length);
+ if (strGen != str)
+ {
+ TestLibrary.TestFramework.LogError("001", "The new generated string is not uqual to the original one!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected Error :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Generate a string with max range index and zero length
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string str = TestLibrary.Generator.GetString(-55, true, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ TestLibrary.TestFramework.BeginScenario("Generate a string with max index and zero length...");
+ char[] charArray = new char[str.Length];
+ str.CopyTo(0, charArray, 0, charArray.Length);
+
+ try
+ {
+ string strGen = new string(charArray, charArray.Length, 0);
+ if (strGen != str.Substring(charArray.Length, 0))
+ {
+ TestLibrary.TestFramework.LogError("003", "sdfsadfsa");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected Exception occurs : " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Generate string with max-1 index and valid length...
+ /// </summary>
+ /// <returns></returns>
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string str = TestLibrary.Generator.GetString(-55, true, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ TestLibrary.TestFramework.BeginScenario("Generate string with max-1 index and valid length...");
+ char[] charArray = new char[str.Length];
+ str.CopyTo(0, charArray, 0, charArray.Length);
+
+ try
+ {
+ string strGen = new string(charArray, charArray.Length - 1, 1);
+ if (strGen != str.Substring(charArray.Length - 1, 1))
+ {
+ TestLibrary.TestFramework.LogError("005", "The new generated sring is not the expected one!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected Expection occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// Negtest1: Generate a string with a null charArray
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("Negtest1: Generate a string with a null charArray");
+
+ try
+ {
+ char[] charArray = null;
+ string str = new string(charArray, 0, 0);
+
+ TestLibrary.TestFramework.LogError("007", "The new string can be generated by using a charArray with null value!!");
+ retVal = false;
+
+ }
+ catch (ArgumentNullException)
+ {
+ TestLibrary.TestFramework.LogInformation("ArgumentNullException is thrown when pass charArray with null value!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected Error :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// NegTest2: Generate string with max+1 index...
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ string str = TestLibrary.Generator.GetString(-55, true, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Generate string with max+1 index...");
+ char[] charArray = new char[str.Length];
+ str.CopyTo(0, charArray, 0, charArray.Length);
+
+ try
+ {
+ string strGen = new string(charArray, charArray.Length + 1, 0);
+
+ TestLibrary.TestFramework.LogError("009", "The string is generated with no exception occures!");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when the index param is max+1!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("00X", "Unexpected Exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// NegTest3: Generate string with max+1 length...
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ string str = TestLibrary.Generator.GetString(-55, true, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ TestLibrary.TestFramework.BeginScenario("NegTest3: Generate string with max+1 length...");
+ char[] charArray = new char[str.Length];
+ str.CopyTo(0, charArray, 0, charArray.Length);
+
+ try
+ {
+ string strGen = new string(charArray, 0, charArray.Length + 1);
+
+ TestLibrary.TestFramework.LogError("010", "The string is generated with no exception occurs!");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when the length param is max+1");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("011", "Unexpected Exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// NegTest4: Generate string when index with minus value...
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ string str = TestLibrary.Generator.GetString(-55, true, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ TestLibrary.TestFramework.BeginScenario("NegTest4: Generate string when index with minus value...");
+ char[] charArray = new char[str.Length];
+ str.CopyTo(0, charArray, 0, charArray.Length);
+
+ try
+ {
+ string strGen = new string(charArray, -1, charArray.Length);
+
+ TestLibrary.TestFramework.LogError("012", "The string is generated with no exception occurs!");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when the index param is minus");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("013", "Unexpected Exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ /// <summary>
+ /// NegTest4: Generate string when index with minus value...
+ /// </summary>
+ /// <returns></returns>
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ string str = TestLibrary.Generator.GetString(-55, true, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ TestLibrary.TestFramework.BeginScenario("NegTest4: Generate string when index with minus value...");
+ char[] charArray = new char[str.Length];
+ str.CopyTo(0, charArray, 0, charArray.Length);
+
+ try
+ {
+ string strGen = new string(charArray, 0, -1);
+
+ TestLibrary.TestFramework.LogError("013", "The string is generated with no exception occurs!");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ TestLibrary.TestFramework.LogInformation("ArgumentOutOfRangeException is thrown when index is minus!");
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected Exception occurs :" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringctorchar.cs b/tests/src/CoreMangLib/cti/system/string/stringctorchar.cs
new file mode 100644
index 0000000000..8c1b1c9d65
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringctorchar.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+using System.Globalization;
+
+[assembly:System.Security.SecurityCritical]
+namespace StringTest
+{
+ public class StringCtorChar
+ {
+ #region const define
+ const int c_MaxLenth = 256;
+ const int c_MinLenth = 1;
+ #endregion
+ #region Main function
+ public static int Main()
+ {
+ StringCtorChar sCtorChar = new StringCtorChar();
+
+ TestLibrary.TestFramework.BeginTestCase("StringCtorChar");
+
+ if (sCtorChar.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #endregion
+ #region public method
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive1]");
+ retVal = this.PosTest1() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Positive2]");
+ retVal = this.PosTest2() && retVal;
+ return retVal;
+ }
+ #endregion
+ #region Positive Test Cases
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ unsafe public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: value is a null pointer, an Empty instance is initialized");
+
+ try
+ {
+ char* pointer = null;
+ string teststring = GetTestString(pointer);
+ if (teststring != string.Empty)
+ {
+ TestLibrary.TestFramework.LogError("001a", "Comarison incorrect. TestString != String.Empty");
+ return false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ unsafe public bool PosTest2()
+ {
+ bool retVal = true;
+ string testString = TestLibrary.Generator.GetString(-55, true, c_MinLenth, c_MaxLenth);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: value is constructed and correct");
+
+ try
+ {
+
+ char[] chartest = new char[c_MaxLenth];
+ testString.CopyTo(0, chartest, 0, testString.Length);
+ string teststring1;
+
+ fixed (char* pointer = &(chartest[0]))
+ {
+ teststring1 = GetTestString(pointer);
+ }
+
+ if (testString != teststring1)
+ {
+ if (teststring1.Length < testString.Length)
+ {
+ TestLibrary.TestFramework.LogError("002", "The current process does not have read access to all the addressed characters");
+ retVal = false;
+
+ }
+ else
+ {
+ TestLibrary.TestFramework.LogError("002a", "Strings not the same");
+ retVal = false;
+ }
+
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #region constuctor function
+ unsafe public static string GetTestString(char* lPointer)
+ {
+ return new string(lPointer);
+ }
+ #endregion
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringempty.cs b/tests/src/CoreMangLib/cti/system/string/stringempty.cs
new file mode 100644
index 0000000000..1e9b4efc17
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringempty.cs
@@ -0,0 +1,77 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+namespace StringTest
+{
+ public class StringEmpty
+ {
+ #region main method
+ public static int Main()
+ {
+ StringEmpty stringempty = new StringEmpty();
+
+ TestLibrary.TestFramework.BeginTestCase("StringEmpty");
+
+ if (stringempty.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #endregion
+ #region public method
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+
+
+ return retVal;
+ }
+ #endregion
+ #region Positive Test Cases
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Compare a string with System.Empty");
+
+ try
+ {
+ string teststring = string.Empty;
+ string teststring1 = "";
+ if (!teststring.Equals(teststring1))
+ {
+ return false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+
+ }
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/stringequals1.cs b/tests/src/CoreMangLib/cti/system/string/stringequals1.cs
new file mode 100644
index 0000000000..1612754006
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringequals1.cs
@@ -0,0 +1,659 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// System.String.Equals(Object)
+/// Determines whether this instance of String and a specified object,
+/// which must also be a String object, have the same value.
+/// This method performs an ordinal (case-sensitive and culture-insensitive) comparison.
+/// </summary>
+class StringEquals1
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ private const string c_POS_TEST_PREFIX = "PosTest";
+ private const string c_NEG_TEST_PREFIX = "NegTest";
+
+ private const string c_GREEK_SIGMA_STR_A = "\x03C2\x03C3\x03A3\x03C2\x03C3";
+ private const string c_GREEK_SIGMA_STR_B = "\x03A3\x03A3\x03A3\x03C3\x03C2";
+
+ private int totalTestCount;
+ private int posTestCount;
+ private int negTestCount;
+ private int passedTestCount;
+ private int failedTestCount;
+
+ private enum TestType { PositiveTest = 1, NegativeTest = 2 };
+ private enum TestResult { NotRun = 0, PassedTest = 1, FailedTest = 2 };
+ internal struct Parameters
+ {
+ public string strSrc;
+ public object obj;
+
+ public string DataString
+ {
+ get
+ {
+ string str, strA, strB;
+ int lenA, lenB;
+
+ if (null == strSrc)
+ {
+ strA = "null";
+ lenA = 0;
+ }
+ else
+ {
+ strA = strSrc;
+ lenA = strSrc.Length;
+ }
+ if (null == obj)
+ {
+ strB = "null";
+ lenB = 0;
+ }
+ else
+ {
+ strB = obj.ToString();
+ lenB = strB.Length;
+ }
+
+ str = string.Format("\n[String value]\nSource: \"{0}\"\nObj: \"{1}\"", strA, strB);
+ str += string.Format("\n[String length]\nSource: {0}\nObj: {1}", lenA, lenB);
+
+ return str;
+ }
+ }
+ }
+
+ //Default constructor to ininitial all kind of test counts
+ public StringEquals1()
+ {
+ totalTestCount = posTestCount = negTestCount = 0;
+ passedTestCount = failedTestCount = 0;
+ }
+
+ #region Methods for all test scenarioes
+
+ //Update (postive or negative) and total test count at the beginning of test scenario
+ private void UpdateCounts(TestType testType)
+ {
+ if (TestType.PositiveTest == testType)
+ {
+ posTestCount++;
+ totalTestCount++;
+ return;
+ }
+
+ if (TestType.NegativeTest == testType)
+ {
+ negTestCount++;
+ totalTestCount++;
+ return;
+ }
+ }
+
+ //Update failed or passed test counts at the end of test scenario
+ private void UpdateCounts(TestResult testResult)
+ {
+ if (TestResult.PassedTest == testResult)
+ {
+ passedTestCount++;
+ return;
+ }
+
+ if (TestResult.FailedTest == testResult)
+ {
+ failedTestCount++;
+ return;
+ }
+ }
+
+ //Generate standard error number string
+ //i.e "9", "12" is not proper. Instead they should be "009", "012"
+ private string GenerateErrorNum(int errorNum)
+ {
+ string temp = errorNum.ToString();
+ string errorNumStr = new string('0', 3 - temp.Length) + temp;
+ return errorNumStr;
+ }
+
+ //Generate testId string
+ //i.e "P9", "N12" is not proper. Instead they should be "P009", "N012"
+ private string GenerateTestId(TestType testType)
+ {
+ string temp, testId;
+
+ if (testType == TestType.PositiveTest)
+ {
+ temp = this.posTestCount.ToString();
+ testId = "P" + new string('0', 3 - temp.Length) + temp;
+ }
+ else
+ {
+ temp = this.negTestCount.ToString();
+ testId = "N" + new string('0', 3 - temp.Length) + temp;
+ }
+
+ return testId;
+ }
+
+ #endregion
+
+ public static int Main()
+ {
+ StringEquals1 sc = new StringEquals1();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: System.String.Equals(Object obj)");
+ if (sc.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ //Postive test scenarios
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+ retVal = PosTest12() && retVal;
+ retVal = PosTest13() && retVal;
+ retVal = PosTest14() && retVal;
+ retVal = PosTest15() && retVal;
+ retVal = PosTest16() && retVal;
+ retVal = PosTest17() && retVal;
+ retVal = PosTest18() && retVal;
+ retVal = PosTest19() && retVal;
+ retVal = PosTest20() && retVal;
+ retVal = PosTest21() && retVal;
+
+ //Negative test scenarios
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarioes
+
+ #region null, String.Empty and "\0" testing
+
+ public bool PosTest1()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "The obj to compare with is null";
+ bool expectedValue = false;
+
+ paras.strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ paras.obj = null;
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ // PosTest2 to PosTest6 are new tests added in 8-4-2006 by v-yaduoj
+ public bool PosTest2()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "String.Empty vs null";
+ bool expectedValue = false;
+
+ paras.strSrc = String.Empty;
+ paras.obj = null;
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest3()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "String.Empty vs \"\"";
+ bool expectedValue = true;
+
+ paras.strSrc = String.Empty;
+ paras.obj = "";
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest4()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "String.Empty vs \"\\0\"";
+ bool expectedValue = false;
+
+ paras.strSrc = String.Empty;
+ paras.obj = "\0";
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest5()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "String.Empty vs unempty string";
+ bool expectedValue = false;
+
+ paras.strSrc = String.Empty;
+ paras.obj = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest6()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "Embedded '\\0' string ";
+ bool expectedValue = true;
+
+ StringBuilder sb = new StringBuilder("This\0String\0Is\0Valid");
+ paras.strSrc = sb.ToString();
+ paras.obj = sb.ToString();
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+ // PosTest2 to PosTest6 are new tests added in 8-4-2006 by Noter(v-yaduoj)
+
+ #endregion
+
+ //The following region is new updates in 8-4-2006 by Noter(v-yaduoj)
+ #region Tab and space testing
+
+ public bool PosTest7()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "Tab vs 4 spaces";
+ bool expectedValue = false;
+
+ paras.strSrc = "\t";
+ paras.obj = new string('\x0020', 4); // new update 8-8-2006 Noter(v-yaduoj)
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest8()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "Tab vs 8 spaces";
+ bool expectedValue = false;
+
+ paras.strSrc = "\t";
+ paras.obj = new string('\x0020', 8); // new update 8-8-2006 Noter(v-yaduoj)
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ #endregion
+
+ #region Non-string type obj
+
+ public bool PosTest9()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "The type of obj to compare with is Int32";
+ bool expectedValue = false;
+
+ paras.obj = TestLibrary.Generator.GetInt32(-55);
+ paras.strSrc = paras.obj.ToString();
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest10()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "The type of obj to compare with is Int16";
+ bool expectedValue = false;
+
+ paras.obj = TestLibrary.Generator.GetInt16(-55);
+ paras.strSrc = paras.obj.ToString();
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest11()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "The type of obj to compare with is Int64";
+ bool expectedValue = false;
+
+ paras.obj = TestLibrary.Generator.GetInt64(-55);
+ paras.strSrc = paras.obj.ToString();
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest12()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "The type of obj to compare with is Double";
+ bool expectedValue = false;
+
+ paras.obj = TestLibrary.Generator.GetDouble(-55);
+ paras.strSrc = paras.obj.ToString();
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest13()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "The type of obj to compare with is single";
+ bool expectedValue = false;
+
+ paras.obj = TestLibrary.Generator.GetSingle(-55);
+ paras.strSrc = paras.obj.ToString();
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest14()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "The type of obj to compare with is string[]";
+ bool expectedValue = false;
+
+ paras.obj = TestLibrary.Generator.GetStrings(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ paras.strSrc = paras.obj.ToString();
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest15()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "The type of obj to compare with is byte";
+ bool expectedValue = false;
+
+ paras.obj = TestLibrary.Generator.GetByte(-55);
+ paras.strSrc = paras.obj.ToString();
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest16()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "The type of obj to compare with is Byte[]";
+ bool expectedValue = false;
+
+ paras.obj = new byte[] {1,2,3};
+ paras.strSrc = paras.obj.ToString();
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest17()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "The type of obj to compare with is char";
+ bool expectedValue = false;
+
+ paras.obj = TestLibrary.Generator.GetChar(-55);
+ paras.strSrc = paras.obj.ToString();
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest18()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "The type of obj to compare with is char[]";
+ bool expectedValue = false;
+
+ paras.obj = new char[] {'1', 'a', '\x098A'};
+ paras.strSrc = paras.obj.ToString();
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ #endregion
+
+ #region Case sensitive testing
+
+ public bool PosTest19()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "Case sensitive testing";
+ bool expectedValue = false;
+
+ char ch = this.GetUpperChar();
+ paras.obj = ch.ToString();
+ paras.strSrc = char.ToLower(ch).ToString();
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ //Greek Sigma:
+ //Two lower case Sigma: (0x03C2), (0x03C3)
+ //One upper case Sigma: (0x03A3)
+ //where 2 lower case characters have the same upper case character.
+ public bool PosTest20()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "Asymmetric casing: Greek Sigma character, different case";
+ bool expectedValue = false;
+
+ paras.obj = c_GREEK_SIGMA_STR_A;
+ paras.strSrc = c_GREEK_SIGMA_STR_B;
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest21()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "Asymmetric casing: Greek Sigma character, both upper case";
+ bool expectedValue = true;
+
+ string str1 = c_GREEK_SIGMA_STR_A;
+ string str2 = c_GREEK_SIGMA_STR_B;
+ paras.obj = str1.ToUpper();
+ paras.strSrc = str2.ToUpper();
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ #endregion
+
+ #endregion //end for positive test scenarioes
+
+ #region Helper methods for positive test scenarioes
+
+ private bool ExecutePosTest(Parameters paras, bool expectedValue, string testDesc)
+ {
+ bool retVal = true;
+ UpdateCounts(TestType.PositiveTest);
+ string testId = GenerateTestId(TestType.PositiveTest);
+ TestResult testResult = TestResult.NotRun;
+
+ string testInfo = c_POS_TEST_PREFIX + this.posTestCount.ToString() + ": " + testDesc;
+ bool actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(testInfo);
+ try
+ {
+ actualValue = this.CallTestMethod(paras);
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += paras.DataString + "\nTest scenario Id: " + testId;
+ // new updates 8-6-2006 Noter(v-yaduoj)
+ TestLibrary.TestFramework.LogError(GenerateErrorNum((totalTestCount << 1) - 1) + " TestId -" + testId, errorDesc);
+ testResult = TestResult.FailedTest;
+ retVal = false;
+ }
+
+ testResult = TestResult.PassedTest;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(GenerateErrorNum(totalTestCount << 1) + " TestId -" + testId, "Unexpected exception: " + e + paras.DataString);
+ testResult = TestResult.FailedTest;
+ retVal = false;
+ }
+
+ UpdateCounts(testResult);
+ return retVal;
+ }
+
+ #endregion
+
+ #region Negative test scenarioes
+
+ public bool NegTest1()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "The instance of source string is null";
+ const string c_ERROR_DESC = "NullReferenceException is not thrown as expected";
+
+ paras.strSrc = null;
+ paras.obj = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ return ExeNegTest_NRE(paras, c_TEST_DESC, c_ERROR_DESC);
+ }
+
+ #endregion //end for negative test scenarioes
+
+ #region Helper methods for negative test scenarioes
+
+ //Test NullReferenceException
+ private bool ExeNegTest_NRE(Parameters paras, string testDesc, string errorDesc)
+ {
+ bool retVal = true;
+ UpdateCounts(TestType.NegativeTest);
+ string testId = GenerateTestId(TestType.NegativeTest);
+ string testInfo = c_NEG_TEST_PREFIX + this.negTestCount.ToString() + ": " + testDesc;
+ TestResult testResult = TestResult.NotRun;
+
+ TestLibrary.TestFramework.BeginScenario(testInfo);
+ try
+ {
+ this.CallTestMethod(paras);
+ TestLibrary.TestFramework.LogError(GenerateErrorNum((this.totalTestCount << 1) - 1) + " TestId -" + testId, errorDesc + paras.DataString);
+ testResult = TestResult.FailedTest;
+ retVal = false;
+ }
+ catch (NullReferenceException)
+ {
+ testResult = TestResult.PassedTest;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(GenerateErrorNum(this.totalTestCount << 1) + " TestId -" + testId, "Unexpected exception: " + e + paras.DataString);
+ testResult = TestResult.FailedTest;
+ retVal = false;
+ }
+
+ UpdateCounts(testResult);
+ return retVal;
+ }
+
+ #endregion
+
+ //Involke the test method
+ private bool CallTestMethod(Parameters paras)
+ {
+ return paras.strSrc.Equals(paras.obj);
+ }
+
+ #region helper methods for generating test data
+
+ private bool GetBoolean()
+ {
+ Int32 i = this.GetInt32(1, 2);
+ return (i == 1) ? true : false;
+ }
+
+ //Get a non-negative integer between minValue and maxValue
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ private Int32 Min(Int32 i1, Int32 i2)
+ {
+ return (i1 <= i2) ? i1 : i2;
+ }
+
+ private Int32 Max(Int32 i1, Int32 i2)
+ {
+ return (i1 >= i2) ? i1 : i2;
+ }
+
+ private char GetUpperChar()
+ {
+ Char c;
+ // Grab an ASCII letter
+ c = Convert.ToChar(TestLibrary.Generator.GetInt16(-55) % 26 + 'A');
+ return c;
+ }
+
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringequals2.cs b/tests/src/CoreMangLib/cti/system/string/stringequals2.cs
new file mode 100644
index 0000000000..5605ac239d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringequals2.cs
@@ -0,0 +1,512 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// System.String.Equals(String)
+/// Determines whether this instance of String and a specified object,
+/// which must also be a String object, have the same value.
+/// This method performs an ordinal (case-sensitive and culture-insensitive) comparison.
+/// </summary>
+class StringEquals2
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ private const string c_POS_TEST_PREFIX = "PosTest";
+ private const string c_NEG_TEST_PREFIX = "NegTest";
+
+ private const string c_GREEK_SIGMA_STR_A = "\x03C2\x03C3\x03A3\x03C2\x03C3";
+ private const string c_GREEK_SIGMA_STR_B = "\x03A3\x03A3\x03A3\x03C3\x03C2";
+
+ private int totalTestCount;
+ private int posTestCount;
+ private int negTestCount;
+ private int passedTestCount;
+ private int failedTestCount;
+
+ private enum TestType { PositiveTest = 1, NegativeTest = 2 };
+ private enum TestResult { NotRun = 0, PassedTest = 1, FailedTest = 2 };
+ internal struct Parameters
+ {
+ public string strSrc;
+ public string strDes;
+
+ public string DataString
+ {
+ get
+ {
+ string str, strA, strB;
+ int lenA, lenB;
+
+ if (null == strSrc)
+ {
+ strA = "null";
+ lenA = 0;
+ }
+ else
+ {
+ strA = strSrc;
+ lenA = strSrc.Length;
+ }
+ if (null == strDes)
+ {
+ strB = "null";
+ lenB = 0;
+ }
+ else
+ {
+ strB = strDes;
+ lenB = strB.Length;
+ }
+
+ str = string.Format("\n[String value]\nSource: \"{0}\"\nDestination: \"{1}\"", strA, strB);
+ str += string.Format("\n[String length]\nSource: {0}\nDestination: {1}", lenA, lenB);
+
+ return str;
+ }
+ }
+ }
+
+ //Default constructor to ininitial all kind of test counts
+ public StringEquals2()
+ {
+ totalTestCount = posTestCount = negTestCount = 0;
+ passedTestCount = failedTestCount = 0;
+ }
+
+ #region Methods for all test scenarioes
+
+ //Update (postive or negative) and total test count at the beginning of test scenario
+ private void UpdateCounts(TestType testType)
+ {
+ if (TestType.PositiveTest == testType)
+ {
+ posTestCount++;
+ totalTestCount++;
+ return;
+ }
+
+ if (TestType.NegativeTest == testType)
+ {
+ negTestCount++;
+ totalTestCount++;
+ return;
+ }
+ }
+
+ //Update failed or passed test counts at the end of test scenario
+ private void UpdateCounts(TestResult testResult)
+ {
+ if (TestResult.PassedTest == testResult)
+ {
+ passedTestCount++;
+ return;
+ }
+
+ if (TestResult.FailedTest == testResult)
+ {
+ failedTestCount++;
+ return;
+ }
+ }
+
+ //Generate standard error number string
+ //i.e "9", "12" is not proper. Instead they should be "009", "012"
+ private string GenerateErrorNum(int errorNum)
+ {
+ string temp = errorNum.ToString();
+ string errorNumStr = new string('0', 3 - temp.Length) + temp;
+ return errorNumStr;
+ }
+
+ //Generate testId string
+ //i.e "P9", "N12" is not proper. Instead they should be "P009", "N012"
+ private string GenerateTestId(TestType testType)
+ {
+ string temp, testId;
+
+ if (testType == TestType.PositiveTest)
+ {
+ temp = this.posTestCount.ToString();
+ testId = "P" + new string('0', 3 - temp.Length) + temp;
+ }
+ else
+ {
+ temp = this.negTestCount.ToString();
+ testId = "N" + new string('0', 3 - temp.Length) + temp;
+ }
+
+ return testId;
+ }
+
+ #endregion
+
+ public static int Main()
+ {
+ StringEquals2 sc = new StringEquals2();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: System.String.Equals(string)");
+ if (sc.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ //Postive test scenarios
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+
+ //Negative test scenarios
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarioes
+
+ #region null, String.Empty and "\0" testing
+
+ public bool PosTest1()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "The string to compare with is null";
+ bool expectedValue = false;
+
+ paras.strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ paras.strDes = null;
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest2()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "String.Empty vs null";
+ bool expectedValue = false;
+
+ paras.strSrc = String.Empty;
+ paras.strDes = null;
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest3()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "String.Empty vs \"\"";
+ bool expectedValue = true;
+
+ paras.strSrc = String.Empty;
+ paras.strDes = "";
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest4()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "String.Empty vs \"\\0\"";
+ bool expectedValue = false;
+
+ paras.strSrc = String.Empty;
+ paras.strDes = "\0";
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest5()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "String.Empty vs unempty string";
+ bool expectedValue = false;
+
+ paras.strSrc = String.Empty;
+ paras.strDes = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest6()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "Embedded '\\0' string ";
+ bool expectedValue = true;
+
+ StringBuilder sb = new StringBuilder("This\0String\0Is\0Valid");
+ paras.strSrc = sb.ToString();
+ paras.strDes = sb.ToString();
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ #endregion
+
+ #region Tab and space testing
+
+ public bool PosTest7()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "Tab vs 4 spaces";
+ bool expectedValue = false;
+
+ paras.strSrc = "\t";
+ paras.strDes = new string('\x0020', 4); // new update 8-8-2006 Noter(v-yaduoj)
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest8()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "Tab vs 8 spaces";
+ bool expectedValue = false;
+
+ paras.strSrc = "\t";
+ paras.strDes = new string('\x0020', 8); // new update 8-8-2006 Noter(v-yaduoj)
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ #endregion
+
+ #region Case sensitive testing
+
+ public bool PosTest9()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "Case sensitive testing";
+ bool expectedValue = false;
+
+ char ch = this.GetUpperChar();
+ paras.strDes = ch.ToString();
+ paras.strSrc = char.ToLower(ch).ToString();
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ //Greek Sigma:
+ //Two lower case Sigma: (0x03C2), (0x03C3)
+ //One upper case Sigma: (0x03A3)
+ //where 2 lower case characters have the same upper case character.
+ public bool PosTest10()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "Asymmetric casing: Greek Sigma character, different case";
+ bool expectedValue = false;
+
+ paras.strDes = c_GREEK_SIGMA_STR_A;
+ paras.strSrc = c_GREEK_SIGMA_STR_B;
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest11()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "Asymmetric casing: Greek Sigma character, both upper case";
+ bool expectedValue = true;
+
+ string str1 = c_GREEK_SIGMA_STR_A;
+ string str2 = c_GREEK_SIGMA_STR_B;
+ paras.strDes = str1.ToUpper();
+ paras.strSrc = str2.ToUpper();
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ #endregion
+
+ #endregion //end for positive test scenarioes
+
+ #region Helper methods for positive test scenarioes
+
+ private bool ExecutePosTest(Parameters paras, bool expectedValue, string testDesc)
+ {
+ bool retVal = true;
+ UpdateCounts(TestType.PositiveTest);
+ string testId = GenerateTestId(TestType.PositiveTest);
+ TestResult testResult = TestResult.NotRun;
+
+ string testInfo = c_POS_TEST_PREFIX + this.posTestCount.ToString() + ": " + testDesc;
+ bool actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(testInfo);
+ try
+ {
+ actualValue = this.CallTestMethod(paras);
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += paras.DataString + "\nTest scenario Id: " + testId;
+ // new update: 8-6-2006 Noter(v-yaduoj)
+ TestLibrary.TestFramework.LogError(GenerateErrorNum((totalTestCount << 1) - 1) + " TestId -" + testId, errorDesc);
+ testResult = TestResult.FailedTest;
+ retVal = false;
+ }
+
+ testResult = TestResult.PassedTest;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(GenerateErrorNum(totalTestCount << 1) + " TestId -" + testId, "Unexpected exception: " + e + paras.DataString);
+ testResult = TestResult.FailedTest;
+ retVal = false;
+ }
+
+ UpdateCounts(testResult);
+ return retVal;
+ }
+
+ #endregion
+
+ #region Negative test scenarioes
+
+ public bool NegTest1()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "The instance of source string is null";
+ const string c_ERROR_DESC = "NullReferenceException is not thrown as expected";
+
+ paras.strSrc = null;
+ paras.strDes = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ return ExeNegTest_NRE(paras, c_TEST_DESC, c_ERROR_DESC);
+ }
+
+ #endregion //end for negative test scenarioes
+
+ #region Helper methods for negative test scenarioes
+
+ //Test NullReferenceException
+ private bool ExeNegTest_NRE(Parameters paras, string testDesc, string errorDesc)
+ {
+ bool retVal = true;
+ UpdateCounts(TestType.NegativeTest);
+ string testId = GenerateTestId(TestType.NegativeTest);
+ string testInfo = c_NEG_TEST_PREFIX + this.negTestCount.ToString() + ": " + testDesc;
+ TestResult testResult = TestResult.NotRun;
+
+ TestLibrary.TestFramework.BeginScenario(testInfo);
+ try
+ {
+ this.CallTestMethod(paras);
+ TestLibrary.TestFramework.LogError(GenerateErrorNum((this.totalTestCount << 1) - 1) + " TestId -" + testId, errorDesc + paras.DataString);
+ testResult = TestResult.FailedTest;
+ retVal = false;
+ }
+ catch (NullReferenceException)
+ {
+ testResult = TestResult.PassedTest;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(GenerateErrorNum(this.totalTestCount << 1) + " TestId -" + testId, "Unexpected exception: " + e + paras.DataString);
+ testResult = TestResult.FailedTest;
+ retVal = false;
+ }
+
+ UpdateCounts(testResult);
+ return retVal;
+ }
+
+ #endregion
+
+ //Involke the test method
+ private bool CallTestMethod(Parameters paras)
+ {
+ return paras.strSrc.Equals(paras.strDes);
+ }
+
+ #region helper methods for generating test data
+
+ private bool GetBoolean()
+ {
+ Int32 i = this.GetInt32(1, 2);
+ return (i == 1) ? true : false;
+ }
+
+ //Get a non-negative integer between minValue and maxValue
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ private Int32 Min(Int32 i1, Int32 i2)
+ {
+ return (i1 <= i2) ? i1 : i2;
+ }
+
+ private Int32 Max(Int32 i1, Int32 i2)
+ {
+ return (i1 >= i2) ? i1 : i2;
+ }
+
+ private char GetUpperChar()
+ {
+ Char c;
+ // Grab an ASCII letter
+ c = Convert.ToChar(TestLibrary.Generator.GetInt16(-55) % 26 + 'A');
+ return c;
+ }
+
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringequals3.cs b/tests/src/CoreMangLib/cti/system/string/stringequals3.cs
new file mode 100644
index 0000000000..eeaff75119
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringequals3.cs
@@ -0,0 +1,458 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+using System.Globalization;
+
+/// <summary>
+/// System.String.Equals(String, String)
+/// Determines whether two specified String objects have the same value.
+/// This method performs an ordinal (case-sensitive and culture-insensitive) comparison.
+/// </summary>
+class StringEquals3
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ private const string c_POS_TEST_PREFIX = "PosTest";
+ private const string c_NEG_TEST_PREFIX = "NegTest";
+
+ private const string c_GREEK_SIGMA_STR_A = "\x03C2\x03C3\x03A3\x03C2\x03C3";
+ private const string c_GREEK_SIGMA_STR_B = "\x03A3\x03A3\x03A3\x03C3\x03C2";
+
+ private int totalTestCount;
+ private int posTestCount;
+ private int negTestCount;
+ private int passedTestCount;
+ private int failedTestCount;
+
+ private enum TestType { PositiveTest = 1, NegativeTest = 2 };
+ private enum TestResult { NotRun = 0, PassedTest = 1, FailedTest = 2 };
+ internal struct Parameters
+ {
+ public string strSrc;
+ public string strDes;
+
+ public string DataString
+ {
+ get
+ {
+ string str, strA, strB;
+ int lenA, lenB;
+
+ if (null == strSrc)
+ {
+ strA = "null";
+ lenA = 0;
+ }
+ else
+ {
+ strA = strSrc;
+ lenA = strSrc.Length;
+ }
+ if (null == strDes)
+ {
+ strB = "null";
+ lenB = 0;
+ }
+ else
+ {
+ strB = strDes;
+ lenB = strB.Length;
+ }
+
+ str = string.Format("\n[String value]\nSource: \"{0}\"\nDestination: \"{1}\"", strA, strB);
+ str += string.Format("\n[String length]\nSource: {0}\nDestination: {1}", lenA, lenB);
+
+ return str;
+ }
+ }
+ }
+
+ //Default constructor to ininitial all kind of test counts
+ public StringEquals3()
+ {
+ totalTestCount = posTestCount = negTestCount = 0;
+ passedTestCount = failedTestCount = 0;
+ }
+
+ #region Methods for all test scenarioes
+
+ //Update (postive or negative) and total test count at the beginning of test scenario
+ private void UpdateCounts(TestType testType)
+ {
+ if (TestType.PositiveTest == testType)
+ {
+ posTestCount++;
+ totalTestCount++;
+ return;
+ }
+
+ if (TestType.NegativeTest == testType)
+ {
+ negTestCount++;
+ totalTestCount++;
+ return;
+ }
+ }
+
+ //Update failed or passed test counts at the end of test scenario
+ private void UpdateCounts(TestResult testResult)
+ {
+ if (TestResult.PassedTest == testResult)
+ {
+ passedTestCount++;
+ return;
+ }
+
+ if (TestResult.FailedTest == testResult)
+ {
+ failedTestCount++;
+ return;
+ }
+ }
+
+ //Generate standard error number string
+ //i.e "9", "12" is not proper. Instead they should be "009", "012"
+ private string GenerateErrorNum(int errorNum)
+ {
+ string temp = errorNum.ToString();
+ string errorNumStr = new string('0', 3 - temp.Length) + temp;
+ return errorNumStr;
+ }
+
+ //Generate testId string
+ //i.e "P9", "N12" is not proper. Instead they should be "P009", "N012"
+ private string GenerateTestId(TestType testType)
+ {
+ string temp, testId;
+
+ if (testType == TestType.PositiveTest)
+ {
+ temp = this.posTestCount.ToString();
+ testId = "P" + new string('0', 3 - temp.Length) + temp;
+ }
+ else
+ {
+ temp = this.negTestCount.ToString();
+ testId = "N" + new string('0', 3 - temp.Length) + temp;
+ }
+
+ return testId;
+ }
+
+ #endregion
+
+ public static int Main()
+ {
+ StringEquals3 sc = new StringEquals3();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: System.String.Equals(String, String)");
+ if (sc.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ //Postive test scenarios
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+ retVal = PosTest11() && retVal;
+
+ //Negative test scenarios
+ //TestLibrary.TestFramework.LogInformation("[Negative]");
+
+ return retVal;
+ }
+
+ #region Positive test scenarioes
+
+ #region null, String.Empty and "\0" testing
+
+ public bool PosTest1()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "The string to compare with is null";
+ bool expectedValue = false;
+
+ paras.strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ paras.strDes = null;
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest2()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "String.Empty vs null";
+ bool expectedValue = false;
+
+ paras.strSrc = String.Empty;
+ paras.strDes = null;
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest3()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "String.Empty vs \"\"";
+ bool expectedValue = true;
+
+ paras.strSrc = String.Empty;
+ paras.strDes = "";
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest4()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "String.Empty vs \"\\0\"";
+ bool expectedValue = false;
+
+ paras.strSrc = String.Empty;
+ paras.strDes = "\0";
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest5()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "String.Empty vs unempty string";
+ bool expectedValue = false;
+
+ paras.strSrc = String.Empty;
+ paras.strDes = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest6()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "Embedded '\\0' string ";
+ bool expectedValue = true;
+
+ StringBuilder sb = new StringBuilder("This\0String\0Is\0Valid");
+ paras.strSrc = sb.ToString();
+ paras.strDes = sb.ToString();
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ #endregion
+
+ #region Tab and space testing
+
+ public bool PosTest7()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "Tab vs 4 spaces";
+ bool expectedValue = false;
+
+ paras.strSrc = "\t";
+ paras.strDes = new string('\x0020', 4); // new update 8-8-2006 Noter(v-yaduoj)
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest8()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "Tab vs 8 spaces";
+ bool expectedValue = false;
+
+ paras.strSrc = "\t";
+ paras.strDes = new string('\x0020', 8); // new update 8-8-2006 Noter(v-yaduoj)
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ #endregion
+
+ #region Case sensitive testing
+
+ public bool PosTest9()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "Case sensitive testing";
+ bool expectedValue = false;
+
+ char ch = this.GetUpperChar();
+ paras.strDes = ch.ToString();
+ paras.strSrc = char.ToLower(ch).ToString();
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ //Greek Sigma:
+ //Two lower case Sigma: (0x03C2), (0x03C3)
+ //One upper case Sigma: (0x03A3)
+ //where 2 lower case characters have the same upper case character.
+ public bool PosTest10()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "Asymmetric casing: Greek Sigma character, different case";
+ bool expectedValue = false;
+
+ paras.strDes = c_GREEK_SIGMA_STR_A;
+ paras.strSrc = c_GREEK_SIGMA_STR_B;
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ public bool PosTest11()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "Asymmetric casing: Greek Sigma character, both upper case";
+ bool expectedValue = true;
+
+ string str1 = c_GREEK_SIGMA_STR_A;
+ string str2 = c_GREEK_SIGMA_STR_B;
+ paras.strDes = str1.ToUpper();
+ paras.strSrc = str2.ToUpper();
+
+ return ExecutePosTest(paras, expectedValue, c_TEST_DESC);
+ }
+
+ #endregion
+
+ #endregion //end for positive test scenarioes
+
+ #region Helper methods for positive test scenarioes
+
+ private bool ExecutePosTest(Parameters paras, bool expectedValue, string testDesc)
+ {
+ bool retVal = true;
+ UpdateCounts(TestType.PositiveTest);
+ string testId = GenerateTestId(TestType.PositiveTest);
+ TestResult testResult = TestResult.NotRun;
+
+ string testInfo = c_POS_TEST_PREFIX + this.posTestCount.ToString() + ": " + testDesc;
+ bool actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(testInfo);
+ try
+ {
+ actualValue = this.CallTestMethod(paras);
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += paras.DataString + "\nTest scenario Id: " + testId;
+ // new update: 8-6-2006 Noter(v-yaduoj)
+ TestLibrary.TestFramework.LogError(GenerateErrorNum((totalTestCount << 1) - 1) + " TestId -" + testId, errorDesc);
+ testResult = TestResult.FailedTest;
+ retVal = false;
+ }
+
+ testResult = TestResult.PassedTest;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(GenerateErrorNum(totalTestCount << 1) + " TestId -" + testId, "Unexpected exception: " + e + paras.DataString);
+ testResult = TestResult.FailedTest;
+ retVal = false;
+ }
+
+ UpdateCounts(testResult);
+ return retVal;
+ }
+
+ #endregion
+
+ //Involke the test method
+ private bool CallTestMethod(Parameters paras)
+ {
+ return string.Equals(paras.strSrc, paras.strDes);
+ }
+
+ #region helper methods for generating test data
+
+ private bool GetBoolean()
+ {
+ Int32 i = this.GetInt32(1, 2);
+ return (i == 1) ? true : false;
+ }
+
+ //Get a non-negative integer between minValue and maxValue
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ private Int32 Min(Int32 i1, Int32 i2)
+ {
+ return (i1 <= i2) ? i1 : i2;
+ }
+
+ private Int32 Max(Int32 i1, Int32 i2)
+ {
+ return (i1 >= i2) ? i1 : i2;
+ }
+
+ private char GetUpperChar()
+ {
+ Char c;
+ // Grab an ASCII letter
+ c = Convert.ToChar(TestLibrary.Generator.GetInt16(-55) % 26 + 'A');
+ return c;
+ }
+
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringequals6.cs b/tests/src/CoreMangLib/cti/system/string/stringequals6.cs
new file mode 100644
index 0000000000..be60b76ed9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringequals6.cs
@@ -0,0 +1,215 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+using System.Globalization;
+using TestLibrary;
+
+public class StringEquals
+{
+ public static string[] InterestingStrings = new string[] { null, "", "a", "1", "-", "A", "!", "abc", "aBc", "a\u0400Bc", "I", "i", "\u0130", "\u0131", "A", "\uFF21", "\uFE57"};
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Compare interesting strings ordinally");
+
+ try
+ {
+ foreach (string s in InterestingStrings)
+ {
+ foreach (string r in InterestingStrings)
+ {
+ retVal &= TestStrings(s, r);
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Compare many characters");
+
+ try
+ {
+ for (int i = 0; i < 40; i++) // Ok, 40 isn't that many... but this takes way too long
+ {
+ char c = Generator.GetChar(-55);
+ if (string.Equals(new string(new char[] { c }), new string(new char[] { c }), StringComparison.Ordinal) != true)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Character " + i.ToString() + " is not equal to itself ordinally!");
+ retVal = false;
+ }
+
+ for (int j = 0; j < (int)c; j++)
+ {
+ bool compareResult = string.Equals(new string(new char[] { c }), new string(new char[] { (char)j }), StringComparison.Ordinal);
+ if (compareResult != false)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Character " + ((int)c).ToString() + " is equal to " + j.ToString() + ", Compare result: " + compareResult.ToString());
+ retVal = false;
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.4", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Compare many strings");
+
+ try
+ {
+ for (int i = 0; i < 1000; i++)
+ {
+ string str1 = Generator.GetString(-55, false, 5, 20);
+ string str2 = Generator.GetString(-55, false, 5, 20);
+ if (string.Equals(str1, str1, StringComparison.Ordinal) != true)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Comparison not as expected! Actual result: " + string.Equals(str1, str1, StringComparison.Ordinal).ToString() + ", Expected result: 0");
+ TestLibrary.TestFramework.LogInformation("String 1: <" + str1 + "> : " + BytesFromString(str1) + "\nString 2: <" + str1 + "> : " + BytesFromString(str1));
+ retVal = false;
+ }
+ if (string.Equals(str2, str2, StringComparison.Ordinal) != true)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Comparison not as expected! Actual result: " + string.Equals(str2, str2, StringComparison.Ordinal).ToString() + ", Expected result: 0");
+ TestLibrary.TestFramework.LogInformation("String 1: <" + str2 + "> : " + BytesFromString(str2) + "\nString 2: <" + str2 + "> : " + BytesFromString(str2));
+ retVal = false;
+ }
+ TestStrings(str1, str2);
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.4", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Specific regression cases");
+
+ try
+ {
+ CultureInfo oldCi = Utilities.CurrentCulture;
+ Utilities.CurrentCulture = new CultureInfo("hu-HU");
+ retVal &= TestStrings("dzsdzs", "ddzs");
+ Utilities.CurrentCulture = oldCi;
+
+ retVal &= TestStrings("\u00C0nimal", "A\u0300nimal");
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public static int Main()
+ {
+ StringEquals test = new StringEquals();
+
+ TestLibrary.TestFramework.BeginTestCase("StringEquals");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ private bool TestStrings(string str1, string str2)
+ {
+ bool retVal = true;
+
+ bool expectValue = PredictValue(str1, str2);
+ bool actualValue = string.Equals(str1, str2, StringComparison.Ordinal);
+
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Comparison not as expected! Actual result: " + actualValue + ", Expected result: " + expectValue);
+ TestLibrary.TestFramework.LogInformation("String 1: <" + str1 + "> : " + BytesFromString(str1) + "\nString 2: <" + str2 + "> : " + BytesFromString(str2));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ bool PredictValue(string str1, string str2)
+ {
+ if (str1 == null)
+ {
+ if (str2 == null) return true;
+ else return false;
+ }
+ if (str2 == null) return false;
+
+ for (int i = 0; i < str1.Length; i++)
+ {
+ if (i >= str2.Length) return false;
+ if ((int)str1[i] > (int)str2[i]) return false;
+ if ((int)str1[i] < (int)str2[i]) return false;
+ }
+
+ if (str2.Length > str1.Length) return false;
+
+ return true;
+ }
+
+ private static string BytesFromString(string str)
+ {
+ if (str == null) return string.Empty;
+ StringBuilder output = new StringBuilder();
+ for (int i = 0; i < str.Length; i++)
+ {
+ output.Append(Utilities.ByteArrayToString(BitConverter.GetBytes(str[i])));
+ if (i != (str.Length - 1)) output.Append(", ");
+ }
+ return output.ToString();
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringformat1.cs b/tests/src/CoreMangLib/cti/system/string/stringformat1.cs
new file mode 100644
index 0000000000..5bc2400a78
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringformat1.cs
@@ -0,0 +1,581 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// String.Format(String, Object)
+/// Replaces the format item in a specified String with the text equivalent of the value
+/// of a specified Object instance.
+/// </summary>
+class StringFormat1
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ public static int Main()
+ {
+ StringFormat1 sf = new StringFormat1();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: String.Format(String, Object)");
+ if (sf.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarios
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Default format string for Int32";
+
+ bool expectedValue = true;
+ bool actualValue = false;
+ string errorDesc;
+
+ string format;
+ Object arg0;
+
+ format = "The Int32 {0}";
+ int i = TestLibrary.Generator.GetInt32(-55);
+ arg0 = i; //boxing
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = string.Format(format, arg0);
+ str = str.Substring(format.IndexOf('{'));
+ actualValue = (int.Parse(str) == i);
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch(Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #region alignment testing
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: the length of the formatted Int32 value is less than alignment";
+
+ bool expectedValue = true;
+ bool actualValue = false;
+ string errorDesc;
+
+ string format;
+ Object arg0;
+
+ int i = TestLibrary.Generator.GetInt32(-55);
+ int alignment = i.ToString().Length + TestLibrary.Generator.GetInt32(-55) % c_MAX_STRING_LEN + 1;
+ format = "The Int32 {0," + alignment.ToString() + "}";
+ arg0 = i; //boxing
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = string.Format(format, arg0);
+ str = str.Substring(format.IndexOf('{'));
+ //Validate the formatted string against primitive integer
+ actualValue = (int.Parse(str) == i);
+ int lastIndex = str.LastIndexOf('\u0020');
+ actualValue = (lastIndex >= 0) && actualValue;
+ for (int j = 0; j <= lastIndex; j++)
+ {
+ actualValue = ('\u0020' == str[j]) && actualValue;
+ }
+ actualValue = (alignment == str.Length) && actualValue;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ const string c_TEST_DESC = "PosTest3: alignment is positive, the length of the formatted Int32 value is greater than alignment";
+
+ bool expectedValue = true;
+ bool actualValue = false;
+ string errorDesc;
+
+ string format;
+ Object arg0;
+
+ int i = TestLibrary.Generator.GetInt32(-55) % (Int32.MaxValue - 10) + 10;
+ int alignment = TestLibrary.Generator.GetInt32(-55) % (i.ToString().Length - 1) + 1;
+ format = "The Int32 {0," + alignment.ToString() + "}";
+ arg0 = i; //boxing
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = string.Format(format, arg0);
+ str = str.Substring(format.IndexOf('{'));
+ actualValue = (int.Parse(str) == i) && (str.Length == i.ToString().Length);
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P004";
+ const string c_TEST_DESC = "PosTest4: alignment is zero";
+
+ bool expectedValue = true;
+ bool actualValue = false;
+ string errorDesc;
+
+ string format;
+ Object arg0;
+
+ int i = TestLibrary.Generator.GetInt32(-55);
+ int alignment = 0;
+ format = "The Int32 {0," + alignment.ToString() + "}";
+ arg0 = i; //boxing
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = string.Format(format, arg0);
+ str = str.Substring(format.IndexOf('{'));
+ actualValue = (int.Parse(str) == i) && (str.Length == i.ToString().Length);
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P005";
+ const string c_TEST_DESC = "PosTest5: alignment is negative, and its absolute value is greater than length of formatted object";
+
+ bool expectedValue = true;
+ bool actualValue = false;
+ string errorDesc;
+
+ string format;
+ Object arg0;
+
+ int i = TestLibrary.Generator.GetInt32(-55);
+ int alignment = -1 * (i.ToString().Length + TestLibrary.Generator.GetInt32(-55) % c_MAX_STRING_LEN + 1);
+ format = "The Int32 {0," + alignment.ToString() + "}";
+ arg0 = i; //boxing
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = string.Format(format, arg0);
+ str = str.Substring(format.IndexOf('{'));
+
+ //
+ int firstIndex = str.IndexOf('\u0020');
+ actualValue = (int.Parse(str) == i);
+ for (int j = firstIndex; j < str.Length; j++ )
+ {
+ actualValue = ('\u0020' == str[j]) && actualValue;
+ }
+ actualValue = (str.Length == (-1 * alignment)) && actualValue;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P006";
+ const string c_TEST_DESC = "PosTest6: alignment is negative, and its absolute value is less than or equal length of formatted object";
+
+ bool expectedValue = true;
+ bool actualValue = false;
+ string errorDesc;
+
+ string format;
+ Object arg0;
+
+ int i = TestLibrary.Generator.GetInt32(-55);
+ int alignment = -1 * (TestLibrary.Generator.GetInt32(-55) % (i.ToString().Length + 1));
+ format = "The Int32 {0," + alignment.ToString() + "}";
+ arg0 = i; //boxing
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = string.Format(format, arg0);
+ str = str.Substring(format.IndexOf('{'));
+ actualValue = (int.Parse(str) == i);
+ actualValue = (str.Length == i.ToString().Length) && actualValue;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P007";
+ const string c_TEST_DESC = "PosTest7: Formatted object is null";
+
+ bool expectedValue = true;
+ bool actualValue = false;
+ string errorDesc;
+
+ string format;
+ Object arg0;
+
+ format = "The object is {0}";
+ arg0 = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = string.Format(format, arg0);
+ str = str.Substring(format.IndexOf('{'));
+ actualValue = (0 == string.CompareOrdinal(str, string.Empty));
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P008";
+ const string c_TEST_DESC = @"PosTest8: format string contains { literal";
+
+ bool expectedValue = true;
+ bool actualValue = false;
+ string errorDesc;
+
+ string format;
+ Object arg0;
+
+ int i = TestLibrary.Generator.GetInt32(-55);
+ format = "{{0}}";
+ arg0 = i; //boxing
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = string.Format(format, arg0);
+
+ actualValue = (0 == string.CompareOrdinal(str, "{0}"));
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("015" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("016" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Negative test scenarios
+
+ //ArgumentNullException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: format is a null reference ";
+ string errorDesc;
+
+ string format;
+ Object arg0;
+
+ format = null;
+ arg0 = TestLibrary.Generator.GetInt32(-55); //boxing
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string.Format(format, arg0);
+ errorDesc = "ArgumentNullException is not thrown as expected";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("017" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("018" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //FormatException
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: The format item in format is invalid ";
+ string errorDesc;
+
+ string format;
+ Object arg0;
+
+ char ch;
+
+ //new update 8-18-2006 Noter(v-yaduoj)
+ do //Get a non-number character
+ {
+ ch = TestLibrary.Generator.GetChar(-55);
+ }while(char.IsDigit(ch));
+
+ format = "The object {" + ch.ToString() + "}";
+ arg0 = ch; //boxing
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string.Format(format, arg0);
+ errorDesc = "FormatException is not thrown as expected";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("019" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("020" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: The index is greater than number of formatted objects ";
+ string errorDesc;
+
+ string format;
+ Object arg0;
+
+ int i = TestLibrary.Generator.GetInt32(-55) % c_MAX_STRING_LEN + 1;
+ format = "The object {" + i.ToString() + "}";
+ arg0 = i; //boxing
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string.Format(format, arg0);
+ errorDesc = "FormatException is not thrown as expected";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("021" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("022" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N004";
+ const string c_TEST_DESC = "NegTest4: The index is negative ";
+ string errorDesc;
+
+ string format;
+ Object arg0;
+
+ int i = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+ format = "The object {" + i.ToString() + "}";
+ arg0 = i; //boxing
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string.Format(format, arg0);
+ errorDesc = "FormatException is not thrown as expected";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("023" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("024" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringformat2.cs b/tests/src/CoreMangLib/cti/system/string/stringformat2.cs
new file mode 100644
index 0000000000..23603ff1a5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringformat2.cs
@@ -0,0 +1,663 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// String.Format(String, params Object[])
+/// Replaces the format item in a specified String with
+/// the text equivalent of the value of a corresponding Object instance in a specified array.
+/// </summary>
+class StringFormat2
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ public static int Main()
+ {
+ StringFormat2 sf = new StringFormat2();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: String.Format(String, params Object[])");
+ if (sf.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarios
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Default format string for Int32[]";
+
+ bool expectedValue = true;
+ bool actualValue = false;
+ string errorDesc;
+
+ string format;
+ Object[] args;
+
+ int[] iArray = new int[TestLibrary.Generator.GetInt32(-55) % c_MIN_STRING_LEN + 1];
+ args = new Object[iArray.Length];
+ //boxing
+ for (int j = 0; j < iArray.Length; j++)
+ {
+ iArray[j] = TestLibrary.Generator.GetInt32(-55);
+ args[j] = iArray[j];
+ }
+ int index = TestLibrary.Generator.GetInt32(-55) % iArray.Length;
+ format = "The Int32 {" + index.ToString() + "}";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = string.Format(format, args);
+ str = str.Substring(format.IndexOf('{'));
+ actualValue = (int.Parse(str) == iArray[index]);
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch(Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #region alignment testing
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: the length of the formatted Int32 value is less than alignment";
+
+ bool expectedValue = true;
+ bool actualValue = false;
+ string errorDesc;
+
+ string format;
+ Object[] args;
+
+ int[] iArray = new int[TestLibrary.Generator.GetInt32(-55) % c_MIN_STRING_LEN + 1];
+ args = new Object[iArray.Length];
+ //boxing
+ for (int j = 0; j < iArray.Length; j++)
+ {
+ iArray[j] = TestLibrary.Generator.GetInt32(-55);
+ args[j] = iArray[j];
+ }
+ int index = TestLibrary.Generator.GetInt32(-55) % iArray.Length;
+ int alignment = iArray[index].ToString().Length + TestLibrary.Generator.GetInt32(-55) % c_MAX_STRING_LEN + 1;
+ format = "The Int32 {" + index.ToString() + "," + alignment.ToString() + "}";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = string.Format(format, args);
+ str = str.Substring(format.IndexOf('{'));
+ //Validate the formatted string against primitive integer
+ actualValue = (int.Parse(str) == iArray[index]);
+ int lastIndex = str.LastIndexOf('\u0020');
+ actualValue = (lastIndex >= 0) && actualValue;
+ for (int j = 0; j <= lastIndex; j++)
+ {
+ actualValue = ('\u0020' == str[j]) && actualValue;
+ }
+ actualValue = (alignment == str.Length) && actualValue;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ const string c_TEST_DESC = "PosTest3: alignment is positive, the length of the formatted Int32 value is greater than alignment";
+
+ bool expectedValue = true;
+ bool actualValue = false;
+ string errorDesc;
+
+ string format;
+ Object[] args;
+
+ int[] iArray = new int[TestLibrary.Generator.GetInt32(-55) % c_MIN_STRING_LEN + 1];
+ args = new Object[iArray.Length];
+ //boxing
+ for (int j = 0; j < iArray.Length; j++)
+ {
+ iArray[j] = TestLibrary.Generator.GetInt32(-55) % (Int32.MaxValue - 10) + 10;
+ args[j] = iArray[j];
+ }
+ int index = TestLibrary.Generator.GetInt32(-55) % iArray.Length;
+ int alignment =TestLibrary.Generator.GetInt32(-55) % (iArray[index].ToString().Length - 1) + 1;
+ format = "The Int32 {" + index.ToString() + "," + alignment.ToString() + "}";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = string.Format(format, args);
+ str = str.Substring(format.IndexOf('{'));
+ actualValue = (int.Parse(str) == iArray[index]) && (str.Length == iArray[index].ToString().Length);
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P004";
+ const string c_TEST_DESC = "PosTest4: alignment is zero";
+
+ bool expectedValue = true;
+ bool actualValue = false;
+ string errorDesc;
+
+ string format;
+ Object[] args;
+
+ int[] iArray = new int[TestLibrary.Generator.GetInt32(-55) % c_MIN_STRING_LEN + 1];
+ args = new Object[iArray.Length];
+ //boxing
+ for (int j = 0; j < iArray.Length; j++)
+ {
+ iArray[j] = TestLibrary.Generator.GetInt32(-55) % (Int32.MaxValue - 10) + 10;
+ args[j] = iArray[j];
+ }
+ int index = TestLibrary.Generator.GetInt32(-55) % iArray.Length;
+ int alignment = 0;
+ format = "The Int32 {" + index.ToString() + "," + alignment.ToString() + "}";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = string.Format(format, args);
+ str = str.Substring(format.IndexOf('{'));
+ actualValue = (int.Parse(str) == iArray[index]) && (str.Length == iArray[index].ToString().Length);
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P005";
+ const string c_TEST_DESC = "PosTest5: alignment is negative, and its absolute value is greater than length of formatted object";
+
+ bool expectedValue = true;
+ bool actualValue = false;
+ string errorDesc;
+
+ string format;
+ Object[] args;
+
+ int[] iArray = new int[TestLibrary.Generator.GetInt32(-55) % c_MIN_STRING_LEN + 1];
+ args = new Object[iArray.Length];
+ //boxing
+ for (int j = 0; j < iArray.Length; j++)
+ {
+ iArray[j] = TestLibrary.Generator.GetInt32(-55) % (Int32.MaxValue - 10) + 10;
+ args[j] = iArray[j];
+ }
+ int index = TestLibrary.Generator.GetInt32(-55) % iArray.Length;
+ int alignment = -1 * (iArray[index].ToString().Length + TestLibrary.Generator.GetInt32(-55) % c_MAX_STRING_LEN + 1);
+ format = "The Int32 {" + index.ToString() + "," + alignment.ToString() + "}";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = string.Format(format, args);
+ str = str.Substring(format.IndexOf('{'));
+
+ //
+ int firstIndex = str.IndexOf('\u0020');
+ actualValue = (int.Parse(str) == iArray[index]);
+ for (int j = firstIndex; j < str.Length; j++ )
+ {
+ actualValue = ('\u0020' == str[j]) && actualValue;
+ }
+ actualValue = (str.Length == (-1 * alignment)) && actualValue;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P006";
+ const string c_TEST_DESC = "PosTest6: alignment is negative, and its absolute value is less than or equal length of formatted object";
+
+ bool expectedValue = true;
+ bool actualValue = false;
+ string errorDesc;
+
+ string format;
+ Object[] args;
+
+ int[] iArray = new int[TestLibrary.Generator.GetInt32(-55) % c_MIN_STRING_LEN + 1];
+ args = new Object[iArray.Length];
+ //boxing
+ for (int j = 0; j < iArray.Length; j++)
+ {
+ iArray[j] = TestLibrary.Generator.GetInt32(-55) % (Int32.MaxValue - 10) + 10;
+ args[j] = iArray[j];
+ }
+ int index = TestLibrary.Generator.GetInt32(-55) % iArray.Length;
+ int alignment = -1 * (TestLibrary.Generator.GetInt32(-55) % (iArray[index].ToString().Length + 1));
+ format = "The Int32 {" + index.ToString() + "," + alignment.ToString() + "}";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = string.Format(format, args);
+ str = str.Substring(format.IndexOf('{'));
+ actualValue = (int.Parse(str) == iArray[index]);
+ actualValue = (str.Length == iArray[index].ToString().Length) && actualValue;
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P007";
+ const string c_TEST_DESC = "PosTest7: Formatted object is null";
+
+ bool expectedValue = true;
+ bool actualValue = false;
+ string errorDesc;
+
+ string format;
+ Object[] args;
+
+ format = "The object is {0}";
+ args = new object[TestLibrary.Generator.GetInt32(-55) % c_MAX_STRING_LEN + 1];
+ for (int i = 0; i < args.Length; i++)
+ {
+ args[i] = null;
+ }
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = string.Format(format, args);
+ str = str.Substring(format.IndexOf('{'));
+ actualValue = (0 == string.CompareOrdinal(str, string.Empty));
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P008";
+ const string c_TEST_DESC = @"PosTest8: format string contains { literal";
+
+ bool expectedValue = true;
+ bool actualValue = false;
+ string errorDesc;
+
+ string format;
+ Object[] args;
+
+ int[] iArray = new int[TestLibrary.Generator.GetInt32(-55) % c_MIN_STRING_LEN + 1];
+ args = new object[iArray.Length];
+ format = "{{0}}";
+ //boxing
+ for (int j = 0; j < iArray.Length; j++)
+ {
+ args[j] = iArray[j];
+ }
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = string.Format(format, args);
+
+ actualValue = (0 == string.CompareOrdinal(str, "{0}"));
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("015" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("016" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Negative test scenarios
+
+ //ArgumentNullException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: format is a null reference ";
+ string errorDesc;
+
+ string format;
+ Object[] args;
+
+ format = null;
+ args = new object[TestLibrary.Generator.GetInt32(-55) % c_MIN_STRING_LEN]; //boxing
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string.Format(format, args);
+ errorDesc = "ArgumentNullException is not thrown as expected";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("017" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("018" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //FormatException
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: The format item in format is invalid ";
+ string errorDesc;
+
+ string format;
+ Object[] args;
+
+ char ch = TestLibrary.Generator.GetChar(-55);
+ format = "The object {" + ch.ToString() + "}";
+ args = new object[TestLibrary.Generator.GetInt32(-55) % c_MIN_STRING_LEN]; //boxing
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string.Format(format, args);
+ errorDesc = "FormatException is not thrown as expected";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("019" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("020" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: The index is greater than number of formatted objects ";
+ string errorDesc;
+
+ string format;
+ Object[] args;
+
+ args = new object[TestLibrary.Generator.GetInt32(-55) % c_MIN_STRING_LEN]; //boxing
+ int i = TestLibrary.Generator.GetInt32(-55) % c_MAX_STRING_LEN + 1 + args.Length;
+ format = "The object {" + i.ToString() + "}";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string.Format(format, args);
+ errorDesc = "FormatException is not thrown as expected";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("021" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("022" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N004";
+ const string c_TEST_DESC = "NegTest4: The index is negative ";
+ string errorDesc;
+
+ string format;
+ Object[] args;
+
+ int i = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+ format = "The object {" + i.ToString() + "}";
+ args = new object[TestLibrary.Generator.GetInt32(-55) % c_MAX_STRING_LEN]; //boxing
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string.Format(format, args);
+ errorDesc = "FormatException is not thrown as expected";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("023" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("024" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //ArgumentNullException
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N005";
+ const string c_TEST_DESC = "NegTest5: The formatted object array is negative ";
+ string errorDesc;
+
+ string format;
+ Object[] args;
+
+ int i = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+ format = "The object {" + i.ToString() + "}";
+ args = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string.Format(format, args);
+ errorDesc = "ArgumentNullException is not thrown as expected";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("023" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("024" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringgetenumerator.cs b/tests/src/CoreMangLib/cti/system/string/stringgetenumerator.cs
new file mode 100644
index 0000000000..35551adaa5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringgetenumerator.cs
@@ -0,0 +1,217 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+/// <summary>
+/// String.GetEnumerator()
+/// Retrieves an object that can iterate through the individual characters in this string.
+/// </summary>
+class StringGetEnumerator
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ public static int Main()
+ {
+ StringGetEnumerator iege = new StringGetEnumerator();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: String.GetEnumerator()");
+ if (iege.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarioes
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Random string";
+ const string c_TEST_ID = "P001";
+
+ string strSrc;
+ IEnumerator<Char> iterator;
+ bool condition = false;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ iterator = ((IEnumerable<Char>)strSrc).GetEnumerator();
+
+ condition = true;
+ int index = 0;
+ while (iterator.MoveNext())
+ {
+ condition = object.Equals(iterator.Current, strSrc[index]) && condition;
+ index++;
+ }
+ iterator.Reset();
+
+ actualValue = condition && (null != iterator);
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: string.Empty ";
+ const string c_TEST_ID = "P002";
+
+ string strSrc;
+ IEnumerator<Char> iterator;
+ bool condition = false;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = string.Empty;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ iterator = ((IEnumerable<Char>)strSrc).GetEnumerator();
+
+ condition = true;
+ int index = 0;
+ while (iterator.MoveNext())
+ {
+ condition = object.Equals(iterator.Current, strSrc[index]) && condition;
+ index++;
+ }
+ iterator.Reset();
+
+ actualValue = condition && (null != iterator);
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = @"PosTest3: string is \0 ";
+ const string c_TEST_ID = "P003";
+
+ string strSrc;
+ IEnumerator<Char> iterator;
+ bool condition = false;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = "\0";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ iterator = ((IEnumerable<Char>)strSrc).GetEnumerator();
+
+ condition = true;
+ int index = 0;
+ while (iterator.MoveNext())
+ {
+ condition = object.Equals(iterator.Current, strSrc[index]) && condition;
+ index++;
+ }
+ iterator.Reset();
+
+ actualValue = condition && (null != iterator);
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion // end for positive test scenarioes
+
+ private string GetDataString(string strSrc)
+ {
+ string str1, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+
+ return str;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringgethashcode.cs b/tests/src/CoreMangLib/cti/system/string/stringgethashcode.cs
new file mode 100644
index 0000000000..a55a4138c9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringgethashcode.cs
@@ -0,0 +1,308 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// String.GetHashCode()
+/// Returns the hash code for this string.
+/// </summary>
+class StringGetHashCode
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ private const string c_POS_TEST_PREFIX = "PosTest";
+ private const string c_NEG_TEST_PREFIX = "NegTest";
+
+ private const string c_GREEK_SIGMA_STR_A = "\x03C2\x03C3\x03A3\x03C2\x03C3";
+ private const string c_GREEK_SIGMA_STR_B = "\x03A3\x03A3\x03A3\x03C3\x03C2";
+
+ private int totalTestCount;
+ private int posTestCount;
+ private int negTestCount;
+ private int passedTestCount;
+ private int failedTestCount;
+
+ private enum TestType { PositiveTest = 1, NegativeTest = 2 };
+ private enum TestResult { NotRun = 0, PassedTest = 1, FailedTest = 2 };
+ internal struct Parameters
+ {
+ public string strSrc;
+
+ public string DataString
+ {
+ get
+ {
+ string str, strA;
+ int lenA;
+
+ if (null == strSrc)
+ {
+ strA = "null";
+ lenA = 0;
+ }
+ else
+ {
+ strA = strSrc;
+ lenA = strSrc.Length;
+ }
+
+ str = string.Format("\n[String value]\nSource: \"{0}\"\n[String length]\n {1}", strA, lenA);
+
+ return str;
+ }
+ }
+ }
+
+ //Default constructor to ininitial all kind of test counts
+ public StringGetHashCode()
+ {
+ totalTestCount = posTestCount = negTestCount = 0;
+ passedTestCount = failedTestCount = 0;
+ }
+
+ #region Methods for all test scenarioes
+
+ //Update (postive or negative) and total test count at the beginning of test scenario
+ private void UpdateCounts(TestType testType)
+ {
+ if (TestType.PositiveTest == testType)
+ {
+ posTestCount++;
+ totalTestCount++;
+ return;
+ }
+
+ if (TestType.NegativeTest == testType)
+ {
+ negTestCount++;
+ totalTestCount++;
+ return;
+ }
+ }
+
+ //Update failed or passed test counts at the end of test scenario
+ private void UpdateCounts(TestResult testResult)
+ {
+ if (TestResult.PassedTest == testResult)
+ {
+ passedTestCount++;
+ return;
+ }
+
+ if (TestResult.FailedTest == testResult)
+ {
+ failedTestCount++;
+ return;
+ }
+ }
+
+ //Generate standard error number string
+ //i.e "9", "12" is not proper. Instead they should be "009", "012"
+ private string GenerateErrorNum(int errorNum)
+ {
+ string temp = errorNum.ToString();
+ string errorNumStr = new string('0', 3 - temp.Length) + temp;
+ return errorNumStr;
+ }
+
+ //Generate testId string
+ //i.e "P9", "N12" is not proper. Instead they should be "P009", "N012"
+ private string GenerateTestId(TestType testType)
+ {
+ string temp, testId;
+
+ if (testType == TestType.PositiveTest)
+ {
+ temp = this.posTestCount.ToString();
+ testId = "P" + new string('0', 3 - temp.Length) + temp;
+ }
+ else
+ {
+ temp = this.negTestCount.ToString();
+ testId = "N" + new string('0', 3 - temp.Length) + temp;
+ }
+
+ return testId;
+ }
+
+ #endregion
+
+ public static int Main()
+ {
+ StringGetHashCode sge = new StringGetHashCode();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: System.String.GetHashCode()");
+ if (sge.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarioes
+
+ #region Normal tests
+
+ public bool PosTest1()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "Random string";
+
+ paras.strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ return ExecutePosTest(paras, c_TEST_DESC);
+ }
+
+ #endregion
+
+ #region String.Empty, "\0" and null
+
+ public bool PosTest2()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "String.Empty";
+
+ paras.strSrc = String.Empty;
+
+ return ExecutePosTest(paras, c_TEST_DESC);
+ }
+
+ public bool PosTest3()
+ {
+ Parameters paras;
+
+ const string c_TEST_DESC = "\"\0\"";
+
+ paras.strSrc = "\0";
+
+ return ExecutePosTest(paras, c_TEST_DESC);
+ }
+
+ #endregion
+
+ #endregion // end for positive test scenarioes
+
+ #region Helper methods for positive test scenarioes
+
+ private bool ExecutePosTest(Parameters paras, string testDesc)
+ {
+ bool retVal = true;
+ UpdateCounts(TestType.PositiveTest);
+ string testId = GenerateTestId(TestType.PositiveTest);
+ TestResult testResult = TestResult.NotRun;
+
+ string testInfo = c_POS_TEST_PREFIX + this.posTestCount.ToString() + ": " + testDesc;
+ object actualValue = null;
+
+ TestLibrary.TestFramework.BeginScenario(testInfo);
+ try
+ {
+ actualValue = this.CallTestMethod(paras);
+ if (null == actualValue)
+ {
+ string errorDesc = "Enumerator is not retrieved as expected, actually it is null";
+ errorDesc += paras.DataString + "\nTest scenario Id: " + testId;
+ TestLibrary.TestFramework.LogError(GenerateErrorNum(totalTestCount << 1 - 1) + " TestId -" + testId, errorDesc);
+ testResult = TestResult.FailedTest;
+ retVal = false;
+ }
+
+ testResult = TestResult.PassedTest;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(GenerateErrorNum(totalTestCount << 1) + " TestId -" + testId, "Unexpected exception: " + e + paras.DataString);
+ testResult = TestResult.FailedTest;
+ retVal = false;
+ }
+
+ UpdateCounts(testResult);
+ return retVal;
+ }
+
+ #endregion
+
+ //Involke the test method
+ private int CallTestMethod(Parameters paras)
+ {
+ return paras.strSrc.GetHashCode();
+ }
+
+ #region helper methods for generating test data
+
+ private bool GetBoolean()
+ {
+ Int32 i = this.GetInt32(1, 2);
+ return (i == 1) ? true : false;
+ }
+
+ //Get a non-negative integer between minValue and maxValue
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ private Int32 Min(Int32 i1, Int32 i2)
+ {
+ return (i1 <= i2) ? i1 : i2;
+ }
+
+ private Int32 Max(Int32 i1, Int32 i2)
+ {
+ return (i1 >= i2) ? i1 : i2;
+ }
+
+ private char GetUpperChar()
+ {
+ Char c;
+ // Grab an ASCII letter
+ c = Convert.ToChar(TestLibrary.Generator.GetInt16(-55) % 26 + 'A');
+ return c;
+ }
+
+ #endregion
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringiconvertibletoboolean.cs b/tests/src/CoreMangLib/cti/system/string/stringiconvertibletoboolean.cs
new file mode 100644
index 0000000000..9d49ddb460
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringiconvertibletoboolean.cs
@@ -0,0 +1,266 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// String.System.IConvertible.ToBoolean(IFormatProvider provider)
+/// This method supports the .NET Framework infrastructure and is not
+/// intended to be used directly from your code.
+/// Converts the value of the current String object to a Boolean value.
+/// </summary>
+class IConvertibleToBoolean
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ public static int Main()
+ {
+ IConvertibleToBoolean iege = new IConvertibleToBoolean();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: String.System.IConvertible.ToBoolean(IFormatProvider)");
+ if (iege.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarioes
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: False string";
+ const string c_TEST_ID = "P001";
+
+ string strSrc;
+ IFormatProvider provider;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = "false";
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (false == ((IConvertible)strSrc).ToBoolean(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: True string";
+ const string c_TEST_ID = "P002";
+
+ string strSrc;
+ IFormatProvider provider;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = "true";
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (true == ((IConvertible)strSrc).ToBoolean(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //new update 8-14-2006 Noter(v-yaduoj)
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest3: Trailing and leading white space";
+ const string c_TEST_ID = "P003";
+
+ string strSrc;
+ IFormatProvider provider;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = " \n\r\ttrue \n\r\t ";
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (true == ((IConvertible)strSrc).ToBoolean(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //new update 8-14-2006 Noter(v-yaduoj)
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest4: Case insensitive";
+ const string c_TEST_ID = "P004";
+
+ string strSrc;
+ IFormatProvider provider;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = " TRue ";
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (true == ((IConvertible)strSrc).ToBoolean(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion // end for positive test scenarioes
+
+ #region Negative test scenarios
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: The value of String is not TrueString or FalseString.";
+ const string c_TEST_ID = "N001";
+
+ string strSrc;
+ IFormatProvider provider;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToBoolean(provider);
+ TestLibrary.TestFramework.LogError("005" + "TestId-" + c_TEST_ID, "FormatException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ private string GetDataString(string strSrc, IFormatProvider provider)
+ {
+ string str1, str2, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str2 = (null == provider) ? "null" : provider.ToString();
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+ str += string.Format("\n[Format provider string]\n {0}", str2);
+
+ return str;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringiconvertibletobyte.cs b/tests/src/CoreMangLib/cti/system/string/stringiconvertibletobyte.cs
new file mode 100644
index 0000000000..1048697caa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringiconvertibletobyte.cs
@@ -0,0 +1,340 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// String.System.IConvertible.ToByte(IFormatProvider provider)
+/// This method supports the .NET Framework infrastructure and is
+/// not intended to be used directly from your code.
+/// Converts the value of the current String object to an 8-bit unsigned integer.
+/// </summary>
+class IConvertibleToByte
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ public static int Main()
+ {
+ IConvertibleToByte iege = new IConvertibleToByte();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: String.System.IConvertible.ToByte(IFormatProvider)");
+ if (iege.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarioes
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Random numeric string";
+ const string c_TEST_ID = "P001";
+
+ string strSrc;
+ IFormatProvider provider;
+ byte b;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ b = TestLibrary.Generator.GetByte(-55);
+ strSrc = b.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (b == ((IConvertible)strSrc).ToByte(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Positive sign";
+ const string c_TEST_ID = "P002";
+
+ string strSrc;
+ IFormatProvider provider;
+ NumberFormatInfo ni = new NumberFormatInfo();
+ byte b;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ b = TestLibrary.Generator.GetByte(-55);
+ ni.PositiveSign = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ strSrc = ni.PositiveSign + b.ToString();
+ provider = (IFormatProvider)ni;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (b == ((IConvertible)strSrc).ToByte(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest3: string is Byte.MaxValue";
+ const string c_TEST_ID = "P003";
+
+ string strSrc;
+ IFormatProvider provider;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = byte.MaxValue.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (byte.MaxValue == ((IConvertible)strSrc).ToByte(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest4: string is Byte.MinValue";
+ const string c_TEST_ID = "P004";
+
+ string strSrc;
+ IFormatProvider provider;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = byte.MinValue.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (byte.MinValue == ((IConvertible)strSrc).ToByte(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion // end for positive test scenarioes
+
+ #region Negative test scenarios
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: The value of String object cannot be parsed";
+ const string c_TEST_ID = "N001";
+
+ string strSrc;
+ IFormatProvider provider;
+
+ strSrc = "p" + TestLibrary.Generator.GetString(-55, false, 9, c_MAX_STRING_LEN);
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToByte(provider);
+ TestLibrary.TestFramework.LogError("009" + "TestId-" + c_TEST_ID, "FormatException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: The value of String object is a number greater than MaxValue";
+ const string c_TEST_ID = "N002";
+
+ string strSrc;
+ IFormatProvider provider;
+ int i;
+
+ i = byte.MaxValue + 1 + TestLibrary.Generator.GetByte(-55);
+ strSrc = i.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToByte(provider);
+ TestLibrary.TestFramework.LogError("011" + "TestId-" + c_TEST_ID, "OverflowException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest3: The value of String object is a number less than MinValue";
+ const string c_TEST_ID = "N003";
+
+ string strSrc;
+ IFormatProvider provider;
+ int i;
+
+ // new update 8-14-2006 Noter(v-yaduoj)
+ i = -1*TestLibrary.Generator.GetByte(-55) - 1;
+ strSrc = i.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToByte(provider);
+ TestLibrary.TestFramework.LogError("013" + "TestId-" + c_TEST_ID, "OverflowException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ private string GetDataString(string strSrc, IFormatProvider provider)
+ {
+ string str1, str2, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str2 = (null == provider) ? "null" : provider.ToString();
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+ str += string.Format("\n[Format provider string]\n {0}", str2);
+
+ return str;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringiconvertibletochar.cs b/tests/src/CoreMangLib/cti/system/string/stringiconvertibletochar.cs
new file mode 100644
index 0000000000..2fabde8951
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringiconvertibletochar.cs
@@ -0,0 +1,188 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// String.System.IConvertible.ToChar()
+/// This method supports the .NET Framework infrastructure and is not intended
+/// to be used directly from your code.
+/// Converts a non-empty string of length one to a Char object.
+/// </summary>
+class IConvertibleToChar
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ public static int Main()
+ {
+ IConvertibleToChar iege = new IConvertibleToChar();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: String.System.IConvertible.ToChar(IFormatProvider)");
+ if (iege.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ //retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarioes
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Random single char string";
+ const string c_TEST_ID = "P001";
+
+ string strSrc;
+ IFormatProvider provider;
+ char ch;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ ch = TestLibrary.Generator.GetChar(-55);
+ strSrc = ch.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (ch == ((IConvertible)strSrc).ToChar(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion // end for positive test scenarioes
+
+ #region Negative test scenarios
+
+ //FormatException
+ public bool NegTest1() //bug
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: The length of String object is greater than 1.";
+ const string c_TEST_ID = "N001";
+
+ string strSrc;
+ IFormatProvider provider;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, 2, c_MAX_STRING_LEN);
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToChar(provider);
+ TestLibrary.TestFramework.LogError("009" + "TestId-" + c_TEST_ID, "FormatException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //FormatException
+ public bool NegTest2() //bug
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: The String object is string.Empty";
+ const string c_TEST_ID = "N002";
+
+ string strSrc;
+ IFormatProvider provider;
+
+ strSrc = string.Empty;
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToChar(provider);
+ TestLibrary.TestFramework.LogError("009" + "TestId-" + c_TEST_ID, "FormatException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ private string GetDataString(string strSrc, IFormatProvider provider)
+ {
+ string str1, str2, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str2 = (null == provider) ? "null" : provider.ToString();
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+ str += string.Format("\n[Format provider string]\n {0}", str2);
+
+ return str;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringiconvertibletoint16.cs b/tests/src/CoreMangLib/cti/system/string/stringiconvertibletoint16.cs
new file mode 100644
index 0000000000..8bcf888f8f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringiconvertibletoint16.cs
@@ -0,0 +1,384 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// String.System.IConvertible.ToInt16(IFormatProvider provider)
+/// This method supports the .NET Framework infrastructure and is
+/// not intended to be used directly from your code.
+/// Converts the value of the current String object to a 16-bit signed integer.
+/// </summary>
+class IConvertibleToInt16
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ public static int Main()
+ {
+ IConvertibleToInt16 iege = new IConvertibleToInt16();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: String.System.IConvertible.ToInt16(IFormatProvider)");
+ if (iege.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarioes
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Random numeric string";
+ const string c_TEST_ID = "P001";
+
+ string strSrc;
+ IFormatProvider provider;
+ Int16 i;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ i = TestLibrary.Generator.GetInt16(-55);
+ strSrc = i.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (i == ((IConvertible)strSrc).ToInt16(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Positive sign";
+ const string c_TEST_ID = "P002";
+
+ string strSrc;
+ IFormatProvider provider;
+ NumberFormatInfo ni = new NumberFormatInfo();
+ Int16 i;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ i = TestLibrary.Generator.GetInt16(-55);
+ ni.PositiveSign = TestLibrary.Generator.GetString(-55, false,false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ strSrc = ni.PositiveSign + i.ToString();
+ provider = (IFormatProvider)ni;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (i == ((IConvertible)strSrc).ToInt16(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest3: string is Int16.MaxValue";
+ const string c_TEST_ID = "P003";
+
+ string strSrc;
+ IFormatProvider provider;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = Int16.MaxValue.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (Int16.MaxValue == ((IConvertible)strSrc).ToInt16(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest4: string is Int16.MinValue";
+ const string c_TEST_ID = "P004";
+
+ string strSrc;
+ IFormatProvider provider;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = Int16.MinValue.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (Int16.MinValue == ((IConvertible)strSrc).ToInt16(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5() // new update 8-14-2006 Noter(v-yaduoj)
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest5: Negative sign";
+ const string c_TEST_ID = "P005";
+
+ string strSrc;
+ IFormatProvider provider;
+ NumberFormatInfo ni = new NumberFormatInfo();
+ Int16 i;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ i = TestLibrary.Generator.GetInt16(-55);
+ ni.NegativeSign = TestLibrary.Generator.GetString(-55, false,false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ strSrc = ni.NegativeSign + i.ToString();
+ provider = (IFormatProvider)ni;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = ((-1*i) == ((IConvertible)strSrc).ToInt16(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion // end for positive test scenarioes
+
+ #region Negative test scenarios
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: The value of String object cannot be parsed";
+ const string c_TEST_ID = "N001";
+
+ string strSrc;
+ IFormatProvider provider;
+
+ strSrc = "p" + TestLibrary.Generator.GetString(-55, false, 9, c_MAX_STRING_LEN);
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToInt16(provider);
+ TestLibrary.TestFramework.LogError("009" + "TestId-" + c_TEST_ID, "FormatException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: The value of String object is a number greater than MaxValue";
+ const string c_TEST_ID = "N002";
+
+ string strSrc;
+ IFormatProvider provider;
+ int i;
+
+ // new update 8-14-2006 Noter(v-yaduoj)
+ i = TestLibrary.Generator.GetInt16(-55) + Int16.MaxValue + 1;
+ strSrc = i.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ // new update 8-14-2006 Noter(v-yaduoj)
+ ((IConvertible)strSrc).ToInt16(provider);
+ TestLibrary.TestFramework.LogError("011" + "TestId-" + c_TEST_ID, "OverflowException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest3: The value of String object is a number less than MinValue";
+ const string c_TEST_ID = "N003";
+
+ string strSrc;
+ IFormatProvider provider;
+ int i;
+
+ // new update 8-14-2006 Noter(v-yaduoj)
+ i = -1 * (TestLibrary.Generator.GetInt32(-55) % Int16.MaxValue) - Int16.MaxValue - 1;
+ strSrc = i.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToInt16(provider);
+ TestLibrary.TestFramework.LogError("013" + "TestId-" + c_TEST_ID, "OverflowException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ private string GetDataString(string strSrc, IFormatProvider provider)
+ {
+ string str1, str2, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str2 = (null == provider) ? "null" : provider.ToString();
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+ str += string.Format("\n[Format provider string]\n {0}", str2);
+
+ return str;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringiconvertibletoint32.cs b/tests/src/CoreMangLib/cti/system/string/stringiconvertibletoint32.cs
new file mode 100644
index 0000000000..6bd6ea8b60
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringiconvertibletoint32.cs
@@ -0,0 +1,385 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// String.System.IConvertible.ToInt32(IFormatProvider provider)
+/// This method supports the .NET Framework infrastructure and is
+/// not intended to be used directly from your code.
+/// Converts the value of the current String object to a 32-bit signed integer.
+/// </summary>
+class IConvertibleToInt32
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ public static int Main()
+ {
+ IConvertibleToInt32 iege = new IConvertibleToInt32();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: String.System.IConvertible.ToInt32(IFormatProvider)");
+ if (iege.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarioes
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Random numeric string";
+ const string c_TEST_ID = "P001";
+
+ string strSrc;
+ IFormatProvider provider;
+ Int32 i;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ i = TestLibrary.Generator.GetInt32(-55);
+ strSrc = i.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (i == ((IConvertible)strSrc).ToInt32(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Positive sign";
+ const string c_TEST_ID = "P002";
+
+ string strSrc;
+ IFormatProvider provider;
+ NumberFormatInfo ni = new NumberFormatInfo();
+ Int32 i;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ i = TestLibrary.Generator.GetInt32(-55);
+ // positive signs cannot have emdedded nulls
+ ni.PositiveSign = TestLibrary.Generator.GetString(-55, false, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN).Replace((char)0, 'a');
+ strSrc = ni.PositiveSign + i.ToString();
+ provider = (IFormatProvider)ni;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (i == ((IConvertible)strSrc).ToInt32(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest3: string is Int32.MaxValue";
+ const string c_TEST_ID = "P003";
+
+ string strSrc;
+ IFormatProvider provider;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = Int32.MaxValue.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (Int32.MaxValue == ((IConvertible)strSrc).ToInt32(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest4: string is Int32.MinValue";
+ const string c_TEST_ID = "P004";
+
+ string strSrc;
+ IFormatProvider provider;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = Int32.MinValue.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (Int32.MinValue == ((IConvertible)strSrc).ToInt32(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5() // new update 8-14-2006 Noter(v-yaduoj)
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest5: Negative sign";
+ const string c_TEST_ID = "P005";
+
+ string strSrc;
+ IFormatProvider provider;
+ NumberFormatInfo ni = new NumberFormatInfo();
+ Int32 i;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ i = TestLibrary.Generator.GetInt32(-55);
+ ni.NegativeSign = TestLibrary.Generator.GetString(-55, false, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ strSrc = ni.NegativeSign + i.ToString();
+ provider = (IFormatProvider)ni;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = ((-1*i) == ((IConvertible)strSrc).ToInt32(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion // end for positive test scenarioes
+
+ #region Negative test scenarios
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: The value of String object cannot be parsed";
+ const string c_TEST_ID = "N001";
+
+ string strSrc;
+ IFormatProvider provider;
+
+ strSrc = "p" + TestLibrary.Generator.GetString(-55, false, 9, c_MAX_STRING_LEN);
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToInt32(provider);
+ TestLibrary.TestFramework.LogError("009" + "TestId-" + c_TEST_ID, "FormatException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: The value of String object is a number greater than MaxValue";
+ const string c_TEST_ID = "N002";
+
+ string strSrc;
+ IFormatProvider provider;
+ Int64 i;
+
+ // new update 8-14-2006 Noter(v-yaduoj)
+ i = TestLibrary.Generator.GetInt64(-55) % Int32.MaxValue + Int32.MaxValue + 1;
+ strSrc = i.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ // new update 8-14-2006 Noter(v-yaduoj)
+ ((IConvertible)strSrc).ToInt32(provider);
+ TestLibrary.TestFramework.LogError("011" + "TestId-" + c_TEST_ID, "OverflowException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest3: The value of String object is a number less than MinValue";
+ const string c_TEST_ID = "N003";
+
+ string strSrc;
+ IFormatProvider provider;
+ Int64 i;
+
+ // new update 8-14-2006 Noter(v-yaduoj)
+ i = -1 * (TestLibrary.Generator.GetInt64(-55) % Int32.MaxValue) - Int32.MaxValue - 1;
+ strSrc = i.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToInt32(provider);
+ TestLibrary.TestFramework.LogError("013" + "TestId-" + c_TEST_ID, "OverflowException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ private string GetDataString(string strSrc, IFormatProvider provider)
+ {
+ string str1, str2, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str2 = (null == provider) ? "null" : provider.ToString();
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+ str += string.Format("\n[Format provider string]\n {0}", str2);
+
+ return str;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringiconvertibletoint64.cs b/tests/src/CoreMangLib/cti/system/string/stringiconvertibletoint64.cs
new file mode 100644
index 0000000000..1b6cea1185
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringiconvertibletoint64.cs
@@ -0,0 +1,385 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// String.System.IConvertible.ToInt64(IFormatProvider provider)
+/// This method supports the .NET Framework infrastructure and is
+/// not intended to be used directly from your code.
+/// Converts the value of the current String object to a 32-bit signed integer.
+/// </summary>
+class IConvertibleToInt64
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ public static int Main()
+ {
+ IConvertibleToInt64 iege = new IConvertibleToInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: String.System.IConvertible.ToInt64(IFormatProvider)");
+ if (iege.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarioes
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Random numeric string";
+ const string c_TEST_ID = "P001";
+
+ string strSrc;
+ IFormatProvider provider;
+ Int64 i;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ i = TestLibrary.Generator.GetInt64(-55);
+ strSrc = i.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (i == ((IConvertible)strSrc).ToInt64(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Positive sign";
+ const string c_TEST_ID = "P002";
+
+ string strSrc;
+ IFormatProvider provider;
+ NumberFormatInfo ni = new NumberFormatInfo();
+ Int64 i;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ i = TestLibrary.Generator.GetInt64(-55);
+ ni.PositiveSign = TestLibrary.Generator.GetString(-55, false,false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ strSrc = ni.PositiveSign + i.ToString();
+ provider = (IFormatProvider)ni;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (i == ((IConvertible)strSrc).ToInt64(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest3: string is Int64.MaxValue";
+ const string c_TEST_ID = "P003";
+
+ string strSrc;
+ IFormatProvider provider;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = Int64.MaxValue.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (Int64.MaxValue == ((IConvertible)strSrc).ToInt64(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest4: string is Int32.MinValue";
+ const string c_TEST_ID = "P004";
+
+ string strSrc;
+ IFormatProvider provider;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = Int64.MinValue.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (Int64.MinValue == ((IConvertible)strSrc).ToInt64(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest5: Positive sign";
+ const string c_TEST_ID = "P005";
+
+ string strSrc;
+ IFormatProvider provider;
+ NumberFormatInfo ni = new NumberFormatInfo();
+ Int64 i;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ i = TestLibrary.Generator.GetInt64(-55);
+ ni.NegativeSign = TestLibrary.Generator.GetString(-55, false,false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ strSrc = ni.NegativeSign + i.ToString();
+ provider = (IFormatProvider)ni;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = ((-1 * i) == ((IConvertible)strSrc).ToInt64(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion // end for positive test scenarioes
+
+ #region Negative test scenarios
+
+ //FormatException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: The value of String object cannot be parsed";
+ const string c_TEST_ID = "N001";
+
+ string strSrc;
+ IFormatProvider provider;
+
+ strSrc = "p" + TestLibrary.Generator.GetString(-55, false, 9, c_MAX_STRING_LEN);
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToInt64(provider);
+ TestLibrary.TestFramework.LogError("011" + "TestId-" + c_TEST_ID, "FormatException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2() //bug
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: The value of String object is a number greater than MaxValue";
+ const string c_TEST_ID = "N002";
+
+ string strSrc;
+ IFormatProvider provider;
+ Int64 i;
+
+ i = TestLibrary.Generator.GetInt64(-55);
+
+ strSrc = Int64.MaxValue.ToString() + i.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToInt64(provider);
+ TestLibrary.TestFramework.LogError("013" + "TestId-" + c_TEST_ID, "OverflowException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3() //bug
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest3: The value of String object is a number less than MinValue";
+ const string c_TEST_ID = "N003";
+
+ string strSrc;
+ NumberFormatInfo ni = new NumberFormatInfo();
+ IFormatProvider provider;
+ Int64 i;
+
+ i = TestLibrary.Generator.GetInt64(-55);
+ strSrc = ni.NegativeSign + Int64.MaxValue + i.ToString();
+ provider = (IFormatProvider)ni;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToInt64(provider);
+ TestLibrary.TestFramework.LogError("015" + "TestId-" + c_TEST_ID, "OverflowException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ private string GetDataString(string strSrc, IFormatProvider provider)
+ {
+ string str1, str2, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str2 = (null == provider) ? "null" : provider.ToString();
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+ str += string.Format("\n[Format provider string]\n {0}", str2);
+
+ return str;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringiconvertibletosbyte.cs b/tests/src/CoreMangLib/cti/system/string/stringiconvertibletosbyte.cs
new file mode 100644
index 0000000000..c11e262746
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringiconvertibletosbyte.cs
@@ -0,0 +1,383 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// String.System.IConvertible.ToSByte(IFormatProvider provider)
+/// This method supports the .NET Framework infrastructure and is
+/// not intended to be used directly from your code.
+/// Converts the value of the current String object to an 8-bit signed integer.
+/// </summary>
+class IConvertibleToSByte
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ public static int Main()
+ {
+ IConvertibleToSByte iege = new IConvertibleToSByte();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: String.System.IConvertible.ToSByte(IFormatProvider)");
+ if (iege.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarioes
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Random positive numeric string";
+ const string c_TEST_ID = "P001";
+
+ string strSrc;
+ IFormatProvider provider;
+ sbyte b;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ b = (sbyte)(TestLibrary.Generator.GetByte(-55) % (sbyte.MaxValue + 1));
+ strSrc = b.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (b == ((IConvertible)strSrc).ToSByte(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Positive sign";
+ const string c_TEST_ID = "P002";
+
+ string strSrc;
+ IFormatProvider provider;
+ NumberFormatInfo ni = new NumberFormatInfo();
+ sbyte b;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ b = (sbyte)(TestLibrary.Generator.GetByte(-55) % (sbyte.MaxValue + 1));
+ ni.PositiveSign = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ //ni.PositiveSign = "**";
+ strSrc = ni.PositiveSign + b.ToString();
+ provider = (IFormatProvider)ni;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (b == ((IConvertible)strSrc).ToSByte(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest3: string is SByte.MaxValue";
+ const string c_TEST_ID = "P003";
+
+ string strSrc;
+ IFormatProvider provider;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = sbyte.MaxValue.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (sbyte.MaxValue == ((IConvertible)strSrc).ToSByte(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest4: string is sByte.MinValue";
+ const string c_TEST_ID = "P004";
+
+ string strSrc;
+ IFormatProvider provider;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = sbyte.MinValue.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (sbyte.MinValue == ((IConvertible)strSrc).ToSByte(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest5: Negative sign";
+ const string c_TEST_ID = "P005";
+
+ string strSrc;
+ IFormatProvider provider;
+ NumberFormatInfo ni = new NumberFormatInfo();
+ sbyte b;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ b = (sbyte)(TestLibrary.Generator.GetByte(-55) % (sbyte.MaxValue + 1));
+ ni.NegativeSign = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ strSrc = ni.NegativeSign + b.ToString();
+ provider = (IFormatProvider)ni;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = ((-1 * b) == ((IConvertible)strSrc).ToSByte(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion // end for positive test scenarioes
+
+ #region Negative test scenarios
+
+ //FormatException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: The value of String object cannot be parsed";
+ const string c_TEST_ID = "N001";
+
+ string strSrc;
+ IFormatProvider provider;
+
+ strSrc = "p" + TestLibrary.Generator.GetString(-55, false, 9, c_MAX_STRING_LEN);
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToSByte(provider);
+ TestLibrary.TestFramework.LogError("009" + "TestId-" + c_TEST_ID, "FormatException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: The value of String object is a number greater than MaxValue";
+ const string c_TEST_ID = "N002";
+
+ string strSrc;
+ IFormatProvider provider;
+ int i;
+
+ i = sbyte.MaxValue + 1 + TestLibrary.Generator.GetByte(-55);
+ strSrc = i.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToSByte(provider);
+ TestLibrary.TestFramework.LogError("011" + "TestId-" + c_TEST_ID, "OverflowException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest3: The value of String object is a number less than MinValue";
+ const string c_TEST_ID = "N003";
+
+ string strSrc;
+ IFormatProvider provider;
+ int i;
+
+ i = -1*(TestLibrary.Generator.GetByte(-55) % (sbyte.MaxValue)) +sbyte.MinValue - 1;
+ strSrc = i.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToSByte(provider);
+ TestLibrary.TestFramework.LogError("013" + "TestId-" + c_TEST_ID, "OverflowException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ private string GetDataString(string strSrc, IFormatProvider provider)
+ {
+ string str1, str2, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str2 = (null == provider) ? "null" : provider.ToString();
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+ str += string.Format("\n[Format provider string]\n {0}", str2);
+
+ return str;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringiconvertibletouint16.cs b/tests/src/CoreMangLib/cti/system/string/stringiconvertibletouint16.cs
new file mode 100644
index 0000000000..0b8ebbb216
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringiconvertibletouint16.cs
@@ -0,0 +1,339 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// String.System.IConvertible.ToUInt16(IFormatProvider provider)
+/// This method supports the .NET Framework infrastructure and is
+/// not intended to be used directly from your code.
+/// Converts the value of the current String object to a 16-bit unsigned integer.
+/// </summary>
+class IConvertibleToUInt16
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ public static int Main()
+ {
+ IConvertibleToUInt16 iege = new IConvertibleToUInt16();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: String.System.IConvertible.ToUInt16(IFormatProvider)");
+ if (iege.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarioes
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Random numeric string";
+ const string c_TEST_ID = "P001";
+
+ string strSrc;
+ IFormatProvider provider;
+ UInt16 i;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ i = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+ strSrc = i.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (i == ((IConvertible)strSrc).ToUInt16(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Positive sign";
+ const string c_TEST_ID = "P002";
+
+ string strSrc;
+ IFormatProvider provider;
+ NumberFormatInfo ni = new NumberFormatInfo();
+ UInt16 i;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ i = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+ ni.PositiveSign = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ strSrc = ni.PositiveSign + i.ToString();
+ provider = (IFormatProvider)ni;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (i == ((IConvertible)strSrc).ToUInt16(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest3: string is Int16.MaxValue";
+ const string c_TEST_ID = "P003";
+
+ string strSrc;
+ IFormatProvider provider;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = UInt16.MaxValue.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (UInt16.MaxValue == ((IConvertible)strSrc).ToUInt16(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest4: string is Int16.MinValue";
+ const string c_TEST_ID = "P004";
+
+ string strSrc;
+ IFormatProvider provider;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = UInt16.MinValue.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (UInt16.MinValue == ((IConvertible)strSrc).ToUInt16(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion // end for positive test scenarioes
+
+ #region Negative test scenarios
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: The value of String object cannot be parsed";
+ const string c_TEST_ID = "N001";
+
+ string strSrc;
+ IFormatProvider provider;
+
+ strSrc = "p" + TestLibrary.Generator.GetString(-55, false, 9, c_MAX_STRING_LEN);
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToUInt16(provider);
+ TestLibrary.TestFramework.LogError("009" + "TestId-" + c_TEST_ID, "FormatException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: The value of String object is a number greater than MaxValue";
+ const string c_TEST_ID = "N002";
+
+ string strSrc;
+ IFormatProvider provider;
+ int i;
+
+ i = TestLibrary.Generator.GetInt16(-55) + UInt16.MaxValue + 1;
+ strSrc = i.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToUInt16(provider);
+ TestLibrary.TestFramework.LogError("011" + "TestId-" + c_TEST_ID, "OverflowException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest3: The value of String object is a number less than MinValue";
+ const string c_TEST_ID = "N003";
+
+ string strSrc;
+ IFormatProvider provider;
+ int i;
+
+ i = -1 * (TestLibrary.Generator.GetInt32(-55) % UInt16.MaxValue) + UInt16.MinValue - 1;
+ strSrc = i.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToUInt16(provider);
+ TestLibrary.TestFramework.LogError("013" + "TestId-" + c_TEST_ID, "OverflowException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ private string GetDataString(string strSrc, IFormatProvider provider)
+ {
+ string str1, str2, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str2 = (null == provider) ? "null" : provider.ToString();
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+ str += string.Format("\n[Format provider string]\n {0}", str2);
+
+ return str;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringiconvertibletouint32.cs b/tests/src/CoreMangLib/cti/system/string/stringiconvertibletouint32.cs
new file mode 100644
index 0000000000..3a84771bc0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringiconvertibletouint32.cs
@@ -0,0 +1,339 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// String.System.IConvertible.ToUInt32(IFormatProvider provider)
+/// This method supports the .NET Framework infrastructure and is
+/// not intended to be used directly from your code.
+/// Converts the value of the current String object to a 32-bit unsigned integer.
+/// </summary>
+class IConvertibleToUInt32
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ public static int Main()
+ {
+ IConvertibleToUInt32 iege = new IConvertibleToUInt32();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: String.System.IConvertible.ToUInt32(IFormatProvider)");
+ if (iege.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarioes
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Random numeric string";
+ const string c_TEST_ID = "P001";
+
+ string strSrc;
+ IFormatProvider provider;
+ UInt32 i;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ i = (UInt32)(TestLibrary.Generator.GetInt64(-55) % (UInt32.MaxValue));
+ strSrc = i.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (i == ((IConvertible)strSrc).ToUInt32(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Positive sign";
+ const string c_TEST_ID = "P002";
+
+ string strSrc;
+ IFormatProvider provider;
+ NumberFormatInfo ni = new NumberFormatInfo();
+ UInt32 i;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ i = (UInt32)(TestLibrary.Generator.GetInt64(-55) % (UInt32.MaxValue));
+ ni.PositiveSign = TestLibrary.Generator.GetString(-55, false, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ strSrc = ni.PositiveSign + i.ToString();
+ provider = (IFormatProvider)ni;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (i == ((IConvertible)strSrc).ToUInt32(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest3: string is UInt32.MaxValue";
+ const string c_TEST_ID = "P003";
+
+ string strSrc;
+ IFormatProvider provider;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = UInt32.MaxValue.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (UInt32.MaxValue == ((IConvertible)strSrc).ToUInt32(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest4: string is UInt32.MinValue";
+ const string c_TEST_ID = "P004";
+
+ string strSrc;
+ IFormatProvider provider;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = UInt32.MinValue.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (UInt32.MinValue == ((IConvertible)strSrc).ToUInt32(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion // end for positive test scenarioes
+
+ #region Negative test scenarios
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: The value of String object cannot be parsed";
+ const string c_TEST_ID = "N001";
+
+ string strSrc;
+ IFormatProvider provider;
+
+ strSrc = "p" + TestLibrary.Generator.GetString(-55, false, 9, c_MAX_STRING_LEN);
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToUInt32(provider);
+ TestLibrary.TestFramework.LogError("009" + "TestId-" + c_TEST_ID, "FormatException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: The value of String object is a number greater than MaxValue";
+ const string c_TEST_ID = "N002";
+
+ string strSrc;
+ IFormatProvider provider;
+ Int64 i;
+
+ i = TestLibrary.Generator.GetInt64(-55) % UInt32.MaxValue + UInt32.MaxValue + 1;
+ strSrc = i.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToUInt32(provider);
+ TestLibrary.TestFramework.LogError("011" + "TestId-" + c_TEST_ID, "OverflowException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest3: The value of String object is a number less than MinValue";
+ const string c_TEST_ID = "N003";
+
+ string strSrc;
+ IFormatProvider provider;
+ Int64 i;
+
+ i = -1 * (TestLibrary.Generator.GetInt64(-55) % UInt32.MaxValue) + UInt32.MinValue - 1;
+ strSrc = i.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToUInt32(provider);
+ TestLibrary.TestFramework.LogError("013" + "TestId-" + c_TEST_ID, "OverflowException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ private string GetDataString(string strSrc, IFormatProvider provider)
+ {
+ string str1, str2, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str2 = (null == provider) ? "null" : provider.ToString();
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+ str += string.Format("\n[Format provider string]\n {0}", str2);
+
+ return str;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringiconvertibletouint64.cs b/tests/src/CoreMangLib/cti/system/string/stringiconvertibletouint64.cs
new file mode 100644
index 0000000000..c86a3ccc0c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringiconvertibletouint64.cs
@@ -0,0 +1,362 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// String.System.IConvertible.ToUInt64(IFormatProvider provider)
+/// This method supports the .NET Framework infrastructure and is
+/// not intended to be used directly from your code.
+/// Converts the value of the current String object to a 64-bit unsigned integer.
+/// </summary>
+class IConvertibleToUInt64
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ public static int Main()
+ {
+ IConvertibleToUInt64 iege = new IConvertibleToUInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: String.System.IConvertible.ToUInt64(IFormatProvider)");
+ if (iege.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarioes
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Random numeric string";
+ const string c_TEST_ID = "P001";
+
+ string strSrc;
+ IFormatProvider provider;
+ UInt64 i;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ i = GetUInt64();
+ strSrc = i.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (i == ((IConvertible)strSrc).ToUInt64(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Positive sign";
+ const string c_TEST_ID = "P002";
+
+ string strSrc;
+ IFormatProvider provider;
+ NumberFormatInfo ni = new NumberFormatInfo();
+ UInt64 i;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ i = GetUInt64();
+ ni.PositiveSign = TestLibrary.Generator.GetString(-55, false, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ strSrc = ni.PositiveSign + i.ToString();
+ provider = (IFormatProvider)ni;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (i == ((IConvertible)strSrc).ToUInt64(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest3: string is Int64.MaxValue";
+ const string c_TEST_ID = "P003";
+
+ string strSrc;
+ IFormatProvider provider;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = Int64.MaxValue.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (Int64.MaxValue == ((IConvertible)strSrc).ToUInt64(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest4: string is UInt32.MinValue";
+ const string c_TEST_ID = "P004";
+
+ string strSrc;
+ IFormatProvider provider;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = UInt64.MinValue.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ actualValue = (UInt64.MinValue == ((IConvertible)strSrc).ToUInt64(provider));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, provider);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion // end for positive test scenarioes
+
+ #region Negative test scenarios
+
+ //FormatException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: The value of String object cannot be parsed";
+ const string c_TEST_ID = "N001";
+
+ string strSrc;
+ IFormatProvider provider;
+
+ strSrc = "p" + TestLibrary.Generator.GetString(-55, false, 9, c_MAX_STRING_LEN);
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToUInt64(provider);
+ TestLibrary.TestFramework.LogError("009" + "TestId-" + c_TEST_ID, "FormatException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: The value of String object is a number greater than MaxValue";
+ const string c_TEST_ID = "N002";
+
+ string strSrc;
+ IFormatProvider provider;
+ UInt64 i;
+
+ i = GetUInt64();
+
+ strSrc = UInt64.MaxValue.ToString() + i.ToString();
+ provider = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToUInt64(provider);
+ TestLibrary.TestFramework.LogError("011" + "TestId-" + c_TEST_ID, "OverflowException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest3: The value of String object is a number less than MinValue";
+ const string c_TEST_ID = "N003";
+
+ string strSrc;
+ NumberFormatInfo ni = new NumberFormatInfo();
+ IFormatProvider provider;
+ UInt64 i;
+
+ i = GetUInt64();
+ strSrc = ni.NegativeSign + UInt64.MaxValue + i.ToString();
+ provider = (IFormatProvider)ni;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ ((IConvertible)strSrc).ToUInt64(provider);
+ TestLibrary.TestFramework.LogError("013" + "TestId-" + c_TEST_ID, "OverflowException is not thrown as expected" + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strSrc, provider));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ // returns a non-negative UInt64 between 0 and UInt64.MadValue
+ public static UInt64 GetUInt64() // maybe bug
+ {
+ byte[] buffer = new byte[8];
+ UInt64 iVal;
+
+ TestLibrary.Generator.GetBytes(-55, buffer);
+
+ // convert to UInt64
+ iVal = 0;
+ for (int i = 0; i < buffer.Length; i++)
+ {
+ iVal |= ((UInt64)buffer[i] << (i * 8));
+ }
+
+ TestLibrary.TestFramework.LogInformation("Random UInt64 produced: " + iVal.ToString());
+ return iVal;
+ }
+
+ private string GetDataString(string strSrc, IFormatProvider provider)
+ {
+ string str1, str2, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str2 = (null == provider) ? "null" : provider.ToString();
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+ str += string.Format("\n[Format provider string]\n {0}", str2);
+
+ return str;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringienumerablegetenumerator.cs b/tests/src/CoreMangLib/cti/system/string/stringienumerablegetenumerator.cs
new file mode 100644
index 0000000000..923009bcd1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringienumerablegetenumerator.cs
@@ -0,0 +1,218 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// IEnumerable.GetEnumerator()
+/// Note: This method is new in the .NET Framework version 2.0.
+/// Returns an enumerator that iterates through the collection.
+/// </summary>
+class IEnumerableGetEnumerator
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ public static int Main()
+ {
+ IEnumerableGetEnumerator iege = new IEnumerableGetEnumerator();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: string implementation of Collections.IEnumerable.GetEnumerator()");
+ if (iege.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarioes
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Random string";
+ const string c_TEST_ID = "P001";
+
+ string strSrc;
+ IEnumerator iterator;
+ bool condition = false;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ iterator = ((IEnumerable)strSrc).GetEnumerator();
+
+ condition = true;
+ int index = 0;
+ while (iterator.MoveNext())
+ {
+ condition = object.Equals(iterator.Current, strSrc[index]) && condition;
+ index++;
+ }
+ iterator.Reset();
+
+ actualValue = condition && (null != iterator);
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: string.Empty ";
+ const string c_TEST_ID = "P002";
+
+ string strSrc;
+ IEnumerator iterator;
+ bool condition = false;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = string.Empty;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ iterator = ((IEnumerable)strSrc).GetEnumerator();
+
+ condition = true;
+ int index = 0;
+ while (iterator.MoveNext())
+ {
+ condition = object.Equals(iterator.Current, strSrc[index]) && condition;
+ index++;
+ }
+ iterator.Reset();
+
+ actualValue = condition && (null != iterator);
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = @"PosTest3: string is \0 ";
+ const string c_TEST_ID = "P003";
+
+ string strSrc;
+ IEnumerator iterator;
+ bool condition = false;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = "\0";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ iterator = ((IEnumerable)strSrc).GetEnumerator();
+
+ condition = true;
+ int index = 0;
+ while (iterator.MoveNext())
+ {
+ condition = object.Equals(iterator.Current, strSrc[index]) && condition;
+ index++;
+ }
+ iterator.Reset();
+
+ actualValue = condition && (null != iterator);
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion // end for positive test scenarioes
+
+ private string GetDataString(string strSrc)
+ {
+ string str1, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+
+ return str;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringindexof10.cs b/tests/src/CoreMangLib/cti/system/string/stringindexof10.cs
new file mode 100644
index 0000000000..3d037dcd65
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringindexof10.cs
@@ -0,0 +1,185 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+using System.Globalization;
+using TestLibrary;
+
+public class StringIndexOf
+{
+ public static string[] InterestingStrings = new string[] { "", "a", "1", "-", "A", "!", "abc", "aBc", "a\u0400Bc", "I", "i", "\u0130", "\u0131", "A", "\uFF21", "\uFE57"};
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Compare interesting strings ordinally");
+
+ try
+ {
+ foreach (string s in InterestingStrings)
+ {
+ foreach (string r in InterestingStrings)
+ {
+ retVal &= TestStrings(s, r);
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Compare many strings");
+
+ try
+ {
+ for (int i = 0; i < 1000; i++)
+ {
+ string str1 = Generator.GetString(-55, false, 5, 20);
+ string str2 = Generator.GetString(-55, false, 5, 20);
+ if (str1.IndexOf(str1, StringComparison.Ordinal) != 0)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Comparison not as expected! Actual result: " + str1.IndexOf(str1, StringComparison.Ordinal).ToString() + ", Expected result: 0");
+ TestLibrary.TestFramework.LogInformation("String 1: <" + str1 + "> : " + BytesFromString(str1) + "\nString 2: <" + str1 + "> : " + BytesFromString(str1));
+ retVal = false;
+ }
+ if (str2.IndexOf(str2, StringComparison.Ordinal) != 0)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Comparison not as expected! Actual result: " + str2.IndexOf(str2, StringComparison.Ordinal).ToString() + ", Expected result: 0");
+ TestLibrary.TestFramework.LogInformation("String 1: <" + str2 + "> : " + BytesFromString(str2) + "\nString 2: <" + str2 + "> : " + BytesFromString(str2));
+ retVal = false;
+ }
+ TestStrings(str1, str2);
+ TestStrings(str1 + str2, str2);
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.4", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Specific regression cases");
+
+ try
+ {
+ CultureInfo oldCi = Utilities.CurrentCulture;
+ Utilities.CurrentCulture = new CultureInfo("hu-HU");
+ retVal &= TestStrings("Foodzsdzsbar", "ddzs");
+ Utilities.CurrentCulture = oldCi;
+
+ retVal &= TestStrings("\u00C0nimal", "A\u0300");
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public static int Main()
+ {
+ StringIndexOf test = new StringIndexOf();
+
+ TestLibrary.TestFramework.BeginTestCase("StringIndexOf");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ private bool TestStrings(string str1, string str2)
+ {
+ bool retVal = true;
+
+ int expectValue = PredictValue(str1, str2);
+ int actualValue = str1.IndexOf(str2, StringComparison.Ordinal);
+
+ if (actualValue != expectValue)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Comparison not as expected! Actual result: " + actualValue + ", Expected result: " + expectValue);
+ TestLibrary.TestFramework.LogInformation("String 1: <" + str1 + "> : " + BytesFromString(str1) + "\nString 2: <" + str2 + "> : " + BytesFromString(str2));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ int PredictValue(string str1, string str2)
+ {
+ if (str1 == null)
+ {
+ if (str2 == null) return 0;
+ else return -1;
+ }
+ if (str2 == null) return -1;
+
+ if (str2.Length > str1.Length) return -1;
+
+ for (int i = 0; i <= str1.Length - str2.Length; i++)
+ {
+ bool match = true;
+ for (int j = 0; j < str2.Length; j++)
+ {
+ if ((int)str1[i + j] != (int)str2[j])
+ {
+ match = false;
+ break;
+ }
+ }
+ if (match) return i;
+ }
+ return -1;
+ }
+
+ private static string BytesFromString(string str)
+ {
+ if (str == null) return string.Empty;
+ StringBuilder output = new StringBuilder();
+ for (int i = 0; i < str.Length; i++)
+ {
+ output.Append(Utilities.ByteArrayToString(BitConverter.GetBytes(str[i])));
+ if (i != (str.Length - 1)) output.Append(", ");
+ }
+ return output.ToString();
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringinsert.cs b/tests/src/CoreMangLib/cti/system/string/stringinsert.cs
new file mode 100644
index 0000000000..6b959c000f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringinsert.cs
@@ -0,0 +1,374 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// String.Insert(Int32, String)
+/// Inserts a specified instance of String at a specified index position in this instance.
+/// </summary>
+class StringInsert
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ public static int Main()
+ {
+ StringInsert si = new StringInsert();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: System.String.Insert(Int32, string)");
+ if (si.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarios
+
+ public bool PosTest1() // new update 8-8-2006 Noter(v-yaduoj)
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Start index is 0";
+ const string c_TEST_ID = "P001";
+
+ int index;
+ string strSrc, strInserting;
+ bool condition1 = false; //Verify the inserting string
+ bool condition2 = false; //Verify the source string
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ index = 0;
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ //strSrc = "AABBB";
+ strInserting = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ //strInserting = "%%";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strNew = strSrc.Insert(index, strInserting);
+
+ condition1 = (0 == string.CompareOrdinal(strInserting, strNew.Substring(index, strInserting.Length)));
+ condition2 = (0 == string.CompareOrdinal(strSrc, strNew.Substring(0, index) + strNew.Substring(index + strInserting.Length)));
+ actualValue = condition1 && condition2;
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ // new update 8-8-2006 Noter(v-yaduoj)
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "Start index equals the length of instance ";
+ const string c_TEST_ID = "P002";
+
+ int index;
+ string strSrc, strInserting;
+ bool condition1 = false; //Verify the inserting string
+ bool condition2 = false; //Verify the source string
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ index = strSrc.Length;
+ strInserting = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strNew = strSrc.Insert(index, strInserting);
+
+ condition1 = (0 == string.CompareOrdinal(strInserting, strNew.Substring(index, strInserting.Length)));
+ condition2 = (0 == string.CompareOrdinal(strSrc, strNew.Substring(0, index) + strNew.Substring(index + strInserting.Length)));
+ actualValue = condition1 && condition2;
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("003" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ // new update 8-8-2006 Noter(v-yaduoj)
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "Start index is a value between 1 and Instance.Length - 1 ";
+ const string c_TEST_ID = "P003";
+
+ int index;
+ string strSrc, strInserting;
+ bool condition1 = false; //Verify the inserting string
+ bool condition2 = false; //Verify the source string
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ index = GetInt32(1, strSrc.Length - 1);
+ strInserting = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strNew = strSrc.Insert(index, strInserting);
+
+ condition1 = (0 == string.CompareOrdinal(strInserting, strNew.Substring(index, strInserting.Length)));
+ condition2 = (0 == string.CompareOrdinal(strSrc, strNew.Substring(0, index) + strNew.Substring(index + strInserting.Length)));
+ actualValue = condition1 && condition2;
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("005" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ // new update 8-8-2006 Noter(v-yaduoj)
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "String inserted is Sting.Empty";
+ const string c_TEST_ID = "P004";
+
+ int index;
+ string strSrc, strInserting;
+ bool condition1 = false; //Verify the inserting string
+ bool condition2 = false; //Verify the source string
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ index = GetInt32(0, strSrc.Length);
+ strInserting = String.Empty;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strNew = strSrc.Insert(index, strInserting);
+
+ condition1 = (0 == string.CompareOrdinal(strInserting, strNew.Substring(index, strInserting.Length)));
+ condition2 = (0 == string.CompareOrdinal(strSrc, strNew.Substring(0, index) + strNew.Substring(index + strInserting.Length)));
+ actualValue = condition1 && condition2;
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("007" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Negative test scenairos
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "The string inserted is null";
+ const string c_TEST_ID = "N001";
+
+ int index;
+ string strSource, str;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ strSource = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ index = GetInt32(0, strSource.Length);
+ str = null;
+
+ strSource.Insert(index, str);
+ TestLibrary.TestFramework.LogError("009" + "TestId-" + c_TEST_ID, "ArgumentNullException is not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {}
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "The start index is greater than the length of instance.";
+ const string c_TEST_ID = "N002";
+
+ int index;
+ string strSource, str;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ strSource = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ index = GetInt32(strSource.Length + 1, Int32.MaxValue);
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ strSource.Insert(index, str);
+ TestLibrary.TestFramework.LogError("011" + "TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "The start index is a negative integer";
+ const string c_TEST_ID = "N003";
+
+ int index;
+ string strSource, str;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ strSource = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ index = -1 * GetInt32(0, Int32.MaxValue) - 1;
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ strSource.Insert(index, str);
+ TestLibrary.TestFramework.LogError("013" + "TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper methods for generating test data
+
+ private bool GetBoolean()
+ {
+ Int32 i = this.GetInt32(1, 2);
+ return (i == 1) ? true : false;
+ }
+
+ //Get a non-negative integer between minValue and maxValue
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ private Int32 Min(Int32 i1, Int32 i2)
+ {
+ return (i1 <= i2) ? i1 : i2;
+ }
+
+ private Int32 Max(Int32 i1, Int32 i2)
+ {
+ return (i1 >= i2) ? i1 : i2;
+ }
+
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringisnullorempty.cs b/tests/src/CoreMangLib/cti/system/string/stringisnullorempty.cs
new file mode 100644
index 0000000000..2b91b1e89c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringisnullorempty.cs
@@ -0,0 +1,264 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// String.IsNullOrEmpty(System.String)
+/// Note: This method is new in the .NET Framework version 2.0.
+/// Indicates whether the specified String object is a null refere-
+/// nce (Nothing in Visual Basic) or an Empty string.
+/// </summary>
+class StringIsNullOrEmpty
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ public static int Main()
+ {
+ StringIsNullOrEmpty sin = new StringIsNullOrEmpty();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: System.String.IsNullOrEmpty(System.String)");
+ if(sin.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive scenarios
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "String is null";
+ const string c_TEST_ID = "P001";
+
+ string str;
+ bool expectedValue = true; // True means that string is null.
+ bool actualValue = false;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = null;
+ actualValue = string.IsNullOrEmpty(str);
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "String is empty";
+ const string c_TEST_ID = "P002";
+
+ string str;
+ bool expectedValue = true; // True means string is empty
+ bool actualValue = false;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = String.Empty;
+ actualValue = string.IsNullOrEmpty(str);
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("003" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "String is unempty and non-null";
+ const string c_TEST_ID = "P003";
+
+ string str;
+ bool expectedValue = false; // False means string is unempty and non-null
+ bool actualValue = false;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ actualValue = string.IsNullOrEmpty(str);
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("005" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "String consists of \"\\0\"";
+ const string c_TEST_ID = "P004";
+
+ string str;
+ bool expectedValue = false; // False means string is unempty and non-null
+ bool actualValue = false;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ char ch = '\0';
+ str = new string(ch, GetInt32(1, c_MAX_STRING_LEN));
+ actualValue = string.IsNullOrEmpty(str);
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("007" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "String consists of \"\"";
+ const string c_TEST_ID = "P005";
+
+ string str;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str = "";
+ for (int i = GetInt32(1, c_MAX_STRING_LEN); i > 0; i--)
+ {
+ str += "";
+ }
+ actualValue = string.IsNullOrEmpty(str);
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("009" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper methods for generating test data
+
+ private bool GetBoolean()
+ {
+ Int32 i = this.GetInt32(1, 2);
+ return (i == 1) ? true : false;
+ }
+
+ //Get a non-negative integer between minValue and maxValue
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ private Int32 Min(Int32 i1, Int32 i2)
+ {
+ return (i1 <= i2) ? i1 : i2;
+ }
+
+ private Int32 Max(Int32 i1, Int32 i2)
+ {
+ return (i1 >= i2) ? i1 : i2;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringjoin.cs b/tests/src/CoreMangLib/cti/system/string/stringjoin.cs
new file mode 100644
index 0000000000..0866afe565
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringjoin.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/string/stringjoin1.cs b/tests/src/CoreMangLib/cti/system/string/stringjoin1.cs
new file mode 100644
index 0000000000..5812f5385d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringjoin1.cs
@@ -0,0 +1,278 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// String.Join(String, String[])
+/// Concatenates a specified separator String between each element
+/// of a specified String array, yielding a single concatenated string.
+/// </summary>
+class StringJoin1
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ private const int c_MIN_STR_ARRAY_LEN = 4;
+ private const int c_MAX_STR_ARRAY_LEN = 127;
+
+ public static int Main()
+ {
+ StringJoin1 si = new StringJoin1();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: System.String.Join(String, String[])");
+ if (si.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ /*retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;*/
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarios
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "Random separator and random string array";
+ const string c_TEST_ID = "P001";
+
+ string separator, joinedStr;
+ bool condition1 = false; //Used to verify the element of the string array
+ bool condition2 = false; //used to verify the separator
+ bool expectedValue, actualValue;
+ int i, j, startIndex1, startIndex2;
+ string[] strs;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ strs = TestLibrary.Generator.GetStrings(-55, false, c_MIN_STR_ARRAY_LEN, c_MAX_STR_ARRAY_LEN);
+ //strs = new string[] { "AAAA", "BBBBB", "CCCCCC" };
+ separator = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ joinedStr = string.Join(separator, strs);
+ i = GetInt32(0, strs.GetLength(0) - 1);
+ //i = 1;
+
+ //Get source array element's start position of the joined string
+ startIndex1 = 0;
+ for (int m = i; m > 0;)
+ {
+ startIndex1 += separator.Length + strs[--m].Length;
+ }
+
+ condition1 = (0 == String.CompareOrdinal(joinedStr.Substring(startIndex1, strs[i].Length), strs[i]));
+
+ if(strs.GetLength(0) > 1)
+ {
+ //new update 8-8-2006 Noter(v-yaduoj)
+ //Index of separator
+ j = GetInt32(1, strs.GetLength(0) - 1);
+ startIndex2 = 0;
+ while(j>0)
+ {
+ startIndex2 += strs[j--].Length + separator.Length;
+ }
+ startIndex2 += strs[0].Length;
+ condition2 = (0 == String.CompareOrdinal(joinedStr.Substring(startIndex2, separator.Length), separator));
+ }
+ else
+ {
+ condition2 = true;
+ }
+
+ expectedValue = true;
+ actualValue = condition1 && condition2;
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "Separator is null, random string array";
+ const string c_TEST_ID = "P002";
+
+ string separator, joinedStr;
+ bool condition1 = false; //Used to verify the element of the string array
+ bool condition2 = false; //used to verify the separator
+ bool expectedValue, actualValue;
+ int i, j, startIndex1, startIndex2;
+ string[] strs;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ strs = TestLibrary.Generator.GetStrings(-55, false, c_MIN_STR_ARRAY_LEN, c_MAX_STR_ARRAY_LEN);
+ separator = null;
+
+ joinedStr = string.Join(separator, strs);
+
+ separator = string.Empty;
+ i = GetInt32(0, strs.GetLength(0) - 1);
+
+ //Get source array element's start position of the joined string
+ startIndex1 = 0;
+ for (int m = i; m > 0; )
+ {
+ startIndex1 += separator.Length + strs[--m].Length;
+ }
+
+ condition1 = (0 == String.CompareOrdinal(joinedStr.Substring(startIndex1, strs[i].Length), strs[i]));
+
+ if (strs.GetLength(0) > 1)
+ {
+ //new update 8-8-2006 Noter(v-yaduoj)
+ //Index of separator
+ j = GetInt32(0, strs.GetLength(0) - 2);
+ startIndex2 = 0;
+ while (j > 0)
+ {
+ startIndex2 += strs[j--].Length + separator.Length;
+ }
+ startIndex2 += strs[0].Length;
+ condition2 = (0 == String.CompareOrdinal(joinedStr.Substring(startIndex2, separator.Length), separator));
+ }
+ else
+ {
+ condition2 = true;
+ }
+
+ expectedValue = true;
+ actualValue = condition1 && condition2;
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("003" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Negative test scenairos
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "The string array is null";
+ const string c_TEST_ID = "N001";
+
+ string separator;
+ string[] strs;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ separator = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ strs = null;
+
+ String.Join(separator, strs);
+ TestLibrary.TestFramework.LogError("005" + "TestId-" + c_TEST_ID, "ArgumentNullException is not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {}
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("06" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper methods for generating test data
+
+ private bool GetBoolean()
+ {
+ Int32 i = this.GetInt32(1, 2);
+ return (i == 1) ? true : false;
+ }
+
+ //Get a non-negative integer between minValue and maxValue
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ private Int32 Min(Int32 i1, Int32 i2)
+ {
+ return (i1 <= i2) ? i1 : i2;
+ }
+
+ private Int32 Max(Int32 i1, Int32 i2)
+ {
+ return (i1 >= i2) ? i1 : i2;
+ }
+
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringjoin2.cs b/tests/src/CoreMangLib/cti/system/string/stringjoin2.cs
new file mode 100644
index 0000000000..89b78d3a14
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringjoin2.cs
@@ -0,0 +1,696 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+/// String.Join(String, String[], Int32, Int32)
+/// Concatenates a specified separator String between each
+/// element of a specified String array, yielding a single concatenated string.
+/// Parameters specify the first array element and number of elements to use.
+/// </summary>
+class StringJoin2
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ private const int c_MIN_STR_ARRAY_LEN = 4;
+ private const int c_MAX_STR_ARRAY_LEN = 127;
+
+ private const int c_SUPER_MAX_INTEGER = 1 << 17;
+
+ public static int Main()
+ {
+ StringJoin2 si = new StringJoin2();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: System.String.Join(String, String[], Int32, Int32)");
+ if (si.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ //retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarios
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Random separator and random string array, positive count";
+ const string c_TEST_ID = "P001";
+
+ string separator, joinedStr;
+ int startIndex, count;
+ bool condition1 = false; //Used to verify the element of the string array
+ bool condition2 = false; //used to verify the separator
+ bool expectedValue, actualValue;
+ int i, j, startIndex1, startIndex2;
+ string[] strs;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ strs = TestLibrary.Generator.GetStrings(-55, false, c_MIN_STR_ARRAY_LEN, c_MAX_STR_ARRAY_LEN);
+ //strs = new string[] { "AAAA", "BBBBB", "CCCCCC", "ddd", "EEEE"};
+ separator = TestLibrary.Generator.GetString(-55, false, 1, c_MAX_STRING_LEN);
+ //separator = "&&";
+ startIndex = GetInt32(0, strs.GetLength(0) - 1);
+ //startIndex = 1;
+ count = GetInt32(1, strs.GetLength(0) - startIndex);
+ //count = 1;
+
+ try
+ {
+ joinedStr = string.Join(separator, strs, startIndex, count);
+
+ string[] strsUsed = new string[count];
+ for (int m = 0; m < count; m++)
+ {
+ strsUsed[m] = strs[startIndex + m];
+ }
+
+ i = GetInt32(0, strsUsed.GetLength(0) - 1);
+ //i = 1;
+
+ //Get source array element's start position of the joined string
+ startIndex1 = 0;
+ for (int m = i; m > 0;)
+ {
+ startIndex1 += separator.Length + strsUsed[--m].Length;
+ }
+
+ condition1 = (0 == String.CompareOrdinal(joinedStr.Substring(startIndex1, strsUsed[i].Length), strsUsed[i]));
+
+ if (strsUsed.GetLength(0) > 1)
+ {
+ //Index of separator
+ j = GetInt32(0, strsUsed.GetLength(0) - 2);
+ startIndex2 = 0;
+ while(j>0)
+ {
+ startIndex2 += strsUsed[j--].Length + separator.Length;
+ }
+ startIndex2 += strsUsed[0].Length;
+ condition2 = (0 == String.CompareOrdinal(joinedStr.Substring(startIndex2, separator.Length), separator));
+ }
+ else
+ {
+ condition2 = true;
+ }
+
+ expectedValue = true;
+ actualValue = condition1 && condition2;
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strs, separator, startIndex, count);
+ TestLibrary.TestFramework.LogError("001" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strs, separator, startIndex, count));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Random separator and random string array, count is zero";
+ const string c_TEST_ID = "P002";
+
+ string separator, joinedStr;
+ int startIndex, count;
+ bool expectedValue, actualValue;
+ string[] strs;
+
+ strs = TestLibrary.Generator.GetStrings(-55, false, c_MIN_STR_ARRAY_LEN, c_MAX_STR_ARRAY_LEN);
+ separator = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ startIndex = GetInt32(0, strs.GetLength(0) - 1);
+ count = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ joinedStr = string.Join(separator, strs, startIndex, count);
+
+ expectedValue = true;
+ actualValue = (joinedStr == String.Empty);
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("003" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest3: Separator is null, random string array, positive count";
+ const string c_TEST_ID = "P003";
+
+ string separator, joinedStr;
+ int startIndex, count;
+ bool condition1 = false; //Used to verify the element of the string array
+ bool condition2 = false; //used to verify the separator
+ bool expectedValue, actualValue;
+ int i, j, startIndex1, startIndex2;
+ string[] strs;
+
+ strs = TestLibrary.Generator.GetStrings(-55, false, c_MIN_STR_ARRAY_LEN, c_MAX_STR_ARRAY_LEN);
+ separator = null;
+ startIndex = GetInt32(0, strs.GetLength(0) - 1);
+ count = GetInt32(1, strs.GetLength(0) - startIndex);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ joinedStr = string.Join(separator, strs, startIndex, count);
+
+ separator = string.Empty;
+ string[] strsUsed = new string[count];
+ for (int m = 0; m < count; m++)
+ {
+ strsUsed[m] = strs[startIndex + m];
+ }
+
+ i = GetInt32(0, strsUsed.GetLength(0) - 1);
+
+ //Get source array element's start position of the joined string
+ startIndex1 = 0;
+ for (int m = i; m > 0; )
+ {
+ startIndex1 += separator.Length + strsUsed[--m].Length;
+ }
+
+ condition1 = (0 == String.CompareOrdinal(joinedStr.Substring(startIndex1, strsUsed[i].Length), strsUsed[i]));
+
+ if (strsUsed.GetLength(0) > 1)
+ {
+ //Index of separator
+ j = GetInt32(0, strsUsed.GetLength(0) - 2);
+ startIndex2 = 0;
+ while (j > 0)
+ {
+ startIndex2 += strsUsed[j--].Length + separator.Length;
+ }
+ startIndex2 += strsUsed[0].Length;
+ condition2 = (0 == String.CompareOrdinal(joinedStr.Substring(startIndex2, separator.Length), separator));
+ }
+ else
+ {
+ condition2 = true;
+ }
+
+ expectedValue = true;
+ actualValue = condition1 && condition2;
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("005" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest4: Start element is the last element of array, count of joined is 1";
+ const string c_TEST_ID = "P004";
+
+ string separator, joinedStr;
+ int startIndex, count;
+ bool condition1 = false; //Used to verify the element of the string array
+ bool condition2 = false; //used to verify the separator
+ bool expectedValue, actualValue;
+ int i, j, startIndex1, startIndex2;
+ string[] strs;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ strs = TestLibrary.Generator.GetStrings(-55, false, c_MIN_STR_ARRAY_LEN, c_MAX_STR_ARRAY_LEN);
+ //strs = new string[] { "AAAA", "BBBBB", "CCCCCC", "ddd", "EEEE"};
+ separator = TestLibrary.Generator.GetString(-55, false, 1, c_MAX_STRING_LEN);
+ //separator = "&&";
+ startIndex = strs.GetLength(0) - 1;
+ count = GetInt32(1, strs.GetLength(0) - startIndex);
+ count = 1;
+
+ try
+ {
+ joinedStr = string.Join(separator, strs, startIndex, count);
+
+ string[] strsUsed = new string[count];
+ for (int m = 0; m < count; m++)
+ {
+ strsUsed[m] = strs[startIndex + m];
+ }
+
+ i = GetInt32(0, strsUsed.GetLength(0) - 1);
+ //i = 1;
+
+ //Get source array element's start position of the joined string
+ startIndex1 = 0;
+ for (int m = i; m > 0; )
+ {
+ startIndex1 += separator.Length + strsUsed[--m].Length;
+ }
+
+ condition1 = (0 == String.CompareOrdinal(joinedStr.Substring(startIndex1, strsUsed[i].Length), strsUsed[i]));
+
+ if (strsUsed.GetLength(0) > 1)
+ {
+ //Index of separator
+ j = GetInt32(0, strsUsed.GetLength(0) - 2);
+ startIndex2 = 0;
+ while (j > 0)
+ {
+ startIndex2 += strsUsed[j--].Length + separator.Length;
+ }
+ startIndex2 += strsUsed[0].Length;
+ condition2 = (0 == String.CompareOrdinal(joinedStr.Substring(startIndex2, separator.Length), separator));
+ }
+ else
+ {
+ condition2 = true;
+ }
+
+ expectedValue = true;
+ actualValue = condition1 && condition2;
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strs, separator, startIndex, count);
+ TestLibrary.TestFramework.LogError("007" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strs, separator, startIndex, count));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest5: Start element is the first element of array, join all elements of array";
+ const string c_TEST_ID = "P005";
+
+ string separator, joinedStr;
+ int startIndex, count;
+ bool condition1 = false; //Used to verify the element of the string array
+ bool condition2 = false; //used to verify the separator
+ bool expectedValue, actualValue;
+ int i, j, startIndex1, startIndex2;
+ string[] strs;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ strs = TestLibrary.Generator.GetStrings(-55, false, c_MIN_STR_ARRAY_LEN, c_MAX_STR_ARRAY_LEN);
+ separator = TestLibrary.Generator.GetString(-55, false, 1, c_MAX_STRING_LEN);
+ startIndex =0;
+ count =strs.GetLength(0);
+
+ try
+ {
+ joinedStr = string.Join(separator, strs, startIndex, count);
+
+ string[] strsUsed = new string[count];
+ for (int m = 0; m < count; m++)
+ {
+ strsUsed[m] = strs[startIndex + m];
+ }
+
+ i = GetInt32(0, strsUsed.GetLength(0) - 1);
+ //i = 1;
+
+ //Get source array element's start position of the joined string
+ startIndex1 = 0;
+ for (int m = i; m > 0; )
+ {
+ startIndex1 += separator.Length + strsUsed[--m].Length;
+ }
+
+ condition1 = (0 == String.CompareOrdinal(joinedStr.Substring(startIndex1, strsUsed[i].Length), strsUsed[i]));
+
+ if (strsUsed.GetLength(0) > 1)
+ {
+ //Index of separator
+ j = GetInt32(0, strsUsed.GetLength(0) - 2);
+ startIndex2 = 0;
+ while (j > 0)
+ {
+ startIndex2 += strsUsed[j--].Length + separator.Length;
+ }
+ startIndex2 += strsUsed[0].Length;
+ condition2 = (0 == String.CompareOrdinal(joinedStr.Substring(startIndex2, separator.Length), separator));
+ }
+ else
+ {
+ condition2 = true;
+ }
+
+ expectedValue = true;
+ actualValue = condition1 && condition2;
+ if (expectedValue != actualValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strs, separator, startIndex, count);
+ TestLibrary.TestFramework.LogError("009" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(strs, separator, startIndex, count));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Negative test scenairos
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: The string array is a null reference";
+ const string c_TEST_ID = "N001";
+
+ string separator;
+ string[] strs;
+ int startIndex, count;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ separator = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ strs = null;
+ startIndex = 0;
+ count = 0;
+
+ String.Join(separator, strs, startIndex, count);
+ TestLibrary.TestFramework.LogError("011" + "TestId-" + c_TEST_ID, "ArgumentNullException is not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {}
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: The start index of array is a negative value";
+ const string c_TEST_ID = "N002";
+
+ string separator;
+ string[] strs;
+ int startIndex, count;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ separator = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ strs = TestLibrary.Generator.GetStrings(-55, false, c_MIN_STR_ARRAY_LEN, c_MAX_STR_ARRAY_LEN);
+ startIndex = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+ count = 0;
+
+ String.Join(separator, strs, startIndex, count);
+ TestLibrary.TestFramework.LogError("013" + "TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest3: The count of array elements to join is a negative value";
+ const string c_TEST_ID = "N003";
+
+ string separator;
+ string[] strs;
+ int startIndex, count;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ separator = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ strs = TestLibrary.Generator.GetStrings(-55, false, c_MIN_STR_ARRAY_LEN, c_MAX_STR_ARRAY_LEN);
+ startIndex = 0;
+ count = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+
+ String.Join(separator, strs, startIndex, count);
+ TestLibrary.TestFramework.LogError("015" + "TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest4: The start index plus joined count is greater than numbers of elements in string array";
+ const string c_TEST_ID = "N004";
+
+ string separator;
+ string[] strs;
+ int startIndex, count;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ separator = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ strs = TestLibrary.Generator.GetStrings(-55, false, c_MIN_STR_ARRAY_LEN, c_MAX_STR_ARRAY_LEN);
+ startIndex = TestLibrary.Generator.GetInt32(-55);
+ count = strs.GetLength(0) - startIndex + GetInt32(1, Int32.MaxValue - strs.GetLength(0));
+
+ String.Join(separator, strs, startIndex, count);
+ TestLibrary.TestFramework.LogError("017" + "TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5() //bug
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest5: Out of memory";
+ const string c_TEST_ID = "N005";
+
+ string separator;
+ string[] strs;
+ int startIndex, count;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ separator = new string(TestLibrary.Generator.GetChar(-55), c_SUPER_MAX_INTEGER);
+ strs = new string[c_SUPER_MAX_INTEGER];
+
+ //for (int i = 0; i < strs.GetLength(0); i++)
+ //{
+ // strs[i] = new string(TestLibrary.Generator.GetChar(-55), 1);
+ //}
+
+ startIndex = 0;
+ count = strs.GetLength(0);
+
+ string joinedStr = String.Join(separator, strs, startIndex, count);
+ TestLibrary.TestFramework.LogError("019" + "TestId-" + c_TEST_ID, "OutOfMemoryException is not thrown as expected");
+ retVal = false;
+ }
+ catch (OutOfMemoryException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper methods for generating test data
+
+ private bool GetBoolean()
+ {
+ Int32 i = this.GetInt32(1, 2);
+ return (i == 1) ? true : false;
+ }
+
+ //Get a non-negative integer between minValue and maxValue
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ private Int32 Min(Int32 i1, Int32 i2)
+ {
+ return (i1 <= i2) ? i1 : i2;
+ }
+
+ private Int32 Max(Int32 i1, Int32 i2)
+ {
+ return (i1 >= i2) ? i1 : i2;
+ }
+
+ #endregion
+
+ private string GetDataString(string[] strs, string separator, int startIndex, int count)
+ {
+ string str1, str2, str;
+ int len1, len2;
+ str2 = string.Empty;
+
+ if (null == separator)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = separator;
+ len1 = separator.Length;
+ }
+ if (null == strs)
+ {
+ str2 = "null";
+ len2 = 0;
+ }
+ else
+ {
+ len2 = strs.GetLength(0);
+ for (int i = 0; i < len2; i++)
+ {
+ str2 += "\n" + strs[i];
+ }
+ }
+
+ str = string.Format("\n[String array value]\n \"{0}\"", str2);
+ str += string.Format("\n[Separator string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of string array]\n \"{0}\"", len2);
+ str += string.Format("\n[Length of separator string]\n \"{0}\"", len1);
+ str += string.Format("\n[Joined elements start index]: {0}", startIndex);
+ str += string.Format("\n[Joined elements count]: {0}", count);
+
+ return str;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringlength.cs b/tests/src/CoreMangLib/cti/system/string/stringlength.cs
new file mode 100644
index 0000000000..3a7bf9fa96
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringlength.cs
@@ -0,0 +1,209 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// String.Length
+/// </summary>
+public class StringLength
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ public static int Main()
+ {
+ StringLength sl = new StringLength();
+ TestLibrary.TestFramework.BeginTestCase("StringLength");
+
+ if (sl.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string strA;
+ int ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: empty string length");
+
+ try
+ {
+ strA = string.Empty;
+ ActualResult = strA.Length;
+ if (ActualResult != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "empty string length ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string strA;
+ int ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: string with special symbols length one");
+
+ try
+ {
+ strA = "hello\u0061\u030aworld";
+ ActualResult = strA.Length;
+ if (ActualResult != 12)
+ {
+ TestLibrary.TestFramework.LogError("003", "string with special symbols length one ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string strA;
+ int ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: string with special symbols length two");
+
+ try
+ {
+ strA = "This\0String\0Is\0Valid";
+ ActualResult = strA.Length;
+ if (ActualResult != 20)
+ {
+ TestLibrary.TestFramework.LogError("005", "string with special symbols length two ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string strA;
+ int ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: normal string length");
+ try
+ {
+ strA = new string(this.GetChar(c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH), c_MAX_STRING_LENGTH);
+ ActualResult = strA.Length;
+ if (ActualResult != c_MAX_STRING_LENGTH)
+ {
+ TestLibrary.TestFramework.LogError("007", "normal string length ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region Help method for geting test data
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ private Char GetChar(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return Convert.ToChar(minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return Convert.ToChar(Convert.ToInt32(TestLibrary.Generator.GetChar(-55)) % (maxValue - minValue) + minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+ return Convert.ToChar(minValue);
+ }
+ private string GetString(bool ValidPath, Int32 minValue, Int32 maxValue)
+ {
+ StringBuilder sVal = new StringBuilder();
+ string s;
+
+ if (0 == minValue && 0 == maxValue) return String.Empty;
+ if (minValue > maxValue) return null;
+
+ if (ValidPath)
+ {
+ return TestLibrary.Generator.GetString(-55, ValidPath, minValue, maxValue);
+ }
+ else
+ {
+ int length = this.GetInt32(minValue, maxValue);
+ for (int i = 0; length > i; i++)
+ {
+ char c = this.GetChar(minValue, maxValue);
+ sVal.Append(c);
+ }
+ s = sVal.ToString();
+ return s;
+ }
+
+
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringpadleft.cs b/tests/src/CoreMangLib/cti/system/string/stringpadleft.cs
new file mode 100644
index 0000000000..4736b86168
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringpadleft.cs
@@ -0,0 +1,101 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+using System.Globalization;
+using TestLibrary;
+
+class StringPadLeft
+{
+ static int Main()
+ {
+ StringPadLeft test = new StringPadLeft();
+
+ TestFramework.BeginTestCase("String.PadLeft");
+
+ if (test.RunTests())
+ {
+ TestFramework.EndTestCase();
+ TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestFramework.EndTestCase();
+ TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool ret = true;
+
+ // Positive Tests
+ ret &= Test1();
+ ret &= Test2();
+ ret &= Test3();
+ ret &= Test4();
+ ret &= Test5();
+ ret &= Test6();
+ ret &= Test7();
+ ret &= Test8();
+
+ return ret;
+ }
+
+ public bool Test1() { return PositiveTest("TestString", 15, " TestString", "00A"); }
+ public bool Test2() { return PositiveTest("", 5000, new string(' ', 5000), "00B"); }
+ public bool Test3() { return PositiveTest("TestString", 10, "TestString", "00B1"); }
+ public bool Test4() { return PositiveTest("TestString", 6, "TestString", "00B2"); }
+ public bool Test5() { return PositiveTest2("TestString", 15, '*', "*****TestString", "00C"); }
+ public bool Test6() { return PositiveTest2("", 5000, '*', new string('*', 5000), "00D"); }
+ public bool Test7() { return PositiveTest2("TestString", 100, '\0', new string('\0', 90) + "TestString", "00E"); }
+ public bool Test8() { return PositiveTest2("TestString", 100, '\u0400', new string('\u0400', 90) + "TestString", "00F"); }
+
+
+ public bool PositiveTest(string str1, int totalWidth, string expected, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Padding " + str1 + " to " + totalWidth);
+ try
+ {
+ string output = str1.PadLeft(totalWidth);
+ if (output != expected)
+ {
+ result = false;
+ TestFramework.LogError("001", "Error in " + id + ", unexpected padding result. Actual string " + output + ", Expected: " + expected);
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("002", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ return result;
+ }
+
+ public bool PositiveTest2(string str1, int totalWidth, char padder, string expected, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Padding " + str1 + " to " + totalWidth);
+ try
+ {
+ string output = str1.PadLeft(totalWidth, padder);
+ if (output != expected)
+ {
+ result = false;
+ TestFramework.LogError("001", "Error in " + id + ", unexpected padding result. Actual string " + output + ", Expected: " + expected);
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("002", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ return result;
+ }
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/stringpadleft1.cs b/tests/src/CoreMangLib/cti/system/string/stringpadleft1.cs
new file mode 100644
index 0000000000..7eaebef499
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringpadleft1.cs
@@ -0,0 +1,276 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// String.PadLeft(Int32)
+/// Right-aligns the characters in this instance,
+/// padding with spaces on the left for a specified total length
+/// </summary>
+public class StringPadLeft1
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ public static int Main()
+ {
+ StringPadLeft1 spl = new StringPadLeft1();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: System.String.PadLeft(Int32)");
+ if (spl.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarios
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Total width is greater than old string length";
+ const string c_TEST_ID = "P001";
+
+ int totalWidth;
+ string str;
+ bool condition1 = false; //Verify the space paded
+ bool condition2 = false; //Verify the old string
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ //str = "hello";
+ totalWidth = GetInt32(str.Length + 1, str.Length + c_MAX_STRING_LEN);
+ //totalWidth = 8;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strPaded = str.PadLeft(totalWidth);
+
+ char[] trimChs = new char[] {'\x0020'};
+ string spaces = new string('\x0020', totalWidth - str.Length);
+
+ string spacesPaded = strPaded.Substring(0, totalWidth - str.Length);
+ condition1 = (string.CompareOrdinal(spaces, spacesPaded) == 0);
+ condition2 = (string.CompareOrdinal(strPaded.TrimStart(trimChs), str) == 0);
+ actualValue = condition1 && condition2;
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(str, totalWidth);
+ TestLibrary.TestFramework.LogError("001" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(str, totalWidth));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: 0 <= total width <= old string length";
+ const string c_TEST_ID = "P002";
+
+ int totalWidth;
+ string str;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ totalWidth = GetInt32(0, str.Length - 1);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strPaded = str.PadLeft(totalWidth);
+ actualValue = (0 == string.CompareOrdinal(strPaded, str));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(str, totalWidth);
+ TestLibrary.TestFramework.LogError("003" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(str, totalWidth));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Negative test scenarios
+
+ //ArgumentException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: Total width is less than zero. ";
+ const string c_TEST_ID = "N001";
+
+ int totalWidth;
+ string str;
+
+ totalWidth = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str.PadLeft(totalWidth);
+ TestLibrary.TestFramework.LogError("005" + "TestId-" + c_TEST_ID, "ArgumentException is not thrown as expected" + GetDataString(str, totalWidth));
+ retVal = false;
+ }
+ catch (ArgumentException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e +GetDataString(str, totalWidth));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //OutOfMemoryException
+ public bool NegTest2() // bug 8-8-2006 Noter(v-yaduoj)
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: Too great width ";
+ const string c_TEST_ID = "N002";
+
+ int totalWidth;
+ string str;
+
+ totalWidth = Int32.MaxValue;
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str.PadLeft(totalWidth);
+ TestLibrary.TestFramework.LogError("007" + "TestId-" + c_TEST_ID, "OutOfMemoryException is not thrown as expected" + GetDataString(str, totalWidth));
+ retVal = false;
+ }
+ catch (OutOfMemoryException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(str, totalWidth));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper methods for generating test data
+
+ private bool GetBoolean()
+ {
+ Int32 i = this.GetInt32(1, 2);
+ return (i == 1) ? true : false;
+ }
+
+ //Get a non-negative integer between minValue and maxValue
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ private Int32 Min(Int32 i1, Int32 i2)
+ {
+ return (i1 <= i2) ? i1 : i2;
+ }
+
+ private Int32 Max(Int32 i1, Int32 i2)
+ {
+ return (i1 >= i2) ? i1 : i2;
+ }
+
+ #endregion
+
+ private string GetDataString(string strSrc, int totalWidth)
+ {
+ string str1, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+ str += string.Format("\n[Total width]\n{0}", totalWidth);
+
+ return str;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringpadleft2.cs b/tests/src/CoreMangLib/cti/system/string/stringpadleft2.cs
new file mode 100644
index 0000000000..51aced4ec3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringpadleft2.cs
@@ -0,0 +1,285 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// String.PadLeft(Int32, Char)
+/// Right-aligns the characters in this instance,
+/// padding on the left with a specified Unicode character for a specified total length.
+/// </summary>
+public class StringPadLeft2
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ public static int Main()
+ {
+ StringPadLeft2 spl = new StringPadLeft2();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: System.String.PadLeft(Int32, Char)");
+ if (spl.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarios
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Total width is greater than old string length";
+ const string c_TEST_ID = "P001";
+
+ int totalWidth;
+ char ch;
+ string str;
+ bool condition1 = false; //Verify the space paded
+ bool condition2 = false; //Verify the old string
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ //str = "hello";
+ totalWidth = GetInt32(str.Length + 1, str.Length + c_MAX_STRING_LEN);
+ //totalWidth = 8;
+ ch = TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strPaded = str.PadLeft(totalWidth, ch);
+
+ char[] trimChs = new char[] {ch};
+ string spaces = new string(ch, totalWidth - str.Length);
+
+ string spacesPaded = strPaded.Substring(0, totalWidth - str.Length);
+ condition1 = (string.CompareOrdinal(spaces, spacesPaded) == 0);
+ condition2 = (string.CompareOrdinal(strPaded.TrimStart(trimChs), str) == 0);
+ actualValue = condition1 && condition2;
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(str, totalWidth, ch);
+ TestLibrary.TestFramework.LogError("001" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(str, totalWidth, ch));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: 0 <= total width <= old string length";
+ const string c_TEST_ID = "P002";
+
+ int totalWidth;
+ char ch;
+ string str;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ totalWidth = GetInt32(0, str.Length - 1);
+ ch = TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strPaded = str.PadLeft(totalWidth, ch);
+ actualValue = (0 == string.CompareOrdinal(strPaded, str));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(str, totalWidth, ch);
+ TestLibrary.TestFramework.LogError("003" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(str, totalWidth, ch));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Negative test scenarios
+
+ //ArgumentException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: Total width is less than zero. ";
+ const string c_TEST_ID = "N001";
+
+ int totalWidth;
+ char ch;
+ string str;
+
+ totalWidth = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ ch = TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str.PadLeft(totalWidth);
+ TestLibrary.TestFramework.LogError("005" + "TestId-" + c_TEST_ID, "ArgumentException is not thrown as expected" + GetDataString(str, totalWidth, ch));
+ retVal = false;
+ }
+ catch (ArgumentException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e +GetDataString(str, totalWidth, ch));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //OutOfMemoryException
+ public bool NegTest2() // bug 8-8-2006 Noter(v-yaduoj)
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: Too great width ";
+ const string c_TEST_ID = "N002";
+
+ int totalWidth;
+ char ch;
+ string str;
+
+ totalWidth = Int32.MaxValue;
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ ch = TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str.PadLeft(totalWidth,ch);
+ TestLibrary.TestFramework.LogError("007" + "TestId-" + c_TEST_ID, "OutOfMemoryException is not thrown as expected" + GetDataString(str, totalWidth,ch));
+ retVal = false;
+ }
+ catch (OutOfMemoryException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(str, totalWidth, ch));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper methods for generating test data
+
+ private bool GetBoolean()
+ {
+ Int32 i = this.GetInt32(1, 2);
+ return (i == 1) ? true : false;
+ }
+
+ //Get a non-negative integer between minValue and maxValue
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ private Int32 Min(Int32 i1, Int32 i2)
+ {
+ return (i1 <= i2) ? i1 : i2;
+ }
+
+ private Int32 Max(Int32 i1, Int32 i2)
+ {
+ return (i1 >= i2) ? i1 : i2;
+ }
+
+ #endregion
+
+ private string GetDataString(string strSrc, int totalWidth, char ch)
+ {
+ string str1, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+ str += string.Format("\n[Total width]\n{0}", totalWidth);
+ str += string.Format("\n[Padding character]\n{0}", ch);
+
+ return str;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringpadright.cs b/tests/src/CoreMangLib/cti/system/string/stringpadright.cs
new file mode 100644
index 0000000000..92343c16b5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringpadright.cs
@@ -0,0 +1,101 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+using System.Globalization;
+using TestLibrary;
+
+class StringPadRight
+{
+ static int Main()
+ {
+ StringPadRight test = new StringPadRight();
+
+ TestFramework.BeginTestCase("String.PadRight");
+
+ if (test.RunTests())
+ {
+ TestFramework.EndTestCase();
+ TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestFramework.EndTestCase();
+ TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool ret = true;
+
+ // Positive Tests
+ ret &= Test1();
+ ret &= Test2();
+ ret &= Test3();
+ ret &= Test4();
+ ret &= Test5();
+ ret &= Test6();
+ ret &= Test7();
+ ret &= Test8();
+
+ return ret;
+ }
+
+ public bool Test1() { return PositiveTest("TestString", 15, "TestString ", "00A"); }
+ public bool Test2() { return PositiveTest("", 5000, new string(' ', 5000), "00B"); }
+ public bool Test3() { return PositiveTest("TestString", 10, "TestString", "00B1"); }
+ public bool Test4() { return PositiveTest("TestString", 6, "TestString", "00B2"); }
+ public bool Test5() { return PositiveTest2("TestString", 15, '*', "TestString*****", "00C"); }
+ public bool Test6() { return PositiveTest2("", 5000, '*', new string('*', 5000), "00D"); }
+ public bool Test7() { return PositiveTest2("TestString", 100, '\0', "TestString" + new string('\0', 90), "00E"); }
+ public bool Test8() { return PositiveTest2("TestString", 100, '\u0400', "TestString" + new string('\u0400', 90), "00F"); }
+
+
+ public bool PositiveTest(string str1, int totalWidth, string expected, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Padding " + str1 + " to " + totalWidth);
+ try
+ {
+ string output = str1.PadRight(totalWidth);
+ if (output != expected)
+ {
+ result = false;
+ TestFramework.LogError("001", "Error in " + id + ", unexpected padding result. Actual string " + output + ", Expected: " + expected);
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("002", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ return result;
+ }
+
+ public bool PositiveTest2(string str1, int totalWidth, char padder, string expected, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Padding " + str1 + " to " + totalWidth);
+ try
+ {
+ string output = str1.PadRight(totalWidth, padder);
+ if (output != expected)
+ {
+ result = false;
+ TestFramework.LogError("001", "Error in " + id + ", unexpected padding result. Actual string " + output + ", Expected: " + expected);
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("002", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ return result;
+ }
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/stringpadright1.cs b/tests/src/CoreMangLib/cti/system/string/stringpadright1.cs
new file mode 100644
index 0000000000..ddc4a6f8ef
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringpadright1.cs
@@ -0,0 +1,276 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// String.PadRight(Int32)
+/// Right-aligns the characters in this instance,
+/// padding with spaces on the left for a specified total length
+/// </summary>
+public class StringPadRight1
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ public static int Main()
+ {
+ StringPadRight1 spl = new StringPadRight1();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: System.String.PadRight(Int32)");
+ if (spl.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarios
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Total width is greater than old string length";
+ const string c_TEST_ID = "P001";
+
+ int totalWidth;
+ string str;
+ bool condition1 = false; //Verify the space paded
+ bool condition2 = false; //Verify the old string
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ //str = "hello";
+ totalWidth = GetInt32(str.Length + 1, str.Length + c_MAX_STRING_LEN);
+ //totalWidth = 8;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strPaded = str.PadRight(totalWidth);
+
+ char[] trimChs = new char[] {'\x0020'};
+ string spaces = new string('\x0020', totalWidth - str.Length);
+
+ string spacesPaded = strPaded.Substring(str.Length, totalWidth - str.Length);
+ condition1 = (string.CompareOrdinal(spaces, spacesPaded) == 0);
+ condition2 = (string.CompareOrdinal(strPaded.TrimEnd(trimChs), str) == 0);
+ actualValue = condition1 && condition2;
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(str, totalWidth);
+ TestLibrary.TestFramework.LogError("001" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(str, totalWidth));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: 0 <= total width <= old string length";
+ const string c_TEST_ID = "P002";
+
+ int totalWidth;
+ string str;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ totalWidth = GetInt32(0, str.Length - 1);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strPaded = str.PadRight(totalWidth);
+ actualValue = (0 == string.CompareOrdinal(strPaded, str));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(str, totalWidth);
+ TestLibrary.TestFramework.LogError("003" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(str, totalWidth));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Negative test scenarios
+
+ //ArgumentException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: Total width is less than zero. ";
+ const string c_TEST_ID = "N001";
+
+ int totalWidth;
+ string str;
+
+ totalWidth = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str.PadRight(totalWidth);
+ TestLibrary.TestFramework.LogError("005" + "TestId-" + c_TEST_ID, "ArgumentException is not thrown as expected" + GetDataString(str, totalWidth));
+ retVal = false;
+ }
+ catch (ArgumentException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e +GetDataString(str, totalWidth));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //OutOfMemoryException
+ public bool NegTest2() // bug 8-8-2006 Noter(v-yaduoj)
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: Too great width ";
+ const string c_TEST_ID = "N002";
+
+ int totalWidth;
+ string str;
+
+ totalWidth = Int32.MaxValue;
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str.PadRight(totalWidth);
+ TestLibrary.TestFramework.LogError("007" + "TestId-" + c_TEST_ID, "OutOfMemoryException is not thrown as expected" + GetDataString(str, totalWidth));
+ retVal = false;
+ }
+ catch (OutOfMemoryException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(str, totalWidth));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper methods for generating test data
+
+ private bool GetBoolean()
+ {
+ Int32 i = this.GetInt32(1, 2);
+ return (i == 1) ? true : false;
+ }
+
+ //Get a non-negative integer between minValue and maxValue
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ private Int32 Min(Int32 i1, Int32 i2)
+ {
+ return (i1 <= i2) ? i1 : i2;
+ }
+
+ private Int32 Max(Int32 i1, Int32 i2)
+ {
+ return (i1 >= i2) ? i1 : i2;
+ }
+
+ #endregion
+
+ private string GetDataString(string strSrc, int totalWidth)
+ {
+ string str1, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+ str += string.Format("\n[Total width]\n{0}", totalWidth);
+
+ return str;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringpadright2.cs b/tests/src/CoreMangLib/cti/system/string/stringpadright2.cs
new file mode 100644
index 0000000000..4b603ad6d6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringpadright2.cs
@@ -0,0 +1,285 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// String.PadRight(Int32, Char)
+/// Right-aligns the characters in this instance,
+/// padding on the left with a specified Unicode character for a specified total length.
+/// </summary>
+public class StringPadRight2
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ public static int Main()
+ {
+ StringPadRight2 spl = new StringPadRight2();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: System.String.PadRight(Int32, Char)");
+ if (spl.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarios
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Total width is greater than old string length";
+ const string c_TEST_ID = "P001";
+
+ int totalWidth;
+ char ch;
+ string str;
+ bool condition1 = false; //Verify the space paded
+ bool condition2 = false; //Verify the old string
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ //str = "hello";
+ totalWidth = GetInt32(str.Length + 1, str.Length + c_MAX_STRING_LEN);
+ //totalWidth = 8;
+ ch = TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strPaded = str.PadRight(totalWidth, ch);
+
+ char[] trimChs = new char[] {ch};
+ string spaces = new string(ch, totalWidth - str.Length);
+
+ string spacesPaded = strPaded.Substring(str.Length, totalWidth - str.Length);
+ condition1 = (string.CompareOrdinal(spaces, spacesPaded) == 0);
+ condition2 = (string.CompareOrdinal(strPaded.TrimEnd(trimChs), str) == 0);
+ actualValue = condition1 && condition2;
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(str, totalWidth, ch);
+ TestLibrary.TestFramework.LogError("001" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(str, totalWidth, ch));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: 0 <= total width <= old string length";
+ const string c_TEST_ID = "P002";
+
+ int totalWidth;
+ char ch;
+ string str;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ totalWidth = GetInt32(0, str.Length - 1);
+ ch = TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strPaded = str.PadRight(totalWidth, ch);
+ actualValue = (0 == string.CompareOrdinal(strPaded, str));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(str, totalWidth, ch);
+ TestLibrary.TestFramework.LogError("003" + "TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(str, totalWidth, ch));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Negative test scenarios
+
+ //ArgumentException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: Total width is less than zero. ";
+ const string c_TEST_ID = "N001";
+
+ int totalWidth;
+ char ch;
+ string str;
+
+ totalWidth = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ ch = TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str.PadRight(totalWidth);
+ TestLibrary.TestFramework.LogError("005" + "TestId-" + c_TEST_ID, "ArgumentException is not thrown as expected" + GetDataString(str, totalWidth, ch));
+ retVal = false;
+ }
+ catch (ArgumentException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e +GetDataString(str, totalWidth, ch));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //OutOfMemoryException
+ public bool NegTest2() // bug 8-8-2006 Noter(v-yaduoj)
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: Too great width ";
+ const string c_TEST_ID = "N002";
+
+ int totalWidth;
+ char ch;
+ string str;
+
+ totalWidth = Int32.MaxValue;
+ str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ ch = TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ str.PadRight(totalWidth,ch);
+ TestLibrary.TestFramework.LogError("007" + "TestId-" + c_TEST_ID, "OutOfMemoryException is not thrown as expected" + GetDataString(str, totalWidth,ch));
+ retVal = false;
+ }
+ catch (OutOfMemoryException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + "TestId-" + c_TEST_ID, "Unexpected exception:" + e + GetDataString(str, totalWidth, ch));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper methods for generating test data
+
+ private bool GetBoolean()
+ {
+ Int32 i = this.GetInt32(1, 2);
+ return (i == 1) ? true : false;
+ }
+
+ //Get a non-negative integer between minValue and maxValue
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ private Int32 Min(Int32 i1, Int32 i2)
+ {
+ return (i1 <= i2) ? i1 : i2;
+ }
+
+ private Int32 Max(Int32 i1, Int32 i2)
+ {
+ return (i1 >= i2) ? i1 : i2;
+ }
+
+ #endregion
+
+ private string GetDataString(string strSrc, int totalWidth, char ch)
+ {
+ string str1, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+ str += string.Format("\n[Total width]\n{0}", totalWidth);
+ str += string.Format("\n[Padding character]\n{0}", ch);
+
+ return str;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringremove1.cs b/tests/src/CoreMangLib/cti/system/string/stringremove1.cs
new file mode 100644
index 0000000000..bb8033e2f8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringremove1.cs
@@ -0,0 +1,269 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// String.Remove(Int32)
+/// Note: This method is new in the .NET Framework version 2.0.
+/// Deletes all the characters from this string beginning at a specified
+/// position and continuing through the last position.
+/// </summary>
+public class StringRemove1
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ public static int Main()
+ {
+ StringRemove1 sr = new StringRemove1();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: System.String.Remove(Int32)");
+ if(sr.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarios
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Valid start index between 0, source string's length minus 1";
+ const string c_TEST_ID = "P001";
+
+ string strSrc;
+ int startIndex;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ startIndex = GetInt32(0, strSrc.Length - 1);
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strReserved = strSrc.Remove(startIndex, strSrc.Length - startIndex);
+
+ actualValue = (0 == string.CompareOrdinal(strReserved, strSrc.Substring(0, startIndex)));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, startIndex);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Start index is zero";
+ const string c_TEST_ID = "P002";
+
+ string strSrc;
+ int startIndex;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ startIndex = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strReserved = strSrc.Remove(startIndex, strSrc.Length);
+
+ actualValue = (0 == string.CompareOrdinal(strReserved, string.Empty));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, startIndex);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Negative test Scenarios
+
+ //ArgumentOutOfRangeException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: Start index is too greater than source string's length";
+ const string c_TEST_ID = "N001";
+
+ string strSrc;
+ int startIndex;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ startIndex = GetInt32(strSrc.Length, Int32.MaxValue);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ strSrc.Remove(startIndex, strSrc.Length);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected." + GetDataString(strSrc, startIndex));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch(Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: Start index is negative";
+ const string c_TEST_ID = "N002";
+
+ string strSrc;
+ int startIndex;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ startIndex = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ strSrc.Remove(startIndex, strSrc.Length);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected." + GetDataString(strSrc, startIndex));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper methods for generating test data
+
+ private bool GetBoolean()
+ {
+ Int32 i = this.GetInt32(1, 2);
+ return (i == 1) ? true : false;
+ }
+
+ //Get a non-negative integer between minValue and maxValue
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ private Int32 Min(Int32 i1, Int32 i2)
+ {
+ return (i1 <= i2) ? i1 : i2;
+ }
+
+ private Int32 Max(Int32 i1, Int32 i2)
+ {
+ return (i1 >= i2) ? i1 : i2;
+ }
+
+ #endregion
+
+ private string GetDataString(string strSrc, int startIndex)
+ {
+ string str1, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+ str += string.Format("\n[Start index]\n{0}", startIndex);
+
+ return str;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringremove2.cs b/tests/src/CoreMangLib/cti/system/string/stringremove2.cs
new file mode 100644
index 0000000000..43fbf8b1d5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringremove2.cs
@@ -0,0 +1,417 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// String.Remove(Int32, Int32)
+/// Deletes a specified number of characters from this instance
+/// beginning at a specified position.
+/// </summary>
+public class StringRemove2
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ public static int Main()
+ {
+ StringRemove2 sr = new StringRemove2();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: System.String.Remove(Int32, Int32)");
+ if(sr.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarios
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Valid start index between 0, source string's length minus 1";
+ const string c_TEST_ID = "P001";
+
+ string strSrc;
+ int startIndex, count;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ startIndex = GetInt32(0, strSrc.Length - 1);
+ count = GetInt32(1, strSrc.Length - startIndex);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strReserved = strSrc.Remove(startIndex, count);
+
+ actualValue = (0 == string.CompareOrdinal(strReserved, strSrc.Substring(0, startIndex) + strSrc.Substring(startIndex + count)));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, startIndex, count);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex, count));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Start index is zero, count equals whole string length";
+ const string c_TEST_ID = "P002";
+
+ string strSrc;
+ int startIndex, count;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ startIndex = 0;
+ count = strSrc.Length;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strReserved = strSrc.Remove(startIndex, count);
+
+ actualValue = (0 == string.CompareOrdinal(strReserved, String.Empty));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, startIndex, count);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex, count));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest3: Count is zero, valid start index";
+ const string c_TEST_ID = "P003";
+
+ string strSrc;
+ int startIndex, count;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ startIndex = GetInt32(0, strSrc.Length - 1);
+ count = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strReserved = strSrc.Remove(startIndex, count);
+
+ actualValue = (0 == string.CompareOrdinal(strReserved, strSrc));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, startIndex, count);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex, count));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Negative test Scenarios
+
+ //ArgumentOutOfRangeException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: Start index is too greater than source string's length";
+ const string c_TEST_ID = "N001";
+
+ string strSrc;
+ int startIndex, count;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ startIndex = GetInt32(strSrc.Length, Int32.MaxValue);
+ count = GetInt32(0, strSrc.Length);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ strSrc.Remove(startIndex, count);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected." + GetDataString(strSrc, startIndex, count));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch(Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex, count));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: Valid start index plus count is greater than string length";
+ const string c_TEST_ID = "N002";
+
+ string strSrc;
+ int startIndex, count;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ startIndex = GetInt32(0, strSrc.Length - 1);
+ count = GetInt32(strSrc.Length - startIndex + 1, Int32.MaxValue);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ strSrc.Remove(startIndex, count);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected." + GetDataString(strSrc, startIndex, count));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex, count));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest3: Valid count plus start index is greater than string length";
+ const string c_TEST_ID = "N003";
+
+ string strSrc;
+ int startIndex, count;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ count = GetInt32(0, strSrc.Length);
+ startIndex = GetInt32(strSrc.Length - count + 1, Int32.MaxValue);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ strSrc.Remove(startIndex, count);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected." + GetDataString(strSrc, startIndex, count));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex, count));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest4: Start index is negative, valid number of characters to delete";
+ const string c_TEST_ID = "N004";
+
+ string strSrc;
+ int startIndex, count;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ startIndex = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+ count = GetInt32(0, strSrc.Length);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ strSrc.Remove(startIndex, count);
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected." + GetDataString(strSrc, startIndex, count));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex, count));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest5: Valid start index, negative count of characters to delete";
+ const string c_TEST_ID = "N005";
+
+ string strSrc;
+ int startIndex, count;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ startIndex = GetInt32(0, strSrc.Length - 1);
+ count = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ strSrc.Remove(startIndex, count);
+ TestLibrary.TestFramework.LogError("015" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected." + GetDataString(strSrc, startIndex, count));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex, count));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper methods for generating test data
+
+ private bool GetBoolean()
+ {
+ Int32 i = this.GetInt32(1, 2);
+ return (i == 1) ? true : false;
+ }
+
+ //Get a non-negative integer between minValue and maxValue
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ private Int32 Min(Int32 i1, Int32 i2)
+ {
+ return (i1 <= i2) ? i1 : i2;
+ }
+
+ private Int32 Max(Int32 i1, Int32 i2)
+ {
+ return (i1 >= i2) ? i1 : i2;
+ }
+
+ #endregion
+
+ private string GetDataString(string strSrc, int startIndex, int count)
+ {
+ string str1, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+ str += string.Format("\n[Start index]\n{0}", startIndex);
+ str += string.Format("\n[Start index]\n{0}", count);
+
+ return str;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringreplace1.cs b/tests/src/CoreMangLib/cti/system/string/stringreplace1.cs
new file mode 100644
index 0000000000..4b7c553757
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringreplace1.cs
@@ -0,0 +1,379 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// String.Replace(Char, Char)
+/// Replaces all occurrences of a specified Unicode character in this instance
+/// with another specified Unicode character.
+/// </summary>
+public class StringReplace1
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ public static int Main()
+ {
+ StringReplace1 sr = new StringReplace1();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: System.String.Replace(Int32, Int32)");
+ if (sr.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarios
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Old char exists in source string, random new char.";
+ const string c_TEST_ID = "P001";
+
+ string strSrc;
+ char oldChar, newChar;
+ bool condition1 = false; //Verify the length invariant
+ bool condition2 = false; //Verify to replace correctly
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ //New update: modified by Noter(v-yaduoj) 8-10-2006
+ oldChar = strSrc[TestLibrary.Generator.GetInt32(-55) % (strSrc.Length)];
+ newChar = TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strReplaced = strSrc.Replace(oldChar, newChar);
+
+ condition1 = (strReplaced.Length == strSrc.Length);
+ if (condition1)
+ {
+ condition2 = true;
+ for (int i = 0; i < strReplaced.Length; i++)
+ {
+ //Delete the incorrect check logic
+ // new update 8-10-2006, Noter(v-yaduoj)
+ if (strSrc[i] == oldChar)
+ {
+ condition2 = (strReplaced[i] == newChar) && condition2;
+ }
+ else
+ {
+ condition2 = (strSrc[i] == strReplaced[i]) && condition2;
+ }
+ } // end for statement
+ } // end if
+
+ actualValue = condition1 && condition2;
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, oldChar, newChar);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, oldChar, newChar));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Old char does not exist in source string, random new char.";
+ const string c_TEST_ID = "P002";
+
+ string strSrc;
+ char oldChar, newChar;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ //New update: modified by Noter(v-yaduoj) 8-10-2006
+ oldChar = TestLibrary.Generator.GetChar(-55);
+ newChar = TestLibrary.Generator.GetChar(-55);
+
+ //Generate source string does not contain old char
+ int length = GetInt32(c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ int index = 0;
+ char ch;
+ strSrc = string.Empty;
+ while (index < length)
+ {
+ ch = TestLibrary.Generator.GetChar(-55);
+ if (oldChar == ch)
+ {
+ continue;
+ }
+ strSrc += ch.ToString();
+ index++;
+ }
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strReplaced = strSrc.Replace(oldChar, newChar);
+
+ //New update: modified by Noter(v-yaduoj) 8-10-2006
+ actualValue = (0 == string.CompareOrdinal(strReplaced, strSrc));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, oldChar, newChar);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, oldChar, newChar));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = @"PosTest3: Old char exists in source string, new char is \0 ";
+ const string c_TEST_ID = "P003";
+
+ string strSrc;
+ char oldChar, newChar;
+ bool condition1 = false; //Verify the length invariant
+ bool condition2 = false; //Verify to replace correctly
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ oldChar = strSrc[TestLibrary.Generator.GetInt32(-55) % strSrc.Length];
+ newChar = '\0';
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strReplaced = strSrc.Replace(oldChar, newChar);
+
+ condition1 = (strReplaced.Length == strSrc.Length);
+ if (condition1)
+ {
+ condition2 = true;
+ for (int i = 0; i < strReplaced.Length; i++)
+ {
+ //Delete the incorrect check logic
+ // new update 8-10-2006, Noter(v-yaduoj)
+ if (strSrc[i] == oldChar)
+ {
+ condition2 = (strReplaced[i] == newChar) && condition2;
+ }
+ else
+ {
+ condition2 = (strSrc[i] == strReplaced[i]) && condition2;
+ }
+ }// end for
+ } // end if
+
+ actualValue = condition1 && condition2;
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, oldChar, newChar);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, oldChar, newChar));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //Zero weight character '\u0400'
+ // new update 8-10-2006, Noter(v-yaduoj)
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = @"PosTest4: Old char '\u0400' is zero weight character, random new char";
+ const string c_TEST_ID = "P004";
+
+ string strSrc;
+ char oldChar, newChar;
+ bool condition1 = false; //Verify the length invariant
+ bool condition2 = false; //Verify to replace correctly
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ oldChar = '\u0400';
+ newChar = TestLibrary.Generator.GetChar(-55);
+
+ //Generate source string contains '\u0400'
+ int length = GetInt32(c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ char[] chs = new char[length];
+
+ strSrc = oldChar.ToString();
+ for (int i, index = 1; index < length; index++)
+ {
+ i = TestLibrary.Generator.GetInt32(-55) % 6;
+ if (4 == i)
+ {
+ strSrc += oldChar.ToString();
+ }
+ else
+ {
+ strSrc += TestLibrary.Generator.GetChar(-55);
+ }
+ }
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strReplaced = strSrc.Replace(oldChar, newChar);
+
+ condition1 = (strReplaced.Length == strSrc.Length);
+ if (condition1)
+ {
+ condition2 = true;
+ for (int i = 0; i < strReplaced.Length; i++)
+ {
+ if (strSrc[i] == oldChar)
+ {
+ condition2 = (strReplaced[i] == newChar) && condition2;
+ }
+ else
+ {
+ condition2 = (strSrc[i] == strReplaced[i]) && condition2;
+ }
+ }// end for
+ } // end if
+
+ actualValue = condition1 && condition2;
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, oldChar, newChar);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, oldChar, newChar));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper methods for generating test data
+
+ private bool GetBoolean()
+ {
+ Int32 i = this.GetInt32(1, 2);
+ return (i == 1) ? true : false;
+ }
+
+ //Get a non-negative integer between minValue and maxValue
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ private Int32 Min(Int32 i1, Int32 i2)
+ {
+ return (i1 <= i2) ? i1 : i2;
+ }
+
+ private Int32 Max(Int32 i1, Int32 i2)
+ {
+ return (i1 >= i2) ? i1 : i2;
+ }
+
+ #endregion
+
+ private string GetDataString(string strSrc, char oldChar, char newChar)
+ {
+ string str1, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+ str += string.Format("\n[Old char]\n{0}", oldChar);
+ str += string.Format("\n[New char]\n{0}", newChar);
+
+ return str;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringreplace2.cs b/tests/src/CoreMangLib/cti/system/string/stringreplace2.cs
new file mode 100644
index 0000000000..f6a44b4d5c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringreplace2.cs
@@ -0,0 +1,374 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// String.Replace(String, String)
+/// Replaces all occurrences of a specified Unicode character in this instance
+/// with another specified Unicode character.
+/// </summary>
+public class StringReplace2
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ public static int Main()
+ {
+ StringReplace2 sr = new StringReplace2();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: System.String.Replace(String, String)");
+ if(sr.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarios
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Source string contains old string.";
+ const string c_TEST_ID = "P001";
+
+ string strSrc;
+ string oldStr, newStr;
+ bool condition;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ //Initialize the parameters
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ int startIndex;
+ startIndex = GetInt32(0, strSrc.Length - 1);
+ oldStr = strSrc.Substring(startIndex, GetInt32(1, strSrc.Length - startIndex));
+ newStr = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strReplaced = strSrc.Replace(oldStr, newStr);
+
+ string subStrOld, subStrNew;
+ int oldIndex = 0;
+ int newIndex;
+ int maxValidIndex = strReplaced.Length - newStr.Length;
+ condition = true;
+ // compare string replaed and source string
+ for (newIndex = 0; newIndex < maxValidIndex; )
+ {
+ subStrNew = strReplaced.Substring(newIndex, newStr.Length);
+
+ if(0 == string.CompareOrdinal(subStrNew, newStr))
+ {
+ subStrOld = strSrc.Substring(oldIndex, oldStr.Length);
+ condition = (0 == string.CompareOrdinal(subStrOld, oldStr)) && condition;
+ oldIndex += oldStr.Length;
+ newIndex += newStr.Length;
+ }
+ else
+ {
+ condition = (strReplaced[newIndex] == strSrc[oldIndex]) && condition;
+ oldIndex++;
+ newIndex++;
+ }
+ }
+
+ actualValue = condition;
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, oldStr, newStr);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, oldStr, newStr));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Source string does not contain old string.";
+ const string c_TEST_ID = "P002";
+
+ string strSrc;
+ string oldStr, newStr;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ //Initialize the parameters
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ oldStr = strSrc + TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ newStr = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strReplaced = strSrc.Replace(oldStr, newStr);
+
+ actualValue = (0 == string.CompareOrdinal(strSrc, strReplaced));
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, oldStr, newStr);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, oldStr, newStr));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //new update added by Noter(v-yaduoj) 8-10-2006
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest3: Source string contains old string, replace with \"\\0\"";
+ const string c_TEST_ID = "P003";
+
+ string strSrc;
+ string oldStr, newStr;
+ bool condition;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ //Initialize the parameters
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ int startIndex;
+ startIndex = GetInt32(0, strSrc.Length - 1);
+ oldStr = strSrc.Substring(startIndex, GetInt32(1, strSrc.Length - startIndex));
+ newStr = "\0";
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string strReplaced = strSrc.Replace(oldStr, newStr);
+
+ string subStrOld, subStrNew;
+ int oldIndex = 0;
+ int newIndex;
+ int maxValidIndex = strReplaced.Length - newStr.Length;
+ condition = true;
+ // compare string replaed and source string
+ for (newIndex = 0; newIndex < maxValidIndex; )
+ {
+ subStrNew = strReplaced.Substring(newIndex, newStr.Length);
+
+ if (0 == string.CompareOrdinal(subStrNew, newStr))
+ {
+ subStrOld = strSrc.Substring(oldIndex, oldStr.Length);
+ condition = (0 == string.CompareOrdinal(subStrOld, oldStr)) && condition;
+ oldIndex += oldStr.Length;
+ newIndex += newStr.Length;
+ }
+ else
+ {
+ condition = (strReplaced[newIndex] == strSrc[oldIndex]) && condition;
+ oldIndex++;
+ newIndex++;
+ }
+ }
+
+ actualValue = condition;
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, oldStr, newStr);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, oldStr, newStr));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Negative test scenarios
+
+ //ArgumentNullException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: old string value is null reference.";
+ const string c_TEST_ID = "N001";
+
+ string strSrc;
+ string oldStr, newStr;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ oldStr = null;
+ newStr = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ strSrc.Replace(oldStr, newStr);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, "ArgumentNullException is not thrown as expected." + GetDataString(strSrc, oldStr, newStr));
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {}
+ catch(Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, oldStr, newStr));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ //ArgumentException
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: old string value is String.Empty";
+ const string c_TEST_ID = "N002";
+
+ string strSrc;
+ string oldStr, newStr;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ oldStr = String.Empty;
+ newStr = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ strSrc.Replace(oldStr, newStr);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, "ArgumentException is not thrown as expected." + GetDataString(strSrc, oldStr, newStr));
+ retVal = false;
+ }
+ catch (ArgumentException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, oldStr, newStr));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper methods for generating test data
+
+ private bool GetBoolean()
+ {
+ Int32 i = this.GetInt32(1, 2);
+ return (i == 1) ? true : false;
+ }
+
+ //Get a non-negative integer between minValue and maxValue
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ private Int32 Min(Int32 i1, Int32 i2)
+ {
+ return (i1 <= i2) ? i1 : i2;
+ }
+
+ private Int32 Max(Int32 i1, Int32 i2)
+ {
+ return (i1 >= i2) ? i1 : i2;
+ }
+
+ #endregion
+
+ private string GetDataString(string strSrc, string oldStr, string newStr)
+ {
+ string str1, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+ str += string.Format("\n[Old string]\n{0}", oldStr);
+ str += string.Format("\n[New string]\n{0}", newStr);
+
+ return str;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringsplit1.cs b/tests/src/CoreMangLib/cti/system/string/stringsplit1.cs
new file mode 100644
index 0000000000..8113de738c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringsplit1.cs
@@ -0,0 +1,401 @@
+using System;
+
+/// <summary>
+/// String.Split(params Char[])
+/// Returns a String array containing the substrings in this
+/// instance that are delimited by elements of a specified Char array.
+/// </summary>
+public class StringSplit1
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ public static int Main()
+ {
+ StringSplit1 sr = new StringSplit1();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: System.String.Split(params Char[])");
+ if (sr.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ //while (sr.RunTests() != false)
+ //{ }
+ //return 0;
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ //TestLibrary.TestFramework.LogInformation("[Negative]");
+
+ return retVal;
+ }
+
+ #region Positive test scenarios
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Random old char random new char.";
+ const string c_TEST_ID = "P001";
+
+ string strSrc, delimiterStr;
+ char[] separator;
+ bool condition = false;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, 10, 10);
+ //strSrc = "?ÏÀÈ¡?????a¤T";
+ delimiterStr = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ //delimiterStr = new string('a', 5);
+ separator = new char[delimiterStr.Length];
+ for (int i = 0; i < delimiterStr.Length; i++)
+ {
+ separator[i] = delimiterStr[i];
+ }
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string[] strs = strSrc.Split(separator);
+
+ string subStrSrc;
+ int indexSrc;
+ int indexStrsArray = 0;
+
+ condition = true; //
+ // compare string array after splitting and source string
+ for (indexSrc = 0; indexSrc < strSrc.Length; )
+ {
+ if (delimiterStr.Contains(strSrc[indexSrc].ToString())) //Begin if
+ {
+ bool adjacent =
+ ((0 < indexSrc)
+ && (indexSrc < strSrc.Length - 1)
+ && (delimiterStr.Contains(strSrc[indexSrc + 1].ToString())));
+
+ if ((0 == indexSrc) || ((strSrc.Length - 1) == indexSrc))
+ {
+ condition = (0 == string.CompareOrdinal(strs[indexStrsArray], string.Empty)) && condition;
+ indexSrc++;
+ indexStrsArray++;
+ continue;
+ }
+ if (adjacent)
+ {
+ condition = (0 == string.CompareOrdinal(strs[indexStrsArray], string.Empty)) && condition;
+ indexSrc += 2;
+ indexStrsArray++;
+ continue;
+ }
+ indexSrc++;
+ }
+ else
+ {
+ subStrSrc = strSrc.Substring(indexSrc, strs[indexStrsArray].Length); //error
+ condition = (0 == string.CompareOrdinal(subStrSrc, strs[indexStrsArray])) && condition;
+ indexSrc += strs[indexStrsArray].Length;
+ indexStrsArray++;
+ } //End if
+ }
+
+ actualValue = condition;
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, separator);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, separator));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Adjacent delimiters exist in the source string";
+ const string c_TEST_ID = "P002";
+
+ string strSrc, delimiterStr;
+ int j;
+ char[] separator;
+ bool condition = false;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, 10, 10);
+ j = GetInt32(1, strSrc.Length - 2);
+ delimiterStr = strSrc.Substring(j, 2);
+ //delimiterStr = new string('a', 5);
+ separator = new char[delimiterStr.Length];
+ for (int i = 0; i < delimiterStr.Length; i++)
+ {
+ separator[i] = delimiterStr[i];
+ }
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string[] strs = strSrc.Split(separator);
+
+ string subStrSrc;
+ int indexSrc;
+ int indexStrsArray = 0;
+
+ condition = true; //
+ // compare string array after splitting and source string
+ for (indexSrc = 0; indexSrc < strSrc.Length; )
+ {
+ if (delimiterStr.Contains(strSrc[indexSrc].ToString())) //Begin if
+ {
+ bool adjacent =
+ ((0 < indexSrc)
+ && (indexSrc < strSrc.Length - 1)
+ && (delimiterStr.Contains(strSrc[indexSrc + 1].ToString())));
+
+ if ((0 == indexSrc) || ((strSrc.Length - 1) == indexSrc))
+ {
+ condition = (0 == string.CompareOrdinal(strs[indexStrsArray], string.Empty)) && condition;
+ indexSrc++;
+ indexStrsArray++;
+ continue;
+ }
+ if (adjacent)
+ {
+ condition = (0 == string.CompareOrdinal(strs[indexStrsArray], string.Empty)) && condition;
+ indexSrc += 2;
+ indexStrsArray++;
+ continue;
+ }
+ indexSrc++;
+ }
+ else
+ {
+ subStrSrc = strSrc.Substring(indexSrc, strs[indexStrsArray].Length); //error
+ condition = (0 == string.CompareOrdinal(subStrSrc, strs[indexStrsArray])) && condition;
+ indexSrc += strs[indexStrsArray].Length;
+ indexStrsArray++;
+ } //End if
+ }
+
+ actualValue = condition;
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, separator);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, separator));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest3: Separator char array is a null reference";
+ const string c_TEST_ID = "P003";
+
+ string strSrc, delimiterStr;
+ char[] separator;
+ bool condition = false;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ strSrc = "\tWEre\t\rasdfsdf\n\nweer\r23123\t456\v\x0020678op~";
+ delimiterStr = null;
+ separator = null;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string[] strs = strSrc.Split(separator);
+
+ delimiterStr = "\n\r\t\v\x0020";
+ separator = new char[delimiterStr.Length];
+ for (int i = 0; i < delimiterStr.Length; i++)
+ {
+ separator[i] = delimiterStr[i];
+ }
+
+ string subStrSrc;
+ int indexSrc;
+ int indexStrsArray = 0;
+
+ condition = true; //
+ // compare string array after splitting and source string
+ for (indexSrc = 0; indexSrc < strSrc.Length; )
+ {
+ if (delimiterStr.Contains(strSrc[indexSrc].ToString())) //Begin if
+ {
+ bool adjacent =
+ ((0 < indexSrc)
+ && (indexSrc < strSrc.Length - 1)
+ && (delimiterStr.Contains(strSrc[indexSrc + 1].ToString())));
+
+ if ((0 == indexSrc) || ((strSrc.Length - 1) == indexSrc))
+ {
+ condition = (0 == string.CompareOrdinal(strs[indexStrsArray], string.Empty)) && condition;
+ indexSrc++;
+ indexStrsArray++;
+ continue;
+ }
+ if (adjacent)
+ {
+ condition = (0 == string.CompareOrdinal(strs[indexStrsArray], string.Empty)) && condition;
+ indexSrc += 2;
+ indexStrsArray++;
+ continue;
+ }
+ indexSrc++;
+ }
+ else
+ {
+ subStrSrc = strSrc.Substring(indexSrc, strs[indexStrsArray].Length); //error
+ condition = (0 == string.CompareOrdinal(subStrSrc, strs[indexStrsArray])) && condition;
+ indexSrc += strs[indexStrsArray].Length;
+ indexStrsArray++;
+ } //End if
+ }
+
+ actualValue = condition;
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, separator);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, separator));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper methods for generating test data
+
+ private bool GetBoolean()
+ {
+ Int32 i = this.GetInt32(1, 2);
+ return (i == 1) ? true : false;
+ }
+
+ //Get a non-negative integer between minValue and maxValue
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ private Int32 Min(Int32 i1, Int32 i2)
+ {
+ return (i1 <= i2) ? i1 : i2;
+ }
+
+ private Int32 Max(Int32 i1, Int32 i2)
+ {
+ return (i1 >= i2) ? i1 : i2;
+ }
+
+ #endregion
+
+ private string GetDataString(string strSrc, char[] separator)
+ {
+ string str1, str, str2;
+ int len1, len2;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ if (null == separator)
+ {
+ str2 = "white-space";
+ len2 = 0;
+ }
+ else
+ {
+ str2 = string.Empty;
+ for (int i = 0; i < separator.Length; i++)
+ {
+ str2 += separator[i].ToString();
+ }
+ len2 = separator.Length;
+ }
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+ str += string.Format("\n[Sepator char array]\n{0}", str2);
+ str += string.Format("\n[Sepator char array's length]\n{0}", len2);
+
+ return str;
+ }
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/string/stringsubstring1.cs b/tests/src/CoreMangLib/cti/system/string/stringsubstring1.cs
new file mode 100644
index 0000000000..18b1860bac
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringsubstring1.cs
@@ -0,0 +1,276 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// String.SubString(Int32)
+/// Retrieves a substring from this instance. The substring starts at a specified character position.
+/// </summary>
+public class StringSubString1
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ public static int Main()
+ {
+ StringSubString1 sss = new StringSubString1();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: System.String.SubString(Int32)");
+ if(sss.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarios
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Start index is valid random value.";
+ const string c_TEST_ID = "P001";
+
+ string strSrc;
+ int startIndex;
+ bool condition = false;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ //Initialize the parameters
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ startIndex = TestLibrary.Generator.GetInt32(-55) % (strSrc.Length);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string subStr = strSrc.Substring(startIndex);
+
+ condition = true;
+ for (int i = 0; i < subStr.Length; i++)
+ {
+ condition = (subStr[i] == strSrc[i + startIndex]) && condition;
+ }
+
+ actualValue = condition;
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, startIndex);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: startIndex equals the length of this instance.";
+ const string c_TEST_ID = "P002";
+
+ string strSrc;
+ int startIndex;
+ bool condition = false;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ //Initialize the parameters
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ startIndex = strSrc.Length;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string subStr = strSrc.Substring(startIndex);
+ condition = (0 == String.CompareOrdinal(string.Empty, subStr));
+ actualValue = condition;
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, startIndex);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Negative test scenarios
+
+ //ArgumentOutOfRangeException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: Start index is negative";
+ const string c_TEST_ID = "N001";
+
+ string strSrc;
+ int startIndex;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ startIndex = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ strSrc.Substring(startIndex);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected." + GetDataString(strSrc, startIndex));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {}
+ catch(Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: Start index is greater than string length";
+ const string c_TEST_ID = "N002";
+
+ string strSrc;
+ int startIndex;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ startIndex = GetInt32(strSrc.Length + 1, Int32.MaxValue);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ strSrc.Substring(startIndex);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected." + GetDataString(strSrc, startIndex));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper methods for generating test data
+
+ private bool GetBoolean()
+ {
+ Int32 i = this.GetInt32(1, 2);
+ return (i == 1) ? true : false;
+ }
+
+ //Get a non-negative integer between minValue and maxValue
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ private Int32 Min(Int32 i1, Int32 i2)
+ {
+ return (i1 <= i2) ? i1 : i2;
+ }
+
+ private Int32 Max(Int32 i1, Int32 i2)
+ {
+ return (i1 >= i2) ? i1 : i2;
+ }
+
+ #endregion
+
+ private string GetDataString(string strSrc, int startIndex)
+ {
+ string str1, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+ str += string.Format("\n[Start index]\n{0}", startIndex);
+
+ return str;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringsubstring2.cs b/tests/src/CoreMangLib/cti/system/string/stringsubstring2.cs
new file mode 100644
index 0000000000..77d0836d52
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringsubstring2.cs
@@ -0,0 +1,355 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// String.SubString(Int32, Int32)
+/// Retrieves a substring from this instance.
+/// The substring starts at a specified character position and has a specified length.
+/// </summary>
+public class StringSubString2
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ public static int Main()
+ {
+ StringSubString2 sss = new StringSubString2();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: System.String.SubString(Int32, Int32)");
+ if(sss.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarios
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Valid random start index, valid random substring's length";
+ const string c_TEST_ID = "P001";
+
+ string strSrc;
+ int startIndex;
+ int length;
+ bool condition = false;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ //Initialize the parameters
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ startIndex = TestLibrary.Generator.GetInt32(-55) % (strSrc.Length);
+ length = TestLibrary.Generator.GetInt32(-55) % (strSrc.Length + 1 - startIndex);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string subStr = strSrc.Substring(startIndex, length);
+
+ condition = true;
+ for (int i = 0; i < subStr.Length; i++)
+ {
+ condition = (subStr[i] == strSrc[i + startIndex]) && condition;
+ }
+
+ actualValue = condition;
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, startIndex, length);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex, length));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2:startIndex equals source string's length and substring length is zero";
+ const string c_TEST_ID = "P002";
+
+ string strSrc;
+ int startIndex;
+ int length;
+ bool condition = false;
+ bool expectedValue = true;
+ bool actualValue = false;
+
+ //Initialize the parameters
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ startIndex = strSrc.Length;
+ length = 0;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string subStr = strSrc.Substring(startIndex, length);
+ condition = (0 == string.CompareOrdinal(subStr, string.Empty));
+
+ actualValue = condition;
+ if (actualValue != expectedValue)
+ {
+ string errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ errorDesc += GetDataString(strSrc, startIndex, length);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex, length));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Negative test scenarios
+
+ //ArgumentOutOfRangeException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: Start index is negative";
+ const string c_TEST_ID = "N001";
+
+ string strSrc;
+ int startIndex;
+ int length;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ startIndex = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+ length = TestLibrary.Generator.GetInt32(-55) % (strSrc.Length + 1);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ strSrc.Substring(startIndex, length);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected." + GetDataString(strSrc, startIndex, length));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {}
+ catch(Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex, length));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: Substring's length is negative";
+ const string c_TEST_ID = "N002";
+
+ string strSrc;
+ int startIndex;
+ int length;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ startIndex = TestLibrary.Generator.GetInt32(-55) % (strSrc.Length);
+ length = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ strSrc.Substring(startIndex, length);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected." + GetDataString(strSrc, startIndex, length));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex, length));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest3: valid startIndex, too great length \n Their sum is greater than source string's length";
+ const string c_TEST_ID = "N003";
+
+ string strSrc;
+ int startIndex;
+ int length;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ startIndex = TestLibrary.Generator.GetInt32(-55) % (strSrc.Length);
+ length = GetInt32(strSrc.Length - startIndex + 1, Int32.MaxValue);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ strSrc.Substring(startIndex, length);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected." + GetDataString(strSrc, startIndex, length));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex, length));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest4: Valid length, too great start index \n Their sum is greater than string's length";
+ const string c_TEST_ID = "N004";
+
+ string strSrc;
+ int startIndex;
+ int length;
+
+ strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ length = TestLibrary.Generator.GetInt32(-55) % (strSrc.Length + 1);
+ startIndex = GetInt32(strSrc.Length - length + 1, Int32.MaxValue);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ strSrc.Substring(startIndex, length);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected." + GetDataString(strSrc, startIndex, length));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex, length));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region helper methods for generating test data
+
+ private bool GetBoolean()
+ {
+ Int32 i = this.GetInt32(1, 2);
+ return (i == 1) ? true : false;
+ }
+
+ //Get a non-negative integer between minValue and maxValue
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ private Int32 Min(Int32 i1, Int32 i2)
+ {
+ return (i1 <= i2) ? i1 : i2;
+ }
+
+ private Int32 Max(Int32 i1, Int32 i2)
+ {
+ return (i1 >= i2) ? i1 : i2;
+ }
+
+ #endregion
+
+ private string GetDataString(string strSrc, int startIndex, int length)
+ {
+ string str1, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+ str += string.Format("\n[Start index]\n{0}", startIndex);
+ str += string.Format("\n[Substring's length]\n{0}", length);
+
+ return str;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/string/stringtochararray.cs b/tests/src/CoreMangLib/cti/system/string/stringtochararray.cs
new file mode 100644
index 0000000000..6830b0ccea
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringtochararray.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// String.ToCharArray()
+/// </summary>
+public class StringToCharArray
+{
+ private int c_MAX_STRING_LENGTH = 256;
+
+ public static int Main()
+ {
+ StringToCharArray stca = new StringToCharArray();
+ TestLibrary.TestFramework.BeginTestCase("StringToCharArray");
+
+ if (stca.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string strA;
+ char[]ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: empty string ToCharArray");
+ try
+ {
+ strA = string.Empty;
+ ActualResult = strA.ToCharArray();
+ char[] Expect = new char[0];
+ if (ActualResult.ToString()!= Expect.ToString() || ActualResult.Length !=0)
+ {
+ TestLibrary.TestFramework.LogError("001", "empty string ToCharArray ActualResult is not the ExpectResult");
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string strA = "";
+ char[] ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2 : normal string ToCharArray");
+ try
+ {
+ char[] Expect = new char[256];
+ for (int i = 0; i < c_MAX_STRING_LENGTH; i++)
+ {
+ char charA = TestLibrary.Generator.GetChar(-55);
+ Expect[i] = charA;
+ strA += charA.ToString();
+ }
+ ActualResult = strA.ToCharArray();
+ for (int j = 0; j < ActualResult.Length; j++)
+ {
+ if (ActualResult[j] != Expect[j])
+ {
+ TestLibrary.TestFramework.LogError("001", "normal string ToCharArray ActualResult is not ExpectResult");
+ retVal = false;
+ break;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringtostring1.cs b/tests/src/CoreMangLib/cti/system/string/stringtostring1.cs
new file mode 100644
index 0000000000..2366cd4261
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringtostring1.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// String.ToString()
+/// </summary>
+public class StringToString1
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ public static int Main()
+ {
+ StringToString1 sts1 = new StringToString1();
+ TestLibrary.TestFramework.BeginTestCase("StringToString1");
+
+ if (sts1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string strA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: normal string ToString()");
+ try
+ {
+ strA = string.Empty;
+ ActualResult = strA.ToString();
+ if (ActualResult != string.Empty || !(object.ReferenceEquals(strA, ActualResult)))
+ {
+ TestLibrary.TestFramework.LogError("001", "normal string ToString() ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string strA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: empty string ToString()");
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ ActualResult = strA.ToString();
+ char[] charStrA = strA.ToCharArray();
+ char[] charActual = ActualResult.ToCharArray();
+ for (int i = 0; strA.Length > i; i++)
+ {
+ if (charStrA[i] != charActual[i])
+ {
+ TestLibrary.TestFramework.LogError("001", "normal string ToString() ActualResult is not the ExpectResult");
+ retVal = false;
+ break;
+ }
+ }
+ if (!object.ReferenceEquals(strA, ActualResult))
+ {
+ TestLibrary.TestFramework.LogError("002", "normal string ToString() ActualResult is not ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringtrim1.cs b/tests/src/CoreMangLib/cti/system/string/stringtrim1.cs
new file mode 100644
index 0000000000..d9008da151
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringtrim1.cs
@@ -0,0 +1,196 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// String.Trim()
+/// </summary>
+public class StringTrim1
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ // U+200B stops being trimmable http://msdn2.microsoft.com/en-us/library/t97s7bs3.aspx
+ // U+FEFF has been deprecate as a trimmable space
+ private string[] spaceStrings = new string[]{"\u0009","\u000A","\u000B","\u000C","\u000D","\u0020",
+ "\u00A0","\u2000","\u2001","\u2002","\u2003","\u2004","\u2005",
+ "\u2006","\u2007","\u2008","\u2009","\u200A","\u3000"};
+
+ public static int Main()
+ {
+ StringTrim1 st1 = new StringTrim1();
+ TestLibrary.TestFramework.BeginTestCase("StringTrim1");
+
+ if (st1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string strA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: empty string trim()");
+
+ try
+ {
+ strA = string.Empty;
+ ActualResult = strA.Trim();
+ if (ActualResult != string.Empty)
+ {
+ TestLibrary.TestFramework.LogError("001", "empty string trim() ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string strA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:normal string trim one");
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ string strB = spaceStrings[this.GetInt32(0, spaceStrings.Length)];
+ string strA1 = strB + "H" + strA + "D" + strB;
+ ActualResult = strA1.Trim();
+ if (ActualResult.ToString() != "H" + strA.ToString() + "D")
+ {
+ TestLibrary.TestFramework.LogError("003", "normal string trim one when space is ("+strB.ToString()+") ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string strA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:normal string trim two");
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ string strB = spaceStrings[this.GetInt32(0, spaceStrings.Length)];
+ string strA1 = strB + "H" + strB + strA + strB+ "D" + strB;
+ ActualResult = strA1.Trim();
+ if (ActualResult.ToString() != "H" + strB + strA.ToString() + strB + "D")
+ {
+ TestLibrary.TestFramework.LogError("005", "normal string trim two ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #region Help method for geting test data
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ private Char GetChar(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return Convert.ToChar(minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return Convert.ToChar(Convert.ToInt32(TestLibrary.Generator.GetChar(-55)) % (maxValue - minValue) + minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+ return Convert.ToChar(minValue);
+ }
+ private string GetString(bool ValidPath, Int32 minValue, Int32 maxValue)
+ {
+ StringBuilder sVal = new StringBuilder();
+ string s;
+
+ if (0 == minValue && 0 == maxValue) return String.Empty;
+ if (minValue > maxValue) return null;
+
+ if (ValidPath)
+ {
+ return TestLibrary.Generator.GetString(-55, ValidPath, minValue, maxValue);
+ }
+ else
+ {
+ int length = this.GetInt32(minValue, maxValue);
+ for (int i = 0; length > i; i++)
+ {
+ char c = this.GetChar(minValue, maxValue);
+ sVal.Append(c);
+ }
+ s = sVal.ToString();
+ return s;
+ }
+
+
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringtrim1b.cs b/tests/src/CoreMangLib/cti/system/string/stringtrim1b.cs
new file mode 100644
index 0000000000..ba2dd7cd76
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringtrim1b.cs
@@ -0,0 +1,202 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// String.Trim()
+/// </summary>
+public class StringTrim1
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ // U+200B stops being trimmable http://msdn2.microsoft.com/en-us/library/t97s7bs3.aspx
+ // U+FEFF has been deprecate as a trimmable space
+ private string[] spaceStrings = new string[]{"\u0009","\u000A","\u000B","\u000C","\u000D","\u0020",
+ "\u00A0","\u2000","\u2001","\u2002","\u2003","\u2004","\u2005",
+ "\u2006","\u2007","\u2008","\u2009","\u200A","\u3000"};
+
+ public static int Main()
+ {
+ StringTrim1 st1 = new StringTrim1();
+ TestLibrary.TestFramework.BeginTestCase("StringTrim1");
+ //while (st1.RunTests())
+ //{
+ // Console.WriteLine(")");
+ //}
+ //return 100;
+ if (st1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string strA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: empty string trim()");
+
+ try
+ {
+ strA = string.Empty;
+ ActualResult = strA.Trim();
+ if (ActualResult != string.Empty)
+ {
+ TestLibrary.TestFramework.LogError("001", "empty string trim() ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string strA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:normal string trim one");
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ int i = this.GetInt32(0, spaceStrings.Length);
+ string strB = spaceStrings[i];
+ string strA1 = strB + "H" + strA + "D" + strB;
+ ActualResult = strA1.Trim();
+ if (ActualResult.ToString() != "H" + strA.ToString() + "D")
+ {
+ TestLibrary.TestFramework.LogError("003", "normal string trim one when space is (" + i + ":'" + strB.ToString() + "') ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string strA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:normal string trim two");
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ int i = this.GetInt32(0, spaceStrings.Length);
+ string strB = spaceStrings[i];
+ string strA1 = strB + "H" + strB + strA + strB+ "D" + strB;
+ ActualResult = strA1.Trim();
+ if (ActualResult.ToString() != "H" + strB + strA.ToString() + strB + "D")
+ {
+ TestLibrary.TestFramework.LogError("005", "normal string trim one when space is ("+i+":'" + strB.ToString() + "') ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #region Help method for geting test data
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ private Char GetChar(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return Convert.ToChar(minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return Convert.ToChar(Convert.ToInt32(TestLibrary.Generator.GetChar(-55)) % (maxValue - minValue) + minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+ return Convert.ToChar(minValue);
+ }
+ private string GetString(bool ValidPath, Int32 minValue, Int32 maxValue)
+ {
+ StringBuilder sVal = new StringBuilder();
+ string s;
+
+ if (0 == minValue && 0 == maxValue) return String.Empty;
+ if (minValue > maxValue) return null;
+
+ if (ValidPath)
+ {
+ return TestLibrary.Generator.GetString(-55, ValidPath, minValue, maxValue);
+ }
+ else
+ {
+ int length = this.GetInt32(minValue, maxValue);
+ for (int i = 0; length > i; i++)
+ {
+ char c = this.GetChar(minValue, maxValue);
+ sVal.Append(c);
+ }
+ s = sVal.ToString();
+ return s;
+ }
+
+
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringtrim2.cs b/tests/src/CoreMangLib/cti/system/string/stringtrim2.cs
new file mode 100644
index 0000000000..88f949f1c5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringtrim2.cs
@@ -0,0 +1,332 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// String.Trim(char[])
+/// </summary>
+public class StringTrim2
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ // U+200B stops being trimmable http://msdn2.microsoft.com/en-us/library/t97s7bs3.aspx
+ // U+FEFF has been deprecate as a trimmable space
+ private string[] spaceStrings = new string[]{"\u0009","\u000A","\u000B","\u000C","\u000D","\u0020",
+ "\u00A0","\u2000","\u2001","\u2002","\u2003","\u2004","\u2005",
+ "\u2006","\u2007","\u2008","\u2009","\u200A","\u3000"};
+
+
+ public static int Main()
+ {
+ StringTrim2 st2 = new StringTrim2();
+ TestLibrary.TestFramework.BeginTestCase("StringTrim2");
+
+ if (st2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ return retVal;
+ }
+ #region PostiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string strA;
+ char[] charA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: empty string trim char[]");
+
+ try
+ {
+ strA = string.Empty;
+ charA = new char[] {TestLibrary.Generator.GetChar(-55),TestLibrary.Generator.GetChar(-55),TestLibrary.Generator.GetChar(-55) };
+ ActualResult = strA.Trim(charA);
+ if (ActualResult != string.Empty)
+ {
+ TestLibrary.TestFramework.LogError("001", "empty string trim char[] ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string strA;
+ char[] charA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:normal string trim char[] one");
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ char char1 = this.GetChar(0, c_MINI_STRING_LENGTH);
+ char char2 = this.GetChar(c_MINI_STRING_LENGTH, c_MINI_STRING_LENGTH + 68);
+ char char3 = this.GetChar(c_MINI_STRING_LENGTH + 68, c_MAX_STRING_LENGTH / 2);
+ char charEnd = this.GetChar(c_MAX_STRING_LENGTH / 2, c_MAX_STRING_LENGTH);
+ charA = new char[] { char1, char2, char3 };
+
+ string strA1 = char1.ToString() + char3.ToString() + charEnd.ToString() + strA + charEnd.ToString();
+ ActualResult = strA1.Trim(charA);
+ if (ActualResult.ToString() != charEnd.ToString() + strA.ToString() + charEnd.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "normal string trim char[] one ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string strA;
+ char[] charA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:normal string trim char[] two");
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ char char1 = this.GetChar(0, c_MINI_STRING_LENGTH);
+ char char2 = this.GetChar(c_MINI_STRING_LENGTH, c_MINI_STRING_LENGTH + 68);
+ char char3 = this.GetChar(c_MAX_STRING_LENGTH + 68, c_MAX_STRING_LENGTH / 2);
+ char charStart = this.GetChar(c_MAX_STRING_LENGTH / 2, c_MAX_STRING_LENGTH);
+ charA = new char[] { char1, char2, char3 };
+
+ string strA1 = charStart.ToString() + strA + charStart.ToString() + char2.ToString() + char3.ToString();
+ ActualResult = strA1.Trim(charA);
+ if (ActualResult.ToString() != charStart.ToString() + strA + charStart.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "normal string trim char[] two ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string strA;
+ char[] charA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4:normal string trim char[] three");
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ char char1 = this.GetChar(0, c_MINI_STRING_LENGTH);
+ char char2 = this.GetChar(c_MINI_STRING_LENGTH, c_MINI_STRING_LENGTH + 68);
+ char char3 = this.GetChar(c_MAX_STRING_LENGTH + 68, c_MAX_STRING_LENGTH / 2);
+ char charStart = this.GetChar(c_MAX_STRING_LENGTH / 2, c_MAX_STRING_LENGTH);
+ charA = new char[] { char1, char2, char3 };
+
+ string strA1 = char1.ToString() + charStart.ToString() + char2.ToString() + strA + charStart.ToString() + char3.ToString();
+ ActualResult = strA1.Trim(charA);
+ if (ActualResult.ToString() != charStart.ToString() + char2.ToString() + strA + charStart.ToString())
+ {
+ TestLibrary.TestFramework.LogError("007", "normal string trim char[] three ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string strA;
+ char[] charA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5:normal string trim char[] four");
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ charA = new char[0];
+ string strB = spaceStrings[this.GetInt32(0,spaceStrings.Length)];
+ string strA1 = strB + "H" + strA + "D";
+ ActualResult = strA1.Trim(charA);
+ if (ActualResult.ToString() != "H" + strA + "D")
+ {
+ TestLibrary.TestFramework.LogError("009", "normal string trim char[] four ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ string strA;
+ char[] charA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6:normal string trim char[] five");
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ charA = new char[0];
+ string strB = spaceStrings[this.GetInt32(0, spaceStrings.Length)];
+ string strA1 = strB + "H" + strB + strA + "D" + strB;
+ ActualResult = strA1.Trim(charA);
+ if (ActualResult.ToString() != "H" + strB + strA + "D")
+ {
+ TestLibrary.TestFramework.LogError("011", "normal string trim char[] five ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ string strA;
+ char[] charA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7:normal string trim char[] six");
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ charA = new char[0];
+ string strB = spaceStrings[this.GetInt32(0, spaceStrings.Length)];
+ string strA1 = "H" + strA + "D" + strB;
+ ActualResult = strA1.Trim(charA);
+ if (ActualResult.ToString() != "H" + strA + "D")
+ {
+ TestLibrary.TestFramework.LogError("013", "normal string trim char[] six ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Help method for geting test data
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ private Char GetChar(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return Convert.ToChar(minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return Convert.ToChar(Convert.ToInt32(TestLibrary.Generator.GetChar(-55)) % (maxValue - minValue) + minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+ return Convert.ToChar(minValue);
+ }
+ private string GetString(bool ValidPath, Int32 minValue, Int32 maxValue)
+ {
+ StringBuilder sVal = new StringBuilder();
+ string s;
+
+ if (0 == minValue && 0 == maxValue) return String.Empty;
+ if (minValue > maxValue) return null;
+
+ if (ValidPath)
+ {
+ return TestLibrary.Generator.GetString(-55, ValidPath, minValue, maxValue);
+ }
+ else
+ {
+ int length = this.GetInt32(minValue, maxValue);
+ for (int i = 0; length > i; i++)
+ {
+ char c = this.GetChar(minValue, maxValue);
+ sVal.Append(c);
+ }
+ s = sVal.ToString();
+ return s;
+ }
+
+
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringtrim3.cs b/tests/src/CoreMangLib/cti/system/string/stringtrim3.cs
new file mode 100644
index 0000000000..76fcb899b6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringtrim3.cs
@@ -0,0 +1,269 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// String.TrimEnd(char[])
+/// </summary>
+public class StringTrim3
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ // U+200B stops being trimmable http://msdn2.microsoft.com/en-us/library/t97s7bs3.aspx
+ // U+FEFF has been deprecate as a trimmable space
+ private string[] spaceStrings = new string[]{"\u0009","\u000A","\u000B","\u000C","\u000D","\u0020",
+ "\u00A0","\u2000","\u2001","\u2002","\u2003","\u2004","\u2005",
+ "\u2006","\u2007","\u2008","\u2009","\u200A","\u3000"};
+
+ public static int Main()
+ {
+ StringTrim3 st3 = new StringTrim3();
+ TestLibrary.TestFramework.BeginTestCase("StringTrim3");
+
+ if (st3.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ return retVal;
+ }
+
+ #region PostiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string strA;
+ char[] charA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: empty string trimEnd char[]");
+
+ try
+ {
+ strA = string.Empty;
+ charA = new char[] { TestLibrary.Generator.GetChar(-55), TestLibrary.Generator.GetChar(-55), TestLibrary.Generator.GetChar(-55) };
+ ActualResult = strA.TrimEnd(charA);
+ if (ActualResult != string.Empty)
+ {
+ TestLibrary.TestFramework.LogError("001", "empty string trimEnd char[] ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string strA;
+ char[] charA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:normal string trimStart char[] one");
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ char char1 = this.GetChar(0, c_MINI_STRING_LENGTH);
+ char char2 = this.GetChar(c_MINI_STRING_LENGTH, c_MINI_STRING_LENGTH + 68);
+ char char3 = this.GetChar(c_MINI_STRING_LENGTH + 68, c_MAX_STRING_LENGTH / 2);
+ char charEnd = this.GetChar(c_MAX_STRING_LENGTH / 2, c_MAX_STRING_LENGTH);
+ charA = new char[] { char1, char2, char3 };
+
+ string strA1 = char1.ToString() + char3.ToString() + strA + charEnd.ToString() + char1.ToString() + char3.ToString();
+ ActualResult = strA1.TrimEnd(charA);
+ if (ActualResult.ToString() != char1.ToString() + char3.ToString() + strA.ToString() + charEnd.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "normal string trimEnd char[] one ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string strA;
+ char[] charA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:normal string trimEnd char[] two");
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ char char1 = this.GetChar(0, c_MINI_STRING_LENGTH);
+ char char2 = this.GetChar(c_MINI_STRING_LENGTH, c_MINI_STRING_LENGTH + 68);
+ char char3 = this.GetChar(c_MAX_STRING_LENGTH + 68, c_MAX_STRING_LENGTH / 2);
+ char charStart = this.GetChar(c_MAX_STRING_LENGTH / 2, c_MAX_STRING_LENGTH);
+ charA = new char[] { char1, char2, char3 };
+
+ string strA1 = char1.ToString() + char3.ToString() + charStart.ToString() + strA + char2.ToString() + charStart.ToString() + char1.ToString() + char3.ToString();
+ ActualResult = strA1.TrimEnd(charA);
+ if (ActualResult.ToString() != char1.ToString() + char3.ToString() + charStart.ToString() + strA + char2.ToString() + charStart.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "normal string trimEnd char[] two ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string strA;
+ char[] charA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4:normal string trimEnd char[] three");
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ charA = new char[0];
+ string strB = spaceStrings[this.GetInt32(0, spaceStrings.Length)];
+ string strA1 = strB + "H" + strA + "D" + strB;
+ ActualResult = strA1.TrimEnd(charA);
+ if (ActualResult.ToString() != strB + "H" + strA + "D")
+ {
+ TestLibrary.TestFramework.LogError("007", "normal string trimEnd char[] three ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string strA;
+ char[] charA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5:normal string trimEnd char[] four");
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ charA = new char[0];
+ string strB = spaceStrings[this.GetInt32(0, spaceStrings.Length)];
+ string strA1 = strB + "H" + strB + strA + "D" + strB;
+ ActualResult = strA1.TrimEnd(charA);
+ if (ActualResult.ToString() != strB + "H" + strB + strA + "D")
+ {
+ TestLibrary.TestFramework.LogError("009", "normal string trimEnd char[] four ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region Help method for geting test data
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ private Char GetChar(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return Convert.ToChar(minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return Convert.ToChar(Convert.ToInt32(TestLibrary.Generator.GetChar(-55)) % (maxValue - minValue) + minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+ return Convert.ToChar(minValue);
+ }
+ private string GetString(bool ValidPath, Int32 minValue, Int32 maxValue)
+ {
+ StringBuilder sVal = new StringBuilder();
+ string s;
+
+ if (0 == minValue && 0 == maxValue) return String.Empty;
+ if (minValue > maxValue) return null;
+
+ if (ValidPath)
+ {
+ return TestLibrary.Generator.GetString(-55, ValidPath, minValue, maxValue);
+ }
+ else
+ {
+ int length = this.GetInt32(minValue, maxValue);
+ for (int i = 0; length > i; i++)
+ {
+ char c = this.GetChar(minValue, maxValue);
+ sVal.Append(c);
+ }
+ s = sVal.ToString();
+ return s;
+ }
+
+
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/string/stringtrim4.cs b/tests/src/CoreMangLib/cti/system/string/stringtrim4.cs
new file mode 100644
index 0000000000..bfbd3bbef1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/string/stringtrim4.cs
@@ -0,0 +1,298 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// String.TrimStart
+/// </summary>
+public class StringTrim4
+{
+ private int c_MINI_STRING_LENGTH = 8;
+ private int c_MAX_STRING_LENGTH = 256;
+
+ // U+200B stops being trimmable http://msdn2.microsoft.com/en-us/library/t97s7bs3.aspx
+ // U+FEFF has been deprecate as a trimmable space
+ private string[] spaceStrings = new string[]{"\u0009","\u000A","\u000B","\u000C","\u000D","\u0020",
+ "\u00A0","\u2000","\u2001","\u2002","\u2003","\u2004","\u2005",
+ "\u2006","\u2007","\u2008","\u2009","\u200A","\u3000"};
+
+ public static int Main()
+ {
+ StringTrim4 st4 = new StringTrim4();
+ TestLibrary.TestFramework.BeginTestCase("StringTrim4");
+
+ if (st4.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ return retVal;
+ }
+
+ #region PostiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string strA;
+ char[] charA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: empty string trimStart char[]");
+
+ try
+ {
+ strA = string.Empty;
+ charA = new char[] { TestLibrary.Generator.GetChar(-55), TestLibrary.Generator.GetChar(-55), TestLibrary.Generator.GetChar(-55) };
+ ActualResult = strA.TrimStart(charA);
+ if (ActualResult != string.Empty)
+ {
+ TestLibrary.TestFramework.LogError("001", "empty string trimStart char[] ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string strA;
+ char[] charA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:normal string trimStart char[] one");
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ char char1 = this.GetChar(0, c_MINI_STRING_LENGTH);
+ char char2 = this.GetChar(c_MINI_STRING_LENGTH, c_MINI_STRING_LENGTH + 68);
+ char char3 = this.GetChar(c_MINI_STRING_LENGTH + 68, c_MAX_STRING_LENGTH / 2);
+ char charEnd = this.GetChar(c_MAX_STRING_LENGTH / 2, c_MAX_STRING_LENGTH);
+ charA = new char[] { char1, char2, char3 };
+
+ string strA1 = char1.ToString() + char3.ToString() + charEnd.ToString() + strA + char1.ToString() + char3.ToString();
+ ActualResult = strA1.TrimStart(charA);
+ if (ActualResult.ToString() != charEnd.ToString() + strA.ToString() + char1.ToString() + char3.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "normal string trimStart char[] one ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string strA;
+ char[] charA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:normal string trimStart char[] two");
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ char char1 = this.GetChar(0, c_MINI_STRING_LENGTH);
+ char char2 = this.GetChar(c_MINI_STRING_LENGTH, c_MINI_STRING_LENGTH + 68);
+ char char3 = this.GetChar(c_MAX_STRING_LENGTH + 68, c_MAX_STRING_LENGTH / 2);
+ char charStart = this.GetChar(c_MAX_STRING_LENGTH / 2, c_MAX_STRING_LENGTH);
+ charA = new char[] { char1, char2, char3 };
+
+ string strA1 = char1.ToString() + char3.ToString() + charStart.ToString() + strA + char2.ToString() + charStart.ToString() + char1.ToString() + char3.ToString();
+ ActualResult = strA1.TrimStart(charA);
+ if (ActualResult.ToString() != charStart.ToString() + strA + char2.ToString() + charStart.ToString() + char1.ToString() + char3.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "normal string trimStart char[] two ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string strA;
+ char[] charA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4:normal string trimStart char[] three");
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ charA = new char[0];
+ string strB = spaceStrings[this.GetInt32(0, spaceStrings.Length)];
+ string strA1 = strB + "H" + strA + "D" + strB;
+ ActualResult = strA1.TrimStart(charA);
+ if (ActualResult.ToString() != "H" + strA + "D" + strB)
+ {
+ TestLibrary.TestFramework.LogError("007", "normal string trimStart char[] three ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string strA;
+ char[] charA;
+ string ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5:normal string trimStart char[] four");
+ try
+ {
+ strA = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ charA = new char[0];
+ string strB = spaceStrings[this.GetInt32(0, spaceStrings.Length)];
+ string strA1 = strB + "H" + strB + strA + "D" + strB;
+ ActualResult = strA1.TrimStart(charA);
+ if (ActualResult.ToString() != "H" + strB + strA + "D" + strB)
+ {
+ TestLibrary.TestFramework.LogError("009", "normal string trimStart char[] four ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ int iCountErrors = 0;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Trim consistent with char.IsWhitespace");
+
+ StringBuilder sb = new StringBuilder();
+ for (char c = char.MinValue; c < char.MaxValue; ++c)
+ {
+ if (char.IsWhiteSpace(c))
+ sb.Append(c);
+ }
+
+ string t = sb.ToString().Trim();
+ for(int i = 0; i<t.Length; i++)
+ {
+ iCountErrors++;
+ TestLibrary.TestFramework.LogError("011", "Failure: " + t[i] + " not trimmed correctly.");
+ }
+
+
+ ///// Finish diagnostics and reporting of results.
+
+ if ( iCountErrors == 0 ) { return true; }
+ else { return false;}
+ }
+
+
+ #endregion
+ #region Help method for geting test data
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ private Char GetChar(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return Convert.ToChar(minValue);
+ }
+ if (minValue < maxValue)
+ {
+ return Convert.ToChar(Convert.ToInt32(TestLibrary.Generator.GetChar(-55)) % (maxValue - minValue) + minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+ return Convert.ToChar(minValue);
+ }
+ private string GetString(bool ValidPath, Int32 minValue, Int32 maxValue)
+ {
+ StringBuilder sVal = new StringBuilder();
+ string s;
+
+ if (0 == minValue && 0 == maxValue) return String.Empty;
+ if (minValue > maxValue) return null;
+
+ if (ValidPath)
+ {
+ return TestLibrary.Generator.GetString(-55, ValidPath, minValue, maxValue);
+ }
+ else
+ {
+ int length = this.GetInt32(minValue, maxValue);
+ for (int i = 0; length > i; i++)
+ {
+ char c = this.GetChar(minValue, maxValue);
+ sVal.Append(c);
+ }
+ s = sVal.ToString();
+ return s;
+ }
+
+
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/stringcompare/StringComparerCtor.csproj b/tests/src/CoreMangLib/cti/system/stringcompare/StringComparerCtor.csproj
new file mode 100644
index 0000000000..3c160f0aff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/stringcompare/StringComparerCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringcomparerctor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/stringcompare/stringcomparerctor.cs b/tests/src/CoreMangLib/cti/system/stringcompare/stringcomparerctor.cs
new file mode 100644
index 0000000000..a620ea2cc6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/stringcompare/stringcomparerctor.cs
@@ -0,0 +1,214 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+
+/// StringComparerActor[v-chche]
+
+/// </summary>
+#region StringComparerCtorTest
+public class StringComparerCtorTest : StringComparer
+{
+
+ public StringComparerCtorTest()
+ : base() { }
+
+ public override bool Equals(object obj)
+ {
+ return false;
+ }
+
+ public override bool Equals(string str1,string str2)
+ {
+ return false;
+ }
+ public override int GetHashCode(string str)
+ {
+ return 0;
+ }
+
+ public override int GetHashCode()
+ {
+ return 0;
+ }
+
+ public override int Compare(string x, string y)
+ {
+ return 0;
+ }
+}
+#endregion
+
+public class StringComparerActor
+{
+
+ #region Public Methods
+
+ public bool RunTests()
+ {
+
+ bool retVal = true;
+
+
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ retVal = PosTest1() && retVal;
+
+
+
+ //
+
+ // TODO: Add your negative test cases here
+
+ //
+
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+
+ // retVal = NegTest1() && retVal;
+
+
+
+ return retVal;
+
+ }
+
+
+
+ #region Positive Test Cases
+
+ public bool PosTest1()
+ {
+
+ bool retVal = true;
+
+
+
+ // Add your scenario description here
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Verify Class StringComparer Ctor");
+
+
+
+ try
+ {
+
+ StringComparer sc = new StringComparerCtorTest();
+ if (sc == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", " StringComparer Ctor Err.");
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+
+ retVal = false;
+
+ }
+
+
+
+ return retVal;
+
+ }
+
+ #endregion
+
+
+
+ #region Nagetive Test Cases
+
+ //public bool NegTest1()
+
+ //{
+
+ // bool retVal = true;
+
+
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+
+
+ // try
+
+ // {
+
+ // //
+
+ // // Add your test logic here
+
+ // //
+
+ // }
+
+ // catch (Exception e)
+
+ // {
+
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+
+ // retVal = false;
+
+ // }
+
+
+
+ // return retVal;
+
+ //}
+
+ #endregion
+
+ #endregion
+
+
+
+ public static int Main()
+ {
+
+ StringComparerActor test = new StringComparerActor();
+
+
+
+ TestLibrary.TestFramework.BeginTestCase("StringComparerActor");
+
+
+
+ if (test.RunTests())
+ {
+
+ TestLibrary.TestFramework.EndTestCase();
+
+ TestLibrary.TestFramework.LogInformation("PASS");
+
+ return 100;
+
+ }
+
+ else
+ {
+
+ TestLibrary.TestFramework.EndTestCase();
+
+ TestLibrary.TestFramework.LogInformation("FAIL");
+
+ return 0;
+
+ }
+
+ }
+
+}
+
+
diff --git a/tests/src/CoreMangLib/cti/system/stringcomparer/StringComparerCompare2.csproj b/tests/src/CoreMangLib/cti/system/stringcomparer/StringComparerCompare2.csproj
new file mode 100644
index 0000000000..773384c155
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/stringcomparer/StringComparerCompare2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringcomparercompare2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/stringcomparer/StringComparerEquals1.csproj b/tests/src/CoreMangLib/cti/system/stringcomparer/StringComparerEquals1.csproj
new file mode 100644
index 0000000000..4d847b42fe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/stringcomparer/StringComparerEquals1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringcomparerequals1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/stringcomparer/StringComparerEquals3.csproj b/tests/src/CoreMangLib/cti/system/stringcomparer/StringComparerEquals3.csproj
new file mode 100644
index 0000000000..d217bd44f8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/stringcomparer/StringComparerEquals3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringcomparerequals3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/stringcomparer/StringComparerGetType.csproj b/tests/src/CoreMangLib/cti/system/stringcomparer/StringComparerGetType.csproj
new file mode 100644
index 0000000000..d0e0732ef9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/stringcomparer/StringComparerGetType.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringcomparergettype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/stringcomparer/stringcomparercompare2.cs b/tests/src/CoreMangLib/cti/system/stringcomparer/stringcomparercompare2.cs
new file mode 100644
index 0000000000..a3b2b91c3d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/stringcomparer/stringcomparercompare2.cs
@@ -0,0 +1,233 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+
+/// StringComparerCompare2[v-chche]
+
+/// </summary>
+public class StringComparerCompare2
+{
+
+ #region Public Methods
+
+ public bool RunTests()
+ {
+
+ bool retVal = true;
+
+
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+
+ }
+
+
+
+ #region Positive Test Cases
+
+ public bool PosTest1()
+ {
+
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Verify method compare(string, string) value ");
+
+
+
+ try
+ {
+
+ StringComparer sc = StringComparer.Ordinal;
+ retVal = VerificationHelper(sc, "a", "a", 0, "001.1") && retVal;
+ retVal = VerificationHelper(sc, null, "a", -1, "001.2") && retVal;
+ retVal = VerificationHelper(sc, "a", null, 1, "001.3") && retVal;
+ retVal = VerificationHelper(sc, "abcd", "abcd", 0, "001.4") && retVal;
+
+
+ }
+
+ catch (Exception e)
+ {
+
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+
+ retVal = false;
+
+ }
+
+
+
+ return retVal;
+
+ }
+ public bool PosTest2()
+ {
+
+ bool retVal = true;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Verify method compare(string, string) value ");
+
+
+
+ try
+ {
+
+ StringComparer sc = StringComparer.Ordinal;
+
+ if (sc.Compare("abc","ab" )<= 0)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Verify method compare(string, string) value Err.");
+
+ retVal = false;
+ }
+
+
+
+
+ }
+
+ catch (Exception e)
+ {
+
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+
+ retVal = false;
+
+ }
+
+
+
+ return retVal;
+
+ }
+ public bool PosTest3()
+ {
+
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Verify method compare(string, string) value ");
+
+
+
+ try
+ {
+
+ StringComparer sc = StringComparer.Ordinal;
+
+ if (sc.Compare("a", "abc") >= 0)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Verify method compare(string, string) value Err.");
+
+ retVal = false;
+ }
+
+
+
+
+ }
+
+ catch (Exception e)
+ {
+
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+
+ retVal = false;
+
+ }
+
+
+
+ return retVal;
+
+ }
+
+
+ #endregion
+
+
+
+
+
+ #endregion
+
+ #region Private Methods
+ private bool VerificationHelper(StringComparer sc, string x, string y, int expected, string errorno)
+ {
+ bool retVal = true;
+
+ int actual = sc.Compare(x, y);
+
+
+
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Compare returns wrong value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE]");
+ retVal = false;
+ }
+ else if (actual < expected)
+ {
+
+
+ }
+
+ return retVal;
+ }
+ #endregion
+
+
+
+ public static int Main()
+ {
+
+ StringComparerCompare2 test = new StringComparerCompare2();
+
+
+
+ TestLibrary.TestFramework.BeginTestCase(" StringComparerCompare2");
+
+
+
+ if (test.RunTests())
+ {
+
+ TestLibrary.TestFramework.EndTestCase();
+
+ TestLibrary.TestFramework.LogInformation("PASS");
+
+ return 100;
+
+ }
+
+ else
+ {
+
+ TestLibrary.TestFramework.EndTestCase();
+
+ TestLibrary.TestFramework.LogInformation("FAIL");
+
+ return 0;
+
+ }
+
+ }
+
+}
+
+
diff --git a/tests/src/CoreMangLib/cti/system/stringcomparer/stringcomparerequals1.cs b/tests/src/CoreMangLib/cti/system/stringcomparer/stringcomparerequals1.cs
new file mode 100644
index 0000000000..b035577b32
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/stringcomparer/stringcomparerequals1.cs
@@ -0,0 +1,174 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+
+/// StringComparerEquals1[v-chche]
+
+/// </summary>
+public class StringComparerEquals1
+{
+
+ #region Public Methods
+
+ public bool RunTests()
+ {
+
+ bool retVal = true;
+
+
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ retVal = PosTest1() && retVal;
+
+
+
+
+
+
+ return retVal;
+
+ }
+
+
+
+ #region Positive Test Cases
+
+ public bool PosTest1()
+ {
+
+ bool retVal = true;
+
+
+
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Verify Method Equal Value . ");
+
+
+
+ try
+ {
+ StringComparer sc = StringComparer.Ordinal;
+ bool expected = true;
+ bool actual = sc.Equals(sc);
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Verify Method Equal Value Err .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+
+ retVal = false;
+
+ }
+
+
+
+ return retVal;
+
+ }
+ public bool PosTest2()
+ {
+
+ bool retVal = true;
+
+
+
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Verify Method Equal Value . ");
+
+
+
+ try
+ {
+ StringComparer sc1 = StringComparer.Ordinal;
+ StringComparer sc2 = StringComparer.CurrentCulture;
+ bool expected = false;
+ bool actual = sc1.Equals(sc2);
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Verify Method Equal Value Err .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+
+ retVal = false;
+
+ }
+
+
+
+ return retVal;
+
+ }
+
+
+ #endregion
+
+
+
+
+ #endregion
+
+
+
+ public static int Main()
+ {
+
+ StringComparerEquals1 test = new StringComparerEquals1();
+
+
+
+ TestLibrary.TestFramework.BeginTestCase("StringComparerEquals1");
+
+
+
+ if (test.RunTests())
+ {
+
+ TestLibrary.TestFramework.EndTestCase();
+
+ TestLibrary.TestFramework.LogInformation("PASS");
+
+ return 100;
+
+ }
+
+ else
+ {
+
+ TestLibrary.TestFramework.EndTestCase();
+
+ TestLibrary.TestFramework.LogInformation("FAIL");
+
+ return 0;
+
+ }
+
+ }
+
+}
+
+
diff --git a/tests/src/CoreMangLib/cti/system/stringcomparer/stringcomparerequals3.cs b/tests/src/CoreMangLib/cti/system/stringcomparer/stringcomparerequals3.cs
new file mode 100644
index 0000000000..712df51ccf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/stringcomparer/stringcomparerequals3.cs
@@ -0,0 +1,190 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+
+/// StringComparerEquals3[v-chche]
+
+/// </summary>
+public class StringComparerEquals3
+{
+
+ #region Public Methods
+
+ public bool RunTests()
+ {
+
+ bool retVal = true;
+
+
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+
+
+
+
+
+ return retVal;
+
+ }
+
+
+
+ #region Positive Test Cases
+
+ public bool PosTest1()
+ {
+
+ bool retVal = true;
+
+
+
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Verify Method Equals .");
+
+
+
+ try
+ {
+
+ StringComparer sc = StringComparer.CurrentCulture;
+ string st1 = "aa";
+ string st2 = "aa";
+ string st3 = "";
+ string st4 = "";
+ string st5 = "12a_b";
+ string st6 = "12a_b";
+ bool expected1 = sc.Equals(st1, st2);
+ bool expected2 = sc.Equals(st3, st4);
+ bool expected3 = sc.Equals(st5, st6);
+ bool expected = expected1 && expected2 && expected3;
+ bool actual = true;
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Verify Method Equal Value Err .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+
+ retVal = false;
+
+ }
+
+
+
+ return retVal;
+
+ }
+ public bool PosTest2()
+ {
+
+ bool retVal = true;
+
+
+
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Verify Method Equals .");
+
+
+
+ try
+ {
+
+ StringComparer sc = StringComparer.CurrentCulture;
+ string st1 = "aa";
+ string st2 = "ab_";
+ string st3 = "";
+ string st4 = "-";
+ bool expected1 = sc.Equals(st1, st2);
+ bool expected2 = sc.Equals(st3, st4);
+ bool expected = expected1 && expected2;
+ bool actual = false;
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Verify Method Equal Value Err .");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+
+ }
+
+ catch (Exception e)
+ {
+
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+
+ retVal = false;
+
+ }
+
+
+
+ return retVal;
+
+ }
+
+ #endregion
+
+
+
+
+ #endregion
+
+
+
+ public static int Main()
+ {
+
+ StringComparerEquals3 test = new StringComparerEquals3();
+
+
+
+ TestLibrary.TestFramework.BeginTestCase("StringComparerEquals3");
+
+
+
+ if (test.RunTests())
+ {
+
+ TestLibrary.TestFramework.EndTestCase();
+
+ TestLibrary.TestFramework.LogInformation("PASS");
+
+ return 100;
+
+ }
+
+ else
+ {
+
+ TestLibrary.TestFramework.EndTestCase();
+
+ TestLibrary.TestFramework.LogInformation("FAIL");
+
+ return 0;
+
+ }
+
+ }
+
+}
+
+
diff --git a/tests/src/CoreMangLib/cti/system/stringcomparer/stringcomparergettype.cs b/tests/src/CoreMangLib/cti/system/stringcomparer/stringcomparergettype.cs
new file mode 100644
index 0000000000..2a035279d8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/stringcomparer/stringcomparergettype.cs
@@ -0,0 +1,213 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+/// <summary>
+
+/// StringComparerGetType[v-chche]
+
+/// </summary>
+#pragma warning disable
+#region StringComparerCtorTest
+public class StringComparerTest : StringComparer
+{
+
+ public StringComparerTest()
+ : base() { }
+
+
+ public override bool Equals(object obj)
+ {
+ return false;
+ }
+
+ public override bool Equals(string str1, string str2)
+ {
+ return false;
+ }
+ public override int GetHashCode(string str)
+ {
+ return 0;
+ }
+
+ public override int GetHashCode()
+ {
+ return 0;
+ }
+
+ public override int Compare(string x, string y)
+ {
+ return 0;
+ }
+}
+#endregion
+
+public class StringComparerGetType
+{
+
+ #region Public Methods
+
+ public bool RunTests()
+ {
+
+ bool retVal = true;
+
+
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ retVal = PosTest1() && retVal;
+
+
+
+
+
+
+
+ return retVal;
+
+ }
+
+
+
+ #region Positive Test Cases
+
+ public bool PosTest1()
+ {
+
+ bool retVal = true;
+
+
+
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Verify Method GetType. ");
+
+
+
+ try
+ {
+
+ StringComparerTest sc1 = new StringComparerTest();
+
+
+ if (sc1.GetType() != typeof(StringComparerTest))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Verify Method GetType Err.");
+
+ retVal = false;
+
+ }
+
+
+ }
+
+ catch (Exception e)
+ {
+
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+
+ retVal = false;
+
+ }
+
+
+
+ return retVal;
+
+ }
+
+ #endregion
+
+
+
+ #region Nagetive Test Cases
+
+ //public bool NegTest1()
+
+ //{
+
+ // bool retVal = true;
+
+
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+
+
+ // try
+
+ // {
+
+ // //
+
+ // // Add your test logic here
+
+ // //
+
+ // }
+
+ // catch (Exception e)
+
+ // {
+
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+
+ // retVal = false;
+
+ // }
+
+
+
+ // return retVal;
+
+ //}
+
+ #endregion
+
+ #endregion
+
+
+
+ public static int Main()
+ {
+
+ StringComparerGetType test = new StringComparerGetType();
+
+
+
+ TestLibrary.TestFramework.BeginTestCase("StringComparerGetType");
+
+
+
+ if (test.RunTests())
+ {
+
+ TestLibrary.TestFramework.EndTestCase();
+
+ TestLibrary.TestFramework.LogInformation("PASS");
+
+ return 100;
+
+ }
+
+ else
+ {
+
+ TestLibrary.TestFramework.EndTestCase();
+
+ TestLibrary.TestFramework.LogInformation("FAIL");
+
+ return 0;
+
+ }
+
+ }
+
+}
+
+
diff --git a/tests/src/CoreMangLib/cti/system/stringcomparison/StringComparisonCurrentCulture.csproj b/tests/src/CoreMangLib/cti/system/stringcomparison/StringComparisonCurrentCulture.csproj
new file mode 100644
index 0000000000..f1afe69027
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/stringcomparison/StringComparisonCurrentCulture.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringcomparisoncurrentculture.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/stringcomparison/StringComparisonCurrentCultureIgnoreCase.csproj b/tests/src/CoreMangLib/cti/system/stringcomparison/StringComparisonCurrentCultureIgnoreCase.csproj
new file mode 100644
index 0000000000..92c9505181
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/stringcomparison/StringComparisonCurrentCultureIgnoreCase.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringcomparisoncurrentcultureignorecase.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/stringcomparison/StringComparisonOrdinal.csproj b/tests/src/CoreMangLib/cti/system/stringcomparison/StringComparisonOrdinal.csproj
new file mode 100644
index 0000000000..9bc0f5c7b8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/stringcomparison/StringComparisonOrdinal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringcomparisonordinal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/stringcomparison/StringComparisonOrdinalIgnoreCase.csproj b/tests/src/CoreMangLib/cti/system/stringcomparison/StringComparisonOrdinalIgnoreCase.csproj
new file mode 100644
index 0000000000..f33ce7b31c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/stringcomparison/StringComparisonOrdinalIgnoreCase.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringcomparisonordinalignorecase.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/stringcomparison/stringcomparisoncurrentculture.cs b/tests/src/CoreMangLib/cti/system/stringcomparison/stringcomparisoncurrentculture.cs
new file mode 100644
index 0000000000..2af59d2b67
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/stringcomparison/stringcomparisoncurrentculture.cs
@@ -0,0 +1,70 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// CurrentCulture [v-yishi]
+/// </summary>
+public class StringComparisonCurrentCulture
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify CurrentCulture's value is 0");
+
+ try
+ {
+ int actual = (int)StringComparison.CurrentCulture;
+ if (actual != 0)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "CurrentCulture's value is not 0");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StringComparisonCurrentCulture test = new StringComparisonCurrentCulture();
+
+ TestLibrary.TestFramework.BeginTestCase("StringComparisonCurrentCulture");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/stringcomparison/stringcomparisoncurrentcultureignorecase.cs b/tests/src/CoreMangLib/cti/system/stringcomparison/stringcomparisoncurrentcultureignorecase.cs
new file mode 100644
index 0000000000..aab1ee9602
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/stringcomparison/stringcomparisoncurrentcultureignorecase.cs
@@ -0,0 +1,70 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// CurrentCultureIgnoreCase [v-yishi]
+/// </summary>
+public class StringComparisonCurrentCultureIgnoreCase
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify CurrentCultureIgnoreCase's value is 1");
+
+ try
+ {
+ int actual = (int)StringComparison.CurrentCultureIgnoreCase;
+ if (actual != 1)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "CurrentCultureIgnoreCase's value is not 1");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StringComparisonCurrentCultureIgnoreCase test = new StringComparisonCurrentCultureIgnoreCase();
+
+ TestLibrary.TestFramework.BeginTestCase("StringComparisonCurrentCultureIgnoreCase");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/stringcomparison/stringcomparisonordinal.cs b/tests/src/CoreMangLib/cti/system/stringcomparison/stringcomparisonordinal.cs
new file mode 100644
index 0000000000..6c695ee4f9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/stringcomparison/stringcomparisonordinal.cs
@@ -0,0 +1,70 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Ordinal [v-yishi]
+/// </summary>
+public class StringComparisonOrdinal
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Ordinal's value is 4");
+
+ try
+ {
+ int actual = (int)StringComparison.Ordinal;
+ if (actual != 4)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Ordinal's value is not 4");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StringComparisonOrdinal test = new StringComparisonOrdinal();
+
+ TestLibrary.TestFramework.BeginTestCase("StringComparisonOrdinal");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/stringcomparison/stringcomparisonordinalignorecase.cs b/tests/src/CoreMangLib/cti/system/stringcomparison/stringcomparisonordinalignorecase.cs
new file mode 100644
index 0000000000..d6ca988b8f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/stringcomparison/stringcomparisonordinalignorecase.cs
@@ -0,0 +1,70 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// OrdinalIgnoreCase [v-yishi]
+/// </summary>
+public class StringComparisonOrdinalIgnoreCase
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify OrdinalIgnoreCase's value is 5");
+
+ try
+ {
+ int actual = (int)StringComparison.OrdinalIgnoreCase;
+ if (actual != 5)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "OrdinalIgnoreCase's value is not 5");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StringComparisonOrdinalIgnoreCase test = new StringComparisonOrdinalIgnoreCase();
+
+ TestLibrary.TestFramework.BeginTestCase("StringComparisonOrdinalIgnoreCase");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/szarrayhelper/SZArrayHelperSetItem.csproj b/tests/src/CoreMangLib/cti/system/szarrayhelper/SZArrayHelperSetItem.csproj
new file mode 100644
index 0000000000..a2f87c2942
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/szarrayhelper/SZArrayHelperSetItem.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="szarrayhelpersetitem.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/szarrayhelper/szarrayhelpersetitem.cs b/tests/src/CoreMangLib/cti/system/szarrayhelper/szarrayhelpersetitem.cs
new file mode 100644
index 0000000000..8343dd6a2e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/szarrayhelper/szarrayhelpersetitem.cs
@@ -0,0 +1,48 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+public class Test
+{
+ public static int Main()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginTestCase("SZArray");
+
+ TestLibrary.TestFramework.BeginScenario("SZArray is used when casting T[] to IList<T>");
+
+ int[] szArray = new int[100];
+ IList<int> list = szArray;
+
+ for (int i = 0; i < 100; i++)
+ {
+ list[i] = 100-i;
+ }
+
+ for (int i = 0; i < 100; i++)
+ {
+ if (100-i != szArray[i])
+ {
+ TestLibrary.TestFramework.LogError("000", "Incorrect value: Expected("+ (100-i) +") Actual("+ szArray[i] +")");
+ retVal = false;
+ }
+ }
+
+ TestLibrary.TestFramework.EndTestCase();
+
+ if (retVal)
+ {
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/text/decoder/DecoderCtor.csproj b/tests/src/CoreMangLib/cti/system/text/decoder/DecoderCtor.csproj
new file mode 100644
index 0000000000..38029f39f3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/decoder/DecoderCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decoderctor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/decoder/DecoderReset.csproj b/tests/src/CoreMangLib/cti/system/text/decoder/DecoderReset.csproj
new file mode 100644
index 0000000000..fc24095c73
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/decoder/DecoderReset.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="decoderreset.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/decoder/decoderctor.cs b/tests/src/CoreMangLib/cti/system/text/decoder/decoderctor.cs
new file mode 100644
index 0000000000..eaa08ec74e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/decoder/decoderctor.cs
@@ -0,0 +1,84 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+public class DecoderCtorDecoder : Decoder
+{
+ public override int GetCharCount(byte[] bytes, int index, int count)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public override int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+}
+
+
+/// <summary>
+/// Ctor
+/// </summary>
+public class DecoderCtor
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor to create a decoder instance");
+
+ try
+ {
+ DecoderCtorDecoder decoder = new DecoderCtorDecoder();
+ if (decoder == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Call ctor to create a decoder instance returns null reference");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DecoderCtor test = new DecoderCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("DecoderCtor");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/decoder/decoderreset.cs b/tests/src/CoreMangLib/cti/system/text/decoder/decoderreset.cs
new file mode 100644
index 0000000000..bcf8acc3e3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/decoder/decoderreset.cs
@@ -0,0 +1,146 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// Reset
+/// </summary>
+public class DecoderReset
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Reset to reset the decoder instance without perform any convertions");
+
+ try
+ {
+ Decoder decoder = Encoding.UTF8.GetDecoder();
+ decoder.Reset();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Reset to reset the decoder instance after a valid convertions");
+
+ try
+ {
+ Decoder decoder = Encoding.UTF8.GetDecoder();
+ byte[] bytes = new byte[127];
+ char[] chars = new char[bytes.Length];
+ for ( int i = 0; i < bytes.Length; ++i )
+ {
+ bytes[i] = (byte)i;
+ }
+
+ decoder.GetChars(bytes, 0, bytes.Length, chars, 0, false);
+ decoder.Reset();
+
+ decoder.GetChars(bytes, 0, bytes.Length, chars, 0, true);
+ decoder.Reset();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call Reset to reset the decoder instance after a invalid convertions");
+
+ try
+ {
+ Decoder decoder = Encoding.Unicode.GetDecoder();
+ byte[] bytes = new byte[127];
+ char[] chars = new char[bytes.Length];
+ for (int i = 0; i < bytes.Length; ++i)
+ {
+ bytes[i] = (byte)i;
+ }
+
+ try
+ {
+ decoder.GetChars(bytes, 0, bytes.Length, chars, chars.Length - 1, false);
+ }
+ catch (ArgumentException)
+ {
+ decoder.Reset();
+ }
+ decoder.GetChars(bytes, 0, bytes.Length, chars, 0, false);
+
+ try
+ {
+ decoder.GetChars(bytes, 0, bytes.Length, chars, chars.Length - 1, true);
+ }
+ catch (ArgumentException)
+ {
+ decoder.Reset();
+ }
+ decoder.GetChars(bytes, 0, bytes.Length, chars, 0, true);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ DecoderReset test = new DecoderReset();
+
+ TestLibrary.TestFramework.BeginTestCase("DecoderReset");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/encoder/EncoderCtor.csproj b/tests/src/CoreMangLib/cti/system/text/encoder/EncoderCtor.csproj
new file mode 100644
index 0000000000..36214aa5f6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoder/EncoderCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encoderctor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoder/encoderctor.cs b/tests/src/CoreMangLib/cti/system/text/encoder/encoderctor.cs
new file mode 100644
index 0000000000..74ecddad2b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoder/encoderctor.cs
@@ -0,0 +1,84 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+public class TestEncoder : Encoder
+{
+ public override int GetByteCount(char[] chars, int index, int count, bool flush)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public override int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex, bool flush)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+}
+
+/// <summary>
+/// ctor
+/// </summary>
+public class EncoderCtor
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor to construct a new instance");
+
+ try
+ {
+ Encoder encoder = new TestEncoder();
+
+ if (encoder == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling ctor to construct a new instance returns null reference");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EncoderCtor test = new EncoderCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("EncoderCtor");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingBigEndianUnicode.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingBigEndianUnicode.csproj
new file mode 100644
index 0000000000..de38a17102
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingBigEndianUnicode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodingbigendianunicode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingClone.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingClone.csproj
new file mode 100644
index 0000000000..b2c795d550
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingClone.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodingclone.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingConvert1.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingConvert1.csproj
new file mode 100644
index 0000000000..c527e0cbb4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingConvert1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodingconvert1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingConvert2.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingConvert2.csproj
new file mode 100644
index 0000000000..decdb22854
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingConvert2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodingconvert2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingCtor1.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingCtor1.csproj
new file mode 100644
index 0000000000..d233d9ea41
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodingctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingEquals.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingEquals.csproj
new file mode 100644
index 0000000000..16b79f0878
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingEquals.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodingequals.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetByteCount.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetByteCount.csproj
new file mode 100644
index 0000000000..fa49aec76f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetByteCount.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodinggetbytecount.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetByteCount1.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetByteCount1.csproj
new file mode 100644
index 0000000000..80b2290182
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetByteCount1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodinggetbytecount1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetByteCount2.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetByteCount2.csproj
new file mode 100644
index 0000000000..1664c5e3b0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetByteCount2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodinggetbytecount2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetByteCount3.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetByteCount3.csproj
new file mode 100644
index 0000000000..eabec11dbd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetByteCount3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodinggetbytecount3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetBytes1.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetBytes1.csproj
new file mode 100644
index 0000000000..3aa91edb1c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetBytes1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodinggetbytes1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetBytes2.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetBytes2.csproj
new file mode 100644
index 0000000000..2b5b3d6918
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetBytes2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodinggetbytes2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetBytes3.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetBytes3.csproj
new file mode 100644
index 0000000000..45758399e4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetBytes3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodinggetbytes3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetBytes4.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetBytes4.csproj
new file mode 100644
index 0000000000..ebb479a55f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetBytes4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodinggetbytes4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetBytes5.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetBytes5.csproj
new file mode 100644
index 0000000000..3ec9b3be7d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetBytes5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodinggetbytes5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetCharCount.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetCharCount.csproj
new file mode 100644
index 0000000000..88fcc5409d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetCharCount.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodinggetcharcount.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetCharCount1.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetCharCount1.csproj
new file mode 100644
index 0000000000..ac44837b2a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetCharCount1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodinggetcharcount1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetCharCount2.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetCharCount2.csproj
new file mode 100644
index 0000000000..2cb3dbca3f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetCharCount2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodinggetcharcount2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetChars1.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetChars1.csproj
new file mode 100644
index 0000000000..d2695906f2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetChars1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodinggetchars1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetChars2.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetChars2.csproj
new file mode 100644
index 0000000000..1e6d122229
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetChars2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodinggetchars2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetChars3.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetChars3.csproj
new file mode 100644
index 0000000000..26d88930b4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetChars3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodinggetchars3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetDecoder.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetDecoder.csproj
new file mode 100644
index 0000000000..93cbdf5ae1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetDecoder.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodinggetdecoder.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetEncoder.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetEncoder.csproj
new file mode 100644
index 0000000000..3448a0c999
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetEncoder.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodinggetencoder.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetEncoding2.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetEncoding2.csproj
new file mode 100644
index 0000000000..544694ab67
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetEncoding2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodinggetencoding2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetMaxByteCount.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetMaxByteCount.csproj
new file mode 100644
index 0000000000..17ea376210
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetMaxByteCount.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodinggetmaxbytecount.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetMaxCharCount.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetMaxCharCount.csproj
new file mode 100644
index 0000000000..473731f35c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetMaxCharCount.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodinggetmaxcharcount.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetPreamble.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetPreamble.csproj
new file mode 100644
index 0000000000..77644c9545
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetPreamble.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodinggetpreamble.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetString.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetString.csproj
new file mode 100644
index 0000000000..17b19b836d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingGetString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodinggetstring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingUTF8.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingUTF8.csproj
new file mode 100644
index 0000000000..5b07323710
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingUTF8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodingutf8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingUnicode.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingUnicode.csproj
new file mode 100644
index 0000000000..a2fd3a06fe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingUnicode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodingunicode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/EncodingWebName.csproj b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingWebName.csproj
new file mode 100644
index 0000000000..00a1f70e35
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/EncodingWebName.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="encodingwebname.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodingbigendianunicode.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodingbigendianunicode.cs
new file mode 100644
index 0000000000..bfb631fe9c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodingbigendianunicode.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// BigEndianUnicode
+/// </summary>
+
+public class EncodingBigEndianUnicode
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property BigEndianUnicode .");
+
+ try
+ {
+ Encoding ascii = Encoding.BigEndianUnicode;
+
+ if (ascii == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property BigEndianUnicode Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EncodingBigEndianUnicode test = new EncodingBigEndianUnicode();
+
+ TestLibrary.TestFramework.BeginTestCase("EncodingBigEndianUnicode");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodingclone.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodingclone.cs
new file mode 100644
index 0000000000..fa0d60ddcd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodingclone.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// Clone
+/// </summary>
+
+public class EncodingClone
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method Clone .");
+
+ try
+ {
+ Encoding encoding = Encoding.UTF8;
+ Encoding encodingClone = (Encoding)encoding.Clone();
+
+ if (Encoding.ReferenceEquals(encoding, encodingClone) || !Encoding.Equals(encoding, encodingClone))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method Clone Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EncodingClone test = new EncodingClone();
+
+ TestLibrary.TestFramework.BeginTestCase("EncodingClone");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodingconvert1.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodingconvert1.cs
new file mode 100644
index 0000000000..41ed81303e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodingconvert1.cs
@@ -0,0 +1,183 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// Convert(System.Text.Encoding,System.Text.Encoding,System.Byte[])
+/// </summary>
+
+public class EncodingConvert1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method Convert .");
+
+ try
+ {
+ string unicodeStr = "test string .";
+
+ Encoding ascii = Encoding.UTF8;
+ Encoding unicode = Encoding.Unicode;
+
+ byte[] unicodeBytes = unicode.GetBytes(unicodeStr);
+
+ byte[] asciiBytes = Encoding.Convert(unicode, ascii, unicodeBytes);
+
+ char[] asciiChars = new char[ascii.GetCharCount(asciiBytes, 0, asciiBytes.Length)];
+ ascii.GetChars(asciiBytes, 0, asciiBytes.Length, asciiChars, 0);
+ string asciiStr = new string(asciiChars);
+
+ if (unicodeStr != asciiStr)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method Convert Err !");
+ retVal = false;
+ return retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown.");
+
+ try
+ {
+ string unicodeStr = "test string .";
+
+ Encoding ascii = null;
+ Encoding unicode = Encoding.Unicode;
+
+ byte[] unicodeBytes = unicode.GetBytes(unicodeStr);
+
+ byte[] asciiBytes = Encoding.Convert(unicode, ascii, unicodeBytes);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentNullException is not thrown.");
+
+ try
+ {
+ Encoding ascii = Encoding.UTF8;
+ Encoding unicode = null;
+
+ byte[] unicodeBytes = new byte[] { 1,2,3};
+
+ byte[] asciiBytes = Encoding.Convert(unicode, ascii, unicodeBytes);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentNullException is not thrown.");
+
+ try
+ {
+ Encoding ascii = Encoding.UTF8;
+ Encoding unicode = Encoding.Unicode;
+
+ byte[] unicodeBytes = null;
+
+ byte[] asciiBytes = Encoding.Convert(unicode, ascii, unicodeBytes);
+
+ TestLibrary.TestFramework.LogError("103.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EncodingConvert1 test = new EncodingConvert1();
+
+ TestLibrary.TestFramework.BeginTestCase("EncodingConvert1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodingconvert2.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodingconvert2.cs
new file mode 100644
index 0000000000..5a62c8c2f3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodingconvert2.cs
@@ -0,0 +1,358 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// Convert(System.Text.Encoding,System.Text.Encoding,System.Byte[],System.Int32,System.Int32)
+/// </summary>
+
+public class EncodingConvert2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method Convert when count == bytes.Length .");
+
+ try
+ {
+ string unicodeStr = "test string .";
+
+ Encoding ascii = Encoding.UTF8;
+ Encoding unicode = Encoding.Unicode;
+
+ byte[] unicodeBytes = unicode.GetBytes(unicodeStr);
+
+ byte[] asciiBytes = Encoding.Convert(unicode, ascii, unicodeBytes,0,unicodeBytes.Length);
+
+ char[] asciiChars = new char[ascii.GetCharCount(asciiBytes, 0, asciiBytes.Length)];
+ ascii.GetChars(asciiBytes, 0, asciiBytes.Length, asciiChars, 0);
+ string asciiStr = new string(asciiChars);
+
+ if (unicodeStr != asciiStr)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method Convert Err !");
+ retVal = false;
+ return retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method Convert when count == 0 .");
+
+ try
+ {
+ string unicodeStr = "test string .";
+
+ Encoding ascii = Encoding.UTF8;
+ Encoding unicode = Encoding.Unicode;
+
+ byte[] unicodeBytes = unicode.GetBytes(unicodeStr);
+
+ byte[] asciiBytes = Encoding.Convert(unicode, ascii, unicodeBytes, 0, 0);
+
+ char[] asciiChars = new char[ascii.GetCharCount(asciiBytes, 0, asciiBytes.Length)];
+ ascii.GetChars(asciiBytes, 0, asciiBytes.Length, asciiChars, 0);
+ string asciiStr = new string(asciiChars);
+
+ if (asciiStr != "")
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method Convert Err !");
+ retVal = false;
+ return retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method Convert when bytes == null.");
+
+ try
+ {
+ Encoding ascii = Encoding.UTF8;
+ Encoding unicode = Encoding.Unicode;
+
+ byte[] unicodeBytes = new byte[0];
+
+ byte[] asciiBytes = Encoding.Convert(unicode, ascii, unicodeBytes, 0, 0);
+
+ char[] asciiChars = new char[ascii.GetCharCount(asciiBytes, 0, asciiBytes.Length)];
+ ascii.GetChars(asciiBytes, 0, asciiBytes.Length, asciiChars, 0);
+ string asciiStr = new string(asciiChars);
+
+ if (asciiStr != "")
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method Convert Err !");
+ retVal = false;
+ return retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown.");
+
+ try
+ {
+ string unicodeStr = "test string .";
+
+ Encoding ascii = null;
+ Encoding unicode = Encoding.Unicode;
+
+ byte[] unicodeBytes = unicode.GetBytes(unicodeStr);
+
+ byte[] asciiBytes = Encoding.Convert(unicode, ascii, unicodeBytes, 0, unicodeBytes.Length);
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentNullException is not thrown.");
+
+ try
+ {
+ Encoding ascii = Encoding.UTF8;
+ Encoding unicode = null;
+
+ byte[] unicodeBytes = new byte[] { 1, 2, 3 };
+
+ byte[] asciiBytes = Encoding.Convert(unicode, ascii, unicodeBytes, 0, unicodeBytes.Length);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentNullException is not thrown.");
+
+ try
+ {
+ Encoding ascii = Encoding.UTF8;
+ Encoding unicode = Encoding.Unicode;
+
+ byte[] unicodeBytes = null;
+
+ byte[] asciiBytes = Encoding.Convert(unicode, ascii, unicodeBytes, 0, 2);
+
+ TestLibrary.TestFramework.LogError("103.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: ArgumentOutOfRangeException is not thrown.");
+
+ try
+ {
+ string unicodeStr = "test string .";
+
+ Encoding ascii = Encoding.UTF8;
+ Encoding unicode = Encoding.Unicode;
+
+ byte[] unicodeBytes = unicode.GetBytes(unicodeStr);
+
+ byte[] asciiBytes = Encoding.Convert(unicode, ascii, unicodeBytes, -1, unicodeBytes.Length);
+ TestLibrary.TestFramework.LogError("104.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: ArgumentOutOfRangeException is not thrown.");
+
+ try
+ {
+ string unicodeStr = "test string .";
+
+ Encoding ascii = Encoding.UTF8;
+ Encoding unicode = Encoding.Unicode;
+
+ byte[] unicodeBytes = unicode.GetBytes(unicodeStr);
+
+ byte[] asciiBytes = Encoding.Convert(unicode, ascii, unicodeBytes, 0, unicodeBytes.Length + 1);
+ TestLibrary.TestFramework.LogError("105.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("105.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: ArgumentOutOfRangeException is not thrown.");
+
+ try
+ {
+ string unicodeStr = "test string .";
+
+ Encoding ascii = Encoding.UTF8;
+ Encoding unicode = Encoding.Unicode;
+
+ byte[] unicodeBytes = unicode.GetBytes(unicodeStr);
+
+ byte[] asciiBytes = Encoding.Convert(unicode, ascii, unicodeBytes, 0, -1);
+ TestLibrary.TestFramework.LogError("106.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EncodingConvert2 test = new EncodingConvert2();
+
+ TestLibrary.TestFramework.BeginTestCase("EncodingConvert2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodingctor1.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodingctor1.cs
new file mode 100644
index 0000000000..89a2e77320
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodingctor1.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// ctor
+/// </summary>
+
+public class EncodingCtor1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Ctor .");
+
+ try
+ {
+ Encoding encoding = Encoding.UTF8;
+
+ if (encoding == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Ctor Err !");
+ retVal = false;
+ return retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EncodingCtor1 test = new EncodingCtor1();
+
+ TestLibrary.TestFramework.BeginTestCase("EncodingCtor1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodingequals.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodingequals.cs
new file mode 100644
index 0000000000..8e257efb06
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodingequals.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// Equals(System.Object)
+/// </summary>
+
+public class EncodingEquals
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method Equals .");
+
+ try
+ {
+ Encoding e1 = Encoding.GetEncoding("utf-8");
+ Encoding e2 = Encoding.UTF8;
+
+ if (!e1.Equals(e2))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EncodingEquals test = new EncodingEquals();
+
+ TestLibrary.TestFramework.BeginTestCase("EncodingEquals");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytecount.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytecount.cs
new file mode 100644
index 0000000000..87a31833de
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytecount.cs
@@ -0,0 +1,213 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+using TestLibrary;
+
+class EncodingGetByteCount
+{
+ static int Main()
+ {
+ EncodingGetByteCount test = new EncodingGetByteCount();
+
+ TestFramework.BeginTestCase("Encoding.GetByteCount");
+
+ if (test.RunTests())
+ {
+ TestFramework.EndTestCase();
+ TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestFramework.EndTestCase();
+ TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool ret = true;
+
+ // Positive Tests
+ ret &= PositiveTestString(Encoding.UTF8, "TestString", 10, "00A");
+ ret &= PositiveTestString(Encoding.UTF8, "", 0, "00B");
+ ret &= PositiveTestString(Encoding.UTF8, "FooBA\u0400R", 8, "00C");
+ ret &= PositiveTestString(Encoding.UTF8, "\u00C0nima\u0300l", 9, "00D");
+ ret &= PositiveTestString(Encoding.UTF8, "Test\uD803\uDD75Test", 12, "00E");
+ ret &= PositiveTestString(Encoding.UTF8, "Test\uD803Test", 11, "00F");
+ ret &= PositiveTestString(Encoding.UTF8, "Test\uDD75Test", 11, "00G");
+ ret &= PositiveTestString(Encoding.UTF8, "TestTest\uDD75", 11, "00H");
+ ret &= PositiveTestString(Encoding.UTF8, "TestTest\uD803", 11, "00I");
+ ret &= PositiveTestString(Encoding.UTF8, "\uDD75", 3, "00J");
+ ret &= PositiveTestString(Encoding.UTF8, "\uD803\uDD75\uD803\uDD75\uD803\uDD75", 12, "00K");
+ ret &= PositiveTestString(Encoding.UTF8, "\u0130", 2, "00L");
+
+ ret &= PositiveTestString(Encoding.Unicode, "TestString", 20, "00A3");
+ ret &= PositiveTestString(Encoding.Unicode, "", 0, "00B3");
+ ret &= PositiveTestString(Encoding.Unicode, "FooBA\u0400R", 14, "00C3");
+ ret &= PositiveTestString(Encoding.Unicode, "\u00C0nima\u0300l", 14, "00D3");
+ ret &= PositiveTestString(Encoding.Unicode, "Test\uD803\uDD75Test", 20, "00E3");
+ ret &= PositiveTestString(Encoding.Unicode, "Test\uD803Test", 18, "00F3");
+ ret &= PositiveTestString(Encoding.Unicode, "Test\uDD75Test", 18, "00G3");
+ ret &= PositiveTestString(Encoding.Unicode, "TestTest\uDD75", 18, "00H3");
+ ret &= PositiveTestString(Encoding.Unicode, "TestTest\uD803", 18, "00I3");
+ ret &= PositiveTestString(Encoding.Unicode, "\uDD75", 2, "00J3");
+ ret &= PositiveTestString(Encoding.Unicode, "\uD803\uDD75\uD803\uDD75\uD803\uDD75", 12, "00K3");
+ ret &= PositiveTestString(Encoding.Unicode, "\u0130", 2, "00L3");
+
+ ret &= PositiveTestString(Encoding.BigEndianUnicode, "TestString", 20, "00A4");
+ ret &= PositiveTestString(Encoding.BigEndianUnicode, "", 0, "00B4");
+ ret &= PositiveTestString(Encoding.BigEndianUnicode, "FooBA\u0400R", 14, "00C4");
+ ret &= PositiveTestString(Encoding.BigEndianUnicode, "\u00C0nima\u0300l", 14, "00D4");
+ ret &= PositiveTestString(Encoding.BigEndianUnicode, "Test\uD803\uDD75Test", 20, "00E4");
+ ret &= PositiveTestString(Encoding.BigEndianUnicode, "Test\uD803Test", 18, "00F4");
+ ret &= PositiveTestString(Encoding.BigEndianUnicode, "Test\uDD75Test", 18, "00G4");
+ ret &= PositiveTestString(Encoding.BigEndianUnicode, "TestTest\uDD75", 18, "00H4");
+ ret &= PositiveTestString(Encoding.BigEndianUnicode, "TestTest\uD803", 18, "00I4");
+ ret &= PositiveTestString(Encoding.BigEndianUnicode, "\uDD75", 2, "00J4");
+ ret &= PositiveTestString(Encoding.BigEndianUnicode, "\uD803\uDD75\uD803\uDD75\uD803\uDD75", 12, "00K4");
+ ret &= PositiveTestString(Encoding.BigEndianUnicode, "\u0130", 2, "00L4");
+
+ ret &= PositiveTestChars(Encoding.UTF8, new char[] { 'T', 'e', 's', 't', 'S', 't', 'r', 'i', 'n', 'g' }, 10, "00M");
+ ret &= PositiveTestChars(Encoding.Unicode, new char[] { 'T', 'e', 's', 't', 'S', 't', 'r', 'i', 'n', 'g' }, 20, "00M3");
+ ret &= PositiveTestChars(Encoding.BigEndianUnicode, new char[] { 'T', 'e', 's', 't', 'S', 't', 'r', 'i', 'n', 'g' }, 20, "00M4");
+
+ // Negative Tests
+ ret &= NegativeTestString(new UTF8Encoding(), null, typeof(ArgumentNullException), "00N");
+ ret &= NegativeTestString(new UnicodeEncoding(), null, typeof(ArgumentNullException), "00N3");
+ ret &= NegativeTestString(new UnicodeEncoding(true, false), null, typeof(ArgumentNullException), "00N4");
+
+ ret &= NegativeTestChars(new UTF8Encoding(), null, typeof(ArgumentNullException), "00O");
+ ret &= NegativeTestChars(new UnicodeEncoding(), null, typeof(ArgumentNullException), "00O3");
+ ret &= NegativeTestChars(new UnicodeEncoding(true, false), null, typeof(ArgumentNullException), "00O4");
+
+ ret &= NegativeTestChars2(new UTF8Encoding(), null, 0, 0, typeof(ArgumentNullException), "00P");
+ ret &= NegativeTestChars2(new UTF8Encoding(), new char[] { 't' }, -1, 1, typeof(ArgumentOutOfRangeException), "00P");
+ ret &= NegativeTestChars2(new UTF8Encoding(), new char[] { 't' }, 1, -1, typeof(ArgumentOutOfRangeException), "00Q");
+ ret &= NegativeTestChars2(new UTF8Encoding(), new char[] { 't' }, 0, 10, typeof(ArgumentOutOfRangeException), "00R");
+ ret &= NegativeTestChars2(new UTF8Encoding(), new char[] { 't' }, 2, 0, typeof(ArgumentOutOfRangeException), "00S");
+
+ ret &= NegativeTestChars2(new UnicodeEncoding(), null, 0, 0, typeof(ArgumentNullException), "00P3");
+ ret &= NegativeTestChars2(new UnicodeEncoding(), new char[] { 't' }, -1, 1, typeof(ArgumentOutOfRangeException), "00P3");
+ ret &= NegativeTestChars2(new UnicodeEncoding(), new char[] { 't' }, 1, -1, typeof(ArgumentOutOfRangeException), "00Q3");
+ ret &= NegativeTestChars2(new UnicodeEncoding(), new char[] { 't' }, 0, 10, typeof(ArgumentOutOfRangeException), "00R3");
+ ret &= NegativeTestChars2(new UnicodeEncoding(), new char[] { 't' }, 2, 0, typeof(ArgumentOutOfRangeException), "00S3");
+
+ ret &= NegativeTestChars2(new UnicodeEncoding(true, false), null, 0, 0, typeof(ArgumentNullException), "00P4");
+ ret &= NegativeTestChars2(new UnicodeEncoding(true, false), new char[] { 't' }, -1, 1, typeof(ArgumentOutOfRangeException), "00P4");
+ ret &= NegativeTestChars2(new UnicodeEncoding(true, false), new char[] { 't' }, 1, -1, typeof(ArgumentOutOfRangeException), "00Q4");
+ ret &= NegativeTestChars2(new UnicodeEncoding(true, false), new char[] { 't' }, 0, 10, typeof(ArgumentOutOfRangeException), "00R4");
+ ret &= NegativeTestChars2(new UnicodeEncoding(true, false), new char[] { 't' }, 2, 0, typeof(ArgumentOutOfRangeException), "00S4");
+
+ return ret;
+ }
+
+ public bool PositiveTestString(Encoding enc, string str, int expected, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Getting byte count for " + str + " with encoding " + enc.WebName);
+ try
+ {
+ int output = enc.GetByteCount(str);
+ if (output != expected)
+ {
+ result = false;
+ TestFramework.LogError("001", "Error in " + id + ", unexpected comparison result. Actual byte count " + output + ", Expected: " + expected);
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("002", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ return result;
+ }
+
+ public bool NegativeTestString(Encoding enc, string str, Type excType, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Getting byte count with encoding " + enc.WebName);
+ try
+ {
+ int output = enc.GetByteCount(str);
+ result = false;
+ TestFramework.LogError("005", "Error in " + id + ", Expected exception not thrown. Actual byte count " + output + ", Expected exception type: " + excType.ToString());
+ }
+ catch (Exception exc)
+ {
+ if (exc.GetType() != excType)
+ {
+ result = false;
+ TestFramework.LogError("006", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ }
+ return result;
+ }
+
+ public bool PositiveTestChars(Encoding enc, char[] chars, int expected, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Getting byte count for " + new string(chars) + " with encoding " + enc.WebName);
+ try
+ {
+ int output = enc.GetByteCount(chars);
+ if (output != expected)
+ {
+ result = false;
+ TestFramework.LogError("003", "Error in " + id + ", unexpected comparison result. Actual byte count " + output + ", Expected: " + expected);
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("004", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ return result;
+ }
+
+ public bool NegativeTestChars(Encoding enc, char[] str, Type excType, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Getting byte count with encoding " + enc.WebName);
+ try
+ {
+ int output = enc.GetByteCount(str);
+ result = false;
+ TestFramework.LogError("007", "Error in " + id + ", Expected exception not thrown. Actual byte count " + output + ", Expected exception type: " + excType.ToString());
+ }
+ catch (Exception exc)
+ {
+ if (exc.GetType() != excType)
+ {
+ result = false;
+ TestFramework.LogError("008", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ }
+ return result;
+ }
+
+ public bool NegativeTestChars2(Encoding enc, char[] str, int index, int count, Type excType, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Getting byte count with encoding " + enc.WebName);
+ try
+ {
+ int output = enc.GetByteCount(str, index, count);
+ result = false;
+ TestFramework.LogError("009", "Error in " + id + ", Expected exception not thrown. Actual byte count " + output + ", Expected exception type: " + excType.ToString());
+ }
+ catch (Exception exc)
+ {
+ if (exc.GetType() != excType)
+ {
+ result = false;
+ TestFramework.LogError("010", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ }
+ return result;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytecount1.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytecount1.cs
new file mode 100644
index 0000000000..b996e2c789
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytecount1.cs
@@ -0,0 +1,113 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// GetByteCount(System.Char[])
+/// </summary>
+
+public class EncodingGetByteCount1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method GetByteCount(System.Char[]) .");
+
+ try
+ {
+ char[] testChar = new char[] { 'z', 'a', '\u0306', '\u01FD', '\u03B2', '\uD8FF', '\uDCFF' };
+
+
+ Encoding u8 = Encoding.UTF8;
+ Encoding u16LE = Encoding.Unicode;
+ Encoding u16BE = Encoding.BigEndianUnicode;
+// Encoding u32 = Encoding.UTF32;
+
+ if (u8.GetByteCount(testChar) != 12 ||
+ u16LE.GetByteCount(testChar) != 14 ||
+ u16BE.GetByteCount(testChar) != 14)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown.");
+
+ try
+ {
+ char[] testChar = null;
+ Encoding u7 = Encoding.UTF8;
+
+ int i = u7.GetByteCount(testChar);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EncodingGetByteCount1 test = new EncodingGetByteCount1();
+
+ TestLibrary.TestFramework.BeginTestCase("EncodingGetByteCount1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytecount2.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytecount2.cs
new file mode 100644
index 0000000000..4d8f95353d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytecount2.cs
@@ -0,0 +1,200 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// GetByteCount(System.Char[],System.Int32,System.Int32)
+/// </summary>
+
+public class EncodingGetByteCount2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method GetByteCount(System.Char[],System.Int32,System.Int32) .");
+
+ try
+ {
+ char[] testChar = new char[] { 'z', 'a', '\u0306', '\u01FD', '\u03B2', '\uD8FF', '\uDCFF' };
+
+ Encoding u8 = Encoding.UTF8;
+ Encoding u16LE = Encoding.Unicode;
+ Encoding u16BE = Encoding.BigEndianUnicode;
+
+ if (u8.GetByteCount(testChar, 4, 3) != 6 ||
+ u16LE.GetByteCount(testChar, 4, 3) != 6 ||
+ u16BE.GetByteCount(testChar, 4, 3) != 6 )
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method GetByteCount Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown .");
+
+ try
+ {
+ char[] testChar = null;
+ Encoding u7 = Encoding.UTF8;
+
+ int i = u7.GetByteCount(testChar, 1, 2);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentOutOfRangeException is not thrown .");
+
+ try
+ {
+ char[] testChar = new char[] { 'z', 'a', '\u0306', '\u01FD', '\u03B2', '\uD8FF', '\uDCFF' };
+ Encoding u7 = Encoding.UTF8;
+
+ int i = u7.GetByteCount(testChar, -1, 0);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentOutOfRangeException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentOutOfRangeException is not thrown .");
+
+ try
+ {
+ char[] testChar = new char[] { 'z', 'a', '\u0306', '\u01FD', '\u03B2', '\uD8FF', '\uDCFF' };
+ Encoding u7 = Encoding.UTF8;
+
+ int i = u7.GetByteCount(testChar, 0, -1);
+
+ TestLibrary.TestFramework.LogError("103.1", "ArgumentOutOfRangeException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: ArgumentOutOfRangeException is not thrown .");
+
+ try
+ {
+ char[] testChar = new char[] { 'z', 'a', '\u0306', '\u01FD', '\u03B2', '\uD8FF', '\uDCFF' };
+ Encoding u7 = Encoding.UTF8;
+
+ int i = u7.GetByteCount(testChar, 0, testChar.Length + 1);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentOutOfRangeException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EncodingGetByteCount2 test = new EncodingGetByteCount2();
+
+ TestLibrary.TestFramework.BeginTestCase("EncodingGetByteCount2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytecount3.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytecount3.cs
new file mode 100644
index 0000000000..a2b6c94bef
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytecount3.cs
@@ -0,0 +1,111 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// GetByteCount(System.String)
+/// </summary>
+
+
+public class EncodingGetByteCount3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method GetByteCount(System.String) .");
+
+ try
+ {
+ string testStr = "za\u0306\u01FD\u03B2\uD8ff\uDCFF";
+
+ Encoding u8 = Encoding.UTF8;
+ Encoding u16LE = Encoding.Unicode;
+ Encoding u16BE = Encoding.BigEndianUnicode;
+
+ if (u8.GetByteCount(testStr) != 12 ||
+ u16LE.GetByteCount(testStr) != 14 ||
+ u16BE.GetByteCount(testStr) != 14 )
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method GetByteCount Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown.");
+
+ try
+ {
+ string testStr = null;
+ Encoding u7 = Encoding.UTF8;
+ int i = u7.GetByteCount(testStr);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EncodingGetByteCount3 test = new EncodingGetByteCount3();
+
+ TestLibrary.TestFramework.BeginTestCase("EncodingGetByteCount3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytes1.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytes1.cs
new file mode 100644
index 0000000000..2ea8d51fd0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytes1.cs
@@ -0,0 +1,460 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+using TestLibrary;
+
+class EncodingGetBytes1
+{
+ static int Main()
+ {
+ EncodingGetBytes1 test = new EncodingGetBytes1();
+
+ TestFramework.BeginTestCase("Encoding.GetBytes");
+
+ if (test.RunTests())
+ {
+ TestFramework.EndTestCase();
+ TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestFramework.EndTestCase();
+ TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool ret = true;
+
+ ret &= Test1();
+ ret &= Test2();
+ ret &= Test3();
+ ret &= Test4();
+ ret &= Test5();
+ ret &= Test6();
+ ret &= Test7();
+ ret &= Test8();
+ ret &= Test9();
+ ret &= Test10();
+
+ ret &= Test11();
+ ret &= Test12();
+ ret &= Test13();
+
+ ret &= Test40();
+
+ ret &= Test41();
+ ret &= Test42();
+ ret &= Test43();
+ ret &= Test44();
+ ret &= Test45();
+ ret &= Test46();
+ ret &= Test47();
+ ret &= Test48();
+ ret &= Test49();
+ ret &= Test50();
+
+ ret &= Test51();
+ ret &= Test52();
+ ret &= Test53();
+ ret &= Test54();
+ ret &= Test55();
+ ret &= Test56();
+ ret &= Test57();
+ ret &= Test58();
+ ret &= Test59();
+ ret &= Test60();
+
+ ret &= Test61();
+ ret &= Test62();
+ ret &= Test63();
+ ret &= Test64();
+ ret &= Test65();
+ ret &= Test66();
+ ret &= Test69();
+ ret &= Test70();
+
+ ret &= Test71();
+ ret &= Test74();
+ ret &= Test75();
+ ret &= Test76();
+ ret &= Test7();
+ ret &= Test79();
+ ret &= Test80();
+
+ ret &= Test81();
+ ret &= Test82();
+ ret &= Test83();
+ ret &= Test84();
+ ret &= Test85();
+
+ ret &= Test96();
+ ret &= Test97();
+ ret &= Test98();
+ ret &= Test99();
+ ret &= Test100();
+
+ ret &= Test101();
+ ret &= Test102();
+ ret &= Test103();
+ ret &= Test104();
+ ret &= Test105();
+ ret &= Test106();
+ ret &= Test107();
+ ret &= Test108();
+ ret &= Test109();
+ ret &= Test110();
+
+ ret &= Test111();
+ ret &= Test112();
+ ret &= Test113();
+ ret &= Test114();
+
+ ret &= Test133();
+ ret &= Test134();
+ ret &= Test135();
+ ret &= Test136();
+ ret &= Test137();
+ ret &= Test138();
+ ret &= Test139();
+ ret &= Test140();
+
+ ret &= Test141();
+ ret &= Test142();
+ ret &= Test143();
+ ret &= Test144();
+ ret &= Test145();
+ ret &= Test146();
+ ret &= Test147();
+ ret &= Test148();
+ ret &= Test149();
+ ret &= Test150();
+
+ ret &= Test151();
+ ret &= Test152();
+ ret &= Test153();
+ ret &= Test154();
+ ret &= Test155();
+ ret &= Test156();
+ ret &= Test157();
+ ret &= Test158();
+ ret &= Test159();
+
+ ret &= Test107();
+ ret &= Test179();
+ ret &= Test180();
+
+ ret &= Test181();
+ ret &= Test182();
+ ret &= Test183();
+ ret &= Test184();
+ ret &= Test185();
+ ret &= Test186();
+ ret &= Test187();
+ ret &= Test188();
+ ret &= Test189();
+ ret &= Test190();
+
+ ret &= Test191();
+ ret &= Test192();
+ ret &= Test193();
+ ret &= Test194();
+ ret &= Test195();
+
+ return ret;
+ }
+
+ // Positive Tests
+ public bool Test1() { return PositiveTestString(Encoding.UTF8, "TestString", new byte[] { 84, 101, 115, 116, 83, 116, 114, 105, 110, 103 }, "00A"); }
+ public bool Test2() { return PositiveTestString(Encoding.UTF8, "", new byte[] { }, "00B"); }
+ public bool Test3() { return PositiveTestString(Encoding.UTF8, "FooBA\u0400R", new byte[] { 70, 111, 111, 66, 65, 208, 128, 82 }, "00C"); }
+ public bool Test4() { return PositiveTestString(Encoding.UTF8, "\u00C0nima\u0300l", new byte[] { 195, 128, 110, 105, 109, 97, 204, 128, 108 }, "00D"); }
+ public bool Test5() { return PositiveTestString(Encoding.UTF8, "Test\uD803\uDD75Test", new byte[] { 84, 101, 115, 116, 240, 144, 181, 181, 84, 101, 115, 116 }, "00E"); }
+ public bool Test6() { return PositiveTestString(Encoding.UTF8, "Test\uD803Test", new byte[] { 84, 101, 115, 116, 239, 191, 189, 84, 101, 115, 116 }, "00F"); }
+ public bool Test7() { return PositiveTestString(Encoding.UTF8, "Test\uDD75Test", new byte[] { 84, 101, 115, 116, 239, 191, 189, 84, 101, 115, 116 }, "00G"); }
+ public bool Test8() { return PositiveTestString(Encoding.UTF8, "TestTest\uDD75", new byte[] { 84, 101, 115, 116, 84, 101, 115, 116, 239, 191, 189 }, "00H"); }
+ public bool Test9() { return PositiveTestString(Encoding.UTF8, "TestTest\uD803", new byte[] { 84, 101, 115, 116, 84, 101, 115, 116, 239, 191, 189 }, "00I"); }
+ public bool Test10() { return PositiveTestString(Encoding.UTF8, "\uDD75", new byte[] { 239, 191, 189 }, "00J"); }
+ public bool Test11() { return PositiveTestString(Encoding.UTF8, "\uD803\uDD75\uD803\uDD75\uD803\uDD75", new byte[] { 240, 144, 181, 181, 240, 144, 181, 181, 240, 144, 181, 181 }, "00K"); }
+ public bool Test12() { return PositiveTestString(Encoding.UTF8, "\u0130", new byte[] { 196, 176 }, "00L"); }
+ public bool Test13() { return PositiveTestString(Encoding.UTF8, "\uDD75\uDD75\uD803\uDD75\uDD75\uDD75\uDD75\uD803\uD803\uD803\uDD75\uDD75\uDD75\uDD75", new byte[] { 239, 191, 189, 239, 191, 189, 240, 144, 181, 181, 239, 191, 189, 239, 191, 189, 239, 191, 189, 239, 191, 189, 239, 191, 189, 240, 144, 181, 181, 239, 191, 189, 239, 191, 189, 239, 191, 189 }, "0A2"); }
+
+
+ public bool Test40() { return PositiveTestString(Encoding.Unicode, "TestString", new byte[] { 84, 0, 101, 0, 115, 0, 116, 0, 83, 0, 116, 0, 114, 0, 105, 0, 110, 0, 103, 0 }, "00A3"); }
+ public bool Test41() { return PositiveTestString(Encoding.Unicode, "", new byte[] { }, "00B3"); }
+ public bool Test42() { return PositiveTestString(Encoding.Unicode, "FooBA\u0400R", new byte[] { 70, 0, 111, 0, 111, 0, 66, 0, 65, 0, 0, 4, 82, 0 }, "00C3"); }
+ public bool Test43() { return PositiveTestString(Encoding.Unicode, "\u00C0nima\u0300l", new byte[] { 192, 0, 110, 0, 105, 0, 109, 0, 97, 0, 0, 3, 108, 0 }, "00D3"); }
+ public bool Test44() { return PositiveTestString(Encoding.Unicode, "Test\uD803\uDD75Test", new byte[] { 84, 0, 101, 0, 115, 0, 116, 0, 3, 216, 117, 221, 84, 0, 101, 0, 115, 0, 116, 0 }, "00E3"); }
+ public bool Test45() { return PositiveTestString(Encoding.Unicode, "Test\uD803Test", new byte[] { 84, 0, 101, 0, 115, 0, 116, 0, 253, 255, 84, 0, 101, 0, 115, 0, 116, 0 }, "00F3"); }
+ public bool Test46() { return PositiveTestString(Encoding.Unicode, "Test\uDD75Test", new byte[] { 84, 0, 101, 0, 115, 0, 116, 0, 253, 255, 84, 0, 101, 0, 115, 0, 116, 0, }, "00G3"); }
+ public bool Test47() { return PositiveTestString(Encoding.Unicode, "TestTest\uDD75", new byte[] { 84, 0, 101, 0, 115, 0, 116, 0, 84, 0, 101, 0, 115, 0, 116, 0, 253, 255 }, "00H3"); }
+ public bool Test48() { return PositiveTestString(Encoding.Unicode, "TestTest\uD803", new byte[] { 84, 0, 101, 0, 115, 0, 116, 0, 84, 0, 101, 0, 115, 0, 116, 0, 253, 255 }, "00I3"); }
+ public bool Test49() { return PositiveTestString(Encoding.Unicode, "\uDD75", new byte[] { 253, 255 }, "00J3"); }
+ public bool Test50() { return PositiveTestString(Encoding.Unicode, "\uD803\uDD75\uD803\uDD75\uD803\uDD75", new byte[] { 3, 216, 117, 221, 3, 216, 117, 221, 3, 216, 117, 221 }, "00K3"); }
+ public bool Test51() { return PositiveTestString(Encoding.Unicode, "\u0130", new byte[] { 48, 1 }, "00L3"); }
+ public bool Test52() { return PositiveTestString(Encoding.Unicode, "\uDD75\uDD75\uD803\uDD75\uDD75\uDD75\uDD75\uD803\uD803\uD803\uDD75\uDD75\uDD75\uDD75", new byte[] { 253, 255, 253, 255, 3, 216, 117, 221, 253, 255, 253, 255, 253, 255, 253, 255, 253, 255, 3, 216, 117, 221, 253, 255, 253, 255, 253, 255 }, "0A23"); }
+
+ public bool Test53() { return PositiveTestString(Encoding.BigEndianUnicode, "TestString", new byte[] { 0, 84, 0, 101, 0, 115, 0, 116, 0, 83, 0, 116, 0, 114, 0, 105, 0, 110, 0, 103 }, "00A4"); }
+ public bool Test54() { return PositiveTestString(Encoding.BigEndianUnicode, "", new byte[] { }, "00B4"); }
+ public bool Test55() { return PositiveTestString(Encoding.BigEndianUnicode, "FooBA\u0400R", new byte[] { 0, 70, 0, 111, 0, 111, 0, 66, 0, 65, 4, 0, 0, 82 }, "00C4"); }
+ public bool Test56() { return PositiveTestString(Encoding.BigEndianUnicode, "\u00C0nima\u0300l", new byte[] { 0, 192, 0, 110, 0, 105, 0, 109, 0, 97, 3, 0, 0, 108 }, "00D4"); }
+ public bool Test57() { return PositiveTestString(Encoding.BigEndianUnicode, "Test\uD803\uDD75Test", new byte[] { 0, 84, 0, 101, 0, 115, 0, 116, 216, 3, 221, 117, 0, 84, 0, 101, 0, 115, 0, 116 }, "00E4"); }
+ public bool Test58() { return PositiveTestString(Encoding.BigEndianUnicode, "Test\uD803Test", new byte[] { 0, 84, 0, 101, 0, 115, 0, 116, 255, 253, 0, 84, 0, 101, 0, 115, 0, 116 }, "00F4"); }
+ public bool Test59() { return PositiveTestString(Encoding.BigEndianUnicode, "Test\uDD75Test", new byte[] { 0, 84, 0, 101, 0, 115, 0, 116, 255, 253, 0, 84, 0, 101, 0, 115, 0, 116 }, "00G4"); }
+ public bool Test60() { return PositiveTestString(Encoding.BigEndianUnicode, "TestTest\uDD75", new byte[] { 0, 84, 0, 101, 0, 115, 0, 116, 0, 84, 0, 101, 0, 115, 0, 116, 255, 253 }, "00H4"); }
+ public bool Test61() { return PositiveTestString(Encoding.BigEndianUnicode, "TestTest\uD803", new byte[] { 0, 84, 0, 101, 0, 115, 0, 116, 0, 84, 0, 101, 0, 115, 0, 116, 255, 253 }, "00I4"); }
+ public bool Test62() { return PositiveTestString(Encoding.BigEndianUnicode, "\uDD75", new byte[] { 255, 253 }, "00J4"); }
+ public bool Test63() { return PositiveTestString(Encoding.BigEndianUnicode, "\uD803\uDD75\uD803\uDD75\uD803\uDD75", new byte[] { 216, 3, 221, 117, 216, 3, 221, 117, 216, 3, 221, 117 }, "00K4"); }
+ public bool Test64() { return PositiveTestString(Encoding.BigEndianUnicode, "\u0130", new byte[] { 1, 48 }, "00L4"); }
+ public bool Test65() { return PositiveTestString(Encoding.BigEndianUnicode, "\uDD75\uDD75\uD803\uDD75\uDD75\uDD75\uDD75\uD803\uD803\uD803\uDD75\uDD75\uDD75\uDD75", new byte[] { 255, 253, 255, 253, 216, 3, 221, 117, 255, 253, 255, 253, 255, 253, 255, 253, 255, 253, 216, 3, 221, 117, 255, 253, 255, 253, 255, 253 }, "0A24"); }
+
+ public bool Test66() { return PositiveTestChars(Encoding.UTF8, new char[] { 'T', 'e', 's', 't', 'S', 't', 'r', 'i', 'n', 'g' }, new byte[] { 84, 101, 115, 116, 83, 116, 114, 105, 110, 103 }, "00M"); }
+
+ public bool Test69() { return PositiveTestChars(Encoding.Unicode, new char[] { 'T', 'e', 's', 't', 'S', 't', 'r', 'i', 'n', 'g' }, new byte[] { 84, 0, 101, 0, 115, 0, 116, 0, 83, 0, 116, 0, 114, 0, 105, 0, 110, 0, 103, 0 }, "00M3"); }
+ public bool Test70() { return PositiveTestChars(Encoding.BigEndianUnicode, new char[] { 'T', 'e', 's', 't', 'S', 't', 'r', 'i', 'n', 'g' }, new byte[] { 0, 84, 0, 101, 0, 115, 0, 116, 0, 83, 0, 116, 0, 114, 0, 105, 0, 110, 0, 103 }, "00M4"); }
+
+ // Negative Tests
+ public bool Test71() { return NegativeTestString(new UTF8Encoding(), null, typeof(ArgumentNullException), "00N"); }
+
+ public bool Test74() { return NegativeTestString(new UnicodeEncoding(), null, typeof(ArgumentNullException), "00N3"); }
+ public bool Test75() { return NegativeTestString(new UnicodeEncoding(true, false), null, typeof(ArgumentNullException), "00N4"); }
+
+ public bool Test76() { return NegativeTestChars(new UTF8Encoding(), null, typeof(ArgumentNullException), "00O"); }
+
+ public bool Test79() { return NegativeTestChars(new UnicodeEncoding(), null, typeof(ArgumentNullException), "00O3"); }
+ public bool Test80() { return NegativeTestChars(new UnicodeEncoding(true, false), null, typeof(ArgumentNullException), "00O4"); }
+
+ public bool Test81() { return NegativeTestChars2(new UTF8Encoding(), null, 0, 0, typeof(ArgumentNullException), "00P"); }
+ public bool Test82() { return NegativeTestChars2(new UTF8Encoding(), new char[] { 't' }, -1, 1, typeof(ArgumentOutOfRangeException), "00P"); }
+ public bool Test83() { return NegativeTestChars2(new UTF8Encoding(), new char[] { 't' }, 1, -1, typeof(ArgumentOutOfRangeException), "00Q"); }
+ public bool Test84() { return NegativeTestChars2(new UTF8Encoding(), new char[] { 't' }, 0, 10, typeof(ArgumentOutOfRangeException), "00R"); }
+ public bool Test85() { return NegativeTestChars2(new UTF8Encoding(), new char[] { 't' }, 2, 0, typeof(ArgumentOutOfRangeException), "00S"); }
+
+ public bool Test96() { return NegativeTestChars2(new UnicodeEncoding(), null, 0, 0, typeof(ArgumentNullException), "00P3"); }
+ public bool Test97() { return NegativeTestChars2(new UnicodeEncoding(), new char[] { 't' }, -1, 1, typeof(ArgumentOutOfRangeException), "00P3"); }
+ public bool Test98() { return NegativeTestChars2(new UnicodeEncoding(), new char[] { 't' }, 1, -1, typeof(ArgumentOutOfRangeException), "00Q3"); }
+ public bool Test99() { return NegativeTestChars2(new UnicodeEncoding(), new char[] { 't' }, 0, 10, typeof(ArgumentOutOfRangeException), "00R3"); }
+ public bool Test100() { return NegativeTestChars2(new UnicodeEncoding(), new char[] { 't' }, 2, 0, typeof(ArgumentOutOfRangeException), "00S3"); }
+
+ public bool Test101() { return NegativeTestChars2(new UnicodeEncoding(true, false), null, 0, 0, typeof(ArgumentNullException), "00P4"); }
+ public bool Test102() { return NegativeTestChars2(new UnicodeEncoding(true, false), new char[] { 't' }, -1, 1, typeof(ArgumentOutOfRangeException), "00P4"); }
+ public bool Test103() { return NegativeTestChars2(new UnicodeEncoding(true, false), new char[] { 't' }, 1, -1, typeof(ArgumentOutOfRangeException), "00Q4"); }
+ public bool Test104() { return NegativeTestChars2(new UnicodeEncoding(true, false), new char[] { 't' }, 0, 10, typeof(ArgumentOutOfRangeException), "00R4"); }
+ public bool Test105() { return NegativeTestChars2(new UnicodeEncoding(true, false), new char[] { 't' }, 2, 0, typeof(ArgumentOutOfRangeException), "00S4"); }
+
+ static byte[] output = new byte[20];
+ public bool Test106() { return NegativeTestChars3(Encoding.UTF8, null, 0, 0, output, 0, typeof(ArgumentNullException), "00T"); }
+ public bool Test107() { return NegativeTestChars3(Encoding.UTF8, new char[] { 't' }, 0, 0, null, 0, typeof(ArgumentNullException), "00U"); }
+ public bool Test108() { return NegativeTestChars3(Encoding.UTF8, new char[] { 't' }, -1, 0, output, 0, typeof(ArgumentOutOfRangeException), "00V"); }
+ public bool Test109() { return NegativeTestChars3(Encoding.UTF8, new char[] { 't' }, 0, 0, output, -1, typeof(ArgumentOutOfRangeException), "00W"); }
+ public bool Test110() { return NegativeTestChars3(Encoding.UTF8, new char[] { 't' }, 2, 0, output, 0, typeof(ArgumentOutOfRangeException), "00X"); }
+ public bool Test111() { return NegativeTestChars3(Encoding.UTF8, new char[] { 't' }, 0, 0, output, 21, typeof(ArgumentOutOfRangeException), "00Y"); }
+ public bool Test112() { return NegativeTestChars3(Encoding.UTF8, new char[] { 't' }, 0, 10, output, 0, typeof(ArgumentOutOfRangeException), "00Z"); }
+ public bool Test113() { return NegativeTestChars3(Encoding.UTF8, new char[] { 't' }, 0, 1, output, 20, typeof(ArgumentException), "0A0"); }
+ public bool Test114() { return NegativeTestChars3(Encoding.UTF8, new char[] { 't' }, 0, -1, output, 0, typeof(ArgumentOutOfRangeException), "0A1"); }
+
+
+ public bool Test133() { return NegativeTestChars3(Encoding.Unicode, null, 0, 0, output, 0, typeof(ArgumentNullException), "00T3"); }
+ public bool Test134() { return NegativeTestChars3(Encoding.Unicode, new char[] { 't' }, 0, 0, null, 0, typeof(ArgumentNullException), "00U3"); }
+ public bool Test135() { return NegativeTestChars3(Encoding.Unicode, new char[] { 't' }, -1, 0, output, 0, typeof(ArgumentOutOfRangeException), "00V3"); }
+ public bool Test136() { return NegativeTestChars3(Encoding.Unicode, new char[] { 't' }, 0, 0, output, -1, typeof(ArgumentOutOfRangeException), "00W3"); }
+ public bool Test137() { return NegativeTestChars3(Encoding.Unicode, new char[] { 't' }, 2, 0, output, 0, typeof(ArgumentOutOfRangeException), "00X3"); }
+ public bool Test138() { return NegativeTestChars3(Encoding.Unicode, new char[] { 't' }, 0, 0, output, 21, typeof(ArgumentOutOfRangeException), "00Y3"); }
+ public bool Test139() { return NegativeTestChars3(Encoding.Unicode, new char[] { 't' }, 0, 10, output, 0, typeof(ArgumentOutOfRangeException), "00Z3"); }
+ public bool Test140() { return NegativeTestChars3(Encoding.Unicode, new char[] { 't' }, 0, 1, output, 20, typeof(ArgumentException), "0A03"); }
+ public bool Test141() { return NegativeTestChars3(Encoding.Unicode, new char[] { 't' }, 0, -1, output, 0, typeof(ArgumentOutOfRangeException), "0A13"); }
+
+ public bool Test142() { return NegativeTestChars3(Encoding.BigEndianUnicode, null, 0, 0, output, 0, typeof(ArgumentNullException), "00T4"); }
+ public bool Test143() { return NegativeTestChars3(Encoding.BigEndianUnicode, new char[] { 't' }, 0, 0, null, 0, typeof(ArgumentNullException), "00U4"); }
+ public bool Test144() { return NegativeTestChars3(Encoding.BigEndianUnicode, new char[] { 't' }, -1, 0, output, 0, typeof(ArgumentOutOfRangeException), "00V4"); }
+ public bool Test145() { return NegativeTestChars3(Encoding.BigEndianUnicode, new char[] { 't' }, 0, 0, output, -1, typeof(ArgumentOutOfRangeException), "00W4"); }
+ public bool Test146() { return NegativeTestChars3(Encoding.BigEndianUnicode, new char[] { 't' }, 2, 0, output, 0, typeof(ArgumentOutOfRangeException), "00X4"); }
+ public bool Test147() { return NegativeTestChars3(Encoding.BigEndianUnicode, new char[] { 't' }, 0, 0, output, 21, typeof(ArgumentOutOfRangeException), "00Y4"); }
+ public bool Test148() { return NegativeTestChars3(Encoding.BigEndianUnicode, new char[] { 't' }, 0, 10, output, 0, typeof(ArgumentOutOfRangeException), "00Z4"); }
+ public bool Test149() { return NegativeTestChars3(Encoding.BigEndianUnicode, new char[] { 't' }, 0, 1, output, 20, typeof(ArgumentException), "0A04"); }
+ public bool Test150() { return NegativeTestChars3(Encoding.BigEndianUnicode, new char[] { 't' }, 0, -1, output, 0, typeof(ArgumentOutOfRangeException), "0A14"); }
+
+ public bool Test151() { return NegativeTestString1(Encoding.UTF8, null, 0, 0, output, 0, typeof(ArgumentNullException), "00Ta"); }
+ public bool Test152() { return NegativeTestString1(Encoding.UTF8, "t", 0, 0, null, 0, typeof(ArgumentNullException), "00Ua"); }
+ public bool Test153() { return NegativeTestString1(Encoding.UTF8, "t", -1, 0, output, 0, typeof(ArgumentOutOfRangeException), "00Va"); }
+ public bool Test154() { return NegativeTestString1(Encoding.UTF8, "t", 0, 0, output, -1, typeof(ArgumentOutOfRangeException), "00Wa"); }
+ public bool Test155() { return NegativeTestString1(Encoding.UTF8, "t", 2, 0, output, 0, typeof(ArgumentOutOfRangeException), "00Xa"); }
+ public bool Test156() { return NegativeTestString1(Encoding.UTF8, "t", 0, 0, output, 21, typeof(ArgumentOutOfRangeException), "00Ya"); }
+ public bool Test157() { return NegativeTestString1(Encoding.UTF8, "t", 0, 10, output, 0, typeof(ArgumentOutOfRangeException), "00Za"); }
+ public bool Test158() { return NegativeTestString1(Encoding.UTF8, "t", 0, 1, output, 20, typeof(ArgumentException), "0A0a"); }
+ public bool Test159() { return NegativeTestString1(Encoding.UTF8, "t", 0, -1, output, 0, typeof(ArgumentOutOfRangeException), "0A1a"); }
+
+
+ public bool Test178() { return NegativeTestString1(Encoding.Unicode, null, 0, 0, output, 0, typeof(ArgumentNullException), "00T3a"); }
+ public bool Test179() { return NegativeTestString1(Encoding.Unicode, "t", 0, 0, null, 0, typeof(ArgumentNullException), "00U3a"); }
+ public bool Test180() { return NegativeTestString1(Encoding.Unicode, "t", -1, 0, output, 0, typeof(ArgumentOutOfRangeException), "00V3a"); }
+ public bool Test181() { return NegativeTestString1(Encoding.Unicode, "t", 0, 0, output, -1, typeof(ArgumentOutOfRangeException), "00W3a"); }
+ public bool Test182() { return NegativeTestString1(Encoding.Unicode, "t", 2, 0, output, 0, typeof(ArgumentOutOfRangeException), "00X3a"); }
+ public bool Test183() { return NegativeTestString1(Encoding.Unicode, "t", 0, 0, output, 21, typeof(ArgumentOutOfRangeException), "00Y3a"); }
+ public bool Test184() { return NegativeTestString1(Encoding.Unicode, "t", 0, 10, output, 0, typeof(ArgumentOutOfRangeException), "00Z3a"); }
+ public bool Test185() { return NegativeTestString1(Encoding.Unicode, "t", 0, 1, output, 20, typeof(ArgumentException), "0A03a"); }
+ public bool Test186() { return NegativeTestString1(Encoding.Unicode, "t", 0, -1, output, 0, typeof(ArgumentOutOfRangeException), "0A13a"); }
+
+ public bool Test187() { return NegativeTestString1(Encoding.BigEndianUnicode, null, 0, 0, output, 0, typeof(ArgumentNullException), "00T4a"); }
+ public bool Test188() { return NegativeTestString1(Encoding.BigEndianUnicode, "t", 0, 0, null, 0, typeof(ArgumentNullException), "00U4a"); }
+ public bool Test189() { return NegativeTestString1(Encoding.BigEndianUnicode, "t", -1, 0, output, 0, typeof(ArgumentOutOfRangeException), "00V4a"); }
+ public bool Test190() { return NegativeTestString1(Encoding.BigEndianUnicode, "t", 0, 0, output, -1, typeof(ArgumentOutOfRangeException), "00W4a"); }
+ public bool Test191() { return NegativeTestString1(Encoding.BigEndianUnicode, "t", 2, 0, output, 0, typeof(ArgumentOutOfRangeException), "00X4a"); }
+ public bool Test192() { return NegativeTestString1(Encoding.BigEndianUnicode, "t", 0, 0, output, 21, typeof(ArgumentOutOfRangeException), "00Y4a"); }
+ public bool Test193() { return NegativeTestString1(Encoding.BigEndianUnicode, "t", 0, 10, output, 0, typeof(ArgumentOutOfRangeException), "00Z4a"); }
+ public bool Test194() { return NegativeTestString1(Encoding.BigEndianUnicode, "t", 0, 1, output, 20, typeof(ArgumentException), "0A04a"); }
+ public bool Test195() { return NegativeTestString1(Encoding.BigEndianUnicode, "t", 0, -1, output, 0, typeof(ArgumentOutOfRangeException), "0A14a"); }
+
+ public bool PositiveTestString(Encoding enc, string str, byte[] expected, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Getting bytes for " + str + " with encoding " + enc.WebName);
+ try
+ {
+ byte[] bytes = enc.GetBytes(str);
+ if (!Utilities.CompareBytes(bytes, expected))
+ {
+ result = false;
+ TestFramework.LogError("001", "Error in " + id + ", unexpected comparison result. Actual bytes " + Utilities.ByteArrayToString(bytes) + ", Expected: " + Utilities.ByteArrayToString(expected));
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("002", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ return result;
+ }
+
+ public bool NegativeTestString(Encoding enc, string str, Type excType, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Getting bytes with encoding " + enc.WebName);
+ try
+ {
+ byte[] bytes = enc.GetBytes(str);
+ result = false;
+ TestFramework.LogError("005", "Error in " + id + ", Expected exception not thrown. Actual bytes " + Utilities.ByteArrayToString(bytes) + ", Expected exception type: " + excType.ToString());
+ }
+ catch (Exception exc)
+ {
+ if (exc.GetType() != excType)
+ {
+ result = false;
+ TestFramework.LogError("006", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ }
+ return result;
+ }
+
+ public bool PositiveTestChars(Encoding enc, char[] chars, byte[] expected, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Getting bytes for " + new string(chars) + " with encoding " + enc.WebName);
+ try
+ {
+ byte[] bytes = enc.GetBytes(chars);
+ if (!Utilities.CompareBytes(bytes, expected))
+ {
+ result = false;
+ TestFramework.LogError("003", "Error in " + id + ", unexpected comparison result. Actual bytes " + Utilities.ByteArrayToString(bytes) + ", Expected: " + Utilities.ByteArrayToString(expected));
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("004", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ return result;
+ }
+
+ public bool NegativeTestChars(Encoding enc, char[] str, Type excType, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Getting bytes with encoding " + enc.WebName);
+ try
+ {
+ byte[] bytes = enc.GetBytes(str);
+ result = false;
+ TestFramework.LogError("007", "Error in " + id + ", Expected exception not thrown. Actual bytes " + Utilities.ByteArrayToString(bytes) + ", Expected exception type: " + excType.ToString());
+ }
+ catch (Exception exc)
+ {
+ if (exc.GetType() != excType)
+ {
+ result = false;
+ TestFramework.LogError("008", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ }
+ return result;
+ }
+
+ public bool NegativeTestChars2(Encoding enc, char[] str, int index, int count, Type excType, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Getting bytes with encoding " + enc.WebName);
+ try
+ {
+ byte[] bytes = enc.GetBytes(str, index, count);
+ result = false;
+ TestFramework.LogError("009", "Error in " + id + ", Expected exception not thrown. Actual bytes " + Utilities.ByteArrayToString(bytes) + ", Expected exception type: " + excType.ToString());
+ }
+ catch (Exception exc)
+ {
+ if (exc.GetType() != excType)
+ {
+ result = false;
+ TestFramework.LogError("010", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ }
+ return result;
+ }
+
+ public bool NegativeTestChars3(Encoding enc, char[] str, int index, int count, byte[] bytes, int bIndex, Type excType, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Getting bytes with encoding " + enc.WebName);
+ try
+ {
+ int output = enc.GetBytes(str, index, count, bytes, bIndex);
+ result = false;
+ TestFramework.LogError("011", "Error in " + id + ", Expected exception not thrown. Actual bytes " + Utilities.ByteArrayToString(bytes) + ", Expected exception type: " + excType.ToString());
+ }
+ catch (Exception exc)
+ {
+ if (exc.GetType() != excType)
+ {
+ result = false;
+ TestFramework.LogError("012", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ }
+ return result;
+ }
+
+ public bool NegativeTestString1(Encoding enc, string str, int index, int count, byte[] bytes, int bIndex, Type excType, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Getting bytes with encoding " + enc.WebName);
+ try
+ {
+ int output = enc.GetBytes(str, index, count, bytes, bIndex);
+ result = false;
+ TestFramework.LogError("013", "Error in " + id + ", Expected exception not thrown. Actual bytes " + Utilities.ByteArrayToString(bytes) + ", Expected exception type: " + excType.ToString());
+ }
+ catch (Exception exc)
+ {
+ if (exc.GetType() != excType)
+ {
+ result = false;
+ TestFramework.LogError("014", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ }
+ return result;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytes2.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytes2.cs
new file mode 100644
index 0000000000..39a815f1ee
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytes2.cs
@@ -0,0 +1,271 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// GetBytes(System.Char[],System.Int32,System.Int32)
+/// </summary>
+
+public class EncodingGetBytes2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method GetBytes.");
+
+ try
+ {
+ char[] testChar = new char[] { 'z', 'a', '\u0306', '\u01FD', '\u03B2', '\uD8FF', '\uDCFF' };
+
+
+ Encoding u8 = Encoding.UTF8;
+ Encoding u16LE = Encoding.Unicode;
+ Encoding u16BE = Encoding.BigEndianUnicode;
+
+
+ byte[] actualBytesUTF8 = new byte[] {
+ 0x7A, 0x61, 0xCC ,0x86, 0xC7 ,0xBD,
+ 0xCE ,0xB2 ,0xF1, 0x8F ,0xB3 ,0xBF};
+
+ byte[] actualBytesUnicode = new byte[]{
+ 0x7A, 0x00, 0x61, 0x00, 0x06, 0x03,
+ 0xFD, 0x01, 0xB2, 0x03, 0xFF, 0xD8,
+ 0xFF, 0xDC};
+
+ byte[] actualBytesBigEndianUnicode = new byte[]{
+ 0x00, 0x7A, 0x00, 0x61, 0x03, 0x06,
+ 0x01, 0xFD, 0x03, 0xB2, 0xD8, 0xFF,
+ 0xDC, 0xFF};
+
+
+ if (!VerifyByteItemValue(u8.GetBytes(testChar,0,testChar.Length), actualBytesUTF8) ||
+ !VerifyByteItemValue(u16LE.GetBytes(testChar,0,testChar.Length), actualBytesUnicode) ||
+ !VerifyByteItemValue(u16BE.GetBytes(testChar,0,testChar.Length), actualBytesBigEndianUnicode))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method GetBytes Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method GetBytes when chars is null.");
+
+ try
+ {
+ char[] testChar = new char[0];
+
+ Encoding u8 = Encoding.UTF8;
+ Encoding u16LE = Encoding.Unicode;
+ Encoding u16BE = Encoding.BigEndianUnicode;
+
+ byte[] result = new byte[0];
+
+ if (!VerifyByteItemValue(u8.GetBytes(testChar, 0, testChar.Length), result) ||
+ !VerifyByteItemValue(u16LE.GetBytes(testChar, 0, testChar.Length), result) ||
+ !VerifyByteItemValue(u16BE.GetBytes(testChar, 0, testChar.Length), result))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method GetBytes Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown.");
+
+ try
+ {
+ char[] testChar = null;
+
+ Encoding u7 = Encoding.UTF8;
+
+ byte[] result = u7.GetBytes(testChar, 2, 1);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentOutOfRangeException is not thrown.");
+
+ try
+ {
+ char[] testChar = new char[] { 'z', 'a', '\u0306', '\u01FD', '\u03B2', '\uD8FF', '\uDCFF' };
+
+ Encoding u7 = Encoding.UTF8;
+
+ byte[] result = u7.GetBytes(testChar, -1, 1);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentOutOfRangeException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentOutOfRangeException is not thrown.");
+
+ try
+ {
+ char[] testChar = new char[] { 'z', 'a', '\u0306', '\u01FD', '\u03B2', '\uD8FF', '\uDCFF' };
+
+ Encoding u7 = Encoding.UTF8;
+
+ byte[] result = u7.GetBytes(testChar, 0, -1);
+
+ TestLibrary.TestFramework.LogError("103.1", "ArgumentOutOfRangeException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: ArgumentOutOfRangeException is not thrown.");
+
+ try
+ {
+ char[] testChar = new char[] { 'z', 'a', '\u0306', '\u01FD', '\u03B2', '\uD8FF', '\uDCFF' };
+
+ Encoding u7 = Encoding.UTF8;
+
+ byte[] result = u7.GetBytes(testChar, 0, testChar.Length + 1);
+
+ TestLibrary.TestFramework.LogError("104.1", "ArgumentOutOfRangeException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EncodingGetBytes2 test = new EncodingGetBytes2();
+
+ TestLibrary.TestFramework.BeginTestCase("EncodingGetBytes2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Method
+ private bool VerifyByteItemValue(byte[] getBytes, byte[] actualBytes)
+ {
+ if (getBytes.Length != actualBytes.Length)
+ return false;
+ else
+ {
+ for (int i = 0; i < getBytes.Length; i++)
+ if (getBytes[i] != actualBytes[i])
+ return false;
+ }
+
+ return true;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytes3.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytes3.cs
new file mode 100644
index 0000000000..410c9b3dd0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytes3.cs
@@ -0,0 +1,369 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// GetBytes(System.Char[],System.Int32,System.Int32,System.Byte[],System.Int32)
+/// </summary>
+
+public class EncodingGetBytes3
+{
+ #region Private Fileds
+ private char[] testChar = new char[] { 'z', 'a', '\u0306', '\u01FD', '\u03B2', '\uD8FF', '\uDCFF' };
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method GetBytes(System.Char[],System.Int32,System.Int32,System.Byte[],System.Int32) with UTF8.");
+
+ try
+ {
+ Encoding u8 = Encoding.UTF8;
+
+ byte[] u8Bytes = u8.GetBytes(testChar, 4, 3);
+ int u8ByteIndex = u8Bytes.GetLowerBound(0);
+
+ if (u8.GetBytes(testChar, 4, 3, u8Bytes, u8ByteIndex) != 6)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method GetBytes Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method GetBytes(System.Char[],System.Int32,System.Int32,System.Byte[],System.Int32) with Unicode.");
+
+ try
+ {
+ Encoding u16LE = Encoding.Unicode;
+
+ byte[] u16LEBytes = u16LE.GetBytes(testChar, 4, 3);
+ int u16LEByteIndex = u16LEBytes.GetLowerBound(0);
+
+ if (u16LE.GetBytes(testChar, 4, 3, u16LEBytes, u16LEByteIndex) != 6)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method GetBytes Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify method GetBytes(System.Char[],System.Int32,System.Int32,System.Byte[],System.Int32) with BigEndianUnicode.");
+
+ try
+ {
+ Encoding u16BE = Encoding.BigEndianUnicode;
+
+ byte[] u16BEBytes = u16BE.GetBytes(testChar, 4, 3);
+ int u16BEByteIndex = u16BEBytes.GetLowerBound(0);
+
+ if (u16BE.GetBytes(testChar, 4, 3, u16BEBytes, u16BEByteIndex) != 6)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Method GetBytes Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown.");
+
+ try
+ {
+ char[] testNullChar = null;
+
+ Encoding u7 = Encoding.UTF8;
+
+ byte[] u7Bytes = u7.GetBytes(testChar, 4, 3);
+ int u7ByteIndex = u7Bytes.GetLowerBound(0);
+
+ int result = u7.GetBytes(testNullChar, 4, 3, u7Bytes, u7ByteIndex);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentNullException is not thrown.");
+
+ try
+ {
+ Encoding u7 = Encoding.UTF8;
+
+ byte[] u7Bytes = null;
+ int u7ByteIndex = 1;
+
+ int result = u7.GetBytes(testChar, 4, 3, u7Bytes, u7ByteIndex);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentOutOfRangeException is not thrown.");
+
+ try
+ {
+ Encoding u7 = Encoding.UTF8;
+
+ byte[] u7Bytes = u7.GetBytes(testChar, 4, 3);
+ int u7ByteIndex = u7Bytes.GetLowerBound(0);
+
+ int result = u7.GetBytes(testChar, -1, 3, u7Bytes, u7ByteIndex);
+
+ TestLibrary.TestFramework.LogError("103.1", "ArgumentOutOfRangeException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: ArgumentOutOfRangeException is not thrown.");
+
+ try
+ {
+ Encoding u7 = Encoding.UTF8;
+
+ byte[] u7Bytes = u7.GetBytes(testChar, 4, 3);
+ int u7ByteIndex = u7Bytes.GetLowerBound(0);
+
+ int result = u7.GetBytes(testChar, 4, -1, u7Bytes, u7ByteIndex);
+
+ TestLibrary.TestFramework.LogError("104.1", "ArgumentOutOfRangeException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: ArgumentOutOfRangeException is not thrown.");
+
+ try
+ {
+ Encoding u7 = Encoding.UTF8;
+
+ byte[] u7Bytes = u7.GetBytes(testChar, 4, 3);
+ int u7ByteIndex = u7Bytes.GetLowerBound(0);
+
+ int result = u7.GetBytes(testChar, testChar.Length - 1, 3, u7Bytes, u7ByteIndex);
+
+ TestLibrary.TestFramework.LogError("105.1", "ArgumentOutOfRangeException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("105.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: ArgumentOutOfRangeException is not thrown.");
+
+ try
+ {
+ Encoding u7 = Encoding.UTF8;
+
+ byte[] u7Bytes = u7.GetBytes(testChar, 4, 3);
+
+ int result = u7.GetBytes(testChar, 4, 3, u7Bytes, -1);
+
+ TestLibrary.TestFramework.LogError("106.1", "ArgumentOutOfRangeException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest7: ArgumentException is not thrown.");
+
+ try
+ {
+ Encoding u7 = Encoding.UTF8;
+
+ byte[] u7Bytes = u7.GetBytes(testChar, 4, 3);
+ int u7ByteIndex = u7Bytes.GetLowerBound(0);
+
+ int result = u7.GetBytes(testChar, 4, 3, u7Bytes, u7Bytes.Length - 1);
+
+ TestLibrary.TestFramework.LogError("107.1", "ArgumentException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("107.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EncodingGetBytes3 test = new EncodingGetBytes3();
+
+ TestLibrary.TestFramework.BeginTestCase("EncodingGetBytes3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytes4.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytes4.cs
new file mode 100644
index 0000000000..720e933209
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytes4.cs
@@ -0,0 +1,202 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// GetBytes(System.String)
+/// </summary>
+
+public class EncodingGetBytes4
+{
+ #region Private Fields
+ private const string c_TEST_STR = "za\u0306\u01FD\u03B2\uD8FF\uDCFF";
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method GetBytes(System.String) with UTF8.");
+
+ try
+ {
+ Encoding u8 = Encoding.UTF8;
+
+ byte[] actualBytesUTF8 = new byte[] {
+ 0x7A, 0x61, 0xCC ,0x86, 0xC7 ,0xBD,
+ 0xCE ,0xB2 ,0xF1, 0x8F ,0xB3 ,0xBF};
+
+ if (!VerifyByteItemValue(u8.GetBytes(c_TEST_STR), actualBytesUTF8))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method GetBytes Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method GetBytes(System.String) with Unicode.");
+
+ try
+ {
+ Encoding u16LE = Encoding.Unicode;
+
+ byte[] actualBytesUnicode = new byte[]{
+ 0x7A, 0x00, 0x61, 0x00, 0x06, 0x03,
+ 0xFD, 0x01, 0xB2, 0x03, 0xFF, 0xD8,
+ 0xFF, 0xDC};
+
+ if (!VerifyByteItemValue(u16LE.GetBytes(c_TEST_STR), actualBytesUnicode))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method GetBytes Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify method GetBytes(System.String) with BigEndianUnicode.");
+
+ try
+ {
+ Encoding u16BE = Encoding.BigEndianUnicode;
+
+ byte[] actualBytesBigEndianUnicode = new byte[]{
+ 0x00, 0x7A, 0x00, 0x61, 0x03, 0x06,
+ 0x01, 0xFD, 0x03, 0xB2, 0xD8, 0xFF,
+ 0xDC, 0xFF};
+
+ if (!VerifyByteItemValue(u16BE.GetBytes(c_TEST_STR), actualBytesBigEndianUnicode))
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Method GetBytes Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown.");
+
+ try
+ {
+ String testStr = null;
+ Encoding u16BE = Encoding.BigEndianUnicode;
+
+ byte[] getBytes = u16BE.GetBytes(testStr);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EncodingGetBytes4 test = new EncodingGetBytes4();
+
+ TestLibrary.TestFramework.BeginTestCase("EncodingGetBytes4");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Method
+ private bool VerifyByteItemValue(byte[] getBytes, byte[] actualBytes)
+ {
+ if (getBytes.Length != actualBytes.Length)
+ return false;
+ else
+ {
+ for (int i = 0; i < getBytes.Length; i++)
+ if (getBytes[i] != actualBytes[i])
+ return false;
+ }
+
+ return true;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytes5.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytes5.cs
new file mode 100644
index 0000000000..1a398e722e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetbytes5.cs
@@ -0,0 +1,365 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// GetBytes(System.String,System.Int32,System.Int32,System.Byte[],System.Int32)
+/// </summary>
+
+public class EncodingGetBytes5
+{
+ #region Private Fields
+ private const string c_TEST_STR = "za\u0306\u01FD\u03B2\uD8FF\uDCFF";
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method GetBytes(System.String) with UTF8.");
+
+ try
+ {
+ Encoding u8 = Encoding.UTF8;
+ byte[] bytes = new byte[u8.GetMaxByteCount(3)];
+
+ if (u8.GetBytes(c_TEST_STR, 4, 3, bytes, bytes.GetLowerBound(0)) != 6)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method GetBytes Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify method GetBytes(System.String) with Unicode.");
+
+ try
+ {
+ Encoding u16LE = Encoding.Unicode;
+ byte[] bytes = new byte[u16LE.GetMaxByteCount(3)];
+
+ if (u16LE.GetBytes(c_TEST_STR, 4, 3, bytes, bytes.GetLowerBound(0)) != 6)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method GetBytes Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify method GetBytes(System.String) with BigEndianUnicode.");
+
+ try
+ {
+ Encoding u16BE = Encoding.BigEndianUnicode;
+ byte[] bytes = new byte[u16BE.GetMaxByteCount(3)];
+
+ if (u16BE.GetBytes(c_TEST_STR, 4, 3, bytes, bytes.GetLowerBound(0)) != 6)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Method GetBytes Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown.");
+
+ try
+ {
+ string testNullStr = null;
+
+ Encoding u16BE = Encoding.BigEndianUnicode;
+ byte[] bytes = new byte[u16BE.GetMaxByteCount(3)];
+
+ int i = u16BE.GetBytes(testNullStr, 4, 3, bytes, bytes.GetLowerBound(0));
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentNullException is not thrown.");
+
+ try
+ {
+ Encoding u16BE = Encoding.BigEndianUnicode;
+ byte[] bytes = null;
+
+ int i = u16BE.GetBytes(c_TEST_STR, 4, 3, bytes, 1);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentNullException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentOutOfRangeException is not thrown.");
+
+ try
+ {
+ Encoding u16BE = Encoding.BigEndianUnicode;
+ byte[] bytes = new byte[u16BE.GetMaxByteCount(3)];
+
+ int i = u16BE.GetBytes(c_TEST_STR, -1, 3, bytes, bytes.GetLowerBound(0));
+
+ TestLibrary.TestFramework.LogError("103.1", "ArgumentOutOfRangeException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: ArgumentOutOfRangeException is not thrown.");
+
+ try
+ {
+ Encoding u16BE = Encoding.BigEndianUnicode;
+ byte[] bytes = new byte[u16BE.GetMaxByteCount(3)];
+
+ int i = u16BE.GetBytes(c_TEST_STR, 4, -1, bytes, bytes.GetLowerBound(0));
+
+ TestLibrary.TestFramework.LogError("104.1", "ArgumentOutOfRangeException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: ArgumentOutOfRangeException is not thrown.");
+
+ try
+ {
+ Encoding u16BE = Encoding.BigEndianUnicode;
+ byte[] bytes = new byte[u16BE.GetMaxByteCount(3)];
+
+ int i = u16BE.GetBytes(c_TEST_STR, 4, 3, bytes, -1);
+
+ TestLibrary.TestFramework.LogError("105.1", "ArgumentOutOfRangeException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("105.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: ArgumentOutOfRangeException is not thrown.");
+
+ try
+ {
+ Encoding u16BE = Encoding.BigEndianUnicode;
+ byte[] bytes = new byte[u16BE.GetMaxByteCount(3)];
+
+ int i = u16BE.GetBytes(c_TEST_STR, c_TEST_STR.Length - 1, 3, bytes, bytes.GetLowerBound(0));
+
+ TestLibrary.TestFramework.LogError("106.1", "ArgumentOutOfRangeException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest7: ArgumentException is not thrown.");
+
+ try
+ {
+ Encoding u16BE = Encoding.BigEndianUnicode;
+ byte[] bytes = new byte[u16BE.GetMaxByteCount(3)];
+
+ int i = u16BE.GetBytes(c_TEST_STR, 4, 3, bytes, bytes.Length - 1);
+
+ TestLibrary.TestFramework.LogError("107.1", "ArgumentException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("107.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EncodingGetBytes5 test = new EncodingGetBytes5();
+
+ TestLibrary.TestFramework.BeginTestCase("EncodingGetBytes5");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Method
+ private bool VerifyByteItemValue(byte[] getBytes, byte[] actualBytes)
+ {
+ if (getBytes.Length != actualBytes.Length)
+ return false;
+ else
+ {
+ for (int i = 0; i < getBytes.Length; i++)
+ if (getBytes[i] != actualBytes[i])
+ return false;
+ }
+
+ return true;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetcharcount.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetcharcount.cs
new file mode 100644
index 0000000000..cc1953ce88
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetcharcount.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetcharcount1.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetcharcount1.cs
new file mode 100644
index 0000000000..91603dae40
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetcharcount1.cs
@@ -0,0 +1,131 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// Encoding.GetCharCount(Byte[])
+/// </summary>
+public class EncodingGetCharCount1
+{
+ public static int Main()
+ {
+ EncodingGetCharCount1 egcc1 = new EncodingGetCharCount1();
+ TestLibrary.TestFramework.BeginTestCase("EncodingGetCharCount1");
+ if (egcc1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the GetCharCount method 1");
+ try
+ {
+ byte[] bytes = new byte[0];
+ Encoding myEncode = Encoding.UTF8;
+ int intVal = myEncode.GetCharCount(bytes);
+ if (intVal != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the GetCharCount method 2");
+ try
+ {
+ string myStr = "za\u0306\u01fd\u03b2";
+ Encoding myEncode = Encoding.Unicode;
+ byte[] bytes = myEncode.GetBytes(myStr);
+ int intVal = myEncode.GetCharCount(bytes);
+ if (intVal != myStr.Length)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke the GetCharCount method 3");
+ try
+ {
+ string myStr = "\\abc\u0020";
+ Encoding myEncode = Encoding.Unicode;
+ byte[] bytes = myEncode.GetBytes(myStr);
+ int intVal = myEncode.GetCharCount(bytes);
+ if (intVal != myStr.Length)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The byte array is null");
+ try
+ {
+ byte[] bytes = null;
+ Encoding myEncode = Encoding.Unicode;
+ int intVal = myEncode.GetCharCount(bytes);
+ TestLibrary.TestFramework.LogError("N001", "the byte array is null but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetcharcount2.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetcharcount2.cs
new file mode 100644
index 0000000000..ea9f3155fd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetcharcount2.cs
@@ -0,0 +1,237 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// Encoding.GetCharCount(Byte[],Int32,Int32)
+/// </summary>
+public class EncodingGetCharCount2
+{
+ public static int Main()
+ {
+ EncodingGetCharCount2 egcc2 = new EncodingGetCharCount2();
+ TestLibrary.TestFramework.BeginTestCase("EncodingGetCharCount2");
+ if (egcc2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the GetCharCount method 1");
+ try
+ {
+ byte[] bytes = new byte[0];
+ Encoding myEncode = Encoding.Unicode;
+ int startIndex = 0;
+ int count = 0;
+ int intVal = myEncode.GetCharCount(bytes, startIndex, count);
+ if (intVal != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the GetCharCount method 2");
+ try
+ {
+ string myStr = "za\u0306\u01fd\u03b2";
+ Encoding myEncode = Encoding.Unicode;
+ byte[] bytes = myEncode.GetBytes(myStr);
+ int startIndex = 0;
+ int count = 0;
+ int intVal = myEncode.GetCharCount(bytes, startIndex, count);
+ if (intVal != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke the GetCharCount method 3");
+ try
+ {
+ string myStr = "za\u0306\u01fd\u03b2";
+ Encoding myEncode = Encoding.Unicode;
+ byte[] bytes = myEncode.GetBytes(myStr);
+ int startIndex = 0;
+ int count = bytes.Length;
+ int intVal = myEncode.GetCharCount(bytes, startIndex, count);
+ if (intVal != myStr.Length)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Invoke the GetCharCount method 4");
+ try
+ {
+ string myStr = "\\abc\\u0020";
+ Encoding myEncode = Encoding.Unicode;
+ byte[] bytes = myEncode.GetBytes(myStr);
+ int startIndex = 0;
+ int count = bytes.Length;
+ int intVal = myEncode.GetCharCount(bytes, startIndex, count);
+ if (intVal != myStr.Length)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The byte array is null");
+ try
+ {
+ byte[] bytes = null;
+ Encoding myEncode = Encoding.Unicode;
+ int startIndex = 0;
+ int count = 0;
+ int intVal = myEncode.GetCharCount(bytes, startIndex, count);
+ TestLibrary.TestFramework.LogError("N001", "the byte array is null but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:The startIndex is less than zero");
+ try
+ {
+ string myStr = "helloworld";
+ Encoding myEncode = Encoding.Unicode;
+ byte[] bytes = myEncode.GetBytes(myStr);
+ int startIndex = -1;
+ int count = myStr.Length;
+ int intVal = myEncode.GetCharCount(bytes, startIndex, count);
+ TestLibrary.TestFramework.LogError("N003", "the startIndex is less than zero but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3:The count is less than zero");
+ try
+ {
+ string myStr = "helloworld";
+ Encoding myEncode = Encoding.Unicode;
+ byte[] bytes = myEncode.GetBytes(myStr);
+ int startIndex = 0;
+ int count = -1;
+ int intVal = myEncode.GetCharCount(bytes, startIndex, count);
+ TestLibrary.TestFramework.LogError("N005", "the count is less than zero but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4:The startIndex and count do not denote a valid range of bytes");
+ try
+ {
+ string myStr = "helloworld";
+ Encoding myEncode = Encoding.Unicode;
+ byte[] bytes = myEncode.GetBytes(myStr);
+ int startIndex = 0;
+ int count = bytes.Length + 1;
+ int intVal = myEncode.GetCharCount(bytes, startIndex, count);
+ TestLibrary.TestFramework.LogError("N007", "The startIndex and count do not denote a valid range of bytes but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetchars1.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetchars1.cs
new file mode 100644
index 0000000000..0f24507700
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetchars1.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetchars2.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetchars2.cs
new file mode 100644
index 0000000000..e405eb98ca
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetchars2.cs
@@ -0,0 +1,212 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// Encoding.GetChars(Byte[],Int32,Int32)
+/// </summary>
+public class EncodingGetChars2
+{
+ public static int Main()
+ {
+ EncodingGetChars2 enGetChars2 = new EncodingGetChars2();
+ TestLibrary.TestFramework.BeginTestCase("EncodingGetChars2");
+ if (enGetChars2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the GetChars method 1");
+ try
+ {
+ byte[] bytes = new byte[0];
+ Encoding myEncode = Encoding.GetEncoding("utf-16");
+ int startIndex = 0;
+ int count = 0;
+ char[] charsVal = myEncode.GetChars(bytes, startIndex, count);
+ if (charsVal.Length != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the GetChars method 2");
+ try
+ {
+ string myStr = "za\u0306\u01fd\u03b2";
+ Encoding myEncode = Encoding.GetEncoding("utf-16");
+ byte[] bytes = myEncode.GetBytes(myStr);
+ int startIndex = 0;
+ int count = 0;
+ char[] charsVal = myEncode.GetChars(bytes, startIndex, count);
+ if (charsVal.Length != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke the GetChars method 3");
+ try
+ {
+ string myStr = "za\u0306\u01fd\u03b2";
+ Encoding myEncode = Encoding.GetEncoding("utf-16");
+ byte[] bytes = myEncode.GetBytes(myStr);
+ int startIndex = 0;
+ int count = bytes.Length;
+ char[] charsVal = myEncode.GetChars(bytes, startIndex, count);
+ string strVal = new string(charsVal);
+ if (strVal != myStr)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The byte array is null");
+ try
+ {
+ byte[] bytes = null;
+ Encoding myEncode = Encoding.GetEncoding("utf-16");
+ int startIndex = 0;
+ int count = 0;
+ char[] charsVal = myEncode.GetChars(bytes, startIndex, count);
+ TestLibrary.TestFramework.LogError("N001", "the byte array is null but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:The startIndex is less than zero");
+ try
+ {
+ string myStr = "helloworld";
+ Encoding myEncode = Encoding.GetEncoding("utf-16");
+ byte[] bytes = myEncode.GetBytes(myStr);
+ int startIndex = -1;
+ int count = myStr.Length;
+ char[] charsVal = myEncode.GetChars(bytes, startIndex, count);
+ TestLibrary.TestFramework.LogError("N003", "the startIndex is less than zero but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3:The count is less than zero");
+ try
+ {
+ string myStr = "helloworld";
+ Encoding myEncode = Encoding.GetEncoding("utf-16");
+ byte[] bytes = myEncode.GetBytes(myStr);
+ int startIndex = 0;
+ int count = -1;
+ char[] charsVal = myEncode.GetChars(bytes, startIndex, count);
+ TestLibrary.TestFramework.LogError("N005", "the count is less than zero but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4:The startIndex and count do not denote a valid range of bytes");
+ try
+ {
+ string myStr = "helloworld";
+ Encoding myEncode = Encoding.GetEncoding("utf-16");
+ byte[] bytes = myEncode.GetBytes(myStr);
+ int startIndex = 0;
+ int count = bytes.Length + 1;
+ char[] charsVal = myEncode.GetChars(bytes, startIndex, count);
+ TestLibrary.TestFramework.LogError("N007", "The startIndex and count do not denote a valid range of bytes but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetchars3.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetchars3.cs
new file mode 100644
index 0000000000..ddb1309769
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetchars3.cs
@@ -0,0 +1,377 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// Encoding.GetChars(byte[],Int32,Int32,char[],Int32)
+/// </summary>
+public class EncodingGetChars3
+{
+ public static int Main()
+ {
+ EncodingGetChars3 enGetChars3 = new EncodingGetChars3();
+ TestLibrary.TestFramework.BeginTestCase("EncodingGetChars3");
+ if (enGetChars3.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the GetChars method 1");
+ try
+ {
+ byte[] bytes = new byte[0];
+ Encoding myEncode = Encoding.GetEncoding("utf-16");
+ int byteIndex = 0;
+ int bytecount = 0;
+ char[] chars = new char[] { TestLibrary.Generator.GetChar(-55)};
+ int intVal = myEncode.GetChars(bytes, byteIndex, bytecount,chars, 0);
+ if (intVal != 0 || chars.Length != 1)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the GetChars method 2");
+ try
+ {
+ string myStr = "za\u0306\u01fd\u03b2";
+ Encoding myEncode = Encoding.GetEncoding("utf-16");
+ byte[] bytes = myEncode.GetBytes(myStr);
+ int byteIndex = 0;
+ int bytecount = 0;
+ char[] chars = new char[] { TestLibrary.Generator.GetChar(-55) };
+ int intVal = myEncode.GetChars(bytes, byteIndex, bytecount, chars, 0);
+ if (intVal != 0 || chars.Length != 1)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke the GetChars method 3");
+ try
+ {
+ string myStr = "za\u0306\u01fd\u03b2";
+ Encoding myEncode = Encoding.GetEncoding("utf-16");
+ byte[] bytes = myEncode.GetBytes(myStr);
+ int byteIndex = 0;
+ int bytecount = bytes.Length;
+ char[] chars = new char[myStr.Length];
+ int intVal = myEncode.GetChars(bytes, byteIndex, bytecount, chars, 0);
+ if (intVal != myStr.Length || chars.Length != myStr.Length)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Invoke the GetChars method 4");
+ try
+ {
+ string myStr = "za\u0306\u01fd\u03b2";
+ Encoding myEncode = Encoding.GetEncoding("utf-16");
+ byte[] bytes = myEncode.GetBytes(myStr);
+ int byteIndex = 0;
+ int bytecount = bytes.Length;
+ char[] chars = new char[myStr.Length + myStr.Length];
+ int intVal = myEncode.GetChars(bytes, byteIndex, bytecount, chars, myStr.Length - 1);
+ string subchars = null;
+ for (int i = 0; i < myStr.Length - 1; i++)
+ {
+ subchars += chars[i].ToString();
+ }
+ if (intVal != myStr.Length || subchars != "\0\0\0\0")
+ {
+ TestLibrary.TestFramework.LogError("007", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5:Invoke the GetChars method 5");
+ try
+ {
+ string myStr = "za\u0306\u01fd\u03b2";
+ Encoding myEncode = Encoding.GetEncoding("utf-16");
+ byte[] bytes = myEncode.GetBytes(myStr);
+ int byteIndex = 0;
+ int bytecount = bytes.Length - 2;
+ char[] chars = new char[myStr.Length -1];
+ int intVal = myEncode.GetChars(bytes, byteIndex, bytecount, chars, 0);
+ string strVal = new string(chars);
+ if (intVal != myStr.Length - 1 || strVal != "za\u0306\u01fd")
+ {
+ TestLibrary.TestFramework.LogError("009", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:the byte array is null");
+ try
+ {
+ byte[] bytes = null;
+ Encoding myEncode = Encoding.GetEncoding("utf-16");
+ int byteIndex = 0;
+ int bytecount = 0;
+ char[] chars = new char[0];
+ int intVal = myEncode.GetChars(bytes, byteIndex, bytecount, chars, 0);
+ TestLibrary.TestFramework.LogError("N001", "the byte array is null but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:the char array is null");
+ try
+ {
+ byte[] bytes = new byte[0];
+ Encoding myEncode = Encoding.GetEncoding("utf-16");
+ int byteIndex = 0;
+ int bytecount = 0;
+ char[] chars = null;
+ int intVal = myEncode.GetChars(bytes, byteIndex, bytecount, chars, 0);
+ TestLibrary.TestFramework.LogError("N003", "the char array is null but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3:the char array has no enough capacity to hold the chars");
+ try
+ {
+ string myStr = "helloworld";
+ Encoding myEncode = Encoding.GetEncoding("utf-16");
+ byte[] bytes = myEncode.GetBytes(myStr);
+ int byteIndex = 0;
+ int bytecount = bytes.Length;
+ char[] chars = new char[0];
+ int intVal = myEncode.GetChars(bytes, byteIndex, bytecount, chars, 0);
+ TestLibrary.TestFramework.LogError("N005", "the char array has no enough capacity to hold the chars but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4:the byteIndex is less than zero");
+ try
+ {
+ string myStr = "helloworld";
+ Encoding myEncode = Encoding.GetEncoding("utf-16");
+ byte[] bytes = myEncode.GetBytes(myStr);
+ int byteIndex = -1;
+ int bytecount = bytes.Length;
+ char[] chars = new char[myStr.Length];
+ int intVal = myEncode.GetChars(bytes, byteIndex, bytecount, chars, 0);
+ TestLibrary.TestFramework.LogError("N007", "the byteIndex is less than zero but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest5:the bytecount is less than zero");
+ try
+ {
+ string myStr = "helloworld";
+ Encoding myEncode = Encoding.GetEncoding("utf-16");
+ byte[] bytes = myEncode.GetBytes(myStr);
+ int byteIndex = 0;
+ int bytecount = -1;
+ char[] chars = new char[myStr.Length];
+ int intVal = myEncode.GetChars(bytes, byteIndex, bytecount, chars, 0);
+ TestLibrary.TestFramework.LogError("N009", "the byteIndex is less than zero but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest6:the charIndex is less than zero");
+ try
+ {
+ string myStr = "helloworld";
+ Encoding myEncode = Encoding.GetEncoding("utf-16");
+ byte[] bytes = myEncode.GetBytes(myStr);
+ int byteIndex = 0;
+ int bytecount = bytes.Length;
+ char[] chars = new char[myStr.Length];
+ int intVal = myEncode.GetChars(bytes, byteIndex, bytecount, chars, -1);
+ TestLibrary.TestFramework.LogError("N011", "the charIndex is less than zero but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N012", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest7:the charIndex is not valid index in chars array");
+ try
+ {
+ string myStr = "helloworld";
+ Encoding myEncode = Encoding.GetEncoding("utf-16");
+ byte[] bytes = myEncode.GetBytes(myStr);
+ int byteIndex = 0;
+ int bytecount = bytes.Length;
+ char[] chars = new char[myStr.Length];
+ int intVal = myEncode.GetChars(bytes, byteIndex, bytecount, chars, myStr.Length + 1);
+ TestLibrary.TestFramework.LogError("N013", "the charIndex is not valid index in chars array but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N014", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest8()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest8:the byteIndex and bytecount do not denote valid range of the bytes arry");
+ try
+ {
+ string myStr = "helloworld";
+ Encoding myEncode = Encoding.GetEncoding("utf-16");
+ byte[] bytes = myEncode.GetBytes(myStr);
+ int byteIndex = 0;
+ int bytecount = bytes.Length + 1;
+ char[] chars = new char[myStr.Length];
+ int intVal = myEncode.GetChars(bytes, byteIndex, bytecount, chars, myStr.Length + 1);
+ TestLibrary.TestFramework.LogError("N015", "the byteIndex and bytecount do not denote valid range of the bytes arry but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N016", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetdecoder.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetdecoder.cs
new file mode 100644
index 0000000000..59733f765c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetdecoder.cs
@@ -0,0 +1,126 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// Encoding.GetDecoder()
+/// </summary>
+public class EncodingGetDecoder
+{
+ public static int Main()
+ {
+ EncodingGetDecoder enGetDecoder = new EncodingGetDecoder();
+ TestLibrary.TestFramework.BeginTestCase("EncodingGetDecoder");
+ if (enGetDecoder.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ // retVal = PosTest2() && retVal;
+ //retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Get Decoder in the UTF8Encoding");
+ try
+ {
+ Encoding myEncode = Encoding.GetEncoding("utf-8");
+ Decoder decoderVal = myEncode.GetDecoder();
+ if (decoderVal.ToString() != "System.Text.UTF8Encoding+UTF8Decoder")
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Get Decoder in the UTF32Encoding");
+ try
+ {
+ Encoding myEncode = Encoding.GetEncoding("utf-32");
+ Decoder decoderVal = myEncode.GetDecoder();
+ if (decoderVal.ToString() != "System.Text.UTF32Encoding+UTF32Decoder")
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Get Decoder in the UTF7Encoding");
+ try
+ {
+ Encoding myEncode = Encoding.GetEncoding("utf-7");
+ Decoder decoderVal = myEncode.GetDecoder();
+ if (decoderVal.ToString() != "System.Text.UTF7Encoding+Decoder")
+ {
+ TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult. Actual: " + decoderVal.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Get Decoder in the Unicode");
+ try
+ {
+ Encoding myEncode = Encoding.Unicode;
+ Decoder decoderVal = myEncode.GetDecoder();
+ if (decoderVal.ToString() != "System.Text.UnicodeEncoding+Decoder")
+ {
+ TestLibrary.TestFramework.LogError("007", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetencoder.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetencoder.cs
new file mode 100644
index 0000000000..a1dbb7274f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetencoder.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// Encoding.GetEncoder()
+/// </summary>
+public class EncodingGetEncoder
+{
+ public static int Main()
+ {
+ EncodingGetEncoder enGetEncoder = new EncodingGetEncoder();
+ TestLibrary.TestFramework.BeginTestCase("EncodingGetEncoder");
+ if (enGetEncoder.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Get Encoder in the UTF8Encoding");
+ try
+ {
+ Encoding myEncode = Encoding.GetEncoding("utf-8");
+ Encoder encoderVal = myEncode.GetEncoder();
+ if (encoderVal.ToString() != "System.Text.UTF8Encoding+UTF8Encoder")
+ {
+ TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Get Encoder in the UTF32Encoding");
+ try
+ {
+ Encoding myEncode = Encoding.GetEncoding("utf-32");
+ Encoder encoderVal = myEncode.GetEncoder();
+ if (encoderVal.ToString() != "System.Text.EncoderNLS")
+ {
+ TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Get Decoder in the Unicode");
+ try
+ {
+ Encoding myEncode = Encoding.Unicode;
+ Encoder encoderVal = myEncode.GetEncoder();
+ if (encoderVal.ToString() != "System.Text.EncoderNLS")
+ {
+ TestLibrary.TestFramework.LogError("007", "the ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetencoding2.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetencoding2.cs
new file mode 100644
index 0000000000..9fea8b9db1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetencoding2.cs
@@ -0,0 +1,148 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+public class EncodingGetEncoding2
+{
+ public static int Main()
+ {
+ EncodingGetEncoding2 enGetEncoding2 = new EncodingGetEncoding2();
+ TestLibrary.TestFramework.BeginTestCase("EncodingGetEncoding2");
+ if (enGetEncoding2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+// retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+
+/* no UTF32 in CoreCLR
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Get Encoding with the defined name 1");
+ try
+ {
+ string name = "utf-32";
+ Encoding myEncoding = Encoding.GetEncoding(name);
+ if (myEncoding.BodyName != name)
+ {
+ TestLibrary.TestFramework.LogError("001","The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+*/
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Get Encoding with the defined name 2");
+ try
+ {
+ string name = "utf-8";
+ Encoding myEncoding = Encoding.GetEncoding(name);
+ if (myEncoding.ToString() != Encoding.UTF8.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Get Encoding with the defined name 4");
+ try
+ {
+ string name = "Unicode";
+ Encoding myEncoding = Encoding.GetEncoding(name);
+ if (myEncoding.ToString() != Encoding.Unicode.ToString())
+ {
+ TestLibrary.TestFramework.LogError("007", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the name is not valid codepage name");
+ try
+ {
+ string name = null;
+ Encoding myEncoding = Encoding.GetEncoding(name);
+ TestLibrary.TestFramework.LogError("N001", "the name is not valid codepage name but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The platform do not support the named codepage");
+ try
+ {
+ string name = "helloworld";
+ Encoding myEncoding = Encoding.GetEncoding(name);
+ TestLibrary.TestFramework.LogError("N003", "the name is not valid codepage name but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetmaxbytecount.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetmaxbytecount.cs
new file mode 100644
index 0000000000..1de96db6c6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetmaxbytecount.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetmaxcharcount.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetmaxcharcount.cs
new file mode 100644
index 0000000000..b595df018c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetmaxcharcount.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetpreamble.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetpreamble.cs
new file mode 100644
index 0000000000..ea9fe44e29
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetpreamble.cs
@@ -0,0 +1,106 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// GetPreamble
+/// </summary>
+
+public class EncodingGetPreamble
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method GetPreamble .");
+
+ try
+ {
+ Encoding unicode = Encoding.Unicode;
+
+ byte[] preamble = unicode.GetPreamble();
+
+ if (preamble[0] != 0xFF || preamble[1] != 0xFE)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method GetPreamble Err.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EncodingGetPreamble test = new EncodingGetPreamble();
+
+ TestLibrary.TestFramework.BeginTestCase("EncodingGetPreamble");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetstring.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetstring.cs
new file mode 100644
index 0000000000..44289f7b0d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodinggetstring.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodingunicode.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodingunicode.cs
new file mode 100644
index 0000000000..243c89b941
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodingunicode.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// Unicode
+/// </summary>
+
+public class EncodingUnicode
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property Unicode .");
+
+ try
+ {
+ Encoding encoding = Encoding.Unicode;
+
+ if (encoding == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property Unicode Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EncodingUnicode test = new EncodingUnicode();
+
+ TestLibrary.TestFramework.BeginTestCase("EncodingUnicode");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodingutf8.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodingutf8.cs
new file mode 100644
index 0000000000..a02634f1a5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodingutf8.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// UTF8
+/// </summary>
+
+public class EncodingUTF8
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property UTF8 .");
+
+ try
+ {
+ Encoding encoding = Encoding.UTF8;
+
+ if (encoding == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property UTF8 Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EncodingUTF8 test = new EncodingUTF8();
+
+ TestLibrary.TestFramework.BeginTestCase("EncodingUTF8");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/encoding/encodingwebname.cs b/tests/src/CoreMangLib/cti/system/text/encoding/encodingwebname.cs
new file mode 100644
index 0000000000..75ba075a90
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/encoding/encodingwebname.cs
@@ -0,0 +1,177 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// WebName
+/// </summary>
+
+public class EncodingWebName
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property WebName.");
+ try
+ {
+ // UTF8
+ if (!Encoding.UTF8.WebName.Equals("utf-8"))
+ {
+ TestLibrary.TestFramework.LogError("001", "UTF8 should have Webname utf-8; actual value: " +
+ Encoding.UTF8.WebName);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ try
+ {
+ // Unicode
+ if (!Encoding.Unicode.WebName.Equals("utf-16"))
+ {
+ TestLibrary.TestFramework.LogError("003", "Unicode should have Webname utf-16; actual value: " +
+ Encoding.Unicode.WebName);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Round-trip WebNames.");
+ try
+ {
+ // UTF8
+ if (!Encoding.GetEncoding(Encoding.UTF8.WebName).Equals(Encoding.UTF8))
+ {
+ TestLibrary.TestFramework.LogError("005", "GetEncoding(UTF8.WebName) should return UTF8");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ try
+ {
+ // Unicode
+ if (!Encoding.GetEncoding(Encoding.Unicode.WebName).Equals(Encoding.Unicode))
+ {
+ TestLibrary.TestFramework.LogError("007", "GetEncoding(UTF8.WebName) should return UTF8");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ try
+ {
+ // BigEndianUnicode
+ if (!Encoding.GetEncoding(Encoding.BigEndianUnicode.WebName).Equals(Encoding.BigEndianUnicode))
+ {
+ TestLibrary.TestFramework.LogError("009", "GetEncoding(BigEndianUnicode.WebName) should return BigEndianUnicode");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Negative Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ EncodingWebName test = new EncodingWebName();
+
+ TestLibrary.TestFramework.BeginTestCase("EncodingWebName");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend.csproj
new file mode 100644
index 0000000000..bdfb1a8d9b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderappend.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend1.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend1.csproj
new file mode 100644
index 0000000000..91457986bb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderappend1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend10.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend10.csproj
new file mode 100644
index 0000000000..5e6b55cdea
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend10.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderappend10.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend11.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend11.csproj
new file mode 100644
index 0000000000..c7c43637e8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend11.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderappend11.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend12.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend12.csproj
new file mode 100644
index 0000000000..7453acda9d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend12.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderappend12.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend13.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend13.csproj
new file mode 100644
index 0000000000..8758d6ea08
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend13.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderappend13.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend14.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend14.csproj
new file mode 100644
index 0000000000..5628211ab9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend14.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderappend14.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend15.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend15.csproj
new file mode 100644
index 0000000000..e444003508
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend15.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderappend15.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend16.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend16.csproj
new file mode 100644
index 0000000000..19a87a0117
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderappend16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend17.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend17.csproj
new file mode 100644
index 0000000000..2ed589eb22
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend17.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderappend17.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend18.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend18.csproj
new file mode 100644
index 0000000000..7547a64504
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend18.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderappend18.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend19.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend19.csproj
new file mode 100644
index 0000000000..ad96b18e1f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend19.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderappend19.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend2.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend2.csproj
new file mode 100644
index 0000000000..d780323ca5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderappend2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend3.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend3.csproj
new file mode 100644
index 0000000000..d5e6f40278
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderappend3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend4.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend4.csproj
new file mode 100644
index 0000000000..b20656e660
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderappend4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend5.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend5.csproj
new file mode 100644
index 0000000000..b4f8d1170e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderappend5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend6.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend6.csproj
new file mode 100644
index 0000000000..c9dcb6d658
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderappend6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend7.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend7.csproj
new file mode 100644
index 0000000000..a083eb398f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend7.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderappend7.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend8.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend8.csproj
new file mode 100644
index 0000000000..dc0aa3f26b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend8.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderappend8.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend9.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend9.csproj
new file mode 100644
index 0000000000..4fe4d7a09d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderAppend9.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderappend9.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderCapacity.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderCapacity.csproj
new file mode 100644
index 0000000000..c85de5bc82
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderCapacity.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuildercapacity.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderCapacity_cti.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderCapacity_cti.csproj
new file mode 100644
index 0000000000..e448ea2b2e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderCapacity_cti.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuildercapacity_cti.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderChars.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderChars.csproj
new file mode 100644
index 0000000000..949ce37a8c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderChars.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderchars.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderInsert.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderInsert.csproj
new file mode 100644
index 0000000000..efc2275202
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderInsert.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderinsert.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderInsert3.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderInsert3.csproj
new file mode 100644
index 0000000000..217151cd45
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderInsert3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderinsert3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderInsert4.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderInsert4.csproj
new file mode 100644
index 0000000000..59d56962de
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderInsert4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderinsert4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderLength.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderLength.csproj
new file mode 100644
index 0000000000..63b8bd744a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderLength.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderlength.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderLength_cti.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderLength_cti.csproj
new file mode 100644
index 0000000000..64dc05c881
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderLength_cti.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderlength_cti.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderRemove.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderRemove.csproj
new file mode 100644
index 0000000000..3d39d76bdf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderRemove.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderremove.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderReplace1.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderReplace1.csproj
new file mode 100644
index 0000000000..d0263b9e52
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderReplace1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderreplace1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderReplace2.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderReplace2.csproj
new file mode 100644
index 0000000000..10dcca41f9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderReplace2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderreplace2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderReplace3.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderReplace3.csproj
new file mode 100644
index 0000000000..629c8c8b66
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderReplace3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderreplace3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderReplace4.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderReplace4.csproj
new file mode 100644
index 0000000000..d79d3edb35
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderReplace4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderreplace4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderToString1.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderToString1.csproj
new file mode 100644
index 0000000000..5d67a4a350
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderToString1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuildertostring1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderToString2.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderToString2.csproj
new file mode 100644
index 0000000000..a993b1eed0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderToString2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuildertostring2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor1.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor1.csproj
new file mode 100644
index 0000000000..5789a87498
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor2.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor2.csproj
new file mode 100644
index 0000000000..740395e243
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor3.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor3.csproj
new file mode 100644
index 0000000000..f204e3e876
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor4.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor4.csproj
new file mode 100644
index 0000000000..c95a927390
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderctor4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor5.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor5.csproj
new file mode 100644
index 0000000000..9219b1cd54
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderctor5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor6.csproj b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor6.csproj
new file mode 100644
index 0000000000..97eccf6261
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/StringBuilderctor6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="stringbuilderctor6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend.cs
new file mode 100644
index 0000000000..ae5226d4e2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend.cs
@@ -0,0 +1,335 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+using TestLibrary;
+using System.Globalization;
+
+class StringBuilderAppend
+{
+ static int Main()
+ {
+ StringBuilderAppend test = new StringBuilderAppend();
+
+ TestFramework.BeginTestCase("StringBuilder.Append");
+
+ if (test.RunTests())
+ {
+ TestFramework.EndTestCase();
+ TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestFramework.EndTestCase();
+ TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool ret = true;
+
+ // Positive Tests
+ ret &= Test001();
+ ret &= Test002();
+ ret &= Test003();
+ ret &= Test004();
+ ret &= Test005();
+ ret &= Test019();
+ ret &= Test021();
+ ret &= Test022();
+ ret &= Test023();
+
+ ret &= Test010();
+ ret &= Test011();
+ ret &= Test012();
+ ret &= Test013();
+ ret &= Test014();
+ ret &= Test020();
+ ret &= Test024();
+
+ ret &= Test025();
+ ret &= Test026();
+ ret &= Test027();
+ ret &= Test028();
+ ret &= Test029();
+ ret &= Test030();
+ ret &= Test031();
+ ret &= Test032();
+ ret &= Test033();
+ ret &= Test034();
+ ret &= Test035();
+ ret &= Test036();
+ ret &= Test037();
+ ret &= Test038();
+
+ ret &= Test039();
+ ret &= Test040();
+ ret &= Test041();
+ ret &= Test042();
+
+ // Negative Tests
+ ret &= Test006();
+ ret &= Test007();
+ ret &= Test008();
+ ret &= Test009();
+
+ ret &= Test015();
+ ret &= Test016();
+ ret &= Test017();
+ ret &= Test018();
+
+ return ret;
+ }
+
+ public bool Test001() { return PositiveTest("Testing", 1, 6, "esting", "00A");}
+ public bool Test002() { return PositiveTest(new string('a', 5000), 0, 5000, new string('a',5000), "00B");}
+ public bool Test003() { return PositiveTest("Testing", 1, 0, string.Empty, "00C");}
+ public bool Test004() { return PositiveTest(null, 0, 0, string.Empty, "00D");}
+ public bool Test005() { return PositiveTest(string.Empty, 0, 0, string.Empty, "00E");}
+
+ public bool Test019() { return NegativeTest("Testing", -5, 0, typeof(ArgumentOutOfRangeException), "00J"); }
+ public bool Test006() { return NegativeTest(null, 0, 1, typeof(ArgumentNullException), "00F"); }
+ public bool Test007() { return NegativeTest("a", -1, 1, typeof(ArgumentOutOfRangeException), "00G"); }
+ public bool Test008() { return NegativeTest("a", 0, -1, typeof(ArgumentOutOfRangeException), "00H"); }
+ public bool Test009() { return NegativeTest("a", 0, 3, typeof(ArgumentOutOfRangeException), "00I"); }
+
+ public bool Test010() { return PositiveTest2(new char[] {'T', 'e', 's', 't', 'i', 'n', 'g'}, 1, 6, "esting", "00A1"); }
+ public bool Test011() { char[] chars = new char[5000]; for (int i = 0; i < 5000; i++) chars[i] = 'a';
+ return PositiveTest2(chars, 0, 5000, new string('a', 5000), "00B1"); }
+ public bool Test012() { return PositiveTest2(new char[] {'T', 'e', 's', 't', 'i', 'n', 'g'}, 1, 0, string.Empty, "00C1"); }
+ public bool Test013() { return PositiveTest2(null, 0, 0, string.Empty, "00D1"); }
+ public bool Test014() { return PositiveTest2(new char[] { }, 0, 0, string.Empty, "00E1"); }
+
+ public bool Test020() { return NegativeTest2(new char[] { 'T', 'e', 's', 't', 'i', 'n', 'g' }, -5, 0, typeof(ArgumentOutOfRangeException), "00J1"); }
+ public bool Test015() { return NegativeTest2(null, 0, 1, typeof(ArgumentNullException), "00F1"); }
+ public bool Test016() { return NegativeTest2(new char[] { 'T', 'e', 's', 't', 'i', 'n', 'g' }, - 1, 1, typeof(ArgumentOutOfRangeException), "00G1"); }
+ public bool Test017() { return NegativeTest2(new char[] { 'T', 'e', 's', 't', 'i', 'n', 'g' }, 0, -1, typeof(ArgumentOutOfRangeException), "00H1"); }
+ public bool Test018() { return NegativeTest2(new char[] { 'T' }, 0, 3, typeof(ArgumentOutOfRangeException), "00I1"); }
+
+ public bool Test021() { return PositiveTest3('T', 6, "TTTTTT", "00A2"); }
+ public bool Test022() { return PositiveTest3('a', 5000, new string('a', 5000), "00B2"); }
+ public bool Test023() { return PositiveTest3('a', 0, string.Empty, "00C2"); }
+
+ public bool Test024() { return NegativeTest3('a', -1, typeof(ArgumentOutOfRangeException), "00G2"); }
+
+ public bool Test025() { return PositiveTest4<byte>(1, "00K"); }
+ public bool Test026() { return PositiveTest4<sbyte>(-1, "00L"); }
+ public bool Test027() { return PositiveTest4<bool>(true, "00M"); }
+ public bool Test028() { return PositiveTest4<char>('t', "00N"); }
+ public bool Test029() { return PositiveTest4<short>(short.MaxValue, "00O"); }
+ public bool Test030() { return PositiveTest4<int>(int.MaxValue, "00P"); }
+ public bool Test031() { return PositiveTest4<long>(long.MaxValue, "00Q"); }
+ public bool Test032() { return PositiveTest4<float>(3.14f, "00R"); }
+ public bool Test033() { return PositiveTest4<double>(3.1415927, "00S"); }
+ public bool Test034() { return PositiveTest4<ushort>(17, "00T"); }
+ public bool Test035() { return PositiveTest4<uint>(uint.MaxValue, "00U"); }
+ public bool Test036() { return PositiveTest4<ulong>(ulong.MaxValue, "00V"); }
+ public bool Test037() { return PositiveTest4<object>(null, "00W"); }
+ public bool Test038() { return PositiveTest4<object>(new StringBuilder("Testing"), "00X"); }
+
+ public bool Test039() { return PositiveTest5(new char[] { 'T', 'e', 's', 't' }, "Test", "00Y"); }
+ public bool Test040() { char[] chars = new char[5000];
+ for (int i = 0; i < 5000; i++) chars[i] = 'a';
+ return PositiveTest5(chars, new string('a', 5000), "00Z"); }
+ public bool Test041() { return PositiveTest5(new char[] { }, String.Empty, "0AA"); }
+ public bool Test042() { return PositiveTest5(null, String.Empty, "0AB"); }
+
+
+ public bool PositiveTest(string str, int index, int count, string expected, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Append");
+ try
+ {
+ StringBuilder sb = new StringBuilder("Test");
+ sb.Append(str, index, count);
+ string output = sb.ToString();
+ expected = "Test" + expected;
+ if (output != expected)
+ {
+ result = false;
+ TestFramework.LogError("001", "Error in " + id + ", unexpected append result. Actual string " + output + ", Expected: " + expected);
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("002", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ return result;
+ }
+
+ public bool PositiveTest2(char[] str, int index, int count, string expected, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Append");
+ try
+ {
+ StringBuilder sb = new StringBuilder("Test");
+ sb.Append(str, index, count);
+ string output = sb.ToString();
+ expected = "Test" + expected;
+ if (output != expected)
+ {
+ result = false;
+ TestFramework.LogError("001a", "Error in " + id + ", unexpected append result. Actual string " + output + ", Expected: " + expected);
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("002a", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ return result;
+ }
+
+ public bool PositiveTest3(char str, int count, string expected, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Append");
+ try
+ {
+ StringBuilder sb = new StringBuilder("Test");
+ sb.Append(str, count);
+ string output = sb.ToString();
+ expected = "Test" + expected;
+ if (output != expected)
+ {
+ result = false;
+ TestFramework.LogError("001b", "Error in " + id + ", unexpected append result. Actual string " + output + ", Expected: " + expected);
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("002b", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ return result;
+ }
+
+ public bool PositiveTest4<T>(T str, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Append");
+ try
+ {
+ StringBuilder sb = new StringBuilder("Test");
+ sb.Append(str);
+ string output = sb.ToString();
+ string expected = ((str == null)?"Test":"Test" + str.ToString());
+ if (output != expected)
+ {
+ result = false;
+ TestFramework.LogError("001c", "Error in " + id + ", unexpected append result. Actual string " + output + ", Expected: " + expected);
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("002c", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ return result;
+ }
+
+ public bool PositiveTest5(char[] str, string expected, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Append");
+ try
+ {
+ StringBuilder sb = new StringBuilder("Test");
+ sb.Append(str);
+ string output = sb.ToString();
+ expected = "Test" + expected;
+ if (output != expected)
+ {
+ result = false;
+ TestFramework.LogError("001d", "Error in " + id + ", unexpected append result. Actual string " + output + ", Expected: " + expected);
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("002d", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ return result;
+ }
+
+ public bool NegativeTest(string str, int index, int count, Type expected, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Append");
+ try
+ {
+ StringBuilder sb = new StringBuilder("Test");
+
+ sb.Append(str, index, count);
+ string output = sb.ToString();
+ result = false;
+ TestFramework.LogError("003", "Error in " + id + ", Expected exception not thrown. No exception. Actual string " + output + ", Expected: " + expected.ToString());
+ }
+ catch (Exception exc)
+ {
+ if (exc.GetType() != expected)
+ {
+ result = false;
+ TestFramework.LogError("004", "Unexpected exception in " + id + ", expected type: " + expected.ToString() + ", Actual excpetion: " + exc.ToString());
+ }
+ }
+ return result;
+ }
+
+ public bool NegativeTest2(char[] str, int index, int count, Type expected, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Append");
+ try
+ {
+ StringBuilder sb = new StringBuilder("Test");
+
+ sb.Append(str, index, count);
+ string output = sb.ToString();
+ result = false;
+ TestFramework.LogError("003b", "Error in " + id + ", Expected exception not thrown. No exception. Actual string " + output + ", Expected: " + expected.ToString());
+ }
+ catch (Exception exc)
+ {
+ if (exc.GetType() != expected)
+ {
+ result = false;
+ TestFramework.LogError("004b", "Unexpected exception in " + id + ", expected type: " + expected.ToString() + ", Actual excpetion: " + exc.ToString());
+ }
+ }
+ return result;
+ }
+
+
+ public bool NegativeTest3(char str, int count, Type expected, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Append");
+ try
+ {
+ StringBuilder sb = new StringBuilder("Test");
+
+ sb.Append(str, count);
+ string output = sb.ToString();
+ result = false;
+ TestFramework.LogError("003c", "Error in " + id + ", Expected exception not thrown. No exception. Actual string " + output + ", Expected: " + expected.ToString());
+ }
+ catch (Exception exc)
+ {
+ if (exc.GetType() != expected)
+ {
+ result = false;
+ TestFramework.LogError("004c", "Unexpected exception in " + id + ", expected type: " + expected.ToString() + ", Actual excpetion: " + exc.ToString());
+ }
+ }
+ return result;
+ }
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend1.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend1.cs
new file mode 100644
index 0000000000..ac062445d8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend1.cs
@@ -0,0 +1,107 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.Append(Boolean)
+/// </summary>
+public class StringBuilderAppend1
+{
+ public static int Main()
+ {
+ StringBuilderAppend1 sbAppend1 = new StringBuilderAppend1();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderAppend1");
+ if (sbAppend1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke Append method in the initial StringBuilder 1");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ bool bValue = true;
+ sb = sb.Append(bValue);
+ if (sb.ToString() != "True")
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke Append method in the initial StringBuilder 2");
+ try
+ {
+ string strSource = "formytest";
+ StringBuilder sb = new StringBuilder(strSource);
+ bool bValue = true;
+ sb = sb.Append(bValue);
+ if (sb.ToString() != strSource + "True")
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke Append method in the initial StringBuilder 3");
+ try
+ {
+ string strSource = null;
+ StringBuilder sb = new StringBuilder(strSource);
+ bool bValue = true;
+ sb = sb.Append(bValue);
+ if (sb.ToString() != "True")
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend10.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend10.cs
new file mode 100644
index 0000000000..0cff98153e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend10.cs
@@ -0,0 +1,129 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.Append(UInt16)
+/// </summary>
+public class StringBuilderAppend10
+{
+ public static int Main()
+ {
+ StringBuilderAppend10 sbAppend10 = new StringBuilderAppend10();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderAppend10");
+ if (sbAppend10.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke Append method in the initial StringBuilder 1");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ UInt16 uint16Val = (UInt16)this.GetInt32(0, (int)(UInt16.MaxValue + 1));
+ sb = sb.Append(uint16Val);
+ if (sb.ToString() != uint16Val.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke Append method in the initial StringBuilder 2");
+ try
+ {
+ string strSource = "formytest";
+ StringBuilder sb = new StringBuilder(strSource);
+ UInt16 uint16Val = (UInt16)this.GetInt32(0, (int)(UInt16.MaxValue + 1));
+ sb = sb.Append(uint16Val);
+ if (sb.ToString() != strSource + uint16Val.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke Append method in the initial StringBuilder 3");
+ try
+ {
+ string strSource = null;
+ StringBuilder sb = new StringBuilder(strSource);
+ UInt16 uint16Val = (UInt16)this.GetInt32(0, (int)(UInt16.MaxValue + 1));
+ sb = sb.Append(uint16Val);
+ if (sb.ToString() != uint16Val.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend11.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend11.cs
new file mode 100644
index 0000000000..e3ff43f29b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend11.cs
@@ -0,0 +1,129 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.Append(UInt32)
+/// </summary>
+public class StringBuilderAppend11
+{
+ public static int Main()
+ {
+ StringBuilderAppend11 sbAppend11 = new StringBuilderAppend11();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderAppend11");
+ if (sbAppend11.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke Append method in the initial StringBuilder 1");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ UInt32 uint32Val = (UInt32)(TestLibrary.Generator.GetInt32(-55)) + (UInt32)(TestLibrary.Generator.GetInt32(-55));
+ sb = sb.Append(uint32Val);
+ if (sb.ToString() != uint32Val.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke Append method in the initial StringBuilder 2");
+ try
+ {
+ string strSource = "formytest";
+ StringBuilder sb = new StringBuilder(strSource);
+ UInt32 uint32Val = (UInt32)(TestLibrary.Generator.GetInt32(-55)) + (UInt32)(TestLibrary.Generator.GetInt32(-55));
+ sb = sb.Append(uint32Val);
+ if (sb.ToString() != strSource + uint32Val.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke Append method in the initial StringBuilder 3");
+ try
+ {
+ string strSource = null;
+ StringBuilder sb = new StringBuilder(strSource);
+ UInt32 uint32Val = (UInt32)(TestLibrary.Generator.GetInt32(-55)) + (UInt32)(TestLibrary.Generator.GetInt32(-55));
+ sb = sb.Append(uint32Val);
+ if (sb.ToString() != uint32Val.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend12.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend12.cs
new file mode 100644
index 0000000000..eb097b229b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend12.cs
@@ -0,0 +1,107 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.Append(UInt64)
+/// </summary>
+public class StringBuilderAppend12
+{
+ public static int Main()
+ {
+ StringBuilderAppend12 sbAppend12 = new StringBuilderAppend12();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderAppend12");
+ if (sbAppend12.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke Append method in the initial StringBuilder 1");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ UInt64 uint64Val = (UInt64)(TestLibrary.Generator.GetInt64(-55)) + (UInt64)(TestLibrary.Generator.GetInt64(-55));
+ sb = sb.Append(uint64Val);
+ if (sb.ToString() != uint64Val.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke Append method in the initial StringBuilder 2");
+ try
+ {
+ string strSource = "formytest";
+ StringBuilder sb = new StringBuilder(strSource);
+ UInt64 uint64Val = (UInt64)(TestLibrary.Generator.GetInt64(-55)) + (UInt64)(TestLibrary.Generator.GetInt64(-55));
+ sb = sb.Append(uint64Val);
+ if (sb.ToString() != strSource + uint64Val.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke Append method in the initial StringBuilder 3");
+ try
+ {
+ string strSource = null;
+ StringBuilder sb = new StringBuilder(strSource);
+ UInt64 uint64Val = (UInt64)(TestLibrary.Generator.GetInt64(-55)) + (UInt64)(TestLibrary.Generator.GetInt64(-55));
+ sb = sb.Append(uint64Val);
+ if (sb.ToString() != uint64Val.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend13.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend13.cs
new file mode 100644
index 0000000000..a838b9e203
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend13.cs
@@ -0,0 +1,155 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.Append(Object)
+/// </summary>
+public class StringBuilderAppend13
+{
+ public static int Main()
+ {
+ StringBuilderAppend13 sbAppend13 = new StringBuilderAppend13();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderAppend13");
+ if (sbAppend13.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke Append method in the initial StringBuilder 1");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ object objVal = new object();
+ sb = sb.Append(objVal);
+ if (sb.ToString() != objVal.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke Append method in the initial StringBuilder 2");
+ try
+ {
+ string strSource = "formytest";
+ StringBuilder sb = new StringBuilder(strSource);
+ object objVal = new object();
+ sb = sb.Append(objVal);
+ if (sb.ToString() != strSource + objVal.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke Append method in the initial StringBuilder 3");
+ try
+ {
+ string strSource = null;
+ StringBuilder sb = new StringBuilder(strSource);
+ object objVal = null;
+ sb = sb.Append(objVal);
+ if (sb.ToString() != string.Empty)
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Invoke Append method in the initial StringBuilder 4");
+ try
+ {
+ string strSource = "formytest";
+ StringBuilder sb = new StringBuilder(strSource);
+ object objVal = "HelloWorld";
+ sb = sb.Append(objVal);
+ if (sb.ToString() != strSource + objVal.ToString())
+ {
+ TestLibrary.TestFramework.LogError("007", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5:Invoke Append method in the initial StringBuilder 5");
+ try
+ {
+ string strSource = "Itisthetime";
+ StringBuilder sb = new StringBuilder(strSource);
+ object objVal = DateTime.Now;
+ sb = sb.Append(objVal);
+ if (sb.ToString() != strSource + objVal.ToString())
+ {
+ TestLibrary.TestFramework.LogError("009", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend14.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend14.cs
new file mode 100644
index 0000000000..de7904fd72
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend14.cs
@@ -0,0 +1,135 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.Append(SByte)
+/// </summary>
+public class StringBuilderAppend14
+{
+ public static int Main()
+ {
+ StringBuilderAppend14 sbAppend14 = new StringBuilderAppend14();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderAppend14");
+ if (sbAppend14.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke Append method in the initial StringBuilder 1");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ sbyte sbVal1 = (sbyte)this.GetInt32(0, 128);
+ sbyte sbVal2 = (sbyte)(this.GetInt32(1, 129) * (-1));
+ sb = sb.Append(sbVal1);
+ sb = sb.Append(sbVal2);
+ if (sb.ToString() != sbVal1.ToString() + sbVal2.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke Append method in the initial StringBuilder 2");
+ try
+ {
+ string strSource = "formytest";
+ StringBuilder sb = new StringBuilder(strSource);
+ sbyte sbVal1 = (sbyte)this.GetInt32(0, 128);
+ sbyte sbVal2 = (sbyte)(this.GetInt32(1, 129) * (-1));
+ sb = sb.Append(sbVal1);
+ sb = sb.Append(sbVal2);
+ if (sb.ToString() != strSource + sbVal1.ToString() + sbVal2.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke Append method in the initial StringBuilder 3");
+ try
+ {
+ string strSource = null;
+ StringBuilder sb = new StringBuilder(strSource);
+ sbyte sbVal1 = (sbyte)this.GetInt32(0, 128);
+ sbyte sbVal2 = (sbyte)(this.GetInt32(1, 129) * (-1));
+ sb = sb.Append(sbVal1);
+ sb = sb.Append(sbVal2);
+ if (sb.ToString() != sbVal1.ToString() + sbVal2.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend15.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend15.cs
new file mode 100644
index 0000000000..17488995b0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend15.cs
@@ -0,0 +1,108 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.Append(Single)
+/// </summary>
+public class StringBuilderAppend15
+{
+ public static int Main()
+ {
+ StringBuilderAppend15 sbAppend15 = new StringBuilderAppend15();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderAppend15");
+ if (sbAppend15.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke Append method in the initial StringBuilder 1");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ Single singleVal = TestLibrary.Generator.GetSingle(-55);
+ sb = sb.Append(singleVal);
+ if (sb.ToString() != singleVal.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke Append method in the initial StringBuilder 2");
+ try
+ {
+ string strSource = "formytest";
+ StringBuilder sb = new StringBuilder(strSource);
+ Single singleVal = TestLibrary.Generator.GetSingle(-55);
+ sb = sb.Append(singleVal);
+ if (sb.ToString() != strSource + singleVal.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke Append method in the initial StringBuilder 3");
+ try
+ {
+ string strSource = null;
+ StringBuilder sb = new StringBuilder(strSource);
+ Single singleVal = TestLibrary.Generator.GetSingle(-55);
+ sb = sb.Append(singleVal);
+ if (sb.ToString() != singleVal.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend16.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend16.cs
new file mode 100644
index 0000000000..d62d79db32
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend16.cs
@@ -0,0 +1,157 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.Append(String)
+/// </summary>
+public class StringBuilderAppend16
+{
+ private const int c_MIN_STR_LENGTH = 8;
+ private const int c_MAX_STR_LENGTH = 256;
+ public static int Main()
+ {
+ StringBuilderAppend16 sbAppend16 = new StringBuilderAppend16();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderAppend16");
+ if (sbAppend16.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke Append method in the initial StringBuilder 1");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ string strVal = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LENGTH, c_MAX_STR_LENGTH);
+ sb = sb.Append(strVal);
+ if (sb.ToString() != strVal.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke Append method in the initial StringBuilder 2");
+ try
+ {
+ string strSource = "formytest";
+ StringBuilder sb = new StringBuilder(strSource);
+ string strVal = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LENGTH, c_MAX_STR_LENGTH);
+ sb = sb.Append(strVal);
+ if (sb.ToString() != strSource + strVal.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke Append method in the initial StringBuilder 3");
+ try
+ {
+ string strSource = null;
+ StringBuilder sb = new StringBuilder(strSource);
+ string strVal = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LENGTH, c_MAX_STR_LENGTH);
+ sb = sb.Append(strVal);
+ if (sb.ToString() != strVal.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Invoke Append method in the initial StringBuilder 4");
+ try
+ {
+ string strSource = null;
+ StringBuilder sb = new StringBuilder(strSource);
+ string strVal = null;
+ sb = sb.Append(strVal);
+ if (sb.ToString() != string.Empty)
+ {
+ TestLibrary.TestFramework.LogError("007", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5:Invoke Append method in the initial StringBuilder 5");
+ try
+ {
+ string strSource = "formytest";
+ StringBuilder sb = new StringBuilder(strSource);
+ string strVal = null;
+ sb = sb.Append(strVal);
+ if (sb.ToString() != strSource)
+ {
+ TestLibrary.TestFramework.LogError("009", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend17.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend17.cs
new file mode 100644
index 0000000000..36a37a816e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend17.cs
@@ -0,0 +1,183 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.Append(Char,Int32)
+/// </summary>
+public class StringBuilderAppend17
+{
+ public static int Main()
+ {
+ StringBuilderAppend17 sbAppend17 = new StringBuilderAppend17();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderAppend17");
+ if (sbAppend17.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke Append method in the initial StringBuilder 1");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ char charValue = TestLibrary.Generator.GetChar(-55);
+ int repeatCount = 0;
+ sb = sb.Append(charValue, repeatCount);
+ if (sb.ToString() != string.Empty)
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke Append method in the initial StringBuilder 2");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ char charValue = TestLibrary.Generator.GetChar(-55);
+ int repeatCount = 1;
+ sb = sb.Append(charValue, repeatCount);
+ if (sb.ToString() != charValue.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke Append method in the initial StringBuilder 3");
+ try
+ {
+ string strSource = "formytest";
+ StringBuilder sb = new StringBuilder(strSource);
+ char charValue = TestLibrary.Generator.GetChar(-55);
+ int repeatCout = this.GetInt32(1, 100);
+ sb = sb.Append(charValue, repeatCout);
+ string strVal = new string(charValue, repeatCout);
+ if (sb.ToString() != strSource + strVal)
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Invoke Append method in the initial StringBuilder 4");
+ try
+ {
+ string strSource = null;
+ StringBuilder sb = new StringBuilder(strSource);
+ char charValue = TestLibrary.Generator.GetChar(-55);
+ int repeatCount = this.GetInt32(1, 100);
+ sb = sb.Append(charValue, repeatCount);
+ string strVal = new string(charValue, repeatCount);
+ if (sb.ToString() != strVal)
+ {
+ TestLibrary.TestFramework.LogError("007", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The param of repeatCount is less than zero");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ char charValue = TestLibrary.Generator.GetChar(-55);
+ int repeatCount = this.GetInt32(1, 100) * (-1);
+ sb = sb.Append(charValue, repeatCount);
+ TestLibrary.TestFramework.LogError("N001", "The param of repeatCount is less than zero but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend18.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend18.cs
new file mode 100644
index 0000000000..d913f1276a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend18.cs
@@ -0,0 +1,270 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.Append(char[],Int32,Int32)
+/// </summary>
+public class StringBuilderAppend18
+{
+ public static int Main()
+ {
+ StringBuilderAppend18 sbAppend18 = new StringBuilderAppend18();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderAppend18");
+ if (sbAppend18.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke Append method in the initial StringBuilder 1");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ char charVal1 = TestLibrary.Generator.GetChar(-55);
+ char charVal2 = TestLibrary.Generator.GetChar(-55);
+ char charVal3 = TestLibrary.Generator.GetChar(-55);
+ char[] charVals = new char[] { charVal1, charVal2, charVal3 };
+ int startIndex = 0;
+ int charCount = 0;
+ sb = sb.Append(charVals, startIndex,charCount);
+ if (sb.ToString() != string.Empty)
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke Append method in the initial StringBuilder 2");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ char charVal1 = TestLibrary.Generator.GetChar(-55);
+ char charVal2 = TestLibrary.Generator.GetChar(-55);
+ char charVal3 = TestLibrary.Generator.GetChar(-55);
+ char[] charVals = new char[] { charVal1, charVal2, charVal3 };
+ string strVal = new string(charVals);
+ int startIndex = 0;
+ int charCount = 3;
+ sb = sb.Append(charVals, startIndex, charCount);
+ if (sb.ToString() != strVal)
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke Append method in the initial StringBuilder 3");
+ try
+ {
+ string strSource = "formytest";
+ StringBuilder sb = new StringBuilder(strSource);
+ char charVal1 = TestLibrary.Generator.GetChar(-55);
+ char charVal2 = TestLibrary.Generator.GetChar(-55);
+ char charVal3 = TestLibrary.Generator.GetChar(-55);
+ char[] charVals = new char[] { charVal1, charVal2, charVal3 };
+ string strVal = new string(charVals);
+ int startIndex = 0;
+ int charCount = 3;
+ sb = sb.Append(charVals, startIndex, charCount);
+ if (sb.ToString() != strSource + strVal)
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Invoke Append method in the initial StringBuilder 4");
+ try
+ {
+ string strSource = null;
+ StringBuilder sb = new StringBuilder(strSource);
+ char charVal1 = TestLibrary.Generator.GetChar(-55);
+ char charVal2 = TestLibrary.Generator.GetChar(-55);
+ char charVal3 = TestLibrary.Generator.GetChar(-55);
+ char[] charVals = new char[] { charVal1, charVal2, charVal3 };
+ int startIndex = 1;
+ int charCount = 2;
+ sb = sb.Append(charVals, startIndex, charCount);
+ string strVal = new string(new char[] { charVal2, charVal3 });
+ if (sb.ToString() != strVal)
+ {
+ TestLibrary.TestFramework.LogError("007", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The char array is null");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ char[] charVals = null;
+ int startIndex = 1;
+ int charCount = 1;
+ sb = sb.Append(charVals, startIndex, charCount);
+ TestLibrary.TestFramework.LogError("N001", "The char array is null but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:The charCount is less than zero");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ char[] charVals = new char[] { 'a', 'b', 'c' };
+ int startIndex = 0;
+ int charCount = this.GetInt32(1, Int32.MaxValue) * (-1);
+ sb = sb.Append(charVals, startIndex, charCount);
+ TestLibrary.TestFramework.LogError("N003", "The charCount is less than zero but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3:The startIndex is less than zero");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ char[] charVals = new char[] { 'a', 'b', 'c' };
+ int startIndex = this.GetInt32(1, 10) * (-1);
+ int charCount = charVals.Length;
+ sb = sb.Append(charVals, startIndex, charCount);
+ TestLibrary.TestFramework.LogError("N005", "The startIndex is less than zero but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4:The startIndex plus charCount is larger than char array length");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ char[] charVals = new char[] { 'a', 'b', 'c' };
+ int startIndex = 0;
+ int charCount = charVals.Length + 1;
+ sb = sb.Append(charVals, startIndex, charCount);
+ TestLibrary.TestFramework.LogError("N007", "The startIndex plus charCount is larger than char array length but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend19.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend19.cs
new file mode 100644
index 0000000000..60378e347b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend19.cs
@@ -0,0 +1,258 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilderAppend(String,Int32,Int32)
+/// </summary>
+public class StringBuilderAppend19
+{
+ private const int c_MIN_STR_LENGTH = 8;
+ private const int c_MAX_STR_LENGTH = 256;
+ public static int Main()
+ {
+ StringBuilderAppend19 sbAppend19 = new StringBuilderAppend19();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderAppend19");
+ if (sbAppend19.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke Append method in the initial StringBuilder 1");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ string strVal = null;
+ int startIndex = 0;
+ int count = 0;
+ sb = sb.Append(strVal, startIndex, count);
+ if (sb.ToString() != string.Empty)
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke Append method in the initial StringBuilder 2");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ string strVal = TestLibrary.Generator.GetString(-55, false,c_MIN_STR_LENGTH,c_MAX_STR_LENGTH);
+ int startIndex = 0;
+ int count = strVal.Length;
+ sb = sb.Append(strVal, startIndex, count);
+ if (sb.ToString() != strVal)
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke Append method in the initial StringBuilder 3");
+ try
+ {
+ string strSource = "formytest";
+ StringBuilder sb = new StringBuilder(strSource);
+ string strVal = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LENGTH, c_MAX_STR_LENGTH);
+ int startIndex = 0;
+ int count = strVal.Length;
+ sb = sb.Append(strVal, startIndex, count);
+ if (sb.ToString() != strSource + strVal)
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Invoke Append method in the initial StringBuilder 4");
+ try
+ {
+ string strSource = null;
+ StringBuilder sb = new StringBuilder(strSource);
+ string strVal = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LENGTH, c_MAX_STR_LENGTH);
+ int startIndex = this.GetInt32(0, strVal.Length);
+ int count = strVal.Length - startIndex;
+ sb = sb.Append(strVal, startIndex, count);
+ if (sb.ToString() != strVal.Substring(startIndex,count))
+ {
+ TestLibrary.TestFramework.LogError("007", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The value of the string is null");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ string strVal = null;
+ int startIndex = 1;
+ int count = 1;
+ sb = sb.Append(strVal, startIndex, count);
+ TestLibrary.TestFramework.LogError("N001", "The value of the string is null but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:The count is less than zero");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ string strVal = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LENGTH,c_MAX_STR_LENGTH);
+ int startIndex = 0;
+ int count = this.GetInt32(1, Int32.MaxValue) * (-1);
+ sb = sb.Append(strVal, startIndex, count);
+ TestLibrary.TestFramework.LogError("N003", "The count is less than zero but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3:The startIndex is less than zero");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ string strVal = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LENGTH, c_MAX_STR_LENGTH);
+ int startIndex = this.GetInt32(1, 10) * (-1);
+ int count = strVal.Length;
+ sb = sb.Append(strVal, startIndex, count);
+ TestLibrary.TestFramework.LogError("N005", "The startIndex is less than zero but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4:The startIndex plus charCount is larger than char array length");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ string strVal = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LENGTH, c_MAX_STR_LENGTH);
+ int startIndex = 0;
+ int count = strVal.Length + 1;
+ sb = sb.Append(strVal, startIndex, count);
+ TestLibrary.TestFramework.LogError("N007", "The startIndex plus charCount is larger than char array length but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend2.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend2.cs
new file mode 100644
index 0000000000..1d99c7e565
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend2.cs
@@ -0,0 +1,107 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.Append(Byte)
+/// </summary>
+public class StringBuilderAppend2
+{
+ public static int Main()
+ {
+ StringBuilderAppend2 sbAppend2 = new StringBuilderAppend2();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderAppend2");
+ if (sbAppend2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke Append method in the initial StringBuilder 1");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ byte bValue = TestLibrary.Generator.GetByte(-55);
+ sb = sb.Append(bValue);
+ if (sb.ToString() != bValue.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke Append method in the initial StringBuilder 2");
+ try
+ {
+ string strSource = "formytest";
+ StringBuilder sb = new StringBuilder(strSource);
+ byte bValue = TestLibrary.Generator.GetByte(-55);
+ sb = sb.Append(bValue);
+ if (sb.ToString() != strSource + bValue.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke Append method in the initial StringBuilder 3");
+ try
+ {
+ string strSource = null;
+ StringBuilder sb = new StringBuilder(strSource);
+ byte bValue = TestLibrary.Generator.GetByte(-55);
+ sb = sb.Append(bValue);
+ if (sb.ToString() != bValue.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend3.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend3.cs
new file mode 100644
index 0000000000..da6fe5d322
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend3.cs
@@ -0,0 +1,107 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.Append(Char)
+/// </summary>
+public class StringBuilderAppend3
+{
+ public static int Main()
+ {
+ StringBuilderAppend3 sbAppend3 = new StringBuilderAppend3();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderAppend3");
+ if (sbAppend3.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke Append method in the initial StringBuilder 1");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ char charValue = TestLibrary.Generator.GetChar(-55);
+ sb = sb.Append(charValue);
+ if (sb.ToString() != charValue.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke Append method in the initial StringBuilder 2");
+ try
+ {
+ string strSource = "formytest";
+ StringBuilder sb = new StringBuilder(strSource);
+ char charValue = TestLibrary.Generator.GetChar(-55);
+ sb = sb.Append(charValue);
+ if (sb.ToString() != strSource + charValue.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke Append method in the initial StringBuilder 3");
+ try
+ {
+ string strSource = null;
+ StringBuilder sb = new StringBuilder(strSource);
+ char charValue = TestLibrary.Generator.GetChar(-55);
+ sb = sb.Append(charValue);
+ if (sb.ToString() != charValue.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend4.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend4.cs
new file mode 100644
index 0000000000..c6626bf159
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend4.cs
@@ -0,0 +1,140 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.Append(Char[])
+/// </summary>
+public class StringBuilderAppend4
+{
+ public static int Main()
+ {
+ StringBuilderAppend4 sbAppend4 = new StringBuilderAppend4();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderAppend4");
+ if (sbAppend4.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke Append method in the initial StringBuilder 1");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ char charValue1 = TestLibrary.Generator.GetChar(-55);
+ char charValue2 = TestLibrary.Generator.GetChar(-55);
+ char charValue3 = TestLibrary.Generator.GetChar(-55);
+ char[] charBuffer = new char[] { charValue1, charValue2, charValue3 };
+ sb = sb.Append(charBuffer);
+ if (sb.ToString() != new string(charBuffer))
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke Append method in the initial StringBuilder 2");
+ try
+ {
+ string strSource = "formytest";
+ StringBuilder sb = new StringBuilder(strSource);
+ char charValue1 = TestLibrary.Generator.GetChar(-55);
+ char charValue2 = TestLibrary.Generator.GetChar(-55);
+ char charValue3 = TestLibrary.Generator.GetChar(-55);
+ char[] charBuffer = new char[] { charValue1, charValue2, charValue3 };
+ sb = sb.Append(charBuffer);
+ if (sb.ToString() != strSource + new string(charBuffer))
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke Append method in the initial StringBuilder 3");
+ try
+ {
+ string strSource = null;
+ StringBuilder sb = new StringBuilder(strSource);
+ char charValue1 = TestLibrary.Generator.GetChar(-55);
+ char charValue2 = TestLibrary.Generator.GetChar(-55);
+ char charValue3 = TestLibrary.Generator.GetChar(-55);
+ char[] charBuffer = new char[] { charValue1, charValue2, charValue3 };
+ sb = sb.Append(charBuffer);
+ if (sb.ToString() != new string(charBuffer))
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Invoke Append method in the initial StringBuilder 4");
+ try
+ {
+ string strSource = null;
+ StringBuilder sb = new StringBuilder(strSource);
+ char[] charBuffer = null;
+ sb = sb.Append(charBuffer);
+ if (sb.ToString() != string.Empty)
+ {
+ TestLibrary.TestFramework.LogError("007", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend5.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend5.cs
new file mode 100644
index 0000000000..071643d1fc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend5.cs
@@ -0,0 +1,107 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.Append(Decimal)
+/// </summary>
+public class StringBuilderAppend5
+{
+ public static int Main()
+ {
+ StringBuilderAppend5 sbAppend5 = new StringBuilderAppend5();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderAppend5");
+ if (sbAppend5.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke Append method in the initial StringBuilder 1");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ decimal decimalVal = (decimal)TestLibrary.Generator.GetInt32(-55);
+ sb = sb.Append(decimalVal);
+ if (sb.ToString() != decimalVal.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke Append method in the initial StringBuilder 2");
+ try
+ {
+ string strSource = "formytest";
+ StringBuilder sb = new StringBuilder(strSource);
+ decimal decimalVal = (decimal)TestLibrary.Generator.GetInt32(-55);
+ sb = sb.Append(decimalVal);
+ if (sb.ToString() != strSource + decimalVal.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke Append method in the initial StringBuilder 3");
+ try
+ {
+ string strSource = null;
+ StringBuilder sb = new StringBuilder(strSource);
+ decimal decimalVal = (decimal)TestLibrary.Generator.GetInt32(-55);
+ sb = sb.Append(decimalVal);
+ if (sb.ToString() != decimalVal.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend6.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend6.cs
new file mode 100644
index 0000000000..6dfd41daf6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend6.cs
@@ -0,0 +1,107 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.Append(Double)
+/// </summary>
+public class StringBuilderAppend6
+{
+ public static int Main()
+ {
+ StringBuilderAppend6 sbAppend6 = new StringBuilderAppend6();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderAppend6");
+ if (sbAppend6.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke Append method in the initial StringBuilder 1");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ double doubleVal = TestLibrary.Generator.GetDouble(-55);
+ sb = sb.Append(doubleVal);
+ if (sb.ToString() != doubleVal.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke Append method in the initial StringBuilder 2");
+ try
+ {
+ string strSource = "formytest";
+ StringBuilder sb = new StringBuilder(strSource);
+ double doubleVal = TestLibrary.Generator.GetDouble(-55);
+ sb = sb.Append(doubleVal);
+ if (sb.ToString() != strSource + doubleVal.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke Append method in the initial StringBuilder 3");
+ try
+ {
+ string strSource = null;
+ StringBuilder sb = new StringBuilder(strSource);
+ double doubleVal = TestLibrary.Generator.GetDouble(-55);
+ sb = sb.Append(doubleVal);
+ if (sb.ToString() != doubleVal.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend7.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend7.cs
new file mode 100644
index 0000000000..5ed6e68a31
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend7.cs
@@ -0,0 +1,109 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.Append(Int16)
+/// </summary>
+public class StringBuilderAppend7
+{
+ public static int Main()
+ {
+ StringBuilderAppend7 sbAppend7 = new StringBuilderAppend7();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderAppend7");
+ if (sbAppend7.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke Append method in the initial StringBuilder 1");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ Int16 int16Val = TestLibrary.Generator.GetInt16(-55);
+ sb = sb.Append(int16Val);
+ if (sb.ToString() != int16Val.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke Append method in the initial StringBuilder 2");
+ try
+ {
+ string strSource = "formytest";
+ StringBuilder sb = new StringBuilder(strSource);
+ Int16 int16Val = TestLibrary.Generator.GetInt16(-55);
+ sb = sb.Append(int16Val);
+ if (sb.ToString() != strSource + int16Val.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke Append method in the initial StringBuilder 3");
+ try
+ {
+ string strSource = null;
+ StringBuilder sb = new StringBuilder(strSource);
+ Int16 int16Val = TestLibrary.Generator.GetInt16(-55);
+ sb = sb.Append(int16Val);
+ if (sb.ToString() != int16Val.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
+
+
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend8.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend8.cs
new file mode 100644
index 0000000000..6fd3d9311b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend8.cs
@@ -0,0 +1,107 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.Append(Int32)
+/// </summary>
+public class StringBuilderAppend8
+{
+ public static int Main()
+ {
+ StringBuilderAppend8 sbAppend8 = new StringBuilderAppend8();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderAppend8");
+ if (sbAppend8.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke Append method in the initial StringBuilder 1");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ Int32 int32Val = TestLibrary.Generator.GetInt32(-55);
+ sb = sb.Append(int32Val);
+ if (sb.ToString() != int32Val.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke Append method in the initial StringBuilder 2");
+ try
+ {
+ string strSource = "formytest";
+ StringBuilder sb = new StringBuilder(strSource);
+ Int32 int32Val = TestLibrary.Generator.GetInt32(-55);
+ sb = sb.Append(int32Val);
+ if (sb.ToString() != strSource + int32Val.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke Append method in the initial StringBuilder 3");
+ try
+ {
+ string strSource = null;
+ StringBuilder sb = new StringBuilder(strSource);
+ Int32 int32Val = TestLibrary.Generator.GetInt32(-55);
+ sb = sb.Append(int32Val);
+ if (sb.ToString() != int32Val.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend9.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend9.cs
new file mode 100644
index 0000000000..4cd7ea2f99
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderappend9.cs
@@ -0,0 +1,107 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.Append(Int64)
+/// </summary>
+public class StringBuilderAppend9
+{
+ public static int Main()
+ {
+ StringBuilderAppend9 sbAppend9 = new StringBuilderAppend9();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderAppend9");
+ if (sbAppend9.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke Append method in the initial StringBuilder 1");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ Int64 int64Val = TestLibrary.Generator.GetInt64(-55);
+ sb = sb.Append(int64Val);
+ if (sb.ToString() != int64Val.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke Append method in the initial StringBuilder 2");
+ try
+ {
+ string strSource = "formytest";
+ StringBuilder sb = new StringBuilder(strSource);
+ Int64 int64Val = TestLibrary.Generator.GetInt64(-55);
+ sb = sb.Append(int64Val);
+ if (sb.ToString() != strSource + int64Val.ToString())
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke Append method in the initial StringBuilder 3");
+ try
+ {
+ string strSource = null;
+ StringBuilder sb = new StringBuilder(strSource);
+ Int64 int64Val = TestLibrary.Generator.GetInt64(-55);
+ sb = sb.Append(int64Val);
+ if (sb.ToString() != int64Val.ToString())
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuildercapacity.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuildercapacity.cs
new file mode 100644
index 0000000000..d0d3c133b9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuildercapacity.cs
@@ -0,0 +1,247 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+using TestLibrary;
+using System.Globalization;
+
+class StringBuilderCapacity
+{
+ static int Main()
+ {
+ StringBuilderCapacity test = new StringBuilderCapacity();
+
+ TestFramework.BeginTestCase("StringBuilder.Capacity");
+
+ if (test.RunTests())
+ {
+ TestFramework.EndTestCase();
+ TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestFramework.EndTestCase();
+ TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool ret = true;
+
+ // Positive Tests
+ ret &= Test2();
+ ret &= Test3();
+ ret &= Test4();
+ ret &= Test5();
+
+ // Negative Tests
+ ret &= Test1();
+ ret &= Test6();
+ ret &= Test7();
+
+ return ret;
+ }
+
+ public bool Test1()
+ {
+ string id = "Scenario1";
+ bool result = true;
+ TestFramework.BeginScenario("Scenario 1: Setting Capacity to 0");
+ try
+ {
+ StringBuilder sb = new StringBuilder("Test");
+ sb.Capacity = 0;
+ string output = sb.ToString();
+ int cap = sb.Capacity;
+ result = false;
+ TestFramework.LogError("001", "Error in " + id + ", expected exception not thrown. Capacity: " + cap + ", string: " + output);
+
+ }
+ catch (Exception exc)
+ {
+ if (exc.GetType() != typeof(ArgumentOutOfRangeException))
+ {
+ result = false;
+ TestFramework.LogError("003", "Unexpected exception in " + id + ", expected type: " + typeof(ArgumentOutOfRangeException).ToString() + ", Actual exception: " + exc.ToString());
+ }
+ }
+ return result;
+ }
+
+ public bool Test2()
+ {
+ string id = "Scenario2";
+ bool result = true;
+ TestFramework.BeginScenario("Scenario 2: Setting capacity to current capacity");
+ try
+ {
+ StringBuilder sb = new StringBuilder("Test", 4);
+ sb.Capacity = 4;
+ string output = sb.ToString();
+ int cap = sb.Capacity;
+ if (output != "Test")
+ {
+ result = false;
+ TestFramework.LogError("004", "Error in " + id + ", unexpected string. Actual string " + output + ", Expected: Test");
+ }
+ if (cap != 4)
+ {
+ result = false;
+ TestFramework.LogError("005", "Error in " + id + ", unexpected capacity. Actual capacity " + cap + ", Expected: 4");
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("006", "Unexpected exception in " + id + ", exception: " + exc.ToString());
+ }
+ return result;
+ }
+
+ public bool Test3()
+ {
+ string id = "Scenario3";
+ bool result = true;
+ TestFramework.BeginScenario("Scenario 3: Setting capacity to > length < capacity");
+ try
+ {
+ StringBuilder sb = new StringBuilder("Test", 10);
+ sb.Capacity = 8;
+ string output = sb.ToString();
+ int capacity = sb.Capacity;
+ if (output != "Test")
+ {
+ result = false;
+ TestFramework.LogError("007", "Error in " + id + ", unexpected string. Actual string " + output + ", Expected: Test");
+ }
+ if (capacity != 8)
+ {
+ result = false;
+ TestFramework.LogError("008", "Error in " + id + ", unexpected legnth. Actual capacity" + capacity + ", Expected: 8");
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("009", "Unexpected exception in " + id + ", exception: " + exc.ToString());
+ }
+ return result;
+ }
+
+ public bool Test4()
+ {
+ string id = "Scenario4";
+ bool result = true;
+ TestFramework.BeginScenario("Scenario 4: Setting capacity to > capacity");
+ try
+ {
+ StringBuilder sb = new StringBuilder("Test", 10);
+ sb.Capacity = 12;
+ string output = sb.ToString();
+ int cap = sb.Capacity;
+ if (output != "Test")
+ {
+ result = false;
+ TestFramework.LogError("010", "Error in " + id + ", unexpected string. Actual string " + output + ", Expected: Test");
+ }
+ if (cap != 12)
+ {
+ result = false;
+ TestFramework.LogError("011", "Error in " + id + ", unexpected legnth. Actual capacity " + cap + ", Expected: 12");
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("012", "Unexpected exception in " + id + ", exception: " + exc.ToString());
+ }
+ return result;
+ }
+
+ public bool Test5()
+ {
+ string id = "Scenario5";
+ bool result = true;
+ TestFramework.BeginScenario("Scenario 5: Setting capacity to something very large");
+ try
+ {
+ StringBuilder sb = new StringBuilder("Test");
+ sb.Capacity = 10004;
+ string output = sb.ToString();
+ int capacity = sb.Capacity;
+ if (output != "Test")
+ {
+ result = false;
+ TestFramework.LogError("013", "Error in " + id + ", unexpected string. Actual string " + output + ", Expected: Test");
+ }
+ if (capacity != 10004)
+ {
+ result = false;
+ TestFramework.LogError("014", "Error in " + id + ", unexpected legnth. Actual capacity " + capacity + ", Expected: 10004");
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("015", "Unexpected exception in " + id + ", exception: " + exc.ToString());
+ }
+ return result;
+ }
+
+ public bool Test6()
+ {
+ string id = "Scenario6";
+ bool result = true;
+ TestFramework.BeginScenario("Scenario 6: Setting Capacity to > max capacity");
+ try
+ {
+ StringBuilder sb = new StringBuilder(4, 10);
+ sb.Append("Test");
+
+ sb.Capacity = 12;
+ string output = sb.ToString();
+ result = false;
+ TestFramework.LogError("016", "Error in " + id + ", Expected exception not thrown. No exception. Actual string " + output + ", Expected: " + typeof(ArgumentOutOfRangeException).ToString());
+ }
+ catch (Exception exc)
+ {
+ if (exc.GetType() != typeof(ArgumentOutOfRangeException))
+ {
+ result = false;
+ TestFramework.LogError("017", "Unexpected exception in " + id + ", expected type: " + typeof(ArgumentOutOfRangeException).ToString() + ", Actual exception: " + exc.ToString());
+ }
+ }
+ return result;
+ }
+
+ public bool Test7()
+ {
+ string id = "Scenario7";
+ bool result = true;
+ TestFramework.BeginScenario("Scenario 7: Setting capacity to < 0");
+ try
+ {
+ StringBuilder sb = new StringBuilder(4, 10);
+ sb.Append("Test");
+
+ sb.Capacity = -1;
+ string output = sb.ToString();
+ result = false;
+ TestFramework.LogError("018", "Error in " + id + ", Expected exception not thrown. No exception. Actual string " + output + ", Expected: " + typeof(ArgumentOutOfRangeException).ToString());
+ }
+ catch (Exception exc)
+ {
+ if (exc.GetType() != typeof(ArgumentOutOfRangeException))
+ {
+ result = false;
+ TestFramework.LogError("018", "Unexpected exception in " + id + ", expected type: " + typeof(ArgumentOutOfRangeException).ToString() + ", Actual exception: " + exc.ToString());
+ }
+ }
+ return result;
+ }
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuildercapacity_cti.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuildercapacity_cti.cs
new file mode 100644
index 0000000000..8f47e85264
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuildercapacity_cti.cs
@@ -0,0 +1,264 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// StringBuilder.Capacity Property
+/// Gets or sets the maximum number of characters that can be contained
+/// in the memory allocated by the current instance.
+/// </summary>
+public class StringBuilderCapacity
+{
+ private const int c_MIN_STR_LEN = 1;
+ private const int c_MAX_STR_LEN = 260;
+
+ private const int c_MAX_CAPACITY = Int16.MaxValue;
+
+ public static int Main()
+ {
+ StringBuilderCapacity testObj = new StringBuilderCapacity();
+
+ TestLibrary.TestFramework.BeginTestCase("for property: StringBuilder.Capacity");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Get the capacity property";
+ string errorDesc;
+
+ StringBuilder sb;
+ int actualCapacity, expectedCapacity;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ expectedCapacity = str.Length
+ + TestLibrary.Generator.GetInt32(-55) % (c_MAX_CAPACITY - str.Length + 1);
+
+ sb = new StringBuilder(str, expectedCapacity);
+
+ actualCapacity = sb.Capacity;
+
+ if (actualCapacity != expectedCapacity)
+ {
+ errorDesc = "Capacity of current StringBuilder " + sb + " is not the value ";
+ errorDesc += string.Format("{0} as expected: actual({1})", expectedCapacity, actualCapacity);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: Set the capacity property";
+ string errorDesc;
+
+ StringBuilder sb;
+ int actualCapacity, expectedCapacity;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ sb = new StringBuilder(str);
+
+ expectedCapacity = str.Length
+ + TestLibrary.Generator.GetInt32(-55) % (c_MAX_CAPACITY - str.Length + 1);
+
+ sb.Capacity = expectedCapacity;
+ actualCapacity = sb.Capacity;
+
+ if (actualCapacity != expectedCapacity)
+ {
+ errorDesc = "Capacity of current StringBuilder " + sb + " is not the value ";
+ errorDesc += string.Format("{0} as expected: actual({1})", expectedCapacity, actualCapacity);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //ArgumentOutOfRangeException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: The value specified for a set operation is less than the current length of this instance.";
+ string errorDesc;
+
+ StringBuilder sb;
+ int capacity, currentInstanceLength;
+
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ sb = new StringBuilder(str);
+ currentInstanceLength = str.Length;
+ capacity = TestLibrary.Generator.GetInt32(-55) % currentInstanceLength;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ sb.Capacity = capacity;
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected.";
+ errorDesc += string.Format("\nString value of StringBuilder is {0}", str);
+ errorDesc += string.Format("\nCurrent length of instance is {0}, capacity specified is {1}",
+ currentInstanceLength, capacity);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nString value of StringBuilder is {0}", str);
+ errorDesc += string.Format("\nCurrent length of instance is {0}, capacity specified is {1}",
+ currentInstanceLength, capacity);
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: The value specified for a set operation is less than zero.";
+ string errorDesc;
+
+ StringBuilder sb;
+ int capacity, currentInstanceLength;
+
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ sb = new StringBuilder(str);
+ currentInstanceLength = str.Length;
+ capacity = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ sb.Capacity = capacity;
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected.";
+ errorDesc += string.Format("\nString value of StringBuilder is {0}", str);
+ errorDesc += string.Format("\nCurrent length of instance is {0}, capacity specified is {1}",
+ currentInstanceLength, capacity);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nString value of StringBuilder is {0}", str);
+ errorDesc += string.Format("\nCurrent length of instance is {0}, capacity spdified is {1}",
+ currentInstanceLength, capacity);
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: The value specified for a set operation is greater than the maximum capacity.";
+ string errorDesc;
+
+ StringBuilder sb;
+ int capacity;
+
+ int maxCapacity = TestLibrary.Generator.GetInt32(-55) % c_MAX_CAPACITY;
+ sb = new StringBuilder(0, maxCapacity);
+
+ capacity = maxCapacity + 1 + TestLibrary.Generator.GetInt32(-55) % (int.MaxValue - maxCapacity);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ sb.Capacity = capacity;
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected.";
+ errorDesc += string.Format("\nMaximum capacity of instance is {0}, capacity spdified is {1}",
+ maxCapacity, capacity);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nMaximum capacity of instance is {0}, capacity spdified is {1}",
+ maxCapacity, capacity);
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderchars.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderchars.cs
new file mode 100644
index 0000000000..14cf98dc1c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderchars.cs
@@ -0,0 +1,316 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// StringBuilder.Chars Property
+/// Gets or sets the character at the specified character position in this instance.
+/// </summary>
+public class StringBuilderChars
+{
+ private const int c_MIN_STR_LEN = 1;
+ private const int c_MAX_STR_LEN = 260;
+
+ private const int c_MAX_CAPACITY = Int16.MaxValue;
+
+ public static int Main()
+ {
+ StringBuilderChars testObj = new StringBuilderChars();
+
+ TestLibrary.TestFramework.BeginTestCase("for property: StringBuilder.Chars");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Get the Chars property";
+ string errorDesc;
+
+ StringBuilder sb;
+ char actualChar, expectedChar;
+ int index;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ sb = new StringBuilder(str);
+
+ index = TestLibrary.Generator.GetInt32(-55) % str.Length;
+
+ expectedChar = str[index];
+ actualChar = sb[index];
+
+ if (actualChar != expectedChar)
+ {
+ errorDesc = "Character of current StringBuilder " + sb + " at sepcifed index " + index
+ + " is not the value ";
+ errorDesc += string.Format("{0} as expected: actual({1})", expectedChar, actualChar);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: Set the Chars property";
+ string errorDesc;
+
+ StringBuilder sb;
+ char actualChar, expectedChar;
+ int index;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ sb = new StringBuilder(str);
+
+ index = TestLibrary.Generator.GetInt32(-55) % str.Length;
+
+ expectedChar = TestLibrary.Generator.GetChar(-55);
+ sb[index] = expectedChar;
+ actualChar = sb[index];
+
+ if (actualChar != expectedChar)
+ {
+ errorDesc = "Character of current StringBuilder " + sb + " at sepcifed index " + index
+ + " is not the value ";
+ errorDesc += string.Format("{0} as expected: actual({1})", expectedChar, actualChar);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //IndexOutOfRangeException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: index is greater than or equal the current length of this instance while getting a character.";
+ string errorDesc;
+
+ StringBuilder sb;
+ int index, currentInstanceLength;
+
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ sb = new StringBuilder(str);
+ currentInstanceLength = str.Length;
+ index = currentInstanceLength +
+ TestLibrary.Generator.GetInt32(-55) % (int.MaxValue - currentInstanceLength);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ char ch = sb[index];
+ errorDesc = "IndexOutOfRangeException is not thrown as expected.";
+ errorDesc += string.Format("\nString value of StringBuilder is {0}", str);
+ errorDesc += string.Format("\nCurrent length of instance is {0}, index specified is {1}",
+ currentInstanceLength, index);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (IndexOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nString value of StringBuilder is {0}", str);
+ errorDesc += string.Format("\nCurrent length of instance is {0}, index specified is {1}",
+ currentInstanceLength, index);
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: index is less than zero while getting a character.";
+ string errorDesc;
+
+ StringBuilder sb;
+ int index, currentInstanceLength;
+
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ sb = new StringBuilder(str);
+ currentInstanceLength = str.Length;
+ index = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ char ch = sb[index];
+ errorDesc = "IndexOutOfRangeException is not thrown as expected.";
+ errorDesc += string.Format("\nString value of StringBuilder is {0}", str);
+ errorDesc += string.Format("\nCurrent length of instance is {0}, index specified is {1}",
+ currentInstanceLength, index);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (IndexOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nString value of StringBuilder is {0}", str);
+ errorDesc += string.Format("\nCurrent length of instance is {0}, index specified is {1}",
+ currentInstanceLength, index);
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ //ArgumentOutOfRangeException
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: index is greater than or equal the current length of this instance while setting a character.";
+ string errorDesc;
+
+ StringBuilder sb;
+ int index, currentInstanceLength;
+
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ sb = new StringBuilder(str);
+ currentInstanceLength = str.Length;
+ index = currentInstanceLength +
+ TestLibrary.Generator.GetInt32(-55) % (int.MaxValue - currentInstanceLength);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ char ch = TestLibrary.Generator.GetChar(-55);
+ sb[index] =ch;
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected.";
+ errorDesc += string.Format("\nString value of StringBuilder is {0}", str);
+ errorDesc += string.Format("\nCurrent length of instance is {0}, index specified is {1}",
+ currentInstanceLength, index);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nString value of StringBuilder is {0}", str);
+ errorDesc += string.Format("\nCurrent length of instance is {0}, index specified is {1}",
+ currentInstanceLength, index);
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N004";
+ const string c_TEST_DESC = "NegTest4: index is less than zero while setting a character.";
+ string errorDesc;
+
+ StringBuilder sb;
+ int index, currentInstanceLength;
+
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ sb = new StringBuilder(str);
+ currentInstanceLength = str.Length;
+ index = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ char ch = TestLibrary.Generator.GetChar(-55);
+ sb[index] = ch;
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected.";
+ errorDesc += string.Format("\nString value of StringBuilder is {0}", str);
+ errorDesc += string.Format("\nCurrent length of instance is {0}, index specified is {1}",
+ currentInstanceLength, index);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nString value of StringBuilder is {0}", str);
+ errorDesc += string.Format("\nCurrent length of instance is {0}, index specified is {1}",
+ currentInstanceLength, index);
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor1.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor1.cs
new file mode 100644
index 0000000000..94daae3d28
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor1.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.ctor()
+/// </summary>
+public class StringBuilderctor1
+{
+ public static int Main()
+ {
+ StringBuilderctor1 sbctor1 = new StringBuilderctor1();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderctor1");
+ if (sbctor1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Construct the StringBuilder");
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ if (sb == null|| sb.Length != 0 || sb.Capacity != 16)
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor2.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor2.cs
new file mode 100644
index 0000000000..07386d18c7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor2.cs
@@ -0,0 +1,125 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.ctor(Int32)
+/// </summary>
+public class StringBuilderctor2
+{
+ public static int Main()
+ {
+ StringBuilderctor2 sbctor2 = new StringBuilderctor2();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderctor2");
+ if (sbctor2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Construct the StringBuilder with 0 capacity");
+ try
+ {
+ int capacity = 0;
+ StringBuilder sb = new StringBuilder(capacity);
+ if (sb == null || sb.Length != 0 || sb.Capacity != 16)
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Construct the StringBuilder with greater 0 capacity");
+ try
+ {
+ int capacity = this.GetInt32(1, 256);
+ StringBuilder sb = new StringBuilder(capacity);
+ if (sb == null || sb.Length != 0 || sb.Capacity != capacity)
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The capacity is less than zero");
+ try
+ {
+ int capacity = this.GetInt32(1, Int32.MaxValue) * (-1);
+ StringBuilder sb = new StringBuilder(capacity);
+ TestLibrary.TestFramework.LogError("N001", "The capacity is less than zero but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor3.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor3.cs
new file mode 100644
index 0000000000..afd0b7fa9f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor3.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.ctor(String)
+/// </summary>
+public class StringBuilderctor3
+{
+ public static int Main()
+ {
+ StringBuilderctor3 sbctor3 = new StringBuilderctor3();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderctor3");
+ if (sbctor3.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Construct the StringBuilder with null string");
+ try
+ {
+ string strValue = null;
+ StringBuilder sb = new StringBuilder(strValue);
+ if (sb == null || sb.Length != 0 || sb.Capacity != 16)
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Construct the StringBuilder with empty string");
+ try
+ {
+ string strValue = string.Empty;
+ StringBuilder sb = new StringBuilder(strValue);
+ if (sb == null || sb.Length != 0 || sb.Capacity != 16)
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Construct the StringBuilder with random string");
+ try
+ {
+ string strValue = TestLibrary.Generator.GetString(-55, false, 8, 256);
+ StringBuilder sb = new StringBuilder(strValue);
+ if (sb == null || sb.Length != strValue.Length)
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor4.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor4.cs
new file mode 100644
index 0000000000..981b0ea937
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor4.cs
@@ -0,0 +1,183 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.ctor(Int32,Int32)
+/// </summary>
+public class StringBuilderctor4
+{
+ public static int Main()
+ {
+ StringBuilderctor4 sbctor4 = new StringBuilderctor4();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderctor4");
+ if (sbctor4.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Initialize StringBuilder with capacity and maxcapacity 1");
+ try
+ {
+ StringBuilder sb = new StringBuilder(0, 1);
+ if (sb == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "StringBuilder(0, 1) should not be null");
+ retVal = false;
+ }
+ else if (sb.Length != 0)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "StringBuilder(0, 1).Length should be 0, is " + sb.Length.ToString());
+ retVal = false;
+ }
+ else if (sb.Capacity > 1)
+ {
+ TestLibrary.TestFramework.LogError("001.3", "StringBuilder(0, 1).Capacity should not exceed 1, is " + sb.Capacity.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Initialize StringBuilder with capacity and maxcapacity 2");
+ try
+ {
+ int capacity = this.GetInt32(0, 256);
+ int maxcapacity = Int32.MaxValue;
+ StringBuilder sb = new StringBuilder(capacity, maxcapacity);
+ if (sb == null)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "StringBuilder(" + capacity.ToString() + ", " + maxcapacity.ToString() + ") should not be null");
+ retVal = false;
+ }
+ else if (sb.Capacity < capacity)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "StringBuilder(" + capacity.ToString() + ", " + maxcapacity.ToString() + ").Capacity == " + sb.Capacity.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Initialize StringBuilder with capacity which is less than 0");
+ try
+ {
+ int capacity = this.GetInt32(1, Int32.MaxValue) * (-1);
+ int maxcapacity = this.GetInt32(1, Int32.MaxValue);
+ StringBuilder sb = new StringBuilder(capacity, maxcapacity);
+ TestLibrary.TestFramework.LogError("N001", "capacity is less than 0 but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:Initialize StringBuilder with maxcapacity which is less than 1");
+ try
+ {
+ int capacity = 0;
+ int maxcapacity = this.GetInt32(0, Int32.MaxValue) * (-1);
+ StringBuilder sb = new StringBuilder(capacity, maxcapacity);
+ TestLibrary.TestFramework.LogError("N003", "maxcapacity is less than 1 but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3:Initialize StringBuilder which capacity is greater than maxcapacity");
+ try
+ {
+ int maxcapacity = this.GetInt32(1, Int32.MaxValue);
+ int capacity = maxcapacity + this.GetInt32(1, Int32.MaxValue);
+ StringBuilder sb = new StringBuilder(capacity, maxcapacity);
+ TestLibrary.TestFramework.LogError("N005", "maxcapacity is less than capacity but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor5.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor5.cs
new file mode 100644
index 0000000000..6090a6da69
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor5.cs
@@ -0,0 +1,230 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.ctor(String,Int32)
+/// </summary>
+public class StringBuilderctor5
+{
+ public static int Main()
+ {
+ StringBuilderctor5 sbctor5 = new StringBuilderctor5();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderctor5");
+ if (sbctor5.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Initialize StringBuilder with capacity and string 1");
+ try
+ {
+ string strValue = null;
+ int capacity = this.GetInt32(1, 256);
+ StringBuilder sb = new StringBuilder(strValue, capacity);
+ if (sb == null)
+ {
+ TestLibrary.TestFramework.LogError("007.1", "StringBuilder was null");
+ retVal = false;
+ }
+ else if (!sb.ToString().Equals(String.Empty))
+ {
+ TestLibrary.TestFramework.LogError("007.2", "Expected value of StringBuilder.ToString = String.Empty, actual: " +
+ sb.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Initialize StringBuilder with capacity and string 2");
+ try
+ {
+ string strValue = string.Empty;
+ int capacity = this.GetInt32(1, 256);
+ StringBuilder sb = new StringBuilder(strValue, capacity);
+ if (sb == null)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "StringBuilder was null");
+ retVal = false;
+ }
+ else if (!sb.ToString().Equals(strValue))
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Expected value of StringBuilder.ToString = " + strValue + ", actual: " +
+ sb.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Initialize StringBuilder with capacity and string 3");
+ try
+ {
+ string strValue = TestLibrary.Generator.GetString(-55, false, 8, 256);
+ int capacity = this.GetInt32(1, strValue.Length);
+ StringBuilder sb = new StringBuilder(strValue, capacity);
+ if (sb == null)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "StringBuilder was null");
+ retVal = false;
+ }
+ else if (!sb.ToString().Equals(strValue))
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Expected value of StringBuilder.ToString = " + strValue + ", actual: " +
+ sb.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Initialize StringBuilder with capacity and string 4");
+ try
+ {
+ string strValue = string.Empty;
+ int capacity = 0;
+ StringBuilder sb = new StringBuilder(strValue, capacity);
+ if (sb == null)
+ {
+ TestLibrary.TestFramework.LogError("007.1", "StringBuilder was null");
+ retVal = false;
+ }
+ else if (!sb.ToString().Equals(strValue))
+ {
+ TestLibrary.TestFramework.LogError("007.2", "Expected value of StringBuilder.ToString = " + strValue + ", actual: " +
+ sb.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5:Initialize StringBuilder with capacity and string 5");
+ try
+ {
+ string strValue = TestLibrary.Generator.GetString(-55, false, 8, 256);
+ int capacity = 0;
+ StringBuilder sb = new StringBuilder(strValue, capacity);
+ if (sb == null)
+ {
+ TestLibrary.TestFramework.LogError("009.0", "StringBuilder was null");
+ retVal = false;
+ } else if (!sb.ToString().Equals(strValue))
+ {
+ TestLibrary.TestFramework.LogError("009.1", "Initializer string was "+strValue+", StringBuilder.ToString returned "+sb.ToString());
+ retVal = false;
+ }
+ else if (sb.Capacity == 0)
+ {
+ TestLibrary.TestFramework.LogError("009.2", "StringBuilder.Capacity returned 0 for non-empty string");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The capacity is less than zero");
+ try
+ {
+ string strValue = TestLibrary.Generator.GetString(-55, false, 8, 256);
+ int capacity = this.GetInt32(1, Int32.MaxValue) * (-1);
+ StringBuilder sb = new StringBuilder(strValue, capacity);
+ TestLibrary.TestFramework.LogError("N001", "The capacity is less than zero but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor6.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor6.cs
new file mode 100644
index 0000000000..35d9a459c7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderctor6.cs
@@ -0,0 +1,230 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+/// <summary>
+/// StringBuilder.ctor(String,Int32,Int32,Int32)
+/// </summary>
+public class StringBuilderctor6
+{
+ public static int Main()
+ {
+ StringBuilderctor6 sbctor6 = new StringBuilderctor6();
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderctor6");
+ if (sbctor6.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Initialize StringBuilder with substring and capacity 1");
+ try
+ {
+ string strValue = null;
+ int capacity = this.GetInt32(1, 256);
+ StringBuilder sb = new StringBuilder(strValue, 0, 0, capacity);
+ if (sb == null || sb.ToString() != string.Empty || sb.Capacity != capacity)
+ {
+ TestLibrary.TestFramework.LogError("001", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Initialize StringBuilder with substring and capacity 2");
+ try
+ {
+ string strValue = string.Empty;
+ int startIndex = 0;
+ int length = 0;
+ int capacity = this.GetInt32(1, 256);
+ StringBuilder sb = new StringBuilder(strValue, startIndex, length, capacity);
+ if (sb == null || sb.ToString() != string.Empty || sb.Capacity != capacity)
+ {
+ TestLibrary.TestFramework.LogError("003", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Initialize StringBuilder with substring and capacity 3");
+ try
+ {
+ string strValue = TestLibrary.Generator.GetString(-55, false, 8, 256);
+ int startIndex = 0;
+ int length = strValue.Length;
+ int capacity = this.GetInt32(1, 256);
+ StringBuilder sb = new StringBuilder(strValue, startIndex, length, capacity);
+ if (sb == null || sb.ToString() != strValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Initialize StringBuilder with substring and capacity 4");
+ try
+ {
+ string strValue = TestLibrary.Generator.GetString(-55, false, 8, 256);
+ int startIndex = this.GetInt32(0, strValue.Length);
+ int length = strValue.Length - startIndex;
+ int capacity = this.GetInt32(1, 256);
+ StringBuilder sb = new StringBuilder(strValue, startIndex, length, capacity);
+ if (sb == null || sb.ToString() != strValue.Substring(startIndex,length))
+ {
+ TestLibrary.TestFramework.LogError("007", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5:Initialize StringBuilder with substring and capacity 5");
+ try
+ {
+ string strValue = string.Empty;
+ int startIndex = 0;
+ int length = strValue.Length;
+ int capacity = 0;
+ StringBuilder sb = new StringBuilder(strValue, startIndex, length, capacity);
+ if (sb == null || sb.ToString() != string.Empty || sb.Capacity != 16)
+ {
+ TestLibrary.TestFramework.LogError("009", "The ExpectResult is not the ActualResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:The capacity is less than zero");
+ try
+ {
+ string strValue = TestLibrary.Generator.GetString(-55, false, 8, 256);
+ int startIndex = 0;
+ int length = strValue.Length;
+ int capacity = this.GetInt32(1, Int32.MaxValue) * (-1);
+ StringBuilder sb = new StringBuilder(strValue,startIndex,length,capacity);
+ TestLibrary.TestFramework.LogError("N001", "The capacity is less than zero but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:The startIndex plus length is not a position within value");
+ try
+ {
+ string strValue = TestLibrary.Generator.GetString(-55, false, 8, 256);
+ int startIndex = 1;
+ int length = strValue.Length;
+ int capacity = this.GetInt32(0, 256);
+ StringBuilder sb = new StringBuilder(strValue, startIndex, length, capacity);
+ TestLibrary.TestFramework.LogError("N003", "The startIndex plus length is not a position within value but not throw exception");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region HelpMethod
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderinsert.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderinsert.cs
new file mode 100644
index 0000000000..8c813bfdcd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderinsert.cs
@@ -0,0 +1,169 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+using TestLibrary;
+using System.Globalization;
+
+class StringBuilderInsert
+{
+ static int Main()
+ {
+ StringBuilderInsert test = new StringBuilderInsert();
+
+ TestFramework.BeginTestCase("StringBuilder.Insert");
+
+ if (test.RunTests())
+ {
+ TestFramework.EndTestCase();
+ TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestFramework.EndTestCase();
+ TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool ret = true;
+
+ // Positive Tests
+ ret &= Test001();
+ ret &= Test002();
+ ret &= Test003();
+ ret &= Test004();
+ ret &= Test005();
+
+ ret &= Test012();
+ ret &= Test013();
+// ret &= Test014();
+
+ // Negative Tests
+ ret &= Test006();
+ ret &= Test007();
+ ret &= Test008();
+ ret &= Test009();
+ ret &= Test010();
+ ret &= Test011();
+
+ return ret;
+ }
+
+ public bool Test001() { return PositiveTest(2, new char[] { 'a', 'b', 'c', 'd', 'e' }, 1, 2, "Tebcst", "00A"); }
+ public bool Test002() { return PositiveTest(2, null, 0, 0, "Test", "00B"); }
+ public bool Test003() { char[] chars = new char[10000]; for (int i = 0; i < 10000; i++) chars[i] = 'a';
+ return PositiveTest(4, chars, 0, 10000, "Test" + new string('a', 10000), "00C"); }
+ public bool Test004() { return PositiveTest(0, new char[] { 'a', 'b', 'c', 'd', 'e' }, 0, 1, "aTest", "00D"); }
+ public bool Test005() { return PositiveTest(1, new char[] { 'a', 'b', 'c', 'd', 'e' }, 3, 0, "Test", "00E"); }
+
+ public bool Test006() { return NegativeTest(-1, new char[] { 'a', 'b', 'c', 'd', 'e' }, 1, 2, typeof(ArgumentOutOfRangeException), "00F"); }
+ public bool Test007() { return NegativeTest(5, new char[] { 'a', 'b', 'c', 'd', 'e' }, 1, 2, typeof(ArgumentOutOfRangeException), "00G"); }
+ public bool Test008() { return NegativeTest(0, new char[] { 'a', 'b', 'c', 'd', 'e' }, -1, 2, typeof(ArgumentOutOfRangeException), "00H"); }
+ public bool Test009() { return NegativeTest(0, new char[] { 'a', 'b', 'c', 'd', 'e' }, 1, -1, typeof(ArgumentOutOfRangeException), "00I"); }
+ public bool Test010() { return NegativeTest(0, new char[] { 'a', 'b', 'c', 'd', 'e' }, 4, 3, typeof(ArgumentOutOfRangeException), "00J"); }
+ public bool Test011() { return NegativeTest(0, null, 0, 1, typeof(ArgumentNullException), "00K"); }
+
+ public bool Test012() { return PositiveTest2(2, new char[] { 'a', 'b', 'c', 'd', 'e' }, "Teabcdest", "00A1"); }
+ public bool Test013() { return PositiveTest2(2, null, "Test", "00B1"); }
+
+// public bool Test014() { return PositiveTest3(2, 't', "Tetst", "00A2"); }
+
+ public bool PositiveTest(int index, char[] chars, int startIndex, int count, string expected, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Insert");
+ try
+ {
+ StringBuilder sb = new StringBuilder("Test");
+ sb.Insert(index, chars, startIndex, count);
+ string output = sb.ToString();
+ if (output != expected)
+ {
+ result = false;
+ TestFramework.LogError("001", "Error in " + id + ", unexpected insert result. Actual string " + output + ", Expected: " + expected);
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("002", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ return result;
+ }
+
+ public bool PositiveTest2(int index, char[] chars, string expected, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Insert");
+ try
+ {
+ StringBuilder sb = new StringBuilder("Test");
+ sb.Insert(index, chars);
+ string output = sb.ToString();
+ if (output != expected)
+ {
+ result = false;
+ TestFramework.LogError("001a", "Error in " + id + ", unexpected insert result. Actual string " + output + ", Expected: " + expected);
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("002a", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ return result;
+ }
+
+ //public bool PositiveTest3(int index, char chars, string expected, string id)
+ //{
+ // bool result = true;
+ // TestFramework.BeginScenario(id + ": Insert");
+ // try
+ // {
+ // StringBuilder sb = new StringBuilder("Test");
+ // sb.Insert(index, chars);
+ // string output = sb.ToString();
+ // if (output != expected)
+ // {
+ // result = false;
+ // TestFramework.LogError("001b", "Error in " + id + ", unexpected insert result. Actual string " + output + ", Expected: " + expected);
+ // }
+ // }
+ // catch (Exception exc)
+ // {
+ // result = false;
+ // TestFramework.LogError("002b", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ // }
+ // return result;
+ //}
+
+ public bool NegativeTest(int index, char[] chars, int startIndex, int count, Type expected, string id)
+ {
+ bool result = true;
+ TestFramework.BeginScenario(id + ": Insert");
+ try
+ {
+ StringBuilder sb = new StringBuilder("Test");
+
+ sb.Insert(index, chars, startIndex, count);
+ string output = sb.ToString();
+ result = false;
+ TestFramework.LogError("003", "Error in " + id + ", Expected exception not thrown. No exception. Actual string " + output + ", Expected: " + expected.ToString());
+ }
+ catch (Exception exc)
+ {
+ if (exc.GetType() != expected)
+ {
+ result = false;
+ TestFramework.LogError("004", "Unexpected exception in " + id + ", expected type: " + expected.ToString() + ", Actual excpetion: " + exc.ToString());
+ }
+ }
+ return result;
+ }
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderinsert3.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderinsert3.cs
new file mode 100644
index 0000000000..dd300fa379
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderinsert3.cs
@@ -0,0 +1,254 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// Insert(System.Int32,System.String)
+/// </summary>
+public class StringBuilderInsert3
+{
+ #region Private Fields
+ private const int c_LENGTH_OF_STRING = 256;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string randString = null;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call insert on empty string builder instance");
+
+ try
+ {
+ randString = TestLibrary.Generator.GetString(-55, false, c_LENGTH_OF_STRING, c_LENGTH_OF_STRING);
+
+ StringBuilder builder = new StringBuilder();
+ StringBuilder newBuilder = builder.Insert(0, randString);
+
+ string actualString = newBuilder.ToString();
+ if (!randString.Equals(actualString))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling insert on empty string builder instance returns wrong string builder instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] randString = " + randString + ", actualString = " + actualString);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] randString = " + randString);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string randString = null;
+ int randIndex = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call insert on a non empty string builder instance");
+
+ try
+ {
+ randString = TestLibrary.Generator.GetString(-55, false, c_LENGTH_OF_STRING, c_LENGTH_OF_STRING);
+ randIndex = TestLibrary.Generator.GetByte(-55);
+
+ StringBuilder builder = new StringBuilder(randString);
+ StringBuilder newBuilder = builder.Insert(randIndex, randString);
+
+ string actualString = newBuilder.ToString();
+ char[] characters = new char[randString.Length + randString.Length];
+ int index = 0;
+ for (int i = 0; i < randIndex; ++i)
+ {
+ characters[index++] = randString[i];
+ }
+ for (int i = 0; i < randString.Length; ++i)
+ {
+ characters[index++] = randString[i];
+ }
+ for (int i = randIndex; i < randString.Length; ++i)
+ {
+ characters[index++] = randString[i];
+ }
+ string desiredString = new string(characters);
+
+ if (!desiredString.Equals(actualString))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling insert on a non empty string builder instance returns wrong string builder instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] randString = " + randString + ", actualString = " + actualString + ", desiredString = " + desiredString + ", randIndex = " + randIndex);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] randString = " + randString + ", randIndex = " + randIndex);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call insert on empty string builder instance with value is null reference");
+
+ try
+ {
+ StringBuilder builder = new StringBuilder();
+ StringBuilder newBuilder = builder.Insert(0, null as string);
+
+ string actualString = newBuilder.ToString();
+ if (!actualString.Equals(String.Empty))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Calling insert on empty string builder instance with value is null reference returns wrong string builder instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] actualString = " + actualString);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call insert on empty string builder instance with value is String.Empty");
+
+ try
+ {
+ StringBuilder builder = new StringBuilder();
+ StringBuilder newBuilder = builder.Insert(0, String.Empty);
+
+ string actualString = newBuilder.ToString();
+ if (!actualString.Equals(String.Empty))
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Calling insert on empty string builder instance with value is String.Empty returns wrong string builder instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] actualString = " + actualString);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentOutOfRangeException should be thrown when index is less than zero");
+
+ try
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.Insert(-1, String.Empty);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentOutOfRangeException is not thrown when index is less than zero");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentOutOfRangeException should be thrown when index is greater than the current length of this instance.");
+
+ try
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.Insert(1, String.Empty);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentOutOfRangeException is not thrown when index is greater than the current length of this instance.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StringBuilderInsert3 test = new StringBuilderInsert3();
+
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderInsert3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderinsert4.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderinsert4.cs
new file mode 100644
index 0000000000..16edd8cbec
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderinsert4.cs
@@ -0,0 +1,356 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// Insert(System.Int32,System.String,System.Int32)
+/// </summary>
+public class StringBuilderInsert4
+{
+ #region Private Fields
+ private const int c_LENGTH_OF_STRING = 256;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string randString = null;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call insert on an empty string builder instance");
+
+ try
+ {
+ randString = TestLibrary.Generator.GetString(-55, false, c_LENGTH_OF_STRING, c_LENGTH_OF_STRING);
+ StringBuilder builder = new StringBuilder();
+ StringBuilder newBuilder = builder.Insert(0, randString, 1);
+
+ string actualString = newBuilder.ToString();
+ if (!actualString.Equals(randString))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling insert on an empty string builder instance returns wrong string builder instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] randString = " + randString + ", actualString = " + actualString);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] randString = " + randString);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string randString = null;
+ int randIndex = 0;
+ int randCount = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call insert on a non empty string builder instance");
+
+ try
+ {
+ randString = TestLibrary.Generator.GetString(-55, false, c_LENGTH_OF_STRING, c_LENGTH_OF_STRING);
+ randIndex = TestLibrary.Generator.GetByte(-55);
+ randCount = TestLibrary.Generator.GetByte(-55);
+
+ StringBuilder builder = new StringBuilder(randString);
+ StringBuilder newBuilder = builder.Insert(randIndex, randString, randCount);
+ char[] characters = new char[randString.Length + randCount * randString.Length];
+ int index = 0;
+ for (int i = 0; i < randIndex; ++i)
+ {
+ characters[index++] = randString[i];
+ }
+ for (int c = 0; c < randCount; ++c)
+ {
+ for (int i = 0; i < randString.Length; ++i)
+ {
+ characters[index++] = randString[i];
+ }
+ }
+ for (int i = randIndex; i < randString.Length; ++i)
+ {
+ characters[index++] = randString[i];
+ }
+
+ string desiredString = new string(characters);
+ string actualString = newBuilder.ToString();
+ if (!desiredString.Equals(actualString))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling insert on a non empty string builder instance returns wrong string builder instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] randString = " + randString + ", actualString = " + actualString + ", desiredString = " + desiredString + ", randIndex = " + randIndex + ", randCount = " + randCount);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] randString = " + randString + ", randIndex = " + randIndex + ", randCount = " + randCount);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string randString = null;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call insert on an empty string builder instance and with count is 0");
+
+ try
+ {
+ randString = TestLibrary.Generator.GetString(-55, false, c_LENGTH_OF_STRING, c_LENGTH_OF_STRING);
+ StringBuilder builder = new StringBuilder();
+ StringBuilder newBuilder = builder.Insert(0, randString, 0);
+
+ string actualString = newBuilder.ToString();
+ if (!actualString.Equals(String.Empty))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Calling insert on an empty string builder instance and with count is 0 returns wrong string builder instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] randString = " + randString + ", actualString = " + actualString);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] randString = " + randString);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call insert on an empty string builder instance and with value is null reference");
+
+ try
+ {
+ StringBuilder builder = new StringBuilder();
+ StringBuilder newBuilder = builder.Insert(0, null, 1);
+
+ string actualString = newBuilder.ToString();
+ if (!actualString.Equals(String.Empty))
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Calling insert on an empty string builder instance and with value is null reference returns wrong string builder instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] actualString = " + actualString);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Call insert on an empty string builder instance and with value is String.Empty");
+
+ try
+ {
+ StringBuilder builder = new StringBuilder();
+ StringBuilder newBuilder = builder.Insert(0, String.Empty, 1);
+
+ string actualString = newBuilder.ToString();
+ if (!actualString.Equals(String.Empty))
+ {
+ TestLibrary.TestFramework.LogError("005.1", "Calling insert on an empty string builder instance and with value is String.Empty returns wrong string builder instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] actualString = " + actualString);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentOutOfRangeException should be thrown when index is less than zero");
+
+ try
+ {
+ string randString = TestLibrary.Generator.GetString(-55, false, c_LENGTH_OF_STRING, c_LENGTH_OF_STRING);
+ StringBuilder builder = new StringBuilder();
+
+ builder.Insert(-1, randString, 1);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentOutOfRangeException is not thrown when index is less than zero");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentOutOfRangeException should be thrown when index is greater than the current length of this instance");
+
+ try
+ {
+ string randString = TestLibrary.Generator.GetString(-55, false, c_LENGTH_OF_STRING, c_LENGTH_OF_STRING);
+ StringBuilder builder = new StringBuilder();
+
+ builder.Insert(1, randString, 1);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentOutOfRangeException is not thrown when index is greater than the current length of this instance");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentOutOfRangeException should be thrown when count is less than zero. ");
+
+ try
+ {
+ string randString = TestLibrary.Generator.GetString(-55, false, c_LENGTH_OF_STRING, c_LENGTH_OF_STRING);
+ StringBuilder builder = new StringBuilder();
+
+ builder.Insert(0, randString, -1);
+
+ TestLibrary.TestFramework.LogError("103.1", "ArgumentOutOfRangeException is not thrown when count is less than zero. ");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: OutOfMemoryException should be thrown when The current length of this StringBuilder object plus the length of value times count exceeds MaxCapacity.");
+
+ try
+ {
+ string randString = TestLibrary.Generator.GetString(-55, false, c_LENGTH_OF_STRING, c_LENGTH_OF_STRING);
+ StringBuilder builder = new StringBuilder();
+
+ builder.Insert(0, randString, Int32.MaxValue);
+
+ TestLibrary.TestFramework.LogError("104.1", "OutOfMemoryException is not thrown when The current length of this StringBuilder object plus the length of value times count exceeds MaxCapacity.");
+ retVal = false;
+ }
+ catch (OutOfMemoryException) // StringBuilder new implementation is now throwing OutOfMemoryException
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ StringBuilderInsert4 test = new StringBuilderInsert4();
+
+ TestLibrary.TestFramework.BeginTestCase("StringBuilderInsert4");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderlength.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderlength.cs
new file mode 100644
index 0000000000..10ef160dc3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderlength.cs
@@ -0,0 +1,251 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+using TestLibrary;
+using System.Globalization;
+
+class StringBuilderLength
+{
+ static int Main()
+ {
+ StringBuilderLength test = new StringBuilderLength();
+
+ TestFramework.BeginTestCase("StringBuilder.Length");
+
+ if (test.RunTests())
+ {
+ TestFramework.EndTestCase();
+ TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestFramework.EndTestCase();
+ TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool ret = true;
+
+ // Positive Tests
+ ret &= Test1();
+ ret &= Test2();
+ ret &= Test3();
+ ret &= Test4();
+ ret &= Test5();
+
+ // Negative Tests
+ ret &= Test6();
+ ret &= Test7();
+
+ return ret;
+ }
+
+ public bool Test1()
+ {
+ string id = "Scenario1";
+ bool result = true;
+ TestFramework.BeginScenario("Scenario 1: Setting Length to 0");
+ try
+ {
+ StringBuilder sb = new StringBuilder("Test");
+ sb.Length = 0;
+ string output = sb.ToString();
+ int length = sb.Length;
+ if (output != string.Empty)
+ {
+ result = false;
+ TestFramework.LogError("001", "Error in " + id + ", unexpected string. Actual string " + output + ", Expected: " + string.Empty);
+ }
+ if (length != 0)
+ {
+ result = false;
+ TestFramework.LogError("002", "Error in " + id + ", unexpected legnth. Actual length " + length + ", Expected: 0");
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("003", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ return result;
+ }
+
+ public bool Test2()
+ {
+ string id = "Scenario2";
+ bool result = true;
+ TestFramework.BeginScenario("Scenario 2: Setting Length to current length");
+ try
+ {
+ StringBuilder sb = new StringBuilder("Test");
+ sb.Length = 4;
+ string output = sb.ToString();
+ int length = sb.Length;
+ if (output != "Test")
+ {
+ result = false;
+ TestFramework.LogError("004", "Error in " + id + ", unexpected string. Actual string " + output + ", Expected: Test");
+ }
+ if (length != 4)
+ {
+ result = false;
+ TestFramework.LogError("005", "Error in " + id + ", unexpected legnth. Actual length " + length + ", Expected: 4");
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("006", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ return result;
+ }
+
+ public bool Test3()
+ {
+ string id = "Scenario3";
+ bool result = true;
+ TestFramework.BeginScenario("Scenario 3: Setting Length to > length < capacity");
+ try
+ {
+ StringBuilder sb = new StringBuilder("Test", 10);
+ sb.Length = 8;
+ string output = sb.ToString();
+ int length = sb.Length;
+ if (output != "Test\0\0\0\0")
+ {
+ result = false;
+ TestFramework.LogError("007", "Error in " + id + ", unexpected string. Actual string " + output + ", Expected: Test\0\0\0\0");
+ }
+ if (length != 8)
+ {
+ result = false;
+ TestFramework.LogError("008", "Error in " + id + ", unexpected legnth. Actual length " + length + ", Expected: 8");
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("009", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ return result;
+ }
+
+ public bool Test4()
+ {
+ string id = "Scenario4";
+ bool result = true;
+ TestFramework.BeginScenario("Scenario 4: Setting Length to > capacity");
+ try
+ {
+ StringBuilder sb = new StringBuilder("Test", 10);
+ sb.Length = 12;
+ string output = sb.ToString();
+ int length = sb.Length;
+ if (output != "Test\0\0\0\0\0\0\0\0")
+ {
+ result = false;
+ TestFramework.LogError("010", "Error in " + id + ", unexpected string. Actual string " + output + ", Expected: Test\0\0\0\0\0\0\0\0");
+ }
+ if (length != 12)
+ {
+ result = false;
+ TestFramework.LogError("011", "Error in " + id + ", unexpected legnth. Actual length " + length + ", Expected: 12");
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("012", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ return result;
+ }
+
+ public bool Test5()
+ {
+ string id = "Scenario5";
+ bool result = true;
+ TestFramework.BeginScenario("Scenario 5: Setting Length to something very large");
+ try
+ {
+ StringBuilder sb = new StringBuilder("Test");
+ sb.Length = 10004;
+ string output = sb.ToString();
+ int length = sb.Length;
+ if (output != ("Test" + new string('\0',10000)))
+ {
+ result = false;
+ TestFramework.LogError("013", "Error in " + id + ", unexpected string. Actual string " + output + ", Expected: Test");
+ }
+ if (length != 10004)
+ {
+ result = false;
+ TestFramework.LogError("014", "Error in " + id + ", unexpected legnth. Actual length " + length + ", Expected: 10004");
+ }
+ }
+ catch (Exception exc)
+ {
+ result = false;
+ TestFramework.LogError("015", "Unexpected exception in " + id + ", excpetion: " + exc.ToString());
+ }
+ return result;
+ }
+
+ public bool Test6()
+ {
+ string id = "Scenario6";
+ bool result = true;
+ TestFramework.BeginScenario("Scenario 6: Setting Length to > max capacity");
+ try
+ {
+ StringBuilder sb = new StringBuilder(4, 10);
+ sb.Append("Test");
+
+ sb.Length = 12;
+ string output = sb.ToString();
+ result = false;
+ TestFramework.LogError("016", "Error in " + id + ", Expected exception not thrown. No exception. Actual string " + output + ", Expected: " + typeof(ArgumentOutOfRangeException).ToString());
+ }
+ catch (Exception exc)
+ {
+ if (exc.GetType() != typeof(ArgumentOutOfRangeException))
+ {
+ result = false;
+ TestFramework.LogError("017", "Unexpected exception in " + id + ", expected type: " + typeof(ArgumentOutOfRangeException).ToString() + ", Actual excpetion: " + exc.ToString());
+ }
+ }
+ return result;
+ }
+
+ public bool Test7()
+ {
+ string id = "Scenario7";
+ bool result = true;
+ TestFramework.BeginScenario("Scenario 7: Setting Length to < 0 capacity");
+ try
+ {
+ StringBuilder sb = new StringBuilder(4, 10);
+ sb.Append("Test");
+
+ sb.Length = -1;
+ string output = sb.ToString();
+ result = false;
+ TestFramework.LogError("018", "Error in " + id + ", Expected exception not thrown. No exception. Actual string " + output + ", Expected: " + typeof(ArgumentOutOfRangeException).ToString());
+ }
+ catch (Exception exc)
+ {
+ if (exc.GetType() != typeof(ArgumentOutOfRangeException))
+ {
+ result = false;
+ TestFramework.LogError("018", "Unexpected exception in " + id + ", expected type: " + typeof(ArgumentOutOfRangeException).ToString() + ", Actual excpetion: " + exc.ToString());
+ }
+ }
+ return result;
+ }
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderlength_cti.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderlength_cti.cs
new file mode 100644
index 0000000000..8f5b249f40
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderlength_cti.cs
@@ -0,0 +1,206 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// StringBuilder.Length Property
+/// Gets or sets the length of this instance.
+/// </summary>
+public class StringBuilderLength
+{
+ private const int c_MIN_STR_LEN = 1;
+ private const int c_MAX_STR_LEN = 260;
+
+ private const int c_MAX_CAPACITY = Int16.MaxValue;
+
+ public static int Main()
+ {
+ StringBuilderLength testObj = new StringBuilderLength();
+
+ TestLibrary.TestFramework.BeginTestCase("for property: StringBuilder.Length");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Get the Length property";
+ string errorDesc;
+
+ StringBuilder sb;
+ int actualLength, expectedLength;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ sb = new StringBuilder(str);
+
+ expectedLength = str.Length;
+ actualLength = sb.Length;
+
+ if (actualLength != expectedLength)
+ {
+ errorDesc = "Length of current StringBuilder " + sb + " is not the value ";
+ errorDesc += string.Format("{0} as expected: actual({1})", expectedLength, actualLength);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: Set the Length property";
+ string errorDesc;
+
+ StringBuilder sb;
+ int actualLength, expectedLength;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ sb = new StringBuilder(str);
+
+ expectedLength = TestLibrary.Generator.GetInt32(-55) % c_MAX_STR_LEN + 1;
+ sb.Length = expectedLength;
+ actualLength = sb.Length;
+
+ if (actualLength != expectedLength)
+ {
+ errorDesc = "Length of current StringBuilder " + sb + " is not the value ";
+ errorDesc += string.Format("{0} as expected: actual({1})", expectedLength, actualLength);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //ArgumentOutOfRangeException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: The value specified for a set operation is less than zero.";
+ string errorDesc;
+
+ StringBuilder sb;
+ int length;
+
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ sb = new StringBuilder(str);
+ length = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ sb.Length = length;
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected.";
+ errorDesc += string.Format("\nLength specified is {0}", length);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nLength specified is {0}", length);
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: The value specified for a set operation is greater than MaxCapacity.";
+ string errorDesc;
+
+ StringBuilder sb;
+ int length;
+
+ sb = new StringBuilder(0, c_MAX_CAPACITY);
+
+ length = c_MAX_CAPACITY + 1 +
+ TestLibrary.Generator.GetInt32(-55) % (int.MaxValue - c_MAX_CAPACITY);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ sb.Length = length;
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected.";
+ errorDesc += string.Format("\nLength specified is {0}", length);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nLength specified is {0}", length);
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderremove.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderremove.cs
new file mode 100644
index 0000000000..24348dd6f4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderremove.cs
@@ -0,0 +1,340 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Text.StringBuilder.Remove
+/// </summary>
+public class StringBuilderRemove
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ public static int Main()
+ {
+ StringBuilderRemove test = new StringBuilderRemove();
+
+ TestLibrary.TestFramework.BeginTestCase("for Method:System.Text.StringBuilder.Remove(indexStart,length)");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ string oldString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ int startIndex = TestLibrary.Generator.GetInt32(-55) % Math.Max(1,oldString.Length);
+ int removedLength = TestLibrary.Generator.GetInt32(-55) % Math.Max(1,(oldString.Length-startIndex-1));
+ string newString = oldString.Remove(startIndex, removedLength);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Remove subString form a StringBuilder ...");
+
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(oldString);
+ System.Text.StringBuilder removedStringBuilder = new System.Text.StringBuilder(newString);
+
+ try
+ {
+
+ stringBuilder.Remove(startIndex,removedLength);
+
+ int compareResult = string.CompareOrdinal(stringBuilder.ToString(), removedStringBuilder.ToString());
+
+ if (compareResult != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "StringBuilder can't corrently remove");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Verify StringBuilder Remove itself ");
+
+ string oldString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ int startIndex = 0;
+ int removedLength = oldString.Length;
+
+ try
+ {
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(oldString);
+ stringBuilder.Remove(startIndex, removedLength);
+ if (stringBuilder.Length != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "StringBuilder can't corrently remove itself");
+ retVal = false;
+ }
+ }
+ catch(Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ string oldString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ int startIndex = 0;
+ int removedLength = TestLibrary.Generator.GetInt32(-55) % (oldString.Length - startIndex);
+ string newString = oldString.Remove(startIndex, removedLength);
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify StringBuilder Remove form posization of 0 index ...");
+
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(oldString);
+ System.Text.StringBuilder removedStringBuilder = new System.Text.StringBuilder(newString);
+
+ try
+ {
+
+ stringBuilder.Remove(startIndex, removedLength);
+
+ int compareResult = string.CompareOrdinal(stringBuilder.ToString(), removedStringBuilder.ToString());
+
+ if (compareResult != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "StringBuilder can't corrently remove from posization of 0 index");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string oldString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ int startIndex = TestLibrary.Generator.GetInt32(-55) % oldString.Length;
+ int removedLength = 0;
+ string newString = oldString.Remove(startIndex, removedLength);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify StringBuilder Remove 0 length ...");
+
+ try
+ {
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(oldString);
+ System.Text.StringBuilder removedStringBuilder = new System.Text.StringBuilder(newString);
+ stringBuilder.Remove(startIndex, removedLength);
+
+ if (stringBuilder.ToString() != removedStringBuilder.ToString())
+ {
+ TestLibrary.TestFramework.LogError("007", "StringBuilder can't corrently Remove 0 length");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: StingBuilder length is 0 and length of removed larger than 0";
+ const string c_TEST_ID = "N001";
+
+
+
+ string oldString = TestLibrary.Generator.GetString(-55, false, 0, 0);
+ int startIndex = 0;
+ int removedLength = 0;
+
+ while (removedLength == 0)
+ {
+ removedLength = TestLibrary.Generator.GetInt32(-55);
+ }
+
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(oldString);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ stringBuilder.Remove(startIndex, removedLength);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected." );
+ retVal = false;
+ }
+ catch (ArgumentException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: StingBuilder length is 0 and started index larger than 0";
+ const string c_TEST_ID = "N002";
+
+
+ int startIndex = 0;
+ int removedLength = 0;
+ while (startIndex == 0)
+ {
+ startIndex = TestLibrary.Generator.GetInt32(-55);
+ }
+ string oldString = TestLibrary.Generator.GetString(-55, false, 0, 0);
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(oldString);
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ stringBuilder.Remove(startIndex, removedLength);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected.");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest3: length of Removed is larger than length of StringBuilder ";
+ const string c_TEST_ID = "N003";
+
+
+ string oldString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ int startIndex = TestLibrary.Generator.GetInt32(-55);
+ int removedLength = TestLibrary.Generator.GetInt32(-55);
+
+
+ while (startIndex <= oldString.Length )
+ {
+ startIndex = TestLibrary.Generator.GetInt32(-55);
+ }
+
+
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(oldString);
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ stringBuilder.Remove(startIndex, removedLength);
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected.");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest4: Sum of length of Removed and index of started is larger than length of StringBuilder ";
+ const string c_TEST_ID = "N004";
+
+
+ string oldString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ int removedLength = TestLibrary.Generator.GetInt32(-55);
+ int startIndex = TestLibrary.Generator.GetInt32(-55) % (oldString.Length-removedLength);
+
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(oldString);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ stringBuilder.Remove(startIndex, removedLength);
+ TestLibrary.TestFramework.LogError("015" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderreplace1.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderreplace1.cs
new file mode 100644
index 0000000000..94c914b46e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderreplace1.cs
@@ -0,0 +1,200 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Text.StringBuilder.Replace(char,char)
+/// </summary>
+public class StringBuilderReplace1
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ public static int Main()
+ {
+ StringBuilderReplace1 test = new StringBuilderReplace1();
+
+ TestLibrary.TestFramework.BeginTestCase("for Method:System.Text.StringBuilder.Replace(char1,char2)");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Verify StringBuilder Replace char of random ");
+
+ string oldString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder();
+ stringBuilder.Append(oldString);
+
+ char oldChar = TestLibrary.Generator.GetChar(-55);
+ char newChar = TestLibrary.Generator.GetChar(-55);
+
+ while (0 == oldChar.CompareTo(newChar))
+ {
+ newChar = TestLibrary.Generator.GetChar(-55);
+ }
+
+ int indexChar = oldString.IndexOf(oldChar);
+
+ string replacedSrc = oldString.Replace(oldChar, newChar);
+
+ try
+ {
+ if (-1 != indexChar)
+ {
+ stringBuilder.Replace(oldChar, newChar);
+ if (0 != string.CompareOrdinal(stringBuilder.ToString(),replacedSrc))
+ {
+ TestLibrary.TestFramework.LogError("001", "StringBuilder\"" + oldString + "\" can't corrently Replace \"" + oldChar.ToString() + "\" to \"" + newChar + "\" ");
+ retVal = false;
+ }
+ }
+ else
+ {
+ stringBuilder.Replace(oldChar, newChar);
+ if (-1 != stringBuilder.ToString().IndexOf(oldChar))
+ {
+ TestLibrary.TestFramework.LogError("001", "StringBuilder\"" + oldString + "\" can't corrently Replace \"" + oldChar.ToString() + "\" to \"" + newChar + "\" ");
+ retVal = false;
+ }
+ }
+ }
+ catch(Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Verify StringBuilder Replace char that StringBuilder includes ");
+
+ string oldString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(oldString);
+ int startIndex = TestLibrary.Generator.GetInt32(-55) % (oldString.Length-1);
+ char oldChar = oldString[TestLibrary.Generator.GetInt32(-55) % oldString.Length];
+ char newChar = TestLibrary.Generator.GetChar(-55);
+
+ while (0 == oldChar.CompareTo(newChar))
+ {
+ newChar = TestLibrary.Generator.GetChar(-55);
+ }
+
+
+ string replaceSrc = oldString.Replace(oldChar, newChar);
+
+ try
+ {
+
+ stringBuilder.Replace(oldChar, newChar);
+ if (0 != string.CompareOrdinal(stringBuilder.ToString(), replaceSrc))
+ {
+ TestLibrary.TestFramework.LogError("003", "StringBuilder\"" + oldString + "\" can't corrently Replace \"" + oldChar.ToString() + "\" to \"" + newChar + "\" ");
+ retVal = false;
+ }
+ }
+ catch(Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Verify StringBuilder of Empty Replace char of random ");
+
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(string.Empty);
+ char oldChar = TestLibrary.Generator.GetChar(-55);
+ char newChar = TestLibrary.Generator.GetChar(-55);
+
+ while (0 == oldChar.CompareTo(newChar))
+ {
+ newChar = TestLibrary.Generator.GetChar(-55);
+ }
+
+ try
+ {
+ stringBuilder.Replace(oldChar, newChar);
+ if (stringBuilder.ToString() != string.Empty)
+ {
+ TestLibrary.TestFramework.LogError("005", "StringBuilder of empty can't corrently Replace \"" + oldChar.ToString() + "\" to \"" + newChar + "\" ");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+
+ }
+ #endregion
+
+ private string GetDataString(string strSrc, string oldStr, string newStr)
+ {
+ string str1, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str = string.Format("\n[Source string value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source string]\n {0}", len1);
+ str += string.Format("\n[Old string]\n{0}", oldStr);
+ str += string.Format("\n[New string]\n{0}", newStr);
+
+ return str;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderreplace2.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderreplace2.cs
new file mode 100644
index 0000000000..327b1bf8aa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderreplace2.cs
@@ -0,0 +1,311 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Text.StringBuilder.Replace(oldChar,newChar,startIndex,count)
+/// </summary>
+class StringBuilderReplace2
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ public static int Main()
+ {
+ StringBuilderReplace2 test = new StringBuilderReplace2();
+
+ TestLibrary.TestFramework.BeginTestCase("for Method:System.Text.StringBuilder.Replace(oldChar,newChar,indexStart,count)");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = posTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarios
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Old char does not exist in source StringBuilder, random new char. ";
+ const string c_TEST_ID = "P001";
+
+ char oldChar = TestLibrary.Generator.GetChar(-55);
+ int length = c_MIN_STRING_LEN+TestLibrary.Generator.GetInt32(-55) %(c_MAX_STRING_LEN-c_MIN_STRING_LEN);
+
+ int index = 0;
+ char ch;
+ string oldString = string.Empty;
+ while (index < length)
+ {
+ ch = TestLibrary.Generator.GetChar(-55);
+ if (oldChar == ch)
+ {
+ continue;
+ }
+ oldString += ch.ToString();
+ index++;
+ }
+
+ int startIndex = TestLibrary.Generator.GetInt32(-55) % oldString.Length;
+ int count = TestLibrary.Generator.GetInt32(-55) % (oldString.Length - startIndex);
+ int indexChar = oldString.IndexOf(oldChar, startIndex, count);
+ char newChar = TestLibrary.Generator.GetChar(-55);
+ while (oldString.IndexOf(newChar, startIndex, count) > -1)
+ {
+ newChar = TestLibrary.Generator.GetChar(-55);
+ }
+
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(oldString);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ stringBuilder.Replace(oldChar, newChar,startIndex,count);
+
+
+ if ((indexChar != stringBuilder.ToString().IndexOf(newChar,startIndex,count)) || (-1 != stringBuilder.ToString().IndexOf(oldChar,startIndex,count)))
+ {
+ TestLibrary.TestFramework.LogError("001", "StringBuilder\"" + oldString + "\" can't corrently Replace \"" + oldChar.ToString() + "\" to \"" + newChar + "\" from index of StringBuilder :" + startIndex.ToString() + "to count " + count.ToString());
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e );
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool posTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest2: Old char exists in source StringBuilder, random new char. ";
+ const string c_TEST_ID = "P002";
+
+ string oldString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(oldString);
+
+ int startIndex = TestLibrary.Generator.GetInt32(-55) % oldString.Length;
+ int count = TestLibrary.Generator.GetInt32(-55) % (oldString.Length - startIndex);
+
+ char oldChar;
+ if (count == 0)
+ {
+ oldChar = oldString[0];
+ }
+ else
+ {
+ oldChar = oldString[startIndex + TestLibrary.Generator.GetInt32(-55) % count];
+ }
+
+ int indexChar = oldString.IndexOf(oldChar, startIndex, count);
+
+ char newChar = TestLibrary.Generator.GetChar(-55);
+ while (oldString.IndexOf(newChar, startIndex, count) > -1)
+ {
+ newChar = TestLibrary.Generator.GetChar(-55);
+ }
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ stringBuilder.Replace(oldChar, newChar, startIndex, count);
+
+
+ if ((indexChar != stringBuilder.ToString().IndexOf(newChar, startIndex, count)) || (-1 != stringBuilder.ToString().IndexOf(oldChar, startIndex, count)))
+ {
+ TestLibrary.TestFramework.LogError("003", "StringBuilder\"" + oldString + "\" can't corrently Replace \"" + oldChar.ToString() + "\" to \"" + newChar + "\" from index of StringBuilder :" + startIndex.ToString() + "to count " + count.ToString());
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e );
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest3: Verify StringBuilder Replace char that stringBuilder includes ";
+ const string c_TEST_ID = "P003";
+
+ string oldString = TestLibrary.Generator.GetString(-55, false, 0, 0);
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(oldString);
+
+ int startIndex = 0;
+ int count = 0;
+ char oldChar = TestLibrary.Generator.GetChar(-55);
+ char newChar = TestLibrary.Generator.GetChar(-55);
+ int indexChar = oldString.IndexOf(oldString, startIndex, count);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+
+ try
+ {
+
+ if (-1 != stringBuilder.ToString().IndexOf(newChar, startIndex, count))
+ {
+ TestLibrary.TestFramework.LogError("005", "StringBuilder\"" + oldString + "\" can't corrently Replace \"" + oldChar.ToString() + "\" to \"" + newChar + "\" from index of StringBuilder :" + startIndex.ToString() + "to count " + count.ToString());
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e );
+ retVal = false;
+ }
+
+ return retVal;
+
+ }
+ #endregion
+
+ #region NegitiveTesting
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: Start index is larger than source StringBuilder's length";
+ const string c_TEST_ID = "N001";
+
+ string strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ char oldChar = TestLibrary.Generator.GetChar(-55);
+ char newChar = TestLibrary.Generator.GetChar(-55);
+ int startIndex = strSrc.Length +TestLibrary.Generator.GetInt32(-55) % (Int32.MaxValue - strSrc.Length);
+ int count = TestLibrary.Generator.GetInt32(-55);
+
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(strSrc);
+
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ stringBuilder.Replace(oldChar, newChar, startIndex, count);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected." + GetDataString(strSrc, startIndex,count,oldChar,newChar));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex,count,oldChar,newChar));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: Replace count is larger than source StringBuilder's length";
+ const string c_TEST_ID = "N002";
+
+ string strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ char oldChar = TestLibrary.Generator.GetChar(-55);
+ char newChar = TestLibrary.Generator.GetChar(-55);
+ int startIndex = TestLibrary.Generator.GetInt32(-55) % strSrc.Length;
+ int count = strSrc.Length - startIndex + TestLibrary.Generator.GetInt32(-55);
+
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(strSrc);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ stringBuilder.Replace(oldChar, newChar, startIndex, count);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected." + GetDataString(strSrc, startIndex,count,oldChar,newChar));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, startIndex,count,oldChar,newChar));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Helper methords for testing
+
+ private string GetDataString(string strSrc, int startIndex, int count,char oldChar,char newChar)
+ {
+ string str1, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str = string.Format("\n[Source StingBulider value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source StringBuilder]\n {0}", len1);
+ str += string.Format("\n[Start index ]\n{0}", startIndex);
+ str += string.Format("\n[Replace count]\n{0}", count);
+ str += string.Format("\n[Old char]\n{0}", oldChar);
+ str += string.Format("\n[New char]\n{0}", newChar);
+
+ return str;
+ }
+ #endregion
+
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderreplace3.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderreplace3.cs
new file mode 100644
index 0000000000..a2125eed2b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderreplace3.cs
@@ -0,0 +1,275 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Text.StringBuilder.Replace(oldChar,newChar,startIndex,count)
+/// </summary>
+class StringBuilderReplace3
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ public static int Main()
+ {
+ StringBuilderReplace3 test = new StringBuilderReplace3();
+
+ TestLibrary.TestFramework.BeginTestCase("for Method:System.Text.StringBuilder.Replace(String,String)");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive test scenarios
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Old string does not exist in source StringBuilder, random new string. ";
+ const string c_TEST_ID = "P001";
+
+ string strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(strSrc);
+
+ string newString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ string oldString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ while(-1 < strSrc.IndexOf(oldString))
+ {
+ oldString = TestLibrary.Generator.GetString(-55, false,c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ }
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ System.Text.StringBuilder newSB = new System.Text.StringBuilder(strSrc.Replace(oldString, newString));
+
+
+ try
+ {
+ stringBuilder = stringBuilder.Replace(oldString, newString);
+
+ if (0 != string.Compare(newSB.ToString(), stringBuilder.ToString()))
+ {
+ string errorDesc = "Value is not " + newSB.ToString() + " as expected: Actual(" + stringBuilder.ToString() + ")";
+ errorDesc += GetDataString(strSrc, oldString, newString);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID,errorDesc);
+ retVal = false;
+ }
+ }
+ catch(Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, oldString, newString));
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "PosTest1: Old string exist in source StringBuilder, random new string. ";
+ const string c_TEST_ID = "P002";
+
+ string strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(strSrc);
+
+ string newString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ // 0 <= startIndex < strSrc.Length ( == startIndex is a valid index into strSrc)
+ int startIndex = TestLibrary.Generator.GetInt32(-55) % strSrc.Length;
+
+ // we require that: substrSize >= 1
+ // substrSize + startIndex <= strSrc.Length
+ // which is implied by 1 <= substrSize <= strSrc.Length-startIndex
+ // now for any Int32 k, 0 <= k % strSrc.Length-startIndex <= (strSrcLength-startIndex)-1
+ // and so 1 <= 1 + (k % strSrc.Length-startIndex) <= strSrcLength-startIndex
+ // so generate k randomly and let substrSize := 1 + (k % strSrc.Length - startIndex).
+ int substrSize = (TestLibrary.Generator.GetInt32(-55) % (strSrc.Length - startIndex)) + 1;
+ string oldString = strSrc.Substring(startIndex, substrSize);
+ System.Text.StringBuilder newSB = new System.Text.StringBuilder(strSrc.Replace(oldString, newString));
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ stringBuilder = stringBuilder.Replace(oldString, newString);
+ if (0 != string.Compare(newSB.ToString(), stringBuilder.ToString()))
+ {
+ string errorDesc = "Value is not " + newSB.ToString() + " as expected: Actual(" + stringBuilder.ToString() + ")";
+ errorDesc += GetDataString(strSrc, oldString, newString);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID,errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, oldString, newString));
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+
+ const string c_TEST_DESC = "PosTest1: source StringBuilder is empty, random new string. ";
+ const string c_TEST_ID = "P003";
+
+ string strSrc = string.Empty;
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(strSrc);
+
+ string newString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ string oldString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ stringBuilder = stringBuilder.Replace(oldString, newString);
+ if (string.Empty != stringBuilder.ToString())
+ {
+ string errorDesc = "Value is not string of empty as expected: Actual(" + stringBuilder.ToString() + ")";
+ errorDesc += GetDataString(strSrc, oldString, newString);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID+errorDesc,errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, oldString, newString));
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative test scenarios
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: old string value is null reference.";
+ const string c_TEST_ID = "N001";
+
+ string strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ string oldStr = null;
+ string newStr = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(strSrc);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ stringBuilder.Replace(oldStr, newStr);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, "ArgumentNullException is not thrown as expected." + GetDataString(strSrc, oldStr, newStr));
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, oldStr, newStr));
+ retVal = false;
+ }
+
+ return retVal;
+
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: old string value is string of empty.";
+ const string c_TEST_ID = "N002";
+
+ string strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ string oldStr = string.Empty;
+ string newStr = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(strSrc);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ stringBuilder.Replace(oldStr, newStr);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, "ArgumentNullException is not thrown as expected." + GetDataString(strSrc, oldStr, newStr));
+ retVal = false;
+ }
+ catch (ArgumentException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, oldStr, newStr));
+ retVal = false;
+ }
+
+ return retVal;
+
+ }
+
+
+
+ #endregion
+
+ private string GetDataString(string strSrc, string oldStr, string newStr)
+ {
+ string str1, str;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ str = "\n [Source string value] \n \" " + str1 + " \n \" [Length of source string] \n " + len1.ToString()
+ + "\n[Old string]\n \" " + oldStr + "\" \n[New string]\n \"" + newStr + "\"";
+
+
+ return str;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderreplace4.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderreplace4.cs
new file mode 100644
index 0000000000..19853462be
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuilderreplace4.cs
@@ -0,0 +1,433 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Text.StringBuilder.Replace(oldString,newString,startIndex,count)
+/// </summary>
+class StringBuilderReplace4
+{
+ private const int c_MIN_STRING_LEN = 8;
+ private const int c_MAX_STRING_LEN = 256;
+
+ private const int c_MAX_SHORT_STR_LEN = 31;//short string (<32 chars)
+ private const int c_MIN_LONG_STR_LEN = 257;//long string ( >256 chars)
+ private const int c_MAX_LONG_STR_LEN = 65535;
+
+ public static int Main()
+ {
+ StringBuilderReplace4 test = new StringBuilderReplace4();
+
+ TestLibrary.TestFramework.BeginTestCase("for Method:System.Text.StringBuilder.Replace(oldString,newString,startIndex,count)");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest1: Old string exists in source StringBuilder, random new string. ";
+ const string c_TEST_ID = "P001";
+
+
+ string strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(strSrc);
+
+ string newString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ int subStartIndex = TestLibrary.Generator.GetInt32(-55) % strSrc.Length;
+ int subLength = TestLibrary.Generator.GetInt32(-55) % (strSrc.Length - subStartIndex);
+ while (subLength == 0)
+ {
+ subStartIndex = TestLibrary.Generator.GetInt32(-55) % strSrc.Length;
+ subLength = TestLibrary.Generator.GetInt32(-55) % (strSrc.Length - subStartIndex);
+ }
+ string oldString = strSrc.Substring(subStartIndex, subLength);
+ System.Text.StringBuilder newStringBuilder = new System.Text.StringBuilder(strSrc.Replace(oldString, newString));
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ stringBuilder.Replace(oldString, newString, 0, strSrc.Length);
+ if (stringBuilder.ToString() != newStringBuilder.ToString())
+ {
+ string errorDesc = "Value is not " + newStringBuilder.ToString() + " as expected: Actual(" + stringBuilder.ToString() + ")";
+ errorDesc += GetDataString(strSrc, oldString, newString,0,strSrc.Length);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, oldString, newString, 0, strSrc.Length));
+ retVal = false;
+ }
+
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest2: the source StringBuilder is empty. ";
+ const string c_TEST_ID = "P002";
+
+ string strSrc = string.Empty;
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(strSrc);
+
+ string newString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ string oldString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN,c_MAX_STRING_LEN);
+ System.Text.StringBuilder newStringBuilder = new System.Text.StringBuilder(strSrc.Replace(oldString, newString));
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ stringBuilder.Replace(oldString, newString, 0, strSrc.Length);
+ if (stringBuilder.ToString() != newStringBuilder.ToString())
+ {
+ string errorDesc = "Value is not " + newStringBuilder.ToString() + " as expected: Actual(" + stringBuilder.ToString() + ")";
+ errorDesc += GetDataString(strSrc, oldString, newString, 0, strSrc.Length);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, oldString, newString, 0, strSrc.Length));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest3: Old string is random, new string is randow also. ";
+ const string c_TEST_ID = "P003";
+
+ string strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(strSrc);
+
+ string newString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ string oldString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ System.Text.StringBuilder newStringBuilder = new System.Text.StringBuilder(strSrc.Replace(oldString, newString));
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ stringBuilder.Replace(oldString, newString, 0, strSrc.Length);
+ if (stringBuilder.ToString() != newStringBuilder.ToString())
+ {
+ string errorDesc = "Value is not " + newStringBuilder.ToString() + " as expected: Actual(" + stringBuilder.ToString() + ")";
+ errorDesc += GetDataString(strSrc, oldString, newString, 0, strSrc.Length);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, oldString, newString, 0, strSrc.Length));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ const string c_TEST_DESC = "PosTest4: Old string is out of range of the source StingBuilder. ";
+ const string c_TEST_ID = "P004";
+
+ string strSrc = "We always believe that the old time is good time and future time is bad time";
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(strSrc);
+
+ string newString = "thing";
+ string oldString = "time";
+ string replacedString = "We always believe that the old thing is good thing and future time is bad time";
+ System.Text.StringBuilder newStringBuilder = new System.Text.StringBuilder(replacedString);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+
+ try
+ {
+ stringBuilder.Replace(oldString, newString, 2, 47);
+ if (stringBuilder.ToString() != newStringBuilder.ToString())
+ {
+ string errorDesc = "Value is not " + newStringBuilder.ToString() + " as expected: Actual(" + stringBuilder.ToString() + ")";
+ errorDesc += GetDataString(strSrc, oldString, newString, 2, 47);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, oldString, newString, 2, 47));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region NegativeTesting
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest1: Start index is larger than source StringBuilder's length";
+ const string c_TEST_ID = "N001";
+
+ string strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(strSrc);
+
+ int startIndex = TestLibrary.Generator.GetInt32(-55) + stringBuilder.Length;
+ int count = TestLibrary.Generator.GetInt32(-55);
+ string newString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ string oldString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ stringBuilder.Replace(oldString, newString, startIndex, count);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected." + GetDataString(strSrc, oldString, newString, startIndex, count));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, oldString, newString, startIndex, count));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest2: startIndex plus count indicates a character position not within the source StringBuilder";
+ const string c_TEST_ID = "N002";
+
+ string strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(strSrc);
+
+ int startIndex = TestLibrary.Generator.GetInt32(-55) % strSrc.Length;
+ int count = TestLibrary.Generator.GetInt32(-55)+stringBuilder.Length-startIndex;
+ string newString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ string oldString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ stringBuilder.Replace(oldString, newString, startIndex, count);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected." + GetDataString(strSrc, oldString, newString, stringBuilder.Length, stringBuilder.Length));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, oldString, newString, startIndex, count));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest3: old string is a null reference ";
+ const string c_TEST_ID = "N003";
+
+ string strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(strSrc);
+
+ int startIndex = TestLibrary.Generator.GetInt32(-55) % strSrc.Length;
+ int count = stringBuilder.Length - startIndex-1;
+ string newString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ string oldString = null;
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ stringBuilder.Replace(oldString, newString, startIndex,count);
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected." + GetDataString(strSrc, oldString, newString, stringBuilder.Length, stringBuilder.Length));
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc, oldString, newString, startIndex, count));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest4: old string is empty ";
+ const string c_TEST_ID = "N004";
+
+ string strSrc = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(strSrc);
+
+ int startIndex = TestLibrary.Generator.GetInt32(-55) % strSrc.Length;
+ int count = stringBuilder.Length - startIndex - 1;
+ string newString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ string oldString = string.Empty;
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ stringBuilder.Replace(oldString, newString, startIndex, count);
+ TestLibrary.TestFramework.LogError("015" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected." + GetDataString(strSrc, oldString, newString, stringBuilder.Length, stringBuilder.Length));
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(strSrc,oldString, newString, startIndex, count));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ const string c_TEST_DESC = "NegTest5: the source StringBuilder is null reference";
+ const string c_TEST_ID = "N005";
+
+ System.Text.StringBuilder stringBuilder = null;
+
+ int startIndex = 0;
+ int count = 0;
+ string newString = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ string oldString = string.Empty;
+
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ stringBuilder.Replace(oldString, newString, startIndex, count);
+ TestLibrary.TestFramework.LogError("017" + " TestId-" + c_TEST_ID, "ArgumentOutOfRangeException is not thrown as expected." + GetDataString(null,oldString, newString, stringBuilder.Length, stringBuilder.Length));
+ retVal = false;
+ }
+ catch (NullReferenceException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018" + " TestId-" + c_TEST_ID, "Unexpected exception: " + e + GetDataString(null,oldString, newString, startIndex, count));
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methords for testing
+ private string GetDataString(string strSrc, string oldString, string newString, int startIndex, int count)
+ {
+ string str1, str,oldStr,newStr;
+ int len1;
+
+ if (null == strSrc)
+ {
+ str1 = "null";
+ len1 = 0;
+ }
+ else
+ {
+ str1 = strSrc;
+ len1 = strSrc.Length;
+ }
+
+ if (null == oldString)
+ {
+ oldStr = "null";
+ }
+ else
+ {
+ oldStr = oldString;
+ }
+
+
+ if (null == newString)
+ {
+ newStr = newString;
+ }
+ else
+ {
+ newStr = newString;
+ }
+
+ str = string.Format("\n[Source StingBulider value]\n \"{0}\"", str1);
+ str += string.Format("\n[Length of source StringBuilder]\n {0}", len1);
+ str += string.Format("\n[Start index ]\n{0}", startIndex);
+ str += string.Format("\n[Replace count]\n{0}", count);
+ str += string.Format("\n[Old string]\n{0}", oldStr);
+ str += string.Format("\n[New string]\n{0}", newStr);
+
+ return str;
+ }
+ #endregion
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuildertostring1.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuildertostring1.cs
new file mode 100644
index 0000000000..dfbf5da942
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuildertostring1.cs
@@ -0,0 +1,79 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// StringBuilder.ToString()
+/// Converts the value of this instance to a String.
+/// </summary>
+public class StringBuilderToString
+{
+ private const int c_MIN_STR_LEN = 1;
+ private const int c_MAX_STR_LEN = 260;
+
+ public static int Main()
+ {
+ StringBuilderToString testObj = new StringBuilderToString();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: StringBuilder.ToString()");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Random string ";
+ string errorDesc;
+
+ StringBuilder sb;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string expectedStr = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ sb = new StringBuilder(expectedStr);
+ string actualStr = sb.ToString();
+ if (actualStr != expectedStr || Object.ReferenceEquals(actualStr, expectedStr))
+ {
+ errorDesc = " String value of StringBuilder is not the value ";
+ errorDesc += string.Format("{0} as expected: actual({1})", expectedStr, actualStr);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuildertostring2.cs b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuildertostring2.cs
new file mode 100644
index 0000000000..798babc6e1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/stringbuilder/stringbuildertostring2.cs
@@ -0,0 +1,317 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// StringBuilder.ToString(int, int)
+/// Converts the value of a substring of this instance to a String.
+/// </summary>
+public class StringBuilderToString
+{
+ private const int c_MIN_STR_LEN = 1;
+ private const int c_MAX_STR_LEN = 260;
+
+ public static int Main()
+ {
+ StringBuilderToString testObj = new StringBuilderToString();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: StringBuilder.ToString(int, int)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Random start index and random length ";
+ string errorDesc;
+
+ StringBuilder sb;
+ int startIndex;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ sb = new StringBuilder(str);
+ startIndex = TestLibrary.Generator.GetInt32(-55) % str.Length;
+ length = TestLibrary.Generator.GetInt32(-55) % (str.Length - startIndex) + 1;
+ string expectedStr = str.Substring(startIndex, length);
+ string actualStr = sb.ToString(startIndex, length);
+
+ if (actualStr != expectedStr || Object.ReferenceEquals(actualStr, expectedStr))
+ {
+ errorDesc = "Substring value of StringBuilder is not the value ";
+ errorDesc += string.Format("{0} as expected: actual({1})", expectedStr, actualStr);
+ errorDesc += string.Format("\nStart index: {0}, length: {1} characters", startIndex, length);
+
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: Random start index and length is zero";
+ string errorDesc;
+
+ StringBuilder sb;
+ int startIndex;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ sb = new StringBuilder(str);
+ startIndex = TestLibrary.Generator.GetInt32(-55) % str.Length;
+ length = 0;
+ string expectedStr = string.Empty;
+ string actualStr = sb.ToString(startIndex, length);
+
+ if (actualStr != expectedStr)
+ {
+ errorDesc = "Substring value of StringBuilder is not the value ";
+ errorDesc += string.Format("string.Empty as expected: actual({0})", actualStr);
+ errorDesc += string.Format("\nStart index: {0}, length: {1} characters", startIndex, length);
+
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ const string c_TEST_DESC = "PosTest3: Random start index is 0 and length equals the whole string's";
+ string errorDesc;
+
+ StringBuilder sb;
+ int startIndex;
+ int length;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ sb = new StringBuilder(str);
+ startIndex = 0;
+ length = str.Length;
+ string expectedStr = str;
+ string actualStr = sb.ToString(startIndex, length);
+
+ if (actualStr != expectedStr || Object.ReferenceEquals(actualStr, expectedStr))
+ {
+ errorDesc = "Substring value of StringBuilder is not the value ";
+ errorDesc += string.Format("string.Empty as expected: actual({0})", actualStr);
+ errorDesc += string.Format("\nStart index: {0}, length: {1} characters", startIndex, length);
+
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //ArgumentOutOfRangeException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: start index is less than zero.";
+ string errorDesc;
+
+ StringBuilder sb;
+ int startIndex, length;
+
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ sb = new StringBuilder(str);
+
+ startIndex = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+ length = TestLibrary.Generator.GetInt32(-55) % (str.Length + 1);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ sb.ToString(startIndex, length);
+
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected.";
+ errorDesc += string.Format("\nString value of StringBuilder is {0}", str);
+ errorDesc += string.Format("\nStart index is {0}, length is {1}", startIndex, length);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nString value of StringBuilder is {0}", str);
+ errorDesc += string.Format("\nStart index is {0}, length is {1}", startIndex, length);
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: length is less than zero.";
+ string errorDesc;
+
+ StringBuilder sb;
+ int startIndex, length;
+
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ sb = new StringBuilder(str);
+
+ startIndex = TestLibrary.Generator.GetInt32(-55) % str.Length;
+ length = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ sb.ToString(startIndex, length);
+
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected.";
+ errorDesc += string.Format("\nString value of StringBuilder is {0}", str);
+ errorDesc += string.Format("\nStart index is {0}, length is {1}", startIndex, length);
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nString value of StringBuilder is {0}", str);
+ errorDesc += string.Format("\nStart index is {0}, length is {1}", startIndex, length);
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: The sum of startIndex and length is greater than the length of the current instance. ";
+ string errorDesc;
+
+ StringBuilder sb;
+ int startIndex, length;
+
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STR_LEN, c_MAX_STR_LEN);
+ sb = new StringBuilder(str);
+
+ startIndex = TestLibrary.Generator.GetInt32(-55);
+ if(startIndex > str.Length)
+ {
+ length = TestLibrary.Generator.GetInt32(-55);
+ }
+ else
+ {
+ length = str.Length - startIndex + 1 +
+ TestLibrary.Generator.GetInt32(-55) % (Int32.MaxValue - str.Length + startIndex);
+ }
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ sb.ToString(startIndex, length);
+
+ errorDesc = "ArgumentOutOfRangeException is not thrown as expected.";
+ errorDesc += string.Format("\nString value of StringBuilder is {0}", str);
+ errorDesc += string.Format("\nStart index is {0}, length is {1}", startIndex, length);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (ArgumentOutOfRangeException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nString value of StringBuilder is {0}", str);
+ errorDesc += string.Format("\nStart index is {0}, length is {1}", startIndex, length);
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingCtor1.csproj b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingCtor1.csproj
new file mode 100644
index 0000000000..592beb8c48
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodeencodingctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingEquals.csproj b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingEquals.csproj
new file mode 100644
index 0000000000..9ff5750b8c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingEquals.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodeencodingequals.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetByteCount1.csproj b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetByteCount1.csproj
new file mode 100644
index 0000000000..b12b1cb169
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetByteCount1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodeencodinggetbytecount1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetByteCount2.csproj b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetByteCount2.csproj
new file mode 100644
index 0000000000..227918a940
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetByteCount2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodeencodinggetbytecount2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetBytes2.csproj b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetBytes2.csproj
new file mode 100644
index 0000000000..d83d15f21f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetBytes2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodeencodinggetbytes2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetCharCount.csproj b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetCharCount.csproj
new file mode 100644
index 0000000000..ea8813b3c5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetCharCount.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodeencodinggetcharcount.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetChars.csproj b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetChars.csproj
new file mode 100644
index 0000000000..97f99916a4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetChars.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodeencodinggetchars.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetDecoder.csproj b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetDecoder.csproj
new file mode 100644
index 0000000000..451089d7cf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetDecoder.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodeencodinggetdecoder.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetEncoder.csproj b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetEncoder.csproj
new file mode 100644
index 0000000000..b54e6c476d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetEncoder.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodeencodinggetencoder.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetHashCode.csproj
new file mode 100644
index 0000000000..0074c8788f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodeencodinggethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetMaxByteCount.csproj b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetMaxByteCount.csproj
new file mode 100644
index 0000000000..33bbc9bd69
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetMaxByteCount.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodeencodinggetmaxbytecount.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetMaxCharCount.csproj b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetMaxCharCount.csproj
new file mode 100644
index 0000000000..6798d02af4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetMaxCharCount.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodeencodinggetmaxcharcount.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetPreamble.csproj b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetPreamble.csproj
new file mode 100644
index 0000000000..471c5a05ab
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetPreamble.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodeencodinggetpreamble.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetString.csproj b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetString.csproj
new file mode 100644
index 0000000000..911d008623
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/UnicodeEncodingGetString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="unicodeencodinggetstring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodingctor1.cs b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodingctor1.cs
new file mode 100644
index 0000000000..fc69327638
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodingctor1.cs
@@ -0,0 +1,72 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+///<summary>
+///System.Test.UnicodeEncoding.Ctor() [v-zuolan]
+///</summary>
+
+public class UnicodeEncodingCtor
+{
+
+ public static int Main()
+ {
+ UnicodeEncodingCtor testObj = new UnicodeEncodingCtor();
+ TestLibrary.TestFramework.BeginTestCase("for constructor of System.Test.UnicodeEncoding");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ UnicodeEncoding expectedValue = new UnicodeEncoding(false,true);
+ UnicodeEncoding actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Create a instance");
+ try
+ {
+ actualValue = new UnicodeEncoding();
+
+ if (!expectedValue.Equals(actualValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodingequals.cs b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodingequals.cs
new file mode 100644
index 0000000000..9dfd3bab85
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodingequals.cs
@@ -0,0 +1,136 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+///<summary>
+///System.Test.UnicodeEncoding.Equals(System.Object) [v-zuolan]
+///</summary>
+
+public class UnicodeEncodingEquals
+{
+
+ public static int Main()
+ {
+ UnicodeEncodingEquals testObj = new UnicodeEncodingEquals();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Test.UnicodeEncoding");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ UnicodeEncoding uEncoding1 = new UnicodeEncoding();
+ UnicodeEncoding uEncoding2 = new UnicodeEncoding(false,true);
+
+ bool expectedValue = true;
+ bool actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method with two instance that equal.");
+ try
+ {
+ actualValue = uEncoding1.Equals(uEncoding2);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ UnicodeEncoding uEncoding1 = new UnicodeEncoding();
+ UnicodeEncoding uEncoding2 = new UnicodeEncoding(false, false);
+
+ bool expectedValue = false;
+ bool actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the method with two instance that not equal.");
+ try
+ {
+ actualValue = uEncoding1.Equals(uEncoding2);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ bool expectedValue = false;
+ bool actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Compare the instances between deference type.");
+ try
+ {
+ actualValue = uEncoding.Equals(new TimeSpan());
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetbytecount1.cs b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetbytecount1.cs
new file mode 100644
index 0000000000..4bc7f40c0e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetbytecount1.cs
@@ -0,0 +1,269 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+///<summary>
+///System.Test.UnicodeEncoding.GetByteCount(System.Char[],System.Int32,System.Int32) [v-zuolan]
+///</summary>
+
+public class UnicodeEncodingGetByteCount
+{
+
+ public static int Main()
+ {
+ UnicodeEncodingGetByteCount testObj = new UnicodeEncodingGetByteCount();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Test.UnicodeEncoding");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Helper Method
+ //Create a None-Surrogate-Char Array.
+ public Char[] GetCharArray(int length)
+ {
+ if (length <= 0) return new Char[] { };
+
+ Char[] charArray = new Char[length];
+ int i = 0;
+ while (i < length)
+ {
+ Char temp = TestLibrary.Generator.GetChar(-55);
+ if (!Char.IsSurrogate(temp))
+ {
+ charArray[i] = temp;
+ i++;
+ }
+ }
+ return charArray;
+ }
+
+ //Convert Char Array to String
+ public String ToString(Char[] chars)
+ {
+ String str = "{";
+ for (int i = 0;i < chars.Length; i++)
+ {
+ str = str + @"\u" + String.Format("{0:X04}", (int)chars[i]);
+ if (i != chars.Length - 1) str = str + ",";
+ }
+ str = str + "}";
+ return str;
+ }
+ #endregion
+
+ #region Positive Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ Char[] chars = new Char[] { } ;
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ int expectedValue = 0;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method with a empty char array.");
+ try
+ {
+ actualValue = uEncoding.GetByteCount(chars,0,0);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ Char[] chars = GetCharArray(10);
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ int expectedValue = 20;
+ int actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the method with max length of the char array.");
+ try
+ {
+ actualValue = uEncoding.GetByteCount(chars, 0, chars.Length);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ") when chars is:" + ToString(chars));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e + "when chars is:" + ToString(chars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ Char[] chars = GetCharArray(1);
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ int expectedValue = 2;
+ int actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke the method with one char array.");
+ try
+ {
+ actualValue = uEncoding.GetByteCount(chars, 0, 1);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ") when chars is:" + ToString(chars));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception:" + e + "when chars is:" + ToString(chars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region Negative Test Logic
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ //Char[] chars = new Char[]{};
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Invoke the method with null");
+ try
+ {
+ actualValue = uEncoding.GetByteCount(null,0,0);
+
+ TestLibrary.TestFramework.LogError("007", "No ArgumentNullException throw out expected.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ Char[] chars = GetCharArray(10);
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2:Invoke the method with index out of range.");
+ try
+ {
+ actualValue = uEncoding.GetByteCount(chars, 10, 1);
+
+ TestLibrary.TestFramework.LogError("009", "No ArgumentOutOfRangeException throw out expected when chars is:" + ToString(chars));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception:" + e + " when chars is:" + ToString(chars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ Char[] chars = GetCharArray(10);
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3:Invoke the method with count out of range.");
+ try
+ {
+ actualValue = uEncoding.GetByteCount(chars, 5, -1);
+
+ TestLibrary.TestFramework.LogError("011", "No ArgumentOutOfRangeException throw out expected when chars is:" + ToString(chars));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception:" + e + " when chars is:" + ToString(chars));
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetbytecount2.cs b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetbytecount2.cs
new file mode 100644
index 0000000000..141a22eb78
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetbytecount2.cs
@@ -0,0 +1,210 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+///<summary>
+///System.Test.UnicodeEncoding.GetByteCount(String) [v-zuolan]
+///</summary>
+
+public class UnicodeEncodingGetByteCount
+{
+
+ public static int Main()
+ {
+ UnicodeEncodingGetByteCount testObj = new UnicodeEncodingGetByteCount();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Test.UnicodeEncoding");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Helper Method
+ //Create a None-Surrogate-Char String.
+ public String GetString(int length)
+ {
+ if (length <= 0) return "";
+
+ String tempStr = null;
+
+ int i = 0;
+ while (i < length)
+ {
+ Char temp = TestLibrary.Generator.GetChar(-55);
+ if (!Char.IsSurrogate(temp))
+ {
+ tempStr = tempStr + temp.ToString();
+ i++;
+ }
+ }
+ return tempStr;
+ }
+
+ public String ToString(String myString)
+ {
+ String str = "{";
+ Char[] chars = myString.ToCharArray();
+ for (int i = 0;i < chars.Length; i++)
+ {
+ str = str + @"\u" + String.Format("{0:X04}", (int)chars[i]);
+ if (i != chars.Length - 1) str = str + ",";
+ }
+ str = str + "}";
+ return str;
+ }
+ #endregion
+
+ #region Positive Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ int expectedValue = 0;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method with a empty String.");
+ try
+ {
+ actualValue = uEncoding.GetByteCount("");
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ String str = GetString(10);
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ int expectedValue = 20;
+ int actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the method with normal string");
+ try
+ {
+ String temp = ToString(str);
+ actualValue = uEncoding.GetByteCount(str);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ") when chars is:" + ToString(str));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e + "when chars is:" + ToString(str));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ String str = GetString(1);
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ int expectedValue = 2;
+ int actualValue;
+
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke the method with one char String.");
+ try
+ {
+ actualValue = uEncoding.GetByteCount(str);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ") when chars is:" + ToString(str));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception:" + e + "when chars is:" + ToString(str));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+ #region Negative Test Logic
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ String str = null;
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Invoke the method with null");
+ try
+ {
+ actualValue = uEncoding.GetByteCount(str);
+
+ TestLibrary.TestFramework.LogError("007", "No ArgumentNullException throw out expected.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetbytes2.cs b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetbytes2.cs
new file mode 100644
index 0000000000..f19dc8a9bb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetbytes2.cs
@@ -0,0 +1,504 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+///<summary>
+///System.Test.UnicodeEncoding.GetBytes(System.String,System.Int32,System.Int32,System.Byte[],System.Int32) [v-zuolan]
+///</summary>
+
+public class UnicodeEncodingGetBytes
+{
+
+ public static int Main()
+ {
+ UnicodeEncodingGetBytes testObj = new UnicodeEncodingGetBytes();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Test.UnicodeEncoding");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+ retVal = NegTest9() && retVal;
+ retVal = NegTest10() && retVal;
+
+ return retVal;
+ }
+
+ #region Helper Method
+ //Create a None-Surrogate-Char String.
+ public String GetString(int length)
+ {
+ if (length <= 0) return "";
+
+ String tempStr = null;
+
+ int i = 0;
+ while (i < length)
+ {
+ Char temp = TestLibrary.Generator.GetChar(-55);
+ if (!Char.IsSurrogate(temp))
+ {
+ tempStr = tempStr + temp.ToString();
+ i++;
+ }
+ }
+ return tempStr;
+ }
+
+ public String ToString(String myString)
+ {
+ String str = "{";
+ Char[] chars = myString.ToCharArray();
+ for (int i = 0; i < chars.Length; i++)
+ {
+ str = str + @"\u" + String.Format("{0:X04}", (int)chars[i]);
+ if (i != chars.Length - 1) str = str + ",";
+ }
+ str = str + "}";
+ return str;
+ }
+ #endregion
+
+ #region Positive Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ String chars = GetString(10);
+ Byte[] bytes = new Byte[30];
+
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ int expectedValue = 20;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method");
+ try
+ {
+ actualValue = uEncoding.GetBytes(chars, 0, 10, bytes, 5);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")" + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ String chars = GetString(10);
+ Byte[] bytes = new Byte[30];
+
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ int expectedValue = 2;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the method and set charCount as 1 and byteIndex as 0.");
+ try
+ {
+ actualValue = uEncoding.GetBytes(chars, 0, 1, bytes, 0);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")" + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ String chars = GetString(10);
+ Byte[] bytes = new Byte[30];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ int expectedValue = 0;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke the method and set charIndex as 20");
+ try
+ {
+ actualValue = uEncoding.GetBytes(chars, 0, 0, bytes, 30);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("025", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")" + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("026", "Unexpected exception:" + e + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negative Test Logic
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ String chars = null;
+ Byte[] bytes = new Byte[30];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Invoke the method and set chars as null");
+ try
+ {
+ actualValue = uEncoding.GetBytes(chars, 0, 0, bytes, 0);
+
+ TestLibrary.TestFramework.LogError("005", "No ArgumentNullException throw out expected.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ String chars = GetString(10);
+ Byte[] bytes = null;
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2:Invoke the method and set bytes as null");
+ try
+ {
+ actualValue = uEncoding.GetBytes(chars, 0, 0, bytes, 0);
+
+ TestLibrary.TestFramework.LogError("007", "No ArgumentNullException throw out expected" + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception:" + e + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ String chars = GetString(10);
+ Byte[] bytes = new Byte[30];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3:Invoke the method and the destination buffer is not enough");
+ try
+ {
+ actualValue = uEncoding.GetBytes(chars, 0, 10, bytes, 15);
+
+ TestLibrary.TestFramework.LogError("009", "No ArgumentException throw out expected" + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception:" + e + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ String chars = GetString(10);
+ Byte[] bytes = new Byte[10];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4:Invoke the method and the destination buffer is not enough");
+ try
+ {
+ actualValue = uEncoding.GetBytes(chars, 0, 10, bytes, 0);
+
+ TestLibrary.TestFramework.LogError("011", "No ArgumentException throw out expected" + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception:" + e + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ String chars = GetString(10);
+ Byte[] bytes = new Byte[30];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5:Invoke the method and set charIndex as -1");
+ try
+ {
+ actualValue = uEncoding.GetBytes(chars, -1, 1, bytes, 0);
+
+ TestLibrary.TestFramework.LogError("013", "No ArgumentOutOfRangeException throw out expected" + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception:" + e + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ String chars = GetString(10);
+ Byte[] bytes = new Byte[30];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6:Invoke the method and set charIndex as 15");
+ try
+ {
+ actualValue = uEncoding.GetBytes(chars, 15, 1, bytes, 0);
+
+ TestLibrary.TestFramework.LogError("015", "No ArgumentOutOfRangeException throw out expected" + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception:" + e + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ String chars = GetString(10);
+ Byte[] bytes = new Byte[30];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest7:Invoke the method and set charCount as -1");
+ try
+ {
+ actualValue = uEncoding.GetBytes(chars, 0, -1, bytes, 0);
+
+ TestLibrary.TestFramework.LogError("017", "No ArgumentOutOfRangeException throw out expected" + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception:" + e + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest8()
+ {
+ bool retVal = true;
+
+ String chars = GetString(10);
+ Byte[] bytes = new Byte[30];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest8:Invoke the method and set charCount as 12");
+ try
+ {
+ actualValue = uEncoding.GetBytes(chars, 0, 12, bytes, 0);
+
+ TestLibrary.TestFramework.LogError("019", "No ArgumentOutOfRangeException throw out expected" + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception:" + e + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest9()
+ {
+ bool retVal = true;
+
+ String chars = GetString(10);
+ Byte[] bytes = new Byte[30];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest9:Invoke the method and set byteIndex as -1");
+ try
+ {
+ actualValue = uEncoding.GetBytes(chars, 0, 1, bytes, -1);
+
+ TestLibrary.TestFramework.LogError("021", "No ArgumentOutOfRangeException throw out expected" + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("022", "Unexpected exception:" + e + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest10()
+ {
+ bool retVal = true;
+
+ String chars = GetString(10);
+ Byte[] bytes = new Byte[30];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest10:Invoke the method and set charIndex as 31");
+ try
+ {
+ actualValue = uEncoding.GetBytes(chars, 0, 0, bytes, 31);
+
+ TestLibrary.TestFramework.LogError("023", "No ArgumentOutOfRangeException throw out expected" + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ //Expected Exception
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("024", "Unexpected exception:" + e + " when chars is :" + ToString(chars));
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetcharcount.cs b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetcharcount.cs
new file mode 100644
index 0000000000..21d959b8b5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetcharcount.cs
@@ -0,0 +1,384 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+///<summary>
+///System.Test.UnicodeEncoding.GetCharCount(System.Byte[],System.Int32,System.Int32) [v-zuolan]
+///</summary>
+
+public class UnicodeEncodingGetCharCount
+{
+
+ public static int Main()
+ {
+ UnicodeEncodingGetCharCount testObj = new UnicodeEncodingGetCharCount();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Test.UnicodeEncoding");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Helper Method
+ //Create a None-Surrogate-Char Array.
+ public Char[] GetCharArray(int length)
+ {
+ if (length <= 0) return new Char[] { };
+
+ Char[] charArray = new Char[length];
+ int i = 0;
+ while (i < length)
+ {
+ Char temp = TestLibrary.Generator.GetChar(-55);
+ if (!Char.IsSurrogate(temp))
+ {
+ charArray[i] = temp;
+ i++;
+ }
+ }
+ return charArray;
+ }
+
+ public String ToString(Char[] chars)
+ {
+ String str = "{";
+ for (int i = 0; i < chars.Length; i++)
+ {
+ str = str + @"\u" + String.Format("{0:X04}", (int)chars[i]);
+ if (i != chars.Length - 1) str = str + ",";
+ }
+ str = str + "}";
+ return str;
+ }
+ #endregion
+
+ #region Positive Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ Char[] chars = GetCharArray(10);
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(chars,0,10,bytes,0);
+
+ int expectedValue = 10;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method.");
+ try
+ {
+ actualValue = uEncoding.GetCharCount(bytes, 0, 20);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")" + " when Chars is:" + ToString(chars));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e + " when Chars is:" + ToString(chars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ Char[] chars = GetCharArray(10);
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(chars, 0, 10, bytes, 0);
+
+ int expectedValue = 0;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the method and set byteCount as 0.");
+ try
+ {
+ actualValue = uEncoding.GetCharCount(bytes, 5, 0);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")" + " when Chars is:" + ToString(chars));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e + " when Chars is:" + ToString(chars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ Char[] chars = GetCharArray(10);
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(chars, 0, 10, bytes, 0);
+
+ int expectedValue = 1;
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke the method and set byteCount as 2");
+ try
+ {
+ actualValue = uEncoding.GetCharCount(bytes, 0, 2);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")" + " when Chars is:" + ToString(chars));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception:" + e + " when Chars is:" + ToString(chars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ Char[] chars = GetCharArray(10);
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(chars, 0, 10, bytes, 0);
+
+ int expectedValue = 0;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Invoke the method and set byteIndex out of right range.");
+ try
+ {
+ actualValue = uEncoding.GetCharCount(bytes, 20, 0);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("017", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")" + " when Chars is:" + ToString(chars));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negative Test Logic
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ Char[] chars = GetCharArray(10);
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(chars, 0, 10, bytes, 0);
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Invoke the method and set bytes as null");
+ try
+ {
+ actualValue = uEncoding.GetCharCount(null, 0, 0);
+
+ TestLibrary.TestFramework.LogError("007", "No ArgumentNullException throw out expected.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ Char[] chars = GetCharArray(10);
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(chars, 0, 10, bytes, 0);
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2:Invoke the method and set byteIndex as -1");
+ try
+ {
+ actualValue = uEncoding.GetCharCount(bytes, -1, 2);
+
+ TestLibrary.TestFramework.LogError("009", "No ArgumentOutOfRangeException throw out expected.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ Char[] chars = GetCharArray(10);
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(chars, 0, 10, bytes, 0);
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3:Invoke the method and set byteIndex out of right range.");
+ try
+ {
+ actualValue = uEncoding.GetCharCount(bytes, 21, 0);
+
+ TestLibrary.TestFramework.LogError("011", "No ArgumentOutOfRangeException throw out expected.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ Char[] chars = GetCharArray(10);
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(chars, 0, 10, bytes, 0);
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4:Invoke the method and set byteCount as -1");
+ try
+ {
+ actualValue = uEncoding.GetCharCount(bytes, 0, -1);
+
+ TestLibrary.TestFramework.LogError("013", "No ArgumentOutOfRangeException throw out expected.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ Char[] chars = GetCharArray(10);
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(chars, 0, 10, bytes, 0);
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5:Invoke the method and set byteCount as 21");
+ try
+ {
+ actualValue = uEncoding.GetCharCount(bytes, 0, 21);
+
+ TestLibrary.TestFramework.LogError("015", "No ArgumentOutOfRangeException throw out expected.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetchars.cs b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetchars.cs
new file mode 100644
index 0000000000..634329c677
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetchars.cs
@@ -0,0 +1,560 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+///<summary>
+///System.Test.UnicodeEncoding.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32) [v-zuolan]
+///</summary>
+
+public class UnicodeEncodingGetBytes
+{
+
+ public static int Main()
+ {
+ UnicodeEncodingGetBytes testObj = new UnicodeEncodingGetBytes();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Test.UnicodeEncoding");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+ retVal = NegTest9() && retVal;
+ retVal = NegTest10() && retVal;
+
+ return retVal;
+ }
+
+ #region Helper Method
+ //Create a None-Surrogate-Char Array.
+ public Char[] GetCharArray(int length)
+ {
+ if (length <= 0) return new Char[] { };
+
+ Char[] charArray = new Char[length];
+ int i = 0;
+ while (i < length)
+ {
+ Char temp = TestLibrary.Generator.GetChar(-55);
+ if (!Char.IsSurrogate(temp))
+ {
+ charArray[i] = temp;
+ i++;
+ }
+ }
+ return charArray;
+ }
+
+ //Convert Char Array to String
+ public String ToString(Char[] chars)
+ {
+ String str = "{";
+ for (int i = 0; i < chars.Length; i++)
+ {
+ str = str + @"\u" + String.Format("{0:X04}", (int)chars[i]);
+ if (i != chars.Length - 1) str = str + ",";
+ }
+ str = str + "}";
+ return str;
+ }
+ #endregion
+
+ #region Positive Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ int expectedValue = 10;
+ int actualValue;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = new Char[10];
+ Byte[] bytes = new Byte[20];
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(srcChars, 0, 10, bytes, 0);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method");
+ try
+ {
+ actualValue = uEncoding.GetChars(bytes, 0, 20, desChars,0);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")" + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ int expectedValue = TestLibrary.Generator.GetInt16(-55) % 10 + 1;
+ int actualValue;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = new Char[10];
+ Byte[] bytes = new Byte[20];
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(srcChars, 0, expectedValue, bytes, 0);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method with random char count.");
+ try
+ {
+ actualValue = uEncoding.GetChars(bytes, 0, expectedValue * 2, desChars, 0);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")" + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = new Char[10];
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(srcChars, 0, 10, bytes, 0);
+
+ int expectedValue = 0;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest10:Invoke the method and set charIndex as 10");
+ try
+ {
+ actualValue = uEncoding.GetChars(bytes, 0, 0, desChars, 10);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("025", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")" + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("026", "Unexpected exception:" + e + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = new Char[10];
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(srcChars, 0, 10, bytes, 0);
+
+ int expectedValue = 0;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Invoke the method and set byteIndex as 20");
+ try
+ {
+ actualValue = uEncoding.GetChars(bytes, 20, 0, desChars, 10);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("027", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")" + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("028", "Unexpected exception:" + e + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negative Test Logic
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = null;
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(srcChars, 0, 10, bytes, 0);
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Invoke the method and set chars as null");
+ try
+ {
+ actualValue = uEncoding.GetChars(bytes, 0, 0, desChars, 0);
+
+ TestLibrary.TestFramework.LogError("005", "No ArgumentNullException throw out expected.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = new Char[10];
+ Byte[] bytes = null;
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ //int byteCount = uEncoding.GetBytes(srcChars, 0, 10, bytes, 0);
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2:Invoke the method and set bytes as null");
+ try
+ {
+ actualValue = uEncoding.GetChars(bytes, 0, 0, desChars, 0);
+
+ TestLibrary.TestFramework.LogError("007", "No ArgumentNullException throw out expected" + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception:" + e + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = new Char[5];
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(srcChars, 0, 10, bytes, 0);
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3:Invoke the method and the destination buffer is not enough");
+ try
+ {
+ actualValue = uEncoding.GetChars(bytes, 0, 20, desChars, 0);
+
+ TestLibrary.TestFramework.LogError("009", "No ArgumentException throw out expected" + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception:" + e + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = new Char[10];
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(srcChars, 0, 10, bytes, 0);
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4:Invoke the method and the destination buffer is not enough");
+ try
+ {
+ actualValue = uEncoding.GetChars(bytes, 0, 20, desChars, 5);
+
+ TestLibrary.TestFramework.LogError("011", "No ArgumentException throw out expected" + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception:" + e + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = new Char[10];
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(srcChars, 0, 10, bytes, 0);
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5:Invoke the method and set byteIndex as -1");
+ try
+ {
+ actualValue = uEncoding.GetChars(bytes, -1, 0, desChars, 0);
+
+ TestLibrary.TestFramework.LogError("013", "No ArgumentOutOfRangeException throw out expected" + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception:" + e + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = new Char[10];
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(srcChars, 0, 10, bytes, 0);
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6:Invoke the method and set byteIndex as 20");
+ try
+ {
+ actualValue = uEncoding.GetChars(bytes, 20, 1, desChars, 10);
+
+ TestLibrary.TestFramework.LogError("015", "No ArgumentOutOfRangeException throw out expected" + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception:" + e + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = new Char[10];
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(srcChars, 0, 10, bytes, 0);
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest7:Invoke the method and set byteCount as -1");
+ try
+ {
+ actualValue = uEncoding.GetChars(bytes, 0, -1, desChars, 0);
+
+ TestLibrary.TestFramework.LogError("017", "No ArgumentOutOfRangeException throw out expected" + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception:" + e + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest8()
+ {
+ bool retVal = true;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = new Char[10];
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(srcChars, 0, 10, bytes, 0);
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest8:Invoke the method and set byteCount as 21");
+ try
+ {
+ actualValue = uEncoding.GetChars(bytes, 0, 21, desChars, 0);
+
+ TestLibrary.TestFramework.LogError("019", "No ArgumentOutOfRangeException throw out expected" + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("020", "Unexpected exception:" + e + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest9()
+ {
+ bool retVal = true;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = new Char[10];
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(srcChars, 0, 10, bytes, 0);
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest9:Invoke the method and set charIndex as -1");
+ try
+ {
+ actualValue = uEncoding.GetChars(bytes, 0, 0, desChars, -1);
+
+ TestLibrary.TestFramework.LogError("021", "No ArgumentOutOfRangeException throw out expected" + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("022", "Unexpected exception:" + e + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest10()
+ {
+ bool retVal = true;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = new Char[10];
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(srcChars, 0, 10, bytes, 0);
+
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest10:Invoke the method and set charIndex as 11");
+ try
+ {
+ actualValue = uEncoding.GetChars(bytes, 0, 0, desChars, 11);
+
+ TestLibrary.TestFramework.LogError("023", "No ArgumentOutOfRangeException throw out expected" + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ //Expected Exception
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("024", "Unexpected exception:" + e + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetdecoder.cs b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetdecoder.cs
new file mode 100644
index 0000000000..993ca10531
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetdecoder.cs
@@ -0,0 +1,125 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+///<summary>
+///System.Test.UnicodeEncoding.GetDecoder() [v-zuolan]
+///</summary>
+
+public class UnicodeEncodingGetDecoder
+{
+
+ public static int Main()
+ {
+ UnicodeEncodingGetDecoder testObj = new UnicodeEncodingGetDecoder();
+ TestLibrary.TestFramework.BeginTestCase("for method of System.Test.UnicodeEncoding.GetDecoder");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Helper Method
+ //Create a None-Surrogate-Char Array.
+ public Char[] GetCharArray(int length)
+ {
+ if (length <= 0) return new Char[] { };
+
+ Char[] charArray = new Char[length];
+ int i = 0;
+ while (i < length)
+ {
+ Char temp = TestLibrary.Generator.GetChar(-55);
+ if (!Char.IsSurrogate(temp))
+ {
+ charArray[i] = temp;
+ i++;
+ }
+ }
+ return charArray;
+ }
+
+ //Convert Char Array to String
+ public String ToString(Char[] chars)
+ {
+ String str = "{";
+ for (int i = 0; i < chars.Length; i++)
+ {
+ str = str + @"\u" + String.Format("{0:X04}", (int)chars[i]);
+ if (i != chars.Length - 1) str = str + ",";
+ }
+ str = str + "}";
+ return str;
+ }
+ #endregion
+
+ #region Positive Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = new Char[10];
+ Byte[] bytes = new Byte[20];
+ int buffer;
+ int outChars;
+ bool completed;
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(srcChars, 0, 10, bytes, 0);
+
+ bool expectedValue = true;
+ bool actualValue = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method");
+ try
+ {
+ Decoder dC = uEncoding.GetDecoder();
+
+ dC.Convert(bytes, 0, 20, desChars, 0, 10, true,out buffer,out outChars, out completed);
+
+ if (completed)
+ {
+ for (int i = 0; i < 10; i++)
+ {
+ actualValue = actualValue & (desChars[i] == srcChars[i]);
+ }
+ }
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")" + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetencoder.cs b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetencoder.cs
new file mode 100644
index 0000000000..2f061cc2b9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetencoder.cs
@@ -0,0 +1,126 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+///<summary>
+///System.Text.UnicodeEncoding.GetEncoder() [v-zuolan]
+///</summary>
+
+public class UnicodeEncodingGetEncoder
+{
+
+ public static int Main()
+ {
+ UnicodeEncodingGetEncoder testObj = new UnicodeEncodingGetEncoder();
+ TestLibrary.TestFramework.BeginTestCase("for method of System.Text.UnicodeEncoding.GetEncoder()");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+
+
+ return retVal;
+ }
+
+ #region Helper Method
+ //Create a None-Surrogate-Char Array.
+ public Char[] GetCharArray(int length)
+ {
+ if (length <= 0) return new Char[] { };
+
+ Char[] charArray = new Char[length];
+ int i = 0;
+ while (i < length)
+ {
+ Char temp = TestLibrary.Generator.GetChar(-55);
+ if (!Char.IsSurrogate(temp))
+ {
+ charArray[i] = temp;
+ i++;
+ }
+ }
+ return charArray;
+ }
+
+ //Convert Char Array to String
+ public String ToString(Char[] chars)
+ {
+ String str = "{";
+ for (int i = 0; i < chars.Length; i++)
+ {
+ str = str + @"\u" + String.Format("{0:X04}", (int)chars[i]);
+ if (i != chars.Length - 1) str = str + ",";
+ }
+ str = str + "}";
+ return str;
+ }
+ #endregion
+
+ #region Positive Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ Char[] Chars = GetCharArray(10);
+ Byte[] bytes = new Byte[20];
+ Byte[] desBytes = new Byte[20];
+ int buffer;
+ int outChars;
+ bool completed;
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(Chars, 0, 10, bytes, 0);
+
+ bool expectedValue = true;
+ bool actualValue = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method");
+ try
+ {
+ Encoder eC = uEncoding.GetEncoder();
+
+ eC.Convert(Chars, 0, 10, desBytes, 0, 20, true, out buffer, out outChars, out completed);
+
+ if (completed)
+ {
+ for (int i = 0; i < 20; i++)
+ {
+ actualValue = actualValue & (bytes[i] == desBytes[i]);
+ }
+ }
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")" + " when chars is :" + ToString(Chars));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e + " when chars is :" + ToString(Chars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggethashcode.cs b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggethashcode.cs
new file mode 100644
index 0000000000..02a4c26da0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggethashcode.cs
@@ -0,0 +1,77 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+///<summary>
+///System.Text.UnicodeEncoding.GetHashCode() [v-zuolan]
+///</summary>
+
+public class UnicodeEncodingGetHashCode
+{
+
+ public static int Main()
+ {
+ UnicodeEncodingGetHashCode testObj = new UnicodeEncodingGetHashCode();
+ TestLibrary.TestFramework.BeginTestCase("for method of System.Text.UnicodeEncoding.GetHashCode");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ int expectedValue;
+ int actualValue;
+
+ UnicodeEncoding uE1 = new UnicodeEncoding();
+ UnicodeEncoding uE2 = new UnicodeEncoding();
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method.");
+ try
+ {
+ expectedValue = uE1.GetHashCode();
+ actualValue = uE2.GetHashCode();
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetmaxbytecount.cs b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetmaxbytecount.cs
new file mode 100644
index 0000000000..55850ae97c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetmaxbytecount.cs
@@ -0,0 +1,199 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+///<summary>
+///System.Text.UnicodeEncoding.GetMaxByteCount(int) [v-zuolan]
+///</summary>
+
+public class UnicodeEncodingGetMaxByteCount
+{
+
+ public static int Main()
+ {
+ UnicodeEncodingGetMaxByteCount testObj = new UnicodeEncodingGetMaxByteCount();
+ TestLibrary.TestFramework.BeginTestCase("for method of System.Text.UnicodeEncoding.GetMaxByteCount");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("Negative");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+
+ #region Positive Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ int expectedValue = 2;
+ int actualValue;
+
+ UnicodeEncoding uE = new UnicodeEncoding();
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method and set charCount as 0.");
+ try
+ {
+ actualValue = uE.GetMaxByteCount(0);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ int expectedValue = 4;
+ int actualValue;
+
+ UnicodeEncoding uE = new UnicodeEncoding();
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the method and set charCount as 1.");
+ try
+ {
+ actualValue = uE.GetMaxByteCount(1);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ int charCount = (TestLibrary.Generator.GetInt32(-55) % Int32.MaxValue + 1) / 2;
+
+ int expectedValue = (charCount + 1) * 2;
+ int actualValue;
+
+ UnicodeEncoding uE = new UnicodeEncoding();
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke the method and set charCount as random integer.");
+ try
+ {
+ actualValue = uE.GetMaxByteCount(charCount);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+
+ #region Negative Test Logic
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ int actualValue;
+
+ UnicodeEncoding uE = new UnicodeEncoding();
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Invoke the method and set charCount as -1.");
+ try
+ {
+ actualValue = uE.GetMaxByteCount(-1);
+ TestLibrary.TestFramework.LogError("007", "No ArgumentOutOfRangeException expected.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ int actualValue;
+
+ UnicodeEncoding uE = new UnicodeEncoding();
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2:Invoke the method and set charCount as a large integer that lead the bytecount to overflow..");
+ try
+ {
+ actualValue = uE.GetMaxByteCount(int.MaxValue / 2);
+ TestLibrary.TestFramework.LogError("009", "No ArgumentOutOfRangeException expected.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetmaxcharcount.cs b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetmaxcharcount.cs
new file mode 100644
index 0000000000..007fa6e137
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetmaxcharcount.cs
@@ -0,0 +1,172 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+///<summary>
+///System.Text.UnicodeEncoding.GetMaxCharCount(int) [v-zuolan]
+///</summary>
+
+public class UnicodeEncodingGetMaxCharCount
+{
+
+ public static int Main()
+ {
+ UnicodeEncodingGetMaxCharCount testObj = new UnicodeEncodingGetMaxCharCount();
+ TestLibrary.TestFramework.BeginTestCase("for method of System.Text.UnicodeEncoding.GetMaxCharCount");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ TestLibrary.TestFramework.LogInformation("Negative");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+
+ #region Positive Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ int expectedValue = 1;
+ int actualValue;
+
+ UnicodeEncoding uE = new UnicodeEncoding();
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method and set byteCount as 0.");
+ try
+ {
+ actualValue = uE.GetMaxCharCount(0);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ int expectedValue = 2;
+ int actualValue;
+
+ UnicodeEncoding uE = new UnicodeEncoding();
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the method and set byteCount as 1.");
+ try
+ {
+ actualValue = uE.GetMaxCharCount(1);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ int byteCount = TestLibrary.Generator.GetInt32(-55);
+
+ int expectedValue = (byteCount + 1) / 2 + 1;
+ int actualValue;
+
+ UnicodeEncoding uE = new UnicodeEncoding();
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke the method and set byteCount as random integer.");
+ try
+ {
+ actualValue = uE.GetMaxCharCount(byteCount);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+
+
+ #region Negative Test Logic
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ int actualValue;
+
+ UnicodeEncoding uE = new UnicodeEncoding();
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Invoke the method and set byteCount as -1.");
+ try
+ {
+ actualValue = uE.GetMaxCharCount(-1);
+ TestLibrary.TestFramework.LogError("007", "No ArgumentOutOfRangeException expected.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetpreamble.cs b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetpreamble.cs
new file mode 100644
index 0000000000..ea8b408f62
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetpreamble.cs
@@ -0,0 +1,133 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+///<summary>
+///System.Text.UnicodeEncoding.GetPreamble() [v-zuolan]
+///</summary>
+
+public class UnicodeEncodingGetPreamble
+{
+
+ public static int Main()
+ {
+ UnicodeEncodingGetPreamble testObj = new UnicodeEncodingGetPreamble();
+ TestLibrary.TestFramework.BeginTestCase("for method of System.Text.UnicodeEncoding.GetPreamble");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ UnicodeEncoding uE = new UnicodeEncoding(true,false);
+
+ Byte[] expectedValue = new Byte[] { };
+ Byte[] actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method with bigEndian true and byteOrderMark false.");
+ try
+ {
+ actualValue = uE.GetPreamble();
+
+ if (expectedValue.Equals(actualValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ UnicodeEncoding uE = new UnicodeEncoding(true, true);
+
+ Byte[] expectedValue = new Byte[] { 0xfe,0xff};
+ Byte[] actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the method with bigEndian true and byteOrderMark true.");
+ try
+ {
+ actualValue = uE.GetPreamble();
+
+ if (expectedValue.Equals(actualValue))
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ UnicodeEncoding uE = new UnicodeEncoding(false, true);
+
+ Byte[] expectedValue = new Byte[] { 0xff, 0xfe };
+ Byte[] actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke the method with bigEndian false and byteOrderMark true.");
+ try
+ {
+ actualValue = uE.GetPreamble();
+
+ if (expectedValue.Equals(actualValue))
+ {
+ TestLibrary.TestFramework.LogError("005", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetstring.cs b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetstring.cs
new file mode 100644
index 0000000000..1e83741668
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/unicodeencoding/unicodeencodinggetstring.cs
@@ -0,0 +1,409 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+///<summary>
+///System.Test.UnicodeEncoding.GetString(System.Byte[],System.Int32,System.Int32) [v-zuolan]
+///</summary>
+
+public class UnicodeEncodingGetString
+{
+
+ public static int Main()
+ {
+ UnicodeEncodingGetString testObj = new UnicodeEncodingGetString();
+ TestLibrary.TestFramework.BeginTestCase("for method of System.Test.UnicodeEncoding.GetString");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+
+ return retVal;
+ }
+
+ #region Helper Method
+ //Create a None-Surrogate-Char Array.
+ public Char[] GetCharArray(int length)
+ {
+ if (length <= 0) return new Char[] { };
+
+ Char[] charArray = new Char[length];
+ int i = 0;
+ while (i < length)
+ {
+ Char temp = TestLibrary.Generator.GetChar(-55);
+ if (!Char.IsSurrogate(temp))
+ {
+ charArray[i] = temp;
+ i++;
+ }
+ }
+ return charArray;
+ }
+
+ //Convert Char Array to String
+ public String ToString(Char[] chars)
+ {
+ String str = "{";
+ for (int i = 0; i < chars.Length; i++)
+ {
+ str = str + @"\u" + String.Format("{0:X04}", (int)chars[i]);
+ if (i != chars.Length - 1) str = str + ",";
+ }
+ str = str + "}";
+ return str;
+ }
+ #endregion
+
+ #region Positive Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = new Char[10];
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(srcChars, 0, 10, bytes, 0);
+
+ bool expectedValue = true;
+ bool actualValue = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Invoke the method");
+ try
+ {
+ String desString = uEncoding.GetString(bytes, 0, 20);
+
+ desChars = desString.ToCharArray();
+
+ for (int i = 0; i < 10; i++)
+ {
+ actualValue = actualValue & (desChars[i] == srcChars[i]);
+ }
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")" + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = new Char[10];
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(srcChars, 0, 10, bytes, 0);
+
+ bool expectedValue = true;
+ bool actualValue = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Invoke the method,convert 1 char");
+ try
+ {
+ String desString = uEncoding.GetString(bytes, 0, 2);
+
+ desChars = desString.ToCharArray();
+
+ for (int i = 0; i < 1; i++)
+ {
+ actualValue = actualValue & (desChars[i] == srcChars[i]);
+ }
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")" + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = new Char[10];
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(srcChars, 0, 10, bytes, 0);
+
+ String expectedValue = "";
+ String actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Invoke the method and set byteIndex as 0 and byteCount as 0.");
+ try
+ {
+ actualValue = uEncoding.GetString(bytes, 0, 0);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")" + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception:" + e + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = new Char[10];
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(srcChars, 0, 10, bytes, 0);
+
+ String expectedValue = "";
+ String actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Invoke the method and set byteIndex out of range.");
+ try
+ {
+ actualValue = uEncoding.GetString(bytes, 20, 0);
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("017", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")" + " when chars is :" + ToString(srcChars));
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negative Test Logic
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = new Char[10];
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(srcChars, 0, 10, bytes, 0);
+
+ String actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1:Invoke the method and set chars as null");
+ try
+ {
+ actualValue = uEncoding.GetString(null,0,0);
+
+ TestLibrary.TestFramework.LogError("007", "No ArgumentNullException throw out expected.");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = new Char[10];
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(srcChars, 0, 10, bytes, 0);
+
+ String actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2:Invoke the method and set byteIndex out of range.");
+ try
+ {
+ actualValue = uEncoding.GetString(bytes, 21, 0);
+
+ TestLibrary.TestFramework.LogError("009", "No ArgumentOutOfRangeException throw out expected.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = new Char[10];
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(srcChars, 0, 10, bytes, 0);
+
+ String actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3:Invoke the method and set byteIndex out of range.");
+ try
+ {
+ actualValue = uEncoding.GetString(bytes, -1, 0);
+
+ TestLibrary.TestFramework.LogError("011", "No ArgumentOutOfRangeException throw out expected.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = new Char[10];
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(srcChars, 0, 10, bytes, 0);
+
+ String actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4:Invoke the method and set byteCount out of range.");
+ try
+ {
+ actualValue = uEncoding.GetString(bytes, 0, -1);
+
+ TestLibrary.TestFramework.LogError("013", "No ArgumentOutOfRangeException throw out expected.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ Char[] srcChars = GetCharArray(10);
+ Char[] desChars = new Char[10];
+ Byte[] bytes = new Byte[20];
+
+ UnicodeEncoding uEncoding = new UnicodeEncoding();
+ int byteCount = uEncoding.GetBytes(srcChars, 0, 10, bytes, 0);
+
+ String actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5:Invoke the method and set byteCount out of range.");
+ try
+ {
+ actualValue = uEncoding.GetString(bytes, 0, 21);
+
+ TestLibrary.TestFramework.LogError("015", "No ArgumentOutOfRangeException throw out expected.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingCtor.csproj b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingCtor.csproj
new file mode 100644
index 0000000000..d88ce25d01
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="utf8encodingctor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingCtor2.csproj b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingCtor2.csproj
new file mode 100644
index 0000000000..51a7d9d159
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="utf8encodingctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingCtor3.csproj b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingCtor3.csproj
new file mode 100644
index 0000000000..fb5df3e5c3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="utf8encodingctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingEquals.csproj b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingEquals.csproj
new file mode 100644
index 0000000000..d3c76a96d6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingEquals.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="utf8encodingequals.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetByteCount1.csproj b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetByteCount1.csproj
new file mode 100644
index 0000000000..733fc932d0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetByteCount1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="utf8encodinggetbytecount1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetByteCount2.csproj b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetByteCount2.csproj
new file mode 100644
index 0000000000..d8b844be48
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetByteCount2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="utf8encodinggetbytecount2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetBytes1.csproj b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetBytes1.csproj
new file mode 100644
index 0000000000..a456012521
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetBytes1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="utf8encodinggetbytes1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetBytes2.csproj b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetBytes2.csproj
new file mode 100644
index 0000000000..c1d8362fbf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetBytes2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="utf8encodinggetbytes2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetCharCount.csproj b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetCharCount.csproj
new file mode 100644
index 0000000000..ba21cfa089
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetCharCount.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="utf8encodinggetcharcount.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetChars.csproj b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetChars.csproj
new file mode 100644
index 0000000000..fbe3d316cc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetChars.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="utf8encodinggetchars.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetDecoder.csproj b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetDecoder.csproj
new file mode 100644
index 0000000000..f0f5b34429
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetDecoder.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="utf8encodinggetdecoder.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetEncoder.csproj b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetEncoder.csproj
new file mode 100644
index 0000000000..c31630576e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetEncoder.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="utf8encodinggetencoder.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetHashCode.csproj
new file mode 100644
index 0000000000..2d4ae1480f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="utf8encodinggethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetMaxByteCount.csproj b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetMaxByteCount.csproj
new file mode 100644
index 0000000000..d1fcaa9867
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetMaxByteCount.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="utf8encodinggetmaxbytecount.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetMaxCharCount.csproj b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetMaxCharCount.csproj
new file mode 100644
index 0000000000..d5ef5ec907
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetMaxCharCount.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="utf8encodinggetmaxcharcount.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetPreamble.csproj b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetPreamble.csproj
new file mode 100644
index 0000000000..da3751d0fe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetPreamble.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="utf8encodinggetpreamble.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetString.csproj b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetString.csproj
new file mode 100644
index 0000000000..3e77979811
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/UTF8EncodingGetString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="utf8encodinggetstring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodingctor.cs b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodingctor.cs
new file mode 100644
index 0000000000..7bc7a233f3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodingctor.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// ctor [v-jianq]
+/// </summary>
+
+public class UTF8EncodingCtor
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify ctor of UTF8Encoding");
+
+ try
+ {
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ if (utf8 == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Ctor of UTF8Encoding Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ UTF8EncodingCtor test = new UTF8EncodingCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("UTF8EncodingCtor");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodingctor2.cs b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodingctor2.cs
new file mode 100644
index 0000000000..f070a74efe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodingctor2.cs
@@ -0,0 +1,131 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// ctor(System.Boolean)
+/// </summary>
+
+public class UTF8EncodingCtor2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify ctor(true) of UTF8Encoding");
+
+ try
+ {
+ UTF8Encoding utf8 = new UTF8Encoding(true);
+
+ if (utf8 == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Ctor of UTF8Encoding Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify ctor(false) of UTF8Encoding");
+
+ try
+ {
+ UTF8Encoding utf8 = new UTF8Encoding(false);
+
+ if (utf8 == null)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Ctor of UTF8Encoding Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ UTF8EncodingCtor2 test = new UTF8EncodingCtor2();
+
+ TestLibrary.TestFramework.BeginTestCase("UTF8EncodingCtor2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodingctor3.cs b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodingctor3.cs
new file mode 100644
index 0000000000..cb17084cc7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodingctor3.cs
@@ -0,0 +1,187 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// ctor(System.Boolean,System.Boolean) [v-jianq]
+/// </summary>
+
+public class UTF8EncodingCtor3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify ctor(true,false) of UTF8Encoding");
+
+ try
+ {
+ UTF8Encoding utf8 = new UTF8Encoding(true,false);
+
+ if (utf8 == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Ctor of UTF8Encoding Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify ctor(true,true) of UTF8Encoding");
+
+ try
+ {
+ UTF8Encoding utf8 = new UTF8Encoding(true,true);
+
+ if (utf8 == null)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Ctor of UTF8Encoding Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify ctor(false,false) of UTF8Encoding");
+
+ try
+ {
+ UTF8Encoding utf8 = new UTF8Encoding(false, false);
+
+ if (utf8 == null)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Ctor of UTF8Encoding Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Verify ctor(false,true) of UTF8Encoding");
+
+ try
+ {
+ UTF8Encoding utf8 = new UTF8Encoding(false, true);
+
+ if (utf8 == null)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Ctor of UTF8Encoding Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ UTF8EncodingCtor3 test = new UTF8EncodingCtor3();
+
+ TestLibrary.TestFramework.BeginTestCase("UTF8EncodingCtor3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodingequals.cs b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodingequals.cs
new file mode 100644
index 0000000000..0dcc893364
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodingequals.cs
@@ -0,0 +1,161 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// Equals(System.Object) [v-jianq]
+/// </summary>
+
+public class UTF8EncodingEquals
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify a instance of UTF8Encoding equals to itself");
+
+ try
+ {
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ if (utf8.Equals(utf8)!= true)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method Equals Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify a instance of UTF8Encoding equals to another one");
+
+ try
+ {
+ UTF8Encoding utf8a = new UTF8Encoding();
+ UTF8Encoding utf8b = new UTF8Encoding();
+
+ if (utf8a.Equals(utf8b) != true)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method Equals Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Verify a instance of UTF8Encoding is not equal to different one");
+
+ try
+ {
+ UTF8Encoding utf8a = new UTF8Encoding();
+ UTF8Encoding utf8b = new UTF8Encoding(true);
+
+ if (utf8a.Equals(utf8b) != false)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Method Equals Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ UTF8EncodingEquals test = new UTF8EncodingEquals();
+
+ TestLibrary.TestFramework.BeginTestCase("UTF8EncodingEquals");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetbytecount1.cs b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetbytecount1.cs
new file mode 100644
index 0000000000..edc40fc9ae
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetbytecount1.cs
@@ -0,0 +1,238 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// GetByteCount(System.Char[],System.Int32,System.Int32) [v-jianq]
+/// </summary>
+
+public class UTF8EncodingGetByteCount1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method GetByteCount(Char[],Int32,Int32) with non-null char[]");
+
+ try
+ {
+ Char[] chars = new Char[] {
+ '\u0023',
+ '\u0025',
+ '\u03a0',
+ '\u03a3' };
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+ int byteCount = utf8.GetByteCount(chars, 1, 2);
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method GetByteCount(Char[],Int32,Int32) with null char[]");
+
+ try
+ {
+ Char[] chars = new Char[] { };
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+ int byteCount = utf8.GetByteCount(chars, 0, 0);
+
+ if (byteCount != 0)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method GetByteCount Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown when chars is a null reference");
+
+ try
+ {
+ Char[] chars = null;
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+ int byteCount = utf8.GetByteCount(chars, 0, 0);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown when chars is a null reference.");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentOutOfRangeException is not thrown when index is less than zero.");
+
+ try
+ {
+ Char[] chars = new Char[] {
+ '\u0023',
+ '\u0025',
+ '\u03a0',
+ '\u03a3' };
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+ int byteCount = utf8.GetByteCount(chars, -1, 2);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentOutOfRangeException is not thrown when index is less than zero.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentOutOfRangeException is not thrown when count is less than zero.");
+
+ try
+ {
+ Char[] chars = new Char[] {
+ '\u0023',
+ '\u0025',
+ '\u03a0',
+ '\u03a3' };
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+ int byteCount = utf8.GetByteCount(chars, 1, -2);
+
+ TestLibrary.TestFramework.LogError("103.1", "ArgumentOutOfRangeException is not thrown when count is less than zero.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: ArgumentOutOfRangeException is not thrown when index and count do not denote a valid range in chars.");
+
+ try
+ {
+ Char[] chars = new Char[] {
+ '\u0023',
+ '\u0025',
+ '\u03a0',
+ '\u03a3' };
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+ int byteCount = utf8.GetByteCount(chars, 1, chars.Length);
+
+ TestLibrary.TestFramework.LogError("104.1", "ArgumentOutOfRangeException is not thrown when index and count do not denote a valid range in chars.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ UTF8EncodingGetByteCount1 test = new UTF8EncodingGetByteCount1();
+
+ TestLibrary.TestFramework.BeginTestCase("UTF8EncodingGetByteCount1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetbytecount2.cs b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetbytecount2.cs
new file mode 100644
index 0000000000..d17f432ef5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetbytecount2.cs
@@ -0,0 +1,142 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// GetByteCount(System.String) [v-jianq]
+/// </summary>
+
+public class UTF8EncodingGetByteCount2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method GetByteCount(string) with non-null string");
+
+ try
+ {
+ String chars = "UTF8 Encoding Example";
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+ int byteCount = utf8.GetByteCount(chars);
+
+ if (byteCount != chars.Length)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method GetByteCount Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method GetByteCount(string) with null string");
+
+ try
+ {
+ String chars = "";
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+ int byteCount = utf8.GetByteCount(chars);
+
+ if (byteCount != 0)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method GetByteCount Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown when string is a null reference");
+
+ try
+ {
+ String chars = null;
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+ int byteCount = utf8.GetByteCount(chars);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown when string is a null reference.");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ UTF8EncodingGetByteCount2 test = new UTF8EncodingGetByteCount2();
+
+ TestLibrary.TestFramework.BeginTestCase("UTF8EncodingGetByteCount2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetbytes1.cs b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetbytes1.cs
new file mode 100644
index 0000000000..10ad1b83a5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetbytes1.cs
@@ -0,0 +1,373 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// GetBytes(System.Char[],System.Int32,System.Int32,System.Byte[],System.Int32) [v-jianq]
+/// </summary>
+
+public class UTF8EncodingGetBytes1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method GetBytes(Char[],Int32,Int32,Byte[],Int32) with non-null chars");
+
+ try
+ {
+ Byte[] bytes;
+ Char[] chars = new Char[] {
+ '\u0023',
+ '\u0025',
+ '\u03a0',
+ '\u03a3' };
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = utf8.GetByteCount(chars, 1, 2);
+ bytes = new Byte[byteCount];
+ int bytesEncodedCount = utf8.GetBytes(chars, 1, 2, bytes, 0);
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method GetBytes(Char[],Int32,Int32,Byte[],Int32) with null chars");
+
+ try
+ {
+ Byte[] bytes;
+ Char[] chars = new Char[] { };
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = utf8.GetByteCount(chars, 0, 0);
+ bytes = new Byte[byteCount];
+ int bytesEncodedCount = utf8.GetBytes(chars, 0, 0, bytes, 0);
+
+ if (bytesEncodedCount != 0)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method GetBytes Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown when chars is a null reference ");
+
+ try
+ {
+ Byte[] bytes;
+ Char[] chars = null;
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = 10;
+ bytes = new Byte[byteCount];
+ int bytesEncodedCount = utf8.GetBytes(chars, 1, 2, bytes, 0);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown when chars is a null reference ");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentNullException is not thrown when bytes is a null reference ");
+
+ try
+ {
+ Byte[] bytes;
+ Char[] chars = new Char[] {
+ '\u0023',
+ '\u0025',
+ '\u03a0',
+ '\u03a3' };
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = utf8.GetByteCount(chars, 1, 2);
+ bytes = null;
+ int bytesEncodedCount = utf8.GetBytes(chars, 1, 2, bytes, 0);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentNullException is not thrown when bytes is a null reference ");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentOutOfRangeException is not thrown when charIndex is less than zero ");
+
+ try
+ {
+ Byte[] bytes;
+ Char[] chars = new Char[] {
+ '\u0023',
+ '\u0025',
+ '\u03a0',
+ '\u03a3' };
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = utf8.GetByteCount(chars, 1, 2);
+ bytes = new Byte[byteCount];
+ int bytesEncodedCount = utf8.GetBytes(chars, -1, 2, bytes, 0);
+
+ TestLibrary.TestFramework.LogError("103.1", "ArgumentOutOfRangeException is not thrown when charIndex is less than zero.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: ArgumentOutOfRangeException is not thrown when charCount is less than zero ");
+
+ try
+ {
+ Byte[] bytes;
+ Char[] chars = new Char[] {
+ '\u0023',
+ '\u0025',
+ '\u03a0',
+ '\u03a3' };
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = utf8.GetByteCount(chars, 1, 2);
+ bytes = new Byte[byteCount];
+ int bytesEncodedCount = utf8.GetBytes(chars, 1, -2, bytes, 0);
+
+ TestLibrary.TestFramework.LogError("104.1", "ArgumentOutOfRangeException is not thrown when charIndex is less than zero.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: ArgumentOutOfRangeException is not thrown when byteIndex is less than zero. ");
+
+ try
+ {
+ Byte[] bytes;
+ Char[] chars = new Char[] {
+ '\u0023',
+ '\u0025',
+ '\u03a0',
+ '\u03a3' };
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = utf8.GetByteCount(chars, 1, 2);
+ bytes = new Byte[byteCount];
+ int bytesEncodedCount = utf8.GetBytes(chars, 1, 2, bytes, -1);
+
+ TestLibrary.TestFramework.LogError("105.1", "ArgumentOutOfRangeException is not thrown whenchar byteIndex is less than zero..");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("105.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: ArgumentOutOfRangeException is not thrown when charIndex and charCount do not denote a valid range in chars. ");
+
+ try
+ {
+ Byte[] bytes;
+ Char[] chars = new Char[] {
+ '\u0023',
+ '\u0025',
+ '\u03a0',
+ '\u03a3' };
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = utf8.GetByteCount(chars, 1, 2);
+ bytes = new Byte[byteCount];
+ int bytesEncodedCount = utf8.GetBytes(chars, 1, chars.Length, bytes, 1);
+
+ TestLibrary.TestFramework.LogError("106.1", "ArgumentOutOfRangeException is not thrown when charIndex and charCount do not denote a valid range in chars.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest7: ArgumentException is not thrown when bytes does not have enough capacity from byteIndex to the end of the array to accommodate the resulting bytes.");
+
+ try
+ {
+ Byte[] bytes;
+ Char[] chars = new Char[] {
+ '\u0023',
+ '\u0025',
+ '\u03a0',
+ '\u03a3' };
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = utf8.GetByteCount(chars, 1, 2);
+ bytes = new Byte[byteCount];
+ int bytesEncodedCount = utf8.GetBytes(chars, 1, 2, bytes, bytes.Length);
+
+ TestLibrary.TestFramework.LogError("107.1", "ArgumentException is not thrown when byteIndex is not a valid index in bytes.");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("107.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+
+
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ UTF8EncodingGetBytes1 test = new UTF8EncodingGetBytes1();
+
+ TestLibrary.TestFramework.BeginTestCase("UTF8EncodingGetBytes1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetbytes2.cs b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetbytes2.cs
new file mode 100644
index 0000000000..6dc861482f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetbytes2.cs
@@ -0,0 +1,341 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// GetBytes(System.String,System.Int32,System.Int32,System.Byte[],System.Int32) [v-jianq]
+/// </summary>
+
+public class UTF8EncodingGetBytes2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method GetBytes(Char[],Int32,Int32,Byte[],Int32) with non-null chars");
+
+ try
+ {
+ Byte[] bytes;
+ String chars = "UTF8 Encoding Example";
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = chars.Length;
+ bytes = new Byte[byteCount];
+ int bytesEncodedCount = utf8.GetBytes(chars, 1, 2, bytes, 0);
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method GetBytes(String,Int32,Int32,Byte[],Int32) with null chars");
+
+ try
+ {
+ Byte[] bytes;
+ String chars = "";
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = chars.Length;
+ bytes = new Byte[byteCount];
+ int bytesEncodedCount = utf8.GetBytes(chars, 0, byteCount, bytes, 0);
+
+
+ if (bytesEncodedCount != 0)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method GetBytes Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown when string is a null reference ");
+
+ try
+ {
+ Byte[] bytes;
+ String chars = null;
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = 10;
+ bytes = new Byte[byteCount];
+ int bytesEncodedCount = utf8.GetBytes(chars, 1, 2, bytes, 0);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown when chars is a null reference ");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentNullException is not thrown when bytes is a null reference ");
+
+ try
+ {
+ Byte[] bytes;
+ String chars = "UTF8 Encoding Example";
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ bytes = null;
+ int bytesEncodedCount = utf8.GetBytes(chars, 1, 2, bytes, 0);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentNullException is not thrown when bytes is a null reference ");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentOutOfRangeException is not thrown when charIndex is less than zero ");
+
+ try
+ {
+ Byte[] bytes;
+ String chars = "UTF8 Encoding Example";
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = chars.Length;
+ bytes = new Byte[byteCount];
+ int bytesEncodedCount = utf8.GetBytes(chars, -1, 2, bytes, 0);
+
+ TestLibrary.TestFramework.LogError("103.1", "ArgumentOutOfRangeException is not thrown when charIndex is less than zero.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: ArgumentOutOfRangeException is not thrown when charCount is less than zero ");
+
+ try
+ {
+ Byte[] bytes;
+ String chars = "UTF8 Encoding Example";
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = chars.Length;
+ bytes = new Byte[byteCount];
+ int bytesEncodedCount = utf8.GetBytes(chars, 1, -2, bytes, 0);
+
+ TestLibrary.TestFramework.LogError("104.1", "ArgumentOutOfRangeException is not thrown when charIndex is less than zero.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: ArgumentOutOfRangeException is not thrown when byteIndex is less than zero. ");
+
+ try
+ {
+ Byte[] bytes;
+ String chars = "UTF8 Encoding Example";
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = chars.Length;
+ bytes = new Byte[byteCount];
+ int bytesEncodedCount = utf8.GetBytes(chars, 1, 2, bytes, -1);
+
+ TestLibrary.TestFramework.LogError("105.1", "ArgumentOutOfRangeException is not thrown whenchar byteIndex is less than zero..");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("105.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: ArgumentOutOfRangeException is not thrown when charIndex and charCount do not denote a valid range in chars. ");
+
+ try
+ {
+ Byte[] bytes;
+ String chars = "UTF8 Encoding Example";
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = chars.Length;
+ bytes = new Byte[byteCount];
+ int bytesEncodedCount = utf8.GetBytes(chars, 1, chars.Length, bytes, 0);
+
+ TestLibrary.TestFramework.LogError("106.1", "ArgumentOutOfRangeException is not thrown when charIndex and charCount do not denote a valid range in chars.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest7: ArgumentException is not thrown when bytes does not have enough capacity from byteIndex to the end of the array to accommodate the resulting bytes.");
+
+ try
+ {
+ Byte[] bytes;
+ String chars = "UTF8 Encoding Example";
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = chars.Length;
+ bytes = new Byte[byteCount];
+ int bytesEncodedCount = utf8.GetBytes(chars, 1, 2, bytes, bytes.Length);
+
+ TestLibrary.TestFramework.LogError("107.1", "ArgumentException is not thrown when byteIndex is not a valid index in bytes.");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("107.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ UTF8EncodingGetBytes2 test = new UTF8EncodingGetBytes2();
+
+ TestLibrary.TestFramework.BeginTestCase("UTF8EncodingGetBytes2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetcharcount.cs b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetcharcount.cs
new file mode 100644
index 0000000000..f81c6d7438
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetcharcount.cs
@@ -0,0 +1,234 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// GetByteCount(System.Char[],System.Int32,System.Int32) [v-jianq]
+/// </summary>
+
+public class UTF8EncodingGetCharCount
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method GetByteCount with a non-null Byte[]");
+
+ try
+ {
+ Byte[] bytes = new Byte[] {
+ 85, 84, 70, 56, 32, 69, 110,
+ 99, 111, 100, 105, 110, 103, 32,
+ 69, 120, 97, 109, 112, 108, 101};
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+ int charCount = utf8.GetCharCount(bytes, 2, 8);
+
+ if (charCount != 8)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method GetByteCount Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method GetByteCount with a null Byte[]");
+
+ try
+ {
+ Byte[] bytes = new Byte[] { };
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+ int charCount = utf8.GetCharCount(bytes, 0, 0);
+
+ if (charCount != 0)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method GetByteCount Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown when bytes is a null reference");
+
+ try
+ {
+ Byte[] bytes = null;
+ UTF8Encoding utf8 = new UTF8Encoding();
+ int charCount = utf8.GetCharCount(bytes, 2, 8);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown when bytes is a null reference.");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentOutOfRangeException is not thrown when index is less than zero.");
+
+ try
+ {
+ Byte[] bytes = new Byte[] {
+ 85, 84, 70, 56, 32, 69, 110,
+ 99, 111, 100, 105, 110, 103, 32,
+ 69, 120, 97, 109, 112, 108, 101};
+ UTF8Encoding utf8 = new UTF8Encoding();
+ int charCount = utf8.GetCharCount(bytes, -1, 8);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentNullException is not thrown when index is less than zero..");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentOutOfRangeException is not thrown when count is less than zero.");
+
+ try
+ {
+ Byte[] bytes = new Byte[] {
+ 85, 84, 70, 56, 32, 69, 110,
+ 99, 111, 100, 105, 110, 103, 32,
+ 69, 120, 97, 109, 112, 108, 101};
+ UTF8Encoding utf8 = new UTF8Encoding();
+ int charCount = utf8.GetCharCount(bytes, 2, -1);
+
+ TestLibrary.TestFramework.LogError("103.1", "ArgumentNullException is not thrown when count is less than zero..");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: ArgumentOutOfRangeException is not thrown when index and count do not denote a valid range in bytes.");
+
+ try
+ {
+ Byte[] bytes = new Byte[] {
+ 85, 84, 70, 56, 32, 69, 110,
+ 99, 111, 100, 105, 110, 103, 32,
+ 69, 120, 97, 109, 112, 108, 101};
+ UTF8Encoding utf8 = new UTF8Encoding();
+ int charCount = utf8.GetCharCount(bytes, 2, bytes.Length);
+
+ TestLibrary.TestFramework.LogError("104.1", "ArgumentNullException is not thrown whenindex and count do not denote a valid range in bytes.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ UTF8EncodingGetCharCount test = new UTF8EncodingGetCharCount();
+
+ TestLibrary.TestFramework.BeginTestCase("UTF8EncodingGetCharCount");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetchars.cs b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetchars.cs
new file mode 100644
index 0000000000..eb3df0946c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetchars.cs
@@ -0,0 +1,372 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32) [v-jianq]
+/// </summary>
+
+public class UTF8EncodingGetChars
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method GetChars with non-null chars");
+
+ try
+ {
+ Byte[] bytes;
+ Char[] chars = new Char[] {
+ '\u0023',
+ '\u0025',
+ '\u03a0',
+ '\u03a3' };
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = utf8.GetByteCount(chars, 1, 2);
+ bytes = new Byte[byteCount];
+ int charsEncodedCount = utf8.GetChars(bytes, 1, 2, chars, 0);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify method GetChars with null chars");
+
+ try
+ {
+ Byte[] bytes;
+ Char[] chars = new Char[] { };
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = utf8.GetByteCount(chars, 0, 0);
+ bytes = new Byte[byteCount];
+ int charsEncodedCount = utf8.GetChars(bytes, 0, 0, chars, 0);
+
+ if (charsEncodedCount != 0)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method GetChars Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown when bytes is a null reference ");
+
+ try
+ {
+ Byte[] bytes;
+ Char[] chars = new Char[] {
+ '\u0023',
+ '\u0025',
+ '\u03a0',
+ '\u03a3' };
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = utf8.GetByteCount(chars, 1, 2);
+ bytes = null;
+ int charsEncodedCount = utf8.GetChars(bytes, 1, 2, chars, 0);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown when bytes is a null reference ");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentNullException is not thrown when chars is a null reference ");
+
+ try
+ {
+ Byte[] bytes;
+ Char[] chars = new Char[] {
+ '\u0023',
+ '\u0025',
+ '\u03a0',
+ '\u03a3' };
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = utf8.GetByteCount(chars, 1, 2);
+ bytes = new Byte[byteCount];
+ chars = null;
+ int charsEncodedCount = utf8.GetChars(bytes, 1, 2, chars, 0);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentNullException is not thrown when chars is a null reference ");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentOutOfRangeException is not thrown when byteIndex is less than zero ");
+
+ try
+ {
+ Byte[] bytes;
+ Char[] chars = new Char[] {
+ '\u0023',
+ '\u0025',
+ '\u03a0',
+ '\u03a3' };
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = utf8.GetByteCount(chars, 1, 2);
+ bytes = new Byte[byteCount];
+ int charsEncodedCount = utf8.GetChars(bytes, -1, 2, chars, 0);
+
+ TestLibrary.TestFramework.LogError("103.1", "ArgumentOutOfRangeException is not thrown when charIndex is less than zero.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: ArgumentOutOfRangeException is not thrown when byteCount is less than zero ");
+
+ try
+ {
+ Byte[] bytes;
+ Char[] chars = new Char[] {
+ '\u0023',
+ '\u0025',
+ '\u03a0',
+ '\u03a3' };
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = utf8.GetByteCount(chars, 1, 2);
+ bytes = new Byte[byteCount];
+ int charsEncodedCount = utf8.GetChars(bytes, 1, -2, chars, 0);
+
+ TestLibrary.TestFramework.LogError("104.1", "ArgumentOutOfRangeException is not thrown when byteIndex is less than zero.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest5: ArgumentOutOfRangeException is not thrown when charIndex is less than zero. ");
+
+ try
+ {
+ Byte[] bytes;
+ Char[] chars = new Char[] {
+ '\u0023',
+ '\u0025',
+ '\u03a0',
+ '\u03a3' };
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = utf8.GetByteCount(chars, 1, 2);
+ bytes = new Byte[byteCount];
+ int charsEncodedCount = utf8.GetChars(bytes, 1, 2, chars, -1);
+
+ TestLibrary.TestFramework.LogError("105.1", "ArgumentOutOfRangeException is not thrown whenchar charIndex is less than zero..");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("105.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest6: ArgumentOutOfRangeException is not thrown when byteIndex and byteCount do not denote a valid range in chars. ");
+
+ try
+ {
+ Byte[] bytes;
+ Char[] chars = new Char[] {
+ '\u0023',
+ '\u0025',
+ '\u03a0',
+ '\u03a3' };
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = utf8.GetByteCount(chars, 1, 2);
+ bytes = new Byte[byteCount];
+ int charsEncodedCount = utf8.GetChars(bytes, 2, 2, chars, 1);
+
+ TestLibrary.TestFramework.LogError("106.1", "ArgumentOutOfRangeException is not thrown when byteIndex and byteCount do not denote a valid range in chars.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("106.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest7: ArgumentException is not thrown when chars does not have enough capacity from charIndex to the end of the array to accommodate the resulting characters");
+
+ try
+ {
+ Byte[] bytes;
+ Char[] chars = new Char[] {
+ '\u0023',
+ '\u0025',
+ '\u03a0',
+ '\u03a3' };
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+
+ int byteCount = utf8.GetByteCount(chars, 1, 2);
+ bytes = new Byte[byteCount];
+ int charsEncodedCount = utf8.GetChars(bytes, 1, 2, chars, chars.Length);
+
+ TestLibrary.TestFramework.LogError("107.1", "ArgumentException is not thrown when byteIndex is not a valid index in bytes.");
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("107.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ UTF8EncodingGetChars test = new UTF8EncodingGetChars();
+
+ TestLibrary.TestFramework.BeginTestCase("UTF8EncodingGetChars");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetdecoder.cs b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetdecoder.cs
new file mode 100644
index 0000000000..2688f8ba38
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetdecoder.cs
@@ -0,0 +1,98 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// GetDecoder [v-jianq]
+/// </summary>
+
+public class UTF8EncodingGetDecoder
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method GetDecoder");
+
+ try
+ {
+ UTF8Encoding utf8 = new UTF8Encoding();
+ Decoder decoder = utf8.GetDecoder();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ UTF8EncodingGetDecoder test = new UTF8EncodingGetDecoder();
+
+ TestLibrary.TestFramework.BeginTestCase("UTF8EncodingGetDecoder");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetencoder.cs b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetencoder.cs
new file mode 100644
index 0000000000..328ccc2e1d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetencoder.cs
@@ -0,0 +1,98 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// GetEncoder [v-jianq]
+/// </summary>
+
+public class UTF8EncodingGetEncoder
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method GetEncoder");
+
+ try
+ {
+ UTF8Encoding utf8 = new UTF8Encoding();
+ Encoder encoder = utf8.GetEncoder();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ UTF8EncodingGetEncoder test = new UTF8EncodingGetEncoder();
+
+ TestLibrary.TestFramework.BeginTestCase("UTF8EncodingGetEncoder");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggethashcode.cs b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggethashcode.cs
new file mode 100644
index 0000000000..689a7ecb1d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggethashcode.cs
@@ -0,0 +1,133 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// GetHashCode [v-jianq]
+/// </summary>
+
+public class UTF8EncodingGetHashCode
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Two return value equals with two ref of a instance");
+
+ try
+ {
+ UTF8Encoding utf8a = new UTF8Encoding();
+ UTF8Encoding utf8b = utf8a;
+
+ if (utf8a.GetHashCode()!=utf8b.GetHashCode())
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Method GetHashCode Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Two return value is not equal with two instance");
+
+ try
+ {
+ UTF8Encoding utf8a = new UTF8Encoding(true);
+ UTF8Encoding utf8b = new UTF8Encoding(true,true);
+
+ if (utf8a.GetHashCode() == utf8b.GetHashCode())
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Method GetHashCode Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ UTF8EncodingGetHashCode test = new UTF8EncodingGetHashCode();
+
+ TestLibrary.TestFramework.BeginTestCase("UTF8EncodingGetHashCode");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetmaxbytecount.cs b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetmaxbytecount.cs
new file mode 100644
index 0000000000..0b2cca2606
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetmaxbytecount.cs
@@ -0,0 +1,105 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// GetMaxByteCount(System.Int32) [v-jianq]
+/// </summary>
+
+public class UTF8EncodingGetMaxByteCount
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method GetMaxByteCount");
+
+ try
+ {
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+ int charCount = 0;
+ int maxByteCount = utf8.GetMaxByteCount(charCount);
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentOutOfRangeException is not thrown when charCount is less than zero.");
+
+ try
+ {
+ UTF8Encoding utf8 = new UTF8Encoding();
+ int charCount = -1;
+ int maxByteCount = utf8.GetMaxByteCount(charCount);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentOutOfRangeException is not thrown when charCount is less than zero. ");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ UTF8EncodingGetMaxByteCount test = new UTF8EncodingGetMaxByteCount();
+
+ TestLibrary.TestFramework.BeginTestCase("UTF8EncodingGetMaxByteCount");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetmaxcharcount.cs b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetmaxcharcount.cs
new file mode 100644
index 0000000000..d583b378aa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetmaxcharcount.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// GetMaxCharCount(System.Int32) [v-jianq]
+/// </summary>
+
+public class UTF8EncodingGetMaxCharCount
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method GetMaxCharCount");
+
+ try
+ {
+ UTF8Encoding utf8 = new UTF8Encoding();
+ int byteCount = 8;
+ int maxCharCount = utf8.GetMaxCharCount(byteCount);
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentOutOfRangeException is not thrown when byteCount is less than zero.");
+
+ try
+ {
+ UTF8Encoding utf8 = new UTF8Encoding();
+ int byteCount = -1;
+ int maxCharCount = utf8.GetMaxCharCount(byteCount);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentOutOfRangeException is not thrown when byteCount is less than zero.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ UTF8EncodingGetMaxCharCount test = new UTF8EncodingGetMaxCharCount();
+
+ TestLibrary.TestFramework.BeginTestCase("UTF8EncodingGetMaxCharCount");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetpreamble.cs b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetpreamble.cs
new file mode 100644
index 0000000000..0293f04911
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetpreamble.cs
@@ -0,0 +1,100 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// GetPreamble [v-jianq]
+/// </summary>
+
+public class UTF8EncodingGetPreamble
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method GetPreamble");
+
+ try
+ {
+ UTF8Encoding UTF8NoPreamble = new UTF8Encoding();
+ Byte[] preamble;
+
+ preamble = UTF8NoPreamble.GetPreamble();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ UTF8EncodingGetPreamble test = new UTF8EncodingGetPreamble();
+
+ TestLibrary.TestFramework.BeginTestCase("UTF8EncodingGetPreamble");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetstring.cs b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetstring.cs
new file mode 100644
index 0000000000..b88f381eea
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/text/utf8encoding/utf8encodinggetstring.cs
@@ -0,0 +1,201 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+/// <summary>
+/// GetString(System.Byte[],System.Int32,System.Int32) [v-jianq]
+/// </summary>
+
+public class UTF8EncodingGetString
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: ");
+
+ try
+ {
+ Byte[] bytes = new Byte[] {
+ 85, 84, 70, 56, 32, 69, 110,
+ 99, 111, 100, 105, 110, 103, 32,
+ 69, 120, 97, 109, 112, 108, 101};
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+ string str = utf8.GetString(bytes, 0, bytes.Length);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentNullException is not thrown when bytes is a null reference");
+
+ try
+ {
+ Byte[] bytes = null;
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+ string str = utf8.GetString(bytes, 0, 2);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentNullException is not thrown when bytes is a null reference.");
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentOutOfRangeException is not thrown when index is less than zero.");
+
+ try
+ {
+ Byte[] bytes = new Byte[] {
+ 85, 84, 70, 56, 32, 69, 110,
+ 99, 111, 100, 105, 110, 103, 32,
+ 69, 120, 97, 109, 112, 108, 101};
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+ string str = utf8.GetString(bytes, -1, bytes.Length);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentNullException is not thrown when index is less than zero..");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentOutOfRangeException is not thrown when count is less than zero.");
+
+ try
+ {
+ Byte[] bytes = new Byte[] {
+ 85, 84, 70, 56, 32, 69, 110,
+ 99, 111, 100, 105, 110, 103, 32,
+ 69, 120, 97, 109, 112, 108, 101};
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+ string str = utf8.GetString(bytes, 0, -1);
+
+ TestLibrary.TestFramework.LogError("103.1", "ArgumentNullException is not thrown when count is less than zero..");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("103.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest4: ArgumentOutOfRangeException is not thrown when index and count do not denote a valid range in bytes.");
+
+ try
+ {
+ Byte[] bytes = new Byte[] {
+ 85, 84, 70, 56, 32, 69, 110,
+ 99, 111, 100, 105, 110, 103, 32,
+ 69, 120, 97, 109, 112, 108, 101};
+
+ UTF8Encoding utf8 = new UTF8Encoding();
+ string str = utf8.GetString(bytes, 1, bytes.Length);
+
+ TestLibrary.TestFramework.LogError("104.1", "ArgumentNullException is not thrown whenindex and count do not denote a valid range in bytes.");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ UTF8EncodingGetString test = new UTF8EncodingGetString();
+
+ TestLibrary.TestFramework.BeginTestCase("UTF8EncodingGetString");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/threading/autoresetevent/AutoResetEventCtor.csproj b/tests/src/CoreMangLib/cti/system/threading/autoresetevent/AutoResetEventCtor.csproj
new file mode 100644
index 0000000000..aef0a8da87
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/autoresetevent/AutoResetEventCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="autoreseteventctor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/threading/autoresetevent/AutoResetEventReSet.csproj b/tests/src/CoreMangLib/cti/system/threading/autoresetevent/AutoResetEventReSet.csproj
new file mode 100644
index 0000000000..6805b93469
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/autoresetevent/AutoResetEventReSet.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="autoreseteventreset.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/threading/autoresetevent/AutoResetEventSet.csproj b/tests/src/CoreMangLib/cti/system/threading/autoresetevent/AutoResetEventSet.csproj
new file mode 100644
index 0000000000..36408d4465
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/autoresetevent/AutoResetEventSet.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="autoreseteventset.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/threading/autoresetevent/autoreseteventctor.cs b/tests/src/CoreMangLib/cti/system/threading/autoresetevent/autoreseteventctor.cs
new file mode 100644
index 0000000000..284889d8f2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/autoresetevent/autoreseteventctor.cs
@@ -0,0 +1,110 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+
+public class AutoResetEventCtor
+{
+ private const int c_MILLISECONDS_TOWAIT = 5000; // milliseconds
+ private const long c_DELTA = 9999999; // ticks (.999 seconds)
+
+ public static int Main()
+ {
+ AutoResetEventCtor test = new AutoResetEventCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("AutoResetEventCtor");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ AutoResetEvent are;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: AutoResetEvent.Ctor(true)");
+
+ try
+ {
+ // true means that the initial state should be signaled
+ are = new AutoResetEvent(true);
+
+ // verify that the autoreset event is signaled
+ // if it is not signaled the following call will block for ever
+ TestLibrary.TestFramework.LogInformation("Calling AutoResetEvent.WaitOne()... if the event is not signaled it will hang");
+ are.WaitOne();
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ AutoResetEvent are;
+ long ticksBefore;
+ long ticksAfter;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: AutoResetEvent.Ctor(false)");
+
+ try
+ {
+ // true means that the initial state should be signaled
+ are = new AutoResetEvent(false);
+
+ ticksBefore = DateTime.Now.Ticks;
+
+ // verify that the autoreset event is signaled
+ // if it is not signaled the following call will block for ever
+ TestLibrary.TestFramework.LogInformation("Calling AutoResetEvent.WaitOne()... if the event is signaled it will not wait long enough");
+ are.WaitOne(c_MILLISECONDS_TOWAIT);
+
+ ticksAfter = DateTime.Now.Ticks;
+
+ if (c_DELTA < Math.Abs((ticksAfter - ticksBefore) - (c_MILLISECONDS_TOWAIT*10000)))
+ {
+ TestLibrary.TestFramework.LogError("002", "AutoResetEvent did not wait long enough... this implies that the parameter was not respected.");
+ TestLibrary.TestFramework.LogError("002", " WaitTime=" + (ticksAfter-ticksBefore) + " (ticks)");
+ TestLibrary.TestFramework.LogError("002", " Execpted=" + (c_MILLISECONDS_TOWAIT*10000) + " (ticks)");
+ TestLibrary.TestFramework.LogError("002", " Acceptable Delta=" + c_DELTA + " (ticks)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/threading/autoresetevent/autoreseteventreset.cs b/tests/src/CoreMangLib/cti/system/threading/autoresetevent/autoreseteventreset.cs
new file mode 100644
index 0000000000..9a3df93c3a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/autoresetevent/autoreseteventreset.cs
@@ -0,0 +1,89 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+
+public class AutoResetEventReset
+{
+ private const int c_MILLISECONDS_TOWAIT = 5000; // milliseconds
+ private const long c_DELTA = 9999999; // ticks (0.999 seconds)
+
+ public static int Main()
+ {
+ AutoResetEventReset test = new AutoResetEventReset();
+
+ TestLibrary.TestFramework.BeginTestCase("AutoResetEventReset");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ AutoResetEvent are;
+ long ticksBefore;
+ long ticksAfter;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: AutoResetEvent.Reset()");
+
+ try
+ {
+ // true means that the initial state should be signaled
+ are = new AutoResetEvent(true);
+
+ if (!are.Reset())
+ {
+ TestLibrary.TestFramework.LogError("001", "AutoResetEvent.Reset() failed");
+ retVal = false;
+ }
+
+ ticksBefore = DateTime.Now.Ticks;
+
+ // verify that the autoreset event is signaled
+ // if it is not signaled the following call will block for ever
+ TestLibrary.TestFramework.LogInformation("Calling AutoResetEvent.WaitOne()... if the event is signaled it will not wait long enough");
+ are.WaitOne(c_MILLISECONDS_TOWAIT);
+
+ ticksAfter = DateTime.Now.Ticks;
+
+ if (c_DELTA < Math.Abs((ticksAfter - ticksBefore) - (c_MILLISECONDS_TOWAIT*10000)))
+ {
+ TestLibrary.TestFramework.LogError("002", "AutoResetEvent did not wait long enough... this implies that the parameter was not respected.");
+ TestLibrary.TestFramework.LogError("002", " WaitTime=" + (ticksAfter-ticksBefore) + " (ticks)");
+ TestLibrary.TestFramework.LogError("002", " Execpted=" + (c_MILLISECONDS_TOWAIT*10000) + " (ticks)");
+ TestLibrary.TestFramework.LogError("002", " Acceptable Delta=" + c_DELTA + " (ticks)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/threading/autoresetevent/autoreseteventset.cs b/tests/src/CoreMangLib/cti/system/threading/autoresetevent/autoreseteventset.cs
new file mode 100644
index 0000000000..dea515c527
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/autoresetevent/autoreseteventset.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+
+public class AutoResetEventSet
+{
+ public static int Main()
+ {
+ AutoResetEventSet test = new AutoResetEventSet();
+
+ TestLibrary.TestFramework.BeginTestCase("AutoResetEventSet");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ AutoResetEvent are;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: AutoResetEvent.Set()");
+
+ try
+ {
+ // false means that the initial state should be not signaled
+ are = new AutoResetEvent(false);
+
+ // set the signal
+ if (!are.Set())
+ {
+ TestLibrary.TestFramework.LogError("001", "AutoResetEvent.Set() failed");
+ retVal = false;
+ }
+
+ // verify that the autoreset event is signaled
+ // if it is not signaled the following call will block for ever
+ TestLibrary.TestFramework.LogInformation("Calling AutoResetEvent.WaitOne()... if the event is not signaled it will hang");
+ are.WaitOne();
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedAdd1.csproj b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedAdd1.csproj
new file mode 100644
index 0000000000..962f1efd73
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedAdd1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="interlockedadd1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedAdd2.csproj b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedAdd2.csproj
new file mode 100644
index 0000000000..4ee8578d96
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedAdd2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="interlockedadd2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedCompareExchange1.csproj b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedCompareExchange1.csproj
new file mode 100644
index 0000000000..e08bcbe212
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedCompareExchange1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="interlockedcompareexchange1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedCompareExchange5.csproj b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedCompareExchange5.csproj
new file mode 100644
index 0000000000..40dbaa7b09
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedCompareExchange5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="interlockedcompareexchange5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedCompareExchange6.csproj b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedCompareExchange6.csproj
new file mode 100644
index 0000000000..a7fe800683
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedCompareExchange6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="interlockedcompareexchange6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedCompareExchange7.csproj b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedCompareExchange7.csproj
new file mode 100644
index 0000000000..550baf90cc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedCompareExchange7.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="interlockedcompareexchange7.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedDecrement1.csproj b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedDecrement1.csproj
new file mode 100644
index 0000000000..bf24dd73c8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedDecrement1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="interlockeddecrement1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedDecrement2.csproj b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedDecrement2.csproj
new file mode 100644
index 0000000000..4eb114b05a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedDecrement2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="interlockeddecrement2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedExchange1.csproj b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedExchange1.csproj
new file mode 100644
index 0000000000..cf5566fa10
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedExchange1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="interlockedexchange1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedExchange5.csproj b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedExchange5.csproj
new file mode 100644
index 0000000000..83ce4f513c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedExchange5.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="interlockedexchange5.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedExchange6.csproj b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedExchange6.csproj
new file mode 100644
index 0000000000..b5451b29e7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedExchange6.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="interlockedexchange6.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedExchange7.csproj b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedExchange7.csproj
new file mode 100644
index 0000000000..48545fd140
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedExchange7.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="interlockedexchange7.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedIncrement1.csproj b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedIncrement1.csproj
new file mode 100644
index 0000000000..860a761832
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedIncrement1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="interlockedincrement1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedIncrement2.csproj b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedIncrement2.csproj
new file mode 100644
index 0000000000..54662d69af
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/InterlockedIncrement2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="interlockedincrement2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedadd1.cs b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedadd1.cs
new file mode 100644
index 0000000000..e2fdfb696b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedadd1.cs
@@ -0,0 +1,224 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+
+// This tests Interlocked.Add.
+// Interlocked.Add Adds two 32-bit integers and replaces the first
+// with the sum, as an atomic operation.
+// These tests make sure Additions are equivalent with normal
+// Int32 adds, which means:
+// * A+B in interlocked is the same as A+B non-interlocked
+// * Positive and negative overflows wrap and do not throw exceptions.
+public class InterlockedAdd1
+{
+ private const int c_NUM_LOOPS = 100;
+
+ public static int Main()
+ {
+ InterlockedAdd1 test = new InterlockedAdd1();
+
+ TestLibrary.TestFramework.BeginTestCase("InterlockedAdd1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+
+ // PosTest1 Makes sure Interlocked.Add adds Int32s
+ // correctly vs. the sequential add, and does not throw an exception.
+ // This test iterates 100 times. Each time it gets two Int32s,
+ // value and location. It adds them to get a "manual" value,
+ // totalMan. It then uses Interlocked.Add to add value to location.
+ // The sum is returned as totalInc. Then it checks that all three
+ // are equal. If any time they are not equal, retVal gets set to
+ // false, and ultimately it returns false. It should not throw an
+ // exception, doing so causes the test to fail.
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Int32 location;
+ Int32 value;
+ Int32 totalInc;
+ Int32 totalMan;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Int32 Interlocked.Add(Int32&,Int32)");
+
+
+ try
+ {
+ for (int i=0; i<c_NUM_LOOPS; i++)
+ {
+ value = TestLibrary.Generator.GetInt32(-55);
+ location = TestLibrary.Generator.GetInt32(-55);
+
+ totalMan = location + value;
+ totalInc = Interlocked.Add(ref location, value);
+ // At this point, we should be able to make
+ // the following assertion:
+ // totalInc = totalMan = location
+
+ retVal = CheckValues(totalMan, totalInc, location) && retVal;
+ // Note that (&&) performs a logical-AND of
+ // its bool operands, but only evaluates its second
+ // operand if necessary. first time thru, retVal (RHS)
+ // is true, as it was initialized above. If CheckValues
+ // is true, then it checks retVal (RHS), it is also true,
+ // so retVal (LHS) gets set to true. This stays this
+ // way so long as CheckValues keeps returning true.
+ // Then, if some time CheckValues returns false (0), this
+ // expression does not check retVal (RHS), and instead
+ // retVal (LHS) becomes false. Next time thru, retVal
+ // (RHS) is false even if CheckValues returns true, so
+ // retVal (both RHS and LHS) remains false for all
+ // subsequent iterations. As such, if any one of the 100
+ // comparisons fails, retVal returns false
+ }
+ }
+ catch (Exception e)
+ {
+ // any exception causes test failure.
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ // PosTest2 makes sure Interlocked.Add handles an
+ // overflow condition by wrapping: if the value being added to is
+ // Int32.MaxValue and the added value is 1, the result is
+ // Int32.MinValue; if added value is 2, the result is
+ // (Int32.MinValue + 1); and so on. No exception should be thrown.
+ // As such, throwing an exception during this test is a failure.
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Int32 location;
+ Int32 value;
+ Int32 totalInc;
+ Int32 totalMan;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Cause a positive Int32 overflow");
+
+ try
+ {
+ value = Int32.MaxValue;
+ location = 10;
+
+ totalMan = location + value;
+ totalInc = Interlocked.Add(ref location, value);
+ // at this point, we should be able to make
+ // the following assertion: totalInc = totalMan = location
+ // Note that we should also be able to make the more precise
+ // assertion:
+ // totalInc = totalMan = location = 9 = (original)location-1
+ // But this test does not do that
+
+ retVal = CheckValues(totalMan, totalInc, location) && retVal;
+ // Note that (&&) performs a logical-AND of
+ // its bool operands, but only evaluates its second operand
+ // if necessary. retVal (RHS) is true, as it was initialized
+ // above. if CheckValues is true, then it checks retVal
+ // (RHS), it is also true, so retVal (LHS) gets set to true.
+ // If returns false (0), this expression does not check
+ // retVal (RHS), and instead retVal (LHS) becomes false.
+ }
+ catch (Exception e)
+ {
+ // any exception causes test failure.
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ // PosTest3 makes sure Interlocked.Add handles a
+ // negative overflow condition by wrapping: if the value being
+ // added to is Int32.MinValue and the added value is -1, the
+ // result should be Int32.MaxValue; if added value is -2, the
+ // result should be (Int32.MaxValue - 1); and so on. No exception
+ // should be thrown. As such, throwing an exception during this
+ // test is a failure.
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ Int32 location;
+ Int32 value;
+ Int32 totalInc;
+ Int32 totalMan;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Cause a negative Int32 overflow");
+
+ try
+ {
+ value = -10;
+ location = Int32.MinValue;
+
+ totalMan = location + value;
+ totalInc = Interlocked.Add(ref location, value);
+ // at this point, we should be able to make the
+ // following assertion: totalInc = totalMan = location
+ // Note that we should also be able to make the more precise
+ // assertion:
+ // totalInc = totalMan = location = -9 = (original)location+1
+ // But this test does not do that
+
+ retVal = CheckValues(totalMan, totalInc, location) && retVal;
+ // Note that (&&) performs a logical-AND of its bool operands,
+ // but only evaluates its second operand if necessary.
+ // retVal (RHS) is true, as it was initialized above.
+ // if CheckValues is true, then it checks retVal (RHS),
+ // it is also true, so retVal (LHS) gets set to true.
+ // If returns false (0), this expression does not check
+ // retVal (RHS), and instead retVal (LHS) becomes false.
+ }
+ catch (Exception e)
+ {
+ // any exception causes test failure.
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ // CheckValues returns false if the three values passed are not
+ // the same.
+ public bool CheckValues(Int32 totalMan, Int32 totalInc, Int32 location)
+ {
+ if (totalInc != totalMan || location != totalMan)
+ {
+ TestLibrary.TestFramework.LogError("005", "Interlocked.Add() returned wrong value. Expected(" + totalMan + ") Got(" + totalInc + ") and (" + location + ")");
+ return false;
+ }
+
+ return true;
+ }
+
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedadd2.cs b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedadd2.cs
new file mode 100644
index 0000000000..6b3a377bc0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedadd2.cs
@@ -0,0 +1,214 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+
+// This tests Interlocked.Add.
+// Interlocked.Add Adds two 64-bit integers and replaces the first
+// with the sum, as an atomic operation.
+// These tests make sure Additions are equivalent with normal
+// Int64 adds, which means:
+// * A+B in interlocked is the same as A+B non-interlocked
+// * Positive and negative overflows wrap and do not throw exceptions.
+public class InterlockedAdd2
+{
+ private const int c_NUM_LOOPS = 100;
+
+ public static int Main()
+ {
+ InterlockedAdd2 test = new InterlockedAdd2();
+
+ TestLibrary.TestFramework.BeginTestCase("InterlockedAdd2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ // PosTest1 Makes sure Interlocked.Add adds Int64s
+ // correctly vs. the sequential add, and does not throw an exception.
+ // This test iterates 100 times. Each time it gets two Int64s,
+ // value and location. It adds them to get a "manual" value,
+ // totalMan. It then uses Interlocked.Add to add value to location.
+ // The sum is returned as totalInc. Then it checks that all three
+ // are equal. If any time they are not equal, retVal gets set to
+ // false, and ultimately it returns false. It should not throw an
+ // exception, doing so causes the test to fail.
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Int64 location;
+ Int64 value;
+ Int64 totalInc;
+ Int64 totalMan;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Int64 Interlocked.Add(Int64&,Int64)");
+
+ try
+ {
+ for (int i=0; i<c_NUM_LOOPS; i++)
+ {
+ value = TestLibrary.Generator.GetInt64(-55);
+ location = TestLibrary.Generator.GetInt64(-55);
+
+ totalMan = location + value;
+ totalInc = Interlocked.Add(ref location, value);
+ // At this point, we should be able to make
+ // the following assertion:
+ // totalInc = totalMan = location
+
+ retVal = CheckValues(totalMan, totalInc, location) && retVal;
+ // Note that (&&) performs a logical-AND of
+ // its bool operands, but only evaluates its second
+ // operand if necessary. first time thru, retVal (RHS)
+ // is true, as it was initialized above. If CheckValues
+ // is true, then it checks retVal (RHS), it is also true,
+ // so retVal (LHS) gets set to true. This stays this
+ // way so long as CheckValues keeps returning true.
+ // Then, if some time CheckValues returns false (0), this
+ // expression does not check retVal (RHS), and instead
+ // retVal (LHS) becomes false. Next time thru, retVal
+ // (RHS) is false even if CheckValues returns true, so
+ // retVal (both RHS and LHS) remains false for all
+ // subsequent iterations. As such, if any one of the 100
+ // comparisons fails, retVal returns false
+ }
+ }
+ catch (Exception e)
+ {
+ // any exception causes test failure.
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ // PosTest2 makes sure Interlocked.Add handles an
+ // overflow condition by wrapping: if the value being added to is
+ // Int64.MaxValue and the added value is 1, the result is
+ // Int64.MinValue; if added value is 2, the result is
+ // (Int64.MinValue + 1); and so on. No exception should be thrown.
+ // As such, throwing an exception during this test is a failure.
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Int64 location;
+ Int64 value;
+ Int64 totalInc;
+ Int64 totalMan;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Cause a positive Int64 overflow");
+
+ try
+ {
+ value = Int64.MaxValue;
+ location = 10;
+
+ totalMan = location + value;
+ totalInc = Interlocked.Add(ref location, value);
+ // at this point, we should be able to make
+ // the following assertion: totalInc = totalMan = location
+ // Note that we should also be able to make the more precise
+ // assertion:
+ // totalInc = totalMan = location = 9 = (original)location-1
+ // But this test does not do that
+
+ retVal = CheckValues(totalMan, totalInc, location) && retVal;
+ // Note that (&&) performs a logical-AND of
+ // its bool operands, but only evaluates its second operand
+ // if necessary. retVal (RHS) is true, as it was initialized
+ // above. if CheckValues is true, then it checks retVal
+ // (RHS), it is also true, so retVal (LHS) gets set to true.
+ // If returns false (0), this expression does not check
+ // retVal (RHS), and instead retVal (LHS) becomes false.
+ }
+ catch (Exception e)
+ {
+ // any exception causes test failure.
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ // PosTest3 makes sure Interlocked.Add handles a
+ // negative overflow condition by wrapping: if the value being
+ // added to is Int64.MinValue and the added value is -1, the
+ // result should be Int64.MaxValue; if added value is -2, the
+ // result should be (Int64.MaxValue - 1); and so on. No exception
+ // should be thrown. As such, throwing an exception during this
+ // test is a failure.
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ Int64 location;
+ Int64 value;
+ Int64 totalInc;
+ Int64 totalMan;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Cause a negative Int64 overflow");
+
+ try
+ {
+ value = -10;
+ location = Int64.MinValue;
+
+ totalMan = location + value;
+ totalInc = Interlocked.Add(ref location, value);
+ // at this point, we should be able to make the
+ // following assertion: totalInc = totalMan = location
+ // Note that we should also be able to make the more precise
+ // assertion:
+ // totalInc = totalMan = location = -9 = (original)location+1
+ // But this test does not do that
+
+ retVal = CheckValues(totalMan, totalInc, location) && retVal;
+ }
+ catch (Exception e)
+ {
+ // any exception causes test failure.
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ // CheckValues returns false if the three values passed are not
+ // the same.
+ public bool CheckValues(Int64 totalMan, Int64 totalInc, Int64 location)
+ {
+ if (totalInc != totalMan || location != totalMan)
+ {
+ TestLibrary.TestFramework.LogError("005", "Interlocked.Add() returned wrong value. Expected(" + totalMan + ") Got(" + totalInc + ") and (" + location + ")");
+ return false;
+ }
+
+ return true;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedcompareexchange1.cs b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedcompareexchange1.cs
new file mode 100644
index 0000000000..9177ad4811
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedcompareexchange1.cs
@@ -0,0 +1,141 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+
+// This test makes sure that CompareExchange<T> works
+// where T is string
+public class InterlockedCompareExchange1
+{
+ private const int c_NUM_LOOPS = 100;
+ private const int c_MIN_STRING_LEN = 64;
+ private const int c_MAX_STRING_LEN = 1024;
+
+ public static int Main()
+ {
+ InterlockedCompareExchange1 test = new InterlockedCompareExchange1();
+
+ TestLibrary.TestFramework.BeginTestCase("InterlockedCompareExchange1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1<string>() && retVal;
+ retVal = PosTest2<string>() && retVal;
+
+ return retVal;
+ }
+
+ // CompareExchange of equal strings as T
+ public bool PosTest1<T>() where T : class
+ {
+ bool retVal = true;
+ T location;
+ T value;
+ T comparand;
+ T oldLocation;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: T Interlocked.CompareExchange(T&,T,T) (T=" + typeof(T) + ") where comparand is equal");
+
+ try
+ {
+ for (int i=0; i<c_NUM_LOOPS; i++)
+ {
+ value = (T)(object)TestLibrary.Generator.GetString(false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ location = (T)(object)TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ comparand = location;
+
+ // location=comparand, so location should be replaced by value and
+ // oldLocation should equal comparand
+ oldLocation = Interlocked.CompareExchange<T>(ref location, value, comparand);
+
+ if (!location.Equals(value))
+ {
+ TestLibrary.TestFramework.LogError("001", "Interlocked.CompareExchange() did not do the exchange correctly: Expected(" + value + ") Actual(" + location + ")");
+ retVal = false;
+ }
+
+ if (!oldLocation.Equals(comparand))
+ {
+ TestLibrary.TestFramework.LogError("002", "Interlocked.CompareExchange() did not return the expected value: Expected(" + comparand + ") Actual(" + oldLocation + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ // CompareExchange of unequal strings as T
+ public bool PosTest2<T>() where T : class
+ {
+ bool retVal = true;
+ T location;
+ T value;
+ T comparand;
+ T oldLocation;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: T Interlocked.CompareExchange(T&,T,T) (T=" + typeof(T) + ") where comparand are not equal");
+
+ try
+ {
+ for (int i=0; i<c_NUM_LOOPS; i++)
+ {
+ value = (T)(object)TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ location = (T)(object)TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ comparand = value;
+ while(comparand.Equals(location))
+ {
+ comparand = (T)(object)TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ }
+
+ // location!=comparand, so no swap should take place.
+ // location should not be replaced by value
+ // oldLocation should not equal comparand
+ oldLocation = Interlocked.CompareExchange<T>(ref location, value, comparand);
+
+ if (location.Equals(value))
+ {
+ TestLibrary.TestFramework.LogError("004", "Interlocked.CompareExchange() did not do the exchange correctly: Expected(" + value + ") Actual(" + location + ")");
+ retVal = false;
+ }
+
+ if (oldLocation.Equals(comparand))
+ {
+ TestLibrary.TestFramework.LogError("005", "Interlocked.CompareExchange() did not return the expected value: Expected(" + comparand + ") Actual(" + oldLocation + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedcompareexchange5.cs b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedcompareexchange5.cs
new file mode 100644
index 0000000000..bb203353cb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedcompareexchange5.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+
+// Tests that CompareExchange(Int64, Int64, Int64)
+// actually switches values when location = comparand and
+// does not when it does not
+public class InterlockedCompareExchange5
+{
+ private const int c_NUM_LOOPS = 100;
+
+ public static int Main()
+ {
+ InterlockedCompareExchange5 test = new InterlockedCompareExchange5();
+
+ TestLibrary.TestFramework.BeginTestCase("InterlockedCompareExchange5");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ // This test iterates 100 times. Each time it gets two
+ // Int64s, value and location. It stores location in comparand, so
+ // they will be equal on comparison. It then uses
+ // Interlocked.CompareExchange to compare location with comparand.
+ // Since they are equal, it must exchange: location is replaced by
+ // value, and the original value in location is returned to oldLocation.
+ // Then it checks that location now equals value, and that oldLocation
+ // equals comparand. If either of these are not true, retVal gets set to
+ // false, and ultimately it returns false. since location is never null,
+ // it should not throw an exception, so doing so causes the test
+ // to fail.
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Int64 location;
+ Int64 value;
+ Int64 comparand;
+ Int64 oldLocation;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Int64 Interlocked.CompareExchange(Int64&,Int64,Int64) where comparand is equal");
+
+ try
+ {
+ for (int i=0; i<c_NUM_LOOPS; i++)
+ {
+ value = TestLibrary.Generator.GetInt64(-55);
+ location = TestLibrary.Generator.GetInt64(-55);
+ comparand = location;
+
+ oldLocation = Interlocked.CompareExchange(ref location, value, comparand);
+ // At this point, we should be able to make
+ // the following assertion:
+ // location = value
+ // oldLocation = comparand
+
+ if (!location.Equals(value))
+ {
+ TestLibrary.TestFramework.LogError("001", "Interlocked.CompareExchange() did not do the exchange correctly: Expected(" + value + ") Actual(" + location + ")");
+ retVal = false;
+ }
+
+ if (!oldLocation.Equals(comparand))
+ {
+ TestLibrary.TestFramework.LogError("002", "Interlocked.CompareExchange() did not return the expected value: Expected(" + comparand + ") Actual(" + oldLocation + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ // since location is not null, any exception
+ // causes test failure.
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ // This test iterates 100 times. Each time it gets two
+ // Int64s, value and location. It then gets a value for comparand, such
+ // that it is NOT EQUAL to location. It then uses
+ // Interlocked.CompareExchange to compare location with comparand.
+ // Since they are not equal, it does not exchange.
+ // since location is never null,
+ // it should not throw an exception, so doing so causes the test
+ // to fail.
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Int64 location;
+ Int64 value;
+ Int64 comparand;
+ Int64 oldLocation;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Int64 Interlocked.CompareExchange(Int64&,Int64,Int64) where comparand are not equal");
+
+ try
+ {
+ for (int i=0; i<c_NUM_LOOPS; i++)
+ {
+ value = TestLibrary.Generator.GetInt64(-55);
+ location = TestLibrary.Generator.GetInt64(-55);
+ comparand = value;
+ while(comparand.Equals(location))
+ {
+ comparand = TestLibrary.Generator.GetInt64(-55);
+ }
+
+ oldLocation = Interlocked.CompareExchange(ref location, value, comparand);
+ // At this point, we should be able to make
+ // the following assertions:
+ // location != value
+ // location != comparand
+ // location = oldLocation
+ // oldLocation != comparand
+
+ if (location.Equals(value))
+ {
+ TestLibrary.TestFramework.LogError("004", "Interlocked.CompareExchange() did not do the exchange correctly: Expected(" + value + ") Actual(" + location + ")");
+ retVal = false;
+ }
+
+ if (oldLocation.Equals(comparand))
+ {
+ TestLibrary.TestFramework.LogError("005", "Interlocked.CompareExchange() did not return the expected value: Expected(" + comparand + ") Actual(" + oldLocation + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ // since location is not null, any exception
+ // causes test failure.
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedcompareexchange6.cs b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedcompareexchange6.cs
new file mode 100644
index 0000000000..44b1374e3f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedcompareexchange6.cs
@@ -0,0 +1,130 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+
+public class InterlockedCompareExchange6
+{
+ private const int c_NUM_LOOPS = 100;
+
+ public static int Main()
+ {
+ InterlockedCompareExchange6 test = new InterlockedCompareExchange6();
+
+ TestLibrary.TestFramework.BeginTestCase("InterlockedCompareExchange6");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Int32 location;
+ Int32 value;
+ Int32 comparand;
+ Int32 oldLocation;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Int32 Interlocked.CompareExchange(Int32&,Int32,Int32) where comparand is equal");
+
+ try
+ {
+ for (int i=0; i<c_NUM_LOOPS; i++)
+ {
+ value = TestLibrary.Generator.GetInt32(-55);
+ location = TestLibrary.Generator.GetInt32(-55);
+ comparand = location;
+
+ oldLocation = Interlocked.CompareExchange(ref location, value, comparand);
+
+ if (!location.Equals(value))
+ {
+ TestLibrary.TestFramework.LogError("001", "Interlocked.CompareExchange() did not do the exchange correctly: Expected(" + value + ") Actual(" + location + ")");
+ retVal = false;
+ }
+
+ if (!oldLocation.Equals(comparand))
+ {
+ TestLibrary.TestFramework.LogError("002", "Interlocked.CompareExchange() did not return the expected value: Expected(" + comparand + ") Actual(" + oldLocation + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Int32 location;
+ Int32 value;
+ Int32 comparand;
+ Int32 oldLocation;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Int32 Interlocked.CompareExchange(Int32&,Int32,Int32) where comparand are not equal");
+
+ try
+ {
+ for (int i=0; i<c_NUM_LOOPS; i++)
+ {
+ value = TestLibrary.Generator.GetInt32(-55);
+ location = TestLibrary.Generator.GetInt32(-55);
+ comparand = value;
+ while(comparand.Equals(location))
+ {
+ comparand = TestLibrary.Generator.GetInt32(-55);
+ }
+
+ oldLocation = Interlocked.CompareExchange(ref location, value, comparand);
+
+ if (location.Equals(value))
+ {
+ TestLibrary.TestFramework.LogError("004", "Interlocked.CompareExchange() did not do the exchange correctly: Expected(" + value + ") Actual(" + location + ")");
+ retVal = false;
+ }
+
+ if (oldLocation.Equals(comparand))
+ {
+ TestLibrary.TestFramework.LogError("005", "Interlocked.CompareExchange() did not return the expected value: Expected(" + comparand + ") Actual(" + oldLocation + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedcompareexchange7.cs b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedcompareexchange7.cs
new file mode 100644
index 0000000000..1ef2e711f1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedcompareexchange7.cs
@@ -0,0 +1,361 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+
+// This tests CompareExchange<object>.
+// It just casts a bunch of different types to object,
+// then makes sure CompareExchange<object> works on those objects.
+public class InterlockedCompareExchange7
+{
+ private const int c_NUM_LOOPS = 100;
+ private const int c_MIN_STRING_LEN = 5;
+ private const int c_MAX_STRING_LEN = 128;
+
+ public static int Main()
+ {
+ InterlockedCompareExchange7 test = new InterlockedCompareExchange7();
+
+ TestLibrary.TestFramework.BeginTestCase("InterlockedCompareExchange7");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ // This particular test is for when the comparands are equal and the
+ // switch should take place.
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ object location;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object Interlocked.CompareExchange<object>(object&,object, object) where comparand is equal");
+
+ try
+ {
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object == Byte");
+ location = (object)TestLibrary.Generator.GetByte(-55);
+ retVal = ExchangeObjects(
+ true,
+ location,
+ location,
+ (object)TestLibrary.Generator.GetByte(-55)
+ ) && retVal;
+ // Note that (&&) performs a logical-AND of
+ // its bool operands, but only evaluates its second
+ // operand if necessary. When ExchangeObjects is first
+ // called (above), retVal (RHS)
+ // is true, as it was initialized above. If ExchangeObjects
+ // returns true, then it checks retVal (RHS), it is also true,
+ // so retVal (LHS) gets set to true. This stays this
+ // way so long as ExchangeObjects returns true in this and
+ // subsequent calls.
+ // If some time ExchangeObjects returns false (0), this
+ // expression does not check retVal (RHS), and instead
+ // retVal (LHS) becomes false. Next call to ExchangeObjects,
+ // retVal (RHS) is false even if ExchangeObjects returns true, so
+ // retVal (both RHS and LHS) remains false for all
+ // subsequent calls to ExchangeObjects. As such, if any one of
+ // the many calls to ExchangeObjects fails, retVal returns false
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object == Byte[]");
+ byte[] bArr1 = new Byte[5 + (TestLibrary.Generator.GetInt32(-55) % 1024)];
+ byte[] bArr2 = new Byte[5 + (TestLibrary.Generator.GetInt32(-55) % 1024)];
+ TestLibrary.Generator.GetBytes(-55, bArr1);
+ TestLibrary.Generator.GetBytes(-55, bArr2);
+ location = (object)bArr1;
+ retVal = ExchangeObjects(
+ true,
+ location,
+ location,
+ (object)bArr2
+ ) && retVal;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object == Int16");
+ location = (object)TestLibrary.Generator.GetInt16(-55);
+ retVal = ExchangeObjects(
+ true,
+ location,
+ location,
+ (object)TestLibrary.Generator.GetInt16(-55)
+ ) && retVal;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object == Int32");
+ location = (object)TestLibrary.Generator.GetInt32(-55);
+ retVal = ExchangeObjects(
+ true,
+ location,
+ location,
+ (object)TestLibrary.Generator.GetInt32(-55)
+ ) && retVal;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object == Int64");
+ location = (object)(object)TestLibrary.Generator.GetInt64(-55);
+ retVal = ExchangeObjects(
+ true,
+ location,
+ location,
+ (object)TestLibrary.Generator.GetInt64(-55)
+ ) && retVal;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object == Single");
+ location = (object)(object)TestLibrary.Generator.GetSingle(-55);
+ retVal = ExchangeObjects(
+ true,
+ location,
+ location,
+ (object)TestLibrary.Generator.GetSingle(-55)
+ ) && retVal;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object == Double");
+ location = (object)(object)TestLibrary.Generator.GetDouble(-55);
+ retVal = ExchangeObjects(
+ true,
+ location,
+ location,
+ (object)TestLibrary.Generator.GetDouble(-55)
+ ) && retVal;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object == string");
+ location = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ retVal = ExchangeObjects(
+ true,
+ location,
+ location,
+ (object)TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN)
+ ) && retVal;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object == char");
+ location = TestLibrary.Generator.GetChar(-55);
+ retVal = ExchangeObjects(
+ true,
+ location,
+ location,
+ (object)TestLibrary.Generator.GetChar(-55)
+ ) && retVal;
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ // This particular test is for when the comparands are not equal and the
+ // switch should not take place.
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ object location;
+ object other;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: object Interlocked.CompareExchange<object>(object&,object, object) where comparand are not equal");
+
+ try
+ {
+ TestLibrary.TestFramework.BeginScenario("PosTest2: object == Byte");
+ location = (object)TestLibrary.Generator.GetByte(-55);
+ other = (object)TestLibrary.Generator.GetByte(-55);
+
+ retVal = ExchangeObjects(
+ false,
+ location,
+ (object)((byte)location+1),
+ other
+ ) && retVal;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: object == Byte[]");
+ byte[] bArr1 = new Byte[5 + (TestLibrary.Generator.GetInt32(-55) % 1024)];
+ byte[] bArr2 = new Byte[5 + (TestLibrary.Generator.GetInt32(-55) % 1024)];
+ byte[] bArr3 = new Byte[5 + (TestLibrary.Generator.GetInt32(-55) % 1024)];
+ TestLibrary.Generator.GetBytes(-55, bArr1);
+ TestLibrary.Generator.GetBytes(-55, bArr2);
+ TestLibrary.Generator.GetBytes(-55, bArr3);
+ location = (object)bArr1;
+ retVal = ExchangeObjects(
+ false,
+ location,
+ (object)bArr2,
+ (object)bArr3
+ ) && retVal;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: object == Int16");
+ location = (object)TestLibrary.Generator.GetInt16(-55);
+ other = (object)TestLibrary.Generator.GetInt16(-55);
+
+ retVal = ExchangeObjects(
+ false,
+ location,
+ (object)((Int16)location+1),
+ other
+ ) && retVal;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: object == Int32");
+ location = (object)TestLibrary.Generator.GetInt32(-55);
+ other = (object)TestLibrary.Generator.GetInt32(-55);
+
+ retVal = ExchangeObjects(
+ false,
+ location,
+ (object)((Int32)location+1),
+ other
+ ) && retVal;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: object == Int64");
+ location = (object)(object)TestLibrary.Generator.GetInt64(-55);
+ other = (object)TestLibrary.Generator.GetInt64(-55);
+
+ retVal = ExchangeObjects(
+ false,
+ location,
+ (object)((Int64)location+1),
+ other
+ ) && retVal;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: object == Single");
+ location = (object)(object)TestLibrary.Generator.GetSingle(-55);
+ other = (object)TestLibrary.Generator.GetSingle(-55);
+
+ retVal = ExchangeObjects(
+ false,
+ location,
+ (object)((Single)location+1),
+ other
+ ) && retVal;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: object == Double");
+ location = (object)(object)TestLibrary.Generator.GetDouble(-55);
+ other = (object)TestLibrary.Generator.GetDouble(-55);
+
+ retVal = ExchangeObjects(
+ false,
+ location,
+ (object)((Double)location+1),
+ other
+ ) && retVal;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object == string");
+ location = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ retVal = ExchangeObjects(
+ false,
+ location,
+ (string)location+TestLibrary.Generator.GetChar(-55),
+ (object)TestLibrary.Generator.GetDouble(-55)
+ ) && retVal;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object == char");
+ location = TestLibrary.Generator.GetChar(-55);
+ object comparand;
+ do
+ {
+ comparand = TestLibrary.Generator.GetChar(-55);
+ }
+ while(comparand == location);
+ retVal = ExchangeObjects(
+ false,
+ location,
+ comparand,
+ (object)TestLibrary.Generator.GetChar(-55)
+ ) && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool ExchangeObjects(bool exchange, object location, object comparand, object value)
+ {
+ bool retVal = true;
+ object oldLocation;
+ object originalLocation = location;
+
+ if (!exchange && comparand == location)
+ {
+ TestLibrary.TestFramework.LogError("003", "Comparand and location are equal unexpectedly!!!!");
+ retVal = false;
+ }
+ if (exchange && comparand != location)
+ {
+ TestLibrary.TestFramework.LogError("004", "Comparand and location are not equal unexpectadly!!!!");
+ retVal = false;
+ }
+
+ // this is the only significant difference between this test
+ // and InterlockedCompareExchange7.cs - here we use the
+ // generic overload, passing it T=object.
+ oldLocation = Interlocked.CompareExchange<object>(ref location, value, comparand);
+
+ // if exchange=true, then the exchange was supposed to take place.
+ // as a result, assuming value did not equal comparand initially,
+ // and location did equal comparand initially, then we should
+ // expect the following:
+ // oldLoc holds locations old value,oldLocation == comparand, because oldLocation equals what
+ // location equaled before the exchange, and that
+ // equaled comparand
+ // location == value, because the exchange took place
+
+ if (exchange)
+ {
+ if (!Object.ReferenceEquals(value,location))
+ {
+ TestLibrary.TestFramework.LogError("005", "Interlocked.CompareExchange() did not do the exchange correctly: Expected location(" + location + ") to equal value(" + value + ")");
+ retVal = false;
+ }
+ if (!Object.ReferenceEquals(oldLocation,originalLocation))
+ {
+ TestLibrary.TestFramework.LogError("006", "Interlocked.CompareExchange() did not return the expected value: Expected oldLocation(" + oldLocation + ") to equal originalLocation(" + originalLocation + ")");
+ retVal = false;
+ }
+ }
+ // if exchange!=true, then the exchange was supposed to NOT take place.
+ // expect the following:
+ // location == originalLocation, because the exchange did not happen
+ // oldLocation == originalLocation, because the exchange did not happen
+ else
+ {
+ if (!Object.ReferenceEquals(location,originalLocation))
+ {
+ TestLibrary.TestFramework.LogError("007", "Interlocked.CompareExchange() should not change the location: Expected location(" + location + ") to equal originalLocation(" + originalLocation + ")");
+ retVal = false;
+ }
+ if (!Object.ReferenceEquals(oldLocation,originalLocation))
+ {
+ TestLibrary.TestFramework.LogError("008", "Interlocked.CompareExchange() did not return the expected value: Expected oldLocation(" + oldLocation + ") to equal originalLocation(" + originalLocation + ")");
+ retVal = false;
+ }
+ }
+
+ return retVal;
+ }
+
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockeddecrement1.cs b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockeddecrement1.cs
new file mode 100644
index 0000000000..fdce71987b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockeddecrement1.cs
@@ -0,0 +1,115 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+
+public class InterlockedDecrement1
+{
+ private const int c_NUM_LOOPS = 100;
+
+ public static int Main()
+ {
+ InterlockedDecrement1 test = new InterlockedDecrement1();
+
+ TestLibrary.TestFramework.BeginTestCase("InterlockedDecrement1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Int32 value;
+ Int32 nwValue;
+ Int32 exValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Int32 Interlocked.Decrement(Int32&)");
+
+ try
+ {
+ for (int i=0; i<c_NUM_LOOPS; i++)
+ {
+ value = TestLibrary.Generator.GetInt32(-55);
+
+ exValue = value-1;
+ nwValue = Interlocked.Decrement(ref value);
+
+ retVal = CheckValues(value, exValue, nwValue) && retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Int32 value;
+ Int32 nwValue;
+ Int32 exValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Cause a negative Int32 overflow");
+
+ try
+ {
+ value = Int32.MinValue;
+
+ exValue = value-1;
+ nwValue = Interlocked.Decrement(ref value);
+
+ retVal = CheckValues(value, exValue, nwValue) && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool CheckValues(Int32 value, Int32 exValue, Int32 nwValue)
+ {
+ if (exValue != nwValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "Interlocked.Decrement() returned wrong value. Expected(" + exValue + ") Got(" + nwValue + ")");
+ return false;
+ }
+ if (exValue != value)
+ {
+ TestLibrary.TestFramework.LogError("003", "Interlocked.Decrement() did not update value. Expected(" + exValue + ") Got(" + value + ")");
+ return false;
+ }
+
+ return true;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockeddecrement2.cs b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockeddecrement2.cs
new file mode 100644
index 0000000000..887c54d966
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockeddecrement2.cs
@@ -0,0 +1,115 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+
+public class InterlockedDecrement2
+{
+ private const int c_NUM_LOOPS = 100;
+
+ public static int Main()
+ {
+ InterlockedDecrement2 test = new InterlockedDecrement2();
+
+ TestLibrary.TestFramework.BeginTestCase("InterlockedDecrement2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Int64 value;
+ Int64 nwValue;
+ Int64 exValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Int64 Interlocked.Decrement(Int64&)");
+
+ try
+ {
+ for (int i=0; i<c_NUM_LOOPS; i++)
+ {
+ value = TestLibrary.Generator.GetInt64(-55);
+
+ exValue = value-1;
+ nwValue = Interlocked.Decrement(ref value);
+
+ retVal = CheckValues(value, exValue, nwValue) && retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Int64 value;
+ Int64 nwValue;
+ Int64 exValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Cause a negative Int64 overflow");
+
+ try
+ {
+ value = Int64.MinValue;
+
+ exValue = value-1;
+ nwValue = Interlocked.Decrement(ref value);
+
+ retVal = CheckValues(value, exValue, nwValue) && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool CheckValues(Int64 value, Int64 exValue, Int64 nwValue)
+ {
+ if (exValue != nwValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "Interlocked.Decrement() returned wrong value. Expected(" + exValue + ") Got(" + nwValue + ")");
+ return false;
+ }
+ if (exValue != value)
+ {
+ TestLibrary.TestFramework.LogError("003", "Interlocked.Decrement() did not update value. Expected(" + exValue + ") Got(" + value + ")");
+ return false;
+ }
+
+ return true;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedexchange1.cs b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedexchange1.cs
new file mode 100644
index 0000000000..3a344942c2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedexchange1.cs
@@ -0,0 +1,84 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+
+public class InterlockedExchange1
+{
+ private const int c_NUM_LOOPS = 100;
+ private const int c_MIN_STRING_LEN = 64;
+ private const int c_MAX_STRING_LEN = 1024;
+
+ public static int Main()
+ {
+ InterlockedExchange1 test = new InterlockedExchange1();
+
+ TestLibrary.TestFramework.BeginTestCase("InterlockedExchange1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1<string>() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1<T>() where T : class
+ {
+ bool retVal = true;
+ T location;
+ T value;
+ T prevLocation;
+ T oldLocation;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: T Interlocked.Exchange(T&,T) (T=" + typeof(T) + ")");
+
+ try
+ {
+ for (int i=0; i<c_NUM_LOOPS; i++)
+ {
+ value = (T)(object)TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ location = (T)(object)TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);
+ prevLocation = location;
+
+ oldLocation = Interlocked.Exchange<T>(ref location, value);
+
+ if (!location.Equals(value))
+ {
+ TestLibrary.TestFramework.LogError("001", "Interlocked.Exchange() did not do the exchange correctly: Expected(" + value + ") Actual(" + location + ")");
+ retVal = false;
+ }
+
+ if (!oldLocation.Equals(prevLocation))
+ {
+ TestLibrary.TestFramework.LogError("002", "Interlocked.Exchange() did not return the expected value: Expected(" + prevLocation + ") Actual(" + oldLocation + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedexchange5.cs b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedexchange5.cs
new file mode 100644
index 0000000000..16195c0452
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedexchange5.cs
@@ -0,0 +1,85 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+
+// Tests that Exchange(Int64, Int64)
+// actually switches values
+public class InterlockedExchange5
+{
+ private const int c_NUM_LOOPS = 100;
+
+ public static int Main()
+ {
+ InterlockedExchange5 test = new InterlockedExchange5();
+
+ TestLibrary.TestFramework.BeginTestCase("InterlockedExchange5");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Int64 location;
+ Int64 value;
+ Int64 prevLocation;
+ Int64 oldLocation;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Int64 Interlocked.Exchange(Int64&,Int64)");
+
+ try
+ {
+ for (int i=0; i<c_NUM_LOOPS; i++)
+ {
+ value = TestLibrary.Generator.GetInt64(-55);
+ location = TestLibrary.Generator.GetInt64(-55);
+ prevLocation = location;
+
+ oldLocation = Interlocked.Exchange(ref location, value);
+
+ if (!location.Equals(value))
+ {
+ TestLibrary.TestFramework.LogError("001", "Interlocked.Exchange() did not do the exchange correctly: Expected(" + value + ") Actual(" + location + ")");
+ retVal = false;
+ }
+
+ if (!oldLocation.Equals(prevLocation))
+ {
+ TestLibrary.TestFramework.LogError("002", "Interlocked.Exchange() did not return the expected value: Expected(" + prevLocation + ") Actual(" + oldLocation + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedexchange6.cs b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedexchange6.cs
new file mode 100644
index 0000000000..4851dae4d4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedexchange6.cs
@@ -0,0 +1,83 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+
+public class InterlockedExchange6
+{
+ private const int c_NUM_LOOPS = 100;
+
+ public static int Main()
+ {
+ InterlockedExchange6 test = new InterlockedExchange6();
+
+ TestLibrary.TestFramework.BeginTestCase("InterlockedExchange6");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Int32 location;
+ Int32 value;
+ Int32 prevLocation;
+ Int32 oldLocation;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Int32 Interlocked.Exchange(Int32&,Int32)");
+
+ try
+ {
+ for (int i=0; i<c_NUM_LOOPS; i++)
+ {
+ value = TestLibrary.Generator.GetInt32(-55);
+ location = TestLibrary.Generator.GetInt32(-55);
+ prevLocation = location;
+
+ oldLocation = Interlocked.Exchange(ref location, value);
+
+ if (!location.Equals(value))
+ {
+ TestLibrary.TestFramework.LogError("001", "Interlocked.Exchange() did not do the exchange correctly: Expected(" + value + ") Actual(" + location + ")");
+ retVal = false;
+ }
+
+ if (!oldLocation.Equals(prevLocation))
+ {
+ TestLibrary.TestFramework.LogError("002", "Interlocked.Exchange() did not return the expected value: Expected(" + prevLocation + ") Actual(" + oldLocation + ")");
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedexchange7.cs b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedexchange7.cs
new file mode 100644
index 0000000000..bfd2f52b76
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedexchange7.cs
@@ -0,0 +1,149 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+
+// Tests that Exchange<object>(object, object) works on variety
+// of casted types: It just casts a bunch of different types to
+// object, then makes sure Exchange works on those objects.
+public class InterlockedExchange7
+{
+ private const int c_NUM_LOOPS = 100;
+ private const int c_MIN_STRING_LEN = 5;
+ private const int c_MAX_STRING_LEN = 128;
+
+ public static int Main()
+ {
+ InterlockedExchange7 test = new InterlockedExchange7();
+
+ TestLibrary.TestFramework.BeginTestCase("InterlockedExchange7");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Interlocked.Exchange<object>(object&,object)");
+
+ try
+ {
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object == Byte");
+ retVal = ExchangeObjects(
+ (object)TestLibrary.Generator.GetByte(-55),
+ (object)TestLibrary.Generator.GetByte(-55)
+ ) && retVal;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object == Byte[]");
+ byte[] bArr1 = new Byte[5 + (TestLibrary.Generator.GetInt32(-55) % 1024)];
+ byte[] bArr2 = new Byte[5 + (TestLibrary.Generator.GetInt32(-55) % 1024)];
+ TestLibrary.Generator.GetBytes(-55, bArr1);
+ TestLibrary.Generator.GetBytes(-55, bArr2);
+ retVal = ExchangeObjects(
+ (object)bArr1,
+ (object)bArr2
+ ) && retVal;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object == Int16");
+ retVal = ExchangeObjects(
+ (object)TestLibrary.Generator.GetInt16(-55),
+ (object)TestLibrary.Generator.GetInt16(-55)
+ ) && retVal;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object == Int32");
+ retVal = ExchangeObjects(
+ (object)TestLibrary.Generator.GetInt32(-55),
+ (object)TestLibrary.Generator.GetInt32(-55)
+ ) && retVal;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object == Int64");
+ retVal = ExchangeObjects(
+ (object)(object)TestLibrary.Generator.GetInt64(-55),
+ (object)TestLibrary.Generator.GetInt64(-55)
+ ) && retVal;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object == Single");
+ retVal = ExchangeObjects(
+ (object)(object)TestLibrary.Generator.GetSingle(-55),
+ (object)TestLibrary.Generator.GetSingle(-55)
+ ) && retVal;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object == Double");
+ retVal = ExchangeObjects(
+ (object)TestLibrary.Generator.GetDouble(-55),
+ (object)TestLibrary.Generator.GetDouble(-55)
+ ) && retVal;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object == string");
+ retVal = ExchangeObjects(
+ TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN),
+ (object)TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN)
+ ) && retVal;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object == char");
+ retVal = ExchangeObjects(
+ TestLibrary.Generator.GetChar(-55),
+ TestLibrary.Generator.GetChar(-55)
+ ) && retVal;
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool ExchangeObjects(object location, object value)
+ {
+ bool retVal = true;
+ object oldLocation;
+ object prevLocation;
+
+ prevLocation = location;
+
+ // this is the main change from InterlockedExchange2.cs
+ // here we use the <T> overload where T=object
+ oldLocation = Interlocked.Exchange<object>(ref location, value);
+
+ if (!location.Equals(value))
+ {
+ TestLibrary.TestFramework.LogError("003", "Interlocked.Exchange() did not do the exchange correctly: Expected(" + value + ") Actual(" + location + ")");
+ retVal = false;
+ }
+
+ if (!oldLocation.Equals(prevLocation))
+ {
+ TestLibrary.TestFramework.LogError("004", "Interlocked.Exchange() did not return the expected value: Expected(" + prevLocation + ") Actual(" + oldLocation + ")");
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedincrement1.cs b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedincrement1.cs
new file mode 100644
index 0000000000..52e42a146e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedincrement1.cs
@@ -0,0 +1,115 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+
+public class InterlockedIncrement1
+{
+ private const int c_NUM_LOOPS = 100;
+
+ public static int Main()
+ {
+ InterlockedIncrement1 test = new InterlockedIncrement1();
+
+ TestLibrary.TestFramework.BeginTestCase("InterlockedIncrement1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Int32 value;
+ Int32 nwValue;
+ Int32 exValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Int32 Interlocked.Increment(Int32&)");
+
+ try
+ {
+ for (int i=0; i<c_NUM_LOOPS; i++)
+ {
+ value = TestLibrary.Generator.GetInt32(-55);
+
+ exValue = value+1;
+ nwValue = Interlocked.Increment(ref value);
+
+ retVal = CheckValues(value, exValue, nwValue) && retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Int32 value;
+ Int32 nwValue;
+ Int32 exValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Cause a positive Int32 overflow");
+
+ try
+ {
+ value = Int32.MaxValue;
+
+ exValue = value+1;
+ nwValue = Interlocked.Increment(ref value);
+
+ retVal = CheckValues(value, exValue, nwValue) && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool CheckValues(Int32 value, Int32 exValue, Int32 nwValue)
+ {
+ if (exValue != nwValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "Interlocked.Increment() returned wrong value. Expected(" + exValue + ") Got(" + nwValue + ")");
+ return false;
+ }
+ if (exValue != value)
+ {
+ TestLibrary.TestFramework.LogError("003", "Interlocked.Increment() did not update value. Expected(" + exValue + ") Got(" + value + ")");
+ return false;
+ }
+
+ return true;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedincrement2.cs b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedincrement2.cs
new file mode 100644
index 0000000000..80d0db4a11
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/interlocked/interlockedincrement2.cs
@@ -0,0 +1,115 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+
+public class InterlockedIncrement2
+{
+ private const int c_NUM_LOOPS = 100;
+
+ public static int Main()
+ {
+ InterlockedIncrement2 test = new InterlockedIncrement2();
+
+ TestLibrary.TestFramework.BeginTestCase("InterlockedIncrement2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Int64 value;
+ Int64 nwValue;
+ Int64 exValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Int64 Interlocked.Increment(Int64&)");
+
+ try
+ {
+ for (int i=0; i<c_NUM_LOOPS; i++)
+ {
+ value = TestLibrary.Generator.GetInt64(-55);
+
+ exValue = value+1;
+ nwValue = Interlocked.Increment(ref value);
+
+ retVal = CheckValues(value, exValue, nwValue) && retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Int64 value;
+ Int64 nwValue;
+ Int64 exValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Cause a positive Int64 overflow");
+
+ try
+ {
+ value = Int64.MaxValue;
+
+ exValue = value+1;
+ nwValue = Interlocked.Increment(ref value);
+
+ retVal = CheckValues(value, exValue, nwValue) && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool CheckValues(Int64 value, Int64 exValue, Int64 nwValue)
+ {
+ if (exValue != nwValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "Interlocked.Increment() returned wrong value. Expected(" + exValue + ") Got(" + nwValue + ")");
+ return false;
+ }
+ if (exValue != value)
+ {
+ TestLibrary.TestFramework.LogError("003", "Interlocked.Increment() did not update value. Expected(" + exValue + ") Got(" + value + ")");
+ return false;
+ }
+
+ return true;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/threading/manualresetevent/ManualResetEventCtor.csproj b/tests/src/CoreMangLib/cti/system/threading/manualresetevent/ManualResetEventCtor.csproj
new file mode 100644
index 0000000000..b85bc60bde
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/manualresetevent/ManualResetEventCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="manualreseteventctor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/threading/manualresetevent/manualreseteventctor.cs b/tests/src/CoreMangLib/cti/system/threading/manualresetevent/manualreseteventctor.cs
new file mode 100644
index 0000000000..d2e3eec562
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/manualresetevent/manualreseteventctor.cs
@@ -0,0 +1,97 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+
+///<summary>
+///System.Threading.ManualResetEvent.Ctor(bool) [v-zuolan]
+///</summary>
+
+public class ManualResetEventCtor
+{
+
+ public static int Main()
+ {
+ ManualResetEventCtor testObj = new ManualResetEventCtor();
+ TestLibrary.TestFramework.BeginTestCase("for constructor of System.Threading.ManualResetEvent");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ ManualResetEvent expectedValue = new ManualResetEvent(true);
+ ManualResetEvent actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Set initialState as true and Create a instance");
+ try
+ {
+ actualValue = (ManualResetEvent)(new ManualResetEvent(true));
+ if (expectedValue.Equals(actualValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ ManualResetEvent expectedValue = new ManualResetEvent(false);
+ ManualResetEvent actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Set initialState as false and Create a instance");
+ try
+ {
+ actualValue = (ManualResetEvent)(new ManualResetEvent(false));
+ if (expectedValue.Equals(actualValue))
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/threading/timeout/TimeOutInfinite.csproj b/tests/src/CoreMangLib/cti/system/threading/timeout/TimeOutInfinite.csproj
new file mode 100644
index 0000000000..35721b8369
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/timeout/TimeOutInfinite.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timeoutinfinite.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/threading/timeout/timeoutinfinite.cs b/tests/src/CoreMangLib/cti/system/threading/timeout/timeoutinfinite.cs
new file mode 100644
index 0000000000..8ecc862903
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/timeout/timeoutinfinite.cs
@@ -0,0 +1,71 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+
+///<summary>
+///System.Threading.TimeOut.Infinite [v-zuolan]
+///</summary>
+
+public class TimeOutInfinite
+{
+
+ public static int Main()
+ {
+ TimeOutInfinite testObj = new TimeOutInfinite();
+ TestLibrary.TestFramework.BeginTestCase("for field of System.Threading.TimeOut.Infinite");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ int expectedValue = -1;
+ int actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Get the property.");
+ try
+ {
+ actualValue = Timeout.Infinite;
+
+ if (expectedValue != actualValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/threading/waithandle/WaitHandleCtor.csproj b/tests/src/CoreMangLib/cti/system/threading/waithandle/WaitHandleCtor.csproj
new file mode 100644
index 0000000000..ddecd770ae
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/waithandle/WaitHandleCtor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="waithandlector.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/threading/waithandle/WaitHandleDispose1.csproj b/tests/src/CoreMangLib/cti/system/threading/waithandle/WaitHandleDispose1.csproj
new file mode 100644
index 0000000000..7908613884
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/waithandle/WaitHandleDispose1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="waithandledispose1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/threading/waithandle/WaitHandleDispose3.csproj b/tests/src/CoreMangLib/cti/system/threading/waithandle/WaitHandleDispose3.csproj
new file mode 100644
index 0000000000..3351c7271f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/waithandle/WaitHandleDispose3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="waithandledispose3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/threading/waithandle/waithandlector.cs b/tests/src/CoreMangLib/cti/system/threading/waithandle/waithandlector.cs
new file mode 100644
index 0000000000..1fcbf1da57
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/waithandle/waithandlector.cs
@@ -0,0 +1,79 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+
+public class TestWaitHandle : WaitHandle
+{
+ public TestWaitHandle()
+ : base()
+ {
+ }
+}
+
+/// <summary>
+/// Ctor
+/// </summary>
+public class WaitHandleCtor
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Ctor to construct a new instance of WaitHandle");
+
+ try
+ {
+ TestWaitHandle handle = new TestWaitHandle();
+
+ if (handle == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling Ctor to construct a new instance of WaitHandle returns a null reference");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ WaitHandleCtor test = new WaitHandleCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("WaitHandleCtor");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/threading/waithandle/waithandledispose1.cs b/tests/src/CoreMangLib/cti/system/threading/waithandle/waithandledispose1.cs
new file mode 100644
index 0000000000..986188aa0f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/waithandle/waithandledispose1.cs
@@ -0,0 +1,149 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+
+// WaitHandle is typically used as a base
+// class for synchronization objects. In this case,
+// we just subclass it.
+public class TestWaitHandle1 : WaitHandle
+{
+ public TestWaitHandle1()
+ {
+ }
+
+ public void DoDispose(bool explicitDisposing)
+ {
+ Dispose(explicitDisposing);
+ }
+}
+
+/// <summary>
+/// Dispose(System.Boolean)
+/// </summary>
+
+
+// Tests that we can call Dispose on a subclass
+// of WaitHandle, with explicitDisposing = true and false.
+// Dispose is called by the WaitHandle.Dispose()
+// method and the Finalize method. Dispose() invokes this
+// protected method with the explicitDisposing parameter set to
+// true (Dispose both managed and unmanaged resources).
+// Finalize invokes Dispose with explicitDisposing set to false
+// (Dispose only unmanaged resources).
+public class WaitHandleDispose1
+{
+ #region Public Constants
+ public const int c_DEFAULT_WAIT_TIME = 1000; // 1 second
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = false;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Dispose with explicitDisposing set to true");
+
+ try
+ {
+ // Create a WaitHandle-derived object
+ TestWaitHandle1 handle = new TestWaitHandle1();
+
+ // Dispose both managed and
+ // unmanaged resources (DoDispose just calls
+ // Dispose)
+ handle.DoDispose(true);
+
+ // Do a waitone on the handle, should immediately throw
+ // ObjectDisposedException
+ handle.WaitOne(c_DEFAULT_WAIT_TIME);
+
+ // if we get here, it wasn't disposed of, error
+ TestLibrary.TestFramework.LogError("001", "handle.Dispose(true) did not dispose of the handle");
+ retVal = false;
+ }
+ catch (ObjectDisposedException)
+ {
+ // swallow it, this is where we wanted to go
+ retVal = true;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = false;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Dispose with explicitDisposing set to false");
+
+ try
+ {
+ TestWaitHandle1 handle = new TestWaitHandle1();
+
+ // Dispose only unmanaged resources.
+ // (DoDispose just calls Dispose)
+ handle.DoDispose(false);
+
+ // Do a waitone on the handle, should get ObjectDisposedException
+ handle.WaitOne(c_DEFAULT_WAIT_TIME);
+
+ // if we get here, it wasn't disposed of, error
+ TestLibrary.TestFramework.LogError("003", "handle.Dispose(false) did not dispose of the handle");
+ retVal = false;
+ }
+ catch (ObjectDisposedException)
+ {
+ // swallow it, this is where we wanted to go
+ retVal = true;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ WaitHandleDispose1 test = new WaitHandleDispose1();
+
+ TestLibrary.TestFramework.BeginTestCase("WaitHandleDispose1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/threading/waithandle/waithandledispose3.cs b/tests/src/CoreMangLib/cti/system/threading/waithandle/waithandledispose3.cs
new file mode 100644
index 0000000000..40dc1021ec
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/threading/waithandle/waithandledispose3.cs
@@ -0,0 +1,101 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+
+/// <summary>
+/// System.IDisposable.Dispose
+/// </summary>
+
+// Tests disposing of a WaitHandle-derived type
+// via the IDisposable interface.
+// This test has been made to work for Silverlight
+// by using AutoResetEvent instead of Mutex
+public class WaitHandleDispose3
+{
+ #region Public Constants
+ public const int c_DEFAULT_WAIT_TIME = 1000; // 1 second
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ // no need for security attributes
+ // [System.Security.SecuritySafeCritical]
+ // [System.Security.SecurityCritical]
+ public bool PosTest1()
+ {
+ bool retVal = false;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Dispose");
+
+ try
+ {
+ // AutoResetEvent derives from WaitHandle,
+ // and normally you don't create a WaitHandle
+ // was: WaitHandle handle = new Mutex();
+ // create unsignaled
+ WaitHandle handle = new AutoResetEvent(false);
+
+ // cast to IDisposable, because waithandle does not implement .dispose
+ IDisposable disposable = handle as IDisposable;
+ disposable.Dispose();
+
+
+ // Do a waitone on the handle, should immediately throw
+ // ObjectDisposedException
+ handle.WaitOne(c_DEFAULT_WAIT_TIME);
+
+ // if we get here, it wasn't disposed of, error
+ TestLibrary.TestFramework.LogError("001", "handle.Dispose() did not dispose of the handle");
+ retVal = false;
+ }
+ catch (ObjectDisposedException)
+ {
+ // swallow it, this is where we wanted to go
+ retVal = true;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ // should be no need for security attributes
+ // [System.Security.SecurityCritical]
+ public static int Main()
+ {
+ WaitHandleDispose3 test = new WaitHandleDispose3();
+
+ TestLibrary.TestFramework.BeginTestCase("WaitHandleDispose3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/timeoutexception/TimeoutExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/timeoutexception/TimeoutExceptionCtor1.csproj
new file mode 100644
index 0000000000..4d9cc043fa
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timeoutexception/TimeoutExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timeoutexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timeoutexception/TimeoutExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/timeoutexception/TimeoutExceptionCtor2.csproj
new file mode 100644
index 0000000000..a654fdd577
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timeoutexception/TimeoutExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timeoutexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timeoutexception/TimeoutExceptionCtor3.csproj b/tests/src/CoreMangLib/cti/system/timeoutexception/TimeoutExceptionCtor3.csproj
new file mode 100644
index 0000000000..9017b7219f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timeoutexception/TimeoutExceptionCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timeoutexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timeoutexception/timeoutexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/timeoutexception/timeoutexceptionctor1.cs
new file mode 100644
index 0000000000..5ace12b5bb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timeoutexception/timeoutexceptionctor1.cs
@@ -0,0 +1,69 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ctor [v-yishi]
+/// </summary>
+public class TimeoutExceptionCtor1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor to create a new instance");
+
+ try
+ {
+ TimeoutException ex = new TimeoutException();
+ if (ex == null)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling ctor returns null reference");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeoutExceptionCtor1 test = new TimeoutExceptionCtor1();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeoutExceptionCtor1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/timeoutexception/timeoutexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/timeoutexception/timeoutexceptionctor2.cs
new file mode 100644
index 0000000000..08ee9861a7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timeoutexception/timeoutexceptionctor2.cs
@@ -0,0 +1,147 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ctor(System.String) [v-yishi]
+/// </summary>
+public class TimeoutExceptionCtor2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor with null");
+
+ try
+ {
+ TimeoutException ex = new TimeoutException(null);
+ if (null == ex)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling ctor will null returns null reference");
+ retVal = false;
+ }
+
+ string message = ex.Message;
+ // using default message
+ if (message == null)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Calling ctor will null returns null message");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call ctor with string.Empty");
+
+ try
+ {
+ TimeoutException ex = new TimeoutException(string.Empty);
+ if (null == ex)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling ctor will string.Empty returns null reference");
+ retVal = false;
+ }
+
+ string message = ex.Message;
+ // using default message
+ if (message == null)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Calling ctor will string.Empty returns null message");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call ctor with rand message");
+
+ try
+ {
+ string expected = TestLibrary.Generator.GetString(-55, false, 1, 256);
+ TimeoutException ex = new TimeoutException(expected);
+ if (null == ex)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Calling ctor will rand message returns null reference");
+ retVal = false;
+ }
+
+ string message = ex.Message;
+ // using default message
+ if (message != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Calling ctor will rand message returns null message");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] message = " + message + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeoutExceptionCtor2 test = new TimeoutExceptionCtor2();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeoutExceptionCtor2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/timeoutexception/timeoutexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/timeoutexception/timeoutexceptionctor3.cs
new file mode 100644
index 0000000000..4e167f30ce
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timeoutexception/timeoutexceptionctor3.cs
@@ -0,0 +1,176 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class TestException : Exception
+{
+}
+
+/// <summary>
+/// ctor(System.String,System.Exception) [v-yishi]
+/// </summary>
+public class TimeoutExceptionCtor3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor with null");
+
+ try
+ {
+ TimeoutException ex = new TimeoutException(null, null);
+ if (null == ex)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling ctor will null returns null reference");
+ retVal = false;
+ }
+
+ string message = ex.Message;
+ // using default message
+ if (message == null)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Calling ctor will null returns null message");
+ retVal = false;
+ }
+
+ Exception innerException = ex.InnerException;
+ // using default message
+ if (innerException != null)
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Calling ctor will null returns not null innerException");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call ctor with string.Empty");
+
+ try
+ {
+ TimeoutException ex = new TimeoutException(string.Empty, null);
+ if (null == ex)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling ctor will string.Empty returns null reference");
+ retVal = false;
+ }
+
+ string message = ex.Message;
+ // using default message
+ if (message == null)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Calling ctor will string.Empty returns null message");
+ retVal = false;
+ }
+
+ Exception innerException = ex.InnerException;
+ // using default message
+ if (innerException != null)
+ {
+ TestLibrary.TestFramework.LogError("002.3", "Calling ctor will string.Empty returns not null innerException");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call ctor with rand message");
+
+ try
+ {
+ string expected = TestLibrary.Generator.GetString(-55, false, 1, 256);
+ Exception expectedException = new TestException();
+ TimeoutException ex = new TimeoutException(expected, expectedException);
+ if (null == ex)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Calling ctor will rand message returns null reference");
+ retVal = false;
+ }
+
+ string message = ex.Message;
+ // using default message
+ if (message != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Calling ctor will rand message returns null message");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] message = " + message + ", expected = " + expected);
+ retVal = false;
+ }
+
+ Exception innerException = ex.InnerException;
+ // using default message
+ if (innerException != expectedException)
+ {
+ TestLibrary.TestFramework.LogError("003.3", "Calling ctor will string.Empty returns wrong inner exception");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeoutExceptionCtor3 test = new TimeoutExceptionCtor3();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeoutExceptionCtor3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanAdd.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanAdd.csproj
new file mode 100644
index 0000000000..9b7052e7d5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanAdd.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespanadd.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanCompare1.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanCompare1.csproj
new file mode 100644
index 0000000000..13a4fac2b7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanCompare1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespancompare1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanCompareTo2.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanCompareTo2.csproj
new file mode 100644
index 0000000000..48bcbc9bf6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanCompareTo2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespancompareto2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanCtor1.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanCtor1.csproj
new file mode 100644
index 0000000000..5789dae7fb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespanctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanCtor2.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanCtor2.csproj
new file mode 100644
index 0000000000..e2fbca0e31
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespanctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanCtor3.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanCtor3.csproj
new file mode 100644
index 0000000000..e4710a3726
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespanctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanCtor4.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanCtor4.csproj
new file mode 100644
index 0000000000..c5e2d6d2d7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanCtor4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespanctor4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanDuration.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanDuration.csproj
new file mode 100644
index 0000000000..1a8754a40f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanDuration.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespanduration.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanEquals1.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanEquals1.csproj
new file mode 100644
index 0000000000..7d2d6e47c7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanEquals1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespanequals1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanEquals2.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanEquals2.csproj
new file mode 100644
index 0000000000..d1f58a8763
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanEquals2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespanequals2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanEquals3.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanEquals3.csproj
new file mode 100644
index 0000000000..b65670948c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanEquals3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespanequals3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanFromTicks.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanFromTicks.csproj
new file mode 100644
index 0000000000..f1284b78ee
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanFromTicks.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespanfromticks.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanGetHashCode.csproj
new file mode 100644
index 0000000000..e49509129a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespangethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanMaxValue.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanMaxValue.csproj
new file mode 100644
index 0000000000..d28c5d01f6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanMaxValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespanmaxvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanMinValue.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanMinValue.csproj
new file mode 100644
index 0000000000..58d1ed3fd2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanMinValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespanminvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanNegate.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanNegate.csproj
new file mode 100644
index 0000000000..f5dd6cf080
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanNegate.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespannegate.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTicks.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTicks.csproj
new file mode 100644
index 0000000000..2bbcbb7824
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTicks.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespanticks.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTicksPerDay.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTicksPerDay.csproj
new file mode 100644
index 0000000000..ce8a17e662
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTicksPerDay.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespanticksperday.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTicksPerHour.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTicksPerHour.csproj
new file mode 100644
index 0000000000..13c5bfdff5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTicksPerHour.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespanticksperhour.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTicksPerMinute.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTicksPerMinute.csproj
new file mode 100644
index 0000000000..e4f69cb73d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTicksPerMinute.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespanticksperminute.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTicksPerSecond.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTicksPerSecond.csproj
new file mode 100644
index 0000000000..d91d2fb208
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTicksPerSecond.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespantickspersecond.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanToString_str.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanToString_str.csproj
new file mode 100644
index 0000000000..8fb88df746
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanToString_str.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespansupport.cs" />
+ <Compile Include="timespantostring_str.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTotalDays.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTotalDays.csproj
new file mode 100644
index 0000000000..558e1c8a34
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTotalDays.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespantotaldays.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTotalHours.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTotalHours.csproj
new file mode 100644
index 0000000000..4b34529de4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTotalHours.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespantotalhours.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTotalMilliseconds.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTotalMilliseconds.csproj
new file mode 100644
index 0000000000..ce7f75d751
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTotalMilliseconds.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespantotalmilliseconds.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTotalMinutes.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTotalMinutes.csproj
new file mode 100644
index 0000000000..149f4786d3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTotalMinutes.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespantotalminutes.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTotalSeconds.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTotalSeconds.csproj
new file mode 100644
index 0000000000..1b1f657724
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanTotalSeconds.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespantotalseconds.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/TimeSpanZero.csproj b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanZero.csproj
new file mode 100644
index 0000000000..5a6c8ce183
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/TimeSpanZero.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="timespanzero.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespanadd.cs b/tests/src/CoreMangLib/cti/system/timespan/timespanadd.cs
new file mode 100644
index 0000000000..fec6159828
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespanadd.cs
@@ -0,0 +1,161 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Add(System.TimeSpan)
+/// </summary>
+public class TimeSpanAdd
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Add with rand valid value");
+
+ try
+ {
+ retVal = VerificationHelper(new TimeSpan(TestLibrary.Generator.GetInt32(-55)),
+ new TimeSpan(TestLibrary.Generator.GetInt32(-55)),
+ "001.1") && retVal;
+ retVal = VerificationHelper(new TimeSpan(TestLibrary.Generator.GetInt32(-55)),
+ new TimeSpan(0),
+ "001.2") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Add with boundary value");
+
+ try
+ {
+ retVal = VerificationHelper(TimeSpan.MaxValue, new TimeSpan(0), "002.1") && retVal;
+ retVal = VerificationHelper(TimeSpan.MinValue, new TimeSpan(0), "002.2") && retVal;
+ retVal = VerificationHelper(TimeSpan.MaxValue, TimeSpan.MinValue, "002.3") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException should be thrown when The resulting TimeSpan is less than MinValue or greater than MaxValue");
+
+ try
+ {
+ retVal = VerificationHelper(TimeSpan.MaxValue, new TimeSpan(-1), "101.1") && retVal;
+ retVal = VerificationHelper(TimeSpan.MinValue, new TimeSpan(1), "101.2") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanAdd test = new TimeSpanAdd();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanAdd");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Fields
+ private bool VerificationHelper(TimeSpan span1, TimeSpan span2, string errorNo)
+ {
+ bool retVal = true;
+
+ TimeSpan result = span1.Add(span2);
+
+ long desired = span1.Ticks + span2.Ticks;
+ long actual = result.Ticks;
+
+ if (desired != actual)
+ {
+ TestLibrary.TestFramework.LogError(errorNo, "Calling Add method returns a wrong TimeSpan instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] desired = " + desired + ", actual = " + actual + ", span1.Ticks = " + span1.Ticks + ", span2.Ticks = " + span2.Ticks);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ private bool VerificationHelper(TimeSpan span1, TimeSpan span2, Type desiredException, string errorNo)
+ {
+ bool retVal = true;
+
+ try
+ {
+ TimeSpan result = span1.Add(span2);
+
+ TestLibrary.TestFramework.LogError(errorNo + ".1", desiredException + " is not thrown");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] span1.Ticks = " + span1.Ticks + ", span2.Ticks = " + span2.Ticks);
+ retVal = false;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(errorNo + ".0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespancompare1.cs b/tests/src/CoreMangLib/cti/system/timespan/timespancompare1.cs
new file mode 100644
index 0000000000..b62f603b11
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespancompare1.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Compare(System.TimeSpan,System.TimeSpan)
+/// </summary>
+public class TimeSpanCompare1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Compare with t1 less than t2 should return -1");
+
+ try
+ {
+ retVal = VerificationHelper(new TimeSpan(-1), new TimeSpan(0), -1, "001.1") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0), new TimeSpan(1), -1, "001.2") && retVal;
+ retVal = VerificationHelper(TimeSpan.MinValue, TimeSpan.MaxValue, -1, "001.3") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Compare with t1 equal to t2 should return 0");
+
+ try
+ {
+ retVal = VerificationHelper(new TimeSpan(1), new TimeSpan(1), 0, "002.1") && retVal;
+ retVal = VerificationHelper(new TimeSpan(-1), new TimeSpan(-1), 0, "002.2") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0), new TimeSpan(0), 0, "002.3") && retVal;
+ retVal = VerificationHelper(TimeSpan.MinValue, TimeSpan.MinValue, 0, "0014") && retVal;
+ retVal = VerificationHelper(TimeSpan.MaxValue, TimeSpan.MaxValue, 0, "002.5") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call Compare with t1 greater than t2 should return 1");
+
+ try
+ {
+ retVal = VerificationHelper(new TimeSpan(0), new TimeSpan(-1), 1, "003.1") && retVal;
+ retVal = VerificationHelper(new TimeSpan(1), new TimeSpan(0), 1, "003.2") && retVal;
+ retVal = VerificationHelper(TimeSpan.MaxValue, TimeSpan.MinValue, 1, "003.3") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanCompare1 test = new TimeSpanCompare1();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanCompare1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(TimeSpan span1, TimeSpan span2, int desired, string errorno)
+ {
+ bool retVal = true;
+
+ int actual = TimeSpan.Compare(span1, span2);
+
+ if (actual != desired)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "Compare returns wrong result");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] span1.Ticks = " + span1.Ticks + ", span2.Ticks = " + span2.Ticks + ", desired = " + desired + ", actual = " + actual);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespancompareto2.cs b/tests/src/CoreMangLib/cti/system/timespan/timespancompareto2.cs
new file mode 100644
index 0000000000..ab472df39c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespancompareto2.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// CompareTo(System.TimeSpan)
+/// </summary>
+public class TimeSpanCompareTo2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call CompareTo with t1 less than t2 should return -1");
+
+ try
+ {
+ retVal = VerificationHelper(new TimeSpan(-1), new TimeSpan(0), -1, "001.1") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0), new TimeSpan(1), -1, "001.2") && retVal;
+ retVal = VerificationHelper(TimeSpan.MinValue, TimeSpan.MaxValue, -1, "001.3") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call CompareTo with t1 equal to t2 should return 0");
+
+ try
+ {
+ retVal = VerificationHelper(new TimeSpan(1), new TimeSpan(1), 0, "002.1") && retVal;
+ retVal = VerificationHelper(new TimeSpan(-1), new TimeSpan(-1), 0, "002.2") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0), new TimeSpan(0), 0, "002.3") && retVal;
+ retVal = VerificationHelper(TimeSpan.MinValue, TimeSpan.MinValue, 0, "0014") && retVal;
+ retVal = VerificationHelper(TimeSpan.MaxValue, TimeSpan.MaxValue, 0, "002.5") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call CompareTo with t1 greater than t2 should return 1");
+
+ try
+ {
+ retVal = VerificationHelper(new TimeSpan(0), new TimeSpan(-1), 1, "003.1") && retVal;
+ retVal = VerificationHelper(new TimeSpan(1), new TimeSpan(0), 1, "003.2") && retVal;
+ retVal = VerificationHelper(TimeSpan.MaxValue, TimeSpan.MinValue, 1, "003.3") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanCompareTo2 test = new TimeSpanCompareTo2();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanCompareTo2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(TimeSpan span1, TimeSpan span2, int desired, string errorno)
+ {
+ bool retVal = true;
+
+ int actual = span1.CompareTo(span2);
+
+ if (actual != desired)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "CompareTo returns wrong result");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] span1.Ticks = " + span1.Ticks + ", span2.Ticks = " + span2.Ticks + ", desired = " + desired + ", actual = " + actual);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespanctor1.cs b/tests/src/CoreMangLib/cti/system/timespan/timespanctor1.cs
new file mode 100644
index 0000000000..690e52af93
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespanctor1.cs
@@ -0,0 +1,172 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ctor(System.Int32,System.Int32,System.Int32)
+/// </summary>
+public class TimeSpanCtor1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor with rand valid value");
+
+ try
+ {
+ int hours = TestLibrary.Generator.GetInt16(-55);
+ int minutes = TestLibrary.Generator.GetInt32(-55);
+ int seconds = TestLibrary.Generator.GetInt32(-55);
+
+ retVal = VerificationHelper(hours, minutes, seconds, "001.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call ctor with all value set to 0");
+
+ try
+ {
+ retVal = VerificationHelper(0, 0, 0, "002.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentOutOfRangeException should be thrown when The parameters specify a TimeSpan value less than MinValue");
+
+ try
+ {
+ TimeSpan ts = new TimeSpan(Int32.MinValue, Int32.MinValue, Int32.MinValue);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentOutOfRangeException is not thrown when The parameters specify a TimeSpan value less than MinValue");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentOutOfRangeException should be thrown when The parameters specify a TimeSpan value less than MaxValue");
+
+ try
+ {
+ TimeSpan ts = new TimeSpan(Int32.MaxValue, Int32.MaxValue, Int32.MaxValue);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentOutOfRangeException is not thrown when The parameters specify a TimeSpan value less than MaxValue");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanCtor1 test = new TimeSpanCtor1();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanCtor1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(int hours, int minutes, int seconds, string errorNo)
+ {
+ bool retVal = true;
+
+ TimeSpan ts = new TimeSpan(hours, minutes, seconds);
+
+ long desiredTicks = hours * TimeSpan.TicksPerHour + minutes * TimeSpan.TicksPerMinute + seconds * TimeSpan.TicksPerSecond;
+ long actualTicks = ts.Ticks;
+
+ if (desiredTicks != actualTicks)
+ {
+ TestLibrary.TestFramework.LogError(errorNo + ".1", "Ticks of the instance contructed by ctor(int, int, int) is unexpected");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] hours = " + hours +
+ ", minutes = " + minutes +
+ ", seconds = " + seconds +
+ ", desiredTicks = " + desiredTicks +
+ ", actualTicks = " + actualTicks);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespanctor2.cs b/tests/src/CoreMangLib/cti/system/timespan/timespanctor2.cs
new file mode 100644
index 0000000000..bcd011f78d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespanctor2.cs
@@ -0,0 +1,175 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ctor(System.Int32,System.Int32,System.Int32,System.Int32)
+/// </summary>
+public class TimeSpanCtor2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor with rand valid value");
+
+ try
+ {
+ int days = TestLibrary.Generator.GetInt16(-55);
+ int hours = TestLibrary.Generator.GetInt16(-55);
+ int minutes = TestLibrary.Generator.GetInt32(-55);
+ int seconds = TestLibrary.Generator.GetInt32(-55);
+
+ retVal = VerificationHelper(days, hours, minutes, seconds, "001.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call ctor with all value set to 0");
+
+ try
+ {
+ retVal = VerificationHelper(0, 0, 0, 0, "002.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentOutOfRangeException should be thrown when The parameters specify a TimeSpan value less than MinValue");
+
+ try
+ {
+ TimeSpan ts = new TimeSpan(Int32.MinValue, Int32.MinValue, Int32.MinValue, Int32.MinValue);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentOutOfRangeException is not thrown when The parameters specify a TimeSpan value less than MinValue");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentOutOfRangeException should be thrown when The parameters specify a TimeSpan value less than MaxValue");
+
+ try
+ {
+ TimeSpan ts = new TimeSpan(Int32.MaxValue, Int32.MaxValue, Int32.MaxValue, Int32.MaxValue);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentOutOfRangeException is not thrown when The parameters specify a TimeSpan value less than MaxValue");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanCtor2 test = new TimeSpanCtor2();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanCtor2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(int days, int hours, int minutes, int seconds, string errorNo)
+ {
+ bool retVal = true;
+
+ TimeSpan ts = new TimeSpan(days, hours, minutes, seconds);
+
+ long desiredTicks = days * TimeSpan.TicksPerDay + hours * TimeSpan.TicksPerHour +
+ minutes * TimeSpan.TicksPerMinute + seconds * TimeSpan.TicksPerSecond;
+ long actualTicks = ts.Ticks;
+
+ if (desiredTicks != actualTicks)
+ {
+ TestLibrary.TestFramework.LogError(errorNo + ".1", "Ticks of the instance contructed by ctor(int, int, int, int) is unexpected");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] hours = " + hours +
+ ", minutes = " + minutes +
+ ", seconds = " + seconds +
+ ", days = " + days +
+ ", desiredTicks = " + desiredTicks +
+ ", actualTicks = " + actualTicks);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespanctor3.cs b/tests/src/CoreMangLib/cti/system/timespan/timespanctor3.cs
new file mode 100644
index 0000000000..a33bb673c5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespanctor3.cs
@@ -0,0 +1,177 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ctor(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)
+/// </summary>
+public class TimeSpanCtor3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor with rand valid value");
+
+ try
+ {
+ int days = TestLibrary.Generator.GetInt16(-55);
+ int hours = TestLibrary.Generator.GetInt16(-55);
+ int minutes = TestLibrary.Generator.GetInt32(-55);
+ int seconds = TestLibrary.Generator.GetInt32(-55);
+ int milliseconds = TestLibrary.Generator.GetInt32(-55);
+
+ retVal = VerificationHelper(days, hours, minutes, seconds, milliseconds, "001.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call ctor with all value set to 0");
+
+ try
+ {
+ retVal = VerificationHelper(0, 0, 0, 0, 0, "002.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentOutOfRangeException should be thrown when The parameters specify a TimeSpan value less than MinValue");
+
+ try
+ {
+ TimeSpan ts = new TimeSpan(Int32.MinValue, Int32.MinValue, Int32.MinValue, Int32.MinValue, Int32.MinValue);
+
+ TestLibrary.TestFramework.LogError("101.1", "ArgumentOutOfRangeException is not thrown when The parameters specify a TimeSpan value less than MinValue");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentOutOfRangeException should be thrown when The parameters specify a TimeSpan value less than MaxValue");
+
+ try
+ {
+ TimeSpan ts = new TimeSpan(Int32.MaxValue, Int32.MaxValue, Int32.MaxValue, Int32.MaxValue, Int32.MaxValue);
+
+ TestLibrary.TestFramework.LogError("102.1", "ArgumentOutOfRangeException is not thrown when The parameters specify a TimeSpan value less than MaxValue");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanCtor3 test = new TimeSpanCtor3();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanCtor3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(int days, int hours, int minutes, int seconds, int milliseconds, string errorNo)
+ {
+ bool retVal = true;
+
+ TimeSpan ts = new TimeSpan(days, hours, minutes, seconds, milliseconds);
+
+ long desiredTicks = days * TimeSpan.TicksPerDay + hours * TimeSpan.TicksPerHour +
+ minutes * TimeSpan.TicksPerMinute + seconds * TimeSpan.TicksPerSecond + milliseconds * TimeSpan.TicksPerMillisecond;
+ long actualTicks = ts.Ticks;
+
+ if (desiredTicks != actualTicks)
+ {
+ TestLibrary.TestFramework.LogError(errorNo + ".1", "Ticks of the instance contructed by ctor(int, int, int, int, int) is unexpected");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] hours = " + hours +
+ ", minutes = " + minutes +
+ ", seconds = " + seconds +
+ ", days = " + days +
+ ", milliseconds = " + milliseconds +
+ ", desiredTicks = " + desiredTicks +
+ ", actualTicks = " + actualTicks);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespanctor4.cs b/tests/src/CoreMangLib/cti/system/timespan/timespanctor4.cs
new file mode 100644
index 0000000000..bc9e203868
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespanctor4.cs
@@ -0,0 +1,133 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ctor(System.Int64)
+/// </summary>
+public class TimeSpanCtor4
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call ctor with rand long value");
+
+ try
+ {
+ long expected = TestLibrary.Generator.GetInt64(-55);
+ TimeSpan ts = new TimeSpan(expected);
+ long actual = ts.Ticks;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling ctor with rand long value construct a wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call ctor with MaxValue");
+
+ try
+ {
+ long expected = Int64.MaxValue;
+ TimeSpan ts = new TimeSpan(expected);
+ long actual = ts.Ticks;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling ctor with rand long value construct a wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call ctor with MinValue");
+
+ try
+ {
+ long expected = Int64.MinValue;
+ TimeSpan ts = new TimeSpan(expected);
+ long actual = ts.Ticks;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Calling ctor with rand long value construct a wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", expected = " + expected);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanCtor4 test = new TimeSpanCtor4();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanCtor4");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespanduration.cs b/tests/src/CoreMangLib/cti/system/timespan/timespanduration.cs
new file mode 100644
index 0000000000..f49bec0886
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespanduration.cs
@@ -0,0 +1,178 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Duration
+/// </summary>
+public class TimeSpanDuration
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Duration on a TimeSpan instance whose value is 0");
+
+ try
+ {
+ TimeSpan expected = new TimeSpan(0);
+ TimeSpan actual = expected.Duration();
+
+ if (actual.Ticks != expected.Ticks)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling Duration on a TimeSpan instance whose value is 0");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual.Ticks = " + actual.Ticks + ", expected.Ticks = " + expected.Ticks);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ long randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Duration on a TimeSpan instance whose value is a positive value");
+
+ try
+ {
+ do
+ {
+ randValue = TestLibrary.Generator.GetInt64(-55);
+ } while (randValue == 0);
+ if (randValue < 0) randValue *= -1;
+
+ TimeSpan expected = new TimeSpan(randValue);
+ TimeSpan actual = expected.Duration();
+
+ if (actual.Ticks != expected.Ticks)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling Duration on a TimeSpan instance whose value is a positive value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual.Ticks = " + actual.Ticks + ", expected.Ticks = " + expected.Ticks + ", randValue = " + randValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] randValue = " + randValue);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ long randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call Duration on a TimeSpan instance whose value is a negative value");
+
+ try
+ {
+ do
+ {
+ randValue = TestLibrary.Generator.GetInt64(-55);
+ } while ((randValue == 0) || (randValue == Int64.MinValue));
+ if (randValue > 0) randValue *= -1;
+
+ TimeSpan expected = new TimeSpan(randValue);
+ TimeSpan actual = expected.Duration();
+
+ if (actual.Ticks != (expected.Ticks * -1))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Calling Duration on a TimeSpan instance whose value is a negative value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual.Ticks = " + actual.Ticks + ", expected.Ticks = " + expected.Ticks + ", randValue = " + randValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] randValue = " + randValue);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException should be thrown when The value of this instance is MinValue.");
+
+ try
+ {
+ TimeSpan actual = TimeSpan.MinValue.Duration();
+
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException is not thrown when The value of this instance is MinValue.");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual);
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanDuration test = new TimeSpanDuration();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanDuration");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespanequals1.cs b/tests/src/CoreMangLib/cti/system/timespan/timespanequals1.cs
new file mode 100644
index 0000000000..2f2b04e2f1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespanequals1.cs
@@ -0,0 +1,172 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Equals(System.Object)
+/// </summary>
+public class TimeSpanEquals1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ long randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Equals should return true when compare with self instance");
+
+ try
+ {
+ randValue = TestLibrary.Generator.GetInt64(-55);
+ TimeSpan ts = new TimeSpan(randValue);
+
+ if (!ts.Equals(ts as Object))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Equals does not return true when compare with self instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] ts.Ticks = " + ts.Ticks + ", randValue = " + randValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ long randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Equals should return true when compare with equal instance");
+
+ try
+ {
+ randValue = TestLibrary.Generator.GetInt64(-55);
+ TimeSpan ts1 = new TimeSpan(randValue);
+ TimeSpan ts2 = new TimeSpan(randValue);
+
+ if (!ts1.Equals(ts2 as Object))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Equals does not return true when compare with self instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] ts1.Ticks = " + ts1.Ticks + ", ts2.Ticks = " + ts2.Ticks + ", randValue = " + randValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ long randValue1 = 0;
+ long randValue2 = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Equals should return false when compare with not equal instance");
+
+ try
+ {
+ randValue1 = TestLibrary.Generator.GetInt64(-55);
+ do
+ {
+ randValue2 = TestLibrary.Generator.GetInt64(-55);
+ } while (randValue2 == randValue1);
+
+ TimeSpan ts1 = new TimeSpan(randValue1);
+ TimeSpan ts2 = new TimeSpan(randValue2);
+
+ if (ts1.Equals(ts2 as Object))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Equals does not return false when compare with not equal instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] ts1.Ticks = " + ts1.Ticks + ", ts2.Ticks = " + ts2.Ticks + ", randValue1 = " + randValue1 + ", randValue2 = " + randValue2);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ long randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Equals should return false when compare with null reference");
+
+ try
+ {
+ randValue = TestLibrary.Generator.GetInt64(-55);
+
+ TimeSpan ts = new TimeSpan(randValue);
+
+ if (ts.Equals(null))
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Equals does not return false when compare with null reference");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] ts.Ticks = " + ts.Ticks + ", randValue = " + randValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanEquals1 test = new TimeSpanEquals1();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanEquals1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespanequals2.cs b/tests/src/CoreMangLib/cti/system/timespan/timespanequals2.cs
new file mode 100644
index 0000000000..c1c86b0c3b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespanequals2.cs
@@ -0,0 +1,138 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class TimeSpanEquals2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ long randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Equals should return true when compare with self instance");
+
+ try
+ {
+ randValue = TestLibrary.Generator.GetInt64(-55);
+ TimeSpan ts = new TimeSpan(randValue);
+
+ if (!ts.Equals(ts))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Equals does not return true when compare with self instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] ts.Ticks = " + ts.Ticks + ", randValue = " + randValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ long randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Equals should return true when compare with equal instance");
+
+ try
+ {
+ randValue = TestLibrary.Generator.GetInt64(-55);
+ TimeSpan ts1 = new TimeSpan(randValue);
+ TimeSpan ts2 = new TimeSpan(randValue);
+
+ if (!ts1.Equals(ts2))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Equals does not return true when compare with self instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] ts1.Ticks = " + ts1.Ticks + ", ts2.Ticks = " + ts2.Ticks + ", randValue = " + randValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ long randValue1 = 0;
+ long randValue2 = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Equals should return false when compare with not equal instance");
+
+ try
+ {
+ randValue1 = TestLibrary.Generator.GetInt64(-55);
+ do
+ {
+ randValue2 = TestLibrary.Generator.GetInt64(-55);
+ } while (randValue2 == randValue1);
+
+ TimeSpan ts1 = new TimeSpan(randValue1);
+ TimeSpan ts2 = new TimeSpan(randValue2);
+
+ if (ts1.Equals(ts2))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Equals does not return false when compare with not equal instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] ts1.Ticks = " + ts1.Ticks + ", ts2.Ticks = " + ts2.Ticks + ", randValue1 = " + randValue1 + ", randValue2 = " + randValue2);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanEquals2 test = new TimeSpanEquals2();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanEquals2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespanequals3.cs b/tests/src/CoreMangLib/cti/system/timespan/timespanequals3.cs
new file mode 100644
index 0000000000..e0b8d421c1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespanequals3.cs
@@ -0,0 +1,141 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Equals(System.TimeSpan,System.TimeSpan)
+/// </summary>
+public class TimeSpanEquals3
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ long randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Equals should return true when compare with self instance");
+
+ try
+ {
+ randValue = TestLibrary.Generator.GetInt64(-55);
+ TimeSpan ts = new TimeSpan(randValue);
+
+ if (!TimeSpan.Equals(ts, ts))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Equals does not return true when compare with self instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] ts.Ticks = " + ts.Ticks + ", randValue = " + randValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ long randValue = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Equals should return true when compare with equal instance");
+
+ try
+ {
+ randValue = TestLibrary.Generator.GetInt64(-55);
+ TimeSpan ts1 = new TimeSpan(randValue);
+ TimeSpan ts2 = new TimeSpan(randValue);
+
+ if (!TimeSpan.Equals(ts1, ts2))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Equals does not return true when compare with self instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] ts1.Ticks = " + ts1.Ticks + ", ts2.Ticks = " + ts2.Ticks + ", randValue = " + randValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ long randValue1 = 0;
+ long randValue2 = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Equals should return false when compare with not equal instance");
+
+ try
+ {
+ randValue1 = TestLibrary.Generator.GetInt64(-55);
+ do
+ {
+ randValue2 = TestLibrary.Generator.GetInt64(-55);
+ } while (randValue2 == randValue1);
+
+ TimeSpan ts1 = new TimeSpan(randValue1);
+ TimeSpan ts2 = new TimeSpan(randValue2);
+
+ if (TimeSpan.Equals(ts1, ts2))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Equals does not return false when compare with not equal instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] ts1.Ticks = " + ts1.Ticks + ", ts2.Ticks = " + ts2.Ticks + ", randValue1 = " + randValue1 + ", randValue2 = " + randValue2);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanEquals3 test = new TimeSpanEquals3();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanEquals3");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespanfromticks.cs b/tests/src/CoreMangLib/cti/system/timespan/timespanfromticks.cs
new file mode 100644
index 0000000000..d72f7fc578
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespanfromticks.cs
@@ -0,0 +1,106 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// FromTicks(System.Int64)
+/// </summary>
+public class TimeSpanFromTicks
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call FromTicks with rand Int64 values");
+
+ try
+ {
+ long randValue = TestLibrary.Generator.GetInt64(-55);
+
+ retVal = VerificationHelper(randValue, "001.1") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call FromTicks with boundary values");
+
+ try
+ {
+ retVal = VerificationHelper(0, "002.1") && retVal;
+ retVal = VerificationHelper(Int64.MinValue, "002.2") && retVal;
+ retVal = VerificationHelper(Int64.MaxValue, "002.3") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanFromTicks test = new TimeSpanFromTicks();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanFromTicks");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(long value, string errorno)
+ {
+ bool retVal = true;
+
+ TimeSpan actual = TimeSpan.FromTicks(value);
+
+ if (actual.Ticks != value)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "FromTicks returns wrong value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", value = " + value + ", actual.Ticks = " + actual.Ticks);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespangethashcode.cs b/tests/src/CoreMangLib/cti/system/timespan/timespangethashcode.cs
new file mode 100644
index 0000000000..b5b3cdee94
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespangethashcode.cs
@@ -0,0 +1,108 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// GetHashCode
+/// </summary>
+public class TimeSpanGetHashCode
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: GetHashCode should always return the same value for same TimeSpan instance");
+
+ try
+ {
+ long randValue = TestLibrary.Generator.GetInt64(-55);
+ TimeSpan ts = new TimeSpan(randValue);
+
+ int hash1 = ts.GetHashCode();
+ int hash2 = ts.GetHashCode();
+
+ if (hash1 != hash2)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "GetHashCode not always return the same value for same TimeSpan instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] hash1 = " + hash1 + ", hash2 = " + hash2 + ", randValue = " + randValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: GetHashCode should always return the same value for equal TimeSpan instance");
+
+ try
+ {
+ long randValue = TestLibrary.Generator.GetInt64(-55);
+ TimeSpan ts1 = new TimeSpan(randValue);
+ TimeSpan ts2 = new TimeSpan(randValue);
+
+ int hash1 = ts1.GetHashCode();
+ int hash2 = ts2.GetHashCode();
+
+ if (hash1 != hash2)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "GetHashCode not always return the same value for equal TimeSpan instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] hash1 = " + hash1 + ", hash2 = " + hash2 + ", randValue = " + randValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanGetHashCode test = new TimeSpanGetHashCode();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanGetHashCode");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespanmaxvalue.cs b/tests/src/CoreMangLib/cti/system/timespan/timespanmaxvalue.cs
new file mode 100644
index 0000000000..2078b5be59
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespanmaxvalue.cs
@@ -0,0 +1,84 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// MaxValue
+/// </summary>
+public class TimeSpanMaxValue
+{
+ #region Private Fields
+ private const string c_EXPECTED_STRING_REPRESENTATION = "10675199.02:48:05.4775807";
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: the value MaxValue is equivalent to Int64.MaxValue and the string representation of this value is 10675199.02:48:05.4775807");
+
+ try
+ {
+ long actual = TimeSpan.MaxValue.Ticks;
+ long desired = Int64.MaxValue;
+
+ if (actual != desired)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "the value MaxValue is not equivalent to Int64.MaxValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] actual = " + actual + ", desired = " + desired);
+ retVal = false;
+ }
+
+ string actualString = TimeSpan.MaxValue.ToString();
+ if (actualString != c_EXPECTED_STRING_REPRESENTATION)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "string representation of MaxValue is 10675199.02:48:05.4775807");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] actualString = " + actualString);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanMaxValue test = new TimeSpanMaxValue();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanMaxValue");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespanminvalue.cs b/tests/src/CoreMangLib/cti/system/timespan/timespanminvalue.cs
new file mode 100644
index 0000000000..914bd8f4b3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespanminvalue.cs
@@ -0,0 +1,84 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// MinValue
+/// </summary>
+public class TimeSpanMinValue
+{
+ #region Private Fields
+ private const string c_EXPECTED_STRING_REPRESENTATION = "-10675199.02:48:05.4775808";
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: the value MinValue is equivalent to Int64.MinValue and the string representation of this value is -10675199.02:48:05.4775808");
+
+ try
+ {
+ long actual = TimeSpan.MinValue.Ticks;
+ long desired = Int64.MinValue;
+
+ if (actual != desired)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "the value MinValue is not equivalent to Int64.MinValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] actual = " + actual + ", desired = " + desired);
+ retVal = false;
+ }
+
+ string actualString = TimeSpan.MinValue.ToString();
+ if (actualString != c_EXPECTED_STRING_REPRESENTATION)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "string representation of MaxValue is -10675199.02:48:05.4775808");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] actualString = " + actualString);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanMinValue test = new TimeSpanMinValue();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanMinValue");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespannegate.cs b/tests/src/CoreMangLib/cti/system/timespan/timespannegate.cs
new file mode 100644
index 0000000000..faa4811acf
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespannegate.cs
@@ -0,0 +1,181 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Negate
+/// </summary>
+public class TimeSpanNegate
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Negate when current TimeSpan is a positive value");
+
+ try
+ {
+ long randValue = 0;
+
+ do
+ {
+ randValue = TestLibrary.Generator.GetInt64(-55);
+ } while (randValue <= 0);
+
+ TimeSpan expected = new TimeSpan(randValue);
+ TimeSpan res = expected.Negate();
+
+ if (res.Ticks != (expected.Ticks * -1))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Call Negate when current TimeSpan is a positive value does not return a negative value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] res.Ticks = " + res.Ticks + ", expected.Ticks = " + expected.Ticks + ", expected = " + expected + ", randValue = " + randValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Negate when current TimeSpan is a negative value");
+
+ try
+ {
+ long randValue = 0;
+
+ do
+ {
+ randValue = TestLibrary.Generator.GetInt64(-55);
+ } while ((randValue == 0) || (randValue == Int64.MinValue));
+
+ if (randValue > 0)
+ {
+ randValue *= -1;
+ }
+
+ TimeSpan expected = new TimeSpan(randValue);
+ TimeSpan res = expected.Negate();
+
+ if (res.Ticks != (expected.Ticks * -1))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Call Negate when current TimeSpan is a negative value does not return a positive value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] res.Ticks = " + res.Ticks + ", expected.Ticks = " + expected.Ticks + ", expected = " + expected + ", randValue = " + randValue);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call Negate when current TimeSpan is 0");
+
+ try
+ {
+ TimeSpan expected = new TimeSpan(0);
+ TimeSpan res = expected.Negate();
+
+ if (res.Ticks != 0)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Call Negate when current TimeSpan is a negative value does not return a positive value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] res.Ticks = " + res.Ticks);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: OverflowException should be thrown when the value is TimeSpan.MinValue");
+
+ try
+ {
+ TimeSpan res = TimeSpan.MinValue.Negate();
+
+ TestLibrary.TestFramework.LogError("101.1", "OverflowException is not thrown when the value is TimeSpan.MinValue");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] res = " + res);
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanNegate test = new TimeSpanNegate();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanNegate");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespansupport.cs b/tests/src/CoreMangLib/cti/system/timespan/timespansupport.cs
new file mode 100644
index 0000000000..ebb883b423
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespansupport.cs
@@ -0,0 +1,168 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+// TimeSpanSupport.cs
+// Support file for parsing and formatting tests
+// The desktop changes 2009/04/21 KatyK are ported 2009/06/08 DidemG
+public static class Support
+{
+ public const String NegativeSign = "-";
+ public const String TimeSeparator = ":";
+ public const String CDaySep = ".";
+ public const String CDecSep = ".";
+ public const String GDaySep = ":";
+
+ static List<TimeSpan> _interestingTimeSpans = null;
+ static List<String> _errorFormats = null;
+
+ public static List<TimeSpan> InterestingTimeSpans
+ {
+ get
+ {
+ if (_interestingTimeSpans != null)
+ return _interestingTimeSpans;
+
+ // else, populate the list
+ List<TimeSpan> list = new List<TimeSpan>();
+ list.Add(TimeSpan.Zero);
+ // positive
+ list.Add(TimeSpan.MaxValue);
+ list.Add(TimeSpan.FromDays(1));
+ list.Add(TimeSpan.FromDays(1234));
+ list.Add(TimeSpan.FromHours(2));
+ list.Add(TimeSpan.FromHours(12));
+ list.Add(TimeSpan.FromMinutes(3));
+ list.Add(TimeSpan.FromMinutes(34));
+ list.Add(TimeSpan.FromSeconds(5));
+ list.Add(TimeSpan.FromSeconds(56));
+ list.Add(TimeSpan.FromMilliseconds(7));
+ list.Add(TimeSpan.FromMilliseconds(78));
+ list.Add(TimeSpan.FromMilliseconds(789));
+ list.Add(TimeSpan.FromMilliseconds(780));
+ list.Add(new TimeSpan(0, 2, 3, 4));
+ list.Add(new TimeSpan(1, 2, 3, 4));
+ list.Add(new TimeSpan(0, 2, 3, 4, 56));
+ list.Add(new TimeSpan(1, 2, 3, 4, 56));
+ list.Add(new TimeSpan(1, 2, 3, 4, 560));
+ list.Add(new TimeSpan(1, 2, 3, 4, 567));
+ list.Add(new TimeSpan(1, 2, 3, 4, 567).Add(new TimeSpan(8900)));
+ list.Add(new TimeSpan(1, 2, 3, 4, 567).Add(new TimeSpan(8901)));
+ // negative
+ list.Add(TimeSpan.MinValue);
+ list.Add(TimeSpan.FromDays(-1));
+ list.Add(TimeSpan.FromDays(-1234));
+ list.Add(TimeSpan.FromHours(-2));
+ list.Add(TimeSpan.FromHours(-12));
+ list.Add(TimeSpan.FromMinutes(-3));
+ list.Add(TimeSpan.FromMinutes(-34));
+ list.Add(TimeSpan.FromSeconds(-5));
+ list.Add(TimeSpan.FromSeconds(-56));
+ list.Add(TimeSpan.FromMilliseconds(-7));
+ list.Add(TimeSpan.FromMilliseconds(-78));
+ list.Add(TimeSpan.FromMilliseconds(-789));
+ list.Add(TimeSpan.FromMilliseconds(-780));
+ list.Add(new TimeSpan(-0, -2, -3, -4));
+ list.Add(new TimeSpan(-1, -2, -3, -4));
+ list.Add(new TimeSpan(-0, -2, -3, -4, -56));
+ list.Add(new TimeSpan(-1, -2, -3, -4, -56));
+ list.Add(new TimeSpan(-1, -2, -3, -4, -560));
+ list.Add(new TimeSpan(-1, -2, -3, -4, -567));
+ list.Add(new TimeSpan(-1, -2, -3, -4, -567).Add(new TimeSpan(-8900)));
+ list.Add(new TimeSpan(-1, -2, -3, -4, -567).Add(new TimeSpan(-8901)));
+
+ _interestingTimeSpans = list;
+ return _interestingTimeSpans;
+ }
+ }
+
+ public static List<String> ErrorFormats
+ {
+ get
+ {
+ if (_errorFormats != null)
+ return _errorFormats;
+
+ // else, populate the list
+ String[] errorValues = {
+ "a", "A", "b", "B", "C", "d", "D", "e", "E", "f", "F", "h", "H",
+ "i", "I", "j", "J", "k", "l", "L", "m", "M", "n", "N", "o", "O",
+ "p", "q", "Q", "r", "R", "s", "S", "u", "U", "v", "V", "w", "W",
+ "x", "X", "y", "Y", "z", "Z",
+ ".", ":", ",", "/", "\\", " ", "-", "%", "*", " ", "\t",
+ "ddddddddd", "hhh", "mmm", "sss", "ffffffff", "FFFFFFFF",
+ "literal", "d ",
+ };
+ _errorFormats = new List<String>(errorValues);
+ return _errorFormats;
+ }
+ }
+
+ public static String CFormat(TimeSpan ts)
+ {
+ return Neg(ts) + OptionalDay(ts, CDaySep) + HHMMSS(ts) + OptionalFraction_f(ts, CDecSep);
+ }
+ public static String gFormat(TimeSpan ts, String GDecSep)
+ {
+ return Neg(ts) + OptionalDay(ts, GDaySep) + HMMSS(ts) + OptionalFraction_F(ts, GDecSep);
+ }
+ public static String GFormat(TimeSpan ts, String GDecSep)
+ {
+ return Neg(ts) + Day(ts, GDaySep) + HHMMSS(ts) + Fraction(ts, GDecSep);
+ }
+
+ public static String Neg(TimeSpan timeSpan)
+ {
+ if (timeSpan < TimeSpan.Zero)
+ return NegativeSign;
+ else
+ return String.Empty;
+ }
+ public static String Day(TimeSpan timeSpan, String daySeparator)
+ {
+ return Math.Abs(timeSpan.Days).ToString() + daySeparator;
+ }
+ public static String OptionalDay(TimeSpan timeSpan, String daySeparator)
+ {
+ return timeSpan.Days == 0 ? "" : Day(timeSpan, daySeparator);
+ }
+ public static String HHMMSS(TimeSpan timeSpan)
+ {
+ return String.Format("{0:d2}{3}{1:d2}{3}{2:d2}", Math.Abs(timeSpan.Hours), Math.Abs(timeSpan.Minutes), Math.Abs(timeSpan.Seconds), TimeSeparator);
+ }
+ public static String HMMSS(TimeSpan timeSpan)
+ {
+ return String.Format("{0:d}{3}{1:d2}{3}{2:d2}", Math.Abs(timeSpan.Hours), Math.Abs(timeSpan.Minutes), Math.Abs(timeSpan.Seconds), TimeSeparator);
+ }
+ public static String Fraction(TimeSpan timeSpan, String decimalSeparator)
+ {
+ int ticksonly = Math.Abs((int)(timeSpan.Ticks % TimeSpan.TicksPerSecond));
+ return decimalSeparator + ticksonly.ToString("d7");
+ }
+ public static String OptionalFraction_f(TimeSpan timeSpan, String decimalSeparator)
+ {
+ int ticksonly = Math.Abs((int)(timeSpan.Ticks % TimeSpan.TicksPerSecond));
+ if (ticksonly == 0)
+ return String.Empty;
+ else
+ return decimalSeparator + ticksonly.ToString("d7");
+ }
+ public static String OptionalFraction_F(TimeSpan timeSpan, String decimalSeparator)
+ {
+ int ticksonly = Math.Abs((int)(timeSpan.Ticks % TimeSpan.TicksPerSecond));
+ DateTime dt = new DateTime(ticksonly);
+ String str = dt.ToString("FFFFFFF");
+ if (str.Length == 0)
+ return str;
+ else
+ return decimalSeparator + str;
+ }
+
+ public static String PrintTimeSpan(TimeSpan ts)
+ {
+ String ret = String.Format("{0}d {1}h {2}m {3}s {4:F4}ms", ts.Days, ts.Hours, ts.Minutes, ts.Seconds, (ts.Ticks % TimeSpan.TicksPerSecond / (float)TimeSpan.TicksPerMillisecond));
+ return ret;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespanticks.cs b/tests/src/CoreMangLib/cti/system/timespan/timespanticks.cs
new file mode 100644
index 0000000000..cd871bbf92
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespanticks.cs
@@ -0,0 +1,74 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Ticks
+/// </summary>
+public class TimeSpanTicks
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Ticks to get the correct ticks value");
+
+ try
+ {
+ long expected = TestLibrary.Generator.GetInt64(-55);
+
+ TimeSpan ts = new TimeSpan(expected);
+ long actual = ts.Ticks;
+
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Ticks returns wrong value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] ts = " + ts + ", expected = " + expected + ", actual = " + actual);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanTicks test = new TimeSpanTicks();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanTicks");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespanticksperday.cs b/tests/src/CoreMangLib/cti/system/timespan/timespanticksperday.cs
new file mode 100644
index 0000000000..8298fe2da6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespanticksperday.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// TicksPerDay
+/// </summary>
+public class TimeSpanTicksPerDay
+{
+ #region Private Fields
+ private const long c_DESIRED_TICKSPERDAY = 864000000000;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The value of TicksPerDay should be 864000000000");
+
+ try
+ {
+ long actual = TimeSpan.TicksPerDay;
+
+ if (actual != c_DESIRED_TICKSPERDAY)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The value of TicksPerDay is not 864000000000");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", c_DESIRED_TICKSPERDAY = " + c_DESIRED_TICKSPERDAY);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanTicksPerDay test = new TimeSpanTicksPerDay();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanTicksPerDay");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespanticksperhour.cs b/tests/src/CoreMangLib/cti/system/timespan/timespanticksperhour.cs
new file mode 100644
index 0000000000..8550655b61
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespanticksperhour.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// TicksPerHour
+/// </summary>
+public class TimeSpanTicksPerHour
+{
+ #region Private Fields
+ private const long c_DESIRED_TICKSPERHOUR = 36000000000;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The value of TicksPerHour should be 36000000000");
+
+ try
+ {
+ long actual = TimeSpan.TicksPerHour;
+
+ if (actual != c_DESIRED_TICKSPERHOUR)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The value of TicksPerHour is not 36000000000");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", c_DESIRED_TICKSPERHOUR = " + c_DESIRED_TICKSPERHOUR);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanTicksPerHour test = new TimeSpanTicksPerHour();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanTicksPerHour");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespanticksperminute.cs b/tests/src/CoreMangLib/cti/system/timespan/timespanticksperminute.cs
new file mode 100644
index 0000000000..cf24ce1695
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespanticksperminute.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// TicksPerMinute
+/// </summary>
+public class TimeSpanTicksPerMinute
+{
+ #region Private Fields
+ private const long c_DESIRED_TICKSPERMINUTE = 600000000;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The value of TicksPerMinute should be 600000000");
+
+ try
+ {
+ long actual = TimeSpan.TicksPerMinute;
+
+ if (actual != c_DESIRED_TICKSPERMINUTE)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The value of TicksPerMinute is not 600000000");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", c_DESIRED_TICKSPERMINUTE = " + c_DESIRED_TICKSPERMINUTE);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanTicksPerMinute test = new TimeSpanTicksPerMinute();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanTicksPerMinute");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespantickspersecond.cs b/tests/src/CoreMangLib/cti/system/timespan/timespantickspersecond.cs
new file mode 100644
index 0000000000..b24ec893bc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespantickspersecond.cs
@@ -0,0 +1,75 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// TicksPerSecond
+/// </summary>
+public class TimeSpanTicksPerSecond
+{
+ #region Private Fields
+ private const long c_DESIRED_TICKSPERSECOND = 10000000;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The value of TicksPerSecond should be 10000000");
+
+ try
+ {
+ long actual = TimeSpan.TicksPerSecond;
+
+ if (actual != c_DESIRED_TICKSPERSECOND)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "The value of TicksPerSecond is not 10000000");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] actual = " + actual + ", c_DESIRED_TICKSPERSECOND = " + c_DESIRED_TICKSPERSECOND);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanTicksPerSecond test = new TimeSpanTicksPerSecond();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanTicksPerSecond");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespantostring_str.cs b/tests/src/CoreMangLib/cti/system/timespan/timespantostring_str.cs
new file mode 100644
index 0000000000..4d5e5493d9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespantostring_str.cs
@@ -0,0 +1,279 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using TestLibrary;
+
+// ToString_str.cs
+// Tests TimeSpan.ToString(str)
+// The desktop changes 2009/04/21 KatyK are ported 2009/06/08 DidemG
+public class TimeSpanTest
+{
+ static bool verbose = false;
+ static int iCountTestcases = 0;
+ static int iCountErrors = 0;
+
+ public static int Main(String[] args)
+ {
+ try
+ {
+ // for SL, String.ToLower(InvariantCulture)
+ if ((args.Length > 0) && args[0].ToLower() == "true")
+ verbose = true;
+
+ Logging.WriteLine("CurrentCulture: " + Utilities.CurrentCulture.Name);
+ Logging.WriteLine("CurrentUICulture: " + Utilities.CurrentCulture.Name);
+
+ RunTests();
+ }
+ catch (Exception e)
+ {
+ iCountErrors++;
+ Logging.WriteLine("Unexpected exception!! " + e.ToString());
+ }
+
+ if (iCountErrors == 0)
+ {
+ Logging.WriteLine("Pass. iCountTestcases=="+iCountTestcases);
+ return 100;
+ }
+ else
+ {
+ Logging.WriteLine("FAIL! iCountTestcases=="+iCountTestcases+", iCountErrors=="+iCountErrors);
+ return 1;
+ }
+ }
+
+ public static void RunTests()
+ {
+ // The current implementation uses the same character as the default NumberDecimalSeparator
+ // for a culture, but this is an implementation detail and could change. No user overrides
+ // are respected.
+ String GDecimalSeparator = Utilities.CurrentCulture.NumberFormat.NumberDecimalSeparator;
+ // Standard formats
+ foreach (TimeSpan ts in Support.InterestingTimeSpans)
+ {
+ String defaultFormat = Support.CFormat(ts);
+ VerifyToString(ts, defaultFormat); // no regressions
+ VerifyToString(ts, "c", defaultFormat);
+ VerifyToString(ts, "t", defaultFormat);
+ VerifyToString(ts, "T", defaultFormat);
+ VerifyToString(ts, null, defaultFormat);
+ VerifyToString(ts, "", defaultFormat);
+ VerifyToString(ts, "g", Support.gFormat(ts, GDecimalSeparator));
+ VerifyToString(ts, "G", Support.GFormat(ts, GDecimalSeparator));
+ }
+
+ // Custom formats
+ TimeSpan ts1 = new TimeSpan(1, 2, 3, 4, 56);
+ VerifyToString(ts1, "d'-'", "1-");
+ VerifyToString(ts1, "%d", "1");
+ VerifyToString(ts1, "dd", "01");
+ VerifyToString(ts1, "ddd", "001");
+ VerifyToString(ts1, "dddd", "0001");
+ VerifyToString(ts1, "ddddd", "00001");
+ VerifyToString(ts1, "dddddd", "000001");
+ VerifyToString(ts1, "ddddddd", "0000001");
+ VerifyToString(ts1, "dddddddd", "00000001");
+ VerifyToString(ts1, "h'-'", "2-");
+ VerifyToString(ts1, "%h", "2");
+ VerifyToString(ts1, "hh", "02");
+ VerifyToString(ts1, "m'-'", "3-");
+ VerifyToString(ts1, "%m", "3");
+ VerifyToString(ts1, "mm", "03");
+ VerifyToString(ts1, "s'-'", "4-");
+ VerifyToString(ts1, "%s", "4");
+ VerifyToString(ts1, "ss", "04");
+ VerifyToString(ts1, "f'-'", "0-");
+ VerifyToString(ts1, "ff", "05");
+ VerifyToString(ts1, "fff", "056");
+ VerifyToString(ts1, "ffff", "0560");
+ VerifyToString(ts1, "fffff", "05600");
+ VerifyToString(ts1, "ffffff", "056000");
+ VerifyToString(ts1, "fffffff", "0560000");
+ VerifyToString(ts1, "F'-'", "-");
+ VerifyToString(ts1, "FF", "05");
+ VerifyToString(ts1, "FFF", "056");
+ VerifyToString(ts1, "FFFF", "056");
+ VerifyToString(ts1, "FFFFF", "056");
+ VerifyToString(ts1, "FFFFFF", "056");
+ VerifyToString(ts1, "FFFFFFF", "056");
+ VerifyToString(ts1, "hhmmss", "020304");
+
+ ts1 = new TimeSpan(-1, -2, -3, -4, -56);
+ VerifyToString(ts1, "d'-'", "1-");
+ VerifyToString(ts1, "%d", "1");
+ VerifyToString(ts1, "dd", "01");
+ VerifyToString(ts1, "ddd", "001");
+ VerifyToString(ts1, "dddd", "0001");
+ VerifyToString(ts1, "ddddd", "00001");
+ VerifyToString(ts1, "dddddd", "000001");
+ VerifyToString(ts1, "ddddddd", "0000001");
+ VerifyToString(ts1, "dddddddd", "00000001");
+ VerifyToString(ts1, "h'-'", "2-");
+ VerifyToString(ts1, "%h", "2");
+ VerifyToString(ts1, "hh", "02");
+ VerifyToString(ts1, "m'-'", "3-");
+ VerifyToString(ts1, "%m", "3");
+ VerifyToString(ts1, "mm", "03");
+ VerifyToString(ts1, "s'-'", "4-");
+ VerifyToString(ts1, "%s", "4");
+ VerifyToString(ts1, "ss", "04");
+ VerifyToString(ts1, "f'-'", "0-");
+ VerifyToString(ts1, "ff", "05");
+ VerifyToString(ts1, "fff", "056");
+ VerifyToString(ts1, "ffff", "0560");
+ VerifyToString(ts1, "fffff", "05600");
+ VerifyToString(ts1, "ffffff", "056000");
+ VerifyToString(ts1, "fffffff", "0560000");
+ VerifyToString(ts1, "F'-'", "-");
+ VerifyToString(ts1, "FF", "05");
+ VerifyToString(ts1, "FFF", "056");
+ VerifyToString(ts1, "FFFF", "056");
+ VerifyToString(ts1, "FFFFF", "056");
+ VerifyToString(ts1, "FFFFFF", "056");
+ VerifyToString(ts1, "FFFFFFF", "056");
+ VerifyToString(ts1, "hhmmss", "020304");
+
+ ts1 = new TimeSpan(1, 2, 3, 4, 56).Add(new TimeSpan(78));
+ VerifyToString(ts1, "'.'F", ".");
+ VerifyToString(ts1, "FF", "05");
+ VerifyToString(ts1, "FFF", "056");
+ VerifyToString(ts1, "FFFF", "056");
+ VerifyToString(ts1, "FFFFF", "056");
+ VerifyToString(ts1, "FFFFFF", "056007");
+ VerifyToString(ts1, "FFFFFFF", "0560078");
+
+ ts1 = new TimeSpan(1, 2, 3, 4).Add(new TimeSpan(789));
+ VerifyToString(ts1, "'.'F", ".");
+ VerifyToString(ts1, "FF", "");
+ VerifyToString(ts1, "FFF", "");
+ VerifyToString(ts1, "FFFF", "");
+ VerifyToString(ts1, "FFFFF", "00007");
+ VerifyToString(ts1, "FFFFFF", "000078");
+ VerifyToString(ts1, "FFFFFFF", "0000789");
+
+ // Literals
+ ts1 = new TimeSpan(1, 2, 3, 4, 56).Add(new TimeSpan(78));
+ VerifyToString(ts1, "d'd'", "1d");
+ VerifyToString(ts1, "d' days'", "1 days");
+ VerifyToString(ts1, "d' days, 'h' hours, 'm' minutes, 's'.'FFFF' seconds'", "1 days, 2 hours, 3 minutes, 4.056 seconds");
+
+ // Error formats
+ foreach (String errorFormat in Support.ErrorFormats)
+ {
+ ts1 = new TimeSpan(1, 2, 3, 4, 56).Add(new TimeSpan(78));
+ VerifyToStringException<FormatException>(ts1, errorFormat);
+ }
+
+
+ // Vary current culture
+ Utilities.CurrentCulture = CultureInfo.InvariantCulture;
+ foreach (TimeSpan ts in Support.InterestingTimeSpans)
+ {
+ String defaultFormat = Support.CFormat(ts);
+ VerifyToString(ts, defaultFormat);
+ VerifyToString(ts, "c", defaultFormat);
+ VerifyToString(ts, "t", defaultFormat);
+ VerifyToString(ts, "T", defaultFormat);
+ VerifyToString(ts, null, defaultFormat);
+ VerifyToString(ts, "", defaultFormat);
+ VerifyToString(ts, "g", Support.gFormat(ts, "."));
+ VerifyToString(ts, "G", Support.GFormat(ts, "."));
+ }
+
+ Utilities.CurrentCulture = new CultureInfo("en-US");
+ foreach (TimeSpan ts in Support.InterestingTimeSpans)
+ {
+ String defaultFormat = Support.CFormat(ts);
+ VerifyToString(ts, defaultFormat);
+ VerifyToString(ts, "c", defaultFormat);
+ VerifyToString(ts, "t", defaultFormat);
+ VerifyToString(ts, "T", defaultFormat);
+ VerifyToString(ts, null, defaultFormat);
+ VerifyToString(ts, "", defaultFormat);
+ VerifyToString(ts, "g", Support.gFormat(ts, "."));
+ VerifyToString(ts, "G", Support.GFormat(ts, "."));
+ }
+
+ Utilities.CurrentCulture = new CultureInfo("de-DE");
+ foreach (TimeSpan ts in Support.InterestingTimeSpans)
+ {
+ String defaultFormat = Support.CFormat(ts);
+ VerifyToString(ts, defaultFormat);
+ VerifyToString(ts, "c", defaultFormat);
+ VerifyToString(ts, "t", defaultFormat);
+ VerifyToString(ts, "T", defaultFormat);
+ VerifyToString(ts, null, defaultFormat);
+ VerifyToString(ts, "", defaultFormat);
+ VerifyToString(ts, "g", Support.gFormat(ts, ","));
+ VerifyToString(ts, "G", Support.GFormat(ts, ","));
+ }
+
+ }
+
+ public static void VerifyToString(TimeSpan timeSpan, String expectedResult)
+ {
+ iCountTestcases++;
+ try
+ {
+ String result = timeSpan.ToString();
+ if (verbose)
+ Logging.WriteLine("{0} ({1}) ==> {2}", Support.PrintTimeSpan(timeSpan), "default", result);
+ if (result != expectedResult)
+ {
+ iCountErrors++;
+ Logging.WriteLine("FAILURE: Input = {0}, Format: '{1}', Expected Return: '{2}', Actual Return: '{3}'", Support.PrintTimeSpan(timeSpan), "default", expectedResult, result);
+ }
+ }
+ catch (Exception ex)
+ {
+ iCountErrors++;
+ Logging.WriteLine("FAILURE: Unexpected Exception, Input = {0}, Format = '{1}', Exception: {2}", Support.PrintTimeSpan(timeSpan), "default", ex);
+ }
+ }
+
+ public static void VerifyToString(TimeSpan timeSpan, String format, String expectedResult)
+ {
+ iCountTestcases++;
+ try
+ {
+ String result = timeSpan.ToString(format);
+ if (verbose)
+ Logging.WriteLine("{0} ('{1}') ==> {2}", Support.PrintTimeSpan(timeSpan), format, result);
+ if (result != expectedResult)
+ {
+ iCountErrors++;
+ Logging.WriteLine("FAILURE: Input = {0}, Format: '{1}', Expected Return: '{2}', Actual Return: '{3}'", Support.PrintTimeSpan(timeSpan), format, expectedResult, result);
+ }
+ }
+ catch (Exception ex)
+ {
+ iCountErrors++;
+ Logging.WriteLine("FAILURE: Unexpected Exception, Input = {0}, Format = '{1}', Exception: {2}", Support.PrintTimeSpan(timeSpan), format, ex);
+ }
+ }
+
+ public static void VerifyToStringException<TException>(TimeSpan timeSpan, String format) where TException : Exception
+ {
+ iCountTestcases++;
+ if (verbose)
+ Logging.WriteLine("Expecting {2}: {0} ('{1}')", Support.PrintTimeSpan(timeSpan), format, typeof(TException));
+ try
+ {
+ String result = timeSpan.ToString(format);
+ iCountErrors++;
+ Logging.WriteLine("FAILURE: Input = {0}, Format: '{1}', Expected Exception: {2}, Actual Return: '{3}'", Support.PrintTimeSpan(timeSpan), format, typeof(TException), result);
+ }
+ catch (TException)
+ {
+ //Logging.WriteLine("INFO: {0}: {1}", ex.GetType(), ex.Message);
+ }
+ catch (Exception ex)
+ {
+ iCountErrors++;
+ Logging.WriteLine("FAILURE: Unexpected Exception, Input = {0}, Format = '{1}', Exception: {2}", Support.PrintTimeSpan(timeSpan), format, ex);
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespantotaldays.cs b/tests/src/CoreMangLib/cti/system/timespan/timespantotaldays.cs
new file mode 100644
index 0000000000..bb068397e8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespantotaldays.cs
@@ -0,0 +1,139 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// TotalDays
+/// </summary>
+public class TimeSpanTotalDays
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call TotalDays with valid values");
+
+ try
+ {
+ retVal = VerificationHelper(new TimeSpan(1, 0, 0, 0), 1.0, "001.1") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 0, 0), 0.0, "001.2") && retVal;
+ retVal = VerificationHelper(new TimeSpan(23, 0, 0, 0), 23.0, "001.3") && retVal;
+ retVal = VerificationHelper(new TimeSpan(23, 0, 0), 0.958333333333, "001.4") && retVal;
+ retVal = VerificationHelper(new TimeSpan(1, 0, 0, 0, 500), 1.0000057870370369, "001.5") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call TotalDays with boundary values");
+
+ try
+ {
+ retVal = VerificationHelper(new TimeSpan(23, 23, 59, 59), 23.9999884259259, "002.1") && retVal;
+ retVal = VerificationHelper(new TimeSpan(47, 59, 59), 1.99998842592593, "002.2") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 86400), 1.0, "002.3") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 86399), 0.999988425925926, "002.4") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call TotalDays on negative TimeSpan instances");
+
+ try
+ {
+ retVal = VerificationHelper(new TimeSpan(-1, 0, 0, 0), -1.0, "003.1") && retVal;
+ retVal = VerificationHelper(new TimeSpan(-23, 0, 0, 0), -23.0, "003.2") && retVal;
+ retVal = VerificationHelper(new TimeSpan(-23, 0, 0), -0.95833333, "003.3") && retVal;
+ retVal = VerificationHelper(new TimeSpan(-48, 0, 0), -2.0, "003.4") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanTotalDays test = new TimeSpanTotalDays();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanTotalDays");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(TimeSpan ts, double expected, string errorno)
+ {
+ bool retVal = true;
+
+ double actual = ts.TotalDays;
+ double result = actual - expected;
+ if (result < 0)
+ {
+ result *= -1;
+ }
+
+ if (result >= 0.00000001)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "TotalDays returns wrong value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] ts = " + ts + ", expected = " + expected + ", actual = " + actual + ", result = " + result);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespantotalhours.cs b/tests/src/CoreMangLib/cti/system/timespan/timespantotalhours.cs
new file mode 100644
index 0000000000..3d31ebb9bc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespantotalhours.cs
@@ -0,0 +1,151 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// TotalHours
+/// </summary>
+public class TimeSpanTotalHours
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call TotalHours with valid values");
+
+ try
+ {
+ retVal = VerificationHelper(new TimeSpan(1, 0, 0, 0), 24.0, "001.1") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 0, 0), 0.0, "001.2") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 23, 0, 0), 23.0, "001.3") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 60, 0), 1.0, "001.4") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 3600), 1.0, "001.5") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 500), 0.138888888888889, "001.6") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 10, 0), 0.166666666666667, "001.7") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 10000, 0), 166.666666666667, "001.8") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call TotalHours with boundary values");
+
+ try
+ {
+ retVal = VerificationHelper(new TimeSpan(1, 23, 59, 59), 47.9997222222222, "002.1") && retVal;
+ retVal = VerificationHelper(new TimeSpan(47, 59, 59), 47.9997222222222, "002.2") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 86400), 24.0, "002.3") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 86399), 23.9997222222222, "002.4") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 1), 0.0002777777777778, "002.5") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 1, 0), 0.01666666666666, "002.6") && retVal;
+ retVal = VerificationHelper(new TimeSpan(1, 1, 1), 1.01694444444444, "002.7") && retVal;
+ retVal = VerificationHelper(new TimeSpan(1, 1, 1, 1), 25.01694444444, "002.8") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 0, 0, 1), 2.77777777777778E-07, "002.9") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call TotalHours on negative TimeSpan instances");
+
+ try
+ {
+ retVal = VerificationHelper(new TimeSpan(-1, 0, 0, 0), -24.0, "003.1") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, -23, 0, 0), -23.0, "003.2") && retVal;
+ retVal = VerificationHelper(new TimeSpan(-48, 1, 0), -47.98333333333, "003.3") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, -60, 0), -1.0, "003.4") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, -3600), -1.0, "003.5") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, -500), -0.13888888888889, "003.6") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, -10, 0), -0.1666666666667, "003.7") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, -10000, 0), -166.66666666667, "003.8") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanTotalHours test = new TimeSpanTotalHours();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanTotalHours");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(TimeSpan ts, double expected, string errorno)
+ {
+ bool retVal = true;
+
+ double actual = ts.TotalHours;
+ double result = actual - expected;
+ if (result < 0)
+ {
+ result *= -1;
+ }
+
+ if (result >= 0.00000001)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "TotalHours returns wrong value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] ts = " + ts + ", expected = " + expected + ", actual = " + actual + ", result = " + result);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespantotalmilliseconds.cs b/tests/src/CoreMangLib/cti/system/timespan/timespantotalmilliseconds.cs
new file mode 100644
index 0000000000..5d86d8bfa5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespantotalmilliseconds.cs
@@ -0,0 +1,123 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// TotalMilliseconds
+/// </summary>
+public class TimeSpanTotalMilliseconds
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call TotalMilliseconds with valid values");
+
+ try
+ {
+ retVal = VerificationHelper(new TimeSpan(1, 0, 0, 0), 86400000.0, "001.1") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 0, 0), 0, "001.2") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 23, 0, 0, 999), 82800999.0, "001.3") && retVal;
+ retVal = VerificationHelper(new TimeSpan(48, 0, 0, 0, 99), 4147200099.0, "001.4") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 60, 9), 3609000.0, "001.5") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 1), 1000.0, "001.6") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 1, 0), 60000.0, "001.7") && retVal;
+ retVal = VerificationHelper(new TimeSpan(1, 0, 0), 3600000.0, "001.8") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 0, 0, 1), 1.0, "001.9") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call TotalMilliseconds on negative TimeSpan instances");
+
+ try
+ {
+ retVal = VerificationHelper(new TimeSpan(-1, 0, 0, 0), -86400000.0, "002.1") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 0, 0), 0.0, "002.2") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, -23, 0, 0, 999), -82799001.0, "002.3") && retVal;
+ retVal = VerificationHelper(new TimeSpan(-48, 0, 0, 0, -99), -4147200099.0, "002.4") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, -1), -1000, "002.5") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, -1, 0), -60000, "002.6") && retVal;
+ retVal = VerificationHelper(new TimeSpan(-1, 0, 0), -3600000, "002.7") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 0, 0, -1), -1.0, "002.8") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanTotalMilliseconds test = new TimeSpanTotalMilliseconds();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanTotalMilliseconds");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(TimeSpan ts, double expected, string errorno)
+ {
+ bool retVal = true;
+
+ double actual = ts.TotalMilliseconds;
+ double result = actual - expected;
+ if (result < 0)
+ {
+ result *= -1;
+ }
+
+ if (result >= 0.00000001)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "TotalMilliseconds returns wrong value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] ts = " + ts + ", expected = " + expected + ", actual = " + actual + ", result = " + result);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespantotalminutes.cs b/tests/src/CoreMangLib/cti/system/timespan/timespantotalminutes.cs
new file mode 100644
index 0000000000..d42891f4b8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespantotalminutes.cs
@@ -0,0 +1,150 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// TotalMinutes
+/// </summary>
+public class TimeSpanTotalMinutes
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call TotalMinutes with valid values");
+
+ try
+ {
+ retVal = VerificationHelper(new TimeSpan(1, 0, 0, 0), 1440.0, "001.1") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 0, 0), 0.0, "001.2") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 23, 59, 0), 1439.0, "001.3") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 1, 0), 1, "001.4") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 61, 0), 61, "001.5") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 61), 1.01666666666667, "001.6") && retVal;
+ retVal = VerificationHelper(new TimeSpan(1, 0, 0), 60, "001.7") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 0, 0, 500), 0.008333333333, "001.8") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 23, -59, 0), 1321.0, "001.9") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call TotalMinutes with boundary values");
+
+ try
+ {
+ retVal = VerificationHelper(new TimeSpan(1, 23, 119, 59), 2939.983333333, "002.1") && retVal;
+ retVal = VerificationHelper(new TimeSpan(47, 59, 59), 2879.983333333, "002.2") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 60), 1, "002.3") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 59), 0.983333333333333, "002.4") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 0, 1), 0.01666666666666, "002.5") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 0, 0, 1), 1.66666666666667E-05, "002.6") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call TotalMinutes on negative TimeSpan instances");
+
+ try
+ {
+ retVal = VerificationHelper(new TimeSpan(-1, 0, 0, 0), -1440, "003.1") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 0, 0), 0, "003.2") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, -23, -59, 0), -1439, "003.3") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 1, 0), 1, "003.4") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, -61, 0), -61, "003.5") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, -61), -1.016666666666, "003.6") && retVal;
+ retVal = VerificationHelper(new TimeSpan(-1, 0, 0), -60, "003.7") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 0, 0, -500), -0.00833333333333333, "003.8") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, -23, 59, 0), -1321.0, "003.9") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanTotalMinutes test = new TimeSpanTotalMinutes();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanTotalMinutes");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(TimeSpan ts, double expected, string errorno)
+ {
+ bool retVal = true;
+
+ double actual = ts.TotalMinutes;
+ double result = actual - expected;
+ if (result < 0)
+ {
+ result *= -1;
+ }
+
+ if (result >= 0.00000001)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "TotalMinutes returns wrong value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] ts = " + ts + ", expected = " + expected + ", actual = " + actual + ", result = " + result);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespantotalseconds.cs b/tests/src/CoreMangLib/cti/system/timespan/timespantotalseconds.cs
new file mode 100644
index 0000000000..c7b65f81a6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespantotalseconds.cs
@@ -0,0 +1,151 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// TotalSeconds
+/// </summary>
+public class TimeSpanTotalSeconds
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call TotalSeconds with valid values");
+
+ try
+ {
+ retVal = VerificationHelper(new TimeSpan(1, 0, 0, 0), 86400, "001.1") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 0, 0), 0, "001.2") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 23, 59, 59), 86399, "001.3") && retVal;
+ retVal = VerificationHelper(new TimeSpan(48, 0, -59), 172741, "001.4") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 61), 61, "001.5") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 0, 0, 1000), 1, "001.6") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 1, 0, 0, 0), 3600.0, "001.7") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 1, 0, 0), 60.0, "001.8") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 0, 1, 0), 1.0, "001.9") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 23, 59, 59, 900), 86399.9, "001.10") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call TotalSeconds with boundary values");
+
+ try
+ {
+ retVal = VerificationHelper(new TimeSpan(1, 23, 119, 59), 176399, "002.1") && retVal;
+ retVal = VerificationHelper(new TimeSpan(47, 59, 59), 172799, "002.2") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 60), 60, "002.3") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 0, 0, 999), 0.999, "002.4") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 0, 0, 1), 0.001, "002.5") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 0, 0, -1), -0.001, "002.6") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call TotalSeconds on negative TimeSpan instances");
+
+ try
+ {
+ retVal = VerificationHelper(new TimeSpan(-1, 0, 0, 0), -86400, "003.1") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 0, 0), 0, "003.2") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, -23, -59, -59), -86399, "003.3") && retVal;
+ retVal = VerificationHelper(new TimeSpan(-48, 59, 59), -169201, "003.4") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, -61), -61, "003.5") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 0, 0, -1000), -1, "003.6") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, -1, 0, 0, 0), -3600.0, "003.7") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, -1, 0, 0), -60.0, "003.8") && retVal;
+ retVal = VerificationHelper(new TimeSpan(0, 0, 0, -1, 0), -1.0, "003.9") && retVal;
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanTotalSeconds test = new TimeSpanTotalSeconds();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanTotalSeconds");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool VerificationHelper(TimeSpan ts, double expected, string errorno)
+ {
+ bool retVal = true;
+
+ double actual = ts.TotalSeconds;
+ double result = actual - expected;
+ if (result < 0)
+ {
+ result *= -1;
+ }
+
+ if (result >= 0.00000001)
+ {
+ TestLibrary.TestFramework.LogError(errorno, "TotalSeconds returns wrong value");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLE] ts = " + ts + ", expected = " + expected + ", actual = " + actual + ", result = " + result);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/timespan/timespanzero.cs b/tests/src/CoreMangLib/cti/system/timespan/timespanzero.cs
new file mode 100644
index 0000000000..3d0569b4df
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/timespan/timespanzero.cs
@@ -0,0 +1,84 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Zero
+/// </summary>
+public class TimeSpanZero
+{
+ #region Private Fields
+ private const string c_EXPECTED_STRING_REPRESENTATION = "00:00:00";
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: the value Zero is equivalent to 0 and the string representation of this value is 00:00:00");
+
+ try
+ {
+ long actual = TimeSpan.Zero.Ticks;
+ long desired = 0;
+
+ if (actual != desired)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "the value Zero is not equivalent to 0");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] actual = " + actual + ", desired = " + desired);
+ retVal = false;
+ }
+
+ string actualString = TimeSpan.Zero.ToString();
+ if (actualString != c_EXPECTED_STRING_REPRESENTATION)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "string representation of MaxValue is 00:00:00");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] actualString = " + actualString);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.0", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TimeSpanZero test = new TimeSpanZero();
+
+ TestLibrary.TestFramework.BeginTestCase("TimeSpanZero");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/type/TypeEquals1.csproj b/tests/src/CoreMangLib/cti/system/type/TypeEquals1.csproj
new file mode 100644
index 0000000000..e0fb1d55da
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/TypeEquals1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeequals1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/type/TypeEquals2.csproj b/tests/src/CoreMangLib/cti/system/type/TypeEquals2.csproj
new file mode 100644
index 0000000000..11c949ea21
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/TypeEquals2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeequals2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/type/TypeGetArrayRank.csproj b/tests/src/CoreMangLib/cti/system/type/TypeGetArrayRank.csproj
new file mode 100644
index 0000000000..85a404e9ff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/TypeGetArrayRank.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typegetarrayrank.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/type/TypeGetElementType.csproj b/tests/src/CoreMangLib/cti/system/type/TypeGetElementType.csproj
new file mode 100644
index 0000000000..45d2d55b22
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/TypeGetElementType.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typegetelementtype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/type/TypeGetGenericTypeDefinition.csproj b/tests/src/CoreMangLib/cti/system/type/TypeGetGenericTypeDefinition.csproj
new file mode 100644
index 0000000000..558042ed6d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/TypeGetGenericTypeDefinition.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typegetgenerictypedefinition.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/type/TypeGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/type/TypeGetHashCode.csproj
new file mode 100644
index 0000000000..2e6214263a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/TypeGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typegethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/type/TypeGetType1.csproj b/tests/src/CoreMangLib/cti/system/type/TypeGetType1.csproj
new file mode 100644
index 0000000000..928823a622
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/TypeGetType1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typegettype1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/type/TypeGetType2.csproj b/tests/src/CoreMangLib/cti/system/type/TypeGetType2.csproj
new file mode 100644
index 0000000000..1d35b2a312
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/TypeGetType2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typegettype2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/type/TypeGetTypeFromHandle.csproj b/tests/src/CoreMangLib/cti/system/type/TypeGetTypeFromHandle.csproj
new file mode 100644
index 0000000000..b083ec8505
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/TypeGetTypeFromHandle.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typegettypefromhandle.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/type/TypeHasElementTypeImpl.csproj b/tests/src/CoreMangLib/cti/system/type/TypeHasElementTypeImpl.csproj
new file mode 100644
index 0000000000..e9962d2fab
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/TypeHasElementTypeImpl.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typehaselementtypeimpl.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/type/TypeIsByRefImpl.csproj b/tests/src/CoreMangLib/cti/system/type/TypeIsByRefImpl.csproj
new file mode 100644
index 0000000000..9c4f870820
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/TypeIsByRefImpl.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeisbyrefimpl.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/type/TypeIsPointerImpl.csproj b/tests/src/CoreMangLib/cti/system/type/TypeIsPointerImpl.csproj
new file mode 100644
index 0000000000..e39cab361f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/TypeIsPointerImpl.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeispointerimpl.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/type/TypeMakeArrayType1.csproj b/tests/src/CoreMangLib/cti/system/type/TypeMakeArrayType1.csproj
new file mode 100644
index 0000000000..d5911207bc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/TypeMakeArrayType1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typemakearraytype1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/type/TypeMakeArrayType2.csproj b/tests/src/CoreMangLib/cti/system/type/TypeMakeArrayType2.csproj
new file mode 100644
index 0000000000..a9b5e21cc1
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/TypeMakeArrayType2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typemakearraytype2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/type/TypeMakeByRefType.csproj b/tests/src/CoreMangLib/cti/system/type/TypeMakeByRefType.csproj
new file mode 100644
index 0000000000..666ab8e4f0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/TypeMakeByRefType.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typemakebyreftype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/type/TypeMakePointerType.csproj b/tests/src/CoreMangLib/cti/system/type/TypeMakePointerType.csproj
new file mode 100644
index 0000000000..83375b4b68
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/TypeMakePointerType.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typemakepointertype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/type/TypeToString.csproj b/tests/src/CoreMangLib/cti/system/type/TypeToString.csproj
new file mode 100644
index 0000000000..4341bb3629
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/TypeToString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typetostring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/type/typeequals1.cs b/tests/src/CoreMangLib/cti/system/type/typeequals1.cs
new file mode 100644
index 0000000000..059cacdb57
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/typeequals1.cs
@@ -0,0 +1,211 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.Type.Equals(System.Object)
+/// </summary>
+public class TypeEquals1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Compare two Types of the same class");
+
+ try
+ {
+ Type t1 = typeof(TypeEquals1);
+ Type t2 = typeof(TypeEquals1);
+
+ if (!t1.Equals((Object)t2))
+ {
+ TestLibrary.TestFramework.LogError("001", "Two Types of the same class are not equals");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Compare Type and instance are not equal");
+
+ try
+ {
+ Type t = typeof(Object);
+ Object o = new Object();
+
+ if (t.Equals(o))
+ {
+ TestLibrary.TestFramework.LogError("003", "Compare Type and instance are equal");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Compare Type and different instance are not equal");
+
+ try
+ {
+ Type t = typeof(TypeEquals1);
+ Object o = new Object();
+
+ if (t.Equals(o))
+ {
+ TestLibrary.TestFramework.LogError("005", "Type and different instance are equal");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Compare different types");
+
+ try
+ {
+ Type t1 = typeof(TypeEquals1);
+ Type t2 = typeof(Object);
+
+ if (t1.Equals(t2))
+ {
+ TestLibrary.TestFramework.LogError("007", "Type.Equals returns true for different types");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Compare a type with itself");
+
+ try
+ {
+ Type t1 = typeof(TypeEquals1);
+
+ if (!t1.Equals((Object)t1))
+ {
+ TestLibrary.TestFramework.LogError("009", "Type.Equals returns false when comparing a type with itself");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Compare type with null reference");
+
+ try
+ {
+ if (typeof(Object).Equals(null))
+ {
+ TestLibrary.TestFramework.LogError("101", "Compare type with null reference");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeEquals1 test = new TypeEquals1();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeEquals1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/type/typeequals2.cs b/tests/src/CoreMangLib/cti/system/type/typeequals2.cs
new file mode 100644
index 0000000000..9956460f8c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/typeequals2.cs
@@ -0,0 +1,123 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class TypeEquals2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Compare two same types");
+
+ try
+ {
+ Type t1 = typeof(TypeEquals2);
+ Type t2 = typeof(TypeEquals2);
+
+ if (!t1.Equals(t2))
+ {
+ TestLibrary.TestFramework.LogError("001", "Type.Equals returns false when comparing two same types");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Compare two different types");
+
+ try
+ {
+ Type t1 = typeof(TypeEquals2);
+ Type t2 = typeof(Object);
+
+ if (t1.Equals(t2))
+ {
+ TestLibrary.TestFramework.LogError("003", "Type.Equals returns true when comparing two different types");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Compare a type with itself");
+
+ try
+ {
+ Type t1 = typeof(TypeEquals2);
+
+ if (!t1.Equals(t1))
+ {
+ TestLibrary.TestFramework.LogError("003", "Type.Equals returns false when comparing a type with itself");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeEquals2 test = new TypeEquals2();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeEquals2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/type/typegetarrayrank.cs b/tests/src/CoreMangLib/cti/system/type/typegetarrayrank.cs
new file mode 100644
index 0000000000..0b164748f3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/typegetarrayrank.cs
@@ -0,0 +1,199 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class TypeGetArrayRank
+{
+ #region Private Variables
+ private const int c_DEFAULT_ARRAY_DIMENSION = 2;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ int size = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Get rank of an one dimension array");
+
+ try
+ {
+ // Do not make a large array
+ size = TestLibrary.Generator.GetByte(-55);
+
+ int[] array = new int[size];
+ for (int i = 0; i < size; ++i)
+ {
+ array[i] = TestLibrary.Generator.GetInt32(-55);
+ }
+
+ Type type = array.GetType();
+ int rank = type.GetArrayRank();
+ if (rank != 1)
+ {
+ TestLibrary.TestFramework.LogError("001", "Get rank of an one dimension array returns " + rank.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e + "; with size = " + size);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ int size = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Get rank of an multiple dimensions array");
+
+ try
+ {
+ // Do not make a large array
+ size = TestLibrary.Generator.GetByte(-55);
+
+ int[,] array = new int[c_DEFAULT_ARRAY_DIMENSION, size];
+ for (int i = 0; i < c_DEFAULT_ARRAY_DIMENSION; ++i)
+ {
+ for (int j = 0; j < size; ++j)
+ {
+ array[i, j] = TestLibrary.Generator.GetInt32(-55);
+ }
+ }
+
+ Type type = array.GetType();
+ int rank = type.GetArrayRank();
+ if (rank != c_DEFAULT_ARRAY_DIMENSION)
+ {
+ TestLibrary.TestFramework.LogError("003", "Get rank of an multiple dimensions array returns " + rank.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e + "; with size = " + size);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ int size = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Get rank of an multiple dimensions jagged array");
+
+ try
+ {
+ // Do not make a large array
+ size = TestLibrary.Generator.GetByte(-55);
+
+ int[][] array = new int[size][];
+
+ for (int i = 0; i < size; ++i)
+ {
+ int subArrayLength = TestLibrary.Generator.GetByte(-55);
+ int[] subArray = new int[subArrayLength];
+
+ for (int j = 0; j < subArrayLength; ++j)
+ {
+ subArray[j] = TestLibrary.Generator.GetInt32(-55);
+ }
+
+ array[i] = subArray;
+ }
+
+ Type type = array.GetType();
+ int rank = type.GetArrayRank();
+ if (rank != 1)
+ {
+ TestLibrary.TestFramework.LogError("005", "Get rank of an multiple dimensions jagged array returns " + rank.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Check ArgumentException will be thrown");
+
+ try
+ {
+ Type t1 = typeof(Exception);
+
+ int returnObject = t1.GetArrayRank();
+ TestLibrary.TestFramework.LogError("101", "ArgumentException is not thrown when calling typeof(Exception).GetArrayRank()");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeGetArrayRank test = new TypeGetArrayRank();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeGetArrayRank");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/type/typegetelementtype.cs b/tests/src/CoreMangLib/cti/system/type/typegetelementtype.cs
new file mode 100644
index 0000000000..3cef304309
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/typegetelementtype.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/type/typegetgenerictypedefinition.cs b/tests/src/CoreMangLib/cti/system/type/typegetgenerictypedefinition.cs
new file mode 100644
index 0000000000..55c0985342
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/typegetgenerictypedefinition.cs
@@ -0,0 +1,127 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using System.Reflection;
+using System.Collections;
+using System.Collections.Generic;
+
+/// <summary>
+///Type.GetGenericTypeDefinition()
+/// </summary>
+public class TypeGetGenericTypeDefinition
+{
+ public static int Main()
+ {
+ TypeGetGenericTypeDefinition tggtd = new TypeGetGenericTypeDefinition();
+ TestLibrary.TestFramework.BeginTestCase("TypeGetGenericTypeDefinition");
+ if (tggtd.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negtive]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+ #region PositiveTesting
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Type tpA;
+ Type ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: the current type's definition has one generic param");
+ try
+ {
+ tpA = typeof(Derived2<Derived>);
+ ActualResult = tpA.GetGenericTypeDefinition();
+ if(ActualResult != typeof(Derived2<>))
+ {
+ TestLibrary.TestFramework.LogError("001","the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch(Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Type tpA;
+ Type tpB;
+ Type ActualResult1;
+ Type ActualResult2;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: the current type has the same type argument");
+ try
+ {
+ tpA = typeof(Derived2<int>);
+ tpB = typeof(Derived2<string>);
+ ActualResult1 = tpA.GetGenericTypeDefinition();
+ ActualResult2 = tpB.GetGenericTypeDefinition();
+ if (ActualResult1 != typeof(Derived2<>) || ActualResult2 != ActualResult1)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ Type tpA;
+ Type ActualResult;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the current object is not generic type");
+
+ try
+ {
+ tpA = typeof(Derived);
+ ActualResult = tpA.GetGenericTypeDefinition();
+ retVal = false;
+ }
+ catch (InvalidOperationException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+
+ }
+ #endregion
+ #region UsingForTesting
+ public class Base<T, U> { }
+ public class Derived : Base<string, int> { }
+ public class Derived2<V> : Base<bool, V> { }
+ public class G<T> { }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/type/typegethashcode.cs b/tests/src/CoreMangLib/cti/system/type/typegethashcode.cs
new file mode 100644
index 0000000000..237b1c0a47
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/typegethashcode.cs
@@ -0,0 +1,116 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Reflection;
+using System.Globalization;
+using System.Collections;
+
+/// <summary>
+/// Type.GetHashCode()
+/// </summary>
+public class TypeGetHashCode
+{
+ public static int Main()
+ {
+ TypeGetHashCode tghc = new TypeGetHashCode();
+ TestLibrary.TestFramework.BeginTestCase("TypeGetHashCode");
+ if (tghc.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ Type tpA;
+ int ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: normal Type get hash code");
+ try
+ {
+ tpA = typeof(testClass);
+ ActualResult = tpA.GetHashCode();
+ testClass tc = new testClass(ActualResult);
+ if (ActualResult != tc.GetHashCode())
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ Type tpA;
+ int ActualResult;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: the same type get hash code");
+ try
+ {
+ Base test1 = new Base();
+ Base test2 = new Base();
+ tpA = test1.GetType();
+ Type tpB = test2.GetType();
+ ActualResult = tpA.GetHashCode();
+ int ActualResult2 = tpB.GetHashCode();
+ if (ActualResult != ActualResult2)
+ {
+ TestLibrary.TestFramework.LogError("003","the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+
+ }
+ #endregion
+ #region ForTestClass
+ public class testClass : Object
+ {
+ int hashCode;
+ public testClass(int intA)
+ {
+ hashCode = intA;
+ }
+ public override int GetHashCode()
+ {
+ return hashCode;
+ }
+ }
+ public class Base:Object { }
+ #endregion
+
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/type/typegettype1.cs b/tests/src/CoreMangLib/cti/system/type/typegettype1.cs
new file mode 100644
index 0000000000..d38c12fb91
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/typegettype1.cs
@@ -0,0 +1,120 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Reflection;
+
+
+class MyTypeClass
+{
+ private int a;
+ private int b;
+ private int c;
+
+ public MyTypeClass(int aa, int bb, int cc)
+ {
+ int zero = 0;
+ a = aa;
+ b = bb;
+ try
+ {
+ c = cc / zero;
+ }
+ catch (Exception)
+ {
+ }
+ }
+}
+
+public class TypeGetType1
+{
+ public static int Main(string[] args)
+ {
+ TypeGetType1 getType1 = new TypeGetType1();
+ TestLibrary.TestFramework.BeginScenario("Testing System.Type.GetType()...");
+
+ if (getType1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ //retVal = NegTest1() && retVal;
+ //retVal = NegTest2() && retVal;
+ //retVal = NegTest3() && retVal;
+ //retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify GetType method return correct system instance type...");
+
+ try
+ {
+ Int32 intInstance = new Int32();
+ Type instanceType = intInstance.GetType();
+
+ if (instanceType.FullName != "System.Int32")
+ {
+ TestLibrary.TestFramework.LogError("001","Fetch the wrong Type of instance!");
+ retVal = true;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify GetType method return correct customer instance type...");
+
+ try
+ {
+ Type instanceType = new MyTypeClass(TestLibrary.Generator.GetInt32(-55),
+ TestLibrary.Generator.GetInt32(-55), TestLibrary.Generator.GetInt32(-55)).GetType();
+
+ if (instanceType.FullName != "MyTypeClass")
+ {
+ TestLibrary.TestFramework.LogError("001","fetch the wrong customer type!");
+ return retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ return retVal;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/type/typegettype2.cs b/tests/src/CoreMangLib/cti/system/type/typegettype2.cs
new file mode 100644
index 0000000000..332b10ad38
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/typegettype2.cs
@@ -0,0 +1,176 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+class MyClass
+{
+ private int a;
+ private int b;
+
+ public MyClass(int aa,int bb)
+ {
+ a = aa;
+ b = bb;
+ }
+}
+
+public class TypeGetType2
+{
+ public static int Main(string[] args)
+ {
+ TypeGetType2 getType2 = new TypeGetType2();
+ TestLibrary.TestFramework.BeginScenario("Testing System.Type.GetType(System.String)...");
+
+ if (getType2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("");
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ //retVal = NegTest4() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify System type can be fetch correctly...");
+
+ try
+ {
+ Type intType = Type.GetType("System.Int32");
+ if (intType.FullName != "System.Int32")
+ {
+ TestLibrary.TestFramework.LogError("001","intType is not fetched correctly!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify customer type can be fetch correctly... ");
+
+ try
+ {
+ Type myType = Type.GetType("MyClass");
+
+ if (myType != null && myType.FullName != "MyClass")
+ {
+ TestLibrary.TestFramework.LogError("003","Fetch the wrong type of an instance!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify typename is a null reference...");
+
+ try
+ {
+ Type myType = Type.GetType(null);
+
+ TestLibrary.TestFramework.LogError("005", "No exception occurs!");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception occurs: " + e);
+ return retVal;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify type name is invalid...");
+
+ try
+ {
+ Type myType = Type.GetType("\\888");
+ if (myType != null)
+ {
+ TestLibrary.TestFramework.LogError("007","myType should be null!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("Verify type name is empty string...");
+
+ try
+ {
+ Type myType = Type.GetType("");
+
+ if (myType != null)
+ {
+ TestLibrary.TestFramework.LogError("009","The type should be null");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010","Unexpected exception occurs: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/type/typegettypefromhandle.cs b/tests/src/CoreMangLib/cti/system/type/typegettypefromhandle.cs
new file mode 100644
index 0000000000..361ff85167
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/typegettypefromhandle.cs
@@ -0,0 +1,140 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using System.Reflection;
+using System.Collections;
+/// <summary>
+///GetTypeCode
+/// </summary>
+public class TypeGetTypeFromHandle
+{
+ public static int Main()
+ {
+ TypeGetTypeFromHandle TypeGetTypeFromHandle = new TypeGetTypeFromHandle();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeGetTypeFromHandle");
+ if (TypeGetTypeFromHandle.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The type is user define type ");
+ try
+ {
+
+ TestClass myClass = new TestClass();
+ Type myClassType = Type.GetTypeFromHandle(myClass.GetType().TypeHandle);
+ if(!myClassType.Equals(typeof(TestClass)))
+ {
+ TestLibrary.TestFramework.LogError("001", "GetTypeFromHandle error");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The type is System reference type ");
+ try
+ {
+ object myClass = new object();
+ Type myClassType = Type.GetTypeFromHandle(myClass.GetType().TypeHandle);
+ if (!myClassType.Equals(typeof(object)))
+ {
+ TestLibrary.TestFramework.LogError("003", "GetTypeFromHandle error");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The type is System value type ");
+ try
+ {
+ int myClass = 1;
+ Type myClassType = Type.GetTypeFromHandle(myClass.GetType().TypeHandle);
+ if (!myClassType.Equals(typeof(int)))
+ {
+ TestLibrary.TestFramework.LogError("005", "GetTypeFromHandle error");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+
+}
+public class BaseClass
+{
+
+ public BaseClass(string param, string s, int i)
+ {
+
+ }
+}
+public class TestClass : BaseClass
+{
+ public TestClass(string param, string s)
+ : base(param, s,1)
+ {
+
+ }
+ public TestClass()
+ : base("", "", 1)
+ {
+
+ }
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/type/typehaselementtypeimpl.cs b/tests/src/CoreMangLib/cti/system/type/typehaselementtypeimpl.cs
new file mode 100644
index 0000000000..ed095b9340
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/typehaselementtypeimpl.cs
@@ -0,0 +1,121 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using System.Reflection;
+using System.Collections;
+/// <summary>
+///HasElementTypeImpl
+/// </summary>
+public class TypeHasElementTypeImpl
+{
+ public static int Main()
+ {
+ TypeHasElementTypeImpl TypeHasElementTypeImpl = new TypeHasElementTypeImpl();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeHasElementTypeImpl");
+ if (TypeHasElementTypeImpl.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: The Type is an array ");
+ try
+ {
+ int[] myArray = new int[5];
+ if (!myArray.GetType().HasElementType)
+ {
+ TestLibrary.TestFramework.LogError("001", "HasElementType should return false." );
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: The Type is IntPtr ");
+ try
+ {
+ IntPtr myInt=new IntPtr(5);
+ if (myInt.GetType().HasElementType)
+ {
+ TestLibrary.TestFramework.LogError("001", "HasElementType should return false.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The Type is reference type");
+ try
+ {
+ TestClass myInstance = new TestClass();
+ if (myInstance.GetType().HasElementType)
+ {
+ TestLibrary.TestFramework.LogError("001", "HasElementType should return false.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ private void MyMethod(ref TestClass myTest)
+ {
+
+ }
+
+}
+
+public class TestClass
+{
+
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/type/typeisbyrefimpl.cs b/tests/src/CoreMangLib/cti/system/type/typeisbyrefimpl.cs
new file mode 100644
index 0000000000..4d2c7612de
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/typeisbyrefimpl.cs
@@ -0,0 +1,101 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using System.Reflection;
+using System.Collections;
+/// <summary>
+///IsByRefImpl
+/// </summary>
+public class TypeIsByRefImpl
+{
+ public static int Main()
+ {
+ TypeIsByRefImpl TypeIsByRefImpl = new TypeIsByRefImpl();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeIsByRefImpl");
+ if (TypeIsByRefImpl.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: override isByRefImpl and Only these type which BaseType is BaseClass Return true ,TestClass as test object ");
+ try
+ {
+ TestClass myobject = new TestClass();
+ if (myobject.GetType().IsByRef)
+ {
+ TestLibrary.TestFramework.LogError("001", "TestClass is not Passed by reference.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ // Returns true if the expected result is right
+ // Returns false if the expected result is wrong
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: override isByRefImpl and Only these type which BaseType is BaseClass Return true ,TestClass1 as test object ");
+ try
+ {
+ TestClass1 myobject = new TestClass1();
+ if (myobject.GetType().IsByRef)
+ {
+ TestLibrary.TestFramework.LogError("003", "TestClass1 is not Passed by reference.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+}
+public class BaseClass
+{
+
+}
+public class TestClass : BaseClass
+{
+
+}
+public class TestClass1
+{
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/type/typeispointerimpl.cs b/tests/src/CoreMangLib/cti/system/type/typeispointerimpl.cs
new file mode 100644
index 0000000000..340dff0294
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/typeispointerimpl.cs
@@ -0,0 +1,195 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public struct TestGenericType2
+{
+ public void TestMethod<T>()
+ {
+ }
+}
+
+/// <summary>
+/// IsPointerImpl
+/// </summary>
+public class TypeIsPointerImpl
+{
+ #region Private Fields
+ private const int c_MIN_STRING_LENGTH = 1;
+ private const int c_MAX_STRING_LENGTH = 128;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: IsPointerImpl should return false for value type");
+
+ try
+ {
+ int obj = TestLibrary.Generator.GetInt32(-55);
+ Type type = obj.GetType();
+
+ if (type.IsPointer)
+ {
+ TestLibrary.TestFramework.LogError("001", "IsPointerImpl returns true for value type");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: IsPointerImpl should return false for reference type");
+
+ try
+ {
+ String obj = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ Type type = obj.GetType();
+
+ if (type.IsPointer)
+ {
+ TestLibrary.TestFramework.LogError("003", "IsPointerImpl returns true for reference type");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: IsPointerImpl should return false for IntPtr");
+
+ try
+ {
+ Type type = typeof(IntPtr);
+
+ if (type.IsPointer)
+ {
+ TestLibrary.TestFramework.LogError("005", "IsPointerImpl returns true for IntPtr");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: IsPointerImpl should return true for a pointer type");
+
+ try
+ {
+ Type type = typeof(int*);
+
+ if (!type.IsPointer)
+ {
+ TestLibrary.TestFramework.LogError("007", "IsPointerImpl returns false for a pointer type");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: IsPointerImpl should return true for type contains generic member");
+
+ try
+ {
+ Type type = typeof(TestGenericType2*);
+ if (!type.IsPointer)
+ {
+ TestLibrary.TestFramework.LogError("101", "IsPointerImpl returns false for type contains generic member");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeIsPointerImpl test = new TypeIsPointerImpl();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeIsPointerImpl");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/type/typemakearraytype1.cs b/tests/src/CoreMangLib/cti/system/type/typemakearraytype1.cs
new file mode 100644
index 0000000000..f08a204651
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/typemakearraytype1.cs
@@ -0,0 +1,238 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// MakeArrayType()
+/// </summary>
+public class TypeMakeArrayType1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call MakeArrayType for reference type");
+
+ try
+ {
+ Type type = typeof(String);
+ Type arrayType = type.MakeArrayType();
+
+ do
+ {
+ if (!arrayType.IsArray)
+ {
+ TestLibrary.TestFramework.LogError("001", "Call MakeArrayType for reference type does not make a array type");
+ retVal = false;
+ break;
+ }
+
+ if (arrayType.GetArrayRank() != 1)
+ {
+ TestLibrary.TestFramework.LogError("002", "Call MakeArrayType for reference type does not make a one dimension array type");
+ retVal = false;
+ break;
+ }
+ } while (false);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call MakeArrayType for value type");
+
+ try
+ {
+ Type type = typeof(Int32);
+ Type arrayType = type.MakeArrayType();
+
+ do
+ {
+ if (!arrayType.IsArray)
+ {
+ TestLibrary.TestFramework.LogError("004", "Call MakeArrayType for value type does not make a array type");
+ retVal = false;
+ break;
+ }
+
+ if (arrayType.GetArrayRank() != 1)
+ {
+ TestLibrary.TestFramework.LogError("005", "Call MakeArrayType for value type does not make a one dimension array type");
+ retVal = false;
+ break;
+ }
+ } while (false);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call MakeArrayType for pointer type");
+
+ try
+ {
+ Type type = typeof(char *);
+ Type arrayType = type.MakeArrayType();
+
+ do
+ {
+ if (!arrayType.IsArray)
+ {
+ TestLibrary.TestFramework.LogError("007", "Call MakeArrayType for pointer type does not make a array type");
+ retVal = false;
+ break;
+ }
+
+ if (arrayType.GetArrayRank() != 1)
+ {
+ TestLibrary.TestFramework.LogError("008", "Call MakeArrayType for pointer type does not make a one dimension array type");
+ retVal = false;
+ break;
+ }
+ } while (false);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call MakeArrayType for value array type");
+
+ try
+ {
+ Type type = typeof(int[]);
+ Type arrayType = type.MakeArrayType();
+
+ do
+ {
+ if (!arrayType.IsArray)
+ {
+ TestLibrary.TestFramework.LogError("010", "Call MakeArrayType for value array type does not make a array type");
+ retVal = false;
+ break;
+ }
+
+ if (arrayType.GetArrayRank() != 1)
+ {
+ TestLibrary.TestFramework.LogError("011", "Call MakeArrayType for value array type does not make a one dimension array type");
+ retVal = false;
+ break;
+ }
+ } while (false);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Call MakeArrayType for reference array type");
+
+ try
+ {
+ Type type = typeof(String[]);
+ Type arrayType = type.MakeArrayType();
+
+ do
+ {
+ if (!arrayType.IsArray)
+ {
+ TestLibrary.TestFramework.LogError("013", "Call MakeArrayType for reference array type does not make a array type");
+ retVal = false;
+ break;
+ }
+
+ if (arrayType.GetArrayRank() != 1)
+ {
+ TestLibrary.TestFramework.LogError("014", "Call MakeArrayType for reference array type does not make a one dimension array type");
+ retVal = false;
+ break;
+ }
+ } while (false);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("015", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeMakeArrayType1 test = new TypeMakeArrayType1();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeMakeArrayType1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/type/typemakearraytype2.cs b/tests/src/CoreMangLib/cti/system/type/typemakearraytype2.cs
new file mode 100644
index 0000000000..763d1baf9b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/typemakearraytype2.cs
@@ -0,0 +1,385 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// MakeArrayType(System.Int32)
+/// </summary>
+public class TypeMakeArrayType2
+{
+ #region Private Members
+ private const int c_DEFAULT_MULTIPLE_ARRAY_DIMENSION = 4;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ int desiredDimension = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call MakeArrayType to make 1 dimension value type array");
+
+ try
+ {
+ desiredDimension = 1;
+ Type type = typeof(Int32);
+ Type arrayType = type.MakeArrayType(desiredDimension);
+
+ do
+ {
+ if (!arrayType.IsArray)
+ {
+ TestLibrary.TestFramework.LogError("001", "Call MakeArrayType for value type does not make a array type");
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredDimension = " + desiredDimension.ToString());
+ retVal = false;
+ break;
+ }
+
+ int actualDimension = arrayType.GetArrayRank();
+ if (actualDimension != desiredDimension)
+ {
+ TestLibrary.TestFramework.LogError("002", "Call MakeArrayType for value type does not make a one dimension array type");
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredDimension = " + desiredDimension.ToString() + "; actualDimension = " + actualDimension.ToString());
+ retVal = false;
+ break;
+ }
+ } while (false);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredDimension = " + desiredDimension.ToString());
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ int desiredDimension = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call MakeArrayType to make multiple dimensions value type array");
+
+ try
+ {
+ desiredDimension = c_DEFAULT_MULTIPLE_ARRAY_DIMENSION;
+ Type type = typeof(Int32);
+ Type arrayType = type.MakeArrayType(desiredDimension);
+
+ do
+ {
+ if (!arrayType.IsArray)
+ {
+ TestLibrary.TestFramework.LogError("004", "Call MakeArrayType for value type does not make a array type");
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredDimension = " + desiredDimension.ToString());
+ retVal = false;
+ break;
+ }
+
+ int actualDimension = arrayType.GetArrayRank();
+ if (actualDimension != desiredDimension)
+ {
+ TestLibrary.TestFramework.LogError("005", "Call MakeArrayType for value type does not make a one dimension array type");
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredDimension = " + desiredDimension.ToString() + "; actualDimension = " + actualDimension.ToString());
+ retVal = false;
+ break;
+ }
+ } while (false);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredDimension = " + desiredDimension.ToString());
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ int desiredDimension = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call MakeArrayType to make multiple dimensions reference type array");
+
+ try
+ {
+ desiredDimension = c_DEFAULT_MULTIPLE_ARRAY_DIMENSION;
+ Type type = typeof(String);
+ Type arrayType = type.MakeArrayType(desiredDimension);
+
+ do
+ {
+ if (!arrayType.IsArray)
+ {
+ TestLibrary.TestFramework.LogError("007", "Call MakeArrayType for reference type does not make a array type");
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredDimension = " + desiredDimension.ToString());
+ retVal = false;
+ break;
+ }
+
+ int actualDimension = arrayType.GetArrayRank();
+ if (actualDimension != desiredDimension)
+ {
+ TestLibrary.TestFramework.LogError("008", "Call MakeArrayType for reference type does not make a multiple dimensions array type");
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredDimension = " + desiredDimension.ToString() + "; actualDimension = " + actualDimension.ToString());
+ retVal = false;
+ break;
+ }
+ } while (false);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("009", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredDimension = " + desiredDimension.ToString());
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ int desiredDimension = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call MakeArrayType to make multiple dimensions pointer type array");
+
+ try
+ {
+ desiredDimension = c_DEFAULT_MULTIPLE_ARRAY_DIMENSION;
+ Type type = typeof(char *);
+ Type arrayType = type.MakeArrayType(desiredDimension);
+
+ do
+ {
+ if (!arrayType.IsArray)
+ {
+ TestLibrary.TestFramework.LogError("010", "Call MakeArrayType for pointer type does not make a array type");
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredDimension = " + desiredDimension.ToString());
+ retVal = false;
+ break;
+ }
+
+ int actualDimension = arrayType.GetArrayRank();
+ if (actualDimension != desiredDimension)
+ {
+ TestLibrary.TestFramework.LogError("011", "Call MakeArrayType for pointer type does not make a multiple dimensions array type");
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredDimension = " + desiredDimension.ToString() + "; actualDimension = " + actualDimension.ToString());
+ retVal = false;
+ break;
+ }
+ } while (false);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredDimension = " + desiredDimension.ToString());
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ int desiredDimension = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Call MakeArrayType to make multiple dimensions reference array type array");
+
+ try
+ {
+ desiredDimension = c_DEFAULT_MULTIPLE_ARRAY_DIMENSION;
+ Type type = typeof(String[]);
+ Type arrayType = type.MakeArrayType(desiredDimension);
+
+ do
+ {
+ if (!arrayType.IsArray)
+ {
+ TestLibrary.TestFramework.LogError("013", "Call MakeArrayType for reference array type does not make a array type");
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredDimension = " + desiredDimension.ToString());
+ retVal = false;
+ break;
+ }
+
+ int actualDimension = arrayType.GetArrayRank();
+ if (actualDimension != desiredDimension)
+ {
+ TestLibrary.TestFramework.LogError("014", "Call MakeArrayType for reference array type does not make a multiple dimensions array type");
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredDimension = " + desiredDimension.ToString() + "; actualDimension = " + actualDimension.ToString());
+ retVal = false;
+ break;
+ }
+ } while (false);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("015", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredDimension = " + desiredDimension.ToString());
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ int desiredDimension = 0;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Call MakeArrayType to make multiple dimensions value array type array");
+
+ try
+ {
+ desiredDimension = c_DEFAULT_MULTIPLE_ARRAY_DIMENSION;
+ Type type = typeof(int[]);
+ Type arrayType = type.MakeArrayType(desiredDimension);
+
+ do
+ {
+ if (!arrayType.IsArray)
+ {
+ TestLibrary.TestFramework.LogError("016", "Call MakeArrayType for value array type does not make a array type");
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredDimension = " + desiredDimension.ToString());
+ retVal = false;
+ break;
+ }
+
+ int actualDimension = arrayType.GetArrayRank();
+ if (actualDimension != desiredDimension)
+ {
+ TestLibrary.TestFramework.LogError("017", "Call MakeArrayType for value array type does not make a multiple dimensions array type");
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredDimension = " + desiredDimension.ToString() + "; actualDimension = " + actualDimension.ToString());
+ retVal = false;
+ break;
+ }
+ } while (false);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("018", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] desiredDimension = " + desiredDimension.ToString());
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ int rank = 0;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: IndexOutOfRangeException will be thrown when rank is invalid");
+
+ try
+ {
+ rank = TestLibrary.Generator.GetByte(-55);
+ if (rank > 0)
+ rank = 0 - rank;
+
+ Type type = typeof(Object);
+ Type arrayType = type.MakeArrayType(rank);
+
+ TestLibrary.TestFramework.LogError("101", "IndexOutOfRangeException is not thrown when rank is invalid");
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] rank = " + rank.ToString());
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation("[LOCAL VARIABLES] rank = " + rank.ToString());
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: IndexOutOfRangeException will be thrown when rank is 0");
+
+ try
+ {
+
+ Type type = typeof(Object);
+ Type arrayType = type.MakeArrayType(0);
+
+ TestLibrary.TestFramework.LogError("103", "IndexOutOfRangeException is not thrown when rank is 0");
+ retVal = false;
+ }
+ catch (IndexOutOfRangeException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeMakeArrayType2 test = new TypeMakeArrayType2();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeMakeArrayType2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/type/typemakebyreftype.cs b/tests/src/CoreMangLib/cti/system/type/typemakebyreftype.cs
new file mode 100644
index 0000000000..1439f559d4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/typemakebyreftype.cs
@@ -0,0 +1,216 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// MakeByRefType()
+/// </summary>
+public class TypeMakeByRefType
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call MakeByRefType for reference type");
+
+ try
+ {
+ Type type = typeof(String);
+ Type refType = type.MakeByRefType();
+
+ if (!refType.IsByRef)
+ {
+ TestLibrary.TestFramework.LogError("001", "Call MakeByRefType for reference type does not make a byref type");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call MakeByRefType for value type");
+
+ try
+ {
+ Type type = typeof(int);
+ Type refType = type.MakeByRefType();
+
+ if (!refType.IsByRef)
+ {
+ TestLibrary.TestFramework.LogError("003", "Call MakeByRefType for value type does not make a byref type");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call MakeByRefType for value array type");
+
+ try
+ {
+ Type type = typeof(int[]);
+ Type refType = type.MakeByRefType();
+
+ if (!refType.IsByRef)
+ {
+ TestLibrary.TestFramework.LogError("005", "Call MakeByRefType for value array type does not make a byref type");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call MakeByRefType for reference array type");
+
+ try
+ {
+ Type type = typeof(String[]);
+ Type refType = type.MakeByRefType();
+
+ if (!refType.IsByRef)
+ {
+ TestLibrary.TestFramework.LogError("007", "Call MakeByRefType for reference array type does not make a byref type");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Call MakeByRefType for pointer type");
+
+ try
+ {
+ Type type = typeof(char *);
+ Type refType = type.MakeByRefType();
+
+ if (!refType.IsByRef)
+ {
+ TestLibrary.TestFramework.LogError("009", "Call MakeByRefType for pointer type does not make a byref type");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: TypeLoadException will be thrown when calling MakeByRefType for ByRef type");
+
+ try
+ {
+ Type type = typeof(Object);
+ type = type.MakeByRefType();
+ Type refType = type.MakeByRefType();
+
+ TestLibrary.TestFramework.LogError("101", "TypeLoadException is not thrown when calling MakeByRefType for ByRef type");
+ retVal = false;
+ }
+ catch (TypeLoadException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeMakeByRefType test = new TypeMakeByRefType();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeMakeByRefType");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/type/typemakepointertype.cs b/tests/src/CoreMangLib/cti/system/type/typemakepointertype.cs
new file mode 100644
index 0000000000..51effa39b0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/typemakepointertype.cs
@@ -0,0 +1,183 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// MakePointerType
+/// </summary>
+public class TypeMakePointerType
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call MakePointerType for a value type");
+
+ try
+ {
+ Type type = typeof(int);
+ Type pointerType = type.MakePointerType();
+
+ if (!pointerType.IsPointer)
+ {
+ TestLibrary.TestFramework.LogError("001", "Call MakePointerType for a value type does not make a pointer type");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call MakePointerType for a reference type");
+
+ try
+ {
+ Type type = typeof(String);
+ Type pointerType = type.MakePointerType();
+
+ if (!pointerType.IsPointer)
+ {
+ TestLibrary.TestFramework.LogError("003", "Call MakePointerType for a reference type does not make a pointer type");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call MakePointerType for a value array type");
+
+ try
+ {
+ Type type = typeof(int[]);
+ Type pointerType = type.MakePointerType();
+
+ if (!pointerType.IsPointer)
+ {
+ TestLibrary.TestFramework.LogError("005", "Call MakePointerType for a value array type does not make a pointer type");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call MakePointerType for a reference array type");
+
+ try
+ {
+ Type type = typeof(String[]);
+ Type pointerType = type.MakePointerType();
+
+ if (!pointerType.IsPointer)
+ {
+ TestLibrary.TestFramework.LogError("007", "Call MakePointerType for a reference array type does not make a pointer type");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Call MakePointerType for a pointer type");
+
+ try
+ {
+ Type type = typeof(char *);
+ Type pointerType = type.MakePointerType();
+
+ if (!pointerType.IsPointer)
+ {
+ TestLibrary.TestFramework.LogError("009", "Call MakePointerType for a pointer type does not make a pointer type");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeMakePointerType test = new TypeMakePointerType();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeMakePointerType");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/type/typetostring.cs b/tests/src/CoreMangLib/cti/system/type/typetostring.cs
new file mode 100644
index 0000000000..de18d340f7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/type/typetostring.cs
@@ -0,0 +1,287 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using TestHelper;
+
+/// <summary>
+/// Type.ToString()
+/// Returns a String representing the name of the current Type
+/// </summary>
+class TypeToString
+{
+ public static int Main()
+ {
+ TypeToString tts = new TypeToString();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: Type.ToString()");
+
+ if (tts.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: primitive type int ";
+
+ bool expectedValue = true;
+ bool actualValue = false;
+ string errorDesc;
+
+ Type testType = typeof(int);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string typeName = testType.ToString();
+ actualValue = (0 == string.CompareOrdinal(typeName, "System.Int32"));
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch(Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: primitive type string ";
+
+ bool expectedValue = true;
+ bool actualValue = false;
+ string errorDesc;
+
+ Type testType = typeof(string);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string typeName = testType.ToString();
+ actualValue = (0 == string.CompareOrdinal(typeName, "System.String"));
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ const string c_TEST_DESC = "PosTest3: primitive type int[] ";
+
+ bool expectedValue = true;
+ bool actualValue = false;
+ string errorDesc;
+
+ Type testType = typeof(int[]);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string typeName = testType.ToString();
+ actualValue = (0 == string.CompareOrdinal(typeName, "System.Int32[]"));
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P004";
+ const string c_TEST_DESC = "PosTest4: generic type List<string> ";
+
+ bool expectedValue = true;
+ bool actualValue = false;
+ string errorDesc;
+
+ Type testType = typeof(List<string>);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string typeName = testType.ToString();
+ actualValue = (0 == string.CompareOrdinal(typeName, "System.Collections.Generic.List`1[System.String]"));
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P005";
+ const string c_TEST_DESC = "PosTest5: generic type with multiple type parameters ";
+
+ bool expectedValue = true;
+ bool actualValue = false;
+ string errorDesc;
+
+ Type testType = typeof(Foo<List<int>, string>);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string typeName = testType.ToString();
+ actualValue = (0 == string.CompareOrdinal(typeName, "TestHelper.Foo`2[System.Collections.Generic.List`1[System.Int32],System.String]"));
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("09" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6() //maybe bug
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P006";
+ const string c_TEST_DESC = "PosTest6: type parameter of generic type ";
+
+ bool expectedValue = true;
+ bool actualValue = false;
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ string typeName = MyClass<ClassA>.TypeParameterToString();
+ actualValue = (0 == string.CompareOrdinal(typeName, "TestHelper.ClassA"));
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "Value is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ //errorDesc += GetDataString(strA, indexA, strB, indexB, length, comparisonType);
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
+#region helper class
+namespace TestHelper
+{
+ internal class Foo<T1, T2>
+ {
+ }
+
+ internal class MyClass<T>
+ {
+ public static string TypeParameterToString()
+ {
+ Type type = typeof(T);
+ string typeName = type.ToString();
+ return typeName;
+ }
+ }
+
+ internal class ClassA
+ {
+ public static string m_name = "TestHelper.ClassA";
+ }
+}
+#endregion \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/typecode/TypeCodeBoolean.csproj b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeBoolean.csproj
new file mode 100644
index 0000000000..0ce68ffaff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeBoolean.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typecodeboolean.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/typecode/TypeCodeByte.csproj b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeByte.csproj
new file mode 100644
index 0000000000..e70641af62
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typecodebyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/typecode/TypeCodeChar.csproj b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeChar.csproj
new file mode 100644
index 0000000000..3dc04530c4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeChar.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typecodechar.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/typecode/TypeCodeDateTime.csproj b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeDateTime.csproj
new file mode 100644
index 0000000000..1029198bbe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeDateTime.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typecodedatetime.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/typecode/TypeCodeDecimal.csproj b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeDecimal.csproj
new file mode 100644
index 0000000000..6930d85861
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeDecimal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typecodedecimal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/typecode/TypeCodeDouble.csproj b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeDouble.csproj
new file mode 100644
index 0000000000..a5a51bc515
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeDouble.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typecodedouble.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/typecode/TypeCodeEmpty.csproj b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeEmpty.csproj
new file mode 100644
index 0000000000..e0c4a13fe0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeEmpty.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typecodeempty.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/typecode/TypeCodeInt16.csproj b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeInt16.csproj
new file mode 100644
index 0000000000..8f5024e015
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typecodeint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/typecode/TypeCodeInt32.csproj b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeInt32.csproj
new file mode 100644
index 0000000000..5611e1589b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typecodeint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/typecode/TypeCodeInt64.csproj b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeInt64.csproj
new file mode 100644
index 0000000000..ac6cabfba8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typecodeint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/typecode/TypeCodeObject.csproj b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeObject.csproj
new file mode 100644
index 0000000000..f3575eb3d6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeObject.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typecodeobject.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/typecode/TypeCodeSByte.csproj b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeSByte.csproj
new file mode 100644
index 0000000000..74e0ac7b07
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeSByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typecodesbyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/typecode/TypeCodeSingle.csproj b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeSingle.csproj
new file mode 100644
index 0000000000..b0b6d57899
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeSingle.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typecodesingle.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/typecode/TypeCodeString.csproj b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeString.csproj
new file mode 100644
index 0000000000..85c92fd9c5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typecodestring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/typecode/TypeCodeUInt16.csproj b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeUInt16.csproj
new file mode 100644
index 0000000000..478d6f34bc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeUInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typecodeuint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/typecode/TypeCodeUInt32.csproj b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeUInt32.csproj
new file mode 100644
index 0000000000..23fb488437
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeUInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typecodeuint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/typecode/TypeCodeUInt64.csproj b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeUInt64.csproj
new file mode 100644
index 0000000000..701e766f7e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/TypeCodeUInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typecodeuint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/typecode/typecodeboolean.cs b/tests/src/CoreMangLib/cti/system/typecode/typecodeboolean.cs
new file mode 100644
index 0000000000..4780793440
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/typecodeboolean.cs
@@ -0,0 +1,103 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Boolean
+/// </summary>
+
+public class TypeCodeBoolean
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify TypeCode.Boolean .");
+
+ try
+ {
+ int i = (int)TypeCode.Boolean;
+
+ if (i != 3)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "TypeCode.Boolean Err.");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeCodeBoolean test = new TypeCodeBoolean();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeCodeBoolean");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/typecode/typecodebyte.cs b/tests/src/CoreMangLib/cti/system/typecode/typecodebyte.cs
new file mode 100644
index 0000000000..d13d548c0b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/typecodebyte.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Byte
+/// </summary>
+
+public class TypeCodeByte
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify TypeCode.Byte .");
+
+ try
+ {
+ int i = (int)TypeCode.Byte;
+
+ if (i != 6)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "TypeCode.Byte Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeCodeByte test = new TypeCodeByte();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeCodeByte");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/typecode/typecodechar.cs b/tests/src/CoreMangLib/cti/system/typecode/typecodechar.cs
new file mode 100644
index 0000000000..9597efd54e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/typecodechar.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Char
+/// </summary>
+
+public class TypeCodeChar
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify TypeCode.Char .");
+
+ try
+ {
+ int i = (int)TypeCode.Char;
+
+ if (i != 4)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "TypeCode.Char Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeCodeChar test = new TypeCodeChar();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeCodeChar");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/typecode/typecodedatetime.cs b/tests/src/CoreMangLib/cti/system/typecode/typecodedatetime.cs
new file mode 100644
index 0000000000..6690e6a9a7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/typecodedatetime.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// DateTime
+/// </summary>
+
+public class TypeCodeDateTime
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify TypeCode.DateTime .");
+
+ try
+ {
+ int i = (int)TypeCode.DateTime;
+
+ if (i != 16)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "TypeCode.DateTime Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeCodeDateTime test = new TypeCodeDateTime();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeCodeDateTime");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/typecode/typecodedecimal.cs b/tests/src/CoreMangLib/cti/system/typecode/typecodedecimal.cs
new file mode 100644
index 0000000000..3b4adf212e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/typecodedecimal.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Decimal
+/// </summary>
+
+public class TypeCodeDecimal
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify TypeCode.Decimal .");
+
+ try
+ {
+ int i = (int)TypeCode.Decimal;
+
+ if (i != 15)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "TypeCode.Decimal Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeCodeDecimal test = new TypeCodeDecimal();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeCodeDecimal");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/typecode/typecodedouble.cs b/tests/src/CoreMangLib/cti/system/typecode/typecodedouble.cs
new file mode 100644
index 0000000000..6f636f0d18
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/typecodedouble.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Double
+/// </summary>
+
+public class TypeCodeDouble
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify TypeCode.Double .");
+
+ try
+ {
+ int i = (int)TypeCode.Double;
+
+ if (i != 14)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "TypeCode.Double Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeCodeDouble test = new TypeCodeDouble();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeCodeDouble");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/typecode/typecodeempty.cs b/tests/src/CoreMangLib/cti/system/typecode/typecodeempty.cs
new file mode 100644
index 0000000000..8f2ec18f4e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/typecodeempty.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Empty
+/// </summary>
+
+public class TypeCodeEmpty
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify TypeCode.Empty .");
+
+ try
+ {
+ int i = (int)TypeCode.Empty;
+
+ if (i != 0)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "TypeCode.Empty Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeCodeEmpty test = new TypeCodeEmpty();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeCodeEmpty");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/typecode/typecodeint16.cs b/tests/src/CoreMangLib/cti/system/typecode/typecodeint16.cs
new file mode 100644
index 0000000000..078a53dafb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/typecodeint16.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Int16
+/// </summary>
+
+public class TypeCodeInt16
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify TypeCode.Int16 .");
+
+ try
+ {
+ int i = (int)TypeCode.Int16;
+
+ if (i != 7)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "TypeCode.Int16 Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeCodeInt16 test = new TypeCodeInt16();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeCodeInt16");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/typecode/typecodeint32.cs b/tests/src/CoreMangLib/cti/system/typecode/typecodeint32.cs
new file mode 100644
index 0000000000..57f0212aa2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/typecodeint32.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Int32
+/// </summary>
+
+public class TypeCodeInt32
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify TypeCode.Int32 .");
+
+ try
+ {
+ int i = (int)TypeCode.Int32;
+
+ if (i != 9)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "TypeCode.Int32 Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeCodeInt32 test = new TypeCodeInt32();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeCodeInt32");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/typecode/typecodeint64.cs b/tests/src/CoreMangLib/cti/system/typecode/typecodeint64.cs
new file mode 100644
index 0000000000..0d31c16d29
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/typecodeint64.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Int64
+/// </summary>
+
+public class TypeCodeInt64
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify TypeCode.Int64 .");
+
+ try
+ {
+ int i = (int)TypeCode.Int64;
+
+ if (i != 11)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "TypeCode.Int64 Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeCodeInt64 test = new TypeCodeInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeCodeInt64");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/typecode/typecodeobject.cs b/tests/src/CoreMangLib/cti/system/typecode/typecodeobject.cs
new file mode 100644
index 0000000000..f83784018d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/typecodeobject.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Object
+/// </summary>
+
+public class TypeCodeObject
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify TypeCode.Object .");
+
+ try
+ {
+ int i = (int)TypeCode.Object;
+
+ if (i != 1)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "TypeCode.Object Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeCodeObject test = new TypeCodeObject();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeCodeObject");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/typecode/typecodesbyte.cs b/tests/src/CoreMangLib/cti/system/typecode/typecodesbyte.cs
new file mode 100644
index 0000000000..da35dc754b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/typecodesbyte.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// SByte
+/// </summary>
+
+public class TypeCodeSByte
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify TypeCode.SByte .");
+
+ try
+ {
+ int i = (int)TypeCode.SByte;
+
+ if (i != 5)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "TypeCode.SByte Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeCodeSByte test = new TypeCodeSByte();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeCodeSByte");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/typecode/typecodesingle.cs b/tests/src/CoreMangLib/cti/system/typecode/typecodesingle.cs
new file mode 100644
index 0000000000..a4bfcb8a49
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/typecodesingle.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Single
+/// </summary>
+
+public class TypeCodeSingle
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify TypeCode.Single .");
+
+ try
+ {
+ int i = (int)TypeCode.Single;
+
+ if (i != 13)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "TypeCode.Single Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeCodeSingle test = new TypeCodeSingle();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeCodeSingle");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/typecode/typecodestring.cs b/tests/src/CoreMangLib/cti/system/typecode/typecodestring.cs
new file mode 100644
index 0000000000..e14a98f299
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/typecodestring.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// String
+/// </summary>
+
+public class TypeCodeString
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify TypeCode.String .");
+
+ try
+ {
+ int i = (int)TypeCode.String;
+
+ if (i != 18)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "TypeCode.String Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeCodeString test = new TypeCodeString();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeCodeString");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/typecode/typecodeuint16.cs b/tests/src/CoreMangLib/cti/system/typecode/typecodeuint16.cs
new file mode 100644
index 0000000000..a732adb3ab
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/typecodeuint16.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UInt16
+/// </summary>
+
+public class TypeCodeUInt16
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify TypeCode.UInt16 .");
+
+ try
+ {
+ int i = (int)TypeCode.UInt16;
+
+ if (i != 8)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "TypeCode.UInt16 Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeCodeUInt16 test = new TypeCodeUInt16();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeCodeUInt16");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/typecode/typecodeuint32.cs b/tests/src/CoreMangLib/cti/system/typecode/typecodeuint32.cs
new file mode 100644
index 0000000000..5d897964ee
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/typecodeuint32.cs
@@ -0,0 +1,98 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class TypeCodeUInt32
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify TypeCode.UInt32 .");
+
+ try
+ {
+ int i = (int)TypeCode.UInt32;
+
+ if (i != 10)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "TypeCode.UInt32 Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeCodeUInt32 test = new TypeCodeUInt32();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeCodeUInt32");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/typecode/typecodeuint64.cs b/tests/src/CoreMangLib/cti/system/typecode/typecodeuint64.cs
new file mode 100644
index 0000000000..e05714d516
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typecode/typecodeuint64.cs
@@ -0,0 +1,102 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UInt64
+/// </summary>
+
+public class TypeCodeUInt64
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify TypeCode.UInt64 .");
+
+ try
+ {
+ int i = (int)TypeCode.UInt64;
+
+ if (i != 12)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "TypeCode.UInt64 Err.");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ TypeCodeUInt64 test = new TypeCodeUInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("TypeCodeUInt64");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/typeloadexception/TypeLoadExceptionCtor1.csproj b/tests/src/CoreMangLib/cti/system/typeloadexception/TypeLoadExceptionCtor1.csproj
new file mode 100644
index 0000000000..a29abac8ff
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typeloadexception/TypeLoadExceptionCtor1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeloadexceptionctor1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/typeloadexception/TypeLoadExceptionCtor2.csproj b/tests/src/CoreMangLib/cti/system/typeloadexception/TypeLoadExceptionCtor2.csproj
new file mode 100644
index 0000000000..f968a0ebd5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typeloadexception/TypeLoadExceptionCtor2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeloadexceptionctor2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/typeloadexception/TypeLoadExceptionCtor3.csproj b/tests/src/CoreMangLib/cti/system/typeloadexception/TypeLoadExceptionCtor3.csproj
new file mode 100644
index 0000000000..6da55127f8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typeloadexception/TypeLoadExceptionCtor3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeloadexceptionctor3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/typeloadexception/TypeLoadExceptionMessage.csproj b/tests/src/CoreMangLib/cti/system/typeloadexception/TypeLoadExceptionMessage.csproj
new file mode 100644
index 0000000000..482d8b150d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typeloadexception/TypeLoadExceptionMessage.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="typeloadexceptionmessage.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/typeloadexception/typeloadexceptionctor1.cs b/tests/src/CoreMangLib/cti/system/typeloadexception/typeloadexceptionctor1.cs
new file mode 100644
index 0000000000..5a91918448
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typeloadexception/typeloadexceptionctor1.cs
@@ -0,0 +1,70 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+///<summary>
+///System.TypeLoadException.Ctor() [v-zuolan]
+///</summary>
+
+public class TypeLoadExceptionCtor
+{
+
+ public static int Main()
+ {
+ TypeLoadExceptionCtor testObj = new TypeLoadExceptionCtor();
+ TestLibrary.TestFramework.BeginTestCase("for constructor of System.TypeLoadException");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+
+
+ #region Test Logic
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ String errMessage = TestLibrary.Generator.GetString(-55, false, 1, 255);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Create a instance of TypeLoadException");
+ try
+ {
+ TypeLoadException tLE = new TypeLoadException();
+
+ if (tLE == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/typeloadexception/typeloadexceptionctor2.cs b/tests/src/CoreMangLib/cti/system/typeloadexception/typeloadexceptionctor2.cs
new file mode 100644
index 0000000000..0f735c6352
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typeloadexception/typeloadexceptionctor2.cs
@@ -0,0 +1,189 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+///<summary>
+///System.TypeLoadException.Ctor(String) [v-zuolan]
+///</summary>
+
+public class TypeLoadExceptionCtor
+{
+
+ public static int Main()
+ {
+ TypeLoadExceptionCtor testObj = new TypeLoadExceptionCtor();
+ TestLibrary.TestFramework.BeginTestCase("for constructor of System.TypeLoadException");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+
+
+ #region Positive Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ String errMessage = TestLibrary.Generator.GetString(-55, false, 1, 255);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Create a instance of TypeLoadException");
+ try
+ {
+ TypeLoadException tLE = new TypeLoadException(errMessage);
+
+ if (tLE == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ String errMessage = TestLibrary.Generator.GetString(-55, false, 1, 255);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Determine the error message is changed or not when the exception is thown out");
+ try
+ {
+
+ TypeLoadException tLE = new TypeLoadException(errMessage);
+
+ if (tLE == null)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ else
+ {
+ retVal = false;
+ throw tLE;
+ }
+ }
+ catch (TypeLoadException eE)
+ {
+ retVal = true;
+ if (!eE.Message.Equals(errMessage))
+ {
+ TestLibrary.TestFramework.LogError("004", "ExpectedValue(Message Not Be Changed) !=ActualValue(Message Be Changed)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ String errMessage = String.Empty;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Determine the method with Empty String");
+ try
+ {
+
+ TypeLoadException tLE = new TypeLoadException(errMessage);
+
+ if (tLE == null)
+ {
+ TestLibrary.TestFramework.LogError("006", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ else
+ {
+ retVal = false;
+ throw tLE;
+ }
+ }
+ catch (TypeLoadException eE)
+ {
+ retVal = true;
+ if (!eE.Message.Equals(errMessage))
+ {
+ TestLibrary.TestFramework.LogError("007", "ExpectedValue(Message Not Be Changed) !=ActualValue(Message Be Changed)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ String errMessage = TestLibrary.Generator.GetString(-55, false, 256, 512);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Determine the method with Long String");
+ try
+ {
+
+ TypeLoadException tLE = new TypeLoadException(errMessage);
+
+ if (tLE == null)
+ {
+ TestLibrary.TestFramework.LogError("009", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ else
+ {
+ retVal = false;
+ throw tLE;
+ }
+ }
+ catch (TypeLoadException eE)
+ {
+ retVal = true;
+ if (!eE.Message.Equals(errMessage))
+ {
+ TestLibrary.TestFramework.LogError("010", "ExpectedValue(Message Not Be Changed) !=ActualValue(Message Be Changed)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("011", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/typeloadexception/typeloadexceptionctor3.cs b/tests/src/CoreMangLib/cti/system/typeloadexception/typeloadexceptionctor3.cs
new file mode 100644
index 0000000000..38f532589f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typeloadexception/typeloadexceptionctor3.cs
@@ -0,0 +1,189 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+///<summary>
+///System.TypeLoadException.Ctor(String,Exception) [v-zuolan]
+///</summary>
+
+public class TypeLoadExceptionCtor
+{
+
+ public static int Main()
+ {
+ TypeLoadExceptionCtor testObj = new TypeLoadExceptionCtor();
+ TestLibrary.TestFramework.BeginTestCase("for constructor of System.TypeLoadException");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+
+
+ #region Positive Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ String errMessage = TestLibrary.Generator.GetString(-55, false, 1, 255);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Create a instance of TypeLoadException");
+ try
+ {
+ TypeLoadException tLE = new TypeLoadException(errMessage, new Exception());
+
+ if (tLE == null)
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ String errMessage = TestLibrary.Generator.GetString(-55, false, 1, 255);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Determine the error message is changed or not when the exception is thown out");
+ try
+ {
+
+ TypeLoadException tLE = new TypeLoadException(errMessage, new Exception());
+
+ if (tLE == null)
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ else
+ {
+ retVal = false;
+ throw tLE;
+ }
+ }
+ catch (TypeLoadException eE)
+ {
+ retVal = true;
+ if (!eE.Message.Equals(errMessage))
+ {
+ TestLibrary.TestFramework.LogError("004", "ExpectedValue(Message Not Be Changed) !=ActualValue(Message Be Changed)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ String errMessage = String.Empty;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Determine the method with Empty String");
+ try
+ {
+
+ TypeLoadException tLE = new TypeLoadException(errMessage, new Exception());
+
+ if (tLE == null)
+ {
+ TestLibrary.TestFramework.LogError("006", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ else
+ {
+ retVal = false;
+ throw tLE;
+ }
+ }
+ catch (TypeLoadException eE)
+ {
+ retVal = true;
+ if (!eE.Message.Equals(errMessage))
+ {
+ TestLibrary.TestFramework.LogError("007", "ExpectedValue(Message Not Be Changed) !=ActualValue(Message Be Changed)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ String errMessage = TestLibrary.Generator.GetString(-55, false, 256, 512);
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Determine the method with Long String");
+ try
+ {
+
+ TypeLoadException tLE = new TypeLoadException(errMessage, new Exception());
+
+ if (tLE == null)
+ {
+ TestLibrary.TestFramework.LogError("009", "ExpectedValue(not null) !=ActualValue(null)");
+ retVal = false;
+ }
+ else
+ {
+ retVal = false;
+ throw tLE;
+ }
+ }
+ catch (TypeLoadException eE)
+ {
+ retVal = true;
+ if (!eE.Message.Equals(errMessage))
+ {
+ TestLibrary.TestFramework.LogError("010", "ExpectedValue(Message Not Be Changed) !=ActualValue(Message Be Changed)");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("011", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/typeloadexception/typeloadexceptionmessage.cs b/tests/src/CoreMangLib/cti/system/typeloadexception/typeloadexceptionmessage.cs
new file mode 100644
index 0000000000..adff82ee6c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/typeloadexception/typeloadexceptionmessage.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+///<summary>
+///System.TypeLoadException.Message [v-zuolan]
+///</summary>
+
+public class TypeLoadExceptionCtor
+{
+
+ public static int Main()
+ {
+ TypeLoadExceptionCtor testObj = new TypeLoadExceptionCtor();
+ TestLibrary.TestFramework.BeginTestCase("for property of System.TypeLoadException");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("Positive");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+
+
+ #region Positive Test Logic
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ String errMessage = TestLibrary.Generator.GetString(-55, false, 1, 255);
+ TypeLoadException tLE = new TypeLoadException(errMessage);
+
+ String expectedValue = errMessage;
+ String actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1:Get Message when the message is a random string");
+ try
+ {
+ actualValue = tLE.Message;
+
+ if (!actualValue.Equals(expectedValue))
+ {
+ TestLibrary.TestFramework.LogError("001", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ String errMessage = null;
+ TypeLoadException tLE = new TypeLoadException(errMessage);
+
+ String expectedValue = "Failure has occurred while loading a type.";
+ //when message is null,it will return the default message.
+
+ String actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Get Message when the message is a null string");
+ try
+ {
+ actualValue = tLE.Message;
+
+ if ((actualValue != expectedValue) &
+ !(actualValue.Contains("[Arg_TypeLoadException]")))
+ {
+ TestLibrary.TestFramework.LogError("003", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ String errMessage = "";
+ TypeLoadException tLE = new TypeLoadException(errMessage);
+
+ String expectedValue = errMessage;
+ String actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Get Message when the message is a empty string");
+ try
+ {
+ actualValue = tLE.Message;
+
+ if (!actualValue.Equals(expectedValue))
+ {
+ TestLibrary.TestFramework.LogError("005", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ String errMessage = TestLibrary.Generator.GetString(-55, false, 256, 512);
+ TypeLoadException tLE = new TypeLoadException(errMessage);
+
+ String expectedValue = errMessage;
+ String actualValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Get Message when the message is a long random string");
+ try
+ {
+ actualValue = tLE.Message;
+
+ if (!actualValue.Equals(expectedValue))
+ {
+ TestLibrary.TestFramework.LogError("007", "ExpectedValue(" + expectedValue + ") !=ActualValue(" + actualValue + ")");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16CompareTo1.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16CompareTo1.csproj
new file mode 100644
index 0000000000..80fdb88309
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16CompareTo1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16compareto1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16Equals1.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16Equals1.csproj
new file mode 100644
index 0000000000..cbf572a329
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16Equals1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16equals1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16Equals2.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16Equals2.csproj
new file mode 100644
index 0000000000..2f898f67cd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16Equals2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16equals2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToBoolean.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToBoolean.csproj
new file mode 100644
index 0000000000..6837fdd18e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToBoolean.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16iconvertibletoboolean.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToByte.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToByte.csproj
new file mode 100644
index 0000000000..91115a751f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16iconvertibletobyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToChar.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToChar.csproj
new file mode 100644
index 0000000000..44f4642f2e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToChar.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16iconvertibletochar.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToDateTime.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToDateTime.csproj
new file mode 100644
index 0000000000..32e864191a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToDateTime.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16iconvertibletodatetime.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToDecimal.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToDecimal.csproj
new file mode 100644
index 0000000000..ea526d5a67
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToDecimal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16iconvertibletodecimal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToDouble.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToDouble.csproj
new file mode 100644
index 0000000000..57754ec013
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToDouble.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16iconvertibletodouble.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToInt16.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToInt16.csproj
new file mode 100644
index 0000000000..b666541ff5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16iconvertibletoint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToInt32.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToInt32.csproj
new file mode 100644
index 0000000000..4b572905cd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16iconvertibletoint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToInt64.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToInt64.csproj
new file mode 100644
index 0000000000..093fc54d1b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16iconvertibletoint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToSByte.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToSByte.csproj
new file mode 100644
index 0000000000..163822910f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToSByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16iconvertibletosbyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToSingle.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToSingle.csproj
new file mode 100644
index 0000000000..ec6e979da3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToSingle.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16iconvertibletosingle.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToType.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToType.csproj
new file mode 100644
index 0000000000..58d03cfa17
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToType.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16iconvertibletotype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToUInt16.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToUInt16.csproj
new file mode 100644
index 0000000000..5b2fbf74f5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToUInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16iconvertibletouint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToUInt32.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToUInt32.csproj
new file mode 100644
index 0000000000..be438583fd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToUInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16iconvertibletouint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToUInt64.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToUInt64.csproj
new file mode 100644
index 0000000000..c88b39d570
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16IConvertibleToUInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16iconvertibletouint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16Parse1.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16Parse1.csproj
new file mode 100644
index 0000000000..2ce7d80109
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16Parse1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16parse1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16Parse2.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16Parse2.csproj
new file mode 100644
index 0000000000..6b9d7bd008
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16Parse2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16parse2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16Parse3.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16Parse3.csproj
new file mode 100644
index 0000000000..15042213db
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16Parse3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16parse3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16ToString3.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16ToString3.csproj
new file mode 100644
index 0000000000..950af6b1f4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16ToString3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16tostring3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16ToString4.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16ToString4.csproj
new file mode 100644
index 0000000000..ca683bad29
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16ToString4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16tostring4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/UInt16TryParse.csproj b/tests/src/CoreMangLib/cti/system/uint16/UInt16TryParse.csproj
new file mode 100644
index 0000000000..a6ac8cdcd0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/UInt16TryParse.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint16tryparse.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16compareto1.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16compareto1.cs
new file mode 100644
index 0000000000..dc8b5948b6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16compareto1.cs
@@ -0,0 +1,156 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UInt16.CompareTo(System.UInt16)
+/// </summary>
+public class UInt16CompareTo
+{
+ public static int Main()
+ {
+ UInt16CompareTo ui32ct2 = new UInt16CompareTo();
+ TestLibrary.TestFramework.BeginTestCase("for method: UInt16.CompareTo(UInt16)");
+
+ if (ui32ct2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ int ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: UInt16 value is larger than the instance");
+ try
+ {
+ UInt16 uintA = 0;
+ UInt16 comValue = (UInt16)this.GetInt32(1, UInt16.MaxValue);
+ ActualResult = uintA.CompareTo(comValue);
+ if (ActualResult >= 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ int ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: UInt16 value is less than the instance");
+ try
+ {
+ UInt16 uintA = 0xffff;
+ UInt16 comValue = (UInt16)this.GetInt32(0, UInt16.MaxValue);
+ ActualResult = uintA.CompareTo(comValue);
+ if (ActualResult <= 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ int ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: UInt16 value is equal the instance");
+ try
+ {
+ UInt16 uintA = 0xffff;
+ UInt16 comValue = UInt16.MaxValue;
+ ActualResult = uintA.CompareTo(comValue);
+ if (ActualResult != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ int ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: UInt16 value is UInt16 min value");
+ try
+ {
+ UInt32 uintA = 0xffff;
+ UInt32 comValue = UInt16.MinValue;
+ ActualResult = uintA.CompareTo(comValue);
+ if (ActualResult <= 0)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16equals1.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16equals1.cs
new file mode 100644
index 0000000000..7e0ad005ec
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16equals1.cs
@@ -0,0 +1,181 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UInt16.Equals(System.Object)
+/// </summary>
+public class UInt16Equals
+{
+ public static int Main()
+ {
+ UInt16Equals ui32e1 = new UInt16Equals();
+ TestLibrary.TestFramework.BeginTestCase("for method: UInt16.Equals(Object)");
+
+ if (ui32e1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ return retVal;
+ }
+ #region
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ bool ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object value is null");
+ try
+ {
+ UInt16 uintA = (UInt16)this.GetInt32(0, UInt16.MaxValue);
+ object comValue = null;
+ ActualResult = uintA.Equals(comValue);
+ if (ActualResult)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ bool ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: object value is declaring class");
+ try
+ {
+ UInt16 uintA = (UInt16)this.GetInt32(0, UInt16.MaxValue);
+ object comValue = new MyTest();
+ ActualResult = uintA.Equals(comValue);
+ if (ActualResult)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ bool ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: object value is the instance value but the types are different");
+ try
+ {
+ Int16 comValue = TestLibrary.Generator.GetInt16(-55);
+ UInt16 uintA = (UInt16)comValue;
+ ActualResult = uintA.Equals(comValue);
+ if (ActualResult)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ bool ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: object and the instance have the same type and the same value 1");
+ try
+ {
+ UInt16 uintA = 0xffff;
+ UInt16 comValue = UInt16.MaxValue;
+ ActualResult = uintA.Equals(comValue);
+ if (!ActualResult)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ bool ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: object and the instance have the same type and the same value 2");
+ try
+ {
+ UInt16 uintA = 0;
+ UInt16 comValue = UInt16.MinValue;
+ ActualResult = uintA.Equals(comValue);
+ if (!ActualResult)
+ {
+ TestLibrary.TestFramework.LogError("009", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ public class MyTest { }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16equals2.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16equals2.cs
new file mode 100644
index 0000000000..6f9664aa2b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16equals2.cs
@@ -0,0 +1,156 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UInt16.Equals(System.UInt16)
+/// </summary>
+public class UInt16Equals
+{
+ public static int Main(string[] args)
+ {
+ UInt16Equals ui32e2 = new UInt16Equals();
+ TestLibrary.TestFramework.BeginTestCase("UInt16.Equals(UInt16)");
+
+ if (ui32e2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ bool ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: UInt16 value is zero");
+ try
+ {
+ UInt16 uintA = (UInt16)this.GetInt32(1, UInt16.MaxValue);
+ UInt16 comValue = 0;
+ ActualResult = uintA.Equals(comValue);
+ if (ActualResult)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ bool ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: UInt32 value is different from the instance 1");
+ try
+ {
+ UInt16 intA = (UInt16)this.GetInt32(0, UInt16.MaxValue - 1);
+ UInt16 uintA = (UInt16)intA;
+ UInt16 comValue = (UInt16)(intA + 1);
+ ActualResult = uintA.Equals(comValue);
+ if (ActualResult)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ bool ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: UInt32 value is different from the instance 2");
+ try
+ {
+ UInt16 intA = (UInt16)this.GetInt32(0, UInt16.MaxValue);
+ UInt16 uintA = (UInt16)(intA + 1);
+ UInt16 comValue = (UInt16)intA;
+ ActualResult = uintA.Equals(comValue);
+ if (ActualResult)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ bool ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: UInt32 value is equal the instance ");
+ try
+ {
+ UInt16 uintA = 0xffff;
+ UInt16 comValue = UInt16.MaxValue;
+ ActualResult = uintA.Equals(comValue);
+ if (!ActualResult)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletoboolean.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletoboolean.cs
new file mode 100644
index 0000000000..484cd7c040
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletoboolean.cs
@@ -0,0 +1,155 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UInt16.System.IConvertible.ToBoolean(IFormatPrvoider)
+/// </summary>
+public class UInt16IConvertibleToBoolean
+{
+ public static int Main()
+ {
+ UInt16IConvertibleToBoolean testObj = new UInt16IConvertibleToBoolean();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: UInt16.System.IConvertible.ToBoolean(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ bool expectedValue;
+ bool actualValue;
+ IConvertible convert;
+
+ uintA = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Random UInt16 value between 0 and UInt16.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToBoolean(null);
+ expectedValue = 0 != uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of " + uintA + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ bool expectedValue;
+ bool actualValue;
+ IConvertible convert;
+
+ uintA = UInt16.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: value is UInt16.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToBoolean(null);
+ expectedValue = 0 != uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of " + uintA + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ bool expectedValue;
+ bool actualValue;
+ IConvertible convert;
+
+ uintA = UInt16.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: value is UInt16.MinValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToBoolean(null);
+ expectedValue = 0 != uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The boolean value of " + uintA + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletobyte.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletobyte.cs
new file mode 100644
index 0000000000..a5bf1b0848
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletobyte.cs
@@ -0,0 +1,195 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UInt16.System.IConvertible.ToByte(IFormatPrvoider)
+/// </summary>
+public class UInt16IConvertibleToByte
+{
+ public static int Main()
+ {
+ UInt16IConvertibleToByte testObj = new UInt16IConvertibleToByte();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: UInt16.System.IConvertible.ToByte(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ Byte expectedValue;
+ Byte actualValue;
+ IConvertible convert;
+
+ uintA = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (Byte.MaxValue + 1));
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Random UInt16 value between 0 and Byte.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToByte(null);
+ expectedValue = (byte)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The byte value of " + uintA + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ Byte expectedValue;
+ Byte actualValue;
+ IConvertible convert;
+
+ uintA = byte.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: value is Byte.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+ actualValue = convert.ToByte(null);
+ expectedValue = (byte)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The byte value of " + uintA + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ Byte expectedValue;
+ Byte actualValue;
+ IConvertible convert;
+
+ uintA = UInt16.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: value is UInt16.MinValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+ actualValue = convert.ToByte(null);
+ expectedValue = (byte)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The byte value of " + uintA + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+
+ //OverflowException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: value is greater than Byte.MaxValue";
+ string errorDesc;
+
+ UInt16 uintA;
+ IConvertible convert;
+
+ uintA = byte.MaxValue + 1;
+ convert = (IConvertible)uintA;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ convert.ToByte(null);
+ errorDesc = "OverflowException is not thrown as expected.";
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletochar.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletochar.cs
new file mode 100644
index 0000000000..f58fd26b92
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletochar.cs
@@ -0,0 +1,158 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UInt16.System.IConvertible.ToChar(IFormatPrvoider)
+/// </summary>
+public class UInt16IConvertibleToChar
+{
+ public static int Main()
+ {
+ UInt16IConvertibleToChar testObj = new UInt16IConvertibleToChar();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: UInt16.System.IConvertible.ToChar(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ char expectedValue;
+ char actualValue;
+ IConvertible convert;
+
+ uintA = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Random UInt16 value between 0 and UInt16.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToChar(null);
+ expectedValue = (char)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ char expectedValue;
+ char actualValue;
+ IConvertible convert;
+
+ uintA = UInt16.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Value is UInt16.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToChar(null);
+ expectedValue = (char)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ char expectedValue;
+ char actualValue;
+ IConvertible convert;
+
+ uintA = UInt16.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Value is UInt16.MinValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToChar(null);
+ expectedValue = (char)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletodatetime.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletodatetime.cs
new file mode 100644
index 0000000000..ee5687f29b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletodatetime.cs
@@ -0,0 +1,81 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// UInt16.System.IConvertible.ToDateTime(IFormatProvider)
+/// Note This conversion is not supported. Attempting to do so throws an InvalidCastException.
+/// </summary>
+public class UInt16IConvertibleToDateTime
+{
+ public static int Main()
+ {
+ UInt16IConvertibleToDateTime testObj = new UInt16IConvertibleToDateTime();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: UInt16.System.IConvertible.ToDateTime(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Negative tests
+ //InvalidCastException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: Random character";
+ string errorDesc;
+
+ UInt16 i = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+ IConvertible convert;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ convert = (IConvertible)i;
+ convert.ToDateTime(null);
+
+ errorDesc = "InvalidCastException is not thrown as expected.";
+ errorDesc += string.Format("\nThe UInt16 value is {0}", i);
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (InvalidCastException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is {0}", i);
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletodecimal.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletodecimal.cs
new file mode 100644
index 0000000000..1300be4a4b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletodecimal.cs
@@ -0,0 +1,158 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UInt16.System.IConvertible.ToDecimal(IFormatPrvoider)
+/// </summary>
+public class UInt16IConvertibleToDecimal
+{
+ public static int Main()
+ {
+ UInt16IConvertibleToDecimal testObj = new UInt16IConvertibleToDecimal();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: UInt16.System.IConvertible.ToDecimal(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ decimal expectedValue;
+ decimal actualValue;
+ IConvertible convert;
+
+ uintA = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Random UInt16 value between 0 and UInt16.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToDecimal(null);
+ expectedValue = (decimal)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ decimal expectedValue;
+ decimal actualValue;
+ IConvertible convert;
+
+ uintA = UInt16.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Value is UInt16.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToDecimal(null);
+ expectedValue = (decimal)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ decimal expectedValue;
+ decimal actualValue;
+ IConvertible convert;
+
+ uintA = UInt16.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Value is UInt16.MinValue.");
+ try
+ {
+ convert = (decimal)uintA;
+
+ actualValue = convert.ToDecimal(null);
+ expectedValue = (char)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletodouble.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletodouble.cs
new file mode 100644
index 0000000000..c98d2cb1c9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletodouble.cs
@@ -0,0 +1,158 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UInt16.System.IConvertible.ToDouble(IFormatPrvoider)
+/// </summary>
+public class UInt16IConvertibleToDouble
+{
+ public static int Main()
+ {
+ UInt16IConvertibleToDouble testObj = new UInt16IConvertibleToDouble();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: UInt16.System.IConvertible.ToDouble(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ Double expectedValue;
+ Double actualValue;
+ IConvertible convert;
+
+ uintA = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Random UInt16 value between 0 and UInt16.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToDouble(null);
+ expectedValue = (Double)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ Double expectedValue;
+ Double actualValue;
+ IConvertible convert;
+
+ uintA = UInt16.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Value is UInt16.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToDouble(null);
+ expectedValue = (Double)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ Double expectedValue;
+ Double actualValue;
+ IConvertible convert;
+
+ uintA = UInt16.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Value is UInt16.MinValue.");
+ try
+ {
+ convert = (Double)uintA;
+
+ actualValue = convert.ToDouble(null);
+ expectedValue = (char)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletoint16.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletoint16.cs
new file mode 100644
index 0000000000..5160f7737c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletoint16.cs
@@ -0,0 +1,195 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UInt16.System.IConvertible.ToInt16(IFormatPrvoider)
+/// </summary>
+public class UInt16IConvertibleToInt16
+{
+ public static int Main()
+ {
+ UInt16IConvertibleToInt16 testObj = new UInt16IConvertibleToInt16();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: UInt16.System.IConvertible.ToInt16(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ Int16 expectedValue;
+ Int16 actualValue;
+ IConvertible convert;
+
+ uintA = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (Int16.MaxValue + 1));
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Random UInt16 value between 0 and Byte.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToInt16(null);
+ expectedValue = (Int16)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The Int16 value of " + uintA + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ Int16 expectedValue;
+ Int16 actualValue;
+ IConvertible convert;
+
+ uintA = (UInt16)Int16.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: value is Int16.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+ actualValue = convert.ToInt16(null);
+ expectedValue = (Int16)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The Int16 value of " + uintA + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ Int16 expectedValue;
+ Int16 actualValue;
+ IConvertible convert;
+
+ uintA = UInt16.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: value is UInt16.MinValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+ actualValue = convert.ToInt16(null);
+ expectedValue = (Int16)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The Int16 value of " + uintA + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+
+ //OverflowException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: value is greater than Int16.MaxValue";
+ string errorDesc;
+
+ UInt16 uintA;
+ IConvertible convert;
+
+ uintA = Int16.MaxValue + 1;
+ convert = (IConvertible)uintA;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ convert.ToInt16(null);
+ errorDesc = "OverflowException is not thrown as expected.";
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletoint32.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletoint32.cs
new file mode 100644
index 0000000000..8a133a8641
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletoint32.cs
@@ -0,0 +1,158 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UInt16.System.IConvertible.ToInt32(IFormatPrvoider)
+/// </summary>
+public class UInt16IConvertibleToInt32
+{
+ public static int Main()
+ {
+ UInt16IConvertibleToInt32 testObj = new UInt16IConvertibleToInt32();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: UInt16.System.IConvertible.ToInt32(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ Int32 expectedValue;
+ Int32 actualValue;
+ IConvertible convert;
+
+ uintA = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Random UInt16 value between 0 and UInt16.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToInt32(null);
+ expectedValue = (Int32)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ Int32 expectedValue;
+ Int32 actualValue;
+ IConvertible convert;
+
+ uintA = UInt16.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Value is UInt16.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToInt32(null);
+ expectedValue = (Int32)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ Int32 expectedValue;
+ Int32 actualValue;
+ IConvertible convert;
+
+ uintA = UInt16.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Value is UInt16.MinValue.");
+ try
+ {
+ convert = (Int32)uintA;
+
+ actualValue = convert.ToInt32(null);
+ expectedValue = (char)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletoint64.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletoint64.cs
new file mode 100644
index 0000000000..83131c34d3
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletoint64.cs
@@ -0,0 +1,158 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UInt16.System.IConvertible.ToInt64(IFormatPrvoider)
+/// </summary>
+public class UInt16IConvertibleToInt64
+{
+ public static int Main()
+ {
+ UInt16IConvertibleToInt64 testObj = new UInt16IConvertibleToInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: UInt16.System.IConvertible.ToInt64(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ Int64 expectedValue;
+ Int64 actualValue;
+ IConvertible convert;
+
+ uintA = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Random UInt16 value between 0 and UInt16.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToInt64(null);
+ expectedValue = (Int64)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ Int64 expectedValue;
+ Int64 actualValue;
+ IConvertible convert;
+
+ uintA = UInt16.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Value is UInt16.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToInt64(null);
+ expectedValue = (Int64)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ Int64 expectedValue;
+ Int64 actualValue;
+ IConvertible convert;
+
+ uintA = UInt16.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Value is UInt16.MinValue.");
+ try
+ {
+ convert = (Int64)uintA;
+
+ actualValue = convert.ToInt64(null);
+ expectedValue = (char)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletosbyte.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletosbyte.cs
new file mode 100644
index 0000000000..96a3f61b69
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletosbyte.cs
@@ -0,0 +1,195 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UInt16.System.IConvertible.ToSByte(IFormatPrvoider)
+/// </summary>
+public class UInt16IConvertibleToSByte
+{
+ public static int Main()
+ {
+ UInt16IConvertibleToSByte testObj = new UInt16IConvertibleToSByte();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: UInt16.System.IConvertible.ToSByte(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ SByte expectedValue;
+ SByte actualValue;
+ IConvertible convert;
+
+ uintA = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (SByte.MaxValue + 1));
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Random UInt16 value between 0 and SByte.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToSByte(null);
+ expectedValue = (SByte)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The SByte value of " + uintA + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ SByte expectedValue;
+ SByte actualValue;
+ IConvertible convert;
+
+ uintA = (UInt16)SByte.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: value is SByte.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+ actualValue = convert.ToSByte(null);
+ expectedValue = (SByte)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The SByte value of " + uintA + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ SByte expectedValue;
+ SByte actualValue;
+ IConvertible convert;
+
+ uintA = UInt16.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: value is UInt16.MinValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+ actualValue = convert.ToSByte(null);
+ expectedValue = (SByte)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The SByte value of " + uintA + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+
+ //OverflowException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: value is greater than SByte.MaxValue";
+ string errorDesc;
+
+ UInt16 uintA;
+ IConvertible convert;
+
+ uintA = SByte.MaxValue + 1;
+ convert = (IConvertible)uintA;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ convert.ToSByte(null);
+ errorDesc = "OverflowException is not thrown as expected.";
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletosingle.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletosingle.cs
new file mode 100644
index 0000000000..55a492493d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletosingle.cs
@@ -0,0 +1,158 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UInt16.System.IConvertible.ToSingle(IFormatPrvoider)
+/// </summary>
+public class UInt16IConvertibleToSingle
+{
+ public static int Main()
+ {
+ UInt16IConvertibleToSingle testObj = new UInt16IConvertibleToSingle();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: UInt16.System.IConvertible.ToSingle(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ Single expectedValue;
+ Single actualValue;
+ IConvertible convert;
+
+ uintA = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Random UInt16 value between 0 and UInt16.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToSingle(null);
+ expectedValue = (Single)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ Single expectedValue;
+ Single actualValue;
+ IConvertible convert;
+
+ uintA = UInt16.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Value is UInt16.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToSingle(null);
+ expectedValue = (Single)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ Single expectedValue;
+ Single actualValue;
+ IConvertible convert;
+
+ uintA = UInt16.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Value is UInt16.MinValue.");
+ try
+ {
+ convert = (Single)uintA;
+
+ actualValue = convert.ToSingle(null);
+ expectedValue = (char)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletotype.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletotype.cs
new file mode 100644
index 0000000000..530b60ec68
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletotype.cs
@@ -0,0 +1,626 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// UInt16.System.IConvertible.ToType(Type, IFormatProvider)
+/// Converts the current UInt16 value to an object of the specified type using
+/// the specified IFormatProvider object.
+/// </summary>
+public class UInt16IConvertibleToType
+{
+ public static int Main()
+ {
+ UInt16IConvertibleToType testObj = new UInt16IConvertibleToType();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: UInt16.System.IConvertible.ToType(Type, IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ retVal = PosTest9() && retVal;
+ retVal = PosTest10() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: Conversion to byte";
+ string errorDesc;
+
+ byte b;
+ object expectedObj;
+ object actualObj;
+ UInt16 uintA;
+ b = TestLibrary.Generator.GetByte(-55);
+ uintA = (UInt16)b;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = uintA;
+
+ expectedObj = b;
+ actualObj = converter.ToType(typeof(byte), numberFormat);
+
+ if (((byte)expectedObj != (byte)actualObj) || !(actualObj is byte))
+ {
+ errorDesc = string.Format("Byte value of UInt16 {0} is not ", uintA);
+ errorDesc += expectedObj + " as expected: Actual(" + actualObj + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: Conversion to sbyte";
+ string errorDesc;
+
+ sbyte sb;
+ object expectedObj;
+ object actualObj;
+ UInt16 uintA;
+ sb = (sbyte)(TestLibrary.Generator.GetByte(-55) % (sbyte.MaxValue + 1));
+ uintA = (UInt16)sb;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = uintA;
+
+ expectedObj = sb;
+ actualObj = converter.ToType(typeof(sbyte), numberFormat);
+
+ if (((sbyte)expectedObj != (sbyte)actualObj) || !(actualObj is sbyte))
+ {
+ errorDesc = string.Format("SByte value of character {0} is not ", uintA);
+ errorDesc += expectedObj + " as expected: Actual(" + actualObj + ")";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ const string c_TEST_DESC = "PosTest3: Conversion to Int16";
+ string errorDesc;
+
+ Int16 i;
+ object expectedObj;
+ object actualObj;
+ UInt16 uintA;
+ i = (Int16)(TestLibrary.Generator.GetInt32(-55) % (Int16.MaxValue + 1));
+ uintA = (UInt16)i;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = uintA;
+
+ expectedObj = i;
+ actualObj = converter.ToType(typeof(Int16), numberFormat);
+
+ if (((Int16)expectedObj != (Int16)actualObj) || !(actualObj is Int16))
+ {
+ errorDesc = string.Format("Int16 value of character {0} is not ", uintA);
+ errorDesc += expectedObj + " as expected: Actual(" + actualObj + ")";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P004";
+ const string c_TEST_DESC = "PosTest4: Conversion to UInt16";
+ string errorDesc;
+
+ UInt16 i;
+ object expectedObj;
+ object actualObj;
+ UInt16 uintA;
+ i = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+ uintA = (UInt16)i;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = uintA;
+
+ expectedObj = i;
+ actualObj = converter.ToType(typeof(UInt16), numberFormat);
+
+ if (((UInt16)expectedObj != (UInt16)actualObj) || !(actualObj is UInt16))
+ {
+ errorDesc = string.Format("UInt16 value of character {0} is not ", uintA);
+ errorDesc += expectedObj + " as expected: Actual(" + actualObj + ")";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P005";
+ const string c_TEST_DESC = "PosTest5: Conversion to Int32";
+ string errorDesc;
+
+ int i;
+ object expectedObj;
+ object actualObj;
+ UInt16 uintA;
+ i = TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1);
+ uintA = (UInt16)i;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = uintA;
+
+ expectedObj = i;
+ actualObj = converter.ToType(typeof(int), numberFormat);
+
+ if (((int)expectedObj != (int)actualObj) || !(actualObj is int))
+ {
+ errorDesc = string.Format("Int32 value of character {0} is not ", uintA);
+ errorDesc += expectedObj + " as expected: Actual(" + actualObj + ")";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P006";
+ const string c_TEST_DESC = "PosTest6: Conversion to UInt32";
+ string errorDesc;
+
+ UInt32 i;
+ object expectedObj;
+ object actualObj;
+ UInt16 uintA;
+ i = (UInt32)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+ uintA = (UInt16)i;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = uintA;
+
+ expectedObj = i;
+ actualObj = converter.ToType(typeof(UInt32), numberFormat);
+
+ if (((UInt32)expectedObj != (UInt32)actualObj) || !(actualObj is UInt32))
+ {
+ errorDesc = string.Format("UInt32 value of character {0} is not ", uintA);
+ errorDesc += expectedObj + " as expected: Actual(" + actualObj + ")";
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P007";
+ const string c_TEST_DESC = "PosTest7: Conversion to Int64";
+ string errorDesc;
+
+ Int64 i;
+ object expectedObj;
+ object actualObj;
+ UInt16 uintA;
+ i = TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1);
+ uintA = (UInt16)i;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = uintA;
+
+ expectedObj = i;
+ actualObj = converter.ToType(typeof(Int64), numberFormat);
+
+ if (((Int64)expectedObj != (Int64)actualObj) || !(actualObj is Int64))
+ {
+ errorDesc = string.Format("Int64 value of character {0} is not ", uintA);
+ errorDesc += expectedObj + " as expected: Actual(" + actualObj + ")";
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P008";
+ const string c_TEST_DESC = "PosTest8: Conversion to UInt64";
+ string errorDesc;
+
+ UInt64 i;
+ object expectedObj;
+ object actualObj;
+ UInt16 uintA;
+ i = (UInt64)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+ uintA = (UInt16)i;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ NumberFormatInfo numberFormat = new NumberFormatInfo();
+ IFormatProvider provider = numberFormat;
+ IConvertible converter = uintA;
+
+ expectedObj = i;
+ actualObj = converter.ToType(typeof(UInt64), numberFormat);
+
+ if (((UInt64)expectedObj != (UInt64)actualObj) || !(actualObj is UInt64))
+ {
+ errorDesc = string.Format("UInt64 value of character {0} is not ", uintA);
+ errorDesc += expectedObj + " as expected: Actual(" + actualObj + ")";
+ TestLibrary.TestFramework.LogError("015" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("016" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest9()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P009";
+ const string c_TEST_DESC = "PosTest9: Conversion to char";
+ string errorDesc;
+
+ object expectedObj;
+ object actualObj;
+ UInt16 uintA;
+ uintA = (UInt16)TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ IConvertible converter = uintA;
+
+ expectedObj = (char)uintA;
+ actualObj = converter.ToType(typeof(char), null);
+
+ if (((char)expectedObj != (char)actualObj) || !(actualObj is char))
+ {
+ errorDesc = string.Format("char value of UInt16 {0} is not ", uintA);
+ errorDesc += expectedObj + " as expected: Actual(" + actualObj + ")";
+ TestLibrary.TestFramework.LogError("017" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("018" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest10()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P010";
+ const string c_TEST_DESC = "PosTest10: Conversion to string";
+ string errorDesc;
+
+ object expectedObj;
+ object actualObj;
+ UInt16 uintA;
+ uintA = (UInt16)TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ IConvertible converter = uintA;
+ expectedObj = uintA.ToString();
+ actualObj = converter.ToType(typeof(string), null);
+
+ if (((string)expectedObj != (string)actualObj) || !(actualObj is string))
+ {
+ errorDesc = string.Format("string value of UInt16 {0} is not ", uintA);
+ errorDesc += expectedObj + " as expected: Actual(" + actualObj + ")";
+ TestLibrary.TestFramework.LogError("019" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("020" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //bug
+ //ArgumentNullException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: type is a null reference (Nothing in Visual Basic).";
+ string errorDesc;
+
+ UInt16 uintA = (UInt16)TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ IConvertible converter = uintA;
+ converter.ToType(null, null);
+
+ errorDesc = "ArgumentNullException is not thrown as expected.";
+ errorDesc += string.Format("\nThe UInt16 value is {0}", uintA);
+ TestLibrary.TestFramework.LogError("021" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe UInt16 value is {0}", uintA);
+ TestLibrary.TestFramework.LogError("022" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ //bug
+ //InvalidCastException
+ public bool NegTest2()
+ {
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: type is DateTime";
+
+ return this.DoInvalidCastTest(c_TEST_ID, c_TEST_DESC, "023", "024", typeof(DateTime));
+ }
+
+ //bug
+ //OverflowException
+ public bool NegTest3()
+ {
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: Value is too large for destination type -- Int16";
+ return this.DoOverflowTest(c_TEST_ID, c_TEST_DESC, "025", typeof(Int16), Int16.MaxValue);
+ }
+
+ public bool NegTest4()
+ {
+ const string c_TEST_ID = "N004";
+ const string c_TEST_DESC = "NegTest4: Value is too large for destination type -- byte";
+
+ return this.DoOverflowTest(c_TEST_ID, c_TEST_DESC, "026", typeof(byte), byte.MaxValue);
+ }
+
+ public bool NegTest5()
+ {
+ const string c_TEST_ID = "N005";
+ const string c_TEST_DESC = "NegTest5: Value is too large for destination type -- sbyte";
+
+ return this.DoOverflowTest(c_TEST_ID, c_TEST_DESC, "027", typeof(sbyte), sbyte.MaxValue);
+ }
+ #endregion
+
+ #region Helper methods for negative tests
+ private bool DoInvalidCastTest(string testId,
+ string testDesc,
+ string errorNum1,
+ string errorNum2,
+ Type destType)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA = (UInt16)TestLibrary.Generator.GetChar(-55);
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ IConvertible converter = uintA;
+ converter.ToType(destType, null);
+
+ errorDesc = "InvalidCastException is not thrown as expected.";
+ errorDesc += string.Format("\nThe UInt16 value is {0}", uintA);
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ catch (InvalidCastException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe character is {0}", uintA);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ private bool DoOverflowTest(string testId,
+ string testDesc,
+ string errorNum,
+ Type destType,
+ int destTypeMaxValue)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ int i;
+ UInt16 uintA;
+ i = Int16.MaxValue + 1 +
+ TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue - destTypeMaxValue);
+ uintA = (UInt16)i;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ IConvertible converter = uintA;
+ converter.ToType(destType, null);
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nThe UInt16 value is {0}", uintA);
+ TestLibrary.TestFramework.LogError(errorNum + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletouint16.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletouint16.cs
new file mode 100644
index 0000000000..4885e373e9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletouint16.cs
@@ -0,0 +1,158 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UInt16.System.IConvertible.ToUInt16(IFormatPrvoider)
+/// </summary>
+public class UInt16IConvertibleToUInt16
+{
+ public static int Main()
+ {
+ UInt16IConvertibleToUInt16 testObj = new UInt16IConvertibleToUInt16();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: UInt16.System.IConvertible.ToUInt16(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ UInt16 expectedValue;
+ UInt16 actualValue;
+ IConvertible convert;
+
+ uintA = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Random UInt16 value between 0 and UInt16.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToUInt16(null);
+ expectedValue = uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ UInt16 expectedValue;
+ UInt16 actualValue;
+ IConvertible convert;
+
+ uintA = UInt16.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Value is UInt16.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToUInt16(null);
+ expectedValue = uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ UInt16 expectedValue;
+ UInt16 actualValue;
+ IConvertible convert;
+
+ uintA = UInt16.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Value is UInt16.MinValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToUInt16(null);
+ expectedValue = (UInt16)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletouint32.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletouint32.cs
new file mode 100644
index 0000000000..ae9bf35957
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletouint32.cs
@@ -0,0 +1,158 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UInt16.System.IConvertible.ToUInt32(IFormatPrvoider)
+/// </summary>
+public class UInt16IConvertibleToUInt32
+{
+ public static int Main()
+ {
+ UInt16IConvertibleToUInt32 testObj = new UInt16IConvertibleToUInt32();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: UInt16.System.IConvertible.ToUInt32(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ UInt32 expectedValue;
+ UInt32 actualValue;
+ IConvertible convert;
+
+ uintA = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Random UInt16 value between 0 and UInt16.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToUInt32(null);
+ expectedValue = (UInt32)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ UInt32 expectedValue;
+ UInt32 actualValue;
+ IConvertible convert;
+
+ uintA = UInt16.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Value is UInt16.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToUInt32(null);
+ expectedValue = (UInt32)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ UInt32 expectedValue;
+ UInt32 actualValue;
+ IConvertible convert;
+
+ uintA = UInt16.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Value is UInt16.MinValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToUInt32(null);
+ expectedValue = (UInt32)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletouint64.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletouint64.cs
new file mode 100644
index 0000000000..8169cc2105
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16iconvertibletouint64.cs
@@ -0,0 +1,158 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UInt16.System.IConvertible.ToUInt64(IFormatPrvoider)
+/// </summary>
+public class UInt16IConvertibleToUInt64
+{
+ public static int Main()
+ {
+ UInt16IConvertibleToUInt64 testObj = new UInt16IConvertibleToUInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: UInt16.System.IConvertible.ToUInt64(IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ UInt64 expectedValue;
+ UInt64 actualValue;
+ IConvertible convert;
+
+ uintA = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Random UInt16 value between 0 and UInt16.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToUInt64(null);
+ expectedValue = (UInt64)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ UInt64 expectedValue;
+ UInt64 actualValue;
+ IConvertible convert;
+
+ uintA = UInt16.MaxValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Value is UInt16.MaxValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToUInt64(null);
+ expectedValue = (UInt64)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA;
+ UInt64 expectedValue;
+ UInt64 actualValue;
+ IConvertible convert;
+
+ uintA = UInt16.MinValue;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Value is UInt16.MinValue.");
+ try
+ {
+ convert = (IConvertible)uintA;
+
+ actualValue = convert.ToUInt64(null);
+ expectedValue = (UInt64)uintA;
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The char value of {0} is not the value \\u{1:x} as expected: actual(\\u{2:x})",
+ uintA, (int)expectedValue, (int)actualValue);
+ TestLibrary.TestFramework.LogError("005", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16parse1.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16parse1.cs
new file mode 100644
index 0000000000..7cb17e0fc2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16parse1.cs
@@ -0,0 +1,284 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UInt16.Parse(string)
+/// </summary>
+public class UInt16Parse
+{
+ public static int Main()
+ {
+ UInt16Parse ui32ct2 = new UInt16Parse();
+ TestLibrary.TestFramework.BeginTestCase("for method: UInt16.Parse(string)");
+
+ if (ui32ct2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+
+
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+ UInt16 actualValue;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: UInt16.MaxValue.");
+ try
+ {
+ string strValue = UInt16.MaxValue.ToString();
+ actualValue = UInt16.Parse(strValue);
+ if (actualValue != UInt16.MaxValue)
+ {
+ errorDesc = "The parse value of " + strValue + " is not the value " + UInt16.MaxValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+ UInt16 actualValue;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: UInt16.MinValue.");
+ try
+ {
+ string strValue = UInt16.MinValue.ToString();
+ actualValue = UInt16.Parse(strValue);
+ if (actualValue != UInt16.MinValue)
+ {
+ errorDesc = "The parse value of " + strValue + " is not the value " + UInt16.MinValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 expectedValue;
+ UInt16 actualValue;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: random UInt16 value between 0 and UInt16.MaxValue");
+ try
+ {
+ expectedValue = (UInt16)this.GetInt32(0, UInt16.MaxValue);
+ string strValue = expectedValue.ToString();
+ actualValue = UInt16.Parse(strValue);
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The parse value of " + strValue + " is not the value " + expectedValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //ArgumentNullException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: string representation is a null reference";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt16.Parse(null);
+ errorDesc = "ArgumentNullException is not thrown as expected.";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ //FormatException
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: String representation is not in the correct format";
+ string errorDesc;
+
+ string strValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ strValue = "Incorrect";
+ UInt16.Parse(strValue);
+ errorDesc = "FormatException is not thrown as expected.";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ //OverflowException
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: String representation is greater than UInt16.MaxValue";
+ string errorDesc;
+
+ string strValue;
+ int i;
+
+ i = this.GetInt32(UInt16.MaxValue + 1, int.MaxValue);
+ strValue = i.ToString();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt16.Parse(strValue);
+ errorDesc = "OverflowException is not thrown as expected.";
+ errorDesc += "\nThe string representation is " + strValue;
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nThe string representation is " + strValue;
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N004";
+ const string c_TEST_DESC = "NegTest4: String representation is less than UInt16.MaxValue";
+ string errorDesc;
+
+ string strValue;
+ int i;
+
+ i = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+ strValue = i.ToString();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt16.Parse(strValue);
+ errorDesc = "OverflowException is not thrown as expected.";
+ errorDesc += "\nThe string representation is " + strValue;
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += "\nThe string representation is " + strValue;
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16parse2.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16parse2.cs
new file mode 100644
index 0000000000..938ac5654a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16parse2.cs
@@ -0,0 +1,503 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// UInt16.Parse(String, NumberStyles)
+/// </summary>
+public class UInt16Parse
+{
+ public static int Main()
+ {
+ UInt16Parse ui32ct2 = new UInt16Parse();
+ TestLibrary.TestFramework.BeginTestCase("for method: UInt16.Parse(String, NumberStyles)");
+
+ if (ui32ct2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 actualValue;
+ NumberStyles numberStyle;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: UInt16.MaxValue, number style is NumberStyles.Integer.");
+ try
+ {
+ numberStyle = NumberStyles.Integer;
+ string strValue = UInt16.MaxValue.ToString();
+ strValue = " " + strValue + " ";
+ actualValue = UInt16.Parse(strValue, numberStyle);
+ if (actualValue != UInt16.MaxValue)
+ {
+ errorDesc = "The parse value of " + strValue + " with number styles " +
+ numberStyle + " is not the value " + UInt16.MaxValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 actualValue;
+ NumberStyles numberStyle;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: UInt16.MinValue, number style is NumberStyles.None.");
+ try
+ {
+ string strValue = UInt16.MinValue.ToString();
+ numberStyle = NumberStyles.None;
+
+ actualValue = UInt16.Parse(strValue, numberStyle);
+ if (actualValue != UInt16.MinValue)
+ {
+ errorDesc = "The parse value of " + strValue + " with number styles " +
+ numberStyle + " is not the value " + UInt16.MaxValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 expectedValue;
+ UInt16 actualValue;
+ NumberStyles numberStyle;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: random hexadecimal UInt16 value between 0 and UInt16.MaxValue");
+ try
+ {
+ expectedValue = (UInt16)this.GetInt32(0, UInt16.MaxValue);
+ string strValue = expectedValue.ToString("x");
+ numberStyle = NumberStyles.HexNumber;
+ actualValue = UInt16.Parse(strValue, numberStyle);
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The parse value of " + strValue + " with number styles " +
+ numberStyle + " is not the value " + UInt16.MaxValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 expectedValue;
+ UInt16 actualValue;
+ NumberStyles numberStyle;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: random currency UInt16 value between 0 and UInt16.MaxValue");
+ try
+ {
+ expectedValue = (UInt16)this.GetInt32(0, UInt16.MaxValue);
+ string strValue = expectedValue.ToString("c");
+ numberStyle = NumberStyles.Currency;
+ actualValue = UInt16.Parse(strValue, numberStyle);
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The parse value of " + strValue + " with number styles " +
+ numberStyle + " is not the value " + UInt16.MaxValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 expectedValue;
+ UInt16 actualValue;
+ NumberStyles numberStyle;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: random UInt16 value between 0 and UInt16.MaxValue, number styles is NumberStyels.Any");
+ try
+ {
+ expectedValue = (UInt16)this.GetInt32(0, UInt16.MaxValue);
+ string strValue = expectedValue.ToString("f");
+ numberStyle = NumberStyles.Any;
+ actualValue = UInt16.Parse(strValue, numberStyle);
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The parse value of " + strValue + " with number styles " +
+ numberStyle + " is not the value " + UInt16.MaxValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("009", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //ArgumentNullException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: string representation is a null reference";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt16.Parse(null, NumberStyles.Integer);
+ errorDesc = "ArgumentNullException is not thrown as expected.";
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ //FormatException
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: String representation is not in the correct format";
+ string errorDesc;
+
+ string strValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ strValue = "Incorrect";
+ UInt16.Parse(strValue, NumberStyles.Integer);
+ errorDesc = "FormatException is not thrown as expected.";
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: String representation does not match the correct number style";
+ string errorDesc;
+
+ string strValue;
+ strValue = this.GetInt32(0, UInt16.MaxValue).ToString("c");
+ NumberStyles numberStyle = NumberStyles.None;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt16.Parse(strValue, numberStyle);
+
+ errorDesc = "FormatException is not thrown as expected.";
+
+ errorDesc += string.Format("\nString representation is {0}, number styles is {1}",
+ strValue,
+ numberStyle);
+
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nString representation is {0}, number styles is {1}",
+ strValue,
+ numberStyle);
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ //OverflowException
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N004";
+ const string c_TEST_DESC = "NegTest4: String representation is greater than UInt16.MaxValue";
+ string errorDesc;
+
+ string strValue;
+ int i;
+
+ i = this.GetInt32(UInt16.MaxValue + 1, int.MaxValue);
+ strValue = i.ToString();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt16.Parse(strValue, NumberStyles.None);
+ errorDesc = "OverflowException is not thrown as expected.";
+ errorDesc += string.Format("\nString representation is {0}, number styles is {1}",
+ strValue,
+ NumberStyles.None);
+ TestLibrary.TestFramework.LogError("015" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nString representation is {0}, number styles is {1}",
+ strValue,
+ NumberStyles.None);
+ TestLibrary.TestFramework.LogError("016" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N005";
+ const string c_TEST_DESC = "NegTest5: String representation is less than UInt16.MaxValue";
+ string errorDesc;
+
+ string strValue;
+ int i;
+
+ i = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+ strValue = i.ToString();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt16.Parse(strValue, NumberStyles.Integer);
+ errorDesc = "OverflowException is not thrown as expected.";
+ errorDesc += string.Format("\nString representation is {0}, number styles is {1}",
+ strValue,
+ NumberStyles.Integer);
+ TestLibrary.TestFramework.LogError("017" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nString representation is {0}, number styles is {1}",
+ strValue,
+ NumberStyles.Integer);
+ TestLibrary.TestFramework.LogError("018" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ //ArgumentException
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N006";
+ const string c_TEST_DESC = "NegTest6: style is not a NumberStyles value.";
+ string errorDesc;
+
+ string strValue;
+ UInt16 i;
+
+ i = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+ strValue = i.ToString();
+ NumberStyles numberStyle = (NumberStyles)(0x204 + TestLibrary.Generator.GetInt16(-55));
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt16.Parse(strValue, numberStyle);
+
+ errorDesc = "ArgumentException is not thrown as expected.";
+ errorDesc += string.Format("\nString representation is {0}, number styles is {1}",
+ strValue,
+ numberStyle);
+ TestLibrary.TestFramework.LogError("019" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nString representation is {0}, number styles is {1}",
+ strValue,
+ numberStyle);
+ TestLibrary.TestFramework.LogError("020" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N007";
+ const string c_TEST_DESC = "NegTest7: style is not a combination of AllowHexSpecifier and HexNumber values.";
+ string errorDesc;
+
+ string strValue;
+ UInt16 i;
+
+ i = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+ strValue = i.ToString();
+ NumberStyles numberStyle = (NumberStyles)(NumberStyles.AllowHexSpecifier |
+ NumberStyles.AllowCurrencySymbol);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt16.Parse(strValue, numberStyle);
+
+ errorDesc = "ArgumentException is not thrown as expected.";
+ errorDesc += string.Format("\nString representation is {0}, number styles is {1}",
+ strValue,
+ numberStyle);
+ TestLibrary.TestFramework.LogError("021" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nString representation is {0}, number styles is {1}",
+ strValue,
+ numberStyle);
+ TestLibrary.TestFramework.LogError("022" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16parse3.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16parse3.cs
new file mode 100644
index 0000000000..27813a5835
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16parse3.cs
@@ -0,0 +1,548 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// UInt16.Parse(String, NumberStyles, IFormatProvider)
+/// </summary>
+public class UInt16Parse
+{
+ public static int Main()
+ {
+ UInt16Parse ui32ct2 = new UInt16Parse();
+ TestLibrary.TestFramework.BeginTestCase("for method: UInt16.Parse(String, NumberStyles, IFormatProvider)");
+
+ if (ui32ct2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 actualValue;
+ NumberStyles numberStyle;
+ CultureInfo culture;
+ IFormatProvider provider;
+
+ numberStyle = NumberStyles.Integer;
+ string strValue = UInt16.MaxValue.ToString();
+ strValue = " " + strValue + " ";
+ culture = CultureInfo.InvariantCulture;
+ provider = culture.NumberFormat;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: UInt16.MaxValue, number style is NumberStyles.Integer.");
+ try
+ {
+ actualValue = UInt16.Parse(strValue, numberStyle, provider);
+ if (actualValue != UInt16.MaxValue)
+ {
+ errorDesc = "The parse value of " + strValue + " with number styles " +
+ numberStyle + " and format " + culture.NumberFormat +
+ " is not the value " + UInt16.MaxValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc = "\nThe string representation is " + strValue + " with number styles " +
+ numberStyle + " and format " + culture.NumberFormat;
+ TestLibrary.TestFramework.LogError("002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 actualValue;
+ NumberStyles numberStyle;
+ CultureInfo culture;
+ IFormatProvider provider;
+
+ string strValue = UInt16.MinValue.ToString();
+ numberStyle = NumberStyles.None;
+ culture = CultureInfo.InvariantCulture;
+ provider = culture.NumberFormat;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: UInt16.MinValue, number style is NumberStyles.None.");
+ try
+ {
+ actualValue = UInt16.Parse(strValue, numberStyle,provider);
+ if (actualValue != UInt16.MinValue)
+ {
+ errorDesc = "The parse value of " + strValue + " with number styles " +
+ numberStyle + " and format " + culture.NumberFormat +
+ " is not the value " + UInt16.MaxValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("003", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc = "\nThe string representation is " + strValue + " with number styles " +
+ numberStyle + " and format " + culture.NumberFormat;
+ TestLibrary.TestFramework.LogError("004", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 expectedValue;
+ UInt16 actualValue;
+ NumberStyles numberStyle;
+ CultureInfo culture;
+ IFormatProvider provider;
+
+ expectedValue = (UInt16)this.GetInt32(0, UInt16.MaxValue);
+ string strValue = expectedValue.ToString("x");
+ numberStyle = NumberStyles.HexNumber;
+ culture = CultureInfo.InvariantCulture;
+ provider = culture.NumberFormat;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: random hexadecimal UInt16 value between 0 and UInt16.MaxValue");
+ try
+ {
+ actualValue = UInt16.Parse(strValue, numberStyle,provider);
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The parse value of " + strValue + " with number styles " +
+ numberStyle + " and format " + culture.NumberFormat +
+ " is not the value " + UInt16.MaxValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc = "\nThe string representation is " + strValue + " with number styles " +
+ numberStyle + " and format " + culture.NumberFormat;
+ TestLibrary.TestFramework.LogError("006", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 expectedValue;
+ UInt16 actualValue;
+ NumberStyles numberStyle;
+ CultureInfo culture;
+ IFormatProvider provider;
+ string strValue;
+
+ expectedValue = (UInt16)this.GetInt32(0, UInt16.MaxValue);
+ strValue = expectedValue.ToString("c");
+ numberStyle = NumberStyles.Currency;
+ culture = CultureInfo.CurrentCulture;
+ provider = culture.NumberFormat;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: random currency UInt16 value between 0 and UInt16.MaxValue");
+ try
+ {
+ actualValue = UInt16.Parse(strValue, numberStyle,provider);
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The parse value of " + strValue + " with number styles " +
+ numberStyle + " and format " + culture.NumberFormat +
+ " is not the value " + UInt16.MaxValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc = "\nThe string representation is " + strValue + " with number styles " +
+ numberStyle + " and format " + culture.NumberFormat;
+ TestLibrary.TestFramework.LogError("008", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 expectedValue;
+ UInt16 actualValue;
+ NumberStyles numberStyle;
+ CultureInfo culture;
+ IFormatProvider provider;
+
+ expectedValue = (UInt16)this.GetInt32(0, UInt16.MaxValue);
+ string strValue = expectedValue.ToString("f");
+ numberStyle = NumberStyles.Any;
+ culture = CultureInfo.InvariantCulture;
+ provider = culture.NumberFormat;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: random UInt16 value between 0 and UInt16.MaxValue, number styles is NumberStyels.Any");
+ try
+ {
+ actualValue = UInt16.Parse(strValue, numberStyle);
+ if (actualValue != expectedValue)
+ {
+ errorDesc = "The parse value of " + strValue + " with number styles " +
+ numberStyle + " and format " + culture.NumberFormat +
+ " is not the value " + UInt16.MaxValue +
+ " as expected: actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("009", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc = "\nThe string representation is " + strValue + " with number styles " +
+ numberStyle + " and format " + culture.NumberFormat;
+ TestLibrary.TestFramework.LogError("010", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //ArgumentNullException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: string representation is a null reference";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt16.Parse(null, NumberStyles.Integer, null);
+ errorDesc = "ArgumentNullException is not thrown as expected.";
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+
+ }
+ catch (ArgumentNullException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ //FormatException
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: String representation is not in the correct format";
+ string errorDesc;
+
+ string strValue;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ strValue = "Incorrect";
+ UInt16.Parse(strValue, NumberStyles.Integer, null);
+ errorDesc = "FormatException is not thrown as expected.";
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: String representation does not match the correct number style";
+ string errorDesc;
+
+ string strValue;
+ strValue = this.GetInt32(0, UInt16.MaxValue).ToString("c");
+ NumberStyles numberStyle = NumberStyles.None;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt16.Parse(strValue, numberStyle, null);
+
+ errorDesc = "FormatException is not thrown as expected.";
+
+ errorDesc += string.Format("\nString representation is {0}, number styles is {1}",
+ strValue,
+ numberStyle);
+
+ TestLibrary.TestFramework.LogError("013" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nString representation is {0}, number styles is {1}",
+ strValue,
+ numberStyle);
+ TestLibrary.TestFramework.LogError("014" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ //OverflowException
+ public bool NegTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N004";
+ const string c_TEST_DESC = "NegTest4: String representation is greater than UInt16.MaxValue";
+ string errorDesc;
+
+ string strValue;
+ int i;
+
+ i = this.GetInt32(UInt16.MaxValue + 1, int.MaxValue);
+ strValue = i.ToString();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt16.Parse(strValue, NumberStyles.None, null);
+ errorDesc = "OverflowException is not thrown as expected.";
+ errorDesc += string.Format("\nString representation is {0}, number styles is {1}",
+ strValue,
+ NumberStyles.None);
+ TestLibrary.TestFramework.LogError("015" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nString representation is {0}, number styles is {1}",
+ strValue,
+ NumberStyles.None);
+ TestLibrary.TestFramework.LogError("016" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N005";
+ const string c_TEST_DESC = "NegTest5: String representation is less than UInt16.MaxValue";
+ string errorDesc;
+
+ string strValue;
+ int i;
+
+ i = -1 * TestLibrary.Generator.GetInt32(-55) - 1;
+ strValue = i.ToString();
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt16.Parse(strValue, NumberStyles.Integer, null);
+ errorDesc = "OverflowException is not thrown as expected.";
+ errorDesc += string.Format("\nString representation is {0}, number styles is {1}",
+ strValue,
+ NumberStyles.Integer);
+ TestLibrary.TestFramework.LogError("017" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (OverflowException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nString representation is {0}, number styles is {1}",
+ strValue,
+ NumberStyles.Integer);
+ TestLibrary.TestFramework.LogError("018" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ //ArgumentException
+ public bool NegTest6()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N006";
+ const string c_TEST_DESC = "NegTest6: style is not a NumberStyles value.";
+ string errorDesc;
+
+ string strValue;
+ UInt16 i;
+
+ i = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+ strValue = i.ToString();
+ NumberStyles numberStyle = (NumberStyles)(0x204 + TestLibrary.Generator.GetInt16(-55));
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt16.Parse(strValue, numberStyle, null);
+
+ errorDesc = "ArgumentException is not thrown as expected.";
+ errorDesc += string.Format("\nString representation is {0}, number styles is {1}",
+ strValue,
+ numberStyle);
+ TestLibrary.TestFramework.LogError("019" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nString representation is {0}, number styles is {1}",
+ strValue,
+ numberStyle);
+ TestLibrary.TestFramework.LogError("020" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N007";
+ const string c_TEST_DESC = "NegTest7: style is not a combination of AllowHexSpecifier and HexNumber values.";
+ string errorDesc;
+
+ string strValue;
+ UInt16 i;
+
+ i = (UInt16)(TestLibrary.Generator.GetInt32(-55) % (UInt16.MaxValue + 1));
+ strValue = i.ToString();
+ NumberStyles numberStyle = (NumberStyles)(NumberStyles.AllowHexSpecifier |
+ NumberStyles.AllowCurrencySymbol);
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt16.Parse(strValue, numberStyle, null);
+
+ errorDesc = "ArgumentException is not thrown as expected.";
+ errorDesc += string.Format("\nString representation is {0}, number styles is {1}",
+ strValue,
+ numberStyle);
+ TestLibrary.TestFramework.LogError("021" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ catch (ArgumentException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc += string.Format("\nString representation is {0}, number styles is {1}",
+ strValue,
+ numberStyle);
+ TestLibrary.TestFramework.LogError("022" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16tostring3.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16tostring3.cs
new file mode 100644
index 0000000000..80b1778c7a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16tostring3.cs
@@ -0,0 +1,251 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization; //for NumberFormatInfo
+using TestLibrary;
+
+/// <summary>
+/// UInt16.System.IConvertible.ToString(string)
+/// Converts the numeric value of this instance to its equivalent string representation
+/// using the specified format.
+/// </summary>
+public class UInt16ToString
+{
+ public static int Main()
+ {
+ UInt16ToString testObj = new UInt16ToString();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: UInt16.System.ToString(string)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ retVal &= DoPosTest("PosTest1: Value is UInt16.MinValue, format is hexadecimal \"X\".", "PostTest1", UInt16.MinValue, "X", "0");
+ retVal &= DoPosTest("PosTest2: Value is UInt16 integer, format is hexadecimal \"X\".", "PostTest2", 8542, "X", "215E");
+ retVal &= DoPosTest("PosTest3: Value is UInt16.MaxValue, format is hexadecimal \"X\".", "PostTest3", UInt16.MaxValue, "X", "FFFF");
+
+ TestLibrary.Utilities.CurrentCulture = CustomCulture;
+ retVal &= DoPosTest("PosTest4: Value is UInt16.MinValue, format is hexadecimal \"X\".", "PosTest4", UInt16.MinValue, "X", "0");
+
+ retVal &= DoPosTest("PosTest5: Value is UInt16 integer, format is general \"G\".", "PosTest5", 5641, "G", "5641");
+ retVal &= DoPosTest("PosTest6: Value is UInt16.MaxValue, format is general \"G\".", "PosTest6", UInt16.MaxValue, "G", "65535");
+
+ retVal &= DoPosTest("PosTest7: Value is UInt16 integer, format is currency \"C\".", "PosTest7", 8423, "C", "84.23,000USD");
+ retVal &= DoPosTest("PosTest8: Value is UInt16.MaxValue, format is currency \"C\".", "PosTes8", UInt16.MaxValue, "C", "6.55.35,000USD");
+ retVal &= DoPosTest("PosTest9: Value is UInt16.MinValue, format is currency \"C\".", "PosTes9", UInt16.MinValue, "C", "0,000USD");
+
+ retVal &= DoPosTest("PosTest10: Value is UInt16 integer, format is decimal \"D\".", "PosTest10", 2351, "D", "2351");
+ retVal &= DoPosTest("PosTest11: Value is UInt16.MaxValue integer, format is decimal \"D\".", "PosTest11", UInt16.MaxValue, "D", "65535");
+ retVal &= DoPosTest("PosTest12: Value is UInt16.MinValue integer, format is decimal \"D\".", "PosTest12", UInt16.MinValue, "D", "0");
+
+ retVal &= DoPosTest("PosTest13: Value is UInt16 integer, format is decimal \"E\".", "PosTest13", 2351, "E", TestLibrary.Utilities.IsWindows ? "2,351000E++003" : "2,351000E3");
+ retVal &= DoPosTest("PosTest14: Value is UInt16.MaxValue integer, format is decimal \"E\".", "PosTest14", UInt16.MaxValue, "E", TestLibrary.Utilities.IsWindows ? "6,553500E++004" : "6,553500E4");
+ retVal &= DoPosTest("PosTest15: Value is UInt16.MinValue integer, format is decimal \"E\".", "PosTest15", UInt16.MinValue, "E", TestLibrary.Utilities.IsWindows ? "0,000000E++000" : "0,000000E0");
+
+ retVal &= DoPosTest("PosTest16: Value is UInt16 integer, format is decimal \"F\".", "PosTest16", 2341, "F", "2341,000");
+
+ retVal &= DoPosTest("PosTest17: Value is UInt16 integer, format is decimal \"P\".", "PosTest17", 2341, "P", "234,100,0000~");
+
+ retVal &= DoPosTest("PosTest18: Value is UInt16 integer, format is decimal \"N\".", "PosTest18", 2341, "N", "23#41,000");
+
+ retVal &= DoPosTest("PosTest19: Value is UInt16 integer, format is decimal \"N\".", "PosTest19", 2341, null, "2341");
+
+ TestLibrary.Utilities.CurrentCulture = CurrentCulture;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper method for tests
+ public bool DoPosTest(string testDesc, string id, UInt16 uintA, string format, string expectedValue)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ actualValue = uintA.ToString(format);
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The string representation of {0} is not the value {1} as expected: actual({2})",
+ uintA, expectedValue, actualValue);
+ errorDesc += "\nThe format info is \"" + format + "\" specified.";
+ TestLibrary.TestFramework.LogError(id + "_001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe UInt16 integer is " + uintA +
+ ", format info is \"" + format + "\" speicifed.";
+ TestLibrary.TestFramework.LogError(id + "_002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Negative tests
+ //FormatException
+ public bool NegTest1()
+ {
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: The format parameter is invalid -- \"R\". ";
+
+ return this.DoInvalidFormatTest(c_TEST_ID, c_TEST_DESC, "39", "40", "R");
+ }
+
+ public bool NegTest2()
+ {
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: The format parameter is invalid -- \"r\". ";
+
+ return this.DoInvalidFormatTest(c_TEST_ID, c_TEST_DESC, "41", "42", "r");
+ }
+
+ public bool NegTest3()
+ {
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: The format parameter is invalid -- \"z\". ";
+
+ return this.DoInvalidFormatTest(c_TEST_ID, c_TEST_DESC, "43", "44", "z");
+ }
+ #endregion
+
+ #region Private Methods
+ private CultureInfo CurrentCulture = TestLibrary.Utilities.CurrentCulture;
+ private CultureInfo customCulture = null;
+
+ private CultureInfo CustomCulture
+ {
+ get
+ {
+ if (null == customCulture)
+ {
+ customCulture = new CultureInfo(CultureInfo.CurrentCulture.Name);
+ NumberFormatInfo nfi = customCulture.NumberFormat;
+ //For "G"
+ // NegativeSign, NumberDecimalSeparator, NumberDecimalDigits, PositiveSign
+ nfi.NegativeSign = "@"; //Default: "-"
+ nfi.NumberDecimalSeparator = ","; //Default: "."
+ nfi.NumberDecimalDigits = 3; //Default: 2
+ nfi.PositiveSign = "++"; //Default: "+"
+
+ //For "E"
+ // PositiveSign, NegativeSign, and NumberDecimalSeparator.
+ // If precision specifier is omitted, a default of six digits after the decimal point is used.
+
+ //For "R"
+ // NegativeSign, NumberDecimalSeparator and PositiveSign
+
+ //For "X", The result string isn't affected by the formatting information of the current NumberFormatInfo
+
+ //For "C"
+ // CurrencyPositivePattern, CurrencySymbol, CurrencyDecimalDigits, CurrencyDecimalSeparator, CurrencyGroupSeparator, CurrencyGroupSizes, NegativeSign and CurrencyNegativePattern
+ nfi.CurrencyDecimalDigits = 3; //Default: 2
+ nfi.CurrencyDecimalSeparator = ","; //Default: ","
+ nfi.CurrencyGroupSeparator = "."; //Default: "."
+ nfi.CurrencyGroupSizes = new int[] { 2 }; //Default: new int[]{3}
+ nfi.CurrencyNegativePattern = 2; //Default: 0
+ nfi.CurrencyPositivePattern = 1; //Default: 0
+ nfi.CurrencySymbol = "USD"; //Default: "$"
+
+ //For "D"
+ // NegativeSign
+
+ //For "E"
+ // PositiveSign, NumberDecimalSeparator and NegativeSign.
+ // If precision specifier is omitted, a default of six digits after the decimal point is used.
+ nfi.PositiveSign = "++"; //Default: "+"
+ nfi.NumberDecimalSeparator = ","; //Default: "."
+
+ //For "F"
+ // NumberDecimalDigits, and NumberDecimalSeparator and NegativeSign.
+ nfi.NumberDecimalDigits = 3; //Default: 2
+
+ //For "N"
+ // NumberGroupSizes, NumberGroupSeparator, NumberDecimalSeparator, NumberDecimalDigits, NumberNegativePattern and NegativeSign.
+ nfi.NumberGroupSizes = new int[] { 2 }; //Default: 3
+ nfi.NumberGroupSeparator = "#"; //Default: ","
+
+ //For "P"
+ // PercentPositivePattern, PercentNegativePattern, NegativeSign, PercentSymbol, PercentDecimalDigits, PercentDecimalSeparator, PercentGroupSeparator and PercentGroupSizes
+ nfi.PercentPositivePattern = 1; //Default: 0
+ nfi.PercentNegativePattern = 2; //Default: 0
+ nfi.PercentSymbol = "~"; //Default: "%"
+ nfi.PercentDecimalDigits = 4; //Default: 2
+ nfi.PercentDecimalSeparator = ","; //Default: "."
+ nfi.PercentGroupSizes[0] = 2; //Default: 3
+ nfi.PercentGroupSeparator = ",";
+
+ customCulture.NumberFormat = nfi;
+ }
+ return customCulture;
+ }
+ }
+ #endregion
+
+ #region Helper methods for negative tests
+ public bool DoInvalidFormatTest(string testId,
+ string testDesc,
+ string errorNum1,
+ string errorNum2,
+ string format)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ UInt16 uintA = (UInt16)(TestLibrary.Generator.GetInt32() % (UInt16.MaxValue + 1));
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ uintA.ToString(format);
+ errorDesc = "FormatException is not thrown as expected.";
+ errorDesc = string.Format("\nUInt16 value is {0}, format is {1}.", uintA, format);
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc = string.Format("\nUInt16 value is {0}, format is {1}.", uintA, format);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16tostring4.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16tostring4.cs
new file mode 100644
index 0000000000..964a0be1fd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16tostring4.cs
@@ -0,0 +1,251 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization; //for NumberFormatInfo
+using TestLibrary;
+
+/// <summary>
+/// UInt16.System.IConvertible.ToString(string, IFormatProvider)
+/// Converts the numeric value of this instance to its equivalent string representation
+/// using the specified format and culture-specific format information.
+/// </summary>
+public class UInt16ToString
+{
+ public static int Main()
+ {
+ UInt16ToString testObj = new UInt16ToString();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: UInt16.System.ToString(string, IFormatProvider)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+
+ retVal &= DoPosTest("PosTest1: Value is UInt16.MinValue, format is hexadecimal \"X\".", "PostTest1", UInt16.MinValue, "X", "0", CurrentNFI);
+ retVal &= DoPosTest("PosTest2: Value is UInt16 integer, format is hexadecimal \"X\".", "PostTest2", 8542, "X", "215E", CurrentNFI);
+ retVal &= DoPosTest("PosTest3: Value is UInt16.MaxValue, format is hexadecimal \"X\".", "PostTest3", UInt16.MaxValue, "X", "FFFF", CurrentNFI);
+ retVal &= DoPosTest("PosTest4: Value is UInt16.MinValue, format is hexadecimal \"X\".", "PosTest4", UInt16.MinValue, "X", "0", CustomNFI);
+
+ retVal &= DoPosTest("PosTest5: Value is UInt16 integer, format is general \"G\".", "PosTest5", 5641, "G", "5641", CustomNFI);
+ retVal &= DoPosTest("PosTest6: Value is UInt16.MaxValue, format is general \"G\".", "PosTest6", UInt16.MaxValue, "G", "65535", CustomNFI);
+
+ retVal &= DoPosTest("PosTest7: Value is UInt16 integer, format is currency \"C\".", "PosTest7", 8423, "C", "84.23,000USD", CustomNFI);
+ retVal &= DoPosTest("PosTest8: Value is UInt16.MaxValue, format is currency \"C\".", "PosTes8", UInt16.MaxValue, "C", "6.55.35,000USD", CustomNFI);
+ retVal &= DoPosTest("PosTest9: Value is UInt16.MinValue, format is currency \"C\".", "PosTes9", UInt16.MinValue, "C", "0,000USD", CustomNFI);
+
+ retVal &= DoPosTest("PosTest10: Value is UInt16 integer, format is decimal \"D\".", "PosTest10", 2351, "D", "2351", CustomNFI);
+ retVal &= DoPosTest("PosTest11: Value is UInt16.MaxValue integer, format is decimal \"D\".", "PosTest11", UInt16.MaxValue, "D", "65535", CustomNFI);
+ retVal &= DoPosTest("PosTest12: Value is UInt16.MinValue integer, format is decimal \"D\".", "PosTest12", UInt16.MinValue, "D", "0", CustomNFI);
+
+ retVal &= DoPosTest("PosTest13: Value is UInt16 integer, format is decimal \"E\".", "PosTest13", 2351, "E", TestLibrary.Utilities.IsWindows ? "2,351000E++003" : "2,351000E3", CustomNFI);
+ retVal &= DoPosTest("PosTest14: Value is UInt16.MaxValue integer, format is decimal \"E\".", "PosTest14", UInt16.MaxValue, "E", TestLibrary.Utilities.IsWindows ? "6,553500E++004" : "6,553500E4", CustomNFI);
+ retVal &= DoPosTest("PosTest15: Value is UInt16.MinValue integer, format is decimal \"E\".", "PosTest15", UInt16.MinValue, "E", TestLibrary.Utilities.IsWindows ? "0,000000E++000" : "0,000000E0", CustomNFI);
+
+ retVal &= DoPosTest("PosTest16: Value is UInt16 integer, format is decimal \"F\".", "PosTest16", 2341, "F", "2341,000", CustomNFI);
+
+ retVal &= DoPosTest("PosTest17: Value is UInt16 integer, format is decimal \"P\".", "PosTest17", 2341, "P", "234,100,0000~", CustomNFI);
+
+ retVal &= DoPosTest("PosTest18: Value is UInt16 integer, format is decimal \"N\".", "PosTest18", 2341, "N", "23#41,000", CustomNFI);
+
+ retVal &= DoPosTest("PosTest19: Value is UInt16 integer, format is decimal \"N\".", "PosTest19", 2341, null, "2341", CustomNFI);
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper method for tests
+ public bool DoPosTest(string testDesc, string id, UInt16 uintA, string format, String expectedValue, NumberFormatInfo _NFI)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ string actualValue;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ actualValue = uintA.ToString(format, _NFI);
+
+ if (actualValue != expectedValue)
+ {
+ errorDesc =
+ string.Format("The string representation of {0} is not the value {1} as expected: actual({2})",
+ uintA, expectedValue, actualValue);
+ errorDesc += "\nThe format info is \"" + ((format == null) ? "null" : format) + "\" speicifed";
+ TestLibrary.TestFramework.LogError(id + "_001", errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpect exception:" + e;
+ errorDesc += "\nThe UInt16 integer is " + uintA + ", format info is \"" + format + "\" speicifed.";
+ TestLibrary.TestFramework.LogError(id + "_002", errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+
+ #region Private Methods
+ private NumberFormatInfo CurrentNFI = CultureInfo.CurrentCulture.NumberFormat;
+ private NumberFormatInfo nfi = null;
+
+ private NumberFormatInfo CustomNFI
+ {
+ get
+ {
+ if (null == nfi)
+ {
+ nfi = new CultureInfo(CultureInfo.CurrentCulture.Name).NumberFormat;
+ //For "G"
+ // NegativeSign, NumberDecimalSeparator, NumberDecimalDigits, PositiveSign
+ nfi.NegativeSign = "@"; //Default: "-"
+ nfi.NumberDecimalSeparator = ","; //Default: "."
+ nfi.NumberDecimalDigits = 3; //Default: 2
+ nfi.PositiveSign = "++"; //Default: "+"
+
+ //For "E"
+ // PositiveSign, NegativeSign, and NumberDecimalSeparator.
+ // If precision specifier is omitted, a default of six digits after the decimal point is used.
+
+ //For "R"
+ // NegativeSign, NumberDecimalSeparator and PositiveSign
+
+ //For "X", The result string isn't affected by the formatting information of the current NumberFormatInfo
+
+ //For "C"
+ // CurrencyPositivePattern, CurrencySymbol, CurrencyDecimalDigits, CurrencyDecimalSeparator, CurrencyGroupSeparator, CurrencyGroupSizes, NegativeSign and CurrencyNegativePattern
+ nfi.CurrencyDecimalDigits = 3; //Default: 2
+ nfi.CurrencyDecimalSeparator = ","; //Default: ","
+ nfi.CurrencyGroupSeparator = "."; //Default: "."
+ nfi.CurrencyGroupSizes = new int[] { 2 }; //Default: new int[]{3}
+ nfi.CurrencyNegativePattern = 2; //Default: 0
+ nfi.CurrencyPositivePattern = 1; //Default: 0
+ nfi.CurrencySymbol = "USD"; //Default: "$"
+
+ //For "D"
+ // NegativeSign
+
+ //For "E"
+ // PositiveSign, NumberDecimalSeparator and NegativeSign.
+ // If precision specifier is omitted, a default of six digits after the decimal point is used.
+ nfi.PositiveSign = "++"; //Default: "+"
+ nfi.NumberDecimalSeparator = ","; //Default: "."
+
+ //For "F"
+ // NumberDecimalDigits, and NumberDecimalSeparator and NegativeSign.
+ nfi.NumberDecimalDigits = 3; //Default: 2
+
+ //For "N"
+ // NumberGroupSizes, NumberGroupSeparator, NumberDecimalSeparator, NumberDecimalDigits, NumberNegativePattern and NegativeSign.
+ nfi.NumberGroupSizes = new int[] { 2 }; //Default: 3
+ nfi.NumberGroupSeparator = "#"; //Default: ","
+
+ //For "P"
+ // PercentPositivePattern, PercentNegativePattern, NegativeSign, PercentSymbol, PercentDecimalDigits, PercentDecimalSeparator, PercentGroupSeparator and PercentGroupSizes
+ nfi.PercentPositivePattern = 1; //Default: 0
+ nfi.PercentNegativePattern = 2; //Default: 0
+ nfi.PercentSymbol = "~"; //Default: "%"
+ nfi.PercentDecimalDigits = 4; //Default: 2
+ nfi.PercentDecimalSeparator = ","; //Default: "."
+ nfi.PercentGroupSizes[0] = 2; //Default: 3
+ nfi.PercentGroupSeparator = ",";
+ }
+ return nfi;
+ }
+ }
+ #endregion
+
+ #region Negative tests
+ //FormatException
+ public bool NegTest1()
+ {
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: The format parameter is invalid -- \"R\". ";
+ CultureInfo culture = CultureInfo.CurrentCulture;
+
+ return this.DoInvalidFormatTest(c_TEST_ID, c_TEST_DESC, "39", "40", "R", culture);
+ }
+
+ public bool NegTest2()
+ {
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: The format parameter is invalid -- \"r\". ";
+ CultureInfo culture = CultureInfo.CurrentCulture;
+
+ return this.DoInvalidFormatTest(c_TEST_ID, c_TEST_DESC, "41", "42", "r", culture);
+ }
+
+ public bool NegTest3()
+ {
+ const string c_TEST_ID = "N003";
+ const string c_TEST_DESC = "NegTest3: The format parameter is invalid -- \"z\". ";
+ CultureInfo culture = CultureInfo.CurrentCulture;
+
+ return this.DoInvalidFormatTest(c_TEST_ID, c_TEST_DESC, "43", "44", "z", culture);
+ }
+ #endregion
+
+ #region Helper methods for negative tests
+ public bool DoInvalidFormatTest(string testId,
+ string testDesc,
+ string errorNum1,
+ string errorNum2,
+ string format,
+ CultureInfo culture)
+ {
+ bool retVal = true;
+ string errorDesc;
+
+ IFormatProvider provider;
+ UInt16 uintA = (UInt16)(TestLibrary.Generator.GetInt32() % (UInt16.MaxValue + 1));
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ provider = (IFormatProvider)culture.NumberFormat;
+ uintA.ToString(format, provider);
+ errorDesc = "FormatException is not thrown as expected.";
+ errorDesc = string.Format("\nUInt16 value is {0}, format string is {1} and the culture is {3}.",
+ uintA, format, culture.Name);
+ TestLibrary.TestFramework.LogError(errorNum1 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ catch (FormatException)
+ { }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ errorDesc = string.Format("\nUInt16 value is {0}, format string is {1} and the culture is {3}.",
+ uintA, format, culture.Name);
+ TestLibrary.TestFramework.LogError(errorNum2 + " TestId-" + testId, errorDesc);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uint16/uint16tryparse.cs b/tests/src/CoreMangLib/cti/system/uint16/uint16tryparse.cs
new file mode 100644
index 0000000000..fa879fea2c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint16/uint16tryparse.cs
@@ -0,0 +1,554 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+// CoreCLR Port from Co7526TryParse_all.cs
+// Tests UInt16.TryParse(String), UInt16.TryParse(String, NumberStyles, IFormatProvider, ref UInt16)
+// 2003/04/01 KatyK
+// 2007/06/28 adapted by MarielY
+
+public class Co7526TryParse
+{
+ static bool verbose = false;
+
+ public static int Main()
+ {
+ bool passed = true;
+
+ try
+ {
+ // Make the test culture independent
+ TestLibrary.Utilities.CurrentCulture = CultureInfo.InvariantCulture;
+
+ // Set up NFIs to use
+ NumberFormatInfo goodNFI = new NumberFormatInfo();
+
+ NumberFormatInfo corruptNFI = new NumberFormatInfo(); // DecimalSeparator == GroupSeparator
+ corruptNFI.NumberDecimalSeparator = ".";
+ corruptNFI.NumberGroupSeparator = ".";
+ corruptNFI.CurrencyDecimalSeparator = ".";
+ corruptNFI.CurrencyGroupSeparator = ".";
+ corruptNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo swappedNFI = new NumberFormatInfo(); // DecimalSeparator & GroupSeparator swapped
+ swappedNFI.NumberDecimalSeparator = ".";
+ swappedNFI.NumberGroupSeparator = ",";
+ swappedNFI.CurrencyDecimalSeparator = ",";
+ swappedNFI.CurrencyGroupSeparator = ".";
+ swappedNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo distinctNFI = new NumberFormatInfo(); // DecimalSeparator & GroupSeparator distinct
+ distinctNFI.NumberDecimalSeparator = ".";
+ distinctNFI.NumberGroupSeparator = ",";
+ distinctNFI.CurrencyDecimalSeparator = ":";
+ distinctNFI.CurrencyGroupSeparator = ";";
+ distinctNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo customNFI = new NumberFormatInfo();
+ customNFI.NegativeSign = "^";
+
+ NumberFormatInfo ambigNFI = new NumberFormatInfo();
+ ambigNFI.NegativeSign = "^";
+ ambigNFI.CurrencySymbol = "^";
+
+ CultureInfo germanCulture = new CultureInfo("de-DE");
+ CultureInfo japaneseCulture;
+
+ try
+ {
+ japaneseCulture = new CultureInfo("ja-JP");
+ }
+ catch (Exception)
+ {
+ TestLibrary.Logging.WriteLine("East Asian Languages are not installed. Skiping Japanese culture tests.");
+ japaneseCulture = null;
+ }
+
+ // Parse tests included for comparison/regression
+ passed &= VerifyUInt16Parse("5", 5);
+ passed &= VerifyUInt16Parse("5 ", 5);
+ passed &= VerifyUInt16Parse("5\0", 5);
+ passed &= VerifyUInt16Parse("10000", 10000);
+ passed &= VerifyUInt16Parse("50000", 50000);
+ passed &= VerifyUInt16Parse("5", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyUInt16Parse("5 \0", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyUInt16Parse("5\0\0\0", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyUInt16Parse("12", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0x12);
+ passed &= VerifyUInt16Parse("fF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFF);
+ passed &= VerifyUInt16Parse("fFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFFFF);
+ passed &= VerifyUInt16Parse("5", NumberStyles.Integer, goodNFI, 5);
+ passed &= VerifyUInt16Parse("5.0", NumberStyles.AllowDecimalPoint, goodNFI, 5);
+ passed &= VerifyUInt16Parse("123", NumberStyles.Integer, germanCulture, 123);
+ passed &= VerifyUInt16Parse("123", NumberStyles.Integer, japaneseCulture, 123);
+ passed &= VerifyUInt16Parse("123,000", NumberStyles.AllowDecimalPoint, germanCulture, 123);
+ passed &= VerifyUInt16Parse("123.000", NumberStyles.AllowDecimalPoint, japaneseCulture, 123);
+ passed &= VerifyUInt16Parse("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 5); // currency
+ //
+ passed &= VerifyUInt16Parse("5", NumberStyles.Integer, corruptNFI, 5);
+ passed &= VerifyUInt16Parse("5", NumberStyles.Number, corruptNFI, 5);
+ passed &= VerifyUInt16Parse("5.0", NumberStyles.Number, corruptNFI, 5);
+ passed &= VerifyUInt16ParseException("5,0", NumberStyles.Number, corruptNFI, typeof(FormatException));
+ passed &= VerifyUInt16ParseException("5.0.0", NumberStyles.Number, corruptNFI, typeof(FormatException));
+ passed &= VerifyUInt16Parse("$5.0", NumberStyles.Currency, corruptNFI, 5);
+ passed &= VerifyUInt16ParseException("$5,0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyUInt16ParseException("$5.0.0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyUInt16Parse("5.0", NumberStyles.Currency, corruptNFI, 5);
+ passed &= VerifyUInt16ParseException("5,0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyUInt16ParseException("5.0.0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyUInt16Parse("5.0", NumberStyles.Any, corruptNFI, 5);
+ passed &= VerifyUInt16ParseException("5,0", NumberStyles.Any, corruptNFI, typeof(FormatException));
+ passed &= VerifyUInt16ParseException("5.0.0", NumberStyles.Any, corruptNFI, typeof(FormatException));
+ //
+ passed &= VerifyUInt16Parse("5", NumberStyles.Integer, swappedNFI, 5);
+ passed &= VerifyUInt16ParseException("1,234", NumberStyles.Integer, swappedNFI, typeof(FormatException));
+ passed &= VerifyUInt16Parse("5", NumberStyles.Number, swappedNFI, 5);
+ passed &= VerifyUInt16Parse("5.0", NumberStyles.Number, swappedNFI, 5);
+ passed &= VerifyUInt16Parse("1,234", NumberStyles.Number, swappedNFI, 1234);
+ passed &= VerifyUInt16Parse("1,234.0", NumberStyles.Number, swappedNFI, 1234);
+ passed &= VerifyUInt16ParseException("5.000.000", NumberStyles.Number, swappedNFI, typeof(FormatException));
+ passed &= VerifyUInt16ParseException("5.000,00", NumberStyles.Number, swappedNFI, typeof(FormatException));
+ passed &= VerifyUInt16Parse("5.000", NumberStyles.Currency, swappedNFI, 5); //???
+ passed &= VerifyUInt16ParseException("5.000,00", NumberStyles.Currency, swappedNFI, typeof(FormatException)); //???
+ passed &= VerifyUInt16Parse("$5.000", NumberStyles.Currency, swappedNFI, 5000);
+ passed &= VerifyUInt16Parse("$5.000,00", NumberStyles.Currency, swappedNFI, 5000);
+ passed &= VerifyUInt16Parse("5.000", NumberStyles.Any, swappedNFI, 5); //?
+ passed &= VerifyUInt16ParseException("5.000,00", NumberStyles.Any, swappedNFI, typeof(FormatException)); //?
+ passed &= VerifyUInt16Parse("$5.000", NumberStyles.Any, swappedNFI, 5000);
+ passed &= VerifyUInt16Parse("$5.000,00", NumberStyles.Any, swappedNFI, 5000);
+ passed &= VerifyUInt16Parse("5,0", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyUInt16Parse("$5,0", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyUInt16Parse("5,000", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyUInt16Parse("$5,000", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyUInt16ParseException("5,000.0", NumberStyles.Currency, swappedNFI, typeof(FormatException));
+ passed &= VerifyUInt16ParseException("$5,000.0", NumberStyles.Currency, swappedNFI, typeof(FormatException));
+ passed &= VerifyUInt16Parse("5,000", NumberStyles.Any, swappedNFI, 5);
+ passed &= VerifyUInt16Parse("$5,000", NumberStyles.Any, swappedNFI, 5);
+ passed &= VerifyUInt16ParseException("5,000.0", NumberStyles.Any, swappedNFI, typeof(FormatException));
+ passed &= VerifyUInt16ParseException("$5,000.0", NumberStyles.Any, swappedNFI, typeof(FormatException));
+ //
+ passed &= VerifyUInt16Parse("5.0", NumberStyles.Number, distinctNFI, 5);
+ passed &= VerifyUInt16Parse("1,234.0", NumberStyles.Number, distinctNFI, 1234);
+ passed &= VerifyUInt16Parse("5.0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyUInt16Parse("1,234.0", NumberStyles.Currency, distinctNFI, 1234);
+ passed &= VerifyUInt16Parse("5.0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyUInt16Parse("1,234.0", NumberStyles.Any, distinctNFI, 1234);
+ passed &= VerifyUInt16ParseException("$5.0", NumberStyles.Currency, distinctNFI, typeof(FormatException));
+ passed &= VerifyUInt16ParseException("$5.0", NumberStyles.Any, distinctNFI, typeof(FormatException));
+ passed &= VerifyUInt16ParseException("5:0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyUInt16ParseException("5;0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyUInt16ParseException("$5:0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyUInt16Parse("5:0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyUInt16Parse("5:000", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyUInt16Parse("5;000", NumberStyles.Currency, distinctNFI, 5000);
+ passed &= VerifyUInt16Parse("$5:0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyUInt16Parse("$5;0", NumberStyles.Currency, distinctNFI, 50);
+ passed &= VerifyUInt16Parse("5:0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyUInt16Parse("5;0", NumberStyles.Any, distinctNFI, 50);
+ passed &= VerifyUInt16Parse("$5:0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyUInt16Parse("$5;0", NumberStyles.Any, distinctNFI, 50);
+ passed &= VerifyUInt16ParseException("1,23;45.0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyUInt16Parse("1,23;45.0", NumberStyles.Currency, distinctNFI, 12345);
+ passed &= VerifyUInt16Parse("1,23;45.0", NumberStyles.Any, distinctNFI, 12345);
+ passed &= VerifyUInt16ParseException("$1,23;45.0", NumberStyles.Any, distinctNFI, typeof(FormatException));
+ //
+ passed &= VerifyUInt16ParseException("-5", typeof(OverflowException));
+ passed &= VerifyUInt16ParseException("100000", typeof(OverflowException));
+ passed &= VerifyUInt16ParseException("Garbage", typeof(FormatException));
+ passed &= VerifyUInt16ParseException("5\0Garbage", typeof(FormatException));
+ passed &= VerifyUInt16ParseException(null, typeof(ArgumentNullException));
+ passed &= VerifyUInt16ParseException("1FFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, typeof(OverflowException));
+ passed &= VerifyUInt16ParseException("FFFFFFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, typeof(OverflowException));
+ passed &= VerifyUInt16ParseException("5", NumberStyles.AllowHexSpecifier | NumberStyles.AllowParentheses, null, typeof(ArgumentException));
+ passed &= VerifyUInt16ParseException("4", (NumberStyles)(-1), typeof(ArgumentException));
+ passed &= VerifyUInt16ParseException("4", (NumberStyles)0x10000, typeof(ArgumentException));
+ passed &= VerifyUInt16ParseException("4", (NumberStyles)(-1), CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyUInt16ParseException("4", (NumberStyles)0x10000, CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyUInt16ParseException("123.000", NumberStyles.Any, germanCulture, typeof(OverflowException));
+ passed &= VerifyUInt16ParseException("123,000", NumberStyles.Any, japaneseCulture, typeof(OverflowException));
+ passed &= VerifyUInt16ParseException("123,000", NumberStyles.Integer, germanCulture, typeof(FormatException));
+ passed &= VerifyUInt16ParseException("123.000", NumberStyles.Integer, japaneseCulture, typeof(FormatException));
+ passed &= VerifyUInt16ParseException("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Integer, germanCulture, typeof(FormatException)); // currency
+
+
+ /////////// TryParse(String)
+ //// Pass cases
+ passed &= VerifyUInt16TryParse("5", 5, true);
+ passed &= VerifyUInt16TryParse(" 5 ", 5, true);
+ passed &= VerifyUInt16TryParse("5\0", 5, true);
+ passed &= VerifyUInt16TryParse("5 \0", 5, true);
+ passed &= VerifyUInt16TryParse("5\0\0\0", 5, true);
+ passed &= VerifyUInt16TryParse("10000", 10000, true);
+ passed &= VerifyUInt16TryParse("50000", 50000, true);
+ passed &= VerifyUInt16TryParse(UInt16.MaxValue.ToString(), UInt16.MaxValue, true);
+ passed &= VerifyUInt16TryParse(UInt16.MinValue.ToString(), UInt16.MinValue, true);
+
+ //// Fail cases
+ passed &= VerifyUInt16TryParse(null, 0, false);
+ passed &= VerifyUInt16TryParse("", 0, false);
+ passed &= VerifyUInt16TryParse("Garbage", 0, false);
+ passed &= VerifyUInt16TryParse("5\0Garbage", 0, false);
+ passed &= VerifyUInt16TryParse("-5", 0, false);
+ passed &= VerifyUInt16TryParse("100000", 0, false);
+ passed &= VerifyUInt16TryParse("-100000", 0, false);
+ passed &= VerifyUInt16TryParse("FF", 0, false);
+ passed &= VerifyUInt16TryParse("27.3", 0, false);
+ passed &= VerifyUInt16TryParse("23 5", 0, false);
+
+
+ /////////// TryParse(TryParse(String, NumberStyles, IFormatProvider, ref UInt16)
+ //// Pass cases
+ passed &= VerifyUInt16TryParse("5", NumberStyles.Integer, CultureInfo.InvariantCulture, 5, true);
+ // Variations on NumberStyles
+ passed &= VerifyUInt16TryParse("12", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0x12, true);
+ passed &= VerifyUInt16TryParse("FF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFF, true);
+ passed &= VerifyUInt16TryParse("fF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFF, true);
+ passed &= VerifyUInt16TryParse("fFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFFFF, true);
+ passed &= VerifyUInt16TryParse(" 5", NumberStyles.AllowLeadingWhite, goodNFI, 5, true);
+ passed &= VerifyUInt16TryParse("5", NumberStyles.Number, goodNFI, 5, true);
+ passed &= VerifyUInt16TryParse("5.0", NumberStyles.AllowDecimalPoint, goodNFI, 5, true);
+ // Variations on IFP
+ passed &= VerifyUInt16TryParse("5", NumberStyles.Integer, goodNFI, 5, true);
+ passed &= VerifyUInt16TryParse("5", NumberStyles.Integer, null, 5, true);
+ passed &= VerifyUInt16TryParse("5", NumberStyles.Integer, new DateTimeFormatInfo(), 5, true);
+ passed &= VerifyUInt16TryParse("123", NumberStyles.Integer, germanCulture, 123, true);
+ passed &= VerifyUInt16TryParse("123", NumberStyles.Integer, japaneseCulture, 123, true);
+ passed &= VerifyUInt16TryParse("123,000", NumberStyles.AllowDecimalPoint, germanCulture, 123, true);
+ passed &= VerifyUInt16TryParse("123.000", NumberStyles.AllowDecimalPoint, japaneseCulture, 123, true);
+ passed &= VerifyUInt16TryParse("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 5, true); // currency
+
+ //// Fail cases
+ passed &= VerifyUInt16TryParse("-5", NumberStyles.Integer, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifyUInt16TryParse("FF", NumberStyles.Integer, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifyUInt16TryParse("1FFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifyUInt16TryParse("FFFFFFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifyUInt16TryParse("^42", NumberStyles.Any, customNFI, 0, false);
+ passed &= VerifyUInt16TryParse("-42", NumberStyles.Any, customNFI, 0, false);
+ passed &= VerifyUInt16TryParse("5.3", NumberStyles.AllowDecimalPoint, goodNFI, 0, false);
+ passed &= VerifyUInt16TryParse("5 ", NumberStyles.AllowLeadingWhite, goodNFI, 0, false);
+ passed &= VerifyUInt16TryParse("123.000", NumberStyles.Any, germanCulture, 0, false);
+ passed &= VerifyUInt16TryParse("123,000", NumberStyles.Any, japaneseCulture, 0, false);
+ passed &= VerifyUInt16TryParse("123,000", NumberStyles.Integer, germanCulture, 0, false);
+ passed &= VerifyUInt16TryParse("123.000", NumberStyles.Integer, japaneseCulture, 0, false);
+ passed &= VerifyUInt16TryParse("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Integer, germanCulture, 0, false); // currency
+
+ //// Exception cases
+ passed &= VerifyUInt16TryParseException("5", NumberStyles.AllowHexSpecifier | NumberStyles.AllowParentheses, null, typeof(ArgumentException));
+ passed &= VerifyUInt16TryParseException("4", (NumberStyles)(-1), CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyUInt16TryParseException("4", (NumberStyles)0x10000, CultureInfo.InvariantCulture, typeof(ArgumentException));
+
+ // NumberStyles/NFI variations
+ //
+ passed &= VerifyUInt16TryParse("5", NumberStyles.Integer, corruptNFI, 5, true);
+ passed &= VerifyUInt16TryParse("5", NumberStyles.Number, corruptNFI, 5, true);
+ passed &= VerifyUInt16TryParse("5.0", NumberStyles.Number, corruptNFI, 5, true);
+ passed &= VerifyUInt16TryParse("5,0", NumberStyles.Number, corruptNFI, 0, false);
+ passed &= VerifyUInt16TryParse("5.0.0", NumberStyles.Number, corruptNFI, 0, false);
+ passed &= VerifyUInt16TryParse("$5.0", NumberStyles.Currency, corruptNFI, 5, true);
+ passed &= VerifyUInt16TryParse("$5,0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyUInt16TryParse("$5.0.0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyUInt16TryParse("5.0", NumberStyles.Currency, corruptNFI, 5, true);
+ passed &= VerifyUInt16TryParse("5,0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyUInt16TryParse("5.0.0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyUInt16TryParse("5.0", NumberStyles.Any, corruptNFI, 5, true);
+ passed &= VerifyUInt16TryParse("5,0", NumberStyles.Any, corruptNFI, 0, false);
+ passed &= VerifyUInt16TryParse("5.0.0", NumberStyles.Any, corruptNFI, 0, false);
+ //
+ passed &= VerifyUInt16TryParse("5", NumberStyles.Integer, swappedNFI, 5, true);
+ passed &= VerifyUInt16TryParse("1,234", NumberStyles.Integer, swappedNFI, 0, false);
+ passed &= VerifyUInt16TryParse("5", NumberStyles.Number, swappedNFI, 5, true);
+ passed &= VerifyUInt16TryParse("5.0", NumberStyles.Number, swappedNFI, 5, true);
+ passed &= VerifyUInt16TryParse("1,234", NumberStyles.Number, swappedNFI, 1234, true);
+ passed &= VerifyUInt16TryParse("1,234.0", NumberStyles.Number, swappedNFI, 1234, true);
+ passed &= VerifyUInt16TryParse("5.000.000", NumberStyles.Number, swappedNFI, 0, false);
+ passed &= VerifyUInt16TryParse("5.000,00", NumberStyles.Number, swappedNFI, 0, false);
+ passed &= VerifyUInt16TryParse("5.000", NumberStyles.Currency, swappedNFI, 5, true); //???
+ passed &= VerifyUInt16TryParse("5.000,00", NumberStyles.Currency, swappedNFI, 0, false); //???
+ passed &= VerifyUInt16TryParse("$5.000", NumberStyles.Currency, swappedNFI, 5000, true);
+ passed &= VerifyUInt16TryParse("$5.000,00", NumberStyles.Currency, swappedNFI, 5000, true);
+ passed &= VerifyUInt16TryParse("5.000", NumberStyles.Any, swappedNFI, 5, true); //?
+ passed &= VerifyUInt16TryParse("5.000,00", NumberStyles.Any, swappedNFI, 0, false); //?
+ passed &= VerifyUInt16TryParse("$5.000", NumberStyles.Any, swappedNFI, 5000, true);
+ passed &= VerifyUInt16TryParse("$5.000,00", NumberStyles.Any, swappedNFI, 5000, true);
+ passed &= VerifyUInt16TryParse("5,0", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyUInt16TryParse("$5,0", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyUInt16TryParse("5,000", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyUInt16TryParse("$5,000", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyUInt16TryParse("5,000.0", NumberStyles.Currency, swappedNFI, 0, false);
+ passed &= VerifyUInt16TryParse("$5,000.0", NumberStyles.Currency, swappedNFI, 0, false);
+ passed &= VerifyUInt16TryParse("5,000", NumberStyles.Any, swappedNFI, 5, true);
+ passed &= VerifyUInt16TryParse("$5,000", NumberStyles.Any, swappedNFI, 5, true);
+ passed &= VerifyUInt16TryParse("5,000.0", NumberStyles.Any, swappedNFI, 0, false);
+ passed &= VerifyUInt16TryParse("$5,000.0", NumberStyles.Any, swappedNFI, 0, false);
+ //
+ passed &= VerifyUInt16TryParse("5.0", NumberStyles.Number, distinctNFI, 5, true);
+ passed &= VerifyUInt16TryParse("1,234.0", NumberStyles.Number, distinctNFI, 1234, true);
+ passed &= VerifyUInt16TryParse("5.0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyUInt16TryParse("1,234.0", NumberStyles.Currency, distinctNFI, 1234, true);
+ passed &= VerifyUInt16TryParse("5.0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyUInt16TryParse("1,234.0", NumberStyles.Any, distinctNFI, 1234, true);
+ passed &= VerifyUInt16TryParse("$5.0", NumberStyles.Currency, distinctNFI, 0, false);
+ passed &= VerifyUInt16TryParse("$5.0", NumberStyles.Any, distinctNFI, 0, false);
+ passed &= VerifyUInt16TryParse("5:0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyUInt16TryParse("5;0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyUInt16TryParse("$5:0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyUInt16TryParse("5:0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyUInt16TryParse("5:000", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyUInt16TryParse("5;000", NumberStyles.Currency, distinctNFI, 5000, true);
+ passed &= VerifyUInt16TryParse("$5:0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyUInt16TryParse("$5;0", NumberStyles.Currency, distinctNFI, 50, true);
+ passed &= VerifyUInt16TryParse("5:0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyUInt16TryParse("5;0", NumberStyles.Any, distinctNFI, 50, true);
+ passed &= VerifyUInt16TryParse("$5:0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyUInt16TryParse("$5;0", NumberStyles.Any, distinctNFI, 50, true);
+ passed &= VerifyUInt16TryParse("1,23;45.0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyUInt16TryParse("1,23;45.0", NumberStyles.Currency, distinctNFI, 12345, true);
+ passed &= VerifyUInt16TryParse("1,23;45.0", NumberStyles.Any, distinctNFI, 12345, true);
+ passed &= VerifyUInt16TryParse("$1,23;45.0", NumberStyles.Any, distinctNFI, 0, false);
+
+
+ // Should these pass or fail? Current parse behavior is to pass, so they might be
+ // parse bugs, but they're not tryparse bugs.
+ passed &= VerifyUInt16Parse("5", NumberStyles.Float, goodNFI, 5);
+ passed &= VerifyUInt16TryParse("5", NumberStyles.Float, goodNFI, 5, true);
+ passed &= VerifyUInt16Parse("5", NumberStyles.AllowDecimalPoint, goodNFI, 5);
+ passed &= VerifyUInt16TryParse("5", NumberStyles.AllowDecimalPoint, goodNFI, 5, true);
+ // I expect ArgumentException with an ambiguous NFI
+ passed &= VerifyUInt16ParseException("^42", NumberStyles.Any, ambigNFI, typeof(OverflowException));
+ passed &= VerifyUInt16TryParse("^42", NumberStyles.Any, ambigNFI, 0, false);
+
+ /// END TEST CASES
+ }
+ catch (Exception e)
+ {
+ TestLibrary.Logging.WriteLine("Unexpected exception!! " + e.ToString());
+ passed = false;
+ }
+
+ if (passed)
+ {
+ TestLibrary.Logging.WriteLine("paSs");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.Logging.WriteLine("FAiL");
+ return 1;
+ }
+ }
+
+ public static bool VerifyUInt16TryParse(string value, UInt16 expectedResult, bool expectedReturn)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt16.TryParse, Value = '{0}', Expected Result = {1}, Expected Return = {2}",
+ value, expectedResult, expectedReturn);
+ }
+ UInt16 result = 0;
+ try
+ {
+ bool returnValue = UInt16.TryParse(value, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedReturn, returnValue);
+ return false;
+ }
+ if (result != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, result);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyUInt16TryParse(string value, NumberStyles style, IFormatProvider provider, UInt16 expectedResult, bool expectedReturn)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt16.TryParse, Value = '{0}', Style = {1}, Provider = {2}, Expected Result = {3}, Expected Return = {4}",
+ value, style, provider, expectedResult, expectedReturn);
+ }
+ UInt16 result = 0;
+ try
+ {
+ bool returnValue = UInt16.TryParse(value, style, provider, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Style = {1}, Provider = {2}, Expected Return = {3}, Actual Return = {4}",
+ value, style, provider, expectedReturn, returnValue);
+ return false;
+ }
+ if (result != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, result);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyUInt16TryParseException(string value, NumberStyles style, IFormatProvider provider, Type exceptionType)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt16.TryParse, Value = '{0}', Style = {1}, Provider = {2}, Expected Exception = {3}",
+ value, style, provider, exceptionType);
+ }
+ try
+ {
+ UInt16 result = 0;
+ Boolean returnValue = UInt16.TryParse(value, style, provider, out result);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyUInt16Parse(string value, UInt16 expectedResult)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt16.Parse, Value = '{0}', Expected Result, {1}",
+ value, expectedResult);
+ }
+ try
+ {
+ UInt16 returnValue = UInt16.Parse(value);
+ if (returnValue != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, returnValue);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyUInt16Parse(string value, NumberStyles style, IFormatProvider provider, UInt16 expectedResult)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt16.Parse, Value = '{0}', Style = {1}, provider = {2}, Expected Result = {3}",
+ value, style, provider, expectedResult);
+ }
+ try
+ {
+ UInt16 returnValue = UInt16.Parse(value, style, provider);
+ if (returnValue != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, returnValue);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyUInt16ParseException(string value, Type exceptionType)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt16.Parse, Value = '{0}', Expected Exception, {1}",
+ value, exceptionType);
+ }
+ try
+ {
+ UInt16 returnValue = UInt16.Parse(value);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyUInt16ParseException(string value, NumberStyles style, Type exceptionType)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt16.Parse, Value = '{0}', Style = {1}, Expected Exception = {3}",
+ value, style, exceptionType);
+ }
+ try
+ {
+ UInt16 returnValue = UInt16.Parse(value, style);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyUInt16ParseException(string value, NumberStyles style, IFormatProvider provider, Type exceptionType)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt16.Parse, Value = '{0}', Style = {1}, Provider = {2}, Expected Exception = {3}",
+ value, style, provider, exceptionType);
+ }
+ try
+ {
+ UInt16 returnValue = UInt16.Parse(value, style, provider);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32CompareTo2.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32CompareTo2.csproj
new file mode 100644
index 0000000000..48c082edec
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32CompareTo2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32compareto2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32Equals1.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32Equals1.csproj
new file mode 100644
index 0000000000..3e831d0f73
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32Equals1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32equals1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32Equals2.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32Equals2.csproj
new file mode 100644
index 0000000000..8d6aa0bf0a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32Equals2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32equals2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32GetHashCode.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32GetHashCode.csproj
new file mode 100644
index 0000000000..85ab6d22c2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32GetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32gethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToBoolean.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToBoolean.csproj
new file mode 100644
index 0000000000..c5efb91f00
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToBoolean.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32iconvertibletoboolean.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToByte.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToByte.csproj
new file mode 100644
index 0000000000..438f892771
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32iconvertibletobyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToChar.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToChar.csproj
new file mode 100644
index 0000000000..43cfa743ea
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToChar.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32iconvertibletochar.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToDecimal.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToDecimal.csproj
new file mode 100644
index 0000000000..77032a1476
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToDecimal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32iconvertibletodecimal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToDouble.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToDouble.csproj
new file mode 100644
index 0000000000..9bbba71ab2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToDouble.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32iconvertibletodouble.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToInt16.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToInt16.csproj
new file mode 100644
index 0000000000..89734d2759
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32iconvertibletoint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToInt32.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToInt32.csproj
new file mode 100644
index 0000000000..a47f65c403
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32iconvertibletoint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToInt64.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToInt64.csproj
new file mode 100644
index 0000000000..2a93838f67
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32iconvertibletoint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToSByte.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToSByte.csproj
new file mode 100644
index 0000000000..d0d5d50eab
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToSByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32iconvertibletosbyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToSingle.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToSingle.csproj
new file mode 100644
index 0000000000..5d9a3e227c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToSingle.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32iconvertibletosingle.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToType.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToType.csproj
new file mode 100644
index 0000000000..ed0d595d89
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToType.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32iconvertibletotype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToUInt16.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToUInt16.csproj
new file mode 100644
index 0000000000..a9f4b74fdc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToUInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32iconvertibletouint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToUInt32.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToUInt32.csproj
new file mode 100644
index 0000000000..e56a57a1bd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToUInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32iconvertibletouint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToUInt64.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToUInt64.csproj
new file mode 100644
index 0000000000..25f0978487
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32IConvertibleToUInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32iconvertibletouint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32MaxValue.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32MaxValue.csproj
new file mode 100644
index 0000000000..c7a31e3f5c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32MaxValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32maxvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32MinValue.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32MinValue.csproj
new file mode 100644
index 0000000000..91ccf18aef
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32MinValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32minvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32Parse1.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32Parse1.csproj
new file mode 100644
index 0000000000..b3f74d4d99
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32Parse1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32parse1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32Parse2.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32Parse2.csproj
new file mode 100644
index 0000000000..36e22ee658
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32Parse2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32parse2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32Parse3.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32Parse3.csproj
new file mode 100644
index 0000000000..dc29f3b841
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32Parse3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32parse3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32ToString2.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32ToString2.csproj
new file mode 100644
index 0000000000..69f919e84c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32ToString2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32tostring2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/UInt32TryParse.csproj b/tests/src/CoreMangLib/cti/system/uint32/UInt32TryParse.csproj
new file mode 100644
index 0000000000..e3d78642fb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/UInt32TryParse.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint32tryparse.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32compareto2.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32compareto2.cs
new file mode 100644
index 0000000000..6979e32076
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32compareto2.cs
@@ -0,0 +1,159 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+
+/// <summary>
+/// UInt32.CompareTo(System.UInt32)
+/// </summary>
+public class UInt32CompareTo2
+{
+ public static int Main()
+ {
+ UInt32CompareTo2 ui32ct2 = new UInt32CompareTo2();
+ TestLibrary.TestFramework.BeginTestCase("UInt32CompareTo2");
+
+ if (ui32ct2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ int ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object value is larger than the instance");
+ try
+ {
+ UInt32 uintA = 0;
+ UInt32 comValue = (UInt32)this.GetInt32(1, Int32.MaxValue);
+ ActualResult = uintA.CompareTo(comValue);
+ if (ActualResult >= 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ int ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: object value is less than the instance");
+ try
+ {
+ UInt32 uintA = 0xffffffff;
+ UInt32 comValue = (UInt32)this.GetInt32(0, Int32.MaxValue);
+ ActualResult = uintA.CompareTo(comValue);
+ if (ActualResult <= 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ int ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: object value is equal the instance");
+ try
+ {
+ UInt32 uintA = 0xffffffff;
+ UInt32 comValue = 4294967295;
+ ActualResult = uintA.CompareTo(comValue);
+ if (ActualResult != 0)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ int ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: object value is UInt16 max value");
+ try
+ {
+ UInt32 uintA = 0xffffffff;
+ UInt32 comValue = UInt16.MaxValue;
+ ActualResult = uintA.CompareTo(comValue);
+ if (ActualResult <= 0)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32equals1.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32equals1.cs
new file mode 100644
index 0000000000..ff714264fc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32equals1.cs
@@ -0,0 +1,208 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt32.Equals(System.Object)
+/// </summary>
+public class UInt32Equals1
+{
+ public static int Main()
+ {
+ UInt32Equals1 ui32e1 = new UInt32Equals1();
+ TestLibrary.TestFramework.BeginTestCase("UInt32Equals1");
+
+ if (ui32e1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ return retVal;
+ }
+ #region
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ bool ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object value is null");
+ try
+ {
+ UInt32 uintA = (UInt32)this.GetInt32(0, Int32.MaxValue);
+ object comValue = null;
+ ActualResult = uintA.Equals(comValue);
+ if (ActualResult)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ bool ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: object value is declaring class");
+ try
+ {
+ UInt32 uintA = (UInt32)this.GetInt32(0, Int32.MaxValue);
+ object comValue = new MyTest();
+ ActualResult = uintA.Equals(comValue);
+ if (ActualResult)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ bool ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: object value is the instance value but the types are different");
+ try
+ {
+ int comValue = this.GetInt32(0, Int32.MaxValue);
+ UInt32 uintA = (UInt32)comValue;
+ ActualResult = uintA.Equals(comValue);
+ if (ActualResult)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ bool ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: object and the instance have the same type but different value");
+ try
+ {
+ int intA = this.GetInt32(0,Int32.MaxValue);
+ UInt32 uintA = (UInt32)intA;
+ UInt32 comValue = (UInt32)(intA + 1);
+ ActualResult = uintA.Equals(comValue);
+ if (ActualResult)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ bool ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: object and the instance have the same type and the same value 1");
+ try
+ {
+ UInt32 uintA = 0xffffffff;
+ UInt32 comValue = UInt32.MaxValue;
+ ActualResult = uintA.Equals(comValue);
+ if (!ActualResult)
+ {
+ TestLibrary.TestFramework.LogError("009", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ bool ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: object and the instance have the same type and the same value 2");
+ try
+ {
+ UInt32 uintA = 0;
+ UInt32 comValue = UInt32.MinValue;
+ ActualResult = uintA.Equals(comValue);
+ if (!ActualResult)
+ {
+ TestLibrary.TestFramework.LogError("011", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ public class MyTest { }
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32equals2.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32equals2.cs
new file mode 100644
index 0000000000..37e9b1a17d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32equals2.cs
@@ -0,0 +1,158 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+
+/// <summary>
+/// UInt32.Equals(System.UInt32)
+/// </summary>
+public class UInt32Equals2
+{
+ public static int Main(string[] args)
+ {
+ UInt32Equals2 ui32e2 = new UInt32Equals2();
+ TestLibrary.TestFramework.BeginTestCase("UInt32Equals2");
+
+ if (ui32e2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ bool ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: object value is null");
+ try
+ {
+ UInt32 uintA = (UInt32)this.GetInt32(0, Int32.MaxValue);
+ object comValue = null;
+ ActualResult = uintA.Equals(comValue);
+ if (ActualResult)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ bool ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: UInt32 value is different from the instance 1");
+ try
+ {
+ int intA = this.GetInt32(0, Int32.MaxValue);
+ UInt32 uintA = (UInt32)intA;
+ UInt32 comValue = (UInt32)(intA + 1);
+ ActualResult = uintA.Equals(comValue);
+ if (ActualResult)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ bool ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: UInt32 value is different from the instance 2");
+ try
+ {
+ int intA = this.GetInt32(0, Int32.MaxValue);
+ UInt32 uintA = (UInt32)(intA + 1);
+ UInt32 comValue = (UInt32)intA;
+ ActualResult = uintA.Equals(comValue);
+ if (ActualResult)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ bool ActualResult;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: UInt32 value is equal the instance ");
+ try
+ {
+ UInt32 uintA = 0xffffffff;
+ UInt32 comValue = UInt32.MaxValue;
+ ActualResult = uintA.Equals(comValue);
+ if (!ActualResult)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32gethashcode.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32gethashcode.cs
new file mode 100644
index 0000000000..a5d218f4bd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32gethashcode.cs
@@ -0,0 +1,184 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+
+public class UInt32GetHashCode
+{
+ public static int Main()
+ {
+ UInt32GetHashCode ui32ghc = new UInt32GetHashCode();
+
+ TestLibrary.TestFramework.BeginTestCase("UInt32GetHashCode");
+
+ if (ui32ghc.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: the UInt32 instance is the UInt32 MinValue ");
+
+ try
+ {
+ UInt32 uintA = 0;
+ Int32 uintB = uintA.GetHashCode();
+ if (uintB != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: the UInt32 instance is the UInt32 MaxValue");
+
+ try
+ {
+ UInt32 uintA = UInt32.MaxValue;
+ Int32 uintB = uintA.GetHashCode();
+ if (uintB != -1)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: the UInt32 instance is the Int32 MaxValue");
+
+ try
+ {
+ UInt32 uintA = (UInt32)Int32.MaxValue;
+ Int32 uintB = uintA.GetHashCode();
+ if (uintB != Int32.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: the UInt32 instance is larger than Int32 MaxValue but less than the UInt32 MaxValue");
+
+ try
+ {
+ int intA = this.GetInt32(1, Int32.MaxValue);
+ UInt32 uintA = (UInt32)Int32.MaxValue + (UInt32)intA;
+ Int32 uintB = uintA.GetHashCode();
+ if (uintB != (-1)*(Int32.MaxValue - intA + 2))
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: the UInt32 instance is less than the Int32 MaxValue");
+
+ try
+ {
+ int intA = this.GetInt32(1, Int32.MaxValue);
+ UInt32 uintA = (UInt32)intA;
+ Int32 uintB = uintA.GetHashCode();
+ if (uintB != intA)
+ {
+ TestLibrary.TestFramework.LogError("009", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletoboolean.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletoboolean.cs
new file mode 100644
index 0000000000..7490bd8417
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletoboolean.cs
@@ -0,0 +1,156 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt32.System.IConvertible.ToBoolean
+/// </summary>
+public class UInt32IConvertibleToBoolean
+{
+ public static int Main()
+ {
+ UInt32IConvertibleToBoolean ui32ictbool = new UInt32IConvertibleToBoolean();
+ TestLibrary.TestFramework.BeginTestCase("UInt32IConvertibleToBoolean");
+ if (ui32ictbool.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: genarate a random UInt32 to boolean 1");
+
+ try
+ {
+ UInt32 uintA = (UInt32)this.GetInt32(1, Int32.MaxValue);
+ IConvertible iConvert = (IConvertible)(uintA);
+ if (!iConvert.ToBoolean(null))
+ {
+ TestLibrary.TestFramework.LogError("001","the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: genarate a random UInt32 to boolean 2");
+
+ try
+ {
+ UInt32 uintA = (UInt32)(this.GetInt32(1, Int32.MaxValue) + this.GetInt32(0, Int32.MaxValue));
+ IConvertible iConvert = (IConvertible)(uintA);
+ if (!iConvert.ToBoolean(null))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: UInt32 MinValue to boolean");
+
+ try
+ {
+ UInt32 uintA = UInt32.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ if (iConvert.ToBoolean(null))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: UInt32 MaxValue to boolean");
+
+ try
+ {
+ UInt32 uintA = UInt32.MaxValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ if (!iConvert.ToBoolean(null))
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletobyte.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletobyte.cs
new file mode 100644
index 0000000000..d2ed158d10
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletobyte.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt32.System.IConvertible.ToByte
+/// </summary>
+public class UInt32IConvertibleToByte
+{
+ public static int Main()
+ {
+ UInt32IConvertibleToByte ui32ictbyte = new UInt32IConvertibleToByte();
+ TestLibrary.TestFramework.BeginTestCase("UInt32IConvertibleToByte");
+ if (ui32ictbyte.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: genarate a random UInt32 to byte");
+
+ try
+ {
+ UInt32 uintA = (UInt32)this.GetInt32(1, 256);
+ IConvertible iConvert = (IConvertible)(uintA);
+ Byte byteA = iConvert.ToByte(null);
+ if (byteA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: UInt32 MinValue to byte");
+
+ try
+ {
+ UInt32 uintA = UInt32.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Byte byteA = iConvert.ToByte(null);
+ if (byteA != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Number between 256 to UInt32.MaxValue to Byte");
+
+ try
+ {
+ UInt32 uintA = (UInt32)(this.GetInt32(256, Int32.MaxValue) + this.GetInt32(0, Int32.MaxValue));
+ IConvertible iConvert = (IConvertible)(uintA);
+ Byte byteA = iConvert.ToByte(null);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletochar.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletochar.cs
new file mode 100644
index 0000000000..c82ba57552
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletochar.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt32.System.IConvertible.ToChar
+/// </summary>
+public class UInt32IConvertibleToChar
+{
+ public static int Main()
+ {
+ UInt32IConvertibleToChar ui32ictchar = new UInt32IConvertibleToChar();
+ TestLibrary.TestFramework.BeginTestCase("UInt32IConvertibleToChar");
+ if (ui32ictchar.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: genarate a random UInt32 to char");
+
+ try
+ {
+ UInt32 uintA = (UInt32)this.GetInt32(1, 65536);
+ IConvertible iConvert = (IConvertible)(uintA);
+ Char charA = iConvert.ToChar(null);
+ if (charA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: UInt32.MinValue to Char");
+
+ try
+ {
+ UInt32 uintA = UInt32.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Char charA = iConvert.ToChar(null);
+ if (charA != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Number between 65536 to UInt32.MaxValue to char");
+
+ try
+ {
+ UInt32 uintA = (UInt32)(this.GetInt32(65536, Int32.MaxValue) + this.GetInt32(0, Int32.MaxValue));
+ IConvertible iConvert = (IConvertible)(uintA);
+ Char charA = iConvert.ToChar(null);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletodecimal.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletodecimal.cs
new file mode 100644
index 0000000000..5545b9bf86
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletodecimal.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt32.System.IConvertible.ToDecimal
+/// </summary>
+public class UInt32IConvertibleToDecimal
+{
+ public static int Main()
+ {
+ UInt32IConvertibleToDecimal ui32ictdecimal = new UInt32IConvertibleToDecimal();
+ TestLibrary.TestFramework.BeginTestCase("UInt32IConvertibleToDecimal");
+ if (ui32ictdecimal.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:UInt32 MaxValue to Decimal");
+
+ try
+ {
+ UInt32 uintA = UInt32.MaxValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Decimal decimalA = iConvert.ToDecimal(null);
+ if (decimalA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:UInt32 MinValue to Decimal");
+
+ try
+ {
+ UInt32 uintA = UInt32.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Decimal decimalA = iConvert.ToDecimal(null);
+ if (decimalA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Random UInt32 between minValue and MaxValue to Decimal");
+
+ try
+ {
+ UInt32 uintA = (UInt32)(this.GetInt32(1, Int32.MaxValue) + this.GetInt32(0, Int32.MaxValue));
+ IConvertible iConvert = (IConvertible)(uintA);
+ Decimal decimalA = iConvert.ToDecimal(null);
+ if (decimalA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletodouble.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletodouble.cs
new file mode 100644
index 0000000000..a3956f391a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletodouble.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt32.System.IConvertible.ToDouble
+/// </summary>
+public class UInt32IConvertibleToDouble
+{
+ public static int Main()
+ {
+ UInt32IConvertibleToDouble ui32ictdouble = new UInt32IConvertibleToDouble();
+ TestLibrary.TestFramework.BeginTestCase("UInt32IConvertibleToDouble");
+ if (ui32ictdouble.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:UInt32 MaxValue to Double");
+
+ try
+ {
+ UInt32 uintA = UInt32.MaxValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Double doubleA = iConvert.ToDouble(null);
+ if (doubleA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:UInt32 MinValue to Double");
+
+ try
+ {
+ UInt32 uintA = UInt32.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Double doubleA = iConvert.ToDouble(null);
+ if (doubleA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Random UInt32 between minValue and MaxValue to Double");
+
+ try
+ {
+ UInt32 uintA = (UInt32)(this.GetInt32(1, Int32.MaxValue) + this.GetInt32(0, Int32.MaxValue));
+ IConvertible iConvert = (IConvertible)(uintA);
+ Double doubleA = iConvert.ToDouble(null);
+ if (doubleA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletoint16.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletoint16.cs
new file mode 100644
index 0000000000..c4d29b90ae
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletoint16.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt32.System.IConvertible.ToInt16
+/// </summary>
+public class UInt32IConvertibleToInt16
+{
+ public static int Main()
+ {
+ UInt32IConvertibleToInt16 ui32ictint16 = new UInt32IConvertibleToInt16();
+ TestLibrary.TestFramework.BeginTestCase("UInt32IConvertibleToInt16");
+ if (ui32ictint16.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:UInt32 MinValue to Int16");
+
+ try
+ {
+ UInt32 uintA = UInt32.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int16 int16A = iConvert.ToInt16(null);
+ if (int16A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:UInt32 num between UInt32.MinValue to Int16.MaxValue");
+
+ try
+ {
+ UInt32 uintA = (UInt32)(this.GetInt32(0,Int16.MaxValue));
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int16 int16A = iConvert.ToInt16(null);
+ if (int16A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:UInt32 num between Int16.MaxValue to UInt32.MaxValue");
+
+ try
+ {
+ UInt32 uintA = (UInt32)(this.GetInt32(Int16.MaxValue + 1, Int32.MaxValue) + this.GetInt32(0, Int32.MaxValue));
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int16 int16A = iConvert.ToInt16(null);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletoint32.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletoint32.cs
new file mode 100644
index 0000000000..2d2a9fe89a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletoint32.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt32.System.IConvertible.ToInt32
+/// </summary>
+public class UInt32IConvertibleToInt32
+{
+ public static int Main()
+ {
+ UInt32IConvertibleToInt32 ui32ictint32 = new UInt32IConvertibleToInt32();
+ TestLibrary.TestFramework.BeginTestCase("UInt32IConvertibleToInt32");
+ if (ui32ictint32.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:UInt32 MinValue to Int32");
+
+ try
+ {
+ UInt32 uintA = UInt32.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int32 int32A = iConvert.ToInt32(null);
+ if (int32A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:UInt32 num between UInt32.MinValue to Int32.MaxValue");
+
+ try
+ {
+ UInt32 uintA = (UInt32)(this.GetInt32(0, Int32.MaxValue));
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int32 int32A = iConvert.ToInt32(null);
+ if (int32A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:UInt32 num between Int32.MaxValue to UInt32.MaxValue");
+
+ try
+ {
+ UInt32 uintA = (UInt32)(this.GetInt32(Int32.MaxValue, Int32.MaxValue) + this.GetInt32(1, Int32.MaxValue));
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int32 int32A = iConvert.ToInt32(null);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletoint64.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletoint64.cs
new file mode 100644
index 0000000000..411a8f7304
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletoint64.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt32.System.IConvertible.ToInt64
+/// </summary>
+public class UInt32IConvertibleToInt64
+{
+ public static int Main()
+ {
+ UInt32IConvertibleToInt64 ui32ictint64 = new UInt32IConvertibleToInt64();
+ TestLibrary.TestFramework.BeginTestCase("UInt32IConvertibleToInt64");
+ if (ui32ictint64.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:UInt32 MinValue to Int64");
+
+ try
+ {
+ UInt32 uintA = UInt32.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int64 int64A = iConvert.ToInt64(null);
+ if (int64A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:UInt32 MaxValue to Int64");
+
+ try
+ {
+ UInt32 uintA = UInt32.MaxValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int64 int64A = iConvert.ToInt64(null);
+ if (int64A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:UInt32 between UInt32 minValue and MaxValue to Int64");
+
+ try
+ {
+ UInt32 uintA = (UInt32)(this.GetInt32(1, Int32.MaxValue) + this.GetInt32(0, Int32.MaxValue));
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int64 int64A = iConvert.ToInt64(null);
+ if (int64A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletosbyte.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletosbyte.cs
new file mode 100644
index 0000000000..9ad3386b0f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletosbyte.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt32.System.IConvertible.ToSByte
+/// </summary>
+public class UInt32IConvertibleToSByte
+{
+ public static int Main()
+ {
+ UInt32IConvertibleToSByte ui32ictsbyte = new UInt32IConvertibleToSByte();
+ TestLibrary.TestFramework.BeginTestCase("UInt32IConvertibleToSByte");
+ if (ui32ictsbyte.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:UInt32 MinValue to SByte");
+
+ try
+ {
+ UInt32 uintA = UInt32.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ SByte sbyteA = iConvert.ToSByte(null);
+ if (sbyteA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:UInt32 between MinValue to SByte.MaxValue to SByte");
+
+ try
+ {
+ UInt32 uintA = (UInt32)this.GetInt32(1, SByte.MaxValue + 1);
+ IConvertible iConvert = (IConvertible)(uintA);
+ SByte sbyteA = iConvert.ToSByte(null);
+ if (sbyteA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:UInt32 num between SByte.MaxValue to UInt32.MaxValue");
+
+ try
+ {
+ UInt32 uintA = (UInt32)(this.GetInt32(SByte.MaxValue + 1, Int32.MaxValue) + this.GetInt32(0, Int32.MaxValue));
+ IConvertible iConvert = (IConvertible)(uintA);
+ SByte sbyteA = iConvert.ToSByte(null);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletosingle.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletosingle.cs
new file mode 100644
index 0000000000..6f1d466ec0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletosingle.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt32.System.IConvertible.ToSingle
+/// </summary>
+public class UInt32IConvertibleToSingle
+{
+ public static int Main()
+ {
+ UInt32IConvertibleToSingle ui32ictsingle = new UInt32IConvertibleToSingle();
+ TestLibrary.TestFramework.BeginTestCase("UInt32IConvertibleToSingle");
+ if (ui32ictsingle.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:UInt32 MinValue to Single");
+
+ try
+ {
+ UInt32 uintA = UInt32.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Single singleA = iConvert.ToSingle(null);
+ if (singleA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:UInt32 MaxValue to Single");
+
+ try
+ {
+ UInt32 uintA = UInt32.MaxValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Single singleA = iConvert.ToSingle(null);
+ if (singleA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:UInt32 between MinValue and MaxValue to Single");
+
+ try
+ {
+ UInt32 uintA = (UInt32)(this.GetInt32(1, Int32.MaxValue) + this.GetInt32(0, Int32.MaxValue));
+ IConvertible iConvert = (IConvertible)(uintA);
+ Single singleA = iConvert.ToSingle(null);
+ if (singleA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletotype.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletotype.cs
new file mode 100644
index 0000000000..5389612dc2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletotype.cs
@@ -0,0 +1,340 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+
+public class UInt32IConvertibleToType
+{
+ public static int Main()
+ {
+ UInt32IConvertibleToType ui32icttype = new UInt32IConvertibleToType();
+ TestLibrary.TestFramework.BeginTestCase("UInt32IConvertibleToType");
+ if (ui32icttype.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:UInt32 MinValue to Type of string");
+
+ try
+ {
+ UInt32 uintA = UInt32.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ string strA = (string)iConvert.ToType(typeof(string), null);
+ if (strA != uintA.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:UInt32 MinValue to Type of bool");
+
+ try
+ {
+ UInt32 uintA = UInt32.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ bool boolA = (bool)iConvert.ToType(typeof(bool), null);
+ if (boolA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:UInt32 MaxValue to Type of bool");
+
+ try
+ {
+ UInt32 uintA = UInt32.MaxValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ bool boolA = (bool)iConvert.ToType(typeof(bool), null);
+ if (!boolA)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:UInt32 MaxValue to Type of Int64,double and decimal");
+
+ try
+ {
+ UInt32 uintA = UInt32.MaxValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int64 int64A = (Int64)iConvert.ToType(typeof(Int64), null);
+ Double doubleA = (Double)iConvert.ToType(typeof(Double), null);
+ Decimal decimalA = (Decimal)iConvert.ToType(typeof(Decimal), null);
+ Single singleA = (Single)iConvert.ToType(typeof(Single), null);
+ if (int64A != uintA || doubleA!= uintA || decimalA != uintA || singleA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5:UInt32 between MinValue to Int32.Max to Type of Int32");
+
+ try
+ {
+ UInt32 uintA = (UInt32)this.GetInt32(0, Int32.MaxValue);
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int32 int32A = (Int32)iConvert.ToType(typeof(Int32), null);
+ if (int32A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("009", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6:UInt32 between MinValue to Int16.Max to Type of Int16");
+
+ try
+ {
+ UInt32 uintA = (UInt32)this.GetInt32(0, Int16.MaxValue + 1);
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int16 int16A = (Int16)iConvert.ToType(typeof(Int16), null);
+ if (int16A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("011", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest7:UInt32 between MinValue and SByte.Max to Type of SByte");
+
+ try
+ {
+ UInt32 uintA = (UInt32)this.GetInt32(0, SByte.MaxValue + 1);
+ IConvertible iConvert = (IConvertible)(uintA);
+ SByte sbyteA = (SByte)iConvert.ToType(typeof(SByte), null);
+ if (sbyteA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("013", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest8:UInt32 between MinValue and Byte.Max to Type of Byte");
+
+ try
+ {
+ UInt32 uintA = (UInt32)this.GetInt32(0, Byte.MaxValue + 1);
+ IConvertible iConvert = (IConvertible)(uintA);
+ Byte byteA = (Byte)iConvert.ToType(typeof(Byte), null);
+ if (byteA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("015", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:UInt32 between Int32.MaxValue and UInt32.MaxValue to Type of Int32");
+
+ try
+ {
+ UInt32 uintA = (UInt32)(this.GetInt32(0, Int32.MaxValue) + Int32.MaxValue);
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int32 int32A = (Int32)iConvert.ToType(typeof(Int32), null);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2:UInt32 between Int16.Max and UInt32.MaxValue Type of Int16");
+
+ try
+ {
+ UInt32 uintA = (UInt32)(Int16.MaxValue + this.GetInt32(1, Int32.MaxValue));
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int16 int16A = (Int16)iConvert.ToType(typeof(Int16), null);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3:UInt32 between SByte.Max and UInt32.MaxValue to Type of SByte");
+
+ try
+ {
+ UInt32 uintA = (UInt32)(SByte.MaxValue + this.GetInt32(1, Int32.MaxValue));
+ IConvertible iConvert = (IConvertible)(uintA);
+ SByte sbyteA = (SByte)iConvert.ToType(typeof(SByte), null);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4:UInt32 between Byte.Max and UInt32.MaxValue to Type of Byte");
+
+ try
+ {
+ UInt32 uintA = (UInt32)(Byte.MaxValue + this.GetInt32(1,Int32.MaxValue));
+ IConvertible iConvert = (IConvertible)(uintA);
+ Byte byteA = (Byte)iConvert.ToType(typeof(Byte), null);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletouint16.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletouint16.cs
new file mode 100644
index 0000000000..7a95c260a4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletouint16.cs
@@ -0,0 +1,130 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt32.System.IConvertible.ToUInt16
+/// </summary>
+public class UInt32IConvertibleToUInt16
+{
+ public static int Main()
+ {
+ UInt32IConvertibleToUInt16 ui32ictuint16 = new UInt32IConvertibleToUInt16();
+ TestLibrary.TestFramework.BeginTestCase("UInt32IConvertibleToUInt16");
+ if (ui32ictuint16.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:UInt32 MinValue to UInt16");
+ try
+ {
+ UInt32 uintA = UInt32.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ UInt16 uint16A = iConvert.ToUInt16(null);
+ if (uint16A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:UInt32 num between UInt32.MinValue to UInt16.MaxValue");
+ try
+ {
+ UInt32 uintA = (UInt32)(this.GetInt32(0, UInt16.MaxValue + 1));
+ IConvertible iConvert = (IConvertible)(uintA);
+ UInt16 uint16A = iConvert.ToUInt16(null);
+ if (uint16A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:UInt32 num between UInt16.MaxValue to UInt32.MaxValue");
+
+ try
+ {
+ UInt32 uintA = (UInt32)(this.GetInt32(UInt16.MaxValue + 1, Int32.MaxValue) + this.GetInt32(0, Int32.MaxValue));
+ IConvertible iConvert = (IConvertible)(uintA);
+ UInt16 uint16A = iConvert.ToUInt16(null);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletouint32.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletouint32.cs
new file mode 100644
index 0000000000..9e0b0630c6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletouint32.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt32.System.IConvertible.ToUInt32
+/// </summary>
+public class UInt32IConvertibleToUInt32
+{
+ public static int Main()
+ {
+ UInt32IConvertibleToUInt32 ui32ictuint32 = new UInt32IConvertibleToUInt32();
+ TestLibrary.TestFramework.BeginTestCase("UInt32IConvertibleToUInt32");
+ if (ui32ictuint32.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:UInt32 MinValue to UInt32");
+
+ try
+ {
+ UInt32 uintA = UInt32.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ UInt32 uint32A = iConvert.ToUInt32(null);
+ if (uint32A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:random UInt32 IConvertible to UInt32");
+
+ try
+ {
+ UInt32 uintA = (UInt32)(this.GetInt32(0, Int32.MaxValue) + this.GetInt32(0, Int32.MaxValue));
+ IConvertible iConvert = (IConvertible)(uintA);
+ UInt32 uint32A = iConvert.ToUInt32(null);
+ if (uint32A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:UInt32 MaxValue to UInt32");
+
+ try
+ {
+ UInt32 uintA = UInt32.MaxValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ UInt32 uint32A = iConvert.ToUInt32(null);
+ if (uint32A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletouint64.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletouint64.cs
new file mode 100644
index 0000000000..215a58784c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32iconvertibletouint64.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt32.System.IConvertible.ToUInt64
+/// </summary>
+public class UInt32IConvertibleToUInt64
+{
+ public static int Main()
+ {
+ UInt32IConvertibleToUInt64 ui32ictuint64 = new UInt32IConvertibleToUInt64();
+ TestLibrary.TestFramework.BeginTestCase("UInt32IConvertibleToUInt64");
+ if (ui32ictuint64.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:UInt32 MinValue to UInt64");
+
+ try
+ {
+ UInt32 uintA = UInt32.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ UInt64 uint64A = iConvert.ToUInt64(null);
+ if (uint64A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:UInt32 MaxValue to UInt64");
+
+ try
+ {
+ UInt32 uintA = UInt32.MaxValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ UInt64 uint64A = iConvert.ToUInt64(null);
+ if (uint64A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:UInt32 between UInt32 minValue and MaxValue to UInt64");
+
+ try
+ {
+ UInt32 uintA = (UInt32)(this.GetInt32(1, Int32.MaxValue) + this.GetInt32(0, Int32.MaxValue));
+ IConvertible iConvert = (IConvertible)(uintA);
+ UInt64 uint64A = iConvert.ToUInt64(null);
+ if (uint64A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32maxvalue.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32maxvalue.cs
new file mode 100644
index 0000000000..145e817686
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32maxvalue.cs
@@ -0,0 +1,84 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+
+/// <summary>
+/// Unint32.MaxValue
+/// </summary>
+public class UInt32MaxValue
+{
+ private UInt32 c_UINT32_MAXVALUE = 4294967295;
+ public static int Main()
+ {
+ UInt32MaxValue ui32mv = new UInt32MaxValue();
+ TestLibrary.TestFramework.BeginTestCase("UInt32MaxValue");
+
+ if (ui32mv.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: UnInt32.MaxValue should return the UnInt32' maxValue 1");
+ try
+ {
+ UInt32 uintA = UInt32.MaxValue;
+ if (uintA != c_UINT32_MAXVALUE)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: UnInt32.MaxValue should return the UnInt32' maxValue 2");
+ try
+ {
+ UInt32 uintA = UInt32.MaxValue;
+ if (uintA != 0xffffffff)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32minvalue.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32minvalue.cs
new file mode 100644
index 0000000000..73f3c5d22a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32minvalue.cs
@@ -0,0 +1,61 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+
+/// <summary>
+/// UInt32.MinValue
+/// </summary>
+public class UInt32MinValue
+{
+ private UInt32 c_UINT32_MINVALUE = 0;
+
+ public static int Main()
+ {
+ UInt32MinValue ui32minv = new UInt32MinValue();
+ TestLibrary.TestFramework.BeginTestCase("UInt32MinValue");
+
+ if (ui32minv.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ return retVal;
+ }
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: UnInt32.MinValue should return the UnInt32' minValue");
+ try
+ {
+ UInt32 uintA = UInt32.MinValue;
+ if (uintA != c_UINT32_MINVALUE)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32parse1.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32parse1.cs
new file mode 100644
index 0000000000..82d5663433
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32parse1.cs
@@ -0,0 +1,357 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+// v-minch
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Globalization;
+
+/// <summary>
+/// UInt32.Parse(System.string)
+/// </summary>
+public class UInt32Parse1
+{
+ public static int Main()
+ {
+ UInt32Parse1 ui32parse1 = new UInt32Parse1();
+ TestLibrary.TestFramework.BeginTestCase("UInt32Parse1");
+
+ if (ui32parse1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ return retVal;
+ }
+ #region PostiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: the string corresponding UInt32 is UInt32 MinValue ");
+
+ try
+ {
+ string strA = UInt32.MinValue.ToString();
+ uintA = UInt32.Parse(strA);
+ if (uintA != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: the string corresponding UInt32 is UInt32 MaxValue ");
+
+ try
+ {
+ string strA = UInt32.MaxValue.ToString();
+ uintA = UInt32.Parse(strA);
+ if (uintA != UInt32.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: the string corresponding UInt32 is normal UInt32 ");
+
+ try
+ {
+ UInt32 uintTest = (UInt32)this.GetInt32(0,Int32.MaxValue);
+ string strA = uintTest.ToString();
+ uintA = UInt32.Parse(strA);
+ if (uintA != uintTest)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: the string format is [ws][sign]digits[ws] 1");
+
+ try
+ {
+ UInt32 uintTest = (UInt32)this.GetInt32(0, Int32.MaxValue);
+ string strA = "+" + uintTest.ToString();
+ uintA = UInt32.Parse(strA);
+ if (uintA != uintTest)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: the string format is [ws][sign]digits[ws] 2");
+
+ try
+ {
+ UInt32 uintTest = (UInt32)this.GetInt32(0, Int32.MaxValue);
+ string strA = "\u0009" + "+" + uintTest.ToString();
+ uintA = UInt32.Parse(strA);
+ if (uintA != uintTest)
+ {
+ TestLibrary.TestFramework.LogError("009", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: the string format is [ws][sign]digits[ws] 3");
+
+ try
+ {
+ UInt32 uintTest = (UInt32)this.GetInt32(0, Int32.MaxValue);
+ string strA = uintTest.ToString() + "\u0020";
+ uintA = UInt32.Parse(strA);
+ if (uintA != uintTest)
+ {
+ TestLibrary.TestFramework.LogError("011", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7: the string format is [ws][sign]digits[ws] 4");
+
+ try
+ {
+ UInt32 uintTest = (UInt32)this.GetInt32(0, Int32.MaxValue);
+ string strA = "\u0009" + "+" + uintTest.ToString() + "\u0020";
+ uintA = UInt32.Parse(strA);
+ if (uintA != uintTest)
+ {
+ TestLibrary.TestFramework.LogError("013", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the parameter string is null");
+
+ try
+ {
+ string strA = null;
+ uintA = UInt32.Parse(strA);
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the parameter string is not of the correct format 1");
+
+ try
+ {
+ string strA = "abcd";
+ uintA = UInt32.Parse(strA);
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: the parameter string is not of the correct format 2");
+
+ try
+ {
+ string strA = "b12345d";
+ uintA = UInt32.Parse(strA);
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: the parameter string corresponding number is less than UInt32 minValue");
+
+ try
+ {
+ Int32 Testint = (-1) * this.GetInt32(1, Int32.MaxValue);
+ string strA = Testint.ToString();
+ uintA = UInt32.Parse(strA);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest5: the parameter string corresponding number is larger than UInt32 maxValue");
+
+ try
+ {
+ UInt32 uinta = UInt32.MaxValue;
+ UInt32 uintb = (UInt32)this.GetInt32(1, Int32.MaxValue);
+ UInt64 TestUint = (UInt64)uinta + (UInt64)uintb;
+ string strA = TestUint.ToString();
+ uintA = UInt32.Parse(strA);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32parse2.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32parse2.cs
new file mode 100644
index 0000000000..5d99378ba2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32parse2.cs
@@ -0,0 +1,392 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+
+/// <summary>
+/// UInt32.Parse(System.string,NumberStyle style)
+/// </summary>
+public class UInt32Parse2
+{
+ public static int Main()
+ {
+ UInt32Parse2 ui32parse2 = new UInt32Parse2();
+ TestLibrary.TestFramework.BeginTestCase("UInt32Parse2");
+
+ if (ui32parse2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: the string corresponding UInt32 is UInt32 MaxValue 1");
+ try
+ {
+ string strA = UInt32.MaxValue.ToString();
+ NumberStyles style = NumberStyles.Any;
+ uintA = UInt32.Parse(strA,style);
+ if (uintA != UInt32.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: the string corresponding UInt32 is UInt32 MaxValue 2");
+ try
+ {
+ string strA = "ffffffff";
+ NumberStyles style = NumberStyles.HexNumber;
+ uintA = UInt32.Parse(strA, style);
+ if (uintA != UInt32.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The string parameter contains a number of the form:[ws][sign]digits[ws] 1");
+ try
+ {
+ string strA = "01234";
+ NumberStyles style = NumberStyles.HexNumber;
+ uintA = UInt32.Parse(strA, style);
+ UInt32 expUIntA = (UInt32)(Math.Pow(16, 3)) + (UInt32)(2 * Math.Pow(16, 2)) + 3 * 16 + 4;
+ if (uintA != expUIntA)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: The string parameter contains a number of the form:[ws][sign]digits[ws] 2");
+ try
+ {
+ string strA = "01234";
+ NumberStyles style = NumberStyles.Any;
+ uintA = UInt32.Parse(strA,style);
+ if (uintA != 1234)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: The string parameter contains a number of the form:[ws][sign]digits[ws] 3");
+ try
+ {
+ int intA = this.GetInt32(0, Int32.MaxValue);
+ string strA = "\u0009" + "+" + intA.ToString() + "\u000a";
+ NumberStyles style = NumberStyles.Any;
+ uintA = UInt32.Parse(strA, style);
+ if (uintA != (UInt32)intA)
+ {
+ TestLibrary.TestFramework.LogError("009", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: The string parameter contains a number of the form:[ws]hexdigits[ws] 1");
+ try
+ {
+ string strA = "abcde";
+ NumberStyles style = NumberStyles.HexNumber;
+ uintA = UInt32.Parse(strA, style);
+ UInt32 expUIntA = (UInt32)(10 * Math.Pow(16, 4)) + (UInt32)(11 * Math.Pow(16, 3)) + (UInt32)(12 * Math.Pow(16, 2)) + (UInt32)(13 * Math.Pow(16, 1)) + 14;
+ if (uintA != expUIntA)
+ {
+ TestLibrary.TestFramework.LogError("011", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: The string parameter contains a number of the form:[ws]hexdigits[ws] 2");
+ try
+ {
+ string strA = "\u0009" + "abcde" + "\u000A";
+ NumberStyles style = NumberStyles.HexNumber;
+ uintA = UInt32.Parse(strA, style);
+ UInt32 expUIntA = (UInt32)(10 * Math.Pow(16, 4)) + (UInt32)(11 * Math.Pow(16, 3)) + (UInt32)(12 * Math.Pow(16, 2)) + (UInt32)(13 * Math.Pow(16, 1)) + 14;
+ if (uintA != expUIntA)
+ {
+ TestLibrary.TestFramework.LogError("013", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the parameter string is null");
+
+ try
+ {
+ string strA = null;
+ uintA = UInt32.Parse(strA, NumberStyles.Integer);
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the style is not the NumberStyles value");
+
+ try
+ {
+ string strA = "12345";
+ NumberStyles numstyle = (NumberStyles)(-1);
+ uintA = UInt32.Parse(strA, numstyle);
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: the string is not in a format compliant with style 1");
+
+ try
+ {
+ string strA = "abcd";
+ NumberStyles style = NumberStyles.Integer;
+ uintA = UInt32.Parse(strA, style);
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: the string is not in a format compliant with style 2");
+
+ try
+ {
+ string strA = "gabcd";
+ NumberStyles style = NumberStyles.HexNumber;
+ uintA = UInt32.Parse(strA, style);
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest5: the parameter string corresponding number is less than UInt32 minValue");
+
+ try
+ {
+ Int32 Testint = (-1) * this.GetInt32(1, Int32.MaxValue);
+ string strA = Testint.ToString();
+ NumberStyles style = NumberStyles.Integer;
+ uintA = UInt32.Parse(strA,style);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest6()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest6: the parameter string corresponding number is larger than UInt32 maxValue");
+
+ try
+ {
+ UInt32 uinta = UInt32.MaxValue;
+ UInt32 uintb = (UInt32)this.GetInt32(1, Int32.MaxValue);
+ UInt64 TestUint = (UInt64)uinta + (UInt64)uintb;
+ string strA = TestUint.ToString();
+ NumberStyles style = NumberStyles.Integer;
+ uintA = UInt32.Parse(strA,style);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest7()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest7: The string parameter contains a number of the form:[ws][sign]hexdigits[ws]");
+ try
+ {
+ string strA = "\u0009" + "+" + "abcde" + "\u0009";
+ NumberStyles style = NumberStyles.HexNumber;
+ uintA = UInt32.Parse(strA, style);
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32parse3.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32parse3.cs
new file mode 100644
index 0000000000..af0f65514b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32parse3.cs
@@ -0,0 +1,334 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Globalization;
+
+/// <summary>
+/// UInt32.Parse(System.string,NumberStyle style,IFormatProvider provider)
+/// </summary>
+public class UInt32Parse3
+{
+ public static int Main()
+ {
+ UInt32Parse3 ui32parse3 = new UInt32Parse3();
+ TestLibrary.TestFramework.BeginTestCase("UInt32Parse3");
+
+ if (ui32parse3.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: the string corresponding UInt32 is UInt32 MaxValue 1");
+ try
+ {
+ string strA = UInt32.MaxValue.ToString();
+ NumberStyles style = NumberStyles.Any;
+ uintA = UInt32.Parse(strA, style,provider);
+ if (uintA != UInt32.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: the string corresponding UInt32 is UInt32 MaxValue 2");
+ try
+ {
+ string strA = "ffffffff";
+ NumberStyles style = NumberStyles.HexNumber;
+ uintA = UInt32.Parse(strA, style,provider);
+ if (uintA != UInt32.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The string parameter contains a number of the form:[ws][sign]digits[ws]");
+ try
+ {
+ string strA = "\u0009" + "abcde" + "\u000A";
+ NumberStyles style = NumberStyles.HexNumber;
+ uintA = UInt32.Parse(strA, style, provider);
+ UInt32 expUIntA = (UInt32)(10 * Math.Pow(16, 4)) + (UInt32)(11 * Math.Pow(16, 3)) + (UInt32)(12 * Math.Pow(16, 2)) + (UInt32)(13 * Math.Pow(16, 1)) + 14;
+ if (uintA != expUIntA)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: The string parameter contains a number of the form:[ws]hexdigits[ws]");
+ try
+ {
+ string strA = "fffff";
+ NumberStyles style = NumberStyles.HexNumber;
+ uintA = UInt32.Parse(strA, style, provider);
+ UInt32 expUIntA = (UInt32)(15 * Math.Pow(16, 4)) + (UInt32)(15 * Math.Pow(16, 3)) + (UInt32)(15 * Math.Pow(16, 2)) + (UInt32)(15 * Math.Pow(16, 1)) + 15;
+ if (uintA != expUIntA)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ IFormatProvider provider = null;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the parameter string is null");
+
+ try
+ {
+ string strA = null;
+ uintA = UInt32.Parse(strA, NumberStyles.Integer,provider);
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ IFormatProvider provider = null;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the style is not the NumberStyles value");
+
+ try
+ {
+ string strA = "12345";
+ NumberStyles numstyle = (NumberStyles)(-1);
+ uintA = UInt32.Parse(strA, numstyle, provider);
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ IFormatProvider provider = null;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: the string is not in a format compliant with style 1");
+
+ try
+ {
+ string strA = "abcd";
+ NumberStyles style = NumberStyles.Integer;
+ uintA = UInt32.Parse(strA, style, provider);
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ IFormatProvider provider = null;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: the string is not in a format compliant with style 2");
+
+ try
+ {
+ string strA = "gabcd";
+ NumberStyles style = NumberStyles.HexNumber;
+ uintA = UInt32.Parse(strA, style, provider);
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ IFormatProvider provider = null;
+ TestLibrary.TestFramework.BeginScenario("NegTest5: the parameter string corresponding number is less than UInt32 minValue");
+
+ try
+ {
+ Int32 Testint = (-1) * this.GetInt32(1, Int32.MaxValue);
+ string strA = Testint.ToString();
+ NumberStyles style = NumberStyles.Integer;
+ uintA = UInt32.Parse(strA, style, provider);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest6()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ IFormatProvider provider = null;
+ TestLibrary.TestFramework.BeginScenario("NegTest6: the parameter string corresponding number is larger than UInt32 maxValue");
+
+ try
+ {
+ UInt32 uinta = UInt32.MaxValue;
+ UInt32 uintb = (UInt32)this.GetInt32(1, Int32.MaxValue);
+ UInt64 TestUint = (UInt64)uinta + (UInt64)uintb;
+ string strA = TestUint.ToString();
+ NumberStyles style = NumberStyles.Integer;
+ uintA = UInt32.Parse(strA, style, provider);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest7()
+ {
+ bool retVal = true;
+ UInt32 uintA;
+ IFormatProvider provider = null;
+ TestLibrary.TestFramework.BeginScenario("NegTest7: The string parameter contains a number of the form:[ws][sign]hexdigits[ws]");
+ try
+ {
+ string strA = "\u0009" + "+" + "abcde" + "\u0009";
+ NumberStyles style = NumberStyles.HexNumber;
+ uintA = UInt32.Parse(strA, style, provider);
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32tostring2.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32tostring2.cs
new file mode 100644
index 0000000000..e0ab4934f9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32tostring2.cs
@@ -0,0 +1,203 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using System.Collections.Generic;
+using System.Text;
+using TestLibrary;
+
+/// <summary>
+/// UInt32.ToString(System.string)
+/// </summary>
+public class UInt32ToString2
+{
+ public static int Main()
+ {
+ UInt32ToString2 ui32ts2 = new UInt32ToString2();
+ TestLibrary.TestFramework.BeginTestCase("UInt32ToString2");
+
+ if (ui32ts2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private CultureInfo CurrentCulture = TestLibrary.Utilities.CurrentCulture;
+ private CultureInfo customCulture = null;
+
+ private CultureInfo CustomCulture
+ {
+ get
+ {
+ if (null == customCulture)
+ {
+ customCulture = new CultureInfo(CultureInfo.CurrentCulture.Name);
+ NumberFormatInfo nfi = customCulture.NumberFormat;
+ //For "G"
+ // NegativeSign, NumberDecimalSeparator, NumberDecimalDigits, PositiveSign
+ nfi.NegativeSign = "@"; //Default: "-"
+ nfi.NumberDecimalSeparator = ","; //Default: "."
+ nfi.NumberDecimalDigits = 3; //Default: 2
+ nfi.PositiveSign = "++"; //Default: "+"
+
+ //For "E"
+ // PositiveSign, NegativeSign, and NumberDecimalSeparator.
+ // If precision specifier is omitted, a default of six digits after the decimal point is used.
+
+ //For "R"
+ // NegativeSign, NumberDecimalSeparator and PositiveSign
+
+ //For "X", The result string isn't affected by the formatting information of the current NumberFormatInfo
+
+ //For "C"
+ // CurrencyPositivePattern, CurrencySymbol, CurrencyDecimalDigits, CurrencyDecimalSeparator, CurrencyGroupSeparator, CurrencyGroupSizes, NegativeSign and CurrencyNegativePattern
+ nfi.CurrencyDecimalDigits = 3; //Default: 2
+ nfi.CurrencyDecimalSeparator = ","; //Default: ","
+ nfi.CurrencyGroupSeparator = "."; //Default: "."
+ nfi.CurrencyGroupSizes = new int[] { 2 }; //Default: new int[]{3}
+ nfi.CurrencyNegativePattern = 2; //Default: 0
+ nfi.CurrencyPositivePattern = 1; //Default: 0
+ nfi.CurrencySymbol = "USD"; //Default: "$"
+
+ //For "D"
+ // NegativeSign
+
+ //For "E"
+ // PositiveSign, NumberDecimalSeparator and NegativeSign.
+ // If precision specifier is omitted, a default of six digits after the decimal point is used.
+ nfi.PositiveSign = "++"; //Default: "+"
+ nfi.NumberDecimalSeparator = ","; //Default: "."
+
+ //For "F"
+ // NumberDecimalDigits, and NumberDecimalSeparator and NegativeSign.
+ nfi.NumberDecimalDigits = 3; //Default: 2
+
+ //For "N"
+ // NumberGroupSizes, NumberGroupSeparator, NumberDecimalSeparator, NumberDecimalDigits, NumberNegativePattern and NegativeSign.
+ nfi.NumberGroupSizes = new int[] { 2 }; //Default: 3
+ nfi.NumberGroupSeparator = "#"; //Default: ","
+
+ //For "P"
+ // PercentPositivePattern, PercentNegativePattern, NegativeSign, PercentSymbol, PercentDecimalDigits, PercentDecimalSeparator, PercentGroupSeparator and PercentGroupSizes
+ nfi.PercentPositivePattern = 1; //Default: 0
+ nfi.PercentNegativePattern = 2; //Default: 0
+ nfi.PercentSymbol = "~"; //Default: "%"
+ nfi.PercentDecimalDigits = 4; //Default: 2
+ nfi.PercentDecimalSeparator = ","; //Default: "."
+ nfi.PercentGroupSizes[0] = 2; //Default: 3
+ nfi.PercentGroupSeparator = ",";
+
+ customCulture.NumberFormat = nfi;
+ }
+ return customCulture;
+ }
+ }
+
+ private bool VerifyToString(String id, UInt32 myInt, String format, String expected)
+ {
+ try
+ {
+ String actual = myInt.ToString(format);
+ if (actual != expected)
+ {
+ TestLibrary.TestFramework.LogError(id + "_001", "Expected: " + expected + " Actual: " + actual);
+ return false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError(id + "_002", "Unexpected exception occurs: " + e);
+ return false;
+ }
+ return true;
+ }
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal &= VerifyToString("PostTest1", UInt32.MaxValue, "X", "FFFFFFFF");
+
+ TestLibrary.Utilities.CurrentCulture = CustomCulture;
+ retVal &= VerifyToString("PostTest2", UInt32.MinValue, "G", "0");
+ retVal &= VerifyToString("PostTest3", UInt32.MinValue, "f", "0,000");
+ retVal &= VerifyToString("PostTest4", UInt32.MaxValue, "G", "4294967295");
+ retVal &= VerifyToString("PostTest5", UInt32.MaxValue, "f", "4294967295,000");
+ retVal &= VerifyToString("PostTest6", UInt32.MaxValue, "E", TestLibrary.Utilities.IsWindows? "4,294967E++009" : "4,294967E9");
+ retVal &= VerifyToString("PostTest7", UInt32.MaxValue, "N", "42#94#96#72#95,000");
+ retVal &= VerifyToString("PostTest8", UInt32.MaxValue, "P", "429,496,729,500,0000~");
+ retVal &= VerifyToString("PostTest9", UInt32.MaxValue, "D", "4294967295");
+ retVal &= VerifyToString("PostTest10", 00065536, "G", "65536");
+ retVal &= VerifyToString("PostTest11", 00065536, "P", "6,553,600,0000~");
+ retVal &= VerifyToString("PostTest12", 00065536, "E", TestLibrary.Utilities.IsWindows? "6,553600E++004" : "6,553600E4");
+ retVal &= VerifyToString("PostTest13", 00065536, String.Empty, "65536");
+ retVal &= VerifyToString("PostTest14", 00065536, null, "65536");
+
+ TestLibrary.Utilities.CurrentCulture = CurrentCulture;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal &= NegTest1();
+
+ return retVal;
+ }
+ #endregion
+
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The Format parameter is Invalid");
+ try
+ {
+ UInt32 uintA = (UInt32)(this.GetInt32(1, Int32.MaxValue) + this.GetInt32(0, Int32.MaxValue));
+ String strA = uintA.ToString("Q");
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+
+
+ private Int32 GetInt32(Int32 minValue, Int32 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + TestLibrary.Generator.GetInt32() % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint32/uint32tryparse.cs b/tests/src/CoreMangLib/cti/system/uint32/uint32tryparse.cs
new file mode 100644
index 0000000000..8e9bf6535c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint32/uint32tryparse.cs
@@ -0,0 +1,556 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+// CoreCLR Port from Co7528TryParse_all.cs
+// Tests UInt32.TryParse(String), UInt32.TryParse(String, NumberStyles, IFormatProvider, ref UInt32)
+// 2003/04/01 KatyK
+// 2007/06/28 adapted by MarielY
+
+public class Co7528TryParse
+{
+ static bool verbose = false;
+
+ public static int Main()
+ {
+ bool passed = true;
+
+ try
+ {
+ // Make the test culture independent
+ TestLibrary.Utilities.CurrentCulture = CultureInfo.InvariantCulture;
+
+ // Set up NFIs to use
+ NumberFormatInfo goodNFI = new NumberFormatInfo();
+
+ NumberFormatInfo corruptNFI = new NumberFormatInfo(); // DecimalSeparator == GroupSeparator
+ corruptNFI.NumberDecimalSeparator = ".";
+ corruptNFI.NumberGroupSeparator = ".";
+ corruptNFI.CurrencyDecimalSeparator = ".";
+ corruptNFI.CurrencyGroupSeparator = ".";
+ corruptNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo swappedNFI = new NumberFormatInfo(); // DecimalSeparator & GroupSeparator swapped
+ swappedNFI.NumberDecimalSeparator = ".";
+ swappedNFI.NumberGroupSeparator = ",";
+ swappedNFI.CurrencyDecimalSeparator = ",";
+ swappedNFI.CurrencyGroupSeparator = ".";
+ swappedNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo distinctNFI = new NumberFormatInfo(); // DecimalSeparator & GroupSeparator distinct
+ distinctNFI.NumberDecimalSeparator = ".";
+ distinctNFI.NumberGroupSeparator = ",";
+ distinctNFI.CurrencyDecimalSeparator = ":";
+ distinctNFI.CurrencyGroupSeparator = ";";
+ distinctNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo customNFI = new NumberFormatInfo();
+ customNFI.NegativeSign = "^";
+
+ NumberFormatInfo ambigNFI = new NumberFormatInfo();
+ ambigNFI.NegativeSign = "^";
+ ambigNFI.CurrencySymbol = "^";
+
+ CultureInfo germanCulture = new CultureInfo("de-DE");
+ CultureInfo japaneseCulture;
+
+ try
+ {
+ japaneseCulture = new CultureInfo("ja-JP");
+ }
+ catch (Exception)
+ {
+ TestLibrary.Logging.WriteLine("East Asian Languages are not installed. Skiping Japanese culture tests.");
+ japaneseCulture = null;
+ }
+
+ // Parse tests included for comparison/regression
+ passed &= VerifyUInt32Parse("5", 5);
+ passed &= VerifyUInt32Parse("5 ", 5);
+ passed &= VerifyUInt32Parse("5\0", 5);
+ passed &= VerifyUInt32Parse("893382737", 893382737);
+ passed &= VerifyUInt32Parse("1234567891", 1234567891);
+ passed &= VerifyUInt32Parse("3123456789", 3123456789u);
+ passed &= VerifyUInt32Parse("5", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyUInt32Parse("5 \0", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyUInt32Parse("5\0\0\0", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyUInt32Parse("12", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0x12);
+ passed &= VerifyUInt32Parse("fF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFF);
+ passed &= VerifyUInt32Parse("5", NumberStyles.Integer, goodNFI, 5);
+ passed &= VerifyUInt32Parse("5.0", NumberStyles.AllowDecimalPoint, goodNFI, 5);
+ passed &= VerifyUInt32Parse("123", NumberStyles.Integer, germanCulture, 123);
+ passed &= VerifyUInt32Parse("123", NumberStyles.Integer, japaneseCulture, 123);
+ passed &= VerifyUInt32Parse("123.000", NumberStyles.Any, germanCulture, 123000);
+ passed &= VerifyUInt32Parse("123,000", NumberStyles.Any, japaneseCulture, 123000);
+ passed &= VerifyUInt32Parse("123,000", NumberStyles.AllowDecimalPoint, germanCulture, 123);
+ passed &= VerifyUInt32Parse("123.000", NumberStyles.AllowDecimalPoint, japaneseCulture, 123);
+ passed &= VerifyUInt32Parse("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 5); // currency
+ //
+ passed &= VerifyUInt32Parse("5", NumberStyles.Integer, corruptNFI, 5);
+ passed &= VerifyUInt32Parse("5", NumberStyles.Number, corruptNFI, 5);
+ passed &= VerifyUInt32Parse("5.0", NumberStyles.Number, corruptNFI, 5);
+ passed &= VerifyUInt32ParseException("5,0", NumberStyles.Number, corruptNFI, typeof(FormatException));
+ passed &= VerifyUInt32ParseException("5.0.0", NumberStyles.Number, corruptNFI, typeof(FormatException));
+ passed &= VerifyUInt32Parse("$5.0", NumberStyles.Currency, corruptNFI, 5);
+ passed &= VerifyUInt32ParseException("$5,0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyUInt32ParseException("$5.0.0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyUInt32Parse("5.0", NumberStyles.Currency, corruptNFI, 5);
+ passed &= VerifyUInt32ParseException("5,0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyUInt32ParseException("5.0.0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyUInt32Parse("5.0", NumberStyles.Any, corruptNFI, 5);
+ passed &= VerifyUInt32ParseException("5,0", NumberStyles.Any, corruptNFI, typeof(FormatException));
+ passed &= VerifyUInt32ParseException("5.0.0", NumberStyles.Any, corruptNFI, typeof(FormatException));
+ //
+ passed &= VerifyUInt32Parse("5", NumberStyles.Integer, swappedNFI, 5);
+ passed &= VerifyUInt32ParseException("1,234", NumberStyles.Integer, swappedNFI, typeof(FormatException));
+ passed &= VerifyUInt32Parse("5", NumberStyles.Number, swappedNFI, 5);
+ passed &= VerifyUInt32Parse("5.0", NumberStyles.Number, swappedNFI, 5);
+ passed &= VerifyUInt32Parse("1,234", NumberStyles.Number, swappedNFI, 1234);
+ passed &= VerifyUInt32Parse("1,234.0", NumberStyles.Number, swappedNFI, 1234);
+ passed &= VerifyUInt32ParseException("5.000.000", NumberStyles.Number, swappedNFI, typeof(FormatException));
+ passed &= VerifyUInt32ParseException("5.000,00", NumberStyles.Number, swappedNFI, typeof(FormatException));
+ passed &= VerifyUInt32Parse("5.000", NumberStyles.Currency, swappedNFI, 5); //???
+ passed &= VerifyUInt32ParseException("5.000,00", NumberStyles.Currency, swappedNFI, typeof(FormatException)); //???
+ passed &= VerifyUInt32Parse("$5.000", NumberStyles.Currency, swappedNFI, 5000);
+ passed &= VerifyUInt32Parse("$5.000,00", NumberStyles.Currency, swappedNFI, 5000);
+ passed &= VerifyUInt32Parse("5.000", NumberStyles.Any, swappedNFI, 5); //?
+ passed &= VerifyUInt32ParseException("5.000,00", NumberStyles.Any, swappedNFI, typeof(FormatException)); //?
+ passed &= VerifyUInt32Parse("$5.000", NumberStyles.Any, swappedNFI, 5000);
+ passed &= VerifyUInt32Parse("$5.000,00", NumberStyles.Any, swappedNFI, 5000);
+ passed &= VerifyUInt32Parse("5,0", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyUInt32Parse("$5,0", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyUInt32Parse("5,000", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyUInt32Parse("$5,000", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyUInt32ParseException("5,000.0", NumberStyles.Currency, swappedNFI, typeof(FormatException));
+ passed &= VerifyUInt32ParseException("$5,000.0", NumberStyles.Currency, swappedNFI, typeof(FormatException));
+ passed &= VerifyUInt32Parse("5,000", NumberStyles.Any, swappedNFI, 5);
+ passed &= VerifyUInt32Parse("$5,000", NumberStyles.Any, swappedNFI, 5);
+ passed &= VerifyUInt32ParseException("5,000.0", NumberStyles.Any, swappedNFI, typeof(FormatException));
+ passed &= VerifyUInt32ParseException("$5,000.0", NumberStyles.Any, swappedNFI, typeof(FormatException));
+ //
+ passed &= VerifyUInt32Parse("5.0", NumberStyles.Number, distinctNFI, 5);
+ passed &= VerifyUInt32Parse("1,234.0", NumberStyles.Number, distinctNFI, 1234);
+ passed &= VerifyUInt32Parse("5.0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyUInt32Parse("1,234.0", NumberStyles.Currency, distinctNFI, 1234);
+ passed &= VerifyUInt32Parse("5.0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyUInt32Parse("1,234.0", NumberStyles.Any, distinctNFI, 1234);
+ passed &= VerifyUInt32ParseException("$5.0", NumberStyles.Currency, distinctNFI, typeof(FormatException));
+ passed &= VerifyUInt32ParseException("$5.0", NumberStyles.Any, distinctNFI, typeof(FormatException));
+ passed &= VerifyUInt32ParseException("5:0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyUInt32ParseException("5;0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyUInt32ParseException("$5:0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyUInt32Parse("5:0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyUInt32Parse("5:000", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyUInt32Parse("5;000", NumberStyles.Currency, distinctNFI, 5000);
+ passed &= VerifyUInt32Parse("$5:0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyUInt32Parse("$5;0", NumberStyles.Currency, distinctNFI, 50);
+ passed &= VerifyUInt32Parse("5:0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyUInt32Parse("5;0", NumberStyles.Any, distinctNFI, 50);
+ passed &= VerifyUInt32Parse("$5:0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyUInt32Parse("$5;0", NumberStyles.Any, distinctNFI, 50);
+ passed &= VerifyUInt32ParseException("123,456;789.0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyUInt32Parse("123,456;789.0", NumberStyles.Currency, distinctNFI, 123456789);
+ passed &= VerifyUInt32Parse("123,456;789.0", NumberStyles.Any, distinctNFI, 123456789);
+ passed &= VerifyUInt32ParseException("$123,456;789.0", NumberStyles.Any, distinctNFI, typeof(FormatException));
+ //
+ passed &= VerifyUInt32ParseException("12345678912", typeof(OverflowException));
+ passed &= VerifyUInt32ParseException("5.3", NumberStyles.AllowDecimalPoint, goodNFI, typeof(OverflowException)); //weird that it's Overflow, but consistent with v1
+ passed &= VerifyUInt32ParseException("Garbage", typeof(FormatException));
+ passed &= VerifyUInt32ParseException("5\0Garbage", typeof(FormatException));
+ passed &= VerifyUInt32ParseException(null, typeof(ArgumentNullException));
+ passed &= VerifyUInt32ParseException("893382737", NumberStyles.HexNumber, CultureInfo.InvariantCulture, typeof(OverflowException));
+ passed &= VerifyUInt32ParseException("5", NumberStyles.AllowHexSpecifier | NumberStyles.AllowParentheses, null, typeof(ArgumentException));
+ passed &= VerifyUInt32ParseException("4", (NumberStyles)(-1), typeof(ArgumentException));
+ passed &= VerifyUInt32ParseException("4", (NumberStyles)0x10000, typeof(ArgumentException));
+ passed &= VerifyUInt32ParseException("4", (NumberStyles)(-1), CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyUInt32ParseException("4", (NumberStyles)0x10000, CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyUInt32ParseException("123.000.000.000", NumberStyles.Any, germanCulture, typeof(OverflowException));
+ passed &= VerifyUInt32ParseException("123,000,000,000", NumberStyles.Any, japaneseCulture, typeof(OverflowException));
+ passed &= VerifyUInt32ParseException("123,000,000,000", NumberStyles.Integer, germanCulture, typeof(FormatException));
+ passed &= VerifyUInt32ParseException("123.000.000.000", NumberStyles.Integer, japaneseCulture, typeof(FormatException));
+ passed &= VerifyUInt32ParseException("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Integer, germanCulture, typeof(FormatException)); // currency
+
+ /////////// TryParse(String)
+ //// Pass cases
+ passed &= VerifyUInt32TryParse("5", 5, true);
+ passed &= VerifyUInt32TryParse(" 5 ", 5, true);
+ passed &= VerifyUInt32TryParse("5\0", 5, true);
+ passed &= VerifyUInt32TryParse("5 \0", 5, true);
+ passed &= VerifyUInt32TryParse("5\0\0\0", 5, true);
+ passed &= VerifyUInt32TryParse("10000", 10000, true);
+ passed &= VerifyUInt32TryParse("893382737", 893382737, true);
+ passed &= VerifyUInt32TryParse("1234567891", 1234567891, true);
+ passed &= VerifyUInt32TryParse("3123456789", 3123456789u, true);
+ passed &= VerifyUInt32TryParse(UInt32.MaxValue.ToString(), UInt32.MaxValue, true);
+ passed &= VerifyUInt32TryParse(UInt32.MinValue.ToString(), UInt32.MinValue, true);
+
+ //// Fail cases
+ passed &= VerifyUInt32TryParse(null, 0, false);
+ passed &= VerifyUInt32TryParse("", 0, false);
+ passed &= VerifyUInt32TryParse("Garbage", 0, false);
+ passed &= VerifyUInt32TryParse("5\0Garbage", 0, false);
+ passed &= VerifyUInt32TryParse("-5", 0, false);
+ passed &= VerifyUInt32TryParse("12345678912", 0, false);
+ passed &= VerifyUInt32TryParse("FF", 0, false);
+ passed &= VerifyUInt32TryParse("27.3", 0, false);
+ passed &= VerifyUInt32TryParse("23 5", 0, false);
+
+
+ /////////// TryParse(TryParse(String, NumberStyles, IFormatProvider, ref UInt32)
+ //// Pass cases
+ passed &= VerifyUInt32TryParse("5", NumberStyles.Integer, CultureInfo.InvariantCulture, 5, true);
+ // Variations on NumberStyles
+ passed &= VerifyUInt32TryParse("12", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0x12, true);
+ passed &= VerifyUInt32TryParse("FF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFF, true);
+ passed &= VerifyUInt32TryParse("fF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFF, true);
+ passed &= VerifyUInt32TryParse("fFFFFFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFFFFFFFF, true);
+ passed &= VerifyUInt32TryParse(" 5", NumberStyles.AllowLeadingWhite, goodNFI, 5, true);
+ passed &= VerifyUInt32TryParse("5", NumberStyles.Number, goodNFI, 5, true);
+ passed &= VerifyUInt32TryParse("5.0", NumberStyles.AllowDecimalPoint, goodNFI, 5, true);
+ // Variations on IFP
+ passed &= VerifyUInt32TryParse("5", NumberStyles.Integer, goodNFI, 5, true);
+ passed &= VerifyUInt32TryParse("5", NumberStyles.Integer, null, 5, true);
+ passed &= VerifyUInt32TryParse("5", NumberStyles.Integer, new DateTimeFormatInfo(), 5, true);
+ passed &= VerifyUInt32TryParse("123", NumberStyles.Integer, germanCulture, 123, true);
+ passed &= VerifyUInt32TryParse("123", NumberStyles.Integer, japaneseCulture, 123, true);
+ passed &= VerifyUInt32TryParse("123.000", NumberStyles.Any, germanCulture, 123000, true);
+ passed &= VerifyUInt32TryParse("123,000", NumberStyles.Any, japaneseCulture, 123000, true);
+ passed &= VerifyUInt32TryParse("123,000", NumberStyles.AllowDecimalPoint, germanCulture, 123, true);
+ passed &= VerifyUInt32TryParse("123.000", NumberStyles.AllowDecimalPoint, japaneseCulture, 123, true);
+ passed &= VerifyUInt32TryParse("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 5, true); // currency
+
+ //// Fail cases
+ passed &= VerifyUInt32TryParse("-5", NumberStyles.Integer, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifyUInt32TryParse("FF", NumberStyles.Integer, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifyUInt32TryParse("893382737", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifyUInt32TryParse("^42", NumberStyles.Any, customNFI, 0, false);
+ passed &= VerifyUInt32TryParse("-42", NumberStyles.Any, customNFI, 0, false);
+ passed &= VerifyUInt32TryParse("5.3", NumberStyles.AllowDecimalPoint, goodNFI, 0, false);
+ passed &= VerifyUInt32TryParse("5 ", NumberStyles.AllowLeadingWhite, goodNFI, 0, false);
+ passed &= VerifyUInt32TryParse("123.000.000.000", NumberStyles.Any, germanCulture, 0, false);
+ passed &= VerifyUInt32TryParse("123,000,000,000", NumberStyles.Any, japaneseCulture, 0, false);
+ passed &= VerifyUInt32TryParse("123,000,000,000", NumberStyles.Integer, germanCulture, 0, false);
+ passed &= VerifyUInt32TryParse("123.000.000.000", NumberStyles.Integer, japaneseCulture, 0, false);
+ passed &= VerifyUInt32TryParse("5,00 \u20AC", NumberStyles.Integer, germanCulture, 0, false); // currency
+
+ //// Exception cases
+ passed &= VerifyUInt32TryParseException("5", NumberStyles.AllowHexSpecifier | NumberStyles.AllowParentheses, null, typeof(ArgumentException));
+ passed &= VerifyUInt32TryParseException("4", (NumberStyles)(-1), CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyUInt32TryParseException("4", (NumberStyles)0x10000, CultureInfo.InvariantCulture, typeof(ArgumentException));
+
+ // NumberStyles/NFI variations
+ //
+ passed &= VerifyUInt32TryParse("5", NumberStyles.Integer, corruptNFI, 5, true);
+ passed &= VerifyUInt32TryParse("5", NumberStyles.Number, corruptNFI, 5, true);
+ passed &= VerifyUInt32TryParse("5.0", NumberStyles.Number, corruptNFI, 5, true);
+ passed &= VerifyUInt32TryParse("5,0", NumberStyles.Number, corruptNFI, 0, false);
+ passed &= VerifyUInt32TryParse("5.0.0", NumberStyles.Number, corruptNFI, 0, false);
+ passed &= VerifyUInt32TryParse("$5.0", NumberStyles.Currency, corruptNFI, 5, true);
+ passed &= VerifyUInt32TryParse("$5,0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyUInt32TryParse("$5.0.0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyUInt32TryParse("5.0", NumberStyles.Currency, corruptNFI, 5, true);
+ passed &= VerifyUInt32TryParse("5,0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyUInt32TryParse("5.0.0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyUInt32TryParse("5.0", NumberStyles.Any, corruptNFI, 5, true);
+ passed &= VerifyUInt32TryParse("5,0", NumberStyles.Any, corruptNFI, 0, false);
+ passed &= VerifyUInt32TryParse("5.0.0", NumberStyles.Any, corruptNFI, 0, false);
+ //
+ passed &= VerifyUInt32TryParse("5", NumberStyles.Integer, swappedNFI, 5, true);
+ passed &= VerifyUInt32TryParse("1,234", NumberStyles.Integer, swappedNFI, 0, false);
+ passed &= VerifyUInt32TryParse("5", NumberStyles.Number, swappedNFI, 5, true);
+ passed &= VerifyUInt32TryParse("5.0", NumberStyles.Number, swappedNFI, 5, true);
+ passed &= VerifyUInt32TryParse("1,234", NumberStyles.Number, swappedNFI, 1234, true);
+ passed &= VerifyUInt32TryParse("1,234.0", NumberStyles.Number, swappedNFI, 1234, true);
+ passed &= VerifyUInt32TryParse("5.000.000", NumberStyles.Number, swappedNFI, 0, false);
+ passed &= VerifyUInt32TryParse("5.000,00", NumberStyles.Number, swappedNFI, 0, false);
+ passed &= VerifyUInt32TryParse("5.000", NumberStyles.Currency, swappedNFI, 5, true); //???
+ passed &= VerifyUInt32TryParse("5.000,00", NumberStyles.Currency, swappedNFI, 0, false); //???
+ passed &= VerifyUInt32TryParse("$5.000", NumberStyles.Currency, swappedNFI, 5000, true);
+ passed &= VerifyUInt32TryParse("$5.000,00", NumberStyles.Currency, swappedNFI, 5000, true);
+ passed &= VerifyUInt32TryParse("5.000", NumberStyles.Any, swappedNFI, 5, true); //?
+ passed &= VerifyUInt32TryParse("5.000,00", NumberStyles.Any, swappedNFI, 0, false); //?
+ passed &= VerifyUInt32TryParse("$5.000", NumberStyles.Any, swappedNFI, 5000, true);
+ passed &= VerifyUInt32TryParse("$5.000,00", NumberStyles.Any, swappedNFI, 5000, true);
+ passed &= VerifyUInt32TryParse("5,0", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyUInt32TryParse("$5,0", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyUInt32TryParse("5,000", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyUInt32TryParse("$5,000", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyUInt32TryParse("5,000.0", NumberStyles.Currency, swappedNFI, 0, false);
+ passed &= VerifyUInt32TryParse("$5,000.0", NumberStyles.Currency, swappedNFI, 0, false);
+ passed &= VerifyUInt32TryParse("5,000", NumberStyles.Any, swappedNFI, 5, true);
+ passed &= VerifyUInt32TryParse("$5,000", NumberStyles.Any, swappedNFI, 5, true);
+ passed &= VerifyUInt32TryParse("5,000.0", NumberStyles.Any, swappedNFI, 0, false);
+ passed &= VerifyUInt32TryParse("$5,000.0", NumberStyles.Any, swappedNFI, 0, false);
+ //
+ passed &= VerifyUInt32TryParse("5.0", NumberStyles.Number, distinctNFI, 5, true);
+ passed &= VerifyUInt32TryParse("1,234.0", NumberStyles.Number, distinctNFI, 1234, true);
+ passed &= VerifyUInt32TryParse("5.0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyUInt32TryParse("1,234.0", NumberStyles.Currency, distinctNFI, 1234, true);
+ passed &= VerifyUInt32TryParse("5.0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyUInt32TryParse("1,234.0", NumberStyles.Any, distinctNFI, 1234, true);
+ passed &= VerifyUInt32TryParse("$5.0", NumberStyles.Currency, distinctNFI, 0, false);
+ passed &= VerifyUInt32TryParse("$5.0", NumberStyles.Any, distinctNFI, 0, false);
+ passed &= VerifyUInt32TryParse("5:0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyUInt32TryParse("5;0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyUInt32TryParse("$5:0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyUInt32TryParse("5:0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyUInt32TryParse("5:000", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyUInt32TryParse("5;000", NumberStyles.Currency, distinctNFI, 5000, true);
+ passed &= VerifyUInt32TryParse("$5:0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyUInt32TryParse("$5;0", NumberStyles.Currency, distinctNFI, 50, true);
+ passed &= VerifyUInt32TryParse("5:0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyUInt32TryParse("5;0", NumberStyles.Any, distinctNFI, 50, true);
+ passed &= VerifyUInt32TryParse("$5:0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyUInt32TryParse("$5;0", NumberStyles.Any, distinctNFI, 50, true);
+ passed &= VerifyUInt32TryParse("123,456;789.0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyUInt32TryParse("123,456;789.0", NumberStyles.Currency, distinctNFI, 123456789, true);
+ passed &= VerifyUInt32TryParse("123,456;789.0", NumberStyles.Any, distinctNFI, 123456789, true);
+ passed &= VerifyUInt32TryParse("$123,456;789.0", NumberStyles.Any, distinctNFI, 0, false);
+
+
+ // Should these pass or fail? Current parse behavior is to pass, so they might be
+ // parse bugs, but they're not tryparse bugs.
+ passed &= VerifyUInt32Parse("5", NumberStyles.Float, goodNFI, 5);
+ passed &= VerifyUInt32TryParse("5", NumberStyles.Float, goodNFI, 5, true);
+ passed &= VerifyUInt32Parse("5", NumberStyles.AllowDecimalPoint, goodNFI, 5);
+ passed &= VerifyUInt32TryParse("5", NumberStyles.AllowDecimalPoint, goodNFI, 5, true);
+ // I expect ArgumentException with an ambiguous NFI
+ passed &= VerifyUInt32ParseException("^42", NumberStyles.Any, ambigNFI, typeof(OverflowException));
+ passed &= VerifyUInt32TryParse("^42", NumberStyles.Any, ambigNFI, 0, false);
+
+ /// END TEST CASES
+ }
+ catch (Exception e)
+ {
+ TestLibrary.Logging.WriteLine("Unexpected exception!! " + e.ToString());
+ passed = false;
+ }
+
+ if (passed)
+ {
+ TestLibrary.Logging.WriteLine("paSs");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.Logging.WriteLine("FAiL");
+ return 1;
+ }
+ }
+
+ public static bool VerifyUInt32TryParse(string value, UInt32 expectedResult, bool expectedReturn)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt32.TryParse, Value = '{0}', Expected Result = {1}, Expected Return = {2}",
+ value, expectedResult, expectedReturn);
+ }
+ UInt32 result = 0;
+ try
+ {
+ bool returnValue = UInt32.TryParse(value, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedReturn, returnValue);
+ return false;
+ }
+ if (result != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, result);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyUInt32TryParse(string value, NumberStyles style, IFormatProvider provider, UInt32 expectedResult, bool expectedReturn)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt32.TryParse, Value = '{0}', Style = {1}, Provider = {2}, Expected Result = {3}, Expected Return = {4}",
+ value, style, provider, expectedResult, expectedReturn);
+ }
+ UInt32 result = 0;
+ try
+ {
+ bool returnValue = UInt32.TryParse(value, style, provider, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Style = {1}, Provider = {2}, Expected Return = {3}, Actual Return = {4}",
+ value, style, provider, expectedReturn, returnValue);
+ return false;
+ }
+ if (result != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, result);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyUInt32TryParseException(string value, NumberStyles style, IFormatProvider provider, Type exceptionType)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt32.TryParse, Value = '{0}', Style = {1}, Provider = {2}, Expected Exception = {3}",
+ value, style, provider, exceptionType);
+ }
+ try
+ {
+ UInt32 result = 0;
+ Boolean returnValue = UInt32.TryParse(value, style, provider, out result);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyUInt32Parse(string value, UInt32 expectedResult)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt32.Parse, Value = '{0}', Expected Result, {1}",
+ value, expectedResult);
+ }
+ try
+ {
+ UInt32 returnValue = UInt32.Parse(value);
+ if (returnValue != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, returnValue);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyUInt32Parse(string value, NumberStyles style, IFormatProvider provider, UInt32 expectedResult)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt32.Parse, Value = '{0}', Style = {1}, provider = {2}, Expected Result = {3}",
+ value, style, provider, expectedResult);
+ }
+ try
+ {
+ UInt32 returnValue = UInt32.Parse(value, style, provider);
+ if (returnValue != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, returnValue);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyUInt32ParseException(string value, Type exceptionType)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt32.Parse, Value = '{0}', Expected Exception, {1}",
+ value, exceptionType);
+ }
+ try
+ {
+ UInt32 returnValue = UInt32.Parse(value);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyUInt32ParseException(string value, NumberStyles style, Type exceptionType)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt32.Parse, Value = '{0}', Style = {1}, Expected Exception = {3}",
+ value, style, exceptionType);
+ }
+ try
+ {
+ UInt32 returnValue = UInt32.Parse(value, style);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyUInt32ParseException(string value, NumberStyles style, IFormatProvider provider, Type exceptionType)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt32.Parse, Value = '{0}', Style = {1}, Provider = {2}, Expected Exception = {3}",
+ value, style, provider, exceptionType);
+ }
+ try
+ {
+ UInt32 returnValue = UInt32.Parse(value, style, provider);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint64/UInt64GetHashCode.csproj b/tests/src/CoreMangLib/cti/system/uint64/UInt64GetHashCode.csproj
new file mode 100644
index 0000000000..19d821dc9d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/UInt64GetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint64gethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToBoolean.csproj b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToBoolean.csproj
new file mode 100644
index 0000000000..adc08df10d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToBoolean.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint64iconvertibletoboolean.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToByte.csproj b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToByte.csproj
new file mode 100644
index 0000000000..a07a48a75b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint64iconvertibletobyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToChar.csproj b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToChar.csproj
new file mode 100644
index 0000000000..165f25cb78
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToChar.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint64iconvertibletochar.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToDateTime.csproj b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToDateTime.csproj
new file mode 100644
index 0000000000..84f8043244
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToDateTime.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint64iconvertibletodatetime.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToDecimal.csproj b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToDecimal.csproj
new file mode 100644
index 0000000000..0eef2007a2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToDecimal.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint64iconvertibletodecimal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToDouble.csproj b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToDouble.csproj
new file mode 100644
index 0000000000..a19cce628a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToDouble.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint64iconvertibletodouble.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToInt16.csproj b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToInt16.csproj
new file mode 100644
index 0000000000..2be022a244
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint64iconvertibletoint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToInt32.csproj b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToInt32.csproj
new file mode 100644
index 0000000000..a2d05cd173
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint64iconvertibletoint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToInt64.csproj b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToInt64.csproj
new file mode 100644
index 0000000000..cafec991e9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint64iconvertibletoint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToSByte.csproj b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToSByte.csproj
new file mode 100644
index 0000000000..7095a84289
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToSByte.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint64iconvertibletosbyte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToSingle.csproj b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToSingle.csproj
new file mode 100644
index 0000000000..5cbd0d95e0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToSingle.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint64iconvertibletosingle.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToType.csproj b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToType.csproj
new file mode 100644
index 0000000000..abe509aad6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToType.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint64iconvertibletotype.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToUInt16.csproj b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToUInt16.csproj
new file mode 100644
index 0000000000..5fa0dff502
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToUInt16.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint64iconvertibletouint16.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToUInt32.csproj b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToUInt32.csproj
new file mode 100644
index 0000000000..087328ffc8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToUInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint64iconvertibletouint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToUInt64.csproj b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToUInt64.csproj
new file mode 100644
index 0000000000..f6be59d831
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/UInt64IConvertibleToUInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint64iconvertibletouint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint64/UInt64MaxValue.csproj b/tests/src/CoreMangLib/cti/system/uint64/UInt64MaxValue.csproj
new file mode 100644
index 0000000000..f36ae034de
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/UInt64MaxValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint64maxvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint64/UInt64MinValue.csproj b/tests/src/CoreMangLib/cti/system/uint64/UInt64MinValue.csproj
new file mode 100644
index 0000000000..28b995e1e7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/UInt64MinValue.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint64minvalue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint64/UInt64Parse1.csproj b/tests/src/CoreMangLib/cti/system/uint64/UInt64Parse1.csproj
new file mode 100644
index 0000000000..dd33407efe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/UInt64Parse1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint64parse1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint64/UInt64Parse2.csproj b/tests/src/CoreMangLib/cti/system/uint64/UInt64Parse2.csproj
new file mode 100644
index 0000000000..238fc3035b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/UInt64Parse2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint64parse2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint64/UInt64Parse3.csproj b/tests/src/CoreMangLib/cti/system/uint64/UInt64Parse3.csproj
new file mode 100644
index 0000000000..4ef7bc1fca
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/UInt64Parse3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint64parse3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint64/UInt64ToString2.csproj b/tests/src/CoreMangLib/cti/system/uint64/UInt64ToString2.csproj
new file mode 100644
index 0000000000..094aeb2d39
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/UInt64ToString2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint64tostring2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint64/UInt64TryParse.csproj b/tests/src/CoreMangLib/cti/system/uint64/UInt64TryParse.csproj
new file mode 100644
index 0000000000..1c268ba958
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/UInt64TryParse.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uint64tryparse.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uint64/uint64gethashcode.cs b/tests/src/CoreMangLib/cti/system/uint64/uint64gethashcode.cs
new file mode 100644
index 0000000000..0f41e4331c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/uint64gethashcode.cs
@@ -0,0 +1,119 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.UInt64.GetHashCode
+/// </summary>
+public class UInt64GetHashCode
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Check the return hash code not equal to zero");
+
+ try
+ {
+ UInt64 u64 = this.GetUInt64(0, UInt64.MaxValue);
+ int hash = u64.GetHashCode();
+ if (hash == 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "UInt64.gethashcode is equal to zero : " + u64);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Check the return hash code is the same");
+
+ try
+ {
+ UInt64 u64 = this.GetUInt64(0, UInt64.MaxValue);
+ int hash1 = u64.GetHashCode();
+ int hash2 = u64.GetHashCode();
+ if (hash1 != hash2)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected " + u64);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ UInt64GetHashCode test = new UInt64GetHashCode();
+
+ TestLibrary.TestFramework.BeginTestCase("UInt64GetHashCode");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ private UInt64 GetUInt64(ulong minValue, ulong maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return (ulong)(minValue + (ulong)TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue));
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletoboolean.cs b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletoboolean.cs
new file mode 100644
index 0000000000..90e3c88a9d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletoboolean.cs
@@ -0,0 +1,156 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt64.System.IConvertible.ToBoolean
+/// </summary>
+public class UInt64IConvertibleToBoolean
+{
+ public static int Main()
+ {
+ UInt64IConvertibleToBoolean ui64ictbool = new UInt64IConvertibleToBoolean();
+ TestLibrary.TestFramework.BeginTestCase("UInt64IConvertibleToBoolean");
+ if (ui64ictbool.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: genarate a random UInt64 to boolean 1");
+
+ try
+ {
+ UInt64 uintA = (UInt64)this.GetInt64(1, Int64.MaxValue);
+ IConvertible iConvert = (IConvertible)(uintA);
+ if (!iConvert.ToBoolean(null))
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: genarate a random UInt64 to boolean 2");
+
+ try
+ {
+ UInt64 uintA = (UInt64)(this.GetInt64(1, Int64.MaxValue) + this.GetInt64(0, Int64.MaxValue));
+ IConvertible iConvert = (IConvertible)(uintA);
+ if (!iConvert.ToBoolean(null))
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: UInt64 MinValue to boolean");
+
+ try
+ {
+ UInt64 uintA = UInt64.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ if (iConvert.ToBoolean(null))
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: UInt64MaxValue to boolean");
+
+ try
+ {
+ UInt64 uintA = UInt64.MaxValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ if (!iConvert.ToBoolean(null))
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private UInt64 GetInt64(UInt64 minValue, UInt64 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + (UInt64)TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletobyte.cs b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletobyte.cs
new file mode 100644
index 0000000000..416c55b66b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletobyte.cs
@@ -0,0 +1,134 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt64.System.IConvertible.ToByte
+/// </summary>
+public class UInt64IConvertibleToByte
+{
+ public static int Main()
+ {
+ UInt64IConvertibleToByte ui64ictbyte = new UInt64IConvertibleToByte();
+ TestLibrary.TestFramework.BeginTestCase("UInt64IConvertibleToByte");
+ if (ui64ictbyte.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: genarate a random UInt64to byte");
+
+ try
+ {
+ UInt64 uintA = (UInt64)this.GetInt64(1, 256);
+ IConvertible iConvert = (IConvertible)(uintA);
+ Byte byteA = iConvert.ToByte(null);
+ if (byteA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: UInt64 MinValue to byte");
+
+ try
+ {
+ UInt64 uintA = UInt64.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Byte byteA = iConvert.ToByte(null);
+ if (byteA != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Number between 256 to UInt64.MaxValue to Byte");
+
+ try
+ {
+ UInt64 uintA = this.GetInt64(256, UInt64.MaxValue);
+ IConvertible iConvert = (IConvertible)(uintA);
+ Byte byteA = iConvert.ToByte(null);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private UInt64 GetInt64(UInt64 minValue, UInt64 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + (UInt64)TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletochar.cs b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletochar.cs
new file mode 100644
index 0000000000..4a80e4ab3c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletochar.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt64.System.IConvertible.ToChar
+/// </summary>
+public class UInt64IConvertibleToChar
+{
+ public static int Main()
+ {
+ UInt64IConvertibleToChar ui64ictchar = new UInt64IConvertibleToChar();
+ TestLibrary.TestFramework.BeginTestCase("UInt64IConvertibleToChar");
+ if (ui64ictchar.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: genarate a random UInt64 to char");
+
+ try
+ {
+ UInt64 uintA = this.GetInt64(1, 65536);
+ IConvertible iConvert = (IConvertible)(uintA);
+ Char charA = iConvert.ToChar(null);
+ if (charA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: UInt64.MinValue to Char");
+
+ try
+ {
+ UInt64 uintA = UInt64.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Char charA = iConvert.ToChar(null);
+ if (charA != 0)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Number between 65536 to UInt64.MaxValue to char");
+
+ try
+ {
+ UInt64 uintA = this.GetInt64(65536, Int64.MaxValue);
+ IConvertible iConvert = (IConvertible)(uintA);
+ Char charA = iConvert.ToChar(null);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private UInt64 GetInt64(UInt64 minValue, UInt64 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + (UInt64)TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletodatetime.cs b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletodatetime.cs
new file mode 100644
index 0000000000..8f0993248c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletodatetime.cs
@@ -0,0 +1,123 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UInt64.System.IConvertible.ToDateTime
+/// </summary>
+public class UInt64IConvertibleToDateTime
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: Convert an random UInt64 to DateTime ");
+
+ try
+ {
+ UInt64 u64 = (ulong)TestLibrary.Generator.GetInt64(-55);
+ IConvertible Icon1 = (IConvertible)u64;
+ DateTime d1 = Icon1.ToDateTime(null);
+ TestLibrary.TestFramework.LogError("101", "The InvalidCastException was not thrown as expected");
+ retVal = false;
+
+ }
+ catch (System.InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: Convert zero to DateTime ");
+
+ try
+ {
+ UInt64 u64 = 0;
+ DateTime d1 = (u64 as IConvertible).ToDateTime(null);
+ TestLibrary.TestFramework.LogError("103", "The InvalidCastException was not thrown as expected");
+ retVal = false;
+
+ }
+ catch (System.InvalidCastException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ UInt64IConvertibleToDateTime test = new UInt64IConvertibleToDateTime();
+
+ TestLibrary.TestFramework.BeginTestCase("UInt64IConvertibleToDateTime");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region ForTestObject
+ private UInt64 GetInt64(UInt64 minValue, UInt64 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + (UInt64)TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletodecimal.cs b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletodecimal.cs
new file mode 100644
index 0000000000..450aaef291
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletodecimal.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt64.System.IConvertible.ToDecimal
+/// </summary>
+public class UInt64IConvertibleToDecimal
+{
+ public static int Main()
+ {
+ UInt64IConvertibleToDecimal ui64ictdecimal = new UInt64IConvertibleToDecimal();
+ TestLibrary.TestFramework.BeginTestCase("UInt64IConvertibleToDecimal");
+ if (ui64ictdecimal.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:UInt64 MaxValue to Decimal");
+
+ try
+ {
+ UInt64 uintA = UInt64.MaxValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Decimal decimalA = iConvert.ToDecimal(null);
+ if (decimalA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:UInt64 MinValue to Decimal");
+
+ try
+ {
+ UInt64 uintA = UInt64.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Decimal decimalA = iConvert.ToDecimal(null);
+ if (decimalA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Random UInt64 between minValue and MaxValue to Decimal");
+
+ try
+ {
+ UInt64 uintA = this.GetInt64(1, UInt64.MaxValue);
+ IConvertible iConvert = (IConvertible)(uintA);
+ Decimal decimalA = iConvert.ToDecimal(null);
+ if (decimalA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private UInt64 GetInt64(UInt64 minValue, UInt64 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + (UInt64)TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletodouble.cs b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletodouble.cs
new file mode 100644
index 0000000000..8c6b560b5e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletodouble.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt64.System.IConvertible.ToDouble
+/// </summary>
+public class UInt64IConvertibleToDouble
+{
+ public static int Main()
+ {
+ UInt64IConvertibleToDouble ui64ictdouble = new UInt64IConvertibleToDouble();
+ TestLibrary.TestFramework.BeginTestCase("UInt64IConvertibleToDouble");
+ if (ui64ictdouble.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:UInt64 MaxValue to Double");
+
+ try
+ {
+ UInt64 uintA = UInt64.MaxValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Double doubleA = iConvert.ToDouble(null);
+ if (doubleA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:UInt64 MinValue to Double");
+
+ try
+ {
+ UInt64 uintA = UInt64.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Double doubleA = iConvert.ToDouble(null);
+ if (doubleA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Random UInt64 between minValue and MaxValue to Double");
+
+ try
+ {
+ UInt64 uintA = this.GetInt64(0, UInt64.MaxValue);
+ IConvertible iConvert = (IConvertible)(uintA);
+ Double doubleA = iConvert.ToDouble(null);
+ if (doubleA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private UInt64 GetInt64(UInt64 minValue, UInt64 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + (UInt64)TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletoint16.cs b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletoint16.cs
new file mode 100644
index 0000000000..fa42d29dae
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletoint16.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt64.System.IConvertible.ToInt16
+/// </summary>
+public class UInt64IConvertibleToInt16
+{
+ public static int Main()
+ {
+ UInt64IConvertibleToInt16 ui64ictuint16 = new UInt64IConvertibleToInt16();
+ TestLibrary.TestFramework.BeginTestCase("UInt64IConvertibleToInt16");
+ if (ui64ictuint16.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:UInt64 MinValue to Int16");
+ try
+ {
+ UInt64 uintA = UInt64.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int16 int16A = iConvert.ToInt16(null);
+ if ((ulong)int16A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:UInt64 number between UInt64.MinValue to Int16.MaxValue");
+ try
+ {
+ UInt64 uintA = this.GetInt64(0, Int16.MaxValue + 1);
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int16 int16A = iConvert.ToInt16(null);
+ if ((ulong)int16A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:UInt64 number between Int16.MaxValue to UInt64.MaxValue");
+
+ try
+ {
+ UInt64 uintA = this.GetInt64(Int16.MaxValue + 1, UInt64.MaxValue); ;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int16 int16A = iConvert.ToInt16(null);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private UInt64 GetInt64(UInt64 minValue, UInt64 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + (UInt64)TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletoint32.cs b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletoint32.cs
new file mode 100644
index 0000000000..da152b925a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletoint32.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt64.System.IConvertible.ToInt32
+/// </summary>
+public class UInt64IConvertibleToInt32
+{
+ public static int Main()
+ {
+ UInt64IConvertibleToInt32 ui64ictuint32 = new UInt64IConvertibleToInt32();
+ TestLibrary.TestFramework.BeginTestCase("UInt64IConvertibleToInt32");
+ if (ui64ictuint32.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:UInt64 MinValue to Int32");
+ try
+ {
+ UInt64 uintA = UInt64.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int32 int32A = iConvert.ToInt32(null);
+ if ((ulong)int32A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:UInt64 number between UInt64.MinValue to Int32.MaxValue");
+ try
+ {
+ UInt64 uintA = this.GetInt64(0, Int32.MaxValue);
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int32 int32A = iConvert.ToInt32(null);
+ if ((ulong)int32A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:UInt64 number between Int32.MaxValue to UInt64.MaxValue");
+
+ try
+ {
+ UInt64 uintA = this.GetInt64((ulong)(Int32.MaxValue) + 1, UInt64.MaxValue); ;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int32 int32A = iConvert.ToInt32(null);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private UInt64 GetInt64(UInt64 minValue, UInt64 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + (UInt64)TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletoint64.cs b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletoint64.cs
new file mode 100644
index 0000000000..18159d9462
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletoint64.cs
@@ -0,0 +1,133 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt64.System.IConvertible.ToInt64
+/// </summary>
+public class UInt64IConvertibleToInt64
+{
+ public static int Main()
+ {
+ UInt64IConvertibleToInt64 ui64ictuint64 = new UInt64IConvertibleToInt64();
+ TestLibrary.TestFramework.BeginTestCase("UInt64IConvertibleToInt64");
+ if (ui64ictuint64.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:UInt64 MinValue to Int64");
+ try
+ {
+ UInt64 uintA = UInt64.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int64 int64A = iConvert.ToInt64(null);
+ if ((ulong)int64A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:UInt64 number between UInt64.MinValue to Int64.MaxValue");
+ try
+ {
+
+ UInt64 uintA = this.GetInt64(0, (ulong)(Int64.MaxValue) + 1);
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int64 int64A = iConvert.ToInt64(null);
+ if ((ulong)int64A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:UInt64 number between Int64.MaxValue to UInt64.MaxValue");
+
+ try
+ {
+ UInt64 uintA = this.GetInt64((ulong)(Int64.MaxValue) + 1, UInt64.MaxValue); ;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int64 int64A = iConvert.ToInt64(null);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private UInt64 GetInt64(UInt64 minValue, UInt64 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + (UInt64)TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletosbyte.cs b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletosbyte.cs
new file mode 100644
index 0000000000..f485546007
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletosbyte.cs
@@ -0,0 +1,132 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt64.System.IConvertible.ToSByte
+/// </summary>
+public class UInt64IConvertibleToSByte
+{
+ public static int Main()
+ {
+ UInt64IConvertibleToSByte ui64ictSByte = new UInt64IConvertibleToSByte();
+ TestLibrary.TestFramework.BeginTestCase("UInt64IConvertibleToSByte");
+ if (ui64ictSByte.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:UInt64 MinValue to SByte");
+ try
+ {
+ UInt64 uintA = UInt64.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ SByte sByte = iConvert.ToSByte(null);
+ if ((ulong)sByte != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:UInt64 number between UInt64.MinValue to SByte.MaxValue");
+ try
+ {
+ UInt64 uintA = this.GetInt64(0, SByte.MaxValue + 1);
+ IConvertible iConvert = (IConvertible)(uintA);
+ SByte sByte = iConvert.ToSByte(null);
+ if ((ulong)sByte != uintA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:UInt64 number between SByte.MaxValue to UInt64.MaxValue");
+
+ try
+ {
+ UInt64 uintA = this.GetInt64(SByte.MaxValue + 1, UInt64.MaxValue);
+ IConvertible iConvert = (IConvertible)(uintA);
+ SByte sByte = iConvert.ToSByte(null);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private UInt64 GetInt64(UInt64 minValue, UInt64 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + (UInt64)TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletosingle.cs b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletosingle.cs
new file mode 100644
index 0000000000..0d319e1192
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletosingle.cs
@@ -0,0 +1,129 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt64.System.IConvertible.ToSingle
+/// </summary>
+public class UInt64IConvertibleToSingle
+{
+ public static int Main()
+ {
+ UInt64IConvertibleToSingle ui64ictSingle = new UInt64IConvertibleToSingle();
+ TestLibrary.TestFramework.BeginTestCase("UInt64IConvertibleToSingle");
+ if (ui64ictSingle.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:UInt64 MinValue to SByte");
+ try
+ {
+ UInt64 uintA = UInt64.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Single single = iConvert.ToSingle(null);
+ if ((ulong)single != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:Convert a random Uint64 less than 10000000 to float");
+ try
+ {
+ UInt64 uintA = this.GetInt64(0, 10000000);
+ IConvertible iConvert = (IConvertible)(uintA);
+ Single single = iConvert.ToSingle(null);
+ if (single != (float)uintA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:Convert a random UInt64 between 10000000 UInt64.MaxValue to Single");
+ try
+ {
+ UInt64 uintA = this.GetInt64(10000000, UInt64.MaxValue);
+ IConvertible iConvert = (IConvertible)(uintA);
+ Single single = iConvert.ToSingle(null);
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ #endregion
+ #region ForTestObject
+ private UInt64 GetInt64(UInt64 minValue, UInt64 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + (UInt64)TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletotype.cs b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletotype.cs
new file mode 100644
index 0000000000..38f9cdf4a0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletotype.cs
@@ -0,0 +1,300 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// UInt64.System.IConvertible.ToType(Type,provider)
+/// </summary>
+public class UInt64IConvertibleToType
+{
+ public static int Main()
+ {
+ UInt64IConvertibleToType ui64icttype = new UInt64IConvertibleToType();
+ TestLibrary.TestFramework.BeginTestCase("UInt64IConvertibleToType");
+ if (ui64icttype.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:UInt64 MinValue to Type of string");
+
+ try
+ {
+ UInt64 uintA = UInt64.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ string strA = (string)iConvert.ToType(typeof(string), null);
+ if (strA != uintA.ToString())
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:UInt64 MinValue to Type of bool");
+
+ try
+ {
+ UInt64 uintA = UInt64.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ bool boolA = (bool)iConvert.ToType(typeof(bool), null);
+ if (boolA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3:UInt64 MaxValue to Type of bool");
+
+ try
+ {
+ UInt64 uintA = UInt64.MaxValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ bool boolA = (bool)iConvert.ToType(typeof(bool), null);
+ if (!boolA)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4:Convert a random UInt64 to Type of double,decimal and single");
+
+ try
+ {
+ UInt64 uintA = this.GetInt64(0, UInt64.MaxValue); ;
+ IConvertible iConvert = (IConvertible)(uintA);
+ Double doubleA = (Double)iConvert.ToType(typeof(Double), null);
+ Decimal decimalA = (Decimal)iConvert.ToType(typeof(Decimal), null);
+ Single singleA = (Single)iConvert.ToType(typeof(Single), null);
+ if (doubleA != uintA || decimalA != uintA || singleA != uintA)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest5:UInt64 between MinValue to Int32.Max to Type of Int32");
+
+ try
+ {
+ UInt64 uintA = this.GetInt64(0, Int32.MaxValue);
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int32 int32A = (Int32)iConvert.ToType(typeof(Int32), null);
+ if (int32A != (Int32)uintA)
+ {
+ TestLibrary.TestFramework.LogError("009", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest6:UInt64 between MinValue to Int16.Max to Type of Int16");
+
+ try
+ {
+ UInt64 uintA = this.GetInt64(0, Int16.MaxValue + 1);
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int16 int16A = (Int16)iConvert.ToType(typeof(Int16), null);
+ if (int16A != (Int16)uintA)
+ {
+ TestLibrary.TestFramework.LogError("011", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest7:UInt64 between MinValue and SByte.Max to Type of SByte");
+
+ try
+ {
+ UInt64 uintA = this.GetInt64(0, SByte.MaxValue + 1);
+ IConvertible iConvert = (IConvertible)(uintA);
+ SByte sbyteA = (SByte)iConvert.ToType(typeof(SByte), null);
+ if (sbyteA != (SByte)uintA)
+ {
+ TestLibrary.TestFramework.LogError("013", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest8()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest8:UInt64 between MinValue and Byte.Max to Type of Byte");
+
+ try
+ {
+ UInt64 uintA = this.GetInt64(0, Byte.MaxValue + 1);
+ IConvertible iConvert = (IConvertible)(uintA);
+ Byte byteA = (Byte)iConvert.ToType(typeof(Byte), null);
+ if (byteA != (Byte)uintA)
+ {
+ TestLibrary.TestFramework.LogError("015", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("016", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:UInt64 between Int32.MaxValue and UInt64.MaxValue to Type of Int32");
+
+ try
+ {
+ UInt64 uintA = this.GetInt64((ulong)Int32.MaxValue + 1, UInt64.MaxValue);
+ IConvertible iConvert = (IConvertible)(uintA);
+ Int32 int32A = (Int32)iConvert.ToType(typeof(Int32), null);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: The argument type is a null reference");
+
+ try
+ {
+ UInt64 uintA = 100;
+ IConvertible iConvert = (IConvertible)(uintA);
+ object oBject = (Int16)iConvert.ToType(null, null);
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private UInt64 GetInt64(UInt64 minValue, UInt64 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + (UInt64)TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletouint16.cs b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletouint16.cs
new file mode 100644
index 0000000000..bd81f31b74
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletouint16.cs
@@ -0,0 +1,131 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt64.System.IConvertible.ToUInt16
+/// </summary>
+public class UInt64IConvertibleToUInt16
+{
+ public static int Main()
+ {
+ UInt64IConvertibleToUInt16 ui64ictuint16 = new UInt64IConvertibleToUInt16();
+ TestLibrary.TestFramework.BeginTestCase("UInt64IConvertibleToUInt16");
+ if (ui64ictuint16.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:UInt64 MinValue to UInt16");
+ try
+ {
+ UInt64 uintA = UInt64.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ UInt16 uint16A = iConvert.ToUInt16(null);
+ if (uint16A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:UInt64 number between UInt64.MinValue to UInt16.MaxValue");
+ try
+ {
+ UInt64 uintA = this.GetInt64(0, UInt16.MaxValue);
+ IConvertible iConvert = (IConvertible)(uintA);
+ UInt16 uint16A = iConvert.ToUInt16(null);
+ if (uint16A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:UInt64 number between UInt16.MaxValue to UInt64.MaxValue");
+
+ try
+ {
+ UInt64 uintA = this.GetInt64(UInt16.MaxValue + 1, UInt64.MaxValue);
+ IConvertible iConvert = (IConvertible)(uintA);
+ UInt16 uint16A = iConvert.ToUInt16(null);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private UInt64 GetInt64(UInt64 minValue, UInt64 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + (UInt64)TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletouint32.cs b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletouint32.cs
new file mode 100644
index 0000000000..19bc44c64d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletouint32.cs
@@ -0,0 +1,131 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt64.System.IConvertible.ToUInt32
+/// </summary>
+public class UInt64IConvertibleToUInt32
+{
+ public static int Main()
+ {
+ UInt64IConvertibleToUInt32 ui64ictuint32 = new UInt64IConvertibleToUInt32();
+ TestLibrary.TestFramework.BeginTestCase("UInt64IConvertibleToUInt32");
+ if (ui64ictuint32.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:UInt64 MinValue to UInt32");
+ try
+ {
+ UInt64 uintA = UInt64.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ UInt32 uint32A = iConvert.ToUInt32(null);
+ if (uint32A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:UInt64 number between UInt64.MinValue to UInt32.MaxValue");
+ try
+ {
+ UInt64 uintA = this.GetInt64(0, UInt32.MaxValue);
+ IConvertible iConvert = (IConvertible)(uintA);
+ UInt32 uint32A = iConvert.ToUInt32(null);
+ if (uint32A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1:UInt64 number between UInt32.MaxValue to UInt64.MaxValue");
+
+ try
+ {
+ UInt64 uintA = this.GetInt64((ulong)(UInt32.MaxValue) + 1, UInt64.MaxValue);
+ IConvertible iConvert = (IConvertible)(uintA);
+ UInt32 uint32A = iConvert.ToUInt32(null);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private UInt64 GetInt64(UInt64 minValue, UInt64 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + (UInt64)TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletouint64.cs b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletouint64.cs
new file mode 100644
index 0000000000..ce8b2125bc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/uint64iconvertibletouint64.cs
@@ -0,0 +1,133 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+/// <summary>
+/// UInt64.System.IConvertible.ToUInt64
+/// </summary>
+public class UInt64IConvertibleToUInt64
+{
+ public static int Main()
+ {
+ UInt64IConvertibleToUInt64 ui64ictuint64 = new UInt64IConvertibleToUInt64();
+ TestLibrary.TestFramework.BeginTestCase("UInt64IConvertibleToUInt64");
+ if (ui64ictuint64.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1:UInt64 MinValue to UInt64");
+ try
+ {
+ UInt64 uintA = UInt64.MinValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ UInt64 uint64A = iConvert.ToUInt64(null);
+ if (uint64A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2:UInt64 MaxValue to UInt64");
+ try
+ {
+ UInt64 uintA = UInt64.MaxValue;
+ IConvertible iConvert = (IConvertible)(uintA);
+ UInt64 uint64A = iConvert.ToUInt64(null);
+ if (uint64A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Convert a random Uint64 to UInt64");
+ try
+ {
+ UInt64 uintA = this.GetInt64(1, UInt64.MaxValue); ;
+ IConvertible iConvert = (IConvertible)(uintA);
+ UInt64 uint64A = iConvert.ToUInt64(null);
+ if (uint64A != uintA)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ #endregion
+ #region ForTestObject
+ private UInt64 GetInt64(UInt64 minValue, UInt64 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + (UInt64)TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint64/uint64maxvalue.cs b/tests/src/CoreMangLib/cti/system/uint64/uint64maxvalue.cs
new file mode 100644
index 0000000000..dba20a08df
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/uint64maxvalue.cs
@@ -0,0 +1,98 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.UInt64.MaxValue
+/// </summary>
+public class UInt64MaxValue
+{
+ private UInt64 c_UINT64_MAXVALUE = 18446744073709551615;
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Normally test the uint64.MaxValue");
+
+ try
+ {
+ UInt64 uint64 = UInt64.MaxValue;
+ if (uint64 != c_UINT64_MAXVALUE)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Using hex number to check the Uint64.MaxValue");
+
+ try
+ {
+ UInt64 uint64 = UInt64.MaxValue;
+ if (uint64 != 0xFFFFFFFFFFFFFFFF)
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ UInt64MaxValue test = new UInt64MaxValue();
+
+ TestLibrary.TestFramework.BeginTestCase("UInt64MaxValue");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint64/uint64minvalue.cs b/tests/src/CoreMangLib/cti/system/uint64/uint64minvalue.cs
new file mode 100644
index 0000000000..4a3b7c1df7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/uint64minvalue.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// System.UInt64.MinValue
+/// </summary>
+public class UInt64MinValue
+{
+ private UInt64 c_UINT64_MINVALUE = 0;
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Normally test the uint64.MinValue");
+
+ try
+ {
+ ulong uint64 = UInt64.MinValue;
+ if (uint64 != c_UINT64_MINVALUE)
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Nagetive Test Cases
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ UInt64MinValue test = new UInt64MinValue();
+
+ TestLibrary.TestFramework.BeginTestCase("UInt64MinValue");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint64/uint64parse1.cs b/tests/src/CoreMangLib/cti/system/uint64/uint64parse1.cs
new file mode 100644
index 0000000000..ea0541c63d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/uint64parse1.cs
@@ -0,0 +1,354 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Globalization;
+
+/// <summary>
+/// UInt64.Parse(System.string)
+/// </summary>
+public class UInt64Parse1
+{
+ public static int Main()
+ {
+ UInt64Parse1 ui64parse1 = new UInt64Parse1();
+ TestLibrary.TestFramework.BeginTestCase("UInt64Parse1");
+
+ if (ui64parse1.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+
+ return retVal;
+ }
+ #region PostiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: the string corresponding UInt64 is UInt64 MinValue ");
+
+ try
+ {
+ string strA = UInt64.MinValue.ToString();
+ uintA = UInt64.Parse(strA);
+ if (uintA != 0)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: the string corresponding UInt64 is UInt64 MaxValue ");
+
+ try
+ {
+ string strA = UInt64.MaxValue.ToString();
+ uintA = UInt64.Parse(strA);
+ if (uintA != UInt64.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: the string corresponding UInt64 is normal UInt64 ");
+
+ try
+ {
+ UInt64 uintTest = (UInt64)this.GetInt64(0, UInt64.MaxValue);
+ string strA = uintTest.ToString();
+ uintA = UInt64.Parse(strA);
+ if (uintA != uintTest)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult,The UInt64 is:" + uintTest);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: the string format is [ws][sign]digits[ws] 1");
+
+ try
+ {
+ UInt64 uintTest = (UInt64)this.GetInt64(0, UInt64.MaxValue);
+ string strA = "+" + uintTest.ToString();
+ uintA = UInt64.Parse(strA);
+ if (uintA != uintTest)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult,UInt64 is:" + uintTest);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: the string format is [ws][sign]digits[ws] 2");
+
+ try
+ {
+ UInt64 uintTest = (UInt64)this.GetInt64(0, UInt64.MaxValue);
+ string strA = "\u0020" + uintTest.ToString();
+ uintA = UInt64.Parse(strA);
+ if (uintA != uintTest)
+ {
+ TestLibrary.TestFramework.LogError("009", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: the string format is [ws][sign]digits[ws] 3");
+
+ try
+ {
+ UInt64 uintTest = (UInt64)this.GetInt64(0, UInt64.MaxValue);
+ string strA = uintTest.ToString() + "\u0020";
+ uintA = UInt64.Parse(strA);
+ if (uintA != uintTest)
+ {
+ TestLibrary.TestFramework.LogError("011", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7: the string format is [ws][sign]digits[ws] 4");
+
+ try
+ {
+ UInt64 uintTest = (UInt64)this.GetInt64(0, UInt64.MaxValue);
+ string strA = "\u0009" + "+" + uintTest.ToString() + "\u0020";
+ uintA = UInt64.Parse(strA);
+ if (uintA != uintTest)
+ {
+ TestLibrary.TestFramework.LogError("013", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the parameter string is null");
+
+ try
+ {
+ string strA = null;
+ uintA = UInt64.Parse(strA);
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the parameter string is not of the correct format 1");
+
+ try
+ {
+ string strA = "abcd";
+ uintA = UInt64.Parse(strA);
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: the parameter string is not of the correct format 2");
+
+ try
+ {
+ string strA = "b12345d";
+ uintA = UInt64.Parse(strA);
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: the parameter string corresponding number is less than UInt64 minValue");
+
+ try
+ {
+ Int64 Testint = (-1) * Convert.ToInt64(this.GetInt64(1, Int64.MaxValue));
+ string strA = Testint.ToString();
+ uintA = UInt64.Parse(strA);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest5: the parameter string corresponding number is larger than UInt64 maxValue");
+
+ try
+ {
+ string strA = "18446744073709551616";
+ uintA = UInt64.Parse(strA);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private UInt64 GetInt64(UInt64 minValue, UInt64 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + (UInt64)TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uint64/uint64parse2.cs b/tests/src/CoreMangLib/cti/system/uint64/uint64parse2.cs
new file mode 100644
index 0000000000..8e242caf5c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/uint64parse2.cs
@@ -0,0 +1,391 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+
+/// <summary>
+/// UInt64.Parse(System.string,NumberStyle style)
+/// </summary>
+public class UInt64Parse2
+{
+ public static int Main()
+ {
+ UInt64Parse2 ui64parse2 = new UInt64Parse2();
+ TestLibrary.TestFramework.BeginTestCase("UInt64Parse2");
+
+ if (ui64parse2.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: the string corresponding UInt64 is UInt64 MaxValue 1");
+ try
+ {
+ string strA = UInt64.MaxValue.ToString();
+ NumberStyles style = NumberStyles.Any;
+ uintA = UInt64.Parse(strA, style);
+ if (uintA != UInt64.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: the string corresponding UInt64 is UInt64 MaxValue 2");
+ try
+ {
+ string strA = "FFFFFFFFFFFFFFFF";
+ NumberStyles style = NumberStyles.HexNumber;
+ uintA = UInt64.Parse(strA, style);
+ if (uintA != UInt64.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The string parameter contains a number of the form:[ws][sign]digits[ws] 1");
+ try
+ {
+ string strA = "01234";
+ NumberStyles style = NumberStyles.HexNumber;
+ uintA = UInt64.Parse(strA, style);
+ UInt64 expUIntA = (UInt64)(Math.Pow(16, 3)) + (UInt64)(2 * Math.Pow(16, 2)) + 3 * 16 + 4;
+ if (uintA != expUIntA)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: The string parameter contains a number of the form:[ws][sign]digits[ws] 2");
+ try
+ {
+ string strA = "01234";
+ NumberStyles style = NumberStyles.Any;
+ uintA = UInt64.Parse(strA, style);
+ if (uintA != 1234)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest5()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ TestLibrary.TestFramework.BeginScenario("PosTest5: The string parameter contains a number of the form:[ws][sign]digits[ws] 3");
+ try
+ {
+ UInt64 intA = this.GetInt64(0, UInt64.MaxValue);
+ string strA = "\u0009" + "+" + intA.ToString() + "\u000a";
+ NumberStyles style = NumberStyles.Any;
+ uintA = UInt64.Parse(strA, style);
+ if (uintA != (UInt64)intA)
+ {
+ TestLibrary.TestFramework.LogError("009", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest6()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ TestLibrary.TestFramework.BeginScenario("PosTest6: The string parameter contains a number of the form:[ws]hexdigits[ws] 1");
+ try
+ {
+ string strA = "abcde";
+ NumberStyles style = NumberStyles.HexNumber;
+ uintA = UInt64.Parse(strA, style);
+ UInt64 expUIntA = (UInt64)(10 * Math.Pow(16, 4)) + (UInt64)(11 * Math.Pow(16, 3)) + (UInt64)(12 * Math.Pow(16, 2)) + (UInt64)(13 * Math.Pow(16, 1)) + 14;
+ if (uintA != expUIntA)
+ {
+ TestLibrary.TestFramework.LogError("011", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest7()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ TestLibrary.TestFramework.BeginScenario("PosTest7: The string parameter contains a number of the form:[ws]hexdigits[ws] 2");
+ try
+ {
+ string strA = "\u0009" + "abcde" + "\u000A";
+ NumberStyles style = NumberStyles.HexNumber;
+ uintA = UInt64.Parse(strA, style);
+ UInt64 expUIntA = (UInt64)(10 * Math.Pow(16, 4)) + (UInt64)(11 * Math.Pow(16, 3)) + (UInt64)(12 * Math.Pow(16, 2)) + (UInt64)(13 * Math.Pow(16, 1)) + 14;
+ if (uintA != expUIntA)
+ {
+ TestLibrary.TestFramework.LogError("013", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the parameter string is null");
+
+ try
+ {
+ string strA = null;
+ uintA = UInt64.Parse(strA, NumberStyles.Integer);
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the style is not the NumberStyles value");
+
+ try
+ {
+ string strA = "12345";
+ NumberStyles numstyle = (NumberStyles)(-1);
+ uintA = UInt64.Parse(strA, numstyle);
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: the string is not in a format compliant with style 1");
+
+ try
+ {
+ string strA = "abcd";
+ NumberStyles style = NumberStyles.Integer;
+ uintA = UInt64.Parse(strA, style);
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: the string is not in a format compliant with style 2");
+
+ try
+ {
+ string strA = "gabcd";
+ NumberStyles style = NumberStyles.HexNumber;
+ uintA = UInt64.Parse(strA, style);
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest5: the parameter string corresponding number is less than UInt64 minValue");
+
+ try
+ {
+ UInt64 Testint = this.GetInt64(1, UInt64.MaxValue);
+ string strA = "-" + Testint.ToString();
+ NumberStyles style = NumberStyles.Integer;
+ uintA = UInt64.Parse(strA, style);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest6()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest6: the parameter string corresponding number is larger than UInt64 maxValue");
+
+ try
+ {
+ string strA = "18446744073709551616";
+ NumberStyles style = NumberStyles.Integer;
+ uintA = UInt64.Parse(strA, style);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest7()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ TestLibrary.TestFramework.BeginScenario("NegTest7: The string parameter contains a number of the form:[ws][sign]hexdigits[ws]");
+ try
+ {
+ string strA = "\u0009" + "+" + "abcde" + "\u0009";
+ NumberStyles style = NumberStyles.HexNumber;
+ uintA = UInt64.Parse(strA, style);
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private UInt64 GetInt64(UInt64 minValue, UInt64 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + (UInt64)TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint64/uint64parse3.cs b/tests/src/CoreMangLib/cti/system/uint64/uint64parse3.cs
new file mode 100644
index 0000000000..284b9f4ee0
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/uint64parse3.cs
@@ -0,0 +1,331 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Globalization;
+
+/// <summary>
+/// UInt64.Parse(System.string,NumberStyle style,IFormatProvider provider)
+/// </summary>
+public class UInt64Parse3
+{
+ public static int Main()
+ {
+ UInt64Parse3 ui64parse3 = new UInt64Parse3();
+ TestLibrary.TestFramework.BeginTestCase("UInt64Parse3");
+
+ if (ui64parse3.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ public bool RunTests()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ return retVal;
+ }
+ #region PositiveTest
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: the string corresponding UInt64 is UInt64 MaxValue 1");
+ try
+ {
+ string strA = UInt64.MaxValue.ToString();
+ NumberStyles style = NumberStyles.Any;
+ uintA = UInt64.Parse(strA, style, provider);
+ if (uintA != UInt64.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("001", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ CultureInfo myculture = new CultureInfo("en-us");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: the string corresponding UInt64 is UInt64 MaxValue 2");
+ try
+ {
+ string strA = "FFFFFFFFFFFFFFFF";
+ NumberStyles style = NumberStyles.HexNumber;
+ uintA = UInt64.Parse(strA, style, provider);
+ if (uintA != UInt64.MaxValue)
+ {
+ TestLibrary.TestFramework.LogError("003", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: The string parameter contains a number of the form:[ws][sign]digits[ws]");
+ try
+ {
+ string strA = "\u0009" + "abcde" + "\u000A";
+ NumberStyles style = NumberStyles.HexNumber;
+ uintA = UInt64.Parse(strA, style, provider);
+ UInt64 expUIntA = (UInt64)(10 * Math.Pow(16, 4)) + (UInt64)(11 * Math.Pow(16, 3)) + (UInt64)(12 * Math.Pow(16, 2)) + (UInt64)(13 * Math.Pow(16, 1)) + 14;
+ if (uintA != expUIntA)
+ {
+ TestLibrary.TestFramework.LogError("005", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ CultureInfo myculture = new CultureInfo("el-GR");
+ IFormatProvider provider = myculture.NumberFormat;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: The string parameter contains a number of the form:[ws]hexdigits[ws]");
+ try
+ {
+ string strA = "fffff";
+ NumberStyles style = NumberStyles.HexNumber;
+ uintA = UInt64.Parse(strA, style, provider);
+ UInt64 expUIntA = (UInt64)(15 * Math.Pow(16, 4)) + (UInt64)(15 * Math.Pow(16, 3)) + (UInt64)(15 * Math.Pow(16, 2)) + (UInt64)(15 * Math.Pow(16, 1)) + 15;
+ if (uintA != expUIntA)
+ {
+ TestLibrary.TestFramework.LogError("007", "the ActualResult is not the ExpectResult");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region NegativeTest
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ IFormatProvider provider = null;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: the parameter string is null");
+
+ try
+ {
+ string strA = null;
+ uintA = UInt64.Parse(strA, NumberStyles.Integer, provider);
+ retVal = false;
+ }
+ catch (ArgumentNullException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N001", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ IFormatProvider provider = null;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: the style is not the NumberStyles value");
+
+ try
+ {
+ string strA = "12345";
+ NumberStyles numstyle = (NumberStyles)(-1);
+ uintA = UInt64.Parse(strA, numstyle, provider);
+ retVal = false;
+ }
+ catch (ArgumentException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ IFormatProvider provider = null;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: the string is not in a format compliant with style 1");
+
+ try
+ {
+ string strA = "abcd";
+ NumberStyles style = NumberStyles.Integer;
+ uintA = UInt64.Parse(strA, style, provider);
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ IFormatProvider provider = null;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: the string is not in a format compliant with style 2");
+
+ try
+ {
+ string strA = "gabcd";
+ NumberStyles style = NumberStyles.HexNumber;
+ uintA = UInt64.Parse(strA, style, provider);
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N003", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ IFormatProvider provider = null;
+ TestLibrary.TestFramework.BeginScenario("NegTest5: the parameter string corresponding number is less than UInt64 minValue");
+
+ try
+ {
+ Int64 Testint = (-1) * Convert.ToInt64(this.GetInt64(1, Int64.MaxValue));
+ string strA = Testint.ToString();
+ NumberStyles style = NumberStyles.Integer;
+ uintA = UInt64.Parse(strA, style, provider);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N005", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest6()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ IFormatProvider provider = null;
+ TestLibrary.TestFramework.BeginScenario("NegTest6: the parameter string corresponding number is larger than UInt64 maxValue");
+
+ try
+ {
+ string strA = "18446744073709551616";
+ NumberStyles style = NumberStyles.Integer;
+ uintA = UInt64.Parse(strA, style, provider);
+ retVal = false;
+ }
+ catch (OverflowException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ public bool NegTest7()
+ {
+ bool retVal = true;
+ UInt64 uintA;
+ IFormatProvider provider = null;
+ TestLibrary.TestFramework.BeginScenario("NegTest7: The string parameter contains a number of the form:[ws][sign]hexdigits[ws]");
+ try
+ {
+ string strA = "\u0009" + "+" + "abcde" + "\u0009";
+ NumberStyles style = NumberStyles.HexNumber;
+ uintA = UInt64.Parse(strA, style, provider);
+ retVal = false;
+ }
+ catch (FormatException) { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N007", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+ #endregion
+ #region ForTestObject
+ private UInt64 GetInt64(UInt64 minValue, UInt64 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + (UInt64)TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint64/uint64tostring2.cs b/tests/src/CoreMangLib/cti/system/uint64/uint64tostring2.cs
new file mode 100644
index 0000000000..8d4f23f442
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/uint64tostring2.cs
@@ -0,0 +1,238 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+using TestLibrary;
+
+/// <summary>
+/// UInt64.ToString(System.IFormatProvider)
+/// </summary>
+public class UInt64ToString1
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ if (Utilities.IsWindows)
+ {
+ // retVal = NegTest1() && retVal; // Disabled until neutral cultures are available
+ }
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Convert UInt64MaxValue to string value and using cultureinfo \"en-US\"");
+
+ try
+ {
+ UInt64 u64 = UInt64.MaxValue;
+ CultureInfo cultureInfo = new CultureInfo("en-US");
+ string str = u64.ToString(cultureInfo);
+ if (str != "18446744073709551615")
+ {
+ TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Convert UInt64MinValue to string value and using cultureinfo \"fr-FR\"");
+
+ try
+ {
+ UInt64 u64 = UInt64.MinValue;
+ CultureInfo cultureInfo = new CultureInfo("fr-FR");
+ string str = u64.ToString(cultureInfo);
+ if (str != "0")
+ {
+ TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: A UInt64 number begin with zeros and using cultureinfo \"en-US\"");
+
+ try
+ {
+ UInt64 u64 = 00009876;
+ CultureInfo cultureInfo = new CultureInfo("en-US");
+ string str = u64.ToString(cultureInfo);
+ if (str != "9876")
+ {
+ TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Convert a random uint64 to string value and using \"en-GB\"");
+
+ try
+ {
+ UInt64 u64 = this.GetInt64(0, UInt64.MaxValue);
+ CultureInfo cultureInfo = new CultureInfo("en-GB");
+ string str = u64.ToString(cultureInfo);
+ string str2 = Convert.ToString(u64);
+ if (str != str2)
+ {
+ TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: The provider is a null reference");
+
+ try
+ {
+ UInt64 u64 = 000217639083000;
+ CultureInfo cultureInfo = null;
+ string str = u64.ToString(cultureInfo);
+ if (str != "217639083000")
+ {
+ TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: The provider argument is invalid");
+
+ try
+ {
+ UInt64 u64 = 1234500233;
+ CultureInfo cultureInfo = new CultureInfo("pl");
+ string str = u64.ToString(cultureInfo);
+ TestLibrary.TestFramework.LogError("101", "The NotSupportedException is not thrown as expected");
+ retVal = false;
+ }
+ catch (NotSupportedException)
+ {
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ UInt64ToString1 test = new UInt64ToString1();
+
+ TestLibrary.TestFramework.BeginTestCase("UInt64ToString1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+ #region ForTestObject
+ private UInt64 GetInt64(UInt64 minValue, UInt64 maxValue)
+ {
+ try
+ {
+ if (minValue == maxValue)
+ {
+ return minValue;
+ }
+ if (minValue < maxValue)
+ {
+ return minValue + (UInt64)TestLibrary.Generator.GetInt64(-55) % (maxValue - minValue);
+ }
+ }
+ catch
+ {
+ throw;
+ }
+
+ return minValue;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uint64/uint64tryparse.cs b/tests/src/CoreMangLib/cti/system/uint64/uint64tryparse.cs
new file mode 100644
index 0000000000..d9432658eb
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uint64/uint64tryparse.cs
@@ -0,0 +1,561 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+// Co7530TryParse_all.cs
+// Tests UInt64.TryParse(String), UInt64.TryParse(String, NumberStyles, IFormatProvider, ref UInt64)
+// 2003/04/01 KatyK
+public class Co7530TryParse
+{
+ static bool verbose = false;
+
+ public static int Main()
+ {
+ bool passed = true;
+
+ try
+ {
+ // Make the test culture independent
+ TestLibrary.Utilities.CurrentCulture = CultureInfo.InvariantCulture;
+
+ // Set up NFIs to use
+ NumberFormatInfo goodNFI = new NumberFormatInfo();
+
+ NumberFormatInfo corruptNFI = new NumberFormatInfo(); // DecimalSeparator == GroupSeparator
+ corruptNFI.NumberDecimalSeparator = ".";
+ corruptNFI.NumberGroupSeparator = ".";
+ corruptNFI.CurrencyDecimalSeparator = ".";
+ corruptNFI.CurrencyGroupSeparator = ".";
+ corruptNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo swappedNFI = new NumberFormatInfo(); // DecimalSeparator & GroupSeparator swapped
+ swappedNFI.NumberDecimalSeparator = ".";
+ swappedNFI.NumberGroupSeparator = ",";
+ swappedNFI.CurrencyDecimalSeparator = ",";
+ swappedNFI.CurrencyGroupSeparator = ".";
+ swappedNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo distinctNFI = new NumberFormatInfo(); // DecimalSeparator & GroupSeparator distinct
+ distinctNFI.NumberDecimalSeparator = ".";
+ distinctNFI.NumberGroupSeparator = ",";
+ distinctNFI.CurrencyDecimalSeparator = ":";
+ distinctNFI.CurrencyGroupSeparator = ";";
+ distinctNFI.CurrencySymbol = "$";
+
+ NumberFormatInfo customNFI = new NumberFormatInfo();
+ customNFI.NegativeSign = "^";
+
+ NumberFormatInfo ambigNFI = new NumberFormatInfo();
+ ambigNFI.NegativeSign = "^";
+ ambigNFI.CurrencySymbol = "^";
+
+ CultureInfo germanCulture = new CultureInfo("de-DE");
+ CultureInfo japaneseCulture;
+
+ try
+ {
+ japaneseCulture = new CultureInfo("ja-JP");
+ }
+ catch (Exception)
+ {
+ TestLibrary.Logging.WriteLine("East Asian Languages are not installed. Skiping Japanese culture tests.");
+ japaneseCulture = null;
+ }
+
+ // Parse tests included for comparison/regression
+ passed &= VerifyUInt64Parse("5", 5);
+ passed &= VerifyUInt64Parse("5 ", 5);
+ passed &= VerifyUInt64Parse("5\0", 5);
+ passed &= VerifyUInt64Parse("893382737", 893382737);
+ passed &= VerifyUInt64Parse("1234567891", 1234567891);
+ passed &= VerifyUInt64Parse("3123456789", 3123456789);
+ passed &= VerifyUInt64Parse("123456789123456789", 123456789123456789);
+ passed &= VerifyUInt64Parse("18446744073709551615", 0xFFFFFFFFFFFFFFFF);
+ passed &= VerifyUInt64Parse("5", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyUInt64Parse("5 \0", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyUInt64Parse("5\0\0\0", NumberStyles.Integer, CultureInfo.InvariantCulture, 5);
+ passed &= VerifyUInt64Parse("12", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0x12);
+ passed &= VerifyUInt64Parse("fF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFF);
+ passed &= VerifyUInt64Parse("FFFFFFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFFFFFFFF);
+ passed &= VerifyUInt64Parse("FFFFFFFFFFFFFFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFFFFFFFFFFFFFFFF);
+ passed &= VerifyUInt64Parse("5", NumberStyles.Integer, goodNFI, 5);
+ passed &= VerifyUInt64Parse("5.0", NumberStyles.AllowDecimalPoint, goodNFI, 5);
+ passed &= VerifyUInt64Parse("123", NumberStyles.Integer, germanCulture, 123);
+ passed &= VerifyUInt64Parse("123", NumberStyles.Integer, japaneseCulture, 123);
+ passed &= VerifyUInt64Parse("123.000", NumberStyles.Any, germanCulture, 123000);
+ passed &= VerifyUInt64Parse("123,000", NumberStyles.Any, japaneseCulture, 123000);
+ passed &= VerifyUInt64Parse("123,000", NumberStyles.AllowDecimalPoint, germanCulture, 123);
+ passed &= VerifyUInt64Parse("123.000", NumberStyles.AllowDecimalPoint, japaneseCulture, 123);
+ passed &= VerifyUInt64Parse("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 5); // currency
+ //
+ passed &= VerifyUInt64Parse("5", NumberStyles.Integer, corruptNFI, 5);
+ passed &= VerifyUInt64Parse("5", NumberStyles.Number, corruptNFI, 5);
+ passed &= VerifyUInt64Parse("5.0", NumberStyles.Number, corruptNFI, 5);
+ passed &= VerifyUInt64ParseException("5,0", NumberStyles.Number, corruptNFI, typeof(FormatException));
+ passed &= VerifyUInt64ParseException("5.0.0", NumberStyles.Number, corruptNFI, typeof(FormatException));
+ passed &= VerifyUInt64Parse("$5.0", NumberStyles.Currency, corruptNFI, 5);
+ passed &= VerifyUInt64ParseException("$5,0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyUInt64ParseException("$5.0.0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyUInt64Parse("5.0", NumberStyles.Currency, corruptNFI, 5);
+ passed &= VerifyUInt64ParseException("5,0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyUInt64ParseException("5.0.0", NumberStyles.Currency, corruptNFI, typeof(FormatException));
+ passed &= VerifyUInt64Parse("5.0", NumberStyles.Any, corruptNFI, 5);
+ passed &= VerifyUInt64ParseException("5,0", NumberStyles.Any, corruptNFI, typeof(FormatException));
+ passed &= VerifyUInt64ParseException("5.0.0", NumberStyles.Any, corruptNFI, typeof(FormatException));
+ //
+ passed &= VerifyUInt64Parse("5", NumberStyles.Integer, swappedNFI, 5);
+ passed &= VerifyUInt64ParseException("1,234", NumberStyles.Integer, swappedNFI, typeof(FormatException));
+ passed &= VerifyUInt64Parse("5", NumberStyles.Number, swappedNFI, 5);
+ passed &= VerifyUInt64Parse("5.0", NumberStyles.Number, swappedNFI, 5);
+ passed &= VerifyUInt64Parse("1,234", NumberStyles.Number, swappedNFI, 1234);
+ passed &= VerifyUInt64Parse("1,234.0", NumberStyles.Number, swappedNFI, 1234);
+ passed &= VerifyUInt64ParseException("5.000.000", NumberStyles.Number, swappedNFI, typeof(FormatException));
+ passed &= VerifyUInt64ParseException("5.000,00", NumberStyles.Number, swappedNFI, typeof(FormatException));
+ passed &= VerifyUInt64Parse("5.000", NumberStyles.Currency, swappedNFI, 5); //???
+ passed &= VerifyUInt64ParseException("5.000,00", NumberStyles.Currency, swappedNFI, typeof(FormatException)); //???
+ passed &= VerifyUInt64Parse("$5.000", NumberStyles.Currency, swappedNFI, 5000);
+ passed &= VerifyUInt64Parse("$5.000,00", NumberStyles.Currency, swappedNFI, 5000);
+ passed &= VerifyUInt64Parse("5.000", NumberStyles.Any, swappedNFI, 5); //?
+ passed &= VerifyUInt64ParseException("5.000,00", NumberStyles.Any, swappedNFI, typeof(FormatException)); //?
+ passed &= VerifyUInt64Parse("$5.000", NumberStyles.Any, swappedNFI, 5000);
+ passed &= VerifyUInt64Parse("$5.000,00", NumberStyles.Any, swappedNFI, 5000);
+ passed &= VerifyUInt64Parse("5,0", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyUInt64Parse("$5,0", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyUInt64Parse("5,000", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyUInt64Parse("$5,000", NumberStyles.Currency, swappedNFI, 5);
+ passed &= VerifyUInt64ParseException("5,000.0", NumberStyles.Currency, swappedNFI, typeof(FormatException));
+ passed &= VerifyUInt64ParseException("$5,000.0", NumberStyles.Currency, swappedNFI, typeof(FormatException));
+ passed &= VerifyUInt64Parse("5,000", NumberStyles.Any, swappedNFI, 5);
+ passed &= VerifyUInt64Parse("$5,000", NumberStyles.Any, swappedNFI, 5);
+ passed &= VerifyUInt64ParseException("5,000.0", NumberStyles.Any, swappedNFI, typeof(FormatException));
+ passed &= VerifyUInt64ParseException("$5,000.0", NumberStyles.Any, swappedNFI, typeof(FormatException));
+ //
+ passed &= VerifyUInt64Parse("5.0", NumberStyles.Number, distinctNFI, 5);
+ passed &= VerifyUInt64Parse("1,234.0", NumberStyles.Number, distinctNFI, 1234);
+ passed &= VerifyUInt64Parse("5.0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyUInt64Parse("1,234.0", NumberStyles.Currency, distinctNFI, 1234);
+ passed &= VerifyUInt64Parse("5.0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyUInt64Parse("1,234.0", NumberStyles.Any, distinctNFI, 1234);
+ passed &= VerifyUInt64ParseException("$5.0", NumberStyles.Currency, distinctNFI, typeof(FormatException));
+ passed &= VerifyUInt64ParseException("$5.0", NumberStyles.Any, distinctNFI, typeof(FormatException));
+ passed &= VerifyUInt64ParseException("5:0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyUInt64ParseException("5;0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyUInt64ParseException("$5:0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyUInt64Parse("5:0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyUInt64Parse("5:000", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyUInt64Parse("5;000", NumberStyles.Currency, distinctNFI, 5000);
+ passed &= VerifyUInt64Parse("$5:0", NumberStyles.Currency, distinctNFI, 5);
+ passed &= VerifyUInt64Parse("$5;0", NumberStyles.Currency, distinctNFI, 50);
+ passed &= VerifyUInt64Parse("5:0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyUInt64Parse("5;0", NumberStyles.Any, distinctNFI, 50);
+ passed &= VerifyUInt64Parse("$5:0", NumberStyles.Any, distinctNFI, 5);
+ passed &= VerifyUInt64Parse("$5;0", NumberStyles.Any, distinctNFI, 50);
+ passed &= VerifyUInt64ParseException("123,456;789.0", NumberStyles.Number, distinctNFI, typeof(FormatException));
+ passed &= VerifyUInt64Parse("123,456;789.0", NumberStyles.Currency, distinctNFI, 123456789);
+ passed &= VerifyUInt64Parse("123,456;789.0", NumberStyles.Any, distinctNFI, 123456789);
+ passed &= VerifyUInt64ParseException("$123,456;789.0", NumberStyles.Any, distinctNFI, typeof(FormatException));
+ //
+ passed &= VerifyUInt64ParseException("-5", typeof(OverflowException));
+ passed &= VerifyUInt64ParseException("123456789123456789123", typeof(OverflowException));
+ passed &= VerifyUInt64ParseException("Garbage", typeof(FormatException));
+ passed &= VerifyUInt64ParseException("5\0Garbage", typeof(FormatException));
+ passed &= VerifyUInt64ParseException(null, typeof(ArgumentNullException));
+ passed &= VerifyUInt64ParseException("123456789123456789", NumberStyles.HexNumber, CultureInfo.InvariantCulture, typeof(OverflowException));
+ passed &= VerifyUInt64ParseException("5.3", NumberStyles.AllowDecimalPoint, goodNFI, typeof(OverflowException)); //weird that it's Overflow, but consistent with v1
+ passed &= VerifyUInt64ParseException("5", NumberStyles.AllowHexSpecifier | NumberStyles.AllowParentheses, null, typeof(ArgumentException));
+ passed &= VerifyUInt64ParseException("4", (NumberStyles)(-1), typeof(ArgumentException));
+ passed &= VerifyUInt64ParseException("4", (NumberStyles)0x10000, typeof(ArgumentException));
+ passed &= VerifyUInt64ParseException("4", (NumberStyles)(-1), CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyUInt64ParseException("4", (NumberStyles)0x10000, CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyUInt64ParseException("123.000.000.000.000.000.000", NumberStyles.Any, germanCulture, typeof(OverflowException));
+ passed &= VerifyUInt64ParseException("123,000,000,000,000,000,000", NumberStyles.Any, japaneseCulture, typeof(OverflowException));
+ passed &= VerifyUInt64ParseException("123,000,000,000,000,000,000", NumberStyles.Integer, germanCulture, typeof(FormatException));
+ passed &= VerifyUInt64ParseException("123.000.000.000.000.000.000", NumberStyles.Integer, japaneseCulture, typeof(FormatException));
+ passed &= VerifyUInt64ParseException("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Integer, germanCulture, typeof(FormatException)); // currency
+
+ /////////// TryParse(String)
+ //// Pass cases
+ passed &= VerifyUInt64TryParse("5", 5, true);
+ passed &= VerifyUInt64TryParse(" 5 ", 5, true);
+ passed &= VerifyUInt64TryParse("5\0", 5, true);
+ passed &= VerifyUInt64TryParse("5 \0", 5, true);
+ passed &= VerifyUInt64TryParse("5\0\0\0", 5, true);
+ passed &= VerifyUInt64TryParse("10000", 10000, true);
+ passed &= VerifyUInt64TryParse("893382737", 893382737, true);
+ passed &= VerifyUInt64TryParse("1234567891", 1234567891, true);
+ passed &= VerifyUInt64TryParse("3123456789", 3123456789u, true);
+ passed &= VerifyUInt64TryParse("123456789123456789", 123456789123456789, true);
+ passed &= VerifyUInt64TryParse("18446744073709551615", 0xFFFFFFFFFFFFFFFF, true);
+ passed &= VerifyUInt64TryParse(UInt64.MaxValue.ToString(), UInt64.MaxValue, true);
+ passed &= VerifyUInt64TryParse(UInt64.MinValue.ToString(), UInt64.MinValue, true);
+
+ //// Fail cases
+ passed &= VerifyUInt64TryParse(null, 0, false);
+ passed &= VerifyUInt64TryParse("", 0, false);
+ passed &= VerifyUInt64TryParse("Garbage", 0, false);
+ passed &= VerifyUInt64TryParse("5\0Garbage", 0, false);
+ passed &= VerifyUInt64TryParse("-5", 0, false);
+ passed &= VerifyUInt64TryParse("123456789123456789123", 0, false);
+ passed &= VerifyUInt64TryParse("FF", 0, false);
+ passed &= VerifyUInt64TryParse("27.3", 0, false);
+ passed &= VerifyUInt64TryParse("23 5", 0, false);
+
+
+ /////////// TryParse(TryParse(String, NumberStyles, IFormatProvider, ref UInt64)
+ //// Pass cases
+ passed &= VerifyUInt64TryParse("5", NumberStyles.Integer, CultureInfo.InvariantCulture, 5, true);
+ // Variations on NumberStyles
+ passed &= VerifyUInt64TryParse("12", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0x12, true);
+ passed &= VerifyUInt64TryParse("FF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFF, true);
+ passed &= VerifyUInt64TryParse("fF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFF, true);
+ passed &= VerifyUInt64TryParse("fFFFFFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFFFFFFFF, true);
+ passed &= VerifyUInt64TryParse("FFFFFFFFFFFFFFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0xFFFFFFFFFFFFFFFF, true);
+ passed &= VerifyUInt64TryParse(" 5", NumberStyles.AllowLeadingWhite, goodNFI, 5, true);
+ passed &= VerifyUInt64TryParse("5", NumberStyles.Number, goodNFI, 5, true);
+ passed &= VerifyUInt64TryParse("5.0", NumberStyles.AllowDecimalPoint, goodNFI, 5, true);
+ // Variations on IFP
+ passed &= VerifyUInt64TryParse("5", NumberStyles.Integer, goodNFI, 5, true);
+ passed &= VerifyUInt64TryParse("5", NumberStyles.Integer, null, 5, true);
+ passed &= VerifyUInt64TryParse("5", NumberStyles.Integer, new DateTimeFormatInfo(), 5, true);
+ passed &= VerifyUInt64TryParse("123", NumberStyles.Integer, germanCulture, 123, true);
+ passed &= VerifyUInt64TryParse("123", NumberStyles.Integer, japaneseCulture, 123, true);
+ passed &= VerifyUInt64TryParse("123.000", NumberStyles.Any, germanCulture, 123000, true);
+ passed &= VerifyUInt64TryParse("123,000", NumberStyles.Any, japaneseCulture, 123000, true);
+ passed &= VerifyUInt64TryParse("123,000", NumberStyles.AllowDecimalPoint, germanCulture, 123, true);
+ passed &= VerifyUInt64TryParse("123.000", NumberStyles.AllowDecimalPoint, japaneseCulture, 123, true);
+ passed &= VerifyUInt64TryParse("5,00 " + germanCulture.NumberFormat.CurrencySymbol, NumberStyles.Any, germanCulture, 5, true); // currency
+
+ //// Fail cases
+ passed &= VerifyUInt64TryParse("-5", NumberStyles.Integer, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifyUInt64TryParse("FF", NumberStyles.Integer, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifyUInt64TryParse("123456789123456789", NumberStyles.HexNumber, CultureInfo.InvariantCulture, 0, false);
+ passed &= VerifyUInt64TryParse("^42", NumberStyles.Any, customNFI, 0, false);
+ passed &= VerifyUInt64TryParse("-42", NumberStyles.Any, customNFI, 0, false);
+ passed &= VerifyUInt64TryParse("5.3", NumberStyles.AllowDecimalPoint, goodNFI, 0, false);
+ passed &= VerifyUInt64TryParse("5 ", NumberStyles.AllowLeadingWhite, goodNFI, 0, false);
+ passed &= VerifyUInt64TryParse("123.000.000.000.000.000.000", NumberStyles.Any, germanCulture, 0, false);
+ passed &= VerifyUInt64TryParse("123,000,000,000,000,000,000", NumberStyles.Any, japaneseCulture, 0, false);
+ passed &= VerifyUInt64TryParse("123,000,000,000,000,000,000", NumberStyles.Integer, germanCulture, 0, false);
+ passed &= VerifyUInt64TryParse("123.000.000.000.000.000.000", NumberStyles.Integer, japaneseCulture, 0, false);
+
+ //// Exception cases
+ passed &= VerifyUInt64TryParseException("5", NumberStyles.AllowHexSpecifier | NumberStyles.AllowParentheses, null, typeof(ArgumentException));
+ passed &= VerifyUInt64TryParseException("4", (NumberStyles)(-1), CultureInfo.InvariantCulture, typeof(ArgumentException));
+ passed &= VerifyUInt64TryParseException("4", (NumberStyles)0x10000, CultureInfo.InvariantCulture, typeof(ArgumentException));
+
+ // NumberStyles/NFI variations
+ //
+ passed &= VerifyUInt64TryParse("5", NumberStyles.Integer, corruptNFI, 5, true);
+ passed &= VerifyUInt64TryParse("5", NumberStyles.Number, corruptNFI, 5, true);
+ passed &= VerifyUInt64TryParse("5.0", NumberStyles.Number, corruptNFI, 5, true);
+ passed &= VerifyUInt64TryParse("5,0", NumberStyles.Number, corruptNFI, 0, false);
+ passed &= VerifyUInt64TryParse("5.0.0", NumberStyles.Number, corruptNFI, 0, false);
+ passed &= VerifyUInt64TryParse("$5.0", NumberStyles.Currency, corruptNFI, 5, true);
+ passed &= VerifyUInt64TryParse("$5,0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyUInt64TryParse("$5.0.0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyUInt64TryParse("5.0", NumberStyles.Currency, corruptNFI, 5, true);
+ passed &= VerifyUInt64TryParse("5,0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyUInt64TryParse("5.0.0", NumberStyles.Currency, corruptNFI, 0, false);
+ passed &= VerifyUInt64TryParse("5.0", NumberStyles.Any, corruptNFI, 5, true);
+ passed &= VerifyUInt64TryParse("5,0", NumberStyles.Any, corruptNFI, 0, false);
+ passed &= VerifyUInt64TryParse("5.0.0", NumberStyles.Any, corruptNFI, 0, false);
+ //
+ passed &= VerifyUInt64TryParse("5", NumberStyles.Integer, swappedNFI, 5, true);
+ passed &= VerifyUInt64TryParse("1,234", NumberStyles.Integer, swappedNFI, 0, false);
+ passed &= VerifyUInt64TryParse("5", NumberStyles.Number, swappedNFI, 5, true);
+ passed &= VerifyUInt64TryParse("5.0", NumberStyles.Number, swappedNFI, 5, true);
+ passed &= VerifyUInt64TryParse("1,234", NumberStyles.Number, swappedNFI, 1234, true);
+ passed &= VerifyUInt64TryParse("1,234.0", NumberStyles.Number, swappedNFI, 1234, true);
+ passed &= VerifyUInt64TryParse("5.000.000", NumberStyles.Number, swappedNFI, 0, false);
+ passed &= VerifyUInt64TryParse("5.000,00", NumberStyles.Number, swappedNFI, 0, false);
+ passed &= VerifyUInt64TryParse("5.000", NumberStyles.Currency, swappedNFI, 5, true); //???
+ passed &= VerifyUInt64TryParse("5.000,00", NumberStyles.Currency, swappedNFI, 0, false); //???
+ passed &= VerifyUInt64TryParse("$5.000", NumberStyles.Currency, swappedNFI, 5000, true);
+ passed &= VerifyUInt64TryParse("$5.000,00", NumberStyles.Currency, swappedNFI, 5000, true);
+ passed &= VerifyUInt64TryParse("5.000", NumberStyles.Any, swappedNFI, 5, true); //?
+ passed &= VerifyUInt64TryParse("5.000,00", NumberStyles.Any, swappedNFI, 0, false); //?
+ passed &= VerifyUInt64TryParse("$5.000", NumberStyles.Any, swappedNFI, 5000, true);
+ passed &= VerifyUInt64TryParse("$5.000,00", NumberStyles.Any, swappedNFI, 5000, true);
+ passed &= VerifyUInt64TryParse("5,0", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyUInt64TryParse("$5,0", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyUInt64TryParse("5,000", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyUInt64TryParse("$5,000", NumberStyles.Currency, swappedNFI, 5, true);
+ passed &= VerifyUInt64TryParse("5,000.0", NumberStyles.Currency, swappedNFI, 0, false);
+ passed &= VerifyUInt64TryParse("$5,000.0", NumberStyles.Currency, swappedNFI, 0, false);
+ passed &= VerifyUInt64TryParse("5,000", NumberStyles.Any, swappedNFI, 5, true);
+ passed &= VerifyUInt64TryParse("$5,000", NumberStyles.Any, swappedNFI, 5, true);
+ passed &= VerifyUInt64TryParse("5,000.0", NumberStyles.Any, swappedNFI, 0, false);
+ passed &= VerifyUInt64TryParse("$5,000.0", NumberStyles.Any, swappedNFI, 0, false);
+ //
+ passed &= VerifyUInt64TryParse("5.0", NumberStyles.Number, distinctNFI, 5, true);
+ passed &= VerifyUInt64TryParse("1,234.0", NumberStyles.Number, distinctNFI, 1234, true);
+ passed &= VerifyUInt64TryParse("5.0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyUInt64TryParse("1,234.0", NumberStyles.Currency, distinctNFI, 1234, true);
+ passed &= VerifyUInt64TryParse("5.0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyUInt64TryParse("1,234.0", NumberStyles.Any, distinctNFI, 1234, true);
+ passed &= VerifyUInt64TryParse("$5.0", NumberStyles.Currency, distinctNFI, 0, false);
+ passed &= VerifyUInt64TryParse("$5.0", NumberStyles.Any, distinctNFI, 0, false);
+ passed &= VerifyUInt64TryParse("5:0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyUInt64TryParse("5;0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyUInt64TryParse("$5:0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyUInt64TryParse("5:0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyUInt64TryParse("5:000", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyUInt64TryParse("5;000", NumberStyles.Currency, distinctNFI, 5000, true);
+ passed &= VerifyUInt64TryParse("$5:0", NumberStyles.Currency, distinctNFI, 5, true);
+ passed &= VerifyUInt64TryParse("$5;0", NumberStyles.Currency, distinctNFI, 50, true);
+ passed &= VerifyUInt64TryParse("5:0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyUInt64TryParse("5;0", NumberStyles.Any, distinctNFI, 50, true);
+ passed &= VerifyUInt64TryParse("$5:0", NumberStyles.Any, distinctNFI, 5, true);
+ passed &= VerifyUInt64TryParse("$5;0", NumberStyles.Any, distinctNFI, 50, true);
+ passed &= VerifyUInt64TryParse("123,456;789.0", NumberStyles.Number, distinctNFI, 0, false);
+ passed &= VerifyUInt64TryParse("123,456;789.0", NumberStyles.Currency, distinctNFI, 123456789, true);
+ passed &= VerifyUInt64TryParse("123,456;789.0", NumberStyles.Any, distinctNFI, 123456789, true);
+ passed &= VerifyUInt64TryParse("$123,456;789.0", NumberStyles.Any, distinctNFI, 0, false);
+
+
+ // Should these pass or fail? Current parse behavior is to pass, so they might be
+ // parse bugs, but they're not tryparse bugs.
+ passed &= VerifyUInt64Parse("5", NumberStyles.Float, goodNFI, 5);
+ passed &= VerifyUInt64TryParse("5", NumberStyles.Float, goodNFI, 5, true);
+ passed &= VerifyUInt64Parse("5", NumberStyles.AllowDecimalPoint, goodNFI, 5);
+ passed &= VerifyUInt64TryParse("5", NumberStyles.AllowDecimalPoint, goodNFI, 5, true);
+ // I expect ArgumentException with an ambiguous NFI
+ passed &= VerifyUInt64ParseException("^42", NumberStyles.Any, ambigNFI, typeof(OverflowException));
+ passed &= VerifyUInt64TryParse("^42", NumberStyles.Any, ambigNFI, 0, false);
+
+ /// END TEST CASES
+ }
+ catch (Exception e)
+ {
+ TestLibrary.Logging.WriteLine("Unexpected exception!! " + e.ToString());
+ passed = false;
+ }
+
+ if (passed)
+ {
+ TestLibrary.Logging.WriteLine("paSs");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.Logging.WriteLine("FAiL");
+ return 1;
+ }
+ }
+
+ public static bool VerifyUInt64TryParse(string value, UInt64 expectedResult, bool expectedReturn)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt64.TryParse, Value = '{0}', Expected Result = {1}, Expected Return = {2}",
+ value, expectedResult, expectedReturn);
+ }
+ UInt64 result = 0;
+ try
+ {
+ bool returnValue = UInt64.TryParse(value, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedReturn, returnValue);
+ return false;
+ }
+ if (result != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, result);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyUInt64TryParse(string value, NumberStyles style, IFormatProvider provider, UInt64 expectedResult, bool expectedReturn)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt64.TryParse, Value = '{0}', Style = {1}, Provider = {2}, Expected Result = {3}, Expected Return = {4}",
+ value, style, provider, expectedResult, expectedReturn);
+ }
+ UInt64 result = 0;
+ try
+ {
+ bool returnValue = UInt64.TryParse(value, style, provider, out result);
+ if (returnValue != expectedReturn)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Style = {1}, Provider = {2}, Expected Return = {3}, Actual Return = {4}",
+ value, style, provider, expectedReturn, returnValue);
+ return false;
+ }
+ if (result != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, result);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyUInt64TryParseException(string value, NumberStyles style, IFormatProvider provider, Type exceptionType)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt64.TryParse, Value = '{0}', Style = {1}, Provider = {2}, Expected Exception = {3}",
+ value, style, provider, exceptionType);
+ }
+ try
+ {
+ UInt64 result = 0;
+ Boolean returnValue = UInt64.TryParse(value, style, provider, out result);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyUInt64Parse(string value, UInt64 expectedResult)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt64.Parse, Value = '{0}', Expected Result, {1}",
+ value, expectedResult);
+ }
+ try
+ {
+ UInt64 returnValue = UInt64.Parse(value);
+ if (returnValue != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, returnValue);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyUInt64Parse(string value, NumberStyles style, IFormatProvider provider, UInt64 expectedResult)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt64.Parse, Value = '{0}', Style = {1}, provider = {2}, Expected Result = {3}",
+ value, style, provider, expectedResult);
+ }
+ try
+ {
+ UInt64 returnValue = UInt64.Parse(value, style, provider);
+ if (returnValue != expectedResult)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Return: {1}, Actual Return: {2}", value, expectedResult, returnValue);
+ return false;
+ }
+ return true;
+ }
+ catch (Exception ex)
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Unexpected Exception, Value = '{0}', Exception: {1}", value, ex);
+ return false;
+ }
+ }
+
+ public static bool VerifyUInt64ParseException(string value, Type exceptionType)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt64.Parse, Value = '{0}', Expected Exception, {1}",
+ value, exceptionType);
+ }
+ try
+ {
+ UInt64 returnValue = UInt64.Parse(value);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyUInt64ParseException(string value, NumberStyles style, Type exceptionType)
+ {
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt64.Parse, Value = '{0}', Style = {1}, Expected Exception = {3}",
+ value, style, exceptionType);
+ }
+ try
+ {
+ UInt64 returnValue = UInt64.Parse(value, style);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public static bool VerifyUInt64ParseException(string value, NumberStyles style, IFormatProvider provider, Type exceptionType)
+ {
+ if (provider == null) return true;
+
+ if (verbose)
+ {
+ TestLibrary.Logging.WriteLine("Test: UInt64.Parse, Value = '{0}', Style = {1}, Provider = {2}, Expected Exception = {3}",
+ value, style, provider, exceptionType);
+ }
+ try
+ {
+ UInt64 returnValue = UInt64.Parse(value, style, provider);
+ TestLibrary.Logging.WriteLine("FAILURE: Value = '{0}', Expected Exception: {1}", value, exceptionType);
+ return false;
+ }
+ catch (Exception ex)
+ {
+ if (!ex.GetType().IsAssignableFrom(exceptionType))
+ {
+ TestLibrary.Logging.WriteLine("FAILURE: Wrong Exception Type, Value = '{0}', Exception Type: {1} Expected Type: {2}", value, ex.GetType(), exceptionType);
+ return false;
+ }
+ return true;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrCtor_UInt32.csproj b/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrCtor_UInt32.csproj
new file mode 100644
index 0000000000..5581805454
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrCtor_UInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uintptrctor_uint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrCtor_UInt64.csproj b/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrCtor_UInt64.csproj
new file mode 100644
index 0000000000..84673c8167
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrCtor_UInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uintptrctor_uint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrCtor_VoidPtr.csproj b/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrCtor_VoidPtr.csproj
new file mode 100644
index 0000000000..131278c2dd
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrCtor_VoidPtr.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uintptrctor_voidptr.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrEquals.csproj b/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrEquals.csproj
new file mode 100644
index 0000000000..6b0ce0a2a6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrEquals.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uintptrequals.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrGetHashCode.csproj
new file mode 100644
index 0000000000..e913321abc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uintptrgethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrSize.csproj b/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrSize.csproj
new file mode 100644
index 0000000000..69050eef8c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrSize.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uintptrsize.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrToPointer.csproj b/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrToPointer.csproj
new file mode 100644
index 0000000000..7d7f1dd07c
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrToPointer.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uintptrtopointer.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrToString.csproj b/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrToString.csproj
new file mode 100644
index 0000000000..4d87714bd9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrToString.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uintptrtostring.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrToUInt32.csproj b/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrToUInt32.csproj
new file mode 100644
index 0000000000..b0d9a1d536
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrToUInt32.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uintptrtouint32.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrToUInt64.csproj b/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrToUInt64.csproj
new file mode 100644
index 0000000000..d8023e5e68
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrToUInt64.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uintptrtouint64.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrZero.csproj b/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrZero.csproj
new file mode 100644
index 0000000000..3707a4dc6f
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uintptr/UIntPtrZero.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="uintptrzero.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/uintptr/uintptrctor_uint32.cs b/tests/src/CoreMangLib/cti/system/uintptr/uintptrctor_uint32.cs
new file mode 100644
index 0000000000..ffba9125fe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uintptr/uintptrctor_uint32.cs
@@ -0,0 +1,162 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UIntPtr(UInt32)
+/// Initializes a new instance of the UIntPtr structure using the specified 32-bit pointer or handle.
+/// This constructor is not CLS-compliant.
+/// </summary>
+public class UIntPtrCtor
+{
+
+ public static int Main()
+ {
+ UIntPtrCtor testObj = new UIntPtrCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("for constructor: UIntPtr(UInt32)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: random UInt32 value";
+ string errorDesc;
+
+ UIntPtr actualUIntPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt32 ui = this.GetUInt32();
+ actualUIntPtr = new UIntPtr(ui);
+
+ actualResult = actualUIntPtr.ToUInt32() == ui;
+
+ if (!actualResult)
+ {
+ errorDesc = "Actual UIntPtr value is not " + ui + " as expected: Actual(" + actualUIntPtr + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: UInt32.MinValue";
+ string errorDesc;
+
+ UIntPtr actualUIntPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt32 ui = UInt32.MinValue;
+ actualUIntPtr = new UIntPtr(ui);
+
+ actualResult = actualUIntPtr.ToUInt32() == ui;
+
+ if (!actualResult)
+ {
+ errorDesc = "Actual UIntPtr value is not " + ui + " as expected: Actual(" + actualUIntPtr + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: UInt32.MaxValue";
+ string errorDesc;
+
+ UIntPtr actualUIntPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt32 ui = UInt32.MaxValue;
+ actualUIntPtr = new UIntPtr(ui);
+
+ actualResult = actualUIntPtr.ToUInt32() == ui;
+
+ if (!actualResult)
+ {
+ errorDesc = "Actual UIntPtr value is not " + ui + " as expected: Actual(" + actualUIntPtr + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #region Helper methods for test
+ //Generate a random UInt32 value
+ private UInt32 GetUInt32()
+ {
+ Int64 i = TestLibrary.Generator.GetInt64(-55) % ((Int64)UInt32.MaxValue + (Int64)1);
+ return (UInt32)i;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uintptr/uintptrctor_uint64.cs b/tests/src/CoreMangLib/cti/system/uintptr/uintptrctor_uint64.cs
new file mode 100644
index 0000000000..e3934d446e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uintptr/uintptrctor_uint64.cs
@@ -0,0 +1,249 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UIntPtr(UInt64)
+/// Initializes a new instance of the UIntPtr structure using the specified 32-bit pointer or handle.
+/// This constructor is not CLS-compliant.
+/// </summary>
+
+public class UIntPtrCtor
+{
+ public static int Main()
+ {
+ UIntPtrCtor testObj = new UIntPtrCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("for constructor: UIntPtr(UInt64)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: random valid UInt64 value";
+ string errorDesc;
+
+ UIntPtr actualUIntPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt64 ui = this.GetValidUInt64();
+ actualUIntPtr = new UIntPtr(ui);
+
+ actualResult = actualUIntPtr.ToUInt64() == ui;
+
+ if (!actualResult)
+ {
+ errorDesc = "Actual UIntPtr value is not " + ui + " as expected: Actual(" + actualUIntPtr + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: value is UInt64.MinValue"; // that is 0
+
+ string errorDesc;
+
+ UIntPtr actualUIntPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt64 ui = UInt64.MinValue;
+ actualUIntPtr = new UIntPtr(ui);
+
+ actualResult = actualUIntPtr.ToUInt64() == ui;
+
+ if (!actualResult)
+ {
+ errorDesc = "Actual UIntPtr value is not " + ui + " as expected: Actual(" + actualUIntPtr + ")";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ string testDesc = string.Format("PosTest3: value is UInt{0}.MaxValue", 8 * UIntPtr.Size);
+
+ string errorDesc;
+
+ UIntPtr actualUIntPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ UInt64 ui = (UIntPtr.Size == 4) ? UInt32.MaxValue : UInt64.MaxValue;
+ actualUIntPtr = new UIntPtr(ui);
+
+ actualResult = actualUIntPtr.ToUInt64() == ui;
+
+ if (!actualResult)
+ {
+ errorDesc = "Actual UIntPtr value is not " + ui + " as expected: Actual(" + actualUIntPtr + ")";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+
+ #region Negative tests
+ //OverflowException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: Value is UInt64.MaxValue";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ if (UIntPtr.Size == 4) // platform is 32-bit
+ {
+ UInt64 ui = UInt64.MaxValue;
+ UIntPtr actualUIntPtr = new UIntPtr(ui);
+
+ errorDesc = "OverflowException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ else
+ {
+ retVal = true;
+ }
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("08" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N002";
+ const string c_TEST_DESC = "NegTest2: Value is UInt32.MaxValue + 1";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ if (UIntPtr.Size == 4) // platform is 32-bit
+ {
+ UInt64 ui = 1 + (UInt64)UInt32.MaxValue;
+ UIntPtr actualUIntPtr = new UIntPtr(ui);
+
+ errorDesc = "OverflowException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ else
+ {
+ retVal = true;
+ }
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Helper methods for test
+ //Generate a random UInt64 value between 0 and UInt32.MaxValue
+ private UInt64 GetValidUInt64()
+ {
+ Int64 i = TestLibrary.Generator.GetInt64(-55) % ((Int64)UInt32.MaxValue + (Int64)1);
+ return (UInt64)i;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uintptr/uintptrctor_voidptr.cs b/tests/src/CoreMangLib/cti/system/uintptr/uintptrctor_voidptr.cs
new file mode 100644
index 0000000000..320a6f3de4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uintptr/uintptrctor_voidptr.cs
@@ -0,0 +1,187 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UIntPtr(Void*)
+/// Initializes a new instance of UIntPtr using the specified pointer to an unspecified type.
+/// This constructor is not CLS-compliant.
+/// </summary>
+
+public unsafe class UIntPtrCtor
+{
+ public static int Main()
+ {
+ UIntPtrCtor testObj = new UIntPtrCtor();
+
+ TestLibrary.TestFramework.BeginTestCase("for constructor: UIntPtr(Void*)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+ #region Positive tests
+
+ [System.Security.SecuritySafeCritical]
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ string testDesc = string.Format("PosTest1: value is a random {0}-bit c-style generic pointer",
+ 8*UIntPtr.Size);
+
+ string errorDesc;
+
+ UIntPtr actualUIntPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ void * ptr;
+
+ if(UIntPtr.Size == 4) //32-bit platform
+ {
+ ptr = (void *)TestLibrary.Generator.GetInt32(-55);
+ }
+ else //64-bit platform
+ {
+ ptr = (void *)TestLibrary.Generator.GetInt64(-55);
+ }
+
+ actualUIntPtr = new UIntPtr(ptr);
+
+ actualResult = actualUIntPtr.ToPointer() == ptr;
+
+ if (!actualResult)
+ {
+ errorDesc = "Actual UIntPtr value is not " + (UInt64)ptr + " as expected: Actual(" + actualUIntPtr + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [System.Security.SecuritySafeCritical]
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: value is 0";
+
+ string errorDesc;
+
+ UIntPtr actualUIntPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ void *ptr = (void *) 0;
+
+ actualUIntPtr = new UIntPtr(ptr);
+
+ actualResult = actualUIntPtr.ToPointer() == ptr;
+
+ if (!actualResult)
+ {
+ errorDesc = "Actual UIntPtr value is not " + (int)ptr + " as expected: Actual(" + actualUIntPtr + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [System.Security.SecuritySafeCritical]
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ string testDesc = string.Format("PosTest1: value is max {0}-bit pointer: UInt{0}.MaxValue",
+ 8 * UIntPtr.Size);
+
+ string errorDesc;
+
+ UIntPtr actualUIntPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ void* ptr;
+
+ if (UIntPtr.Size == 4)
+ {
+ ptr = (void*)UInt32.MaxValue;
+ }
+ else
+ {
+ ptr = (void *)UInt64.MaxValue;
+ }
+
+ actualUIntPtr = new UIntPtr(ptr);
+
+ actualResult = actualUIntPtr.ToPointer() == ptr;
+
+ if (!actualResult)
+ {
+ errorDesc = "Actual UIntPtr value is not " + (UInt64)ptr + " as expected: Actual(" + actualUIntPtr + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uintptr/uintptrequals.cs b/tests/src/CoreMangLib/cti/system/uintptr/uintptrequals.cs
new file mode 100644
index 0000000000..3ff9e26621
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uintptr/uintptrequals.cs
@@ -0,0 +1,271 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UIntPtr.Equals(Object)
+/// Returns a value indicating whether this instance is equal to a specified object.
+/// This method is not CLS-compliant.
+/// </summary>
+public unsafe class UIntPtrEquals
+{
+ public static int Main()
+ {
+ UIntPtrEquals testObj = new UIntPtrEquals();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: UIntPtr.Equals(Object)");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: UIntPtr.Zero vs UIntPtr(0)";
+ string errorDesc;
+
+ UIntPtr srcUIntPtr, expUIntPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expUIntPtr = new UIntPtr();
+ srcUIntPtr = UIntPtr.Zero;
+
+ actualResult = srcUIntPtr.Equals(expUIntPtr);
+
+ if (!actualResult)
+ {
+ errorDesc = "Source UIntPtr value does not equal" + expUIntPtr + " as expected: Actual(" + srcUIntPtr + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: UIntPtr.Zero vs non-zero UIntPtr";
+ string errorDesc;
+
+ UIntPtr srcUIntPtr, expUIntPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expUIntPtr = new UIntPtr((UInt32)TestLibrary.Generator.GetInt32(-55) + 1);
+ srcUIntPtr = UIntPtr.Zero;
+
+ actualResult = !srcUIntPtr.Equals(expUIntPtr);
+
+ if (!actualResult)
+ {
+ errorDesc = "Source UIntPtr value does not equal" + expUIntPtr + " as expected: Actual(" + srcUIntPtr + ")";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ const string c_TEST_DESC = "PosTest3: two UIntPtrs with random value";
+ string errorDesc;
+
+ UIntPtr uiPtrA, uiPtrB;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt32 uiA = (UInt32)TestLibrary.Generator.GetInt32(-55);
+ UInt32 uiB = (UInt32)TestLibrary.Generator.GetInt32(-55);
+ uiPtrA = new UIntPtr(uiA);
+ uiPtrB = new UIntPtr(uiB);
+
+ actualResult = uiPtrA.Equals(uiPtrB);
+ actualResult = !((uiA == uiB) ^ actualResult);
+
+ if (!actualResult)
+ {
+ errorDesc = "UIntPtr " + uiPtrA + " vs UIntPtr " + uiPtrB + " is " + actualResult +
+ ", that differs from UInt32 " + uiA + " vs UInt32 " + uiB;
+
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P004";
+ const string c_TEST_DESC = "PosTest4: UIntPtr vs UInt32";
+ string errorDesc;
+
+ UIntPtr srcUIntPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt32 ui = (UInt32)TestLibrary.Generator.GetInt32(-55);
+ srcUIntPtr = new UIntPtr(ui);
+
+ actualResult = !srcUIntPtr.Equals(ui);
+
+ if (!actualResult)
+ {
+ errorDesc = "UIntPtr " + srcUIntPtr + " should not equal UInt" + ui;
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P005";
+ const string c_TEST_DESC = "PosTest5: UIntPtr vs Object";
+ string errorDesc;
+
+ UIntPtr srcUIntPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ object obj = new object();
+ srcUIntPtr = new UIntPtr();
+
+ actualResult = !srcUIntPtr.Equals(obj);
+
+ if (!actualResult)
+ {
+ errorDesc = "UIntPtr " + srcUIntPtr + " should not equal object" + obj;
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ [System.Security.SecuritySafeCritical]
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P006";
+ const string c_TEST_DESC = "PosTest6: UIntPtr vs IntPtr";
+ string errorDesc;
+
+ UIntPtr uiPtr;
+ IntPtr iPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ void * ptr = (void *)TestLibrary.Generator.GetInt32(-55);
+ uiPtr = new UIntPtr(ptr);
+ iPtr = new IntPtr(ptr);
+
+
+ actualResult = !uiPtr.Equals(iPtr);
+
+ if (!actualResult)
+ {
+ errorDesc = "UIntPtr " + uiPtr + " should not equal IntPtr " + iPtr;
+ TestLibrary.TestFramework.LogError("011" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("012" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/uintptr/uintptrgethashcode.cs b/tests/src/CoreMangLib/cti/system/uintptr/uintptrgethashcode.cs
new file mode 100644
index 0000000000..62e236c949
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uintptr/uintptrgethashcode.cs
@@ -0,0 +1,198 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UIntPtr.GetHashCode()
+/// Returns the hash code for this instance.
+/// This method is not CLS-compliant.
+/// </summary>
+public class UIntPtrGetHashCode
+{
+ public static int Main()
+ {
+ UIntPtrGetHashCode testObj = new UIntPtrGetHashCode();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: UIntPtr.GetHashCode()");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: UIntPtr.Zero";
+ string errorDesc;
+
+ UIntPtr uiPtr;
+ int actualValue, expectedValue;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ uiPtr = UIntPtr.Zero;
+ expectedValue = 0;
+ actualValue = uiPtr.GetHashCode();
+
+ actualResult = actualValue == expectedValue;
+
+ if (!actualResult)
+ {
+ errorDesc = "Actual hash code is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: UIntPtr with a random Int32 value ";
+ string errorDesc;
+
+ UIntPtr uiPtr;
+ int actualValue, expectedValue;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt32 ui = (UInt32)TestLibrary.Generator.GetInt32(-55);
+ uiPtr = new UIntPtr(ui);
+ expectedValue = (Int32)ui;
+ actualValue = uiPtr.GetHashCode();
+
+ actualResult = actualValue == expectedValue;
+
+ if (!actualResult)
+ {
+ errorDesc = "Actual hash code is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ const string c_TEST_DESC = "PosTest3: UIntPtr with a value greater than Int32.MaxValue";
+ string errorDesc;
+
+ UIntPtr uiPtr;
+ int actualValue, expectedValue;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt32 ui = (UInt32)Int32.MaxValue + (UInt32)TestLibrary.Generator.GetInt32(-55);
+ uiPtr = new UIntPtr(ui);
+ expectedValue = unchecked((Int32)((Int64)ui));
+
+ actualValue = uiPtr.GetHashCode();
+
+ actualResult = actualValue == expectedValue;
+
+ if (!actualResult)
+ {
+ errorDesc = "Actual hash code is not " + expectedValue + " as expected: Actual(" + actualValue + ")";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ try
+ {
+ ulong addressOne = 0x123456FFFFFFFFUL;
+ ulong addressTwo = 0x654321FFFFFFFFUL;
+ System.UIntPtr ipOne = new UIntPtr(addressOne);
+ System.UIntPtr ipTwo = new UIntPtr(addressTwo);
+ if (ipOne.GetHashCode() == ipTwo.GetHashCode())
+ {
+ TestLibrary.TestFramework.LogError("004", "expect different hashcodes.");
+ retVal = false;
+ }
+ }
+ catch (System.OverflowException ex)
+ {
+ if (System.IntPtr.Size == 4)
+ {
+ // ok, that's what it should be
+ return retVal;
+ }
+ else
+ {
+ TestLibrary.TestFramework.LogError("004", "IntPtr should not have thrown an OverflowException: " + ex.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
+ retVal = false;
+ }
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uintptr/uintptrsize.cs b/tests/src/CoreMangLib/cti/system/uintptr/uintptrsize.cs
new file mode 100644
index 0000000000..d0496c78fe
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uintptr/uintptrsize.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UIntPtr.Size
+/// Gets the size of this instance.
+/// This field is not CLS-compliant.
+/// </summary>
+public class UIntPtrSize
+{
+ public static int Main()
+ {
+ UIntPtrSize testObj = new UIntPtrSize();
+
+ TestLibrary.TestFramework.BeginTestCase("for property: UIntPtr.Size");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+
+ [System.Security.SecuritySafeCritical]
+ public unsafe bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: UIntPtr.Size is platform specified";
+ string errorDesc;
+
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ int expectedSize = sizeof(void *);
+ actualResult = UIntPtr.Size == expectedSize;
+ if (!actualResult)
+ {
+ errorDesc = "The size of UIntSize should be " + expectedSize;
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uintptr/uintptrtopointer.cs b/tests/src/CoreMangLib/cti/system/uintptr/uintptrtopointer.cs
new file mode 100644
index 0000000000..9796f89341
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uintptr/uintptrtopointer.cs
@@ -0,0 +1,166 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UIntPtr.ToPointer()
+/// Converts the value of this instance to a pointer to an unspecified type.
+/// This method is not CLS-compliant.
+/// </summary>
+public unsafe class UIntPtrToPointer
+{
+ public static int Main()
+ {
+ UIntPtrToPointer testObj = new UIntPtrToPointer();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: UIntPtr.ToPointer()");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+
+ [System.Security.SecuritySafeCritical]
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: UIntPtr.Zero";
+ string errorDesc;
+
+ void *expectedPtr;
+ void *actualPtr;
+ UIntPtr uiPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedPtr = (void *)0;
+ uiPtr = UIntPtr.Zero;
+ actualPtr = uiPtr.ToPointer();
+
+ actualResult = actualPtr == expectedPtr;
+ if (!actualResult)
+ {
+ errorDesc = "Actual pointer value is not " + (UInt32)expectedPtr + " as expected: Actual(" + (UInt32)actualPtr + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [System.Security.SecuritySafeCritical]
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: UIntPtr with a random Int32 value ";
+ string errorDesc;
+
+ void *expectedPtr;
+ void *actualPtr;
+ UIntPtr uiPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt32 ui = (UInt32)TestLibrary.Generator.GetInt32(-55);
+ expectedPtr = (void *)ui;
+ uiPtr = new UIntPtr(ui);
+ actualPtr = uiPtr.ToPointer();
+
+ actualResult = actualPtr == expectedPtr;
+ if (!actualResult)
+ {
+ errorDesc = "Actual pointer value is not " + (UInt32)expectedPtr + " as expected: Actual(" + (UInt32)actualPtr + ")";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [System.Security.SecuritySafeCritical]
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ const string c_TEST_DESC = "PosTest3: UIntPtr with a value greater than Int32.MaxValue";
+ string errorDesc;
+
+ void *expectedPtr;
+ void *actualPtr;
+ UIntPtr uiPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt32 ui = (UInt32)Int32.MaxValue + (UInt32)TestLibrary.Generator.GetInt32(-55);
+ expectedPtr = (void *)ui;
+ uiPtr = new UIntPtr(ui);
+ actualPtr = uiPtr.ToPointer();
+
+ actualResult = actualPtr == expectedPtr;
+ if (!actualResult)
+ {
+ errorDesc = "Actual hash code is not " + (UInt64)expectedPtr + " as expected: Actual(" + (UInt64)actualPtr + ")";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uintptr/uintptrtostring.cs b/tests/src/CoreMangLib/cti/system/uintptr/uintptrtostring.cs
new file mode 100644
index 0000000000..478185dc5a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uintptr/uintptrtostring.cs
@@ -0,0 +1,198 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UIntPtr.ToString()
+/// Converts the value of this instance to a pointer to an unspecified type.
+/// This method is not CLS-compliant.
+/// </summary>
+public class UIntPtrToString
+{
+ public static int Main()
+ {
+ UIntPtrToString testObj = new UIntPtrToString();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: UIntPtr.ToPointer()");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: UIntPtr.Zero";
+ string errorDesc;
+
+ string actualStr, expectedStr;
+ UIntPtr uiPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedStr = (UIntPtr.Size == 4) ? ((UInt32)0).ToString() : ((UInt64)0).ToString();
+
+ uiPtr = UIntPtr.Zero;
+ actualStr = uiPtr.ToString();
+
+ actualResult = actualStr == expectedStr;
+ if (!actualResult)
+ {
+ errorDesc = "Actual string from UIntPtr is not " + expectedStr + " as expected: Actual(" + actualStr + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: UIntPtr with a random Int32 value ";
+ string errorDesc;
+
+ string actualStr, expectedStr;
+ UIntPtr uiPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt32 ui = (UInt32)TestLibrary.Generator.GetInt32(-55);
+ expectedStr = (UIntPtr.Size == 4) ? ui.ToString() : ((UInt64)ui).ToString();
+ uiPtr = new UIntPtr(ui);
+ actualStr = uiPtr.ToString();
+
+ actualResult = actualStr == expectedStr;
+ if (!actualResult)
+ {
+ errorDesc = "Actual string from UIntPtr is not " + expectedStr + " as expected: Actual(" + actualStr + ")";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ const string c_TEST_DESC = "PosTest3: UIntPtr with a value greater than Int32.MaxValue";
+ string errorDesc;
+
+ string actualStr, expectedStr;
+ UIntPtr uiPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ UInt32 ui = (UInt32)Int32.MaxValue + (UInt32)TestLibrary.Generator.GetInt32(-55);
+ expectedStr = (UIntPtr.Size == 4) ? ui.ToString() : ((UInt64)ui).ToString();
+ uiPtr = new UIntPtr(ui);
+ actualStr = uiPtr.ToString();
+
+ actualResult = actualStr == expectedStr;
+ if (!actualResult)
+ {
+ errorDesc = "Actual hash code is not " + expectedStr + " as expected: Actual(" + actualStr + ")";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P004";
+ string testDesc = string.Format("PosTest4: value is max {0}-bit pointer: UInt{0}.MaxValue",
+ 8 * UIntPtr.Size);
+ string errorDesc;
+
+ string actualStr, expectedStr;
+ UIntPtr uiPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ UInt64 ui = (UIntPtr.Size == 4) ? UInt32.MaxValue : UInt64.MaxValue;
+ expectedStr = (UIntPtr.Size == 4) ? ((UInt32)ui).ToString() : ui.ToString();
+ uiPtr = new UIntPtr(ui);
+ actualStr = uiPtr.ToString();
+
+ actualResult = actualStr == expectedStr;
+ if (!actualResult)
+ {
+ errorDesc = "Actual hash code is not " + expectedStr + " as expected: Actual(" + actualStr + ")";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uintptr/uintptrtouint32.cs b/tests/src/CoreMangLib/cti/system/uintptr/uintptrtouint32.cs
new file mode 100644
index 0000000000..3e16e66f58
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uintptr/uintptrtouint32.cs
@@ -0,0 +1,257 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UIntPtr.ToUInt32()
+/// Converts the value of this instance to a 32-bit unsigned integer.
+/// This method is not CLS-compliant.
+/// </summary>
+public class UIntPtrToUInt32
+{
+ public static int Main()
+ {
+ UIntPtrToUInt32 testObj = new UIntPtrToUInt32();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: UIntPtr.ToPointer()");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: UIntPtr.Zero";
+ string errorDesc;
+
+ UInt32 actualUI, expectedUI;
+ UIntPtr uiPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedUI = 0;
+
+ uiPtr = UIntPtr.Zero;
+ actualUI = uiPtr.ToUInt32();
+
+ actualResult = actualUI == expectedUI;
+ if (!actualResult)
+ {
+ errorDesc = "Actual UInt32 from UIntPtr is not " + expectedUI + " as expected: Actual(" + actualUI + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: UIntPtr with a random Int32 value ";
+ string errorDesc;
+
+ UInt32 actualUI, expectedUI;
+ UIntPtr uiPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedUI = (UInt32)TestLibrary.Generator.GetInt32(-55);
+ uiPtr = new UIntPtr(expectedUI);
+ actualUI = uiPtr.ToUInt32();
+
+ actualResult = actualUI == expectedUI;
+ if (!actualResult)
+ {
+ errorDesc = "Actual UInt32 from UIntPtr is not " + expectedUI + " as expected: Actual(" + actualUI + ")";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ const string c_TEST_DESC = "PosTest3: UIntPtr with a value greater than Int32.MaxValue";
+ string errorDesc;
+
+ UInt32 actualUI, expectedUI;
+ UIntPtr uiPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedUI = (UInt32)Int32.MaxValue + (UInt32)TestLibrary.Generator.GetInt32(-55);
+ uiPtr = new UIntPtr(expectedUI);
+ actualUI = uiPtr.ToUInt32();
+
+ actualResult = actualUI == expectedUI;
+ if (!actualResult)
+ {
+ errorDesc = "Actual hash code is not " + expectedUI + " as expected: Actual(" + actualUI + ")";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P004";
+ const string c_TEST_DESC = "PosTest4: UIntPtr with a value UInt32.MaxValue";
+ string errorDesc;
+
+ UInt32 actualUI, expectedUI;
+ UIntPtr uiPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedUI = UInt32.MaxValue;
+ uiPtr = new UIntPtr(expectedUI);
+ actualUI = uiPtr.ToUInt32();
+
+ actualResult = actualUI == expectedUI;
+ if (!actualResult)
+ {
+ errorDesc = "Actual hash code is not " + expectedUI + " as expected: Actual(" + actualUI + ")";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #region Negative tests
+ //OverflowException
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "N001";
+ const string c_TEST_DESC = "NegTest1: On a 32-bit platform, the value of this instance is too large to represent as a 32-bit unsigned integer.";
+ string errorDesc;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ if (UIntPtr.Size != 8) // platform is 64-bit
+ {
+ UInt64 ui = UInt32.MaxValue + this.GetUInt64() % (UInt64.MaxValue - UInt32.MaxValue) + 1;
+ UIntPtr actualUIntPtr = new UIntPtr(ui);
+
+ errorDesc = "OverflowException is not thrown as expected";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ else
+ {
+ retVal = true;
+ }
+ }
+ catch (OverflowException)
+ {
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("08" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region helper method for tests
+ private UInt64 GetUInt64()
+ {
+ byte[] buffer = new byte[8];
+ UInt64 uiVal;
+
+ TestLibrary.Generator.GetBytes(-55, buffer);
+
+ // convert to UInt64
+ uiVal = 0;
+ for (int i = 0; i < buffer.Length; i++)
+ {
+ uiVal |= ((UInt64)buffer[i] << (i * 8));
+ }
+
+ TestLibrary.TestFramework.LogInformation("Random UInt64 produced: " + uiVal.ToString());
+ return uiVal;
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/uintptr/uintptrtouint64.cs b/tests/src/CoreMangLib/cti/system/uintptr/uintptrtouint64.cs
new file mode 100644
index 0000000000..25f306d3a9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uintptr/uintptrtouint64.cs
@@ -0,0 +1,177 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UIntPtr.ToUInt64()
+/// Converts the value of this instance to a 64-bit unsigned integer.
+/// This method is not CLS-compliant.
+/// </summary>
+public class UIntPtrToUInt64
+{
+ public static int Main()
+ {
+ UIntPtrToUInt64 testObj = new UIntPtrToUInt64();
+
+ TestLibrary.TestFramework.BeginTestCase("for method: UIntPtr.ToPointer()");
+ if (testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: UIntPtr.Zero";
+ string errorDesc;
+
+ UInt64 actualUI, expectedUI;
+ UIntPtr uiPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedUI = 0;
+
+ uiPtr = UIntPtr.Zero;
+ actualUI = uiPtr.ToUInt64();
+
+ actualResult = actualUI == expectedUI;
+ if (!actualResult)
+ {
+ errorDesc = "Actual UInt32 from UIntPtr is not " + expectedUI + " as expected: Actual(" + actualUI + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: UIntPtr with a random value between 0 and UInt32.MaxValue";
+ string errorDesc;
+
+ UInt64 actualUI, expectedUI;
+ UIntPtr uiPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedUI = this.GetUInt64() % ((UInt64)UInt32.MaxValue + 1);
+ uiPtr = new UIntPtr(expectedUI);
+ actualUI = uiPtr.ToUInt64();
+
+ actualResult = actualUI == expectedUI;
+ if (!actualResult)
+ {
+ errorDesc = "Actual UInt32 from UIntPtr is not " + expectedUI + " as expected: Actual(" + actualUI + ")";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ string testDesc = string.Format("PosTest3: UIntPtr is max {0}-bit pointer: UInt{0}.MaxValue",
+ 8 * UIntPtr.Size);
+ string errorDesc;
+
+ UInt64 actualUI, expectedUI;
+ UIntPtr uiPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(testDesc);
+ try
+ {
+ expectedUI = (UIntPtr.Size == 4) ? UInt32.MaxValue : UInt64.MaxValue;
+ uiPtr = (UIntPtr.Size == 4) ? new UIntPtr((UInt32)expectedUI) : new UIntPtr(expectedUI);
+ actualUI = uiPtr.ToUInt64();
+
+ actualResult = actualUI == expectedUI;
+ if (!actualResult)
+ {
+ errorDesc = "Actual hash code is not " + expectedUI + " as expected: Actual(" + actualUI + ")";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ #region helper method for tests
+ private UInt64 GetUInt64()
+ {
+ byte[] buffer = new byte[8];
+ UInt64 uiVal;
+
+ TestLibrary.Generator.GetBytes(-55, buffer);
+
+ // convert to UInt64
+ uiVal = 0;
+ for (int i = 0; i < buffer.Length; i++)
+ {
+ uiVal |= ((UInt64)buffer[i] << (i * 8));
+ }
+
+ TestLibrary.TestFramework.LogInformation("Random UInt64 produced: " + uiVal.ToString());
+ return uiVal;
+ }
+ #endregion
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/uintptr/uintptrzero.cs b/tests/src/CoreMangLib/cti/system/uintptr/uintptrzero.cs
new file mode 100644
index 0000000000..0aeccaf906
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/uintptr/uintptrzero.cs
@@ -0,0 +1,233 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// UIntPtr.Zero
+/// A read-only field that represents a pointer or handle that has been initialized to zero.
+/// This field is not CLS-compliant.
+/// </summary>
+public class UIntPtrZero
+{
+ private static UIntPtr m_zeroUIntPtr = new UIntPtr();
+
+ public static int Main()
+ {
+ UIntPtrZero testObj = new UIntPtrZero();
+
+ TestLibrary.TestFramework.BeginTestCase("for field: UIntPtr.Zero");
+ if(testObj.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P001";
+ const string c_TEST_DESC = "PosTest1: UIntPtr.Zero vs auto initianlized static UIntPtr";
+ string errorDesc;
+
+ UIntPtr expectedUIntPtr, actualUIntPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedUIntPtr = UIntPtrZero.m_zeroUIntPtr;
+ actualUIntPtr = UIntPtr.Zero;
+
+ actualResult = actualUIntPtr == expectedUIntPtr;
+
+ if (!actualResult)
+ {
+ errorDesc = "Actual UIntPtr value is not " + expectedUIntPtr + " as expected: Actual(" + actualUIntPtr + ")";
+ TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("002" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P002";
+ const string c_TEST_DESC = "PosTest2: UIntPtr.Zero vs UIntPtr(0)";
+ string errorDesc;
+
+ UIntPtr expectedUIntPtr, actualUIntPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedUIntPtr = new UIntPtr(0);
+ actualUIntPtr = UIntPtr.Zero;
+
+ actualResult = actualUIntPtr == expectedUIntPtr;
+
+ if (!actualResult)
+ {
+ errorDesc = "Actual UIntPtr value is not " + expectedUIntPtr + " as expected: Actual(" + actualUIntPtr + ")";
+ TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P003";
+ const string c_TEST_DESC = "PosTest3: UIntPtr.Zero vs nonzero UIntPtr";
+ string errorDesc;
+
+ UIntPtr expectedUIntPtr, actualUIntPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedUIntPtr = new UIntPtr(123);
+ actualUIntPtr = UIntPtr.Zero;
+
+ actualResult = actualUIntPtr != expectedUIntPtr;
+
+ if (!actualResult)
+ {
+ errorDesc = "Actual UIntPtr value is not " + expectedUIntPtr + " as expected: Actual(" + actualUIntPtr + ")";
+ TestLibrary.TestFramework.LogError("005" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("006" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [System.Security.SecuritySafeCritical]
+ public unsafe bool PosTest4()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P004";
+ const string c_TEST_DESC = "PosTest4: UIntPtr.Zero vs new UIntPtr((void *)0)";
+ string errorDesc;
+
+ UIntPtr expectedUIntPtr, actualUIntPtr;
+ void *zeroPtr = (void *)0;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedUIntPtr = new UIntPtr(zeroPtr);
+ actualUIntPtr = UIntPtr.Zero;
+
+ actualResult = actualUIntPtr == expectedUIntPtr;
+
+ if (!actualResult)
+ {
+ errorDesc = "Actual UIntPtr value is not UIntPtr((void *) 0 )" + expectedUIntPtr + " as expected: Actual(" + actualUIntPtr + ")";
+ TestLibrary.TestFramework.LogError("007" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("008" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [System.Security.SecuritySafeCritical]
+ public unsafe bool PosTest5()
+ {
+ bool retVal = true;
+
+ const string c_TEST_ID = "P005";
+ const string c_TEST_DESC = "PosTest5: UIntPtr.Zero vs new UIntPtr((ulong)0)";
+ string errorDesc;
+
+ UIntPtr expectedUIntPtr, actualUIntPtr;
+ bool actualResult;
+
+ TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
+ try
+ {
+ expectedUIntPtr = new UIntPtr((ulong) 0);
+ actualUIntPtr = UIntPtr.Zero;
+
+ actualResult = actualUIntPtr == expectedUIntPtr;
+
+ if (!actualResult)
+ {
+ errorDesc = "Actual UIntPtr value is not UIntPtr((void *) 0 )" + expectedUIntPtr + " as expected: Actual(" + actualUIntPtr + ")";
+ TestLibrary.TestFramework.LogError("009" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ errorDesc = "Unexpected exception: " + e;
+ TestLibrary.TestFramework.LogError("010" + " TestId-" + c_TEST_ID, errorDesc);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/valuetype/ValueTypeEquals.csproj b/tests/src/CoreMangLib/cti/system/valuetype/ValueTypeEquals.csproj
new file mode 100644
index 0000000000..7f70a7feac
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/valuetype/ValueTypeEquals.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="valuetypeequals.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/valuetype/ValueTypeEquals2.csproj b/tests/src/CoreMangLib/cti/system/valuetype/ValueTypeEquals2.csproj
new file mode 100644
index 0000000000..119130c54d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/valuetype/ValueTypeEquals2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="valuetypeequals2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/valuetype/valuetypeequals.cs b/tests/src/CoreMangLib/cti/system/valuetype/valuetypeequals.cs
new file mode 100644
index 0000000000..ccc69f88ba
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/valuetype/valuetypeequals.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/valuetype/valuetypeequals2.cs b/tests/src/CoreMangLib/cti/system/valuetype/valuetypeequals2.cs
new file mode 100644
index 0000000000..8efa973d89
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/valuetype/valuetypeequals2.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/version/VersionBuild.csproj b/tests/src/CoreMangLib/cti/system/version/VersionBuild.csproj
new file mode 100644
index 0000000000..976a13b00a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/version/VersionBuild.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="versionbuild.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/version/VersionCompareTo2.csproj b/tests/src/CoreMangLib/cti/system/version/VersionCompareTo2.csproj
new file mode 100644
index 0000000000..3ff809fc08
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/version/VersionCompareTo2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="versioncompareto2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/version/VersionCtor4.csproj b/tests/src/CoreMangLib/cti/system/version/VersionCtor4.csproj
new file mode 100644
index 0000000000..8de3ac3d68
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/version/VersionCtor4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="versionctor4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/version/VersionEquals1.csproj b/tests/src/CoreMangLib/cti/system/version/VersionEquals1.csproj
new file mode 100644
index 0000000000..5e346c4c26
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/version/VersionEquals1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="versionequals1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/version/VersionEquals2.csproj b/tests/src/CoreMangLib/cti/system/version/VersionEquals2.csproj
new file mode 100644
index 0000000000..6686abc663
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/version/VersionEquals2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="versionequals2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/version/VersionGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/version/VersionGetHashCode.csproj
new file mode 100644
index 0000000000..5d5fc181c7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/version/VersionGetHashCode.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="versiongethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/version/VersionMajor.csproj b/tests/src/CoreMangLib/cti/system/version/VersionMajor.csproj
new file mode 100644
index 0000000000..0b9f8c1c79
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/version/VersionMajor.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="versionmajor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/version/VersionRevision.csproj b/tests/src/CoreMangLib/cti/system/version/VersionRevision.csproj
new file mode 100644
index 0000000000..e6de823ac2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/version/VersionRevision.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="versionrevision.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/version/VersionToString1.csproj b/tests/src/CoreMangLib/cti/system/version/VersionToString1.csproj
new file mode 100644
index 0000000000..11d48dc715
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/version/VersionToString1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="versiontostring1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/version/VersionToString2.csproj b/tests/src/CoreMangLib/cti/system/version/VersionToString2.csproj
new file mode 100644
index 0000000000..eb529bbce7
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/version/VersionToString2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="versiontostring2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/version/versionbuild.cs b/tests/src/CoreMangLib/cti/system/version/versionbuild.cs
new file mode 100644
index 0000000000..4d31e270a9
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/version/versionbuild.cs
@@ -0,0 +1,138 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Build
+/// </summary>
+
+public class VersionBuild
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property Build with default ctor.");
+/*
+ try
+ {
+ Version version = new Version();
+
+ if (version.Build != -1)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property Build Err !");
+ retVal = false;
+ return retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+*/
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify property Build with args ctor.");
+
+ try
+ {
+ int intMajor = TestLibrary.Generator.GetInt32(-55);
+ int intMinor = TestLibrary.Generator.GetInt32(-55);
+ int intBuild = TestLibrary.Generator.GetInt32(-55);
+ int intRevision = TestLibrary.Generator.GetInt32(-55);
+ Version version = new Version(intMajor, intMinor, intBuild, intRevision);
+
+ if (version.Build != intBuild)
+ {
+ Console.WriteLine("excepted value is :" + version.Build);
+ Console.WriteLine("actual value is :" + intBuild);
+
+ TestLibrary.TestFramework.LogError("002.1", "Property Build Err !");
+ retVal = false;
+ return retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ VersionBuild test = new VersionBuild();
+
+ TestLibrary.TestFramework.BeginTestCase("VersionBuild");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/version/versioncompareto2.cs b/tests/src/CoreMangLib/cti/system/version/versioncompareto2.cs
new file mode 100644
index 0000000000..9d9c3260d2
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/version/versioncompareto2.cs
@@ -0,0 +1,144 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// CompareTo(System.Version)
+/// </summary>
+
+public class VersionCompareTo2
+{
+ public static int Main()
+ {
+ VersionCompareTo2 test = new VersionCompareTo2();
+
+ TestLibrary.TestFramework.BeginTestCase("VersionCompareTo2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Ensure CompareTo(System.Version) successful when the current Version object is a version before version.");
+
+ try
+ {
+ Version TestVersion1 = new Version("2.3.4.5");
+ Version TestVersion2 = new Version("2.3.4.0");
+ if (TestVersion2.CompareTo(TestVersion1) >= 0)
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "CompareTo(System.Version) failed when the current Version object is a version before version!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Ensure CompareTo(System.Version) successful when the current Version object is the same version as version.");
+
+ try
+ {
+ Version TestVersion1 = new Version("2.3.4.5");
+ Version TestVersion2 = new Version("2.3.4.5");
+ if (TestVersion2.CompareTo(TestVersion1) != 0)
+ {
+ TestLibrary.TestFramework.LogError("P02.1", "CompareTo(System.Version) failed when the current Version object is the same version as version!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P02.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Ensure CompareTo(System.Version) successful when the current Version object is a version subsequent to version.");
+
+ try
+ {
+ Version TestVersion1 = new Version("2.3.4.5");
+ Version TestVersion2 = new Version("2.3.4.8");
+ if (TestVersion2.CompareTo(TestVersion1) <= 0)
+ {
+ TestLibrary.TestFramework.LogError("P03.1", "CompareTo(System.Version) failed when the current Version object is a version subsequent to version!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P03.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Ensure CompareTo(System.Version) successful when version is a null reference.");
+
+ try
+ {
+ Version TestVersion2 = new Version("2.3.4.8");
+ if (TestVersion2.CompareTo(null) <= 0)
+ {
+ TestLibrary.TestFramework.LogError("P04.1", "CompareTo(System.Version) failed when version is a null reference!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P04.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/version/versionctor4.cs b/tests/src/CoreMangLib/cti/system/version/versionctor4.cs
new file mode 100644
index 0000000000..81d943cbd6
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/version/versionctor4.cs
@@ -0,0 +1,310 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// ctor(System.String)
+/// </summary>
+
+public class VersionCtor4
+{
+ public static int Main()
+ {
+ VersionCtor4 test = new VersionCtor4();
+
+ TestLibrary.TestFramework.BeginTestCase("VersionCtor4");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ TestLibrary.TestFramework.LogInformation("[Negative]");
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+ retVal = NegTest3() && retVal;
+ retVal = NegTest4() && retVal;
+ retVal = NegTest5() && retVal;
+ retVal = NegTest6() && retVal;
+ retVal = NegTest7() && retVal;
+ retVal = NegTest8() && retVal;
+ retVal = NegTest9() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Ensure ctor(System.String) successful.");
+
+ try
+ {
+ Version TestVersion = new Version("2.3.4.5");
+ if (TestVersion.Major != 2 || TestVersion.Minor != 3 || TestVersion.Build != 4 || TestVersion.Revision != 5)
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "ctor(System.String) failed!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentOutOfRangeException should be thrown if major is less than zero.");
+
+ try
+ {
+ Version TestVersion = new Version("-2.3.4.5");
+ TestLibrary.TestFramework.LogError("N01.1", "ArgumentOutOfRangeException is not thrown when major is less than zero!");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentOutOfRangeException should be thrown if minor is less than zero.");
+
+ try
+ {
+ Version TestVersion = new Version("2.-3.4.5");
+ TestLibrary.TestFramework.LogError("N02.1", "ArgumentOutOfRangeException is not thrown when minor is less than zero!");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N02.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest3: ArgumentOutOfRangeException should be thrown if build is less than zero.");
+
+ try
+ {
+ Version TestVersion = new Version("2.3.-4.5");
+ TestLibrary.TestFramework.LogError("N03.1", "ArgumentOutOfRangeException is not thrown when build is less than zero!");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N03.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest4: ArgumentOutOfRangeException should be thrown if revision is less than zero.");
+
+ try
+ {
+ Version TestVersion = new Version("2.3.4.-5");
+ TestLibrary.TestFramework.LogError("N04.1", "ArgumentOutOfRangeException is not thrown when revision is less than zero!");
+ retVal = false;
+ }
+ catch (ArgumentOutOfRangeException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N04.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest5()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest5: ArgumentException should be thrown if version has fewer than two components.");
+
+ try
+ {
+ Version TestVersion = new Version("2");
+ TestLibrary.TestFramework.LogError("N05.1", "ArgumentException is not thrown when version has fewer than two components!");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N05.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest6()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest6: ArgumentException should be thrown if version has more than four components.");
+
+ try
+ {
+ Version TestVersion = new Version("2.3.4.5.6");
+ TestLibrary.TestFramework.LogError("N06.1", "ArgumentException is not thrown when version has more than four components!");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N06.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest7()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest7: ArgumentNullException should be thrown if version is a null reference.");
+
+ try
+ {
+ Version TestVersion = new Version(null);
+ TestLibrary.TestFramework.LogError("N07.1", "ArgumentNullException is not thrown when version is a null reference!");
+ retVal = false;
+ }
+ catch (ArgumentNullException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N07.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest8()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest8: FormatException should be thrown if one component of version does not parse to an integer.");
+
+ try
+ {
+ Version TestVersion = new Version("2.w.4.5");
+ TestLibrary.TestFramework.LogError("N08.1", "FormatException is not thrown when one component of version does not parse to an integer!");
+ retVal = false;
+ }
+ catch (FormatException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N08.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest9()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("NegTest9: OverflowException should be thrown if one component of version represents a number greater than MaxValue.");
+
+ try
+ {
+ unchecked
+ {
+ Int64 testInt = Int64.MaxValue;
+ String testString = testInt.ToString();
+ String resultString = "2.";
+ resultString = String.Concat(resultString, testString);
+ resultString = String.Concat(resultString, ".4.5");
+ Version TestVersion = new Version(resultString);
+ }
+ TestLibrary.TestFramework.LogError("N09.1", "OverflowException is not thrown when one component of version does not parse to an integer!");
+ retVal = false;
+ }
+ catch (OverflowException)
+ {
+
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("N09.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/version/versionequals1.cs b/tests/src/CoreMangLib/cti/system/version/versionequals1.cs
new file mode 100644
index 0000000000..c82a8b2914
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/version/versionequals1.cs
@@ -0,0 +1,146 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// Equals(System.Object)
+/// </summary>
+
+public class VersionEquals1
+{
+ public static int Main()
+ {
+ VersionEquals1 test = new VersionEquals1();
+
+ TestLibrary.TestFramework.BeginTestCase("VersionEquals1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Ensure Equals(System.Object) return true when the current Version object and obj are both Version objects and every component of the current Version object matches the corresponding component of obj.");
+
+ try
+ {
+ Version TestVersion1 = new Version("2.3.4.5");
+ Object TestObject1 = (Object)TestVersion1;
+ Version TestVersion2 = new Version("2.3.4.5");
+ if (!TestVersion2.Equals(TestObject1))
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "Equals(System.Object) failed when the current Version object and obj are both Version objects and every component of the current Version object matches the corresponding component of obj!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Ensure Equals(System.Object) return false when the current Version object and obj are both Version objects but not every component of the current Version object matches the corresponding component of obj.");
+
+ try
+ {
+ Version TestVersion1 = new Version("2.3.4.5");
+ Object TestObject1 = (Object)TestVersion1;
+ Version TestVersion2 = new Version("1.2.3.4");
+ if (TestVersion2.Equals(TestObject1))
+ {
+ TestLibrary.TestFramework.LogError("P02.1", "Equals(System.Object) failed when the current Version object and obj are both Version objects but not every component of the current Version object matches the corresponding component of obj!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P02.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Ensure Equals(System.Object) return false when obj is not Version object.");
+
+ try
+ {
+ String TestString1 = new String(new char[] { '2', '.', '3', '.', '4', '.', '8' });
+ Version TestVersion2 = new Version("2.3.4.8");
+ if (TestVersion2.Equals(TestString1))
+ {
+ TestLibrary.TestFramework.LogError("P03.1", "Equals(System.Object) failed when obj is not Version object!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P03.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Ensure Equals(System.Object) return false when obj is a null reference.");
+
+ try
+ {
+ Version TestVersion2 = new Version("2.3.4.8");
+ if (TestVersion2.Equals(null))
+ {
+ TestLibrary.TestFramework.LogError("P04.1", "Equals(System.Object) failed when obj is a null reference!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P04.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/version/versionequals2.cs b/tests/src/CoreMangLib/cti/system/version/versionequals2.cs
new file mode 100644
index 0000000000..60dcbb3c8a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/version/versionequals2.cs
@@ -0,0 +1,93 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// Equals(System.Version)
+/// </summary>
+
+public class VersionEquals2
+{
+ public static int Main()
+ {
+ VersionEquals2 test = new VersionEquals2();
+
+ TestLibrary.TestFramework.BeginTestCase("VersionEquals2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Ensure Equals(System.Version) return true when every component of the current Version object matches the corresponding component of the obj parameter.");
+
+ try
+ {
+ Version TestVersion1 = new Version("2.3.4.5");
+ Version TestVersion2 = new Version("2.3.4.5");
+ if (!TestVersion2.Equals(TestVersion1))
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "Equals(System.Version) failed when every component of the current Version object matches the corresponding component of the obj parameter!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Ensure Equals(System.Version) return false when not every component of the current Version object matches the corresponding component of the obj parameter.");
+
+ try
+ {
+ Version TestVersion1 = new Version("2.3.4.5");
+ Version TestVersion2 = new Version("2.3.4.6");
+ if (TestVersion2.Equals(TestVersion1))
+ {
+ TestLibrary.TestFramework.LogError("P02.1", "Equals(System.Version) failed when not every component of the current Version object matches the corresponding component of the obj parameter!");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P02.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/version/versiongethashcode.cs b/tests/src/CoreMangLib/cti/system/version/versiongethashcode.cs
new file mode 100644
index 0000000000..3bbe390c4d
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/version/versiongethashcode.cs
@@ -0,0 +1,81 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// GetHashCode()
+/// </summary>
+
+public class VersionGetHashCode
+{
+ public static int Main()
+ {
+ VersionGetHashCode test = new VersionGetHashCode();
+
+ TestLibrary.TestFramework.BeginTestCase("VersionGetHashCode");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Ensure GetHashCode() successful.");
+ Version TestVersion = null;
+
+ try
+ {
+ for (int i = 0; i < 50; i++)
+ {
+ int intMajor = TestLibrary.Generator.GetInt32(-55);
+ int intMinor = TestLibrary.Generator.GetInt32(-55);
+ int intBuild = TestLibrary.Generator.GetInt32(-55);
+ int intRevision = TestLibrary.Generator.GetInt32(-55);
+ TestVersion = new Version(intMajor, intMinor, intBuild, intRevision);
+ int accumulator = 0;
+ accumulator |= (TestVersion.Major & 0x0000000F) << 28;
+ accumulator |= (TestVersion.Minor & 0x000000FF) << 20;
+ accumulator |= (TestVersion.Build & 0x000000FF) << 12;
+ accumulator |= (TestVersion.Revision & 0x00000FFF);
+
+ if (TestVersion.GetHashCode() != accumulator)
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "GetHashCode() failed!" + TestVersion.ToString());
+ retVal = false;
+ return retVal;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception: " + e + TestVersion.ToString());
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/version/versionmajor.cs b/tests/src/CoreMangLib/cti/system/version/versionmajor.cs
new file mode 100644
index 0000000000..9ab0ed921a
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/version/versionmajor.cs
@@ -0,0 +1,110 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Major
+/// </summary>
+
+public class VersionMajor
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property .");
+
+ try
+ {
+ int intMajor = TestLibrary.Generator.GetInt32(-55);
+ int intMinor = TestLibrary.Generator.GetInt32(-55);
+ int intBuild = TestLibrary.Generator.GetInt32(-55);
+ int intRevision = TestLibrary.Generator.GetInt32(-55);
+ Version version = new Version(intMajor, intMinor, intBuild, intRevision);
+
+ if (version.Major != intMajor)
+ {
+ Console.WriteLine("excepted value is :" + version.Major);
+ Console.WriteLine("actual value is :" + intMajor);
+
+ TestLibrary.TestFramework.LogError("001.1", "Property Major Err !");
+ retVal = false;
+ return retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ VersionMajor test = new VersionMajor();
+
+ TestLibrary.TestFramework.BeginTestCase("VersionMajor");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/version/versionrevision.cs b/tests/src/CoreMangLib/cti/system/version/versionrevision.cs
new file mode 100644
index 0000000000..ed022b82c5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/version/versionrevision.cs
@@ -0,0 +1,139 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// Revision
+/// </summary>
+
+public class VersionRevision
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ //
+ // TODO: Add your negative test cases here
+ //
+ // TestLibrary.TestFramework.LogInformation("[Negative]");
+ // retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify property Revision with default ctor. .");
+/*
+ try
+ {
+ Version version = new Version();
+
+ if (version.Revision!= -1)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Property Revision Err !");
+ retVal = false;
+ return retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+*/
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Verify property Build with args ctor.");
+
+ try
+ {
+ int intMajor = TestLibrary.Generator.GetInt32(-55);
+ int intMinor = TestLibrary.Generator.GetInt32(-55);
+ int intBuild = TestLibrary.Generator.GetInt32(-55);
+ int intRevision = TestLibrary.Generator.GetInt32(-55);
+ Version version = new Version(intMajor, intMinor, intBuild, intRevision);
+
+ if (version.Revision != intRevision)
+ {
+ Console.WriteLine("excepted value is :" + version.Revision);
+ Console.WriteLine("actual value is :" + intRevision);
+
+ TestLibrary.TestFramework.LogError("002.1", "Property Build Err !");
+ retVal = false;
+ return retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ //public bool NegTest1()
+ //{
+ // bool retVal = true;
+
+ // TestLibrary.TestFramework.BeginScenario("NegTest1: ");
+
+ // try
+ // {
+ // //
+ // // Add your test logic here
+ // //
+ // }
+ // catch (Exception e)
+ // {
+ // TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
+ // TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ // retVal = false;
+ // }
+
+ // return retVal;
+ //}
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ VersionRevision test = new VersionRevision();
+
+ TestLibrary.TestFramework.BeginTestCase("VersionRevision");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/version/versiontostring1.cs b/tests/src/CoreMangLib/cti/system/version/versiontostring1.cs
new file mode 100644
index 0000000000..20df5ede60
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/version/versiontostring1.cs
@@ -0,0 +1,84 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections;
+
+/// <summary>
+/// ToString()
+/// </summary>
+
+public class VersionToString1
+{
+ public static int Main()
+ {
+ VersionToString1 test = new VersionToString1();
+
+ TestLibrary.TestFramework.BeginTestCase("VersionToString1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Ensure ToString() successful.");
+ Version TestVersion = null;
+
+ try
+ {
+ for (int i = 0; i < 50; i++)
+ {
+ int intMajor = TestLibrary.Generator.GetInt32(-55);
+ int intMinor = TestLibrary.Generator.GetInt32(-55);
+ int intBuild = TestLibrary.Generator.GetInt32(-55);
+ int intRevision = TestLibrary.Generator.GetInt32(-55);
+ TestVersion = new Version(intMajor, intMinor, intBuild, intRevision);
+ String VersionString = null;
+ VersionString = String.Concat(VersionString, intMajor.ToString());
+ VersionString = String.Concat(VersionString, ".");
+ VersionString = String.Concat(VersionString, intMinor.ToString());
+ VersionString = String.Concat(VersionString, ".");
+ VersionString = String.Concat(VersionString, intBuild.ToString());
+ VersionString = String.Concat(VersionString, ".");
+ VersionString = String.Concat(VersionString, intRevision.ToString());
+
+ if (TestVersion.ToString() != VersionString)
+ {
+ TestLibrary.TestFramework.LogError("P01.1", "ToString() failed!" + TestVersion.ToString());
+ retVal = false;
+ return retVal;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("P01.2", "Unexpected exception: " + e + TestVersion.ToString());
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/version/versiontostring2.cs b/tests/src/CoreMangLib/cti/system/version/versiontostring2.cs
new file mode 100644
index 0000000000..14d334967b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/version/versiontostring2.cs
@@ -0,0 +1,147 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+/// <summary>
+/// ToString(System.Int32)
+/// </summary>
+
+public class VersionToString2
+{
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+
+ retVal = NegTest1() && retVal;
+ retVal = NegTest2() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ // Add your scenario description here
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Verify method ToString(int)");
+
+ try
+ {
+ int intMajor = TestLibrary.Generator.GetInt32(-55);
+ int intMinor = TestLibrary.Generator.GetInt32(-55);
+ int intBuild = TestLibrary.Generator.GetInt32(-55);
+ int intRevision = TestLibrary.Generator.GetInt32(-55);
+ Version version= new Version(intMajor, intMinor, intBuild, intRevision);
+
+ if ( version.ToString(0) != ""
+ || version.ToString(1) != intMajor.ToString()
+ || version.ToString(2) != intMajor.ToString() + "." + intMinor.ToString()
+ || version.ToString(3) != intMajor.ToString() + "." + intMinor.ToString() + "." + intBuild.ToString()
+ || version.ToString(4) != intMajor.ToString() + "." + intMinor.ToString() + "." + intBuild.ToString() + "." + intRevision.ToString())
+ {
+ Console.WriteLine("excepted value is :" + version.ToString(0) + " "
+ + version.ToString(1) + " "
+ + version.ToString(2) + " "
+ + version.ToString(3) + " "
+ + version.ToString(4));
+
+ Console.WriteLine("actual value is :" + intMajor + " " + intMinor + " "
+ + intBuild + " " + intRevision);
+
+ TestLibrary.TestFramework.LogError("001.1", "ToString() failed!");
+ retVal = false;
+ return retVal;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+
+ #region Nagetive Test Cases
+ public bool NegTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest1: ArgumentException is not thrown.");
+
+ try
+ {
+ Version version = new Version(1, 3, 5);
+ string str = version.ToString(4);
+
+ TestLibrary.TestFramework.LogError("101.1", " ArgumentException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("101.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool NegTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("NegTest2: ArgumentException is not thrown.");
+
+ try
+ {
+ Version version = new Version(1, 3, 5);
+ string str = version.ToString(-1);
+
+ TestLibrary.TestFramework.LogError("102.1", " ArgumentException is not thrown.");
+ retVal = false;
+ }
+ catch (ArgumentException)
+ { }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("102.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ VersionToString2 test = new VersionToString2();
+
+ TestLibrary.TestFramework.BeginTestCase("VersionToString2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceCtor1_PSC.csproj b/tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceCtor1_PSC.csproj
new file mode 100644
index 0000000000..a99692dc85
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceCtor1_PSC.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ <GCStressIncompatible>true</GCStressIncompatible>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="weakreferencector1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceCtor2_PSC.csproj b/tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceCtor2_PSC.csproj
new file mode 100644
index 0000000000..d59c45054b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceCtor2_PSC.csproj
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ <GCStressIncompatible>true</GCStressIncompatible>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="helper.cs" />
+ <Compile Include="weakreferencector2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceCtor2b_PSC.csproj b/tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceCtor2b_PSC.csproj
new file mode 100644
index 0000000000..306e7f63bc
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceCtor2b_PSC.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ <GCStressIncompatible>true</GCStressIncompatible>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="weakreferencector2b.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceIsAlive_PSC.csproj b/tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceIsAlive_PSC.csproj
new file mode 100644
index 0000000000..db5e08dfab
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceIsAlive_PSC.csproj
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ <GCStressIncompatible>true</GCStressIncompatible>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="helper.cs" />
+ <Compile Include="weakreferenceisalive.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceIsAliveb_PSC.csproj b/tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceIsAliveb_PSC.csproj
new file mode 100644
index 0000000000..565e47c039
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceIsAliveb_PSC.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ <GCStressIncompatible>true</GCStressIncompatible>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="weakreferenceisaliveb.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceTargetb_PSC.csproj b/tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceTargetb_PSC.csproj
new file mode 100644
index 0000000000..7d2b543d43
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceTargetb_PSC.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ <GCStressIncompatible>true</GCStressIncompatible>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="weakreferencetargetb.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceTrackResurrection_cti_PSC.csproj b/tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceTrackResurrection_cti_PSC.csproj
new file mode 100644
index 0000000000..1cbf48d51e
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/weakreference/WeakReferenceTrackResurrection_cti_PSC.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ <GCStressIncompatible>true</GCStressIncompatible>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="weakreferencetrackresurrection_cti.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/weakreference/helper.cs b/tests/src/CoreMangLib/cti/system/weakreference/helper.cs
new file mode 100644
index 0000000000..e78e14d73b
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/weakreference/helper.cs
@@ -0,0 +1,33 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class myClass
+{
+ public string myString;
+
+ // The C# compiler converts destructors to Finalize methods. Without a Finalize method,
+ // a long weak reference to an object of the type becomes a short weak reference.
+ ~myClass()
+ {
+ }
+}
+
+public class WRHelper
+{
+ public static myClass CreateAnObject(string s)
+ {
+ myClass _mc = new myClass();
+ _mc.myString = s;
+ return _mc;
+ }
+
+ public static bool VerifyObject(WeakReference wr, string s)
+ {
+ if (((myClass)wr.Target).myString != s)
+ return false;
+ else
+ return true;
+ }
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/weakreference/weakreferencector1.cs b/tests/src/CoreMangLib/cti/system/weakreference/weakreferencector1.cs
new file mode 100644
index 0000000000..7d78331d90
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/weakreference/weakreferencector1.cs
@@ -0,0 +1,380 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+
+public struct TestStruct
+{
+ public int IntValue;
+ public string StringValue;
+}
+
+public class DisposableClass : IDisposable
+{
+ public void Dispose()
+ {
+ }
+}
+
+/// <summary>
+/// ctor(System.Object, System.Boolean)
+/// </summary>
+
+[SecuritySafeCritical]
+public class WeakReferenceCtor1
+{
+ #region Private Fields
+ private const int c_MIN_STRING_LENGTH = 8;
+ private const int c_MAX_STRING_LENGTH = 1024;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+ retVal = PosTest8() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Ctor with valid target reference and set trackResurrection to false");
+
+ try
+ {
+ Object obj = new Object();
+ WeakReference reference = new WeakReference(obj, false);
+
+ if ((reference.TrackResurrection != false) || (!reference.Target.Equals(obj)) )
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling Ctor with valid target reference and set trackResurrection to false constructs wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] reference.TrackResurrection = " + reference.TrackResurrection.ToString() +
+ ", reference.Target = " + reference.Target.ToString() +
+ ", obj = " + obj.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Ctor with valid target reference and set trackResurrection to true");
+
+ try
+ {
+ Object obj = new Object();
+ WeakReference reference = new WeakReference(obj, true);
+
+ if ((reference.TrackResurrection != true) || (!reference.Target.Equals(obj)))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling Ctor with valid target reference and set trackResurrection to false constructs wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] reference.TrackResurrection = " + reference.TrackResurrection.ToString() +
+ ", reference.Target = " + reference.Target.ToString() +
+ ", obj = " + obj.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call Ctor with value type target reference");
+
+ try
+ {
+ int randValue = TestLibrary.Generator.GetInt32(-55);
+ WeakReference reference = new WeakReference(randValue, true);
+
+ if ((reference.TrackResurrection != true) || (!reference.Target.Equals(randValue)))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Calling Ctor with valid target reference and set trackResurrection to false constructs wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] reference.TrackResurrection = " + reference.TrackResurrection.ToString() +
+ ", reference.Target = " + reference.Target.ToString() +
+ ", randValue = " + randValue.ToString());
+ retVal = false;
+ }
+
+ reference = new WeakReference(randValue, false);
+
+ if ((reference.TrackResurrection != false) || (!reference.Target.Equals(randValue)))
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Calling Ctor with valid target reference and set trackResurrection to false constructs wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] reference.TrackResurrection = " + reference.TrackResurrection.ToString() +
+ ", reference.Target = " + reference.Target.ToString() +
+ ", randValue = " + randValue.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call Ctor with reference type target reference and set trackResurrection to true");
+
+ try
+ {
+ string randValue = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ WeakReference reference = new WeakReference(randValue, true);
+
+ if ((reference.TrackResurrection != true) || (!reference.Target.Equals(randValue)))
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Calling Ctor with valid target reference and set trackResurrection to false constructs wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] reference.TrackResurrection = " + reference.TrackResurrection.ToString() +
+ ", reference.Target = " + reference.Target.ToString() +
+ ", randValue = " + randValue.ToString());
+ retVal = false;
+ }
+
+ reference = new WeakReference(randValue, false);
+
+ if ((reference.TrackResurrection != false) || (!reference.Target.Equals(randValue)))
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Calling Ctor with valid target reference and set trackResurrection to false constructs wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] reference.TrackResurrection = " + reference.TrackResurrection.ToString() +
+ ", reference.Target = " + reference.Target.ToString() +
+ ", randValue = " + randValue.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Call Ctor with null reference and set trackResurrection to true");
+
+ try
+ {
+ WeakReference reference = new WeakReference(null, true);
+
+ if ((reference.TrackResurrection != true) || (reference.Target != null))
+ {
+ TestLibrary.TestFramework.LogError("005.1", "Calling Ctor with valid target reference and set trackResurrection to false constructs wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] reference.TrackResurrection = " + reference.TrackResurrection.ToString() +
+ ", reference.Target = " + reference.Target.ToString());
+ retVal = false;
+ }
+
+ reference = new WeakReference(null, false);
+
+ if ((reference.TrackResurrection != false) || (reference.Target != null))
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Calling Ctor with valid target reference and set trackResurrection to false constructs wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] reference.TrackResurrection = " + reference.TrackResurrection.ToString() +
+ ", reference.Target = " + reference.Target.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Call Ctor with IntPtr reference and set trackResurrection to true");
+
+ try
+ {
+ Object desiredValue = IntPtr.Zero;
+ WeakReference reference = new WeakReference(desiredValue, true);
+
+ if ((reference.TrackResurrection != true) || (!reference.Target.Equals(desiredValue)))
+ {
+ TestLibrary.TestFramework.LogError("006.1", "Calling Ctor with valid target reference and set trackResurrection to false constructs wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] reference.TrackResurrection = " + reference.TrackResurrection.ToString() +
+ ", reference.Target = " + reference.Target.ToString() +
+ ", desiredValue = " + desiredValue.ToString());
+ retVal = false;
+ }
+
+ desiredValue = new IntPtr(TestLibrary.Generator.GetInt32(-55));
+ reference = new WeakReference(desiredValue, false);
+
+ if ((reference.TrackResurrection != false) || (!reference.Target.Equals(desiredValue)))
+ {
+ TestLibrary.TestFramework.LogError("006.2", "Calling Ctor with valid target reference and set trackResurrection to false constructs wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] reference.TrackResurrection = " + reference.TrackResurrection.ToString() +
+ ", reference.Target = " + reference.Target.ToString() +
+ ", desiredValue = " + desiredValue.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Call Ctor with IntPtr reference and set trackResurrection to true");
+
+ try
+ {
+ TestStruct ts = new TestStruct();
+ ts.IntValue = TestLibrary.Generator.GetInt32(-55);
+ ts.StringValue = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ Object desiredValue = ts;
+ WeakReference reference = new WeakReference(desiredValue, true);
+
+ if ((reference.TrackResurrection != true) || (!reference.Target.Equals(desiredValue)))
+ {
+ TestLibrary.TestFramework.LogError("007.1", "Calling Ctor with valid target reference and set trackResurrection to false constructs wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] reference.TrackResurrection = " + reference.TrackResurrection.ToString() +
+ ", reference.Target = " + reference.Target.ToString() +
+ ", desiredValue = " + desiredValue.ToString());
+ retVal = false;
+ }
+
+ reference = new WeakReference(desiredValue, false);
+
+ if ((reference.TrackResurrection != false) || (!reference.Target.Equals(desiredValue)))
+ {
+ TestLibrary.TestFramework.LogError("007.2", "Calling Ctor with valid target reference and set trackResurrection to false constructs wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] reference.TrackResurrection = " + reference.TrackResurrection.ToString() +
+ ", reference.Target = " + reference.Target.ToString() +
+ ", desiredValue = " + desiredValue.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest8()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest8: Call Ctor with IntPtr reference and set trackResurrection to true");
+
+ try
+ {
+ DisposableClass dc = new DisposableClass();
+ Object desiredValue = dc;
+ WeakReference reference = new WeakReference(desiredValue, true);
+
+ if ((reference.TrackResurrection != true) || (!reference.Target.Equals(desiredValue)))
+ {
+ TestLibrary.TestFramework.LogError("008.1", "Calling Ctor with valid target reference and set trackResurrection to false constructs wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] reference.TrackResurrection = " + reference.TrackResurrection.ToString() +
+ ", reference.Target = " + reference.Target.ToString() +
+ ", desiredValue = " + desiredValue.ToString());
+ retVal = false;
+ }
+
+ reference = new WeakReference(desiredValue, false);
+
+ if ((reference.TrackResurrection != false) || (!reference.Target.Equals(desiredValue)))
+ {
+ TestLibrary.TestFramework.LogError("008.2", "Calling Ctor with valid target reference and set trackResurrection to false constructs wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] reference.TrackResurrection = " + reference.TrackResurrection.ToString() +
+ ", reference.Target = " + reference.Target.ToString() +
+ ", desiredValue = " + desiredValue.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("008.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ WeakReferenceCtor1 test = new WeakReferenceCtor1();
+
+ TestLibrary.TestFramework.BeginTestCase("WeakReferenceCtor1");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/weakreference/weakreferencector2.cs b/tests/src/CoreMangLib/cti/system/weakreference/weakreferencector2.cs
new file mode 100644
index 0000000000..02a4000de5
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/weakreference/weakreferencector2.cs
@@ -0,0 +1,137 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using TestLibrary;
+
+
+[SecuritySafeCritical]
+public class WeakReferenceCtor
+{
+ public static int Main(string[] args)
+ {
+ WeakReferenceCtor test = new WeakReferenceCtor();
+ TestFramework.BeginTestCase("Testing WeakReference.Ctor (2)");
+
+ if (test.RunTests())
+ {
+ TestFramework.EndTestCase();
+ TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestFramework.EndTestCase();
+ TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+ // ATTENTION!!! ATTENTION!!! ATTENTION!!!
+ //
+ // There is no guarantee that WeakReference objects will be collected after GC.Collect().
+ // The bottom line is, compiler generated temps for objects created locally (within the
+ // same function), castings, boxing/unboxing will get their lifetimes extended to the
+ // end of the function.
+ //
+ // All these are due to changes related to the MinOpts feature made during the
+ // Silverlight/Arrowhead timeframe. For more information, see DevDiv Bugs 170524.
+ //
+ // Many of these behaviors are not documented. If any of the underlying implementation is
+ // changed, the tests will need to be updated as well.
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestFramework.BeginScenario("Test short WeakReference ctor");
+
+ try
+ {
+ string testStr = "Test";
+ WeakReference extWR = new WeakReference(WRHelper.CreateAnObject(testStr), false);
+
+ if (!WRHelper.VerifyObject(extWR, testStr))
+ {
+ TestFramework.LogError("001", "WeakReference target not as expected. Expected : Test; Actual: " + extWR.Target.ToString());
+ retVal = false;
+ }
+
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+
+ //Dev10 Bug #413556: WeakReference object incorrectly kept alive. Enable after the test is fixed.
+ //
+ //if (extWR.Target != null)
+ //{
+ // TestFramework.LogError("002", "WeakReference target not as expected. Expected : null; Actual: " + extWR.Target.ToString());
+ // retVal = false;
+ //}
+
+ if (extWR.TrackResurrection != false)
+ {
+ TestFramework.LogError("003", "WeakReference track resurrection not as expected. Expected : false; Actual: " + extWR.TrackResurrection);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestFramework.LogError("004", "Unexpected exception occurred: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestFramework.BeginScenario("Test long WeakReference ctor");
+
+ try
+ {
+ string testStr = "Test";
+ WeakReference extWR = new WeakReference(WRHelper.CreateAnObject(testStr), true);
+
+ if (!WRHelper.VerifyObject(extWR, testStr))
+ {
+ TestFramework.LogError("005", "WeakReference target not as expected. Expected : Test; Actual: " + extWR.Target.ToString());
+ retVal = false;
+ }
+
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+
+ if (!WRHelper.VerifyObject(extWR, testStr))
+ {
+ TestFramework.LogError("006", "WeakReference target not as expected. Expected : null; Actual: " + extWR.Target.ToString());
+ retVal = false;
+ }
+
+ if (extWR.TrackResurrection != true)
+ {
+ TestFramework.LogError("007", "WeakReference track resurrection not as expected. Expected : true; Actual: " + extWR.TrackResurrection);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestFramework.LogError("008", "Unexpected exception occurred: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/cti/system/weakreference/weakreferencector2b.cs b/tests/src/CoreMangLib/cti/system/weakreference/weakreferencector2b.cs
new file mode 100644
index 0000000000..474c4b4518
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/weakreference/weakreferencector2b.cs
@@ -0,0 +1,296 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+
+
+public struct TestStruct
+{
+ public int IntValue;
+ public string StringValue;
+}
+
+public class DisposableClass : IDisposable
+{
+ public void Dispose()
+ {
+ }
+}
+
+/// <summary>
+/// ctor(System.Object)
+/// </summary>
+
+[SecuritySafeCritical]
+public class WeakReferenceCtor2
+{
+ #region Private Fields
+ private const int c_MIN_STRING_LENGTH = 8;
+ private const int c_MAX_STRING_LENGTH = 1024;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Ctor with valid target reference");
+
+ try
+ {
+ Object obj = new Object();
+ WeakReference reference = new WeakReference(obj);
+
+ if ((reference.TrackResurrection != false) || (!reference.Target.Equals(obj)))
+ {
+ TestLibrary.TestFramework.LogError("001.1", "Calling Ctor with valid target reference and set trackResurrection to false constructs wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] reference.TrackResurrection = " + reference.TrackResurrection.ToString() +
+ ", reference.Target = " + reference.Target.ToString() +
+ ", obj = " + obj.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Ctor with IntPtr.Zero reference");
+
+ try
+ {
+ Object desiredValue = IntPtr.Zero;
+ WeakReference reference = new WeakReference(desiredValue);
+
+ if ((reference.TrackResurrection != false) || (!reference.Target.Equals(desiredValue)))
+ {
+ TestLibrary.TestFramework.LogError("002.1", "Calling Ctor with valid target reference and set trackResurrection to false constructs wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] reference.TrackResurrection = " + reference.TrackResurrection.ToString() +
+ ", reference.Target = " + reference.Target.ToString() +
+ ", desiredValue = " + desiredValue.ToString());
+ retVal = false;
+ }
+
+ desiredValue = new IntPtr(TestLibrary.Generator.GetInt32(-55));
+ reference = new WeakReference(desiredValue);
+
+ if ((reference.TrackResurrection != false) || (!reference.Target.Equals(desiredValue)))
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Calling Ctor with valid target reference and set trackResurrection to false constructs wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] reference.TrackResurrection = " + reference.TrackResurrection.ToString() +
+ ", reference.Target = " + reference.Target.ToString() +
+ ", desiredValue = " + desiredValue.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call Ctor with value type target reference");
+
+ try
+ {
+ int randValue = TestLibrary.Generator.GetInt32(-55);
+ WeakReference reference = new WeakReference(randValue);
+
+ if ((reference.TrackResurrection != false) || (!reference.Target.Equals(randValue)))
+ {
+ TestLibrary.TestFramework.LogError("003.1", "Calling Ctor with valid target reference and set trackResurrection to false constructs wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] reference.TrackResurrection = " + reference.TrackResurrection.ToString() +
+ ", reference.Target = " + reference.Target.ToString() +
+ ", randValue = " + randValue.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call Ctor with reference type target reference");
+
+ try
+ {
+ string randValue = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ WeakReference reference = new WeakReference(randValue);
+
+ if ((reference.TrackResurrection != false) || (!reference.Target.Equals(randValue)))
+ {
+ TestLibrary.TestFramework.LogError("004.1", "Calling Ctor with valid target reference and set trackResurrection to false constructs wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] reference.TrackResurrection = " + reference.TrackResurrection.ToString() +
+ ", reference.Target = " + reference.Target.ToString() +
+ ", randValue = " + randValue.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: Call Ctor with null reference");
+
+ try
+ {
+ WeakReference reference = new WeakReference(null);
+
+ if ((reference.TrackResurrection != false) || (reference.Target != null))
+ {
+ TestLibrary.TestFramework.LogError("005.1", "Calling Ctor with valid target reference and set trackResurrection to false constructs wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] reference.TrackResurrection = " + reference.TrackResurrection.ToString() +
+ ", reference.Target = " + reference.Target.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: Call Ctor with IntPtr reference and set trackResurrection to true");
+
+ try
+ {
+ DisposableClass dc = new DisposableClass();
+ Object desiredValue = dc;
+ WeakReference reference = new WeakReference(desiredValue);
+
+ if ((reference.TrackResurrection != false) || (!reference.Target.Equals(desiredValue)))
+ {
+ TestLibrary.TestFramework.LogError("006.1", "Calling Ctor with valid target reference and set trackResurrection to false constructs wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] reference.TrackResurrection = " + reference.TrackResurrection.ToString() +
+ ", reference.Target = " + reference.Target.ToString() +
+ ", desiredValue = " + desiredValue.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006.7", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7: Call Ctor with IntPtr reference and set trackResurrection to true");
+
+ try
+ {
+ TestStruct ts = new TestStruct();
+ ts.IntValue = TestLibrary.Generator.GetInt32(-55);
+ ts.StringValue = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ Object desiredValue = ts;
+ WeakReference reference = new WeakReference(desiredValue);
+
+ if ((reference.TrackResurrection != false) || (!reference.Target.Equals(desiredValue)))
+ {
+ TestLibrary.TestFramework.LogError("007.1", "Calling Ctor with valid target reference and set trackResurrection to false constructs wrong instance");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] reference.TrackResurrection = " + reference.TrackResurrection.ToString() +
+ ", reference.Target = " + reference.Target.ToString() +
+ ", desiredValue = " + desiredValue.ToString());
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ WeakReferenceCtor2 test = new WeakReferenceCtor2();
+
+ TestLibrary.TestFramework.BeginTestCase("WeakReferenceCtor2");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/weakreference/weakreferenceisalive.cs b/tests/src/CoreMangLib/cti/system/weakreference/weakreferenceisalive.cs
new file mode 100644
index 0000000000..b9a55d64f4
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/weakreference/weakreferenceisalive.cs
@@ -0,0 +1,119 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+using TestLibrary;
+
+public class WeakReferenceIsAlive
+{
+ [SecuritySafeCritical]
+ public static int Main(string[] args)
+ {
+ WeakReferenceIsAlive test = new WeakReferenceIsAlive();
+ TestFramework.BeginTestCase("Testing WeakReference.IsAlive");
+
+ if (test.RunTests())
+ {
+ TestFramework.EndTestCase();
+ TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestFramework.EndTestCase();
+ TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+
+ [SecuritySafeCritical]
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+
+ return retVal;
+ }
+
+
+ [SecuritySafeCritical]
+
+ // ATTENTION!!! ATTENTION!!! ATTENTION!!!
+ //
+ // If you encounter issues with object lifetime, please see more comments in WeakReferenceCtor2.cs
+
+ public bool PosTest1()
+ {
+ bool retVal = true;
+ TestFramework.BeginScenario("Test IsAlive with short WeakReference");
+
+ try
+ {
+ WeakReference extWR = new WeakReference(WRHelper.CreateAnObject("Test"), false);
+
+ if (!extWR.IsAlive)
+ {
+ TestFramework.LogError("001", "WeakReference IsAlive not as expected. Expected : True; Actual: " + extWR.IsAlive);
+ retVal = false;
+ }
+
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+
+ //Dev10 Bug #413556: WeakReference object incorrectly kept alive. Enable after the test is fixed.
+ //
+ //if (extWR.IsAlive)
+ //{
+ // TestFramework.LogError("002", "WeakReference IsAlive not as expected. Expected : False; Actual: " + extWR.IsAlive);
+ // retVal = false;
+ //}
+ }
+ catch (Exception e)
+ {
+ TestFramework.LogError("003", "Unexpected exception occured: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+
+ [SecuritySafeCritical]
+ public bool PosTest2()
+ {
+ bool retVal = true;
+ TestFramework.BeginScenario("Test IsAlive with long WeakReference");
+
+ try
+ {
+ WeakReference extWR = new WeakReference(WRHelper.CreateAnObject("Test"), true);
+
+ if (!extWR.IsAlive)
+ {
+ TestFramework.LogError("004", "WeakReference IsAlive not as expected. Expected : True; Actual: " + extWR.IsAlive);
+ retVal = false;
+ }
+
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+
+ if (!extWR.IsAlive)
+ {
+ TestFramework.LogError("005", "WeakReference IsAlive not as expected. Expected : True; Actual: " + extWR.IsAlive);
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestFramework.LogError("006", "Unexpected exception occured: " + e);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/cti/system/weakreference/weakreferenceisaliveb.cs b/tests/src/CoreMangLib/cti/system/weakreference/weakreferenceisaliveb.cs
new file mode 100644
index 0000000000..b6b6f35290
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/weakreference/weakreferenceisaliveb.cs
@@ -0,0 +1,334 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+
+public class DisposableClass : IDisposable
+{
+ public void Dispose()
+ {
+ }
+}
+
+/// <summary>
+/// IsAlive
+/// </summary>
+
+[SecuritySafeCritical]
+public class WeakReferenceIsAlive
+{
+ #region Private Fields
+ private const int c_MIN_STRING_LENGTH = 8;
+ private const int c_MAX_STRING_LENGTH = 1024;
+
+ private WeakReference[] m_References;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: IsAlive should return true before GC collecting memory for short weak references");
+
+ try
+ {
+ // Reclaim memories
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+
+ GenerateUnusedData1();
+
+ for (int i = 0; i < m_References.Length; ++i)
+ {
+ if (!m_References[i].IsAlive)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "IsAlive return false before GC collecting memory");
+ if (m_References[i].Target != null)
+ {
+ TestLibrary.TestFramework.LogInformation("WARNING: m_References[i] = " + m_References[i].Target.ToString());
+ }
+ else
+ {
+ TestLibrary.TestFramework.LogInformation("WARNING: m_References[i] = null");
+ }
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ finally
+ {
+ m_References = null;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: IsAlive should return false before GC collecting memory for weak references reference null");
+
+ try
+ {
+ WeakReference reference = new WeakReference(null, false);
+ if (reference.IsAlive)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "IsAlive returns true before GC collecting memory");
+ retVal = false;
+ }
+
+ reference = new WeakReference(null, true);
+ if (reference.IsAlive)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "IsAlive returns true before GC collecting memory");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: IsAlive should return false after GC collecting memory for short weak references");
+
+ try
+ {
+ // Reclaim memories
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+
+ GenerateUnusedData1();
+
+ // Reclaim memories
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+
+ for (int i = 0; i < m_References.Length; ++i)
+ {
+ if (m_References[i].IsAlive)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "IsAlive returns true after GC collecting memory");
+ if (m_References[i].Target != null)
+ {
+ TestLibrary.TestFramework.LogInformation("WARNING: m_References[i] = " + m_References[i].Target.ToString());
+ }
+ else
+ {
+ TestLibrary.TestFramework.LogInformation("WARNING: m_References[i] = null");
+ }
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ finally
+ {
+ m_References = null;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: IsAlive should return true before GC collecting memory for long weak references");
+
+ try
+ {
+ // Reclaim memories
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+
+ GenerateUnusedData2();
+
+ for (int i = 0; i < m_References.Length; ++i)
+ {
+ if (!m_References[i].IsAlive)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "IsAlive return false before GC collecting memory");
+ if (m_References[i].Target != null)
+ {
+ TestLibrary.TestFramework.LogInformation("WARNING: m_References[" + i.ToString() + "] = " + m_References[i].Target.ToString());
+ }
+ else
+ {
+ TestLibrary.TestFramework.LogInformation("WARNING: m_References[" + i.ToString() + "] = null");
+ }
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ finally
+ {
+ m_References = null;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: IsAlive should return true after GC collecting memory for long weak references");
+
+ try
+ {
+ // Reclaim memories
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+
+ GenerateUnusedData2();
+
+ // Reclaim memories
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+
+ for (int i = 0; i < m_References.Length; ++i)
+ {
+ if (m_References[i].IsAlive)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "IsAlive returns true before GC collecting memory");
+ if (m_References[i].Target != null)
+ {
+ TestLibrary.TestFramework.LogInformation("WARNING: m_References[i] = " + m_References[i].Target.ToString());
+ }
+ else
+ {
+ TestLibrary.TestFramework.LogInformation("WARNING: m_References[i] = null");
+ }
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.2", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ finally
+ {
+ m_References = null;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ WeakReferenceIsAlive test = new WeakReferenceIsAlive();
+
+ TestLibrary.TestFramework.BeginTestCase("WeakReferenceIsAlive");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private void GenerateUnusedData1()
+ {
+ int intRandValue = TestLibrary.Generator.GetInt32(-55);
+ long longRandValue = TestLibrary.Generator.GetInt64(-55);
+ double doubleRandValue = TestLibrary.Generator.GetDouble(-55);
+
+ object obj = new object();
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ Byte[] randBytes = new Byte[c_MAX_STRING_LENGTH];
+ TestLibrary.Generator.GetBytes(-55, randBytes);
+
+ WeakReferenceIsAlive thisClass = new WeakReferenceIsAlive();
+ DisposableClass dc = new DisposableClass();
+ IntPtr ptr = new IntPtr(TestLibrary.Generator.GetInt32(-55));
+
+ m_References = new WeakReference[] {
+ new WeakReference(obj, false),
+ new WeakReference(str, false),
+ new WeakReference(randBytes, false),
+ new WeakReference(thisClass, false),
+ new WeakReference(ptr, false),
+ new WeakReference(IntPtr.Zero, false),
+ new WeakReference(dc, false)
+ };
+ }
+
+ private void GenerateUnusedData2()
+ {
+ object obj = new object();
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ Byte[] randBytes = new Byte[c_MAX_STRING_LENGTH];
+ TestLibrary.Generator.GetBytes(-55, randBytes);
+
+ WeakReferenceIsAlive thisClass = new WeakReferenceIsAlive();
+ DisposableClass dc = new DisposableClass();
+ IntPtr ptr = new IntPtr(TestLibrary.Generator.GetInt32(-55));
+ m_References = new WeakReference[] {
+ new WeakReference(obj, true),
+ new WeakReference(str, true),
+ new WeakReference(randBytes, true),
+ new WeakReference(thisClass, true),
+ new WeakReference(ptr, true),
+ new WeakReference(IntPtr.Zero, true),
+ new WeakReference(dc, true)
+ };
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/weakreference/weakreferencetargetb.cs b/tests/src/CoreMangLib/cti/system/weakreference/weakreferencetargetb.cs
new file mode 100644
index 0000000000..b717ccc7f8
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/weakreference/weakreferencetargetb.cs
@@ -0,0 +1,392 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+
+public struct TestStruct
+{
+ public int IntValue;
+ public string StringValue;
+}
+
+public class DisposableClass : IDisposable
+{
+ public void Dispose()
+ {
+ }
+}
+
+/// <summary>
+/// Target
+/// </summary>
+
+
+[SecuritySafeCritical]
+public class WeakReferenceTarget
+{
+ #region Private Fields
+ private const int c_MIN_STRING_LENGTH = 8;
+ private const int c_MAX_STRING_LENGTH = 1024;
+
+ private WeakReference[] m_References;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: Call Target on short weak reference to instance of an object");
+
+ try
+ {
+ // Reclaim memories
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+
+ retVal = GenerateUnusedData1("001.1") && retVal;
+
+ // Reclaim memories
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+
+ for (int i = 0; i < m_References.Length; ++i)
+ {
+ if (m_References[i].Target != null)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "Target is not null after GC collecting memory");
+ TestLibrary.TestFramework.LogInformation("WARNING: m_References[i] = " + m_References[i].Target.ToString());
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ finally
+ {
+ m_References = null;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: Call Target on long weak reference to instance of an object");
+
+ try
+ {
+ // Reclaim memories
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+
+ retVal = GenerateUnusedData2("002.1") && retVal;
+
+ // Reclaim memories
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+
+ for (int i = 0; i < m_References.Length; ++i)
+ {
+ if (m_References[i].Target != null)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "Target is not null after GC collecting memory");
+ TestLibrary.TestFramework.LogInformation("WARNING: m_References[i] = " + m_References[i].Target.ToString());
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ finally
+ {
+ m_References = null;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: Call set_Target on short weak reference to instance of an object before GC");
+
+ try
+ {
+ // Reclaim memories
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+
+ retVal = GenerateUnusedData1("003.1") && retVal;
+
+ object obj = new object();
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ Byte[] randBytes = new Byte[c_MAX_STRING_LENGTH];
+ TestLibrary.Generator.GetBytes(-55, randBytes);
+;
+
+ WeakReferenceTarget thisClass = new WeakReferenceTarget();
+ DisposableClass dc = new DisposableClass();
+ IntPtr ptr = new IntPtr(TestLibrary.Generator.GetInt32(-55));
+
+ Object[] objs = new object[] {
+ obj,
+ str,
+ randBytes,
+ thisClass,
+ dc,
+ ptr,
+ IntPtr.Zero
+ };
+
+ for (int i = 0; i < m_References.Length; ++i)
+ {
+ m_References[i].Target = objs[i];
+
+ if (!m_References[i].Target.Equals(objs[i]))
+ {
+ TestLibrary.TestFramework.LogError("003.2", "Target is not set correctly");
+ TestLibrary.TestFramework.LogInformation("WARNING: m_References[i].Target = " + m_References[i].Target.ToString() +
+ ", objs = " + objs[i].ToString() +
+ ", i = " + i.ToString());
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ finally
+ {
+ m_References = null;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: Call set_Target on long weak reference to instance of an object before GC");
+
+ try
+ {
+ // Reclaim memories
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+
+ retVal = GenerateUnusedData2("004.1") && retVal;
+
+ object obj = new object();
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ Byte[] randBytes = new Byte[c_MAX_STRING_LENGTH];
+ TestLibrary.Generator.GetBytes(-55, randBytes);
+
+ WeakReferenceTarget thisClass = new WeakReferenceTarget();
+ DisposableClass dc = new DisposableClass();
+ IntPtr ptr = new IntPtr(TestLibrary.Generator.GetInt32(-55));
+
+ Object[] objs = new object[] {
+ obj,
+ str,
+ randBytes,
+ thisClass,
+ dc,
+ ptr,
+ IntPtr.Zero
+ };
+
+ for (int i = 0; i < m_References.Length; ++i)
+ {
+ m_References[i].Target = objs[i];
+
+ if (!m_References[i].Target.Equals(objs[i]))
+ {
+ TestLibrary.TestFramework.LogError("004.2", "Target is not set correctly");
+ TestLibrary.TestFramework.LogInformation("WARNING: m_References[i].Target = " + m_References[i].Target.ToString() +
+ ", objs = " + objs[i].ToString() +
+ ", i = " + i.ToString());
+ retVal = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+ finally
+ {
+ m_References = null;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ WeakReferenceTarget test = new WeakReferenceTarget();
+
+ TestLibrary.TestFramework.BeginTestCase("WeakReferenceTarget");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+
+ #region Private Methods
+ private bool GenerateUnusedData1(string errorNo)
+ {
+ bool retVal = true;
+
+ object obj = new object();
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ Byte[] randBytes = new Byte[c_MAX_STRING_LENGTH];
+ TestLibrary.Generator.GetBytes(-55, randBytes);
+
+ WeakReferenceTarget thisClass = new WeakReferenceTarget();
+ DisposableClass dc = new DisposableClass();
+ IntPtr ptr = new IntPtr(TestLibrary.Generator.GetInt32(-55));
+
+ Object[] objs = new object[] {
+ obj,
+ str,
+ randBytes,
+ thisClass,
+ dc,
+ ptr,
+ IntPtr.Zero
+ };
+
+ m_References = new WeakReference[objs.Length];
+ for (int i = 0; i < objs.Length; ++i)
+ {
+ m_References[i] = new WeakReference(objs[i], false);
+ }
+
+ for (int i = 0; i < m_References.Length; ++i)
+ {
+ if (!m_References[i].Target.Equals(objs[i]))
+ {
+ TestLibrary.TestFramework.LogError(errorNo, "Target returns wrong value for weak references");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] i = " + i.ToString() +
+ ", m_References[i].Target = " + m_References[i].Target.ToString() +
+ ", objs[i] = " + objs[i].ToString());
+ retVal = false;
+ }
+ }
+
+ return retVal;
+ }
+
+ private bool GenerateUnusedData2(string errorNo)
+ {
+ bool retVal = true;
+
+ object obj = new object();
+ string str = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ Byte[] randBytes = new Byte[c_MAX_STRING_LENGTH];
+ TestLibrary.Generator.GetBytes(-55, randBytes);
+
+ TestStruct ts = new TestStruct();
+ ts.IntValue = TestLibrary.Generator.GetInt32(-55);
+
+ WeakReferenceTarget thisClass = new WeakReferenceTarget();
+ DisposableClass dc = new DisposableClass();
+ IntPtr ptr = new IntPtr(TestLibrary.Generator.GetInt32(-55));
+
+ Object[] objs = new object[] {
+ obj,
+ str,
+ randBytes,
+ thisClass,
+ dc,
+ ptr,
+ IntPtr.Zero
+ };
+
+ m_References = new WeakReference[objs.Length];
+ for (int i = 0; i < objs.Length; ++i)
+ {
+ m_References[i] = new WeakReference(objs[i], true);
+ }
+
+ for (int i = 0; i < m_References.Length; ++i)
+ {
+ if (!m_References[i].Target.Equals(objs[i]))
+ {
+ TestLibrary.TestFramework.LogError(errorNo, "Target returns wrong value for weak references");
+ TestLibrary.TestFramework.LogInformation("WARNING [LOCAL VARIABLES] i = " + i.ToString() +
+ ", m_References[i].Target = " + m_References[i].Target.ToString() +
+ ", objs[i] = " + objs[i].ToString());
+ retVal = false;
+ }
+ }
+
+ return retVal;
+ }
+
+ private void GenerateUnusedDisposableData()
+ {
+ DisposableClass dc = null;
+ m_References = new WeakReference[1];
+
+ try
+ {
+ dc = new DisposableClass();
+ m_References[0] = new WeakReference(dc);
+ }
+ finally
+ {
+ if (null != dc)
+ {
+ dc.Dispose();
+ }
+ }
+
+ GC.Collect();
+ }
+ #endregion
+}
diff --git a/tests/src/CoreMangLib/cti/system/weakreference/weakreferencetrackresurrection_cti.cs b/tests/src/CoreMangLib/cti/system/weakreference/weakreferencetrackresurrection_cti.cs
new file mode 100644
index 0000000000..31c3438451
--- /dev/null
+++ b/tests/src/CoreMangLib/cti/system/weakreference/weakreferencetrackresurrection_cti.cs
@@ -0,0 +1,320 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System.Security;
+using System;
+
+public struct TestStruct
+{
+ public int IntValue;
+ public string StringValue;
+}
+
+public class DisposableClass : IDisposable
+{
+ public void Dispose()
+ {
+ }
+}
+
+/// <summary>
+/// TrackResurrection
+/// </summary>
+
+[SecuritySafeCritical]
+public class WeakReferenceTrackResurrection
+{
+ #region Private Fields
+ private const int c_MIN_STRING_LENGTH = 8;
+ private const int c_MAX_STRING_LENGTH = 1024;
+ #endregion
+
+ #region Public Methods
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.LogInformation("[Positive]");
+ retVal = PosTest1() && retVal;
+ retVal = PosTest2() && retVal;
+ retVal = PosTest3() && retVal;
+ retVal = PosTest4() && retVal;
+ retVal = PosTest5() && retVal;
+ retVal = PosTest6() && retVal;
+ retVal = PosTest7() && retVal;
+
+ return retVal;
+ }
+
+ #region Positive Test Cases
+ public bool PosTest1()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest1: TrackResurrection will return correct value when construct the WeakReference for an object instance");
+
+ try
+ {
+ Object obj = new Object();
+ WeakReference reference = new WeakReference(obj, true);
+
+ if (!reference.TrackResurrection)
+ {
+ TestLibrary.TestFramework.LogError("001.1", "TrackResurrection returns false when construct the WeakReference for an object instance");
+ retVal = false;
+ }
+
+ reference = new WeakReference(obj, false);
+
+ if (reference.TrackResurrection)
+ {
+ TestLibrary.TestFramework.LogError("001.2", "TrackResurrection returns true when construct the WeakReference for an object instance");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("001.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest2()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest2: TrackResurrection will return correct value when construct the WeakReference for an value type instance");
+
+ try
+ {
+ int randValue = TestLibrary.Generator.GetInt32(-55);
+ WeakReference reference = new WeakReference(randValue, true);
+
+ if (!reference.TrackResurrection)
+ {
+ TestLibrary.TestFramework.LogError("002.1", "TrackResurrection returns false when construct the WeakReference for an value type instance");
+ retVal = false;
+ }
+
+ reference = new WeakReference(randValue, false);
+
+ if (reference.TrackResurrection)
+ {
+ TestLibrary.TestFramework.LogError("002.2", "TrackResurrection returns true when construct the WeakReference for an value type instance");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("002.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest3()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest3: TrackResurrection will return correct value when construct the WeakReference for an reference type instance");
+
+ try
+ {
+ string randValue = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ WeakReference reference = new WeakReference(randValue, true);
+
+ if (!reference.TrackResurrection)
+ {
+ TestLibrary.TestFramework.LogError("003.1", "TrackResurrection returns false when construct the WeakReference for an reference type instance");
+ retVal = false;
+ }
+
+ reference = new WeakReference(randValue, false);
+
+ if (reference.TrackResurrection)
+ {
+ TestLibrary.TestFramework.LogError("003.2", "TrackResurrection returns true when construct the WeakReference for an reference type instance");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("003.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest4()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest4: TrackResurrection will return correct value when construct the WeakReference for null reference");
+
+ try
+ {
+ WeakReference reference = new WeakReference(null, true);
+
+ if (!reference.TrackResurrection)
+ {
+ TestLibrary.TestFramework.LogError("004.1", "TrackResurrection returns false when construct the WeakReference for null reference");
+ retVal = false;
+ }
+
+ reference = new WeakReference(null, false);
+
+ if (reference.TrackResurrection)
+ {
+ TestLibrary.TestFramework.LogError("004.2", "TrackResurrection returns true when construct the WeakReference for null reference");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("004.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest5()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest5: TrackResurrection will return correct value when construct the WeakReference for a disposable instance");
+
+ try
+ {
+ DisposableClass dc = new DisposableClass();
+ Object desiredValue = dc;
+ WeakReference reference = new WeakReference(desiredValue, true);
+
+ if (!reference.TrackResurrection)
+ {
+ TestLibrary.TestFramework.LogError("005.1", "TrackResurrection returns false when construct the WeakReference for a disposable instance");
+ retVal = false;
+ }
+
+ reference = new WeakReference(desiredValue, false);
+
+ if (reference.TrackResurrection)
+ {
+ TestLibrary.TestFramework.LogError("005.2", "TrackResurrection returns true when construct the WeakReference for a disposable instance");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("005.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest6()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest6: TrackResurrection will return correct value when construct the WeakReference for a IntPtr instance");
+
+ try
+ {
+ Object desiredValue = IntPtr.Zero;
+ WeakReference reference = new WeakReference(desiredValue, true);
+
+ if (!reference.TrackResurrection)
+ {
+ TestLibrary.TestFramework.LogError("006.1", "TrackResurrection returns false when construct the WeakReference for a IntPtr instance");
+ retVal = false;
+ }
+
+ desiredValue = new IntPtr(TestLibrary.Generator.GetInt32(-55));
+ reference = new WeakReference(desiredValue, false);
+
+ if (reference.TrackResurrection)
+ {
+ TestLibrary.TestFramework.LogError("006.2", "TrackResurrection returns true when construct the WeakReference for a IntPtr instance");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("006.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+
+ public bool PosTest7()
+ {
+ bool retVal = true;
+
+ TestLibrary.TestFramework.BeginScenario("PosTest7: TrackResurrection will return correct value when construct the WeakReference for a struct instance");
+
+ try
+ {
+ TestStruct ts = new TestStruct();
+ ts.IntValue = TestLibrary.Generator.GetInt32(-55);
+ ts.StringValue = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LENGTH, c_MAX_STRING_LENGTH);
+ Object desiredValue = ts;
+ WeakReference reference = new WeakReference(desiredValue, true);
+
+ if (!reference.TrackResurrection)
+ {
+ TestLibrary.TestFramework.LogError("007.1", "TrackResurrection returns false when construct the WeakReference for a struct instance");
+ retVal = false;
+ }
+
+ reference = new WeakReference(desiredValue, false);
+
+ if (reference.TrackResurrection)
+ {
+ TestLibrary.TestFramework.LogError("007.2", "TrackResurrection returns true when construct the WeakReference for a struct instance");
+ retVal = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.TestFramework.LogError("007.3", "Unexpected exception: " + e);
+ TestLibrary.TestFramework.LogInformation(e.StackTrace);
+ retVal = false;
+ }
+
+ return retVal;
+ }
+ #endregion
+ #endregion
+
+ public static int Main()
+ {
+ WeakReferenceTrackResurrection test = new WeakReferenceTrackResurrection();
+
+ TestLibrary.TestFramework.BeginTestCase("WeakReferenceTrackResurrection");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.TestFramework.LogInformation("FAIL");
+ return 0;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/reflection/assembly/TestAssemblyAppBase.csproj b/tests/src/CoreMangLib/reflection/assembly/TestAssemblyAppBase.csproj
new file mode 100644
index 0000000000..a8a3c35da8
--- /dev/null
+++ b/tests/src/CoreMangLib/reflection/assembly/TestAssemblyAppBase.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="testassembly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/reflection/assembly/TestAssemblyNotAppBase.csproj b/tests/src/CoreMangLib/reflection/assembly/TestAssemblyNotAppBase.csproj
new file mode 100644
index 0000000000..a8a3c35da8
--- /dev/null
+++ b/tests/src/CoreMangLib/reflection/assembly/TestAssemblyNotAppBase.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="testassembly.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/reflection/assembly/testassembly.cs b/tests/src/CoreMangLib/reflection/assembly/testassembly.cs
new file mode 100644
index 0000000000..8e5145f892
--- /dev/null
+++ b/tests/src/CoreMangLib/reflection/assembly/testassembly.cs
@@ -0,0 +1,18 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class TestClass1
+{
+ public TestClass1() { Member = 0; }
+ public TestClass1(int i) { Member = i; }
+ int Member;
+}
+
+class TestClass2
+{
+ TestClass2() { Member = 0; }
+ TestClass2(int i) { Member = i; }
+ int Member;
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/buffer/ASURT_99893.csproj b/tests/src/CoreMangLib/system/buffer/ASURT_99893.csproj
new file mode 100644
index 0000000000..ca33dcd5ec
--- /dev/null
+++ b/tests/src/CoreMangLib/system/buffer/ASURT_99893.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="asurt_99893.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/buffer/asurt_99893.cs b/tests/src/CoreMangLib/system/buffer/asurt_99893.cs
new file mode 100644
index 0000000000..2a4b92caf9
--- /dev/null
+++ b/tests/src/CoreMangLib/system/buffer/asurt_99893.cs
@@ -0,0 +1,106 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+// ASURT 99893 - These Buffer members were correctly checking that the array was a
+// primitive type, but the check for primitive type did not include the assembly,
+// and thus one could define a new System.Int32 (as below) and use that instead.
+
+using System;
+
+namespace System
+{
+ class ASURT_99893
+ {
+ static int Main()
+ {
+ Boolean pass=true;
+#pragma warning disable 0436
+ Int32 a = new Int32();
+ a.Init("asdas");
+ TestLibrary.Logging.WriteLine(a);
+ Int32[] foo = new Int32 [] {a};
+#pragma warning restore 0436
+ byte b = 0;
+
+ // GetByte
+ try
+ {
+ b = Buffer.GetByte(foo, 0);
+ pass=false;
+ TestLibrary.Logging.WriteLine ("GetByte: No exception thrown! Got 0x{0:x}", b);
+ }
+ catch (ArgumentException ex)
+ {
+ TestLibrary.Logging.WriteLine("GetByte: Got expected exception: {0}: {1}", ex.GetType(), ex.Message);
+ }
+ catch (Exception ex)
+ {
+ pass=false;
+ TestLibrary.Logging.WriteLine("GetByte: Unexpected exception thrown: " + ex);
+ }
+
+ // SetByte
+ try
+ {
+ Buffer.SetByte(foo, 0, (Byte)2);
+ pass=false;
+ TestLibrary.Logging.WriteLine ("SetByte: No exception thrown! Got 0x{0:x}", b);
+ }
+ catch (ArgumentException ex)
+ {
+ TestLibrary.Logging.WriteLine("SetByte: Got expected exception: {0}: {1}", ex.GetType(), ex.Message);
+ }
+ catch (Exception ex)
+ {
+ pass=false;
+ TestLibrary.Logging.WriteLine("SetByte: Unexpected exception thrown: " + ex);
+ }
+
+ // BlockCopy
+ try
+ {
+ Object[] arrObjects = new Object[3];
+ Buffer.BlockCopy(foo, 0, arrObjects, 0, 4);
+ pass=false;
+ TestLibrary.Logging.WriteLine ("BlockCopy: No exception thrown! Got 0x{0:x}", b);
+ }
+ catch (ArgumentException ex)
+ {
+ TestLibrary.Logging.WriteLine("BlockCopy: Got expected exception: {0}: {1}", ex.GetType(), ex.Message);
+ }
+ catch (Exception ex)
+ {
+ pass=false;
+ TestLibrary.Logging.WriteLine("BlockCopy: Unexpected exception thrown: " + ex);
+ }
+
+ if (pass)
+ {
+ TestLibrary.Logging.WriteLine("Test passed.");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.Logging.WriteLine("Test failed.");
+ return 1;
+ }
+ }
+ }
+
+ public struct Int32
+ {
+ object value;
+ public void Init (object o)
+ {
+ value = o;
+ }
+
+ override public string ToString ()
+ {
+ string s = "MyInt32";
+ if (value == null) s += "<null>";
+ else s += value.ToString();
+ return s;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/system/collections/generic/hashset/Regression_Dev10_609271.csproj b/tests/src/CoreMangLib/system/collections/generic/hashset/Regression_Dev10_609271.csproj
new file mode 100644
index 0000000000..cc2941e55a
--- /dev/null
+++ b/tests/src/CoreMangLib/system/collections/generic/hashset/Regression_Dev10_609271.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="regression_dev10_609271.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/collections/generic/hashset/Regression_Dev10_624201.csproj b/tests/src/CoreMangLib/system/collections/generic/hashset/Regression_Dev10_624201.csproj
new file mode 100644
index 0000000000..4e883b9338
--- /dev/null
+++ b/tests/src/CoreMangLib/system/collections/generic/hashset/Regression_Dev10_624201.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="regression_dev10_624201.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/collections/generic/hashset/regression_dev10_609271.cs b/tests/src/CoreMangLib/system/collections/generic/hashset/regression_dev10_609271.cs
new file mode 100644
index 0000000000..d5f5360931
--- /dev/null
+++ b/tests/src/CoreMangLib/system/collections/generic/hashset/regression_dev10_609271.cs
@@ -0,0 +1,28 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Collections.Generic;
+
+namespace Sample
+{
+ class Program
+ {
+ static int Main(string[] args)
+ {
+ int ret = 100;
+ HashSet<object> hashset = new HashSet<object>();
+
+ ISet<object> iset = (hashset as ISet<object>);
+
+ if (iset == null) ret = 0;
+
+ return ret;
+ }
+ }
+}
+
+
+
+
+
diff --git a/tests/src/CoreMangLib/system/collections/generic/hashset/regression_dev10_624201.cs b/tests/src/CoreMangLib/system/collections/generic/hashset/regression_dev10_624201.cs
new file mode 100644
index 0000000000..da1e07035e
--- /dev/null
+++ b/tests/src/CoreMangLib/system/collections/generic/hashset/regression_dev10_624201.cs
@@ -0,0 +1,43 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Sample
+{
+ class Program
+ {
+ private static bool MyPredicate(Object o)
+ {
+ return false;
+ }
+
+ static int Main(string[] args)
+ {
+ object obj = new object();
+ HashSet<object> hashset;
+ Object[] oa = new Object[2];
+
+ hashset = new HashSet<object>();
+ hashset.Add(obj);
+ hashset.Remove(obj);
+
+ //Regression test: make sure these don't throw.
+ foreach (object o in hashset)
+ {
+ }
+ hashset.CopyTo(oa, 0, 2);
+ hashset.RemoveWhere(MyPredicate);
+
+ return 100;
+ }
+ }
+}
+
+
+
+
+
diff --git a/tests/src/CoreMangLib/system/datetime/Co7510ParseExact_formatarray.csproj b/tests/src/CoreMangLib/system/datetime/Co7510ParseExact_formatarray.csproj
new file mode 100644
index 0000000000..6475443219
--- /dev/null
+++ b/tests/src/CoreMangLib/system/datetime/Co7510ParseExact_formatarray.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="co7510parseexact_formatarray.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/datetime/co7510parseexact_formatarray.cs b/tests/src/CoreMangLib/system/datetime/co7510parseexact_formatarray.cs
new file mode 100644
index 0000000000..8d31690027
--- /dev/null
+++ b/tests/src/CoreMangLib/system/datetime/co7510parseexact_formatarray.cs
@@ -0,0 +1,69 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+//Introduced as a BuildBVT as a regression test for NDPWhidbey bug #24414.
+//Make sure that a basic case of DateTime.ParseExact with a format array works.
+class Co7510ParseExact_formatarray
+{
+ public static int Main()
+ {
+ try
+ {
+ string[] formats = new string[24];
+ formats[0] = "HH:mm:ss";
+ formats[1] = "HH:mm:ss.f";
+ formats[2] = "HH:mm:ss.ff";
+ formats[3] = "HH:mm:ss.fff";
+ formats[4] = "HH:mm:ss.ffff";
+ formats[5] = "HH:mm:ss.fffff";
+ formats[6] = "HH:mm:ss.ffffff";
+ formats[7] = "HH:mm:ss.fffffff";
+ formats[8] = "HH:mm:ssZ";
+ formats[9] = "HH:mm:ss.fZ";
+ formats[10] = "HH:mm:ss.ffZ";
+ formats[11] = "HH:mm:ss.fffZ";
+ formats[12] = "HH:mm:ss.ffffZ";
+ formats[13] = "HH:mm:ss.fffffZ";
+ formats[14] = "HH:mm:ss.ffffffZ";
+ formats[15] = "HH:mm:ss.fffffffZ";
+ formats[16] = "HH:mm:sszzzzzz";
+ formats[17] = "HH:mm:ss.fzzzzzz";
+ formats[18] = "HH:mm:ss.ffzzzzzz";
+ formats[19] = "HH:mm:ss.fffzzzzzz";
+ formats[20] = "HH:mm:ss.ffffzzzzzz";
+ formats[21] = "HH:mm:ss.fffffzzzzzz";
+ formats[22] = "HH:mm:ss.ffffffzzzzzz";
+ formats[23] = "HH:mm:ss.fffffffzzzzzz";
+ string time = "10:27:27.123";
+
+ DateTime dtReturned =
+ DateTime.ParseExact(time, formats, DateTimeFormatInfo.InvariantInfo,
+ DateTimeStyles.AllowLeadingWhite|DateTimeStyles.AllowTrailingWhite);
+
+ DateTime dtNow = DateTime.Now;
+ DateTime dtExpected = new DateTime(dtNow.Year, dtNow.Month, dtNow.Day, 10, 27, 27, 123);
+
+ if (dtExpected == dtReturned)
+ {
+ TestLibrary.Logging.WriteLine("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.Logging.WriteLine("Expected: {0}", dtExpected.ToString("M/d/yyyy HH:mm:ss.ffff tt"));
+ TestLibrary.Logging.WriteLine("Actual: {0}", dtReturned.ToString("M/d/yyyy HH:mm:ss.ffff tt"));
+ TestLibrary.Logging.WriteLine("FAIL");
+ return 1;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.Logging.WriteLine("Unexpected exception: {0}", e.ToString());
+ TestLibrary.Logging.WriteLine("FAIL");
+ return 1;
+ }
+ }
+}
diff --git a/tests/src/CoreMangLib/system/delegate/VSD/OpenDelegate.cs b/tests/src/CoreMangLib/system/delegate/VSD/OpenDelegate.cs
new file mode 100644
index 0000000000..acb385a435
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/VSD/OpenDelegate.cs
@@ -0,0 +1,50 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+using System.Collections.Generic;
+
+class Program
+{
+ public class ClassA
+ {
+ public virtual int PublicInstanceMethod() { return 17; }
+ }
+
+ public delegate int Delegate_TC_Int(ClassA tc);
+ public static MethodInfo GetMethod(Type t, string method)
+ {
+ TypeInfo typeInfo = t.GetTypeInfo();
+ IEnumerator<MethodInfo> enumerator = typeInfo.DeclaredMethods.GetEnumerator();
+ MethodInfo result = null;
+ while (enumerator.MoveNext())
+ {
+ bool flag = enumerator.Current.Name.Equals(method);
+ if (flag)
+ {
+ result = enumerator.Current;
+ break;
+ }
+ }
+ return result;
+ }
+ public static int Main(string[] args)
+ {
+ Type typeTestClass = typeof(ClassA);
+ ClassA TestClass = (ClassA)Activator.CreateInstance(typeTestClass);
+ MethodInfo miPublicInstanceMethod = GetMethod(typeTestClass, "PublicInstanceMethod");
+ Delegate dlgt = miPublicInstanceMethod.CreateDelegate(typeof(Delegate_TC_Int));
+ Object retValue = ((Delegate_TC_Int)dlgt).DynamicInvoke(new Object[] { TestClass });
+
+ if(retValue.Equals(TestClass.PublicInstanceMethod()))
+ {
+ return 100;
+ }
+
+
+ return -1;
+
+ }
+
+}
diff --git a/tests/src/CoreMangLib/system/delegate/VSD/OpenDelegate.csproj b/tests/src/CoreMangLib/system/delegate/VSD/OpenDelegate.csproj
new file mode 100644
index 0000000000..5a39b7582d
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/VSD/OpenDelegate.csproj
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="OpenDelegate.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/CoreMangLib/system/delegate/generics/NG_Standard.csproj b/tests/src/CoreMangLib/system/delegate/generics/NG_Standard.csproj
new file mode 100644
index 0000000000..dd18b75221
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/generics/NG_Standard.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="common.cs" />
+ <Compile Include="ng_standard.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/delegate/generics/NegativeGenerics.csproj b/tests/src/CoreMangLib/system/delegate/generics/NegativeGenerics.csproj
new file mode 100644
index 0000000000..6e2506a5f5
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/generics/NegativeGenerics.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="negativegenerics.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/delegate/generics/NullableTypes.csproj b/tests/src/CoreMangLib/system/delegate/generics/NullableTypes.csproj
new file mode 100644
index 0000000000..8765fd8660
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/generics/NullableTypes.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="nullabletypes.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/delegate/generics/common.cs b/tests/src/CoreMangLib/system/delegate/generics/common.cs
new file mode 100644
index 0000000000..b2a475733a
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/generics/common.cs
@@ -0,0 +1,333 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+//@TODO - API level testing for generics, particulary with multicast invocation lists and co/contra variant generics
+//@TODO - Vary the return type
+
+//Disable warnings about unused fields, they exist only to pad the size of the structs/objects to stress the stub types, we don't care that they aren't used.
+#pragma warning disable 649
+#pragma warning disable 169
+using System;
+
+//////////////////////////////////////////////////////////////////////
+//Non generic delegates over various generic targets
+//////////////////////////////////////////////////////////////////////
+
+//Closed Instance / Open static Non-Generic delegates for all M1-M9s
+delegate long dc1(long l);
+delegate long dc4(EQStruct<long> t, long l);
+delegate long dc5(long l, EQStruct<long> t);
+delegate long dc6(EQClass<long> t, long l);
+delegate long dc7(long l, EQClass<long> t);
+
+//Open Instance Non-Generic delegates for M1-M9 over a reference generic
+delegate long do1_ref(GenericClass<EQStruct<long>> o,long l);
+delegate long do4_ref(GenericClass<EQStruct<long>> o, EQStruct<long> t, long l);
+delegate long do5_ref(GenericClass<EQStruct<long>> o, long l, EQStruct<long> t);
+delegate long do6_ref(GenericClass<EQStruct<long>> o, EQClass<long> t, long l);
+delegate long do7_ref(GenericClass<EQStruct<long>> o, long l, EQClass<long> t);
+
+//Open Instance Non-Generic delegates for M1-M9 over a value generic
+delegate long do1_val(ref GenericStruct<EQStruct<long>> o,long l);
+delegate long do4_val(ref GenericStruct<EQStruct<long>> o, EQStruct<long> t, long l);
+delegate long do5_val(ref GenericStruct<EQStruct<long>> o, long l, EQStruct<long> t);
+delegate long do6_val(ref GenericStruct<EQStruct<long>> o, EQClass<long> t, long l);
+delegate long do7_val(ref GenericStruct<EQStruct<long>> o, long l, EQClass<long> t);
+
+//Closed Static Non-Generic delegates for SM1-SM9
+delegate long dcs1();
+delegate long dcs2(long l);
+delegate long dcs5(EQStruct<long> t);
+delegate long dcs7(EQClass<long> t);
+
+//////////////////////////////////////////////////////////////////////
+//Generic delegate types over varous generic targets
+//////////////////////////////////////////////////////////////////////
+
+//Minimal set of generic delegates to cover all the above cases
+delegate T g0<T>();
+delegate T g1<T,U>(U u);
+delegate T g2<T, U, V>(U u, V v);
+delegate T g3<T, U, V, W>(U u, V v, W w);
+
+//////////////////////////////////////////////////////////////////////
+
+class GenericClass<T> where T:Equality{
+ public long value,field2,field3,field4,field5,field6;
+
+ public long M1(long l){
+ if(value!=l)
+ throw new Exception();
+ return 100;
+ }
+
+ public long M2(T t, long l){
+ if(!t.Equals(l) || value!=l)
+ throw new Exception();
+ return 100;
+ }
+
+ public long M3(long l, T t){
+ if(!t.Equals(l) || value!=l)
+ throw new Exception();
+ return 100;
+ }
+
+ public long M4(EQStruct<long> t, long l){
+ if(!t.Equals(l) || value!=l)
+ throw new Exception();
+ return 100;
+ }
+
+ public long M5(long l, EQStruct<long> t){
+ if(!t.Equals(l) || value!=l)
+ throw new Exception();
+ return 100;
+ }
+
+ public long M6(EQClass<long> t, long l){
+ if(!t.Equals(l) || value!=l)
+ throw new Exception();
+ return 100;
+ }
+
+ public long M7(long l, EQClass<long> t){
+ if(!t.Equals(l) || value!=l)
+ throw new Exception();
+ return 100;
+ }
+
+ public long M8<U>(U u, long l) where U:Equality{
+ if(!u.Equals(l) || value!=l)
+ throw new Exception();
+ return 100;
+ }
+
+ public long M9<U>(long l, U u) where U:Equality{
+ if(!u.Equals(l) || value!=l)
+ throw new Exception();
+ return 100;
+ }
+
+ public static long SM1(long l){
+ return 100;
+ }
+
+ public static long SM2(T t, long l){
+ if(!t.Equals(l))
+ throw new Exception();
+ return 100;
+ }
+
+ public static long SM3(long l, T t){
+ if(!t.Equals(l))
+ throw new Exception();
+ return 100;
+ }
+
+ public static long SM4(EQStruct<long> t, long l){
+ if(!t.Equals(l))
+ throw new Exception();
+ return 100;
+ }
+
+ public static long SM5(long l, EQStruct<long> t){
+ if(!t.Equals(l))
+ throw new Exception();
+ return 100;
+ }
+
+ public static long SM6(EQClass<long> t, long l){
+ if(!t.Equals(l))
+ throw new Exception();
+ return 100;
+ }
+
+ public static long SM7(long l, EQClass<long> t){
+ if(!t.Equals(l))
+ throw new Exception();
+ return 100;
+ }
+
+ public static long SM8<U>(U u, long l) where U:Equality{
+ if(!u.Equals(l))
+ throw new Exception();
+ return 100;
+ }
+
+ public static long SM9<U>(long l, U u) where U:Equality{
+ if(!u.Equals(l))
+ throw new Exception();
+ return 100;
+ }
+}
+
+struct GenericStruct<T> where T:Equality{
+ public long value,field2,field3,field4,field5,field6;
+
+ public long M1(long l){
+ if(value!=l)
+ throw new Exception();
+ return 100;
+ }
+
+ public long M2(T t, long l){
+ Console.WriteLine(l);
+ if(!t.Equals(l) || value!=l)
+ throw new Exception();
+ return 100;
+ }
+
+ public long M3(long l, T t){
+ if(!t.Equals(l) || value!=l)
+ throw new Exception();
+ return 100;
+ }
+
+ public long M4(EQStruct<long> t, long l){
+ if(!t.Equals(l) || value!=l)
+ throw new Exception();
+ return 100;
+ }
+
+ public long M5(long l, EQStruct<long> t){
+ if(!t.Equals(l) || value!=l)
+ throw new Exception();
+ return 100;
+ }
+
+ public long M6(EQClass<long> t, long l){
+ if(!t.Equals(l) || value!=l)
+ throw new Exception();
+ return 100;
+ }
+
+ public long M7(long l, EQClass<long> t){
+ if(!t.Equals(l) || value!=l)
+ throw new Exception();
+ return 100;
+ }
+
+ public long M8<U>(U u, long l) where U:Equality{
+ if(!u.Equals(l) || value!=l)
+ throw new Exception();
+ return 100;
+ }
+
+ public long M9<U>(long l, U u) where U:Equality{
+ if(!u.Equals(l) || value!=l)
+ throw new Exception();
+ return 100;
+ }
+
+ public static long SM1(long l){
+ return 100;
+ }
+
+ public static long SM2(T t, long l){
+ if(!t.Equals(l))
+ throw new Exception();
+ return 100;
+ }
+
+ public static long SM3(long l, T t){
+ if(!t.Equals(l))
+ throw new Exception();
+ return 100;
+ }
+
+ public static long SM4(EQStruct<long> t, long l){
+ if(!t.Equals(l))
+ throw new Exception();
+ return 100;
+ }
+
+ public static long SM5(long l, EQStruct<long> t){
+ if(!t.Equals(l))
+ throw new Exception();
+ return 100;
+ }
+
+ public static long SM6(EQClass<long> t, long l){
+ if(!t.Equals(l))
+ throw new Exception();
+ return 100;
+ }
+
+ public static long SM7(long l, EQClass<long> t){
+ if(!t.Equals(l))
+ throw new Exception();
+ return 100;
+ }
+
+ public static long SM8<U>(U u, long l) where U:Equality{
+ if(!u.Equals(l))
+ throw new Exception();
+ return 100;
+ }
+
+ public static long SM9<U>(long l, U u) where U:Equality{
+ if(!u.Equals(l))
+ throw new Exception();
+ return 100;
+ }
+}
+
+interface Equality{
+ bool Equals(long l);
+}
+/*
+class EQClass : Equality{
+ double f1,f2,f3,f4,f5,f6,f7,f8,f9,f10;
+ long value;
+
+ public EQClass(long l){
+ value = l;
+ }
+
+ public bool Equals(long l){
+ return (value==l);
+ }
+}
+
+class EQStruct : Equality{
+ double f1,f2,f3,f4,f5,f6,f7,f8,f9,f10;
+ long value;
+
+ public EQStruct(long l){
+ value = l;
+ }
+
+ public bool Equals(long l){
+ return (value==l);
+ }
+}
+*/
+class EQClass<T> : Equality{
+ double f1,f2,f3,f4,f5,f6,f7,f8,f9,f10;
+ public T f11;
+ long value;
+
+ public EQClass(long l){
+ value = l;
+ }
+
+ public bool Equals(long l){
+ return (value==l);
+ }
+}
+
+class EQStruct<T> : Equality{
+ double f1,f2,f3,f4,f5,f6,f7,f8,f9,f10;
+ public T f11;
+ long value;
+
+ public EQStruct(long l){
+ value = l;
+ }
+
+ public bool Equals(long l){
+ return (value==l);
+ }
+}
+#pragma warning restore
diff --git a/tests/src/CoreMangLib/system/delegate/generics/negativegenerics.cs b/tests/src/CoreMangLib/system/delegate/generics/negativegenerics.cs
new file mode 100644
index 0000000000..97b93df7a8
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/generics/negativegenerics.cs
@@ -0,0 +1,38 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+//Covers various negative binding cases for delegates and generics...
+using System;
+
+
+//Define some classes and method for use in our scenarios...
+class A<T>{
+ public virtual void GMeth<U>(){}
+}
+
+class B<T> : A<int>{
+ public override void GMeth<U>(){}
+}
+
+//Define our delegate types...
+delegate void Closed();
+delegate void Open(B<int> b);
+delegate void GClosed<T>();
+
+class Test{
+ public static int retVal=100;
+
+ public static int Main(){
+ //Try to create an open-instance delegate to a virtual generic method (@TODO - Need early bound case here too)
+ //Try to create a generic delegate of a non-instantiated type
+ //Try to create a delegate over a non-instantiated target type
+ //Try to create a delegate over a non-instantiated target method
+ //Try to create a delegate to a generic method by name
+
+ //Does Closed() over GMeth<int> == Closed() over GMeth<double>??
+ //Does GClosed<int>() over GMeth<int> == GClosed<double>() over GMeth<int>??
+
+ Console.WriteLine("Done - {0}",retVal==100?"Passed":"Failed");
+ return retVal;
+ }
+}
diff --git a/tests/src/CoreMangLib/system/delegate/generics/ng_standard.cs b/tests/src/CoreMangLib/system/delegate/generics/ng_standard.cs
new file mode 100644
index 0000000000..e0c1b5021c
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/generics/ng_standard.cs
@@ -0,0 +1,110 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+class Test{
+ public static int Main(){
+ Console.WriteLine("Test creation/invocation of non-generic closed instance or open static delegates over various generic methods");
+
+ GenericClass<EQStruct<long>> refr = new GenericClass<EQStruct<long>>();
+ GenericStruct<EQStruct<long>> val = new GenericStruct<EQStruct<long>>();
+ refr.value = 50;
+ val.value = 50;
+
+ //Closed instance methods
+ dc1 d1 = new dc1(refr.M1);
+ d1(50);
+ d1 = new dc1(val.M1);
+ d1(50);
+
+ dc4 d2 = new dc4(refr.M2);
+ d2(new EQStruct<long>(50),50);
+ d2 = new dc4(val.M2);
+ d2(new EQStruct<long>(50),50);
+
+ dc5 d3 = new dc5(refr.M3);
+ d3(50, new EQStruct<long>(50));
+ d3 = new dc5(val.M3);
+ d3(50, new EQStruct<long>(50));
+
+ dc4 d4 = new dc4(refr.M4);
+ d4(new EQStruct<long>(50),50);
+ d4 = new dc4(val.M4);
+ d4(new EQStruct<long>(50),50);
+
+ dc5 d5 = new dc5(refr.M5);
+ d5(50, new EQStruct<long>(50));
+ d5 = new dc5(val.M5);
+ d5(50, new EQStruct<long>(50));
+
+ dc6 d6 = new dc6(refr.M6);
+ d6(new EQClass<long>(50),50);
+ d6 = new dc6(val.M6);
+ d6(new EQClass<long>(50),50);
+
+ dc7 d7 = new dc7(refr.M7);
+ d7(50,new EQClass<long>(50));
+ d7 = new dc7(val.M7);
+ d7(50,new EQClass<long>(50));
+
+ dc6 d8 = new dc6(refr.M8<EQClass<long>>);
+ d8(new EQClass<long>(50),50);
+ d8 = new dc6(val.M8<EQClass<long>>);
+ d8(new EQClass<long>(50),50);
+
+ dc7 d9 = new dc7(refr.M9<EQClass<long>>);
+ d9(50,new EQClass<long>(50));
+ d9 = new dc7(val.M9<EQClass<long>>);
+ d9(50,new EQClass<long>(50));
+
+ //Open static methods
+ d1 = new dc1(GenericClass<EQStruct<long>>.SM1);
+ d1(50);
+ d1 = new dc1(GenericStruct<EQStruct<long>>.SM1);
+ d1(50);
+
+ d2 = new dc4(GenericClass<EQStruct<long>>.SM2);
+ d2(new EQStruct<long>(50),50);
+ d2 = new dc4(GenericStruct<EQStruct<long>>.SM2);
+ d2(new EQStruct<long>(50),50);
+
+ d3 = new dc5(GenericClass<EQStruct<long>>.SM3);
+ d3(50, new EQStruct<long>(50));
+ d3 = new dc5(GenericStruct<EQStruct<long>>.SM3);
+ d3(50, new EQStruct<long>(50));
+
+ d4 = new dc4(GenericClass<EQStruct<long>>.SM4);
+ d4(new EQStruct<long>(50),50);
+ d4 = new dc4(GenericStruct<EQStruct<long>>.SM4);
+ d4(new EQStruct<long>(50),50);
+
+ d5 = new dc5(GenericClass<EQStruct<long>>.SM5);
+ d5(50, new EQStruct<long>(50));
+ d5 = new dc5(GenericStruct<EQStruct<long>>.SM5);
+ d5(50, new EQStruct<long>(50));
+
+ d6 = new dc6(GenericClass<EQStruct<long>>.SM6);
+ d6(new EQClass<long>(50),50);
+ d6 = new dc6(GenericStruct<EQStruct<long>>.SM6);
+ d6(new EQClass<long>(50),50);
+
+ d7 = new dc7(GenericClass<EQStruct<long>>.SM7);
+ d7(50,new EQClass<long>(50));
+ d7 = new dc7(GenericStruct<EQStruct<long>>.SM7);
+ d7(50,new EQClass<long>(50));
+
+ d8 = new dc6(GenericClass<EQStruct<long>>.SM8<EQClass<long>>);
+ d8(new EQClass<long>(50),50);
+ d8 = new dc6(GenericStruct<EQStruct<long>>.SM8<EQClass<long>>);
+ d8(new EQClass<long>(50),50);
+
+ d9 = new dc7(GenericClass<EQStruct<long>>.SM9<EQClass<long>>);
+ d9(50,new EQClass<long>(50));
+ d9 = new dc7(GenericStruct<EQStruct<long>>.SM9<EQClass<long>>);
+ d9(50,new EQClass<long>(50));
+
+ Console.WriteLine("Done - Passed");
+ return 100;
+ }
+}
diff --git a/tests/src/CoreMangLib/system/delegate/generics/nullabletypes.cs b/tests/src/CoreMangLib/system/delegate/generics/nullabletypes.cs
new file mode 100644
index 0000000000..824b0ec842
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/generics/nullabletypes.cs
@@ -0,0 +1,349 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+#pragma warning disable 414
+
+using System;
+using System.Globalization;
+
+//Define all the standard delegates to be used
+public delegate int iDi(int i, out string m);
+public delegate int iDNi(int? i, out string m);
+public delegate int iDI(I i, out string m);
+public delegate int iDS(S s, out string m);
+public delegate int iDNS(S? s, out string m);
+public delegate int IDo(object o, out string m);
+public delegate S SDi(int i, out string m);
+public delegate S? NSDi(int i, out string m);
+public delegate I IDi(int i, out string m);
+public delegate int iDo(object o, out string m);
+public delegate object oDi(int i, out string m);
+
+//Define all the open instance delegates to be used
+public delegate int iDi<T>(T t,int i, out string m);
+public delegate int iDNi<T>(T t,int? i, out string m);
+public delegate int iDI<T>(T t,I i, out string m);
+public delegate int iDS<T>(T t,S s, out string m);
+public delegate int iDNS<T>(T t,S? s, out string m);
+public delegate int iDo<T>(T t,object o, out string m);
+public delegate S SDi<T>(T t, int i, out string m);
+public delegate S? NSDi<T>(T t, int i, out string m);
+public delegate I IDi<T>(T t, int i, out string m);
+public delegate int IDo<T>(T t,object o, out string m);
+public delegate object oDi<T>(T t, int i, out string m);
+
+//Define all the closed static delegates to be used
+public delegate T tD<T>(out string m);
+public delegate T tDi<T>(int i, out string m);
+
+//@TODO - Are G<Foo> and G<Foo?> equivalent? Can you even specify a G<Foo?>??
+//@TODO - Can you close over an out or ref parameter???
+//@TODO - another case, ex. close this method static M(int? i) over a null argument
+//@TODO - A delegate declared as D(S?) used as an open instance to bind to a method on S????? Probably just doesn't work as the type isn't really an S, might work to bind to methods on the Nullable<T> type, but that would be expected. Should check it to be sure.
+
+//Define the custom types to be used
+public interface I{
+ bool Equals(int i);
+}
+
+public struct S : I{
+ //Dummy fields to extend this value type and stress
+ //the stub. We really don't care that they're not used.
+ private double f1,f2,f3,f4,f5,f6,f7,f8,f9,f10;
+
+ //An assignable field to be checked for correctness
+ public int value;
+
+ public S(int i){
+ f1=0;f2=0;f3=0;f4=0;f5=0;f6=0;f7=0;f8=0;f9=0;f10=0;//@BUGBUG - It puzzles me to no end why there is a compiler error if I don't initialize these in the constructor
+ value = i;
+ }
+
+ public bool Equals(int i){
+ return (value==i);
+ }
+
+ //For later cleanliness
+ public static bool operator ==(S s, int i){
+ return s.Equals(i);
+ }
+
+ public static bool operator !=(S s, int i){
+ return !s.Equals(i);;
+ }
+
+ public override bool Equals(object o){
+ throw new Exception("this just exists to stop a compiler warning, don't call it");
+ }
+ public override int GetHashCode(){
+ throw new Exception("this just exists to stop a compiler warning, don't call it");
+ }
+}
+
+//Define the various delegate target methods
+
+public class RefInst{ //Instance methods on a reference class
+ //The out parameters are a crude tag to verify which method
+ //was actually called. Necessary because the other functionality
+ //of the methods is pretty much identical
+
+#region Overloads for BindToMethodName ambiguity testing
+ //These should appear in order from most general to most
+ //specific or (@TODO) we should have additional tests that
+ //vary the method order. This is to confirm that any
+ //ambiguous matching logic in BindToMethodName isn't just
+ //settling for the first "match" it sees. There should
+ //be no ambiguity at all in matching.
+
+ public int M(int? i, out string m){
+ m = "one";
+ if(i==null)
+ throw new ArgumentNullException();
+ else
+ return (int)i;
+ }
+
+ public int M(S? s, out string m){
+ m = "two";
+ if(s==null)
+ throw new ArgumentException();
+ else
+ return ((S)s).value;
+ }
+
+ public int M(I i, out string m){
+ m = "three";
+ if(i==null)
+ throw new ArgumentNullException();
+ if(!(i is S))
+ throw new ArgumentException();
+ return ((S)i).value;
+ }
+
+ public int M(object o, out string m){
+ m = "four";
+ if(o == null)
+ throw new ArgumentNullException();
+ if(!(o is S))
+ throw new ArgumentException();
+ return ((S)o).value;
+ }
+
+ public int M(S s, out string m){
+ m = "five";
+ return s.value;
+ }
+
+ public int M(int i, out string m){
+ m = "six";
+ return i;
+ }
+#endregion
+
+#region Non-overloaded methods to allow for (easier) explicit method selection
+ public int iMNi(int? i, out string m){
+ m = "iMNi";
+ if(i==null)
+ throw new ArgumentNullException();
+ else
+ return (int)i;
+ }
+
+ public int iMNS(S? s, out string m){
+ m = "iMNS";
+ if(s==null)
+ throw new ArgumentException();
+ else
+ return ((S)s).value;
+ }
+
+ public int iMI(I i, out string m){
+ m = "iMI";
+ if(i==null)
+ throw new ArgumentNullException();
+ if(!(i is S))
+ throw new ArgumentException();
+ return ((S)i).value;
+ }
+
+ public int iMo(object o, out string m){
+ m = "iMo";
+ if(o == null)
+ throw new ArgumentNullException();
+ if(!(o is S))
+ throw new ArgumentException();
+ return ((S)o).value;
+ }
+
+ public int iMS(S s, out string m){
+ m = "iMS";
+ return s.value;
+ }
+
+ public int iMi(int i, out string m){
+ m = "iMi";
+ return i;
+ }
+#endregion
+
+ public S SMi(int i, out string m){
+ m = "SMi";
+ return new S(i);
+ }
+
+ public S? NSMi(int i, out string m){
+ m = "NSMi";
+ return new S(i);
+ }
+
+ public I IMi(int i, out string m){
+ m = "IMi";
+ return new S(i);
+ }
+
+ public object oMi(int i, out string m){
+ m = "oMi";
+ return new S(i);
+ }
+}
+
+public class RefStat{ //Static methods on a reference class
+ //The out parameters are a crude tag to verify which method
+ //was actually called. Necessary because the other functionality
+ //of the methods is pretty much identical
+
+#region Overloads for BindToMethodName ambiguity testing
+ //These should appear in order from most general to most
+ //specific or (@TODO) we should have additional tests that
+ //vary the method order. This is to confirm that any
+ //ambiguous matching logic in BindToMethodName isn't just
+ //settling for the first "match" it sees. There should
+ //be no ambiguity at all in matching.
+
+ public static int M(int? i, out string m){
+ m = "one";
+ if(i==null)
+ throw new ArgumentNullException();
+ else
+ return (int)i;
+ }
+
+ public static int M(S? s, out string m){
+ m = "two";
+ if(s==null)
+ throw new ArgumentException();
+ else
+ return ((S)s).value;
+ }
+
+ public static int M(I i, out string m){
+ m = "three";
+ if(i==null)
+ throw new ArgumentNullException();
+ if(!(i is S))
+ throw new ArgumentException();
+ return ((S)i).value;
+ }
+
+ public static int M(object o, out string m){
+ m = "four";
+ if(o == null)
+ throw new ArgumentNullException();
+ if(!(o is S))
+ throw new ArgumentException();
+ return ((S)o).value;
+ }
+
+ public static int M(S s, out string m){
+ m = "five";
+ return s.value;
+ }
+
+ public static int M(int i, out string m){
+ m = "six";
+ return i;
+ }
+#endregion
+
+#region Non-overloaded methods to allow for (easier) explicit method selection
+ public static int iMNi(int? i, out string m){
+ m = "iMNi";
+ if(i==null)
+ throw new ArgumentNullException();
+ else
+ return (int)i;
+ }
+
+ public static int iMNS(S? s, out string m){
+ m = "iMNS";
+ if(s==null)
+ throw new ArgumentException();
+ else
+ return ((S)s).value;
+ }
+
+ public static int iMI(I i, out string m){
+ m = "iMI";
+ if(i==null)
+ throw new ArgumentNullException();
+ if(!(i is S))
+ throw new ArgumentException();
+ return ((S)i).value;
+ }
+
+ public static int iMo(object o, out string m){
+ m = "iMo";
+ if(o == null)
+ throw new ArgumentNullException();
+ if(!(o is S))
+ throw new ArgumentException();
+ return ((S)o).value;
+ }
+
+ public static int iMS(S s, out string m){
+ m = "iMS";
+ return s.value;
+ }
+
+ public static int iMi(int i, out string m){
+ m = "iMi";
+ return i;
+ }
+#endregion
+
+ public static S SMi(int i, out string m){
+ m = "SMi";
+ return new S(i);
+ }
+
+ public static S? NSMi(int i, out string m){
+ m = "NSMi";
+ return new S(i);
+ }
+
+ public static I IMi(int i, out string m){
+ m = "IMi";
+ return new S(i);
+ }
+
+ public static object oMi(int i, out string m){
+ m = "oMi";
+ return new S(i);
+ }
+}
+
+public struct ValInst{ //Instance methods on a value class
+}
+
+public struct ValStat{ //Static methods on a value class
+}
+
+//Some reusable helper methods
+public class Util{
+ //Method to do quick culture invariant string comparisons (quick in the sense that I don't have to type of cultureinfo.invariantlsjflakjdlfjsldkjf 7000 times).
+ public static bool Equals(string s1, string s2){
+ return String.Equals(s1, s2, StringComparison.Ordinal);
+ }
+}
+
+#pragma warning restore
diff --git a/tests/src/CoreMangLib/system/delegate/miscellaneous/Central.csproj b/tests/src/CoreMangLib/system/delegate/miscellaneous/Central.csproj
new file mode 100644
index 0000000000..5ccec93b4b
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/miscellaneous/Central.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="central.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/delegate/miscellaneous/ClosedStatic.cs b/tests/src/CoreMangLib/system/delegate/miscellaneous/ClosedStatic.cs
new file mode 100644
index 0000000000..6b35433adb
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/miscellaneous/ClosedStatic.cs
@@ -0,0 +1,41 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+class Program
+{
+ public int scale;
+
+ public Program(int scale)
+ {
+ this.scale = scale;
+ }
+ public static decimal getfunc(Program prog,int constituent)
+ {
+ return new decimal(constituent/prog.scale);
+ }
+ static int Main(string[] args)
+ {
+ int result = -1;
+
+ int constituent = 3;
+ Program prog = new Program(1);
+ 2.Equals(3);
+
+ MethodInfo info = typeof(Program).GetMethod("getfunc", BindingFlags.Static | BindingFlags.Public);
+
+ //Tests closed delegates over static methods with return buffer
+ Func<int, decimal> deepThought = (Func<int, decimal>)info.CreateDelegate(typeof(Func<int, decimal>), prog);
+
+ var res1 = deepThought(constituent);
+ var res2 = deepThought(constituent);
+
+ if (decimal.Compare(res1, res2) == 0)
+ return 100;
+
+ return result;
+
+ }
+}
diff --git a/tests/src/CoreMangLib/system/delegate/miscellaneous/ClosedStatic.csproj b/tests/src/CoreMangLib/system/delegate/miscellaneous/ClosedStatic.csproj
new file mode 100644
index 0000000000..bc95b076ed
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/miscellaneous/ClosedStatic.csproj
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="ClosedStatic.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <WarningLevel Include="1" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/CoreMangLib/system/delegate/miscellaneous/Co6010DelegateEqualsTwo.csproj b/tests/src/CoreMangLib/system/delegate/miscellaneous/Co6010DelegateEqualsTwo.csproj
new file mode 100644
index 0000000000..8e548b69ff
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/miscellaneous/Co6010DelegateEqualsTwo.csproj
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="co6010delegateequalstwo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <ItemGroup>
+ <WarningLevel Include="1" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/delegate/miscellaneous/Co6031GetHashCode.csproj b/tests/src/CoreMangLib/system/delegate/miscellaneous/Co6031GetHashCode.csproj
new file mode 100644
index 0000000000..f64d30c2c2
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/miscellaneous/Co6031GetHashCode.csproj
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="co6031gethashcode.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <ItemGroup>
+ <WarningLevel Include="1" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/delegate/miscellaneous/central.cs b/tests/src/CoreMangLib/system/delegate/miscellaneous/central.cs
new file mode 100644
index 0000000000..be997ac3e1
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/miscellaneous/central.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/system/delegate/miscellaneous/co6010delegateequalstwo.cs b/tests/src/CoreMangLib/system/delegate/miscellaneous/co6010delegateequalstwo.cs
new file mode 100644
index 0000000000..703a485902
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/miscellaneous/co6010delegateequalstwo.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/system/delegate/miscellaneous/co6031gethashcode.cs b/tests/src/CoreMangLib/system/delegate/miscellaneous/co6031gethashcode.cs
new file mode 100644
index 0000000000..d30537c4b5
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/miscellaneous/co6031gethashcode.cs
@@ -0,0 +1,86 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+delegate int Int32_VoidDelegate();
+public class TestClass
+{
+ public static int Main(string[] args)
+ {
+ int iTestCount= 0;
+ int iErrorCount= 0;
+ String LocStr = "loc_000";
+ int iExitCode = 101; //101: fail; 100: pass
+ try
+ {
+ //The return value of Delegate.GetHashcode must not be persisted for two reasons.
+ //First, the hash function of a class might be altered to generate a better
+ //distribution, rendering any values from the old hash function useless.
+ //Second, the default implementation of this class does not guarantee that
+ //the same value will be returned by different instances.
+
+
+ {
+ LocStr = "loc_001";
+ iTestCount++;
+ Console.WriteLine( "test1: GetHashCode of delegate pointing to static method" );
+ Int32_VoidDelegate sdg1 = new Int32_VoidDelegate( staticMethInt32_Void );
+
+ int ihc1 = sdg1.GetHashCode();
+ int ihc2 = sdg1.GetHashCode();
+ if( ihc2 != ihc1 )
+ {
+ Console.WriteLine( "Err_001 : should be equal, but one is :" + ihc1 + " other one is " + ihc2);
+ iErrorCount++;
+ }
+ }
+
+ {
+ LocStr = "loc_002";
+ iTestCount++;
+ Console.WriteLine( "test1: GetHashCode of delegate pointing to instance method " );
+ TestClass obj = new TestClass();
+ Int32_VoidDelegate sdg2 = new Int32_VoidDelegate( obj.instanceMethInt32_Void );
+
+ int ihc1 = sdg2.GetHashCode();
+ int ihc2 = sdg2.GetHashCode();
+ if( ihc2 != ihc1 )
+ {
+ Console.WriteLine( "Err_002 : should be equal, but one is :" + ihc1 + " other one is " + ihc2);
+ iErrorCount++;
+ }
+ }
+ }
+ catch( Exception e )
+ {
+ Console.WriteLine( LocStr + " : unexpected " + e.ToString() );
+ iErrorCount++;
+ }
+
+ if( iErrorCount > 0)
+ {
+ Console.WriteLine( "Total tests count" + iTestCount + " . Failed tests count" + iErrorCount);
+ iExitCode = 101;
+ }
+ else
+ {
+ Console.WriteLine( "Total tests count" + iTestCount + " . All passed" );
+ iExitCode = 100;
+ }
+ return iExitCode;
+ }
+
+ public static int staticMethInt32_Void()
+ {
+ Console.WriteLine( "Invoked staticMethVoid_Void method");
+ return 77;
+ }
+
+ public int instanceMethInt32_Void()
+ {
+ Console.WriteLine( "Invoked staticMethVoid_Void1 method");
+ return 66;
+ }
+}
+
diff --git a/tests/src/CoreMangLib/system/delegate/regressions/devdivbugs/113347/DDB113347.csproj b/tests/src/CoreMangLib/system/delegate/regressions/devdivbugs/113347/DDB113347.csproj
new file mode 100644
index 0000000000..741ee6c2b6
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/regressions/devdivbugs/113347/DDB113347.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="ddb113347.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/delegate/regressions/devdivbugs/113347/ddb113347.cs b/tests/src/CoreMangLib/system/delegate/regressions/devdivbugs/113347/ddb113347.cs
new file mode 100644
index 0000000000..52fa15cb03
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/regressions/devdivbugs/113347/ddb113347.cs
@@ -0,0 +1,42 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+using System.Security;
+
+[SecuritySafeCritical]
+class Program {
+ static int Main() {
+ Console.WriteLine("Attempting delegate construction with null method pointer.");
+ Console.WriteLine("Expecting: ArgumentNullException wrapped in TargetInvocationException.");
+ try {
+ Activator.CreateInstance(typeof(Action<object>), null, IntPtr.Zero);
+ Console.WriteLine("FAIL: Creation succeeded");
+ return 200;
+ }
+ catch (TargetInvocationException ex) {
+ Console.WriteLine("Caught expected TargetInvocationException");
+ if (ex.InnerException == null) {
+ Console.WriteLine("No inner exception was provided");
+ Console.WriteLine("FAILED");
+ return 201;;
+ }
+ else if (ex.InnerException is ArgumentNullException) {
+ Console.WriteLine("Inner exception is ArgumentNullException as expected");
+ Console.WriteLine("PASSED");
+ return 100;
+ }
+ else {
+ Console.WriteLine("Unexpected inner exception: {0}", ex.InnerException);
+ Console.WriteLine("FAILED");
+ return 202;
+ }
+ }
+ catch (Exception ex) {
+ Console.WriteLine("Caught unexpected exception: {0}", ex);
+ Console.WriteLine("FAILED");
+ return 203;
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/delegate/threatmodel/public/TestClass.csproj b/tests/src/CoreMangLib/system/delegate/threatmodel/public/TestClass.csproj
new file mode 100644
index 0000000000..9ddf31918f
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/threatmodel/public/TestClass.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="testclass.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/delegate/threatmodel/public/TestClassFrameworkInternal.csproj b/tests/src/CoreMangLib/system/delegate/threatmodel/public/TestClassFrameworkInternal.csproj
new file mode 100644
index 0000000000..b43b589fb2
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/threatmodel/public/TestClassFrameworkInternal.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="testclassframeworkinternal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/delegate/threatmodel/public/testclass.cs b/tests/src/CoreMangLib/system/delegate/threatmodel/public/testclass.cs
new file mode 100644
index 0000000000..ba66c35c4e
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/threatmodel/public/testclass.cs
@@ -0,0 +1,46 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Security;
+
+//This class is used to fake out the complier. It should be identical to ..\Tests except for visability rules
+
+public class TestClassPublic
+{
+ public static int methodPublic()
+ {
+ return 1;
+ }
+
+ private static int methodPrivate()
+ {
+ return 2;
+ }
+
+ internal static int methodInternal()
+ {
+ return 3;
+ }
+}
+
+public class TestClassInternal
+{
+ public static int methodPublic()
+ {
+ return 4;
+ }
+
+ private static int methodPrivate()
+ {
+ return 5;
+ }
+
+ internal static int methodInternal()
+ {
+ return 6;
+ }
+}
diff --git a/tests/src/CoreMangLib/system/delegate/threatmodel/public/testclassframeworkinternal.cs b/tests/src/CoreMangLib/system/delegate/threatmodel/public/testclassframeworkinternal.cs
new file mode 100644
index 0000000000..7e14593b53
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/threatmodel/public/testclassframeworkinternal.cs
@@ -0,0 +1,28 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Security;
+
+//This class is used to fake out the complier. It should be identical to ..\Tests except for visability rules
+
+public class TestClassFrameworkInternal
+{
+ public static int methodPublic()
+ {
+ return 7;
+ }
+
+ private static int methodPrivate()
+ {
+ return 8;
+ }
+
+ internal static int methodInternal()
+ {
+ return 9;
+ }
+}
diff --git a/tests/src/CoreMangLib/system/delegate/threatmodel/tests/BindingTarget.csproj b/tests/src/CoreMangLib/system/delegate/threatmodel/tests/BindingTarget.csproj
new file mode 100644
index 0000000000..e7853339ee
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/threatmodel/tests/BindingTarget.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="bindingtarget.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/delegate/threatmodel/tests/CritConstructorClass.csproj b/tests/src/CoreMangLib/system/delegate/threatmodel/tests/CritConstructorClass.csproj
new file mode 100644
index 0000000000..6c6c1b748a
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/threatmodel/tests/CritConstructorClass.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="critconstructorclass.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/delegate/threatmodel/tests/TestClass.csproj b/tests/src/CoreMangLib/system/delegate/threatmodel/tests/TestClass.csproj
new file mode 100644
index 0000000000..9ddf31918f
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/threatmodel/tests/TestClass.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="testclass.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/delegate/threatmodel/tests/TestClassFrameworkInternal.csproj b/tests/src/CoreMangLib/system/delegate/threatmodel/tests/TestClassFrameworkInternal.csproj
new file mode 100644
index 0000000000..b43b589fb2
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/threatmodel/tests/TestClassFrameworkInternal.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="testclassframeworkinternal.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/delegate/threatmodel/tests/bindingtarget.cs b/tests/src/CoreMangLib/system/delegate/threatmodel/tests/bindingtarget.cs
new file mode 100644
index 0000000000..f8766ffb2d
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/threatmodel/tests/bindingtarget.cs
@@ -0,0 +1,52 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Security;
+using System.Reflection;
+using TestLibrary;
+
+//Test verifying DCR DevDiv 208672. This makes sure Critical delegates can be bound only to Critical method. Critical delegates can't be bound to transparent or safecritical
+//methods and critical methods can't be bound by transparent or safecritical delegates
+
+public class BindingTarget
+{
+ //Test methods
+ public static bool TransparentMethod()
+ {
+ TestFramework.LogInformation("\tTransparentMethod is invoked");
+ return true;
+ }
+ [SecuritySafeCritical]
+ public static bool SafeCriticalMethod()
+ {
+ TestFramework.LogInformation("\tSafeCriticalMethod Method is invoked");
+ return true;
+ }
+ [SecurityCritical]
+ public static bool CriticalMethod()
+ {
+ TestFramework.LogInformation("\tSecurityCriticalMethod Method is invoked");
+ return true;
+ }
+
+
+ //Test methods
+ public static bool GenericTransparentMethod<T>()
+ {
+ TestFramework.LogInformation("\tTransparentMethod is invoked");
+ return true;
+ }
+ [SecuritySafeCritical]
+ public static bool GenericSafeCriticalMethod<T>()
+ {
+ TestFramework.LogInformation("\tSafeCriticalMethod Method is invoked");
+ return true;
+ }
+ [SecurityCritical]
+ public static bool GenericCriticalMethod<T>()
+ {
+ TestFramework.LogInformation("\tSecurityCriticalMethod Method is invoked");
+ return true;
+ }
+}
diff --git a/tests/src/CoreMangLib/system/delegate/threatmodel/tests/critconstructorclass.cs b/tests/src/CoreMangLib/system/delegate/threatmodel/tests/critconstructorclass.cs
new file mode 100644
index 0000000000..85bcb7a99f
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/threatmodel/tests/critconstructorclass.cs
@@ -0,0 +1,20 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Security;
+
+public class CritConstructorClass
+{
+
+ public int a;
+
+ [SecurityCritical]
+ public CritConstructorClass(int input)
+ {
+ a = input;
+ }
+}
diff --git a/tests/src/CoreMangLib/system/delegate/threatmodel/tests/testclass.cs b/tests/src/CoreMangLib/system/delegate/threatmodel/tests/testclass.cs
new file mode 100644
index 0000000000..bf6d54aeec
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/threatmodel/tests/testclass.cs
@@ -0,0 +1,44 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Security;
+
+public class TestClassPublic
+{
+ public static int methodPublic()
+ {
+ return 1;
+ }
+
+ private static int methodPrivate()
+ {
+ return 2;
+ }
+
+ internal static int methodInternal()
+ {
+ return 3;
+ }
+}
+
+internal class TestClassInternal
+{
+ public static int methodPublic()
+ {
+ return 4;
+ }
+
+ private static int methodPrivate()
+ {
+ return 5;
+ }
+
+ internal static int methodInternal()
+ {
+ return 6;
+ }
+}
diff --git a/tests/src/CoreMangLib/system/delegate/threatmodel/tests/testclassframeworkinternal.cs b/tests/src/CoreMangLib/system/delegate/threatmodel/tests/testclassframeworkinternal.cs
new file mode 100644
index 0000000000..8beee24043
--- /dev/null
+++ b/tests/src/CoreMangLib/system/delegate/threatmodel/tests/testclassframeworkinternal.cs
@@ -0,0 +1,27 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.IO;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Security;
+
+[assembly: InternalsVisibleTo("mscorlib, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
+internal class TestClassFrameworkInternal
+{
+ public static int methodPublic()
+ {
+ return 7;
+ }
+
+ private static int methodPrivate()
+ {
+ return 8;
+ }
+
+ internal static int methodInternal()
+ {
+ return 9;
+ }
+}
diff --git a/tests/src/CoreMangLib/system/exception/Data_Helper.csproj b/tests/src/CoreMangLib/system/exception/Data_Helper.csproj
new file mode 100644
index 0000000000..5680c520e3
--- /dev/null
+++ b/tests/src/CoreMangLib/system/exception/Data_Helper.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="data_helper.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/exception/data_helper.cs b/tests/src/CoreMangLib/system/exception/data_helper.cs
new file mode 100644
index 0000000000..6a5fbfeb16
--- /dev/null
+++ b/tests/src/CoreMangLib/system/exception/data_helper.cs
@@ -0,0 +1,42 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+public class NonSerializableClass
+{
+ override public String ToString()
+ {
+ return "Fred";
+ }
+}
+
+public class DataHelper
+{
+ public static String msg1 = "Exception from DataHelper.ThrowWithData()";
+ public static String msg2 = "Exception from DataHelper.ThrowWithNonSerializableData()";
+
+ public static String key1 = "'Twas Brillig and the slithy toves";
+ public static String val1 = "Did gyre and gimble in the wabe";
+ public static String key2 = "answer";
+ public static int val2 = 42;
+ public static String key3 = "nonserializable";
+ public static NonSerializableClass val3 = new NonSerializableClass();
+
+ public void ThrowWithData()
+ {
+ Exception e = new Exception(msg1);
+ e.Data[key1] = val1;
+ e.Data[key2] = val2;
+ throw (e);
+ }
+
+ public void ThrowWithNonSerializableData()
+ {
+ Exception e = new Exception(msg2);
+ e.Data[key3] = val3;
+ throw (e);
+ }
+}
+
+
diff --git a/tests/src/CoreMangLib/system/guid/Guid_Parsing.csproj b/tests/src/CoreMangLib/system/guid/Guid_Parsing.csproj
new file mode 100644
index 0000000000..a81db8d6d6
--- /dev/null
+++ b/tests/src/CoreMangLib/system/guid/Guid_Parsing.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="guid_parsing.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/guid/guid_parsing.cs b/tests/src/CoreMangLib/system/guid/guid_parsing.cs
new file mode 100644
index 0000000000..0f847594f3
--- /dev/null
+++ b/tests/src/CoreMangLib/system/guid/guid_parsing.cs
@@ -0,0 +1,968 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+public class Test
+ {
+ public Boolean runTest()
+ {
+ TestLibrary.Logging.WriteLine( "parse testing started." );
+ bool passing = true;
+ Guid testGuid = Guid.NewGuid();
+ try
+ {
+ //format is null (invalid case)
+ passing &= VerifyParse(testGuid.ToString("B"), null, testGuid.ToString("N"), true, typeof(ArgumentNullException), false);
+
+ //format is empty string (invalid case)
+ passing &= VerifyParse(testGuid.ToString("B"), String.Empty, testGuid.ToString("N"), true, typeof(FormatException), false);
+
+ //format is incorrect char (invalid case)
+ passing &= VerifyParse(testGuid.ToString("B"), "t", testGuid.ToString("N"), true, typeof(FormatException), false);
+
+ //format is multiple chars (invalid case)
+ passing &= VerifyParse(testGuid.ToString("B"), "nfoobar", testGuid.ToString("N"), true, typeof(FormatException), false);
+
+ //simple valid cases
+ passing &= VerifyParse(testGuid.ToString("N"), "n", testGuid.ToString("N"));
+ passing &= VerifyParse(testGuid.ToString("d"), "D", testGuid.ToString("N"));
+ passing &= VerifyParse(testGuid.ToString("B"), "b", testGuid.ToString("N"));
+ passing &= VerifyParse(testGuid.ToString("p"), "P", testGuid.ToString("N"));
+ passing &= VerifyParse(testGuid.ToString("X"), "x", testGuid.ToString("N"));
+
+ //extra white space
+ passing &= VerifyParse(" " + testGuid.ToString("n") + " ", "N", testGuid.ToString("N"));
+ passing &= VerifyParse(" " + testGuid.ToString("D") + " ", "d", testGuid.ToString("N"));
+ passing &= VerifyParse(" " + testGuid.ToString("b") + " ", "B", testGuid.ToString("N"));
+ passing &= VerifyParse(" " + testGuid.ToString("P") + " ", "p", testGuid.ToString("N"));
+ passing &= VerifyParse(" " + testGuid.ToString("x") + " ", "X", testGuid.ToString("N"));
+
+ //missing digits in X format
+ passing &= VerifyParse("{0x2345678,0x1234,0x1234,{0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12}}", "X", "02345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x234,0x1234,{0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12}}", "X", "12345678023412341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x234,{0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12}}", "X", "12345678123402341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x2,0x12,0x12,0x12,0x12,0x12,0x12,0x12}}", "X", "12345678123412340212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x12,0x2,0x12,0x12,0x12,0x12,0x12,0x12}}", "X", "12345678123412341202121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x12,0x12,0x2,0x12,0x12,0x12,0x12,0x12}}", "X", "12345678123412341212021212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x12,0x12,0x12,0x2,0x12,0x12,0x12,0x12}}", "X", "12345678123412341212120212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x12,0x12,0x12,0x12,0x2,0x12,0x12,0x12}}", "X", "12345678123412341212121202121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x12,0x12,0x12,0x12,0x12,0x2,0x12,0x12}}", "X", "12345678123412341212121212021212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x12,0x12,0x12,0x12,0x12,0x12,0x2,0x12}}", "X", "12345678123412341212121212120212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x2}}", "X", "12345678123412341212121212121202");
+ passing &= VerifyParse("{0x2345678,0x234,0x234,{0x2,0x2,0x2,0x2,0x2,0x2,0x2,0x2}}", "X", "02345678023402340202020202020202");
+
+ //internal whitespace in X format, not in the number
+ passing &= VerifyParse("{ 0x12345678,0x1234,0x1234,{0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12}}", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678 ,0x1234,0x1234,{0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12}}", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678, 0x1234,0x1234,{0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12}}", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234 ,0x1234,{0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12}}", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234, 0x1234,{0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12}}", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234 ,{0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12}}", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234, {0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12}}", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{ 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12}}", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x12 ,0x12,0x12,0x12,0x12,0x12,0x12,0x12}}", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x12, 0x12,0x12,0x12,0x12,0x12,0x12,0x12}}", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x12,0x12 ,0x12,0x12,0x12,0x12,0x12,0x12}}", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x12,0x12, 0x12,0x12,0x12,0x12,0x12,0x12}}", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x12,0x12,0x12 ,0x12,0x12,0x12,0x12,0x12}}", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x12,0x12,0x12, 0x12,0x12,0x12,0x12,0x12}}", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x12,0x12,0x12,0x12 ,0x12,0x12,0x12,0x12}}", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x12,0x12,0x12,0x12, 0x12,0x12,0x12,0x12}}", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x12,0x12,0x12,0x12,0x12 ,0x12,0x12,0x12}}", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x12,0x12,0x12,0x12,0x12, 0x12,0x12,0x12}}", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x12,0x12,0x12,0x12,0x12,0x12 ,0x12,0x12}}", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x12,0x12,0x12,0x12,0x12,0x12, 0x12,0x12}}", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x12,0x12,0x12,0x12,0x12,0x12,0x12 ,0x12}}", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x12,0x12,0x12,0x12,0x12,0x12,0x12, 0x12}}", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12 }}", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{0x12345678,0x1234,0x1234,{0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12} }", "X", "12345678123412341212121212121212");
+ passing &= VerifyParse("{ 0x12345678 , 0x1234 , 0x1234 , { 0x12 , 0x12 , 0x12 , 0x12 , 0x12 , 0x12 , 0x12 , 0x12 } }", "X", "12345678123412341212121212121212");
+
+ //null string
+ passing &= VerifyParse(null, "N", null, false, typeof(ArgumentNullException));
+ passing &= VerifyParse(null, "D", null, false, typeof(ArgumentNullException));
+ passing &= VerifyParse(null, "B", null, false, typeof(ArgumentNullException));
+ passing &= VerifyParse(null, "P", null, false, typeof(ArgumentNullException));
+ passing &= VerifyParse(null, "X", null, false, typeof(ArgumentNullException));
+
+ //empty string
+ passing &= VerifyParse(String.Empty, "N", null, false, typeof(FormatException));
+ passing &= VerifyParse(String.Empty, "D", null, false, typeof(FormatException));
+ passing &= VerifyParse(String.Empty, "B", null, false, typeof(FormatException));
+ passing &= VerifyParse(String.Empty, "P", null, false, typeof(FormatException));
+ passing &= VerifyParse(String.Empty, "X", null, false, typeof(FormatException));
+
+ //whitespace string
+ passing &= VerifyParse(" ", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse(" ", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse(" ", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse(" ", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse(" ", "X", null, false, typeof(FormatException));
+
+ //internal whitespace in N format
+ passing &= VerifyParse("1 234567890abcdef1234567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("12 34567890abcdef1234567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("123 4567890abcdef1234567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234 567890abcdef1234567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345 67890abcdef1234567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("123456 7890abcdef1234567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567 890abcdef1234567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678 90abcdef1234567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("123456789 0abcdef1234567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890 abcdef1234567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890a bcdef1234567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890ab cdef1234567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abc def1234567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abcd ef1234567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abcde f1234567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abcdef 1234567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abcdef1 234567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abcdef12 34567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abcdef123 4567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abcdef1234 567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abcdef12345 67890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abcdef123456 7890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abcdef1234567 890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abcdef12345678 90ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abcdef123456789 0ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abcdef1234567890 ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abcdef1234567890A BCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abcdef1234567890AB CDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abcdef1234567890ABC DEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abcdef1234567890ABCD EF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abcdef1234567890ABCDE F", "N", null, false, typeof(FormatException));
+
+ //internal whitespace in D format
+ passing &= VerifyParse("1 2345678-90ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12 345678-90ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("123 45678-90ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234 5678-90ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345 678-90ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("123456 78-90ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567 8-90ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678 -90ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678- 90ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-9 0ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90 ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90a b-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab -cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab- cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-c def-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cd ef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cde f-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef -1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef- 1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1 234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-12 34-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-123 4-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1234 -567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1234- 567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1234-5 67890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1234-56 7890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1234-567 890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1234-5678 90ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1234-56789 0ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1234-567890 ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1234-567890A BCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1234-567890AB CDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1234-567890ABC DEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1234-567890ABCD EF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1234-567890ABCDE F", "D", null, false, typeof(FormatException));
+
+ //internal whitespace in B format
+ passing &= VerifyParse("{ 12345678-90ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{1 2345678-90ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12 345678-90ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{123 45678-90ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{1234 5678-90ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345 678-90ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{123456 78-90ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{1234567 8-90ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678 -90ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678- 90ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-9 0ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90 ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90a b-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab -cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab- cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-c def-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cd ef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cde f-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef -1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef- 1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1 234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-12 34-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-123 4-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234 -567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234- 567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-5 67890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-56 7890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-567 890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-5678 90ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-56789 0ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-567890 ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-567890A BCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-567890AB CDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-567890ABC DEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-567890ABCD EF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-567890ABCDE F}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-567890ABCDEF }", "B", null, false, typeof(FormatException));
+
+ //internal whitespace in P format
+ passing &= VerifyParse("( 12345678-90ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(1 2345678-90ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12 345678-90ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(123 45678-90ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(1234 5678-90ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345 678-90ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(123456 78-90ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(1234567 8-90ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678 -90ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678- 90ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-9 0ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90 ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90a b-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab -cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab- cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-c def-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cd ef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cde f-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef -1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef- 1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1 234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-12 34-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-123 4-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234 -567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234- 567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-5 67890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-56 7890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-567 890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-5678 90ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-56789 0ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-567890 ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-567890A BCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-567890AB CDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-567890ABC DEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-567890ABCD EF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-567890ABCDE F)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-567890ABCDEF )", "P", null, false, typeof(FormatException));
+
+ //internal whitespace in X format in a number
+ passing &= VerifyParse("{0 x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x 12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x1 2345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12 345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x123 45678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x1234 5678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345 678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x123456 78,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x1234567 8,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0 x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x 90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x9 0ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90 ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90a b,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0 xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0x cdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xc def,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcd ef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcde f,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0 x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x 1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1 234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x12 34,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x123 4,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0 x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x 56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x5 6,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0 x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x 78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x7 8,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0 x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x 90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x9 0,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0 xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0x AB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xA B,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0 xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0x CD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xC D,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0 xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0x EF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xE F}}", "X", null, false, typeof(FormatException));
+
+ //missing non-digit in D format
+ passing &= VerifyParse("1234567890ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90abcdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1234567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abcdef1234567890ABCDEF", "D", null, true, typeof(FormatException), false);
+
+ //missing non-digit in B format
+ passing &= VerifyParse("12345678-90ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{1234567890ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90abcdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-567890ABCDEF", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abcdef1234567890ABCDEF", "B", null, true, typeof(FormatException), false);
+
+ //missing non-digit in P format
+ passing &= VerifyParse("12345678-90ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(1234567890ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90abcdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-567890ABCDEF", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abcdef1234567890ABCDEF", "P", null, true, typeof(FormatException), false);
+
+ //missing non-digit in X format
+ passing &= VerifyParse("0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{012345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x123456780x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,090ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0cdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,01234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{056,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x560x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,078,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x780x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,090,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x900xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0AB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0CD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0EF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,0x56,0x78,0x90,0xAB,0xCD,0xEF}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,cdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,AB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,CD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,EF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678,90ab,cdef,1234,{56,78,90,AB,CD,EF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{1234567890abcdef1234567890ABCDEF}", "X", null, true, typeof(FormatException), false);
+ passing &= VerifyParse("(1234567890abcdef1234567890ABCDEF)", "X", null, true, typeof(FormatException), false);
+ passing &= VerifyParse("1234567890abcdef1234567890ABCDEF", "X", null, true, typeof(FormatException), false);
+
+ //misplaced non-digit in D format
+ passing &= VerifyParse("1234567-890ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90a-bcdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cde-f1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-12345-67890ABCDEF", "D", null, false, typeof(FormatException));
+
+ //misplaced non-digit in B format
+ passing &= VerifyParse("1{2345678-90ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{123456789-0ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90abc-def-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef1-234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-12345-67890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-567890ABCDE}F", "B", null, false, typeof(FormatException));
+
+ //misplaced non-digit in P format
+ passing &= VerifyParse("1(2345678-90ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(123456789-0ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90abc-def-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef1-234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-12345-67890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-567890ABCDE)F", "P", null, false, typeof(FormatException));
+
+ //misplaced non-digit in X format
+ passing &= VerifyParse("0x{12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{x012345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{01x2345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x1234567,80x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,x090ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,09x0ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab0,xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,x0cdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0cxdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef0,x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,x01234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,01x234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234{,0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234{,0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{x056,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{05x6,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x560,x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,x078,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,07x8,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x780,x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,x090,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,09x0,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x900x,AB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,xA0B,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0AxB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB0,xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,x0CD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0CxD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD0,xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,x0EF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0ExF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xE}F}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,{0x1234,0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("0x12345678,{}0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12340x5678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x123456780x,90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,c0xdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef0x,1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,0x{56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x560x,78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,90x0,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,A0xB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB0x,CD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD0x,EF}}", "X", null, false, typeof(FormatException));
+
+ //wrong non-digit in D format
+ passing &= VerifyParse("12345678+90ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab|cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef=1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1234_567890ABCDEF", "D", null, false, typeof(FormatException));
+
+ //wrong non-digit in B format
+ passing &= VerifyParse("[12345678-90ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678+90ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab=cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef|1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234*567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-567890ABCDEF]", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("[12345678-90ab-cdef-1234-567890ABCDEF]", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-567890ABCDEF)", "B", null, true, typeof(FormatException), false);
+
+ //wrong non-digit in P format
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678+90ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab?cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef*1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234>567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-567890ABCDEF>", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("[12345678-90ab-cdef-1234-567890ABCDEF]", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-567890ABCDEF}", "P", null, true, typeof(FormatException), false);
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "P", null, true, typeof(FormatException), false);
+
+ //wrong non-digit in X format
+ passing &= VerifyParse("(0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{ox12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0.12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678.0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,Ox90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0?90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab=0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,hxcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0hcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef;0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,Hx1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0H1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234:{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,[0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{ox56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0o56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56|0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,Ox78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0O78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78~0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,bx90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0b90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90;0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,-xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0-AB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB;0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,hxCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0hCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD;0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,hxEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0hEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF})", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,(0x56,0x78,0x90,0xAB,0xCD,0xEF)}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("(0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF})", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("(0x12345678,0x90ab,0xcdef,0x1234,(0x56,0x78,0x90,0xAB,0xCD,0xEF))", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,[0x56,0x78,0x90,0xAB,0xCD,0xEF]}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("[0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}]", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("[0x12345678,0x90ab,0xcdef,0x1234,[0x56,0x78,0x90,0xAB,0xCD,0xEF]]", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-567890ABCDEF}", "X", null, true, typeof(FormatException), false);
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-567890ABCDEF)", "X", null, true, typeof(FormatException), false);
+
+ //extra non-digits in N format
+ passing &= VerifyParse("+1234567890abcdef1234567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abc+def1234567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890abcdef1234567890ABCDEF+", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1234-567890ABCDEF", "N", null, true, typeof(FormatException), false);
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-567890ABCDEF}", "N", null, true, typeof(FormatException), false);
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-567890ABCDEF)", "N", null, true, typeof(FormatException), false);
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "N", null, true, typeof(FormatException), false);
+
+ //extra non-digits in D format
+ passing &= VerifyParse("-12345678-90ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234-5678-90ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678--90ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90-ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab--cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cd-ef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef--1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-12-34-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1234--567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1234-567890ABCDEF-", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678*-90ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab+-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef=-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1234|-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("[12345678-90ab-cdef-1234-567890ABCDEF]", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-567890ABCDEF)", "D", null, true, typeof(FormatException), false);
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-567890ABCDEF}", "D", null, true, typeof(FormatException), false);
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "D", null, true, typeof(FormatException), false);
+
+ //extra non-digits in B format
+ passing &= VerifyParse("{{12345678-90ab-cdef-1234-567890ABCDEF}}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{1234-5678-90ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678--90ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90-ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab--cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cd-ef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef--1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-12-34-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234--567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-567890-ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{(12345678-90ab-cdef-1234-567890ABCDEF)}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("({12345678-90ab-cdef-1234-567890ABCDEF})", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{1234+5678-90ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90=ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cd*ef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-12|34-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-5678&90ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("^{12345678-90ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{%12345678-90ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-567890ABCDEF$}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-567890ABCDEF}#", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "B", null, true, typeof(FormatException), false);
+
+ //extra non-digits in P format
+ passing &= VerifyParse("((12345678-90ab-cdef-1234-567890ABCDEF))", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(1234-5678-90ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678--90ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90-ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab--cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cd-ef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef--1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-12-34-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234--567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-567890-ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("({12345678-90ab-cdef-1234-567890ABCDEF})", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("{(12345678-90ab-cdef-1234-567890ABCDEF)}", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(1234+5678-90ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90=ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cd*ef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-12|34-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-5678&90ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("^(12345678-90ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(%12345678-90ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-567890ABCDEF$)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-567890ABCDEF)#", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(0x12345678,0x90ab,0xcdef,0x1234,(0x56,0x78,0x90,0xAB,0xCD,0xEF))", "P", null, false, typeof(FormatException));
+
+ //extra non-digits in X format
+ passing &= VerifyParse("{{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("({0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}})", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{(0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF})}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{{0x56,0x78,0x90,0xAB,0xCD,0xEF}}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,({0x56,0x78,0x90,0xAB,0xCD,0xEF})}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{(0x56,0x78,0x90,0xAB,0xCD,0xEF)}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{00x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0xx12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,00x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0xx90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,00xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xxcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,00x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0xx1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{00x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0xx56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,00x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0xx78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,00x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0xx90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,00xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xxAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,00xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xxCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,00xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xxEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678-,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab-,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef-,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234-,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x1234!5678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90@ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xc#def,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1$234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x5%6,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x7^8,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x9&0,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xA*B,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xC<D,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xE>F}}", "X", null, false, typeof(FormatException));
+
+ //missing digit in N format
+ passing &= VerifyParse("234567890abcdef1234567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("1234567890ABCDEF", "N", null, false, typeof(FormatException));
+
+ //missing digit in D format
+ passing &= VerifyParse("2345678-90ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-9ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdf-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-134-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1234-56789ABCDEF", "D", null, false, typeof(FormatException));
+
+ //missing digit in B format
+ passing &= VerifyParse("{2345678-90ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-9ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdf-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-134-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-56789ABCDEF}", "B", null, false, typeof(FormatException));
+
+ //missing digit in P format
+ passing &= VerifyParse("(2345678-90ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-9ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdf-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-134-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-56789ABCDEF)", "P", null, false, typeof(FormatException));
+
+ //misplaced digit in X format
+ passing &= VerifyParse("{0x2345678,0x901ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x0ab,0x9cdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xdef,0x12c34,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x123415678,0x90ab,0xcdef,0x234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x6,0x578,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x8,0x970,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x798,0x0,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xACD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xD,0xECF}}", "X", null, false, typeof(FormatException));
+
+ //invalid digit in N format
+ passing &= VerifyParse("1234567890abcdeg1234567890ABCDEF", "N", null, false, typeof(FormatException));
+
+ //invalid digit in D format
+ passing &= VerifyParse("234g5678-90ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-9hab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdif-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-13j4-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1234-56789GABCDEF", "D", null, false, typeof(FormatException));
+
+ //invalid digit in B format
+ passing &= VerifyParse("{234g5678-90ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-9hab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdif-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-13j4-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-56789GABCDEF}", "B", null, false, typeof(FormatException));
+
+ //invalid digit in P format
+ passing &= VerifyParse("(234g5678-90ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-9hab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdif-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-13j4-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-56789GABCDEF)", "P", null, false, typeof(FormatException));
+
+ //invalid digit in X format
+ passing &= VerifyParse("{0x123g5678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x9hab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcief,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1G34,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0xH6,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x7I,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0xJ0,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAK,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xLD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xMF}}", "X", null, false, typeof(FormatException));
+
+ //extra digit in N format
+ passing &= VerifyParse("12345678190abcdef1234567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("123456781234590abcdef1234567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("01234567890abcdef1234567890ABCDEF", "N", null, false, typeof(FormatException));
+ passing &= VerifyParse("0000001234567890abcdef1234567890ABCDEF", "N", null, false, typeof(FormatException));
+
+ //extra digit in the D format
+ passing &= VerifyParse("12343455678-90ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-930ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-c5def-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-13234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1234-563457890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("012345678-90ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-0090ab-cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-0cdef-1234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-00001234-567890ABCDEF", "D", null, false, typeof(FormatException));
+ passing &= VerifyParse("12345678-90ab-cdef-1234-00567890ABCDEF", "D", null, false, typeof(FormatException));
+
+ //extra digit in the B format
+ passing &= VerifyParse("{112345678-90ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-910ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-11cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1111234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-111111111567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{00012345678-90ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-090ab-cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-0000cdef-1234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-01234-567890ABCDEF}", "B", null, false, typeof(FormatException));
+ passing &= VerifyParse("{12345678-90ab-cdef-1234-00000567890ABCDEF}", "B", null, false, typeof(FormatException));
+
+ //extra digit in the P format
+ passing &= VerifyParse("(121111345678-90ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-92220ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cd3ef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-14234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-5655557890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(00012345678-90ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-090ab-cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-0cdef-1234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-001234-567890ABCDEF)", "P", null, false, typeof(FormatException));
+ passing &= VerifyParse("(12345678-90ab-cdef-1234-00000567890ABCDEF)", "P", null, false, typeof(FormatException));
+
+ //extra digit in the X format
+ passing &= VerifyParse("{0x121111345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x920ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xc33def,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x124434,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x556,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0xa78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x9b0,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAcB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCDD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x012345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x00090ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0x00cdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x001234,{0x56,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x056,0x78,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x078,0x90,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x0090,0xAB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0x0000AB,0xCD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0x00CD,0xEF}}", "X", null, false, typeof(FormatException));
+ passing &= VerifyParse("{0x12345678,0x90ab,0xcdef,0x1234,{0x56,0x78,0x90,0xAB,0xCD,0x00EF}}", "X", null, false, typeof(FormatException));
+ }
+ catch(Exception exc_general)
+ {
+ TestLibrary.Logging.WriteLine("Error: Unexpected Exception: {0}", exc_general);
+ passing = false;
+ }
+
+ if (passing)
+ {
+ Console.Write( "Passed!" );
+ }
+ else
+ {
+ TestLibrary.Logging.WriteLine( "Failed!" );
+ }
+ return passing;
+ }
+
+ private bool VerifyParse(string input, string format, string resultN)
+ {
+ return VerifyParse(input, format, resultN, true, null, true);
+ }
+
+ private bool VerifyParse(string input, string format, string resultN, bool valid, Type exceptionType)
+ {
+ return VerifyParse(input, format, resultN, valid, exceptionType, true);
+ }
+
+ private bool VerifyParse(string input, string format, string resultN, bool valid, Type exceptionType, bool validFormat)
+ {
+ bool result = true;
+ TestLibrary.Logging.WriteLine("");
+ TestLibrary.Logging.WriteLine("Testing input: \"{0}\" with format:{1}", input, format);
+
+ try
+ {
+ if (!validFormat) //only test the methods that take a format - invalid due to format
+ {
+ Guid guid3, guid4;
+ bool try2;
+
+ try
+ {
+ guid3 = Guid.ParseExact(input, format);
+ TestLibrary.Logging.WriteLine("Expected Exception not thrown: {0}", exceptionType);
+ result = false;
+ }
+ catch (Exception ex)
+ {
+ if (ex.GetType() != exceptionType)
+ {
+ TestLibrary.Logging.WriteLine("Wrong Exception thrown: Expected:{0} Got:{1}", exceptionType, ex);
+ result = false;
+ }
+ }
+
+ if (valid) //valid Guid but doesn't match format specifier.
+ {
+ try2 = Guid.TryParseExact(input, format, out guid4);
+ if (try2)
+ {
+ TestLibrary.Logging.WriteLine("Incorrect return value from try.");
+ result = false;
+ }
+ if (guid4 != Guid.Empty)
+ {
+ TestLibrary.Logging.WriteLine("Guid returned from try not Empty.");
+ result = false;
+ }
+ }
+ else
+ {
+ try
+ {
+ try2 = Guid.TryParseExact(input, format, out guid4);
+ TestLibrary.Logging.WriteLine("Expected Exception not thrown: {0}", exceptionType);
+ result = false;
+ }
+ catch (Exception ex)
+ {
+ if (ex.GetType() != exceptionType)
+ {
+ TestLibrary.Logging.WriteLine("Wrong Exception thrown: Expected:{0} Got:{1}", exceptionType, ex);
+ result = false;
+ }
+ }
+ }
+
+ }
+ else if (valid) //valid case
+ {
+ Guid guid1, guid2, guid3, guid4;
+ bool try1, try2;
+
+ guid1 = Guid.Parse(input);
+ try1 = Guid.TryParse(input, out guid2);
+ guid3 = Guid.ParseExact(input, format);
+ try2 = Guid.TryParseExact(input, format, out guid4);
+
+ if (guid4.ToString("N") != resultN)
+ {
+ TestLibrary.Logging.WriteLine("Wrong Result: Expected:{0} Got:{1}", resultN, guid4.ToString("N"));
+ result = false;
+ }
+ if ((guid1 != guid4) || (guid2 != guid4) || (guid3 != guid4))
+ {
+ TestLibrary.Logging.WriteLine("Not all results equal.");
+ result = false;
+ }
+ if (!try1 || !try2)
+ {
+ TestLibrary.Logging.WriteLine("Incorrect return value from try.");
+ result = false;
+ }
+ }
+ else //invalid case
+ {
+ Guid guid1, guid2, guid3, guid4;
+ bool try1, try2;
+
+ try1 = Guid.TryParse(input, out guid2);
+ try2 = Guid.TryParseExact(input, format, out guid4);
+ if (try1 || try2 )
+ {
+ TestLibrary.Logging.WriteLine("Incorrect return value from try.");
+ result = false;
+ }
+ if (guid2 != Guid.Empty || guid4 != Guid.Empty)
+ {
+ TestLibrary.Logging.WriteLine("Guid returned from try not Empty.");
+ result = false;
+ }
+
+ try
+ {
+ guid1 = Guid.Parse(input);
+ TestLibrary.Logging.WriteLine("Expected Exception not thrown: {0}", exceptionType);
+ result = false;
+ }
+ catch (Exception ex)
+ {
+ if (ex.GetType() != exceptionType)
+ {
+ TestLibrary.Logging.WriteLine("Wrong Exception thrown: Expected:{0} Got:{1}", exceptionType, ex);
+ result = false;
+ }
+ }
+
+ try
+ {
+ guid3 = Guid.ParseExact(input, format);
+ TestLibrary.Logging.WriteLine("Expected Exception not thrown: {0}", exceptionType);
+ result = false;
+ }
+ catch (Exception ex)
+ {
+ if (ex.GetType() != exceptionType)
+ {
+ TestLibrary.Logging.WriteLine("Wrong Exception thrown: Expected:{0} Got:{1}", exceptionType, ex);
+ result = false;
+ }
+ }
+ }
+ }
+ catch (Exception exc)
+ {
+ TestLibrary.Logging.WriteLine("Unexpected exception for input: \"{0}\" with format:{1} exception:{2}", input, format, exc);
+ }
+
+ if (!result)
+ {
+ TestLibrary.Logging.WriteLine("Incorrect result for input: \"{0}\" with format:{1}", input, format);
+ }
+
+ return result;
+ }
+
+ public static int Main(String[] args)
+ {
+ Boolean bResult = false;
+ Test test = new Test();
+
+ try
+ {
+ bResult = test.runTest();
+ }
+ catch (Exception exc)
+ {
+ bResult = false;
+ TestLibrary.Logging.WriteLine("Unexpected Exception thrown: {0}", exc);
+ }
+
+ if (bResult == false) return 1;
+
+ return 100;
+ }
+}
diff --git a/tests/src/CoreMangLib/system/lazyt/LazyTTF.csproj b/tests/src/CoreMangLib/system/lazyt/LazyTTF.csproj
new file mode 100644
index 0000000000..a06f618db2
--- /dev/null
+++ b/tests/src/CoreMangLib/system/lazyt/LazyTTF.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="lazyttf.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/lazyt/lazyttf.cs b/tests/src/CoreMangLib/system/lazyt/lazyttf.cs
new file mode 100644
index 0000000000..e08ca6c0e8
--- /dev/null
+++ b/tests/src/CoreMangLib/system/lazyt/lazyttf.cs
@@ -0,0 +1,14 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+
+class Test
+{
+ static int Main()
+ {
+ Lazy<int> l = new Lazy<int>(() => 100);
+ Console.WriteLine(l.Value);
+ return l.Value;
+ }
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/reflection/assembly/server1.cs b/tests/src/CoreMangLib/system/reflection/assembly/server1.cs
new file mode 100644
index 0000000000..b8aea8cc77
--- /dev/null
+++ b/tests/src/CoreMangLib/system/reflection/assembly/server1.cs
@@ -0,0 +1,17 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+//[assembly: AssemblyKeyFile("..\\..\\compatkey.dat")]
+
+
+public class server1
+{
+ public int trivial()
+ {
+ TestLibrary.Logging.WriteLine ("server.trivial");
+ return 1;
+ }
+}
diff --git a/tests/src/CoreMangLib/system/reflection/assembly/server1.csproj b/tests/src/CoreMangLib/system/reflection/assembly/server1.csproj
new file mode 100644
index 0000000000..6c72c4b5c0
--- /dev/null
+++ b/tests/src/CoreMangLib/system/reflection/assembly/server1.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="server1.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/reflection/assembly/server2.cs b/tests/src/CoreMangLib/system/reflection/assembly/server2.cs
new file mode 100644
index 0000000000..ed27b21f8e
--- /dev/null
+++ b/tests/src/CoreMangLib/system/reflection/assembly/server2.cs
@@ -0,0 +1,17 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+//[assembly: AssemblyKeyFile("..\\..\\compatkey.dat")]
+
+
+public class server2
+{
+ public int trivial()
+ {
+ TestLibrary.Logging.WriteLine ("server.trivial");
+ return 2;
+ }
+}
diff --git a/tests/src/CoreMangLib/system/reflection/assembly/server2.csproj b/tests/src/CoreMangLib/system/reflection/assembly/server2.csproj
new file mode 100644
index 0000000000..8005b04805
--- /dev/null
+++ b/tests/src/CoreMangLib/system/reflection/assembly/server2.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="server2.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/reflection/assembly/server3.cs b/tests/src/CoreMangLib/system/reflection/assembly/server3.cs
new file mode 100644
index 0000000000..8c0dd92151
--- /dev/null
+++ b/tests/src/CoreMangLib/system/reflection/assembly/server3.cs
@@ -0,0 +1,17 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+//[assembly: AssemblyKeyFile("..\\..\\compatkey.dat")]
+
+
+public class server3
+{
+ public int trivial()
+ {
+ TestLibrary.Logging.WriteLine ("server.trivial");
+ return 3;
+ }
+}
diff --git a/tests/src/CoreMangLib/system/reflection/assembly/server3.csproj b/tests/src/CoreMangLib/system/reflection/assembly/server3.csproj
new file mode 100644
index 0000000000..5fda00a5c0
--- /dev/null
+++ b/tests/src/CoreMangLib/system/reflection/assembly/server3.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="server3.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/reflection/assembly/server4.cs b/tests/src/CoreMangLib/system/reflection/assembly/server4.cs
new file mode 100644
index 0000000000..0ce442a141
--- /dev/null
+++ b/tests/src/CoreMangLib/system/reflection/assembly/server4.cs
@@ -0,0 +1,17 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Reflection;
+
+//[assembly: AssemblyKeyFile("..\\..\\compatkey.dat")]
+
+
+public class server4
+{
+ public int trivial()
+ {
+ TestLibrary.Logging.WriteLine ("server.trivial");
+ return 4;
+ }
+}
diff --git a/tests/src/CoreMangLib/system/reflection/assembly/server4.csproj b/tests/src/CoreMangLib/system/reflection/assembly/server4.csproj
new file mode 100644
index 0000000000..38518011c6
--- /dev/null
+++ b/tests/src/CoreMangLib/system/reflection/assembly/server4.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="server4.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/resources/resourcemanager/CustomCulture.csproj b/tests/src/CoreMangLib/system/resources/resourcemanager/CustomCulture.csproj
new file mode 100644
index 0000000000..224a75d1f8
--- /dev/null
+++ b/tests/src/CoreMangLib/system/resources/resourcemanager/CustomCulture.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>SharedLibrary</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="customculture.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/resources/resourcemanager/customculture.cs b/tests/src/CoreMangLib/system/resources/resourcemanager/customculture.cs
new file mode 100644
index 0000000000..a1a10e4644
--- /dev/null
+++ b/tests/src/CoreMangLib/system/resources/resourcemanager/customculture.cs
@@ -0,0 +1,64 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Globalization;
+
+/// <summary>
+/// customCultureInfo is derived from the System.Globalization.CultureInfo
+/// in order to provide support for a custom culture that is closely related
+/// to its parent culture.
+/// In this sample, the custom culture's role is limited to providing access
+/// to custom culture specific resources and providing a date format but the
+/// role of the custom culture could easily be expanded to provide additional
+/// differentiation with its parent culture. To do so, it is necessary to
+/// implement support for the other properties of the base CultureInfo class
+/// by overriding them in the derived class
+/// </summary>
+
+namespace CustomCulture
+{
+ public class CustomCultureInfo : CultureInfo
+ {
+ private string myDescription;
+ private string myName;
+ private string myParent;
+
+ // the constructor takes two parameters: the parent name and the custom name
+ public CustomCultureInfo(string parent, string customName) : base(parent)
+ {
+ myParent = parent;
+ myName = String.Format("{0}-{1}", parent, customName);
+ myDescription = String.Format("Custom Culture ({0})", myName);
+
+ // set formatting for date time
+ NumberFormatInfo nfi = (NumberFormatInfo)(new CultureInfo("en-US")).NumberFormat.Clone();
+ nfi.CurrencyPositivePattern = 3;
+ nfi.CurrencyGroupSeparator = "'";
+ nfi.CurrencySymbol = "$";
+ nfi.CurrencyDecimalDigits = 0;
+ base.NumberFormat = nfi;
+ }
+
+ public override String Name
+ {
+ get { return myName; }
+ }
+
+ public override CultureInfo Parent
+ {
+ get { return new CultureInfo(myParent); }
+ }
+
+ public override String EnglishName
+ {
+ get { return myDescription; }
+ }
+
+ public override String NativeName
+ {
+ get { return myDescription; }
+ }
+
+ }
+} \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/text/encoding/Shift_Jis.csproj b/tests/src/CoreMangLib/system/text/encoding/Shift_Jis.csproj
new file mode 100644
index 0000000000..3b9cd94f3e
--- /dev/null
+++ b/tests/src/CoreMangLib/system/text/encoding/Shift_Jis.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="shift_jis.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/text/encoding/shift_jis.cs b/tests/src/CoreMangLib/system/text/encoding/shift_jis.cs
new file mode 100644
index 0000000000..68ce5e21ba
--- /dev/null
+++ b/tests/src/CoreMangLib/system/text/encoding/shift_jis.cs
@@ -0,0 +1,224 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+using TestLibrary;
+
+public class Shift_JisTest
+{
+ public static int Main(string[] args)
+ {
+ Shift_JisTest test = new Shift_JisTest();
+ TestLibrary.TestFramework.BeginTestCase("Testing Shift_Jis encoding support in CoreCLR");
+
+ if (test.RunTests())
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.Logging.WriteLine("PASS");
+ return 100;
+ }
+ else
+ {
+ TestLibrary.TestFramework.EndTestCase();
+ TestLibrary.Logging.WriteLine("FAIL");
+ return 0;
+ }
+ }
+
+ public bool RunTests()
+ {
+ bool retVal = true;
+
+ TestLibrary.Logging.WriteLine("[Positive]");
+ // We now support only Unicode and UTF8 encodings
+ //retVal = PosTest1() && retVal;
+ //retVal = PosTest2() && retVal;
+ //retVal = PosTest3() && retVal;
+ //retVal = PosTest4() && retVal;
+ retVal = NegTest1() && retVal;
+
+ return retVal;
+ }
+
+ public bool NegTest1()
+ {
+ bool ret = true;
+ TestLibrary.TestFramework.BeginScenario("Creating the shift_jis encoding");
+
+ try
+ {
+ Encoding enc = Encoding.GetEncoding("shift_jis");
+
+ ret = false;
+ TestFramework.LogError("00F", "Encoding created unexpectedly. Expected argument exception. Actual: Create encoding with name: " + enc.WebName);
+ }
+ catch (NotSupportedException)
+ {
+ // Expected
+ }
+ catch (ArgumentException)
+ {
+ // Expected
+ }
+ catch (Exception exc)
+ {
+ ret = false;
+ TestFramework.LogError("010", "Unexpected error: " + exc.ToString());
+ }
+ return ret;
+ }
+
+ public bool PosTest1()
+ {
+ bool ret = true;
+ TestLibrary.TestFramework.BeginScenario("Creating the shift_jis encoding");
+
+ try
+ {
+ Encoding enc2 = Encoding.GetEncoding("shift_jis");
+ if (enc2.WebName != "shift_jis")
+ {
+ ret = false;
+ TestFramework.LogError("002", "Error creating encoding. Web name not as expected. Expected: shift_jis Actual: " + enc2.WebName);
+ }
+
+ Encoding enc3 = Encoding.GetEncoding("sHiFT_JIs");
+ if (enc3.WebName != "shift_jis")
+ {
+ ret = false;
+ TestFramework.LogError("003", "Error creating encoding. Web name not as expected. Expected: shift_jis Actual: " + enc3.WebName);
+ }
+ }
+ catch (Exception exc)
+ {
+ ret = false;
+ TestFramework.LogError("004", "Unexpected error: " + exc.ToString());
+ }
+ return ret;
+ }
+
+ public bool PosTest2()
+ {
+ bool ret = true;
+ TestLibrary.TestFramework.BeginScenario("Encoding strings with the shift_jis encoding");
+
+ try
+ {
+ Encoding enc = Encoding.GetEncoding("shift_jis");
+
+ string str = "ABc";
+ byte[] bytes = enc.GetBytes(str);
+ byte[] expected = new byte[] { 0x41, 0x42, 0x63 };
+
+ if (!Utilities.CompareBytes(bytes, expected))
+ {
+ ret = false;
+ TestFramework.LogError("005", "Encoding str -> bytes not as expected. Str: " + str + " Expected bytes: " + Utilities.ByteArrayToString(expected) + " Actual bytes: " + Utilities.ByteArrayToString(bytes));
+ }
+
+ str = "";
+ bytes = enc.GetBytes(str);
+ expected = new byte[0];
+
+ if (!Utilities.CompareBytes(bytes, expected))
+ {
+ ret = false;
+ TestFramework.LogError("006", "Encoding str -> bytes not as expected. Str: " + str + " Expected bytes: " + Utilities.ByteArrayToString(expected) + " Actual bytes: " + Utilities.ByteArrayToString(bytes));
+ }
+
+ str = "A\xff70\x3000\x00b6\x25ef\x044f\x9adc\x9ed1";
+ bytes = enc.GetBytes(str);
+ expected = new byte[] { 0x41, 0xb0, 0x81, 0x40, 0x81, 0xf7, 0x81, 0xfc, 0x84, 0x91, 0xfc, 0x40, 0xfc, 0x4b };
+
+ if (!Utilities.CompareBytes(bytes, expected))
+ {
+ ret = false;
+ TestFramework.LogError("007", "Encoding str -> bytes not as expected. Str: " + str + " Expected bytes: " + Utilities.ByteArrayToString(expected) + " Actual bytes: " + Utilities.ByteArrayToString(bytes));
+ }
+ }
+ catch (Exception exc)
+ {
+ ret = false;
+ TestFramework.LogError("008", "Unexpected error: " + exc.ToString());
+ }
+ return ret;
+ }
+
+ public bool PosTest3()
+ {
+ bool ret = true;
+ TestLibrary.TestFramework.BeginScenario("Encoding char[]s with the shift_jis encoding");
+
+ try
+ {
+ Encoding enc = Encoding.GetEncoding("shift_jis");
+
+ char[] str = new char[] { 'A', 'B', 'c' };
+ byte[] bytes = enc.GetBytes(str);
+ byte[] expected = new byte[] { 0x41, 0x42, 0x63 };
+
+ if (!Utilities.CompareBytes(bytes, expected))
+ {
+ ret = false;
+ TestFramework.LogError("009", "Encoding char[] -> bytes not as expected. Str: " + new string(str) + " Expected bytes: " + Utilities.ByteArrayToString(expected) + " Actual bytes: " + Utilities.ByteArrayToString(bytes));
+ }
+
+ str = new char[0];
+ bytes = enc.GetBytes(str);
+ expected = new byte[0];
+
+ if (!Utilities.CompareBytes(bytes, expected))
+ {
+ ret = false;
+ TestFramework.LogError("00A", "Encoding char[] -> bytes not as expected. Str: " + new string(str) + " Expected bytes: " + Utilities.ByteArrayToString(expected) + " Actual bytes: " + Utilities.ByteArrayToString(bytes));
+ }
+
+ str = new char[] { 'A', '\xff70', '\x3000', '\x00b6', '\x25ef', '\x044f', '\x9adc', '\x9ed1' };
+ bytes = enc.GetBytes(str);
+ expected = new byte[] { 0x41, 0xb0, 0x81, 0x40, 0x81, 0xf7, 0x81, 0xfc, 0x84, 0x91, 0xfc, 0x40, 0xfc, 0x4b };
+
+ if (!Utilities.CompareBytes(bytes, expected))
+ {
+ ret = false;
+ TestFramework.LogError("00B", "Encoding char[] -> bytes not as expected. Str: " + new string(str) + " Expected bytes: " + Utilities.ByteArrayToString(expected) + " Actual bytes: " + Utilities.ByteArrayToString(bytes));
+ }
+ }
+ catch (Exception exc)
+ {
+ ret = false;
+ TestFramework.LogError("00C", "Unexpected error: " + exc.ToString());
+ }
+ return ret;
+ }
+
+ public bool PosTest4()
+ {
+ bool ret = true;
+ TestLibrary.TestFramework.BeginScenario("Decoding byte[]s with the shift_jis encoding");
+
+ try
+ {
+ Encoding enc = Encoding.GetEncoding("shift_jis");
+
+ byte[] bytes = { 0x87, 0x90 };
+ char[] expected = new char[] {'\x2252'};
+
+ char[] actual = enc.GetChars(bytes);
+
+ if (!Utilities.CompareChars(actual, expected))
+ {
+ ret = false;
+ TestFramework.LogError("00D", "Decoding byte[] -> char[] not as expected! Expected: 0x8786 Actual ");
+ foreach (char c in actual) Logging.Write("0x" + ((int)c).ToString("x") + " ");
+ }
+ }
+ catch (Exception exc)
+ {
+ ret = false;
+ TestFramework.LogError("00E", "Unexpected error: " + exc.ToString());
+ }
+ return ret;
+ }
+
+}
diff --git a/tests/src/CoreMangLib/system/version/Version_Parsing.csproj b/tests/src/CoreMangLib/system/version/Version_Parsing.csproj
new file mode 100644
index 0000000000..128ab0fb9d
--- /dev/null
+++ b/tests/src/CoreMangLib/system/version/Version_Parsing.csproj
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="version_parsing.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ <ProjectReference Include="../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/system/version/version_parsing.cs b/tests/src/CoreMangLib/system/version/version_parsing.cs
new file mode 100644
index 0000000000..24085bad36
--- /dev/null
+++ b/tests/src/CoreMangLib/system/version/version_parsing.cs
@@ -0,0 +1,317 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Text;
+
+public class Test
+ {
+ public Boolean runTest()
+ {
+ TestLibrary.Logging.WriteLine( "parse testing started." );
+ bool passing = true;
+
+ try
+ {
+ //input is null
+ passing &= VerifyParseException(null, typeof(ArgumentNullException), false);
+
+ //input is empty
+ passing &= VerifyParseException(String.Empty, typeof(ArgumentException), false);
+
+ //input is whitespace
+ passing &= VerifyParseException(" ", typeof(ArgumentException), false);
+
+ //input has 1 component
+ passing &= VerifyParseException("1234", typeof(ArgumentException), false);
+
+ //input has 5 components
+ passing &= VerifyParseException("123.123.123.324.543", typeof(ArgumentException), false);
+
+ //input has a negative component
+ passing &= NormalCasesException("-123", typeof(ArgumentOutOfRangeException), false);
+
+ //component > Int32
+ passing &= NormalCasesException((((long)Int32.MaxValue) + 1).ToString("d"), typeof(OverflowException), false);
+
+ //component has extra whitespace (internal and external)
+ passing &= NormalCases(" 123");
+ passing &= NormalCases("123 ");
+ passing &= NormalCases(" 123 ");
+ passing &= NormalCasesException("1 23", typeof(FormatException), false);
+
+ //component in hex format
+ passing &= NormalCasesException("0x123", typeof(FormatException), false);
+
+ //component in exp format
+ passing &= NormalCasesException("12e2", typeof(FormatException), false);
+
+ //component has leading sign
+ passing &= NormalCases("+123");
+
+ //component has trailing sign
+ passing &= NormalCasesException("123+", typeof(FormatException), false);
+ passing &= NormalCasesException("123-", typeof(FormatException), false);
+
+ //component has commas
+ passing &= NormalCasesException("12,345", typeof(FormatException), false);
+
+ //component has hex chars
+ passing &= NormalCasesException("ac", typeof(FormatException), false);
+
+ //component has non-digit
+ passing &= NormalCasesException("12v3", typeof(FormatException), false);
+ passing &= NormalCasesException("12^3", typeof(FormatException), false);
+ passing &= NormalCasesException("12#3", typeof(FormatException), false);
+ passing &= NormalCasesException("1*23", typeof(FormatException), false);
+
+ //component has wrong seperator
+ passing &= VerifyParseException("123,123,123,324", typeof(ArgumentException), false);
+ passing &= VerifyParseException("123:123:123:324", typeof(ArgumentException), false);
+ passing &= VerifyParseException("123;123;123;324", typeof(ArgumentException), false);
+ passing &= VerifyParseException("123-123-123-324", typeof(ArgumentException), false);
+ passing &= VerifyParseException("123 123 123 324", typeof(ArgumentException), false);
+
+ //added "V" at start
+ passing &= VerifyParseException("V123.123.123.324", typeof(FormatException), false);
+ passing &= VerifyParseException("v123.123.123.324", typeof(FormatException), false);
+
+ //normal case
+ passing &= VerifyParse("123.123");
+ passing &= VerifyParse("123.123.123");
+ passing &= VerifyParse("123.123.123.123");
+
+ //valid 0 case
+ passing &= NormalCases("0");
+ passing &= VerifyParse("0.0.0.0");
+
+ //Int32.MaxValue cases
+ passing &= NormalCases(Int32.MaxValue.ToString("d"));
+ }
+ catch(Exception exc_general)
+ {
+ TestLibrary.Logging.WriteLine("Error: Unexpected Exception: {0}", exc_general);
+ passing = false;
+ }
+
+ if (passing)
+ {
+ TestLibrary.Logging.WriteLine("Passed!");
+ }
+ else
+ {
+ TestLibrary.Logging.WriteLine( "Failed!" );
+ }
+ return passing;
+ }
+
+ private bool NormalCasesException(string input, Type exceptionType, bool tryThrows)
+ {
+ bool passing = true;
+
+ passing &= VerifyParseException(String.Format("{0}.123", input), exceptionType, false);
+ passing &= VerifyParseException(String.Format("123.{0}", input), exceptionType, false);
+ passing &= VerifyParseException(String.Format("{0}.123.123", input), exceptionType, false);
+ passing &= VerifyParseException(String.Format("123.{0}.123", input), exceptionType, false);
+ passing &= VerifyParseException(String.Format("123.123.{0}", input), exceptionType, false);
+ passing &= VerifyParseException(String.Format("{0}.123.123.324", input), exceptionType, false);
+ passing &= VerifyParseException(String.Format("123.{0}.123.324", input), exceptionType, false);
+ passing &= VerifyParseException(String.Format("123.123.{0}.324", input), exceptionType, false);
+ passing &= VerifyParseException(String.Format("123.123.123.{0}", input), exceptionType, false);
+
+ return passing;
+ }
+ private bool VerifyParseException(string input, Type exceptionType, bool tryThrows)
+ {
+ bool result = true;
+ TestLibrary.Logging.WriteLine("");
+ TestLibrary.Logging.WriteLine("Testing input: \"{0}\"", input);
+
+ try
+ {
+ try
+ {
+ Version.Parse(input);
+ TestLibrary.Logging.WriteLine("Version.Parse:: Expected Exception not thrown.");
+ result = false;
+ }
+ catch (Exception e)
+ {
+ if (e.GetType() != exceptionType)
+ {
+ TestLibrary.Logging.WriteLine("Version.Parse:: Wrong Exception thrown: Expected:{0} Got:{1}", exceptionType, e);
+ result = false;
+ }
+ }
+
+ Version test;
+ if (tryThrows)
+ {
+ try
+ {
+ Version.TryParse(input, out test);
+ TestLibrary.Logging.WriteLine("Version.TryParse:: Expected Exception not thrown.");
+ result = false;
+ }
+ catch (Exception e)
+ {
+ if (e.GetType() != exceptionType)
+ {
+ TestLibrary.Logging.WriteLine("Version.TryParse:: Wrong Exception thrown: Expected:{0} Got:{1}", exceptionType, e);
+ result = false;
+ }
+ }
+ }
+ else
+ {
+ bool rVal;
+ rVal = Version.TryParse(input, out test);
+ if (rVal)
+ {
+ TestLibrary.Logging.WriteLine("Version.TryParse:: Expected failure parsing, got true return value.");
+ result = false;
+ }
+ if (!IsDefaultVersion(test))
+ {
+ TestLibrary.Logging.WriteLine("Version.TryParse:: Expected null, got {0} value.", test);
+ result = false;
+ }
+ }
+ }
+ catch (Exception exc)
+ {
+ TestLibrary.Logging.WriteLine("Unexpected exception for input: \"{0}\" exception: {1}", input, exc);
+ result = false;
+ }
+
+ if (!result)
+ {
+ TestLibrary.Logging.WriteLine("Incorrect result for input: \"{0}\"", input);
+ }
+
+ return result;
+ }
+
+ private bool NormalCases(string input)
+ {
+ bool passing = true;
+
+ passing &= VerifyParse(String.Format("{0}.123", input));
+ passing &= VerifyParse(String.Format("123.{0}", input));
+ passing &= VerifyParse(String.Format("{0}.123.123", input));
+ passing &= VerifyParse(String.Format("123.{0}.123", input));
+ passing &= VerifyParse(String.Format("123.123.{0}", input));
+ passing &= VerifyParse(String.Format("{0}.123.123.324", input));
+ passing &= VerifyParse(String.Format("123.{0}.123.324", input));
+ passing &= VerifyParse(String.Format("123.123.{0}.324", input));
+ passing &= VerifyParse(String.Format("123.123.123.{0}", input));
+
+ return passing;
+ }
+ private bool VerifyParse(string input)
+ {
+ bool result = true;
+ TestLibrary.Logging.WriteLine("");
+ TestLibrary.Logging.WriteLine("Testing input: \"{0}\"", input);
+
+ try
+ {
+
+ String[] parts = input.Split('.');
+ int major = Int32.Parse(parts[0]);
+ int minor = Int32.Parse(parts[1]);
+ int build = 0;
+ int revision = 0;
+ if (parts.Length > 2) build = Int32.Parse(parts[2]);
+ if (parts.Length > 3) revision = Int32.Parse(parts[3]);
+
+ Version expected = null;
+ if (parts.Length == 2) expected = new Version(major, minor);
+ if (parts.Length == 3) expected = new Version(major, minor, build);
+ if (parts.Length > 3) expected = new Version(major, minor, build, revision);
+
+ Version test;
+ try
+ {
+ test = Version.Parse(input);
+ if (test.CompareTo(expected) != 0)
+ {
+ TestLibrary.Logging.WriteLine("Version.Parse:: Expected Result. Expected {0}, Got {1}", expected, test);
+ result = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.Logging.WriteLine("Version.Parse:: Unexpected Exception thrown: {0}", e);
+ result = false;
+ }
+
+ try
+ {
+ bool rVal;
+ rVal = Version.TryParse(input, out test);
+ if (!rVal)
+ {
+ TestLibrary.Logging.WriteLine("Version.TryParse:: Expected no failure parsing, got false return value.");
+ result = false;
+ }
+ if (test.CompareTo(expected) != 0)
+ {
+ TestLibrary.Logging.WriteLine("Version.TryParse:: Expected {0}, Got {1}", expected, test);
+ result = false;
+ }
+ }
+ catch (Exception e)
+ {
+ TestLibrary.Logging.WriteLine("Version.TryParse:: Unexpected Exception thrown: {0}", e);
+ result = false;
+ }
+ }
+ catch (Exception exc)
+ {
+ TestLibrary.Logging.WriteLine("Unexpected exception for input: \"{0}\" exception:{1}", input, exc);
+ result = false;
+ }
+
+ if (!result)
+ {
+ TestLibrary.Logging.WriteLine("Incorrect result for input: \"{0}\"", input);
+ }
+
+ return result;
+ }
+ private bool IsDefaultVersion(Version input)
+ {
+ bool ret = false;
+
+ if (input == null)
+ {
+ ret = true;
+ }
+
+ return ret;
+
+ //use to return Version of 0.0.0.0 on failure - now returning null.
+ //return (input.CompareTo(new Version()) == 0);
+ }
+
+ public static int Main(String[] args)
+ {
+ Boolean bResult = false;
+ Test test = new Test();
+
+ try
+ {
+ bResult = test.runTest();
+ }
+ catch (Exception exc)
+ {
+ bResult = false;
+ TestLibrary.Logging.WriteLine("Unexpected Exception thrown: {0}", exc);
+ }
+
+ if (bResult == false) return 1;
+
+ return 100;
+ }
+}